Commit Graph
11 Commits
Author SHA1 Message Date
Tam Nhu Tran d7b907ed9f fix(cursor): make bare cursor command useful and harden tool-result translation 2026-04-01 22:50:58 -04:00
Tam Nhu Tran 4df08f6d99 feat: make cliproxy provider nicknames optional by default 2026-03-23 11:02:08 -04:00
Tam Nhu Tran be9d7cf73e feat(cursor): complete daemon wiring and add dedicated dashboard page 2026-02-14 06:22:28 +07:00
Tam Nhu Tran bfc9361701 fix(cursor): fix router fall-through, add daemon marker, use random test port
- Route all `ccs cursor *` to handleCursorCommand (no profile-switching)
- Add --ccs-daemon marker to spawned process for stable PID validation
- Use random port in lifecycle integration test to prevent CI conflicts
- Remove unnecessary .toFixed(1) on integer tokenAge
2026-02-12 08:37:01 +07:00
Tam Nhu Tran 760a5c3ca4 fix(cursor): harden stopDaemon PID validation, tighten regex, add lifecycle test
- Validate PID belongs to cursor daemon via /proc before signaling
- Tighten detectProvider regex to avoid over-matching o-prefixed models
- Add integration test for daemon start→health→stop lifecycle
- Add void cast on discarded handleHelp() return value
- Update model catalog date comment
2026-02-12 08:28:32 +07:00
Tam Nhu Tran 934238740e fix(cursor): export missing symbols, eliminate subcommand sync risk, improve tests
- Export detectProvider and formatModelName from barrel index
- Export CURSOR_SUBCOMMANDS from cursor-command.ts, import in ccs.ts
- Use getCcsDir() in tests instead of manual path construction
- Add handleCursorCommand routing test for unknown subcommand
2026-02-12 08:21:39 +07:00
Tam Nhu Tran 887efa4069 fix(cursor): show auto-detect error message, add subcommand sync comment 2026-02-12 07:59:39 +07:00
Tam Nhu Tran 88ad13ee7b fix(cursor): kill orphaned daemon on timeout and fix exit codes
MEDIUM fixes:
- Kill orphaned process when health check times out after 30s
- Prevents zombie processes from consuming resources

LOW fixes:
- Return exit code 1 for unknown cursor subcommands (was 0)
- Simplify exit handler dead code branch (else if code !== null → else)
2026-02-12 07:17:03 +07:00
Tam Nhu Tran 9f9db7dcea fix(cursor): save credentials after auto-detect and fix signal hang
- handleAuth() now calls saveCredentials() after successful auto-detect
- Handle code === null (signal kill) in daemon exit handler to prevent
  promise from hanging indefinitely
- Remove unnecessary await on synchronous functions
2026-02-12 04:11:31 +07:00
Tam Nhu Tran 9f0ea25448 fix(cursor): address PR #527 review feedback
- Wire cursor command into main router (ccs.ts) following copilot pattern
- Centralize default port (4242) and model (gpt-4.1) as constants
- Remove duplicate types already in cursor-protobuf-schema from dev
- Handle daemon exit code 0 before health check succeeds
- Export PID helpers and model utils for testability
- Add unit tests for cursor-daemon (PID file ops, isDaemonRunning)
- Add unit tests for cursor-models (detectProvider, formatModelName, defaults)
2026-02-12 04:03:01 +07:00
Tam Nhu Tran aaa31c6427 feat(cursor): add daemon lifecycle, models catalog, and CLI commands
Implements #520 - Cursor IDE daemon, models catalog, module index, and CLI.

Files created:
- src/cursor/cursor-daemon.ts (~230 LOC) - Lifecycle management (start/stop/status)
- src/cursor/cursor-models.ts (~145 LOC) - Model catalog with Anthropic/OpenAI/Google/Cursor models
- src/cursor/index.ts (~30 LOC) - Module barrel exports
- src/commands/cursor-command.ts (~230 LOC) - CLI commands (auth/status/models/start/stop)

Key features:
- Daemon health checks via HTTP /health endpoint
- PID file management in ~/.ccs/cursor/daemon.pid
- Model catalog with fetchModelsFromDaemon() and fallback defaults
- CLI subcommand routing following copilot-command.ts pattern
- ASCII-only output ([OK], [X], [i] markers)

Temporary defaults for config (port: 4242, model: gpt-4.1) until #521 adds
cursor to unified config schema.

Note: Actual daemon server implementation (CursorExecutor integration) deferred
to #522 - this creates the lifecycle structure only.
2026-02-11 18:06:46 +07:00