Commit Graph
66 Commits
Author SHA1 Message Date
Tam Nhu Tran 1ff4329ee4 feat(providers): instrument copilot, cursor, and glmt across daemons and executors
Provider modules now emit structured stage tags around daemon spawn /
ready / stop, executor invocations, and upstream dispatch. glmt-transformer
gets cleanup-stage error conversion; legacy glmt-proxy adds minimal
listen + retry instrumentation (full per-request stages live in proxy-server
since glmt-proxy is compat-only).

Refs #1141, #1138
2026-04-30 13:00:33 -04:00
Tam Nhu Tran 71deda553a fix(cliproxy): preserve adaptive thinking on opus 4.7 paths 2026-04-22 21:43:11 -04:00
Tam Nhu Tran 571538dc1c fix(cliproxy): scope Opus 4.7 rollout to verified providers 2026-04-20 13:26:53 -04:00
Sergey Galuza 61058123e1 feat(cliproxy): add Claude Opus 4.7 support
Adds Claude Opus 4.7 as a new model to the AGY (Antigravity) and Claude
provider catalogs, with pricing, Cursor IDE support, and updated defaults
across the codebase.

- Add claude-opus-4-7-thinking and claude-opus-4-7 to AGY catalog
  (defaultModel bumped to claude-opus-4-7-thinking)
- Add claude-opus-4-7 entry to Claude provider catalog
- Register claude-opus-4-7-thinking fork alias in CLIProxy config
  (CLIPROXY_CONFIG_VERSION bumped 17 -> 18)
- Add pricing for claude-opus-4-7 and claude-opus-4-7-thinking
  ($5/$25 per million, matching Opus 4.6)
- Add claude-4.7-opus and claude-4.7-opus-fast-mode to Cursor catalog
- Update ANTHROPIC_DEFAULT_OPUS_MODEL in base-claude settings to 4.7
- Update Droid adapter and code-reviewer fallback models to 4.7
- Update unit tests for model-catalog and model-pricing

Opus 4.6 is retained as a supported fallback in both catalogs.

Built [OnSteroids](https://onsteroids.ai)
2026-04-20 17:49:18 +02:00
Tam Nhu Tran 1923d87a84 chore: merge dev into openai provider routing 2026-04-15 20:36:03 -04:00
Tam Nhu Tran 3b5941c60b feat(cursor): split legacy bridge from cliproxy provider 2026-04-15 17:04:37 -04:00
Tam Nhu Tran a3407093d7 refactor(proxy): internalize sse translation and cleanup handlers 2026-04-15 01:44:01 -04:00
Tam Nhu Tran 4e738ee021 fix(cli): document gitlab shortcut flags and harden cursor routing 2026-04-15 01:39:31 -04:00
Tam Nhu Tran cf5df0630a fix(cursor): resolve PR review findings 2026-04-12 02:14:26 -04:00
Tam Nhu Tran e1049e38d4 feat(cursor): harden live probe and runtime contracts 2026-04-12 01:51:26 -04:00
Tam Nhu Tran e3074ae60e fix(cursor): tear down oversized daemon model responses
- destroy the response stream when /v1/models exceeds the body limit

- prevent the oversized-response fallback test from hanging during server shutdown
2026-04-03 01:09:46 -04:00
Tam Nhu Tran 3dcf879c9f refactor(cli): slim cursor completion imports
- extract cursor subcommand constants into a lightweight module

- remove redundant copilot token concatenation from the command catalog
2026-04-03 00:53:10 -04:00
Tam Nhu Tran f7ddad6c19 fix(cursor): harden runtime follow-up regressions 2026-04-02 03:21:38 -04:00
Tam Nhu Tran 2d67f40175 fix(cursor): route bare cursor through runtime profile 2026-04-01 22:50:58 -04:00
Tam Nhu Tran 27f6a675be fix(cursor): address review feedback and translator edge cases 2026-04-01 22:50:58 -04:00
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 3af554275e test: isolate shared-state test suites for CI stability
- add dependency injection to export-command, binary-manager,
  codex-plan-compatibility, config-command, and usage-syncer
- override process.exit in api-export test to prevent silent
  termination in Bun's parallel test runner
- harden test-environment bootstrap with process.env isolation
- fix auth middleware to avoid config upgrade during checks
2026-03-25 16:41:41 -04:00
Tam Nhu Tran a35859aba5 fix(cursor): harden anthropic daemon contract handling 2026-03-17 07:17:35 -04:00
Tam Nhu Tran eaee4a92ca fix(cursor): harden anthropic response fallback paths 2026-03-16 14:42:15 -04:00
Tam Nhu Tran 9ff021e42b fix(cursor): harden anthropic translation edge cases 2026-03-16 14:42:15 -04:00
Tam Nhu Tran b068fb2621 fix(cursor): avoid empty user turns after tool results 2026-03-16 14:42:15 -04:00
Tam Nhu Tran daad5d1f50 feat(cursor): add Anthropic daemon endpoint 2026-03-16 14:42:15 -04:00
Tam Nhu Tran 5ad2416a86 refactor(daemon): share process ownership guard for safe shutdown 2026-03-04 16:42:59 +07:00
Tam Nhu Tran fae8716900 fix(cursor): fallback when requested model is unavailable
- resolve request model against current available catalog

- choose safe default when configured default id is not present

- add tests and docs for daemon request-model fallback behavior
2026-02-17 20:53:03 +07:00
Tam Nhu Tran 4798741a99 fix(cursor): resolve review feedback and harden edge cases 2026-02-17 16:33:21 +07:00
Tam Nhu Tran c639cefa7b feat(cursor): harden daemon integration and model discovery 2026-02-17 04:09:06 +07:00
Kai (Tam Nhu) TranandGitHub 16aeddfb11 Merge pull request #568 from kaitranntt/fix/555-cursor-e2e-recovery
feat(cursor): recover lost Cursor dashboard and model-mapping work
2026-02-14 17:50:57 +07:00
Tam Nhu Tran 7b73658f87 feat(cursor): sync model mapping across config and raw settings
- add cursor model fields to unified config defaults and YAML comments

- expand Cursor model catalog/defaults and return configured current model

- keep cursor.settings.json env model fields in sync with config updates

- align unit tests for new model defaults and route merge behavior

Refs #555
2026-02-14 16:57:04 +07:00
Tam Nhu Tran 08a3e0bae6 fix(cursor): split daemon helpers to satisfy maintainability gate 2026-02-14 10:36:13 +07:00
Tam Nhu Tran f02e7dc5c6 fix(cliproxy): address lifecycle port and thinking regressions 2026-02-14 10:23:39 +07:00
Tam Nhu Tran 0e55db88a5 fix(cursor): address CI gate and review regressions 2026-02-14 06:41:57 +07: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 36a67c4837 fix(cursor): close ReadableStream controller on abort to prevent consumer hangs
When abort fires after streaming begins, onAbort closed HTTP/2 handles
but never closed the ReadableStream controller. Consumers waiting on
reader.read() could hang indefinitely since end/error handlers were
gated by streamClosed flag.

Hoist controller reference to outer scope so abort handler can close it.
2026-02-13 05:33:56 +07:00
Tam Nhu Tran 27badb2584 fix(cursor): validate fetch status before streaming fallback and register abort early
- Check response.status before calling transformProtobufToSSE in fetch fallback
- Move abort signal registration before response headers to handle early cancellation
2026-02-13 04:21:13 +07:00
Tam Nhu Tran 4e5b502fc9 feat(cursor): namespace FIELD constants and implement true streaming SSE (#531, #535) 2026-02-13 04:12:29 +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 cda037e7e5 fix(cursor): clean up PID file on startDaemon failure and improve daemon robustness
- Add removePidFile() in safeResolve on failure to prevent stale PIDs
- Only send SIGKILL in stopDaemon if SIGTERM wait loop exhausted
- Check isDaemonRunning before model fetch to avoid 5s timeout
- Add port validation unit tests for startDaemon
2026-02-12 08:11:41 +07:00
Tam Nhu Tran ce1915366d fix(cursor): use stdio ignore, sequential polling, move CursorConfig to types
- Change spawn stdio from piped to 'ignore' preventing buffer deadlock
- Replace setInterval with sequential setTimeout polling
- Fix TOCTOU in SIGKILL escalation (send directly without probing)
- Move CursorConfig interface to types.ts
- Change detectProvider default from 'openai' to 'unknown'
- Remove redundant removePidFile() when PID is null
2026-02-12 07:51:22 +07:00
Tam Nhu Tran 94789676b9 fix(cursor): use process.execPath and add safeResolve to model fetcher
- Replace 'node' with process.execPath for cross-platform reliability
- Add safeResolve guard in fetchModelsFromDaemon matching startDaemon pattern
2026-02-12 07:37:20 +07:00
Tam Nhu Tran 36f0308a72 fix(cursor): add response body handling and size limit
- Drain health check response body with res.resume()
- Add 1MB body size limit in fetchModelsFromDaemon
2026-02-12 07:24:10 +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 7d4e6d6b65 fix(cursor): add resolve guard, port validation, and daemon tests
- Add double-resolve guard in startDaemon with safeResolve wrapper
- Add port validation (1-65535) before Node.js script interpolation
- Fix misleading comment in stopDaemon (no PID file handling)
- Add getDaemonStatus test for no daemon running case
- Add stopDaemon tests for graceful non-existent PID handling
2026-02-12 04:27:35 +07:00
Tam Nhu Tran afb5e746b3 fix(cursor): address remaining PR #527 review feedback
- Add SIGKILL escalation in stopDaemon after SIGTERM timeout
- Document router difference between cursor/copilot help behavior
- Fix detectProvider to handle o1/o4 models via regex pattern
- Add fetchModelsFromDaemon fallback test for unreachable daemon
- Update CLAUDE.md help table with cursor command entry
2026-02-12 04:14:28 +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 83894f43c6 Merge remote-tracking branch 'origin/dev' into kai/feat/520-cursor-daemon-cli
# Conflicts:
#	src/cursor/cursor-auth.ts
#	src/cursor/cursor-executor.ts
#	src/cursor/cursor-protobuf-decoder.ts
#	src/cursor/cursor-protobuf-encoder.ts
#	src/cursor/cursor-protobuf-schema.ts
#	src/cursor/cursor-protobuf.ts
#	src/cursor/cursor-translator.ts
#	src/cursor/types.ts
2026-02-12 03:55:01 +07:00
Kai (Tam Nhu) TranandGitHub 5df2965642 Merge pull request #525 from kaitranntt/kai/feat/518-cursor-protobuf-executor
feat(cursor): add ConnectRPC protobuf encoder/decoder and HTTP/2 executor
2026-02-12 03:48:23 +07:00
Tam Nhu Tran 79ba1de4e2 fix(cursor): tighten rate limit detection string matching
Use specific patterns ('rate limit', 'resource_exhausted', 'too many
requests') instead of broad 'rate' or 'limit' substrings that would
false-positive on unrelated errors like 'character limit exceeded'.
2026-02-12 03:38:31 +07:00