Commit Graph
32 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 1c72b4b8d5 refactor(cliproxy): flatten module structure and colocate tests (#1135)
- Split types.ts (331 LOC) into 4 concern-based files under types/:
  platform-types, binary-types, provider-types, config-types
- Preserve backward compat via barrel re-export (types.ts → types/index)
- Reorganize 53 root-level files into 8 subdirectories:
  accounts/, ai-providers/, auth/, binary/, config/, executor/,
  management/, proxy/, quota/, routing/, services/, sync/
- Reduce src/cliproxy/ root from 65 to 8 files (target: ≤10)
- Colocate 87 unit tests from tests/unit/cliproxy/ into
  src/cliproxy/*/__tests__/ (13 colocated test directories)
- Update import paths across 40+ consumer files
- Add TDD backward-compat test for types split

Refs #1135
2026-04-29 17:06:39 -04:00
Tam Nhu Tran 64ecd8b3dc feat(image-analysis): make MCP-first provisioning self-healing 2026-04-08 13:36:05 -04:00
Tam Nhu Tran 77b488f8b1 fix(image-analysis): harden runtime and provisioning 2026-04-02 18:36:19 -04:00
Tam Nhu Tran 813b2dd4d0 feat(image-analysis): add provider-backed runtime 2026-04-02 15:44:13 -04:00
Tam Nhu Tran 1a01c6fc68 fix(image-analysis): surface runtime readiness 2026-04-01 15:32:37 -04:00
Tam Nhu Tran ae459fc3d7 feat(image-analysis): resolve backend status per profile 2026-04-01 15:32:37 -04:00
Tam Nhu Tran de7171d810 feat(websearch): finish managed third-party rollout
- steer third-party launches toward the managed WebSearch MCP tool

- add opt-in trace diagnostics across launch, MCP, provider, and headless paths

- extend docs and regression coverage for the first-class runtime

Refs #862
2026-03-30 22:41:51 -04:00
Tam Nhu Tran e260df7178 feat: add first-class CCS WebSearch runtime 2026-03-30 16:10:39 -04:00
Tam Nhu Tran 7bd4049602 fix(copilot): stop mutating config on read 2026-03-15 14:53:43 -04:00
Tam Nhu Tran c409a4522c fix: normalize stale copilot raptor-mini model 2026-03-10 17:55:28 +07:00
Tam Nhu Tran 8a5ed656ee fix(copilot): surface upstream model limits 2026-03-07 09:26:09 +07:00
Tam Nhu Tran 930d66fc0d fix(copilot): refine ownership checks and command error handling 2026-03-04 17:18:44 +07:00
Tam Nhu Tran 1fd128e50f fix(copilot): harden daemon lifecycle and validate config updates 2026-03-04 17:05:35 +07: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 f4678d6397 fix(copilot): sync alias UX and harden daemon stop safety 2026-03-04 16:37:23 +07:00
Tam Nhu Tran 4b1cda25d9 fix(copilot): improve daemon liveness and flag aliases 2026-03-04 16:14:12 +07:00
Tam Nhu Tran 0b9f9826e2 feat(continuity): support cross-profile continuity inheritance from account profiles 2026-03-03 02:49:17 +07:00
Tam Nhu Tran e32192177b Merge remote-tracking branch 'origin/dev' into kai/fix/588-nested-session-guard 2026-02-20 23:04:59 +07:00
Tam Nhu Tran 8e57d59479 fix(execution): strip claudecode in remaining claude paths
- sanitize Copilot profile Claude launch environment

- sanitize auth create isolated instance launch environment

- sanitize doctor Claude CLI version check spawn environment

Refs #588
2026-02-20 23:00:59 +07:00
Tam Nhu Tran 8201204380 fix(quota): address ghcp review follow-ups 2026-02-20 22:53:49 +07:00
Tam Nhu Tran 8d9d4987dc feat(quota): add GitHub Copilot quota checks for ghcp and copilot 2026-02-20 22:32:27 +07:00
Kai (Tam Nhu) TranGitHubCarlos Umanzorgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>semantic-release-bot
0b394933ae feat: hybrid CLIProxy catalog sync + agent teams env fix (#486)
* fix(teams): propagate CLAUDE_CONFIG_DIR to tmux session for agent teammates

When CCS launches Claude with CLAUDE_CONFIG_DIR pointing to the isolated
instance path, agent team teammates spawned via tmux split-window don't
inherit it because tmux creates new panes from its own session environment.
This causes teammates to use ~/.claude/ instead of ~/.ccs/instances/{profile}/,
creating a split-brain in shared state (tasks, teams, mailbox).

Sets key CCS env vars in the tmux session environment via `tmux setenv` so
all new panes inherit the correct config directory.

* refactor(teams): use spawnSync array args instead of execSync string

Avoids shell interpretation of env values by passing args as array
to spawnSync instead of interpolating into a shell command string.

* chore(release): 7.38.0-dev.1 [skip ci]

* feat(cliproxy): add hybrid catalog sync with CLIProxyAPI (#485)

* chore(release): 7.38.0 [skip ci]

## [7.38.0](https://github.com/kaitranntt/ccs/compare/v7.37.1...v7.38.0) (2026-02-07)

### Features

* **release:** v7.38.0 - Extended Context, Qwen Models, Bug Fixes ([#480](https://github.com/kaitranntt/ccs/issues/480)) ([b454834](https://github.com/kaitranntt/ccs/commit/b4548341750804339c87c48259dd8741425d2acf)), closes [#472](https://github.com/kaitranntt/ccs/issues/472) [#474](https://github.com/kaitranntt/ccs/issues/474) [#103](https://github.com/kaitranntt/ccs/issues/103) [#478](https://github.com/kaitranntt/ccs/issues/478) [#482](https://github.com/kaitranntt/ccs/issues/482)

* feat(cliproxy): add hybrid catalog sync with CLIProxyAPI

Add `ccs cliproxy catalog` command family for syncing model catalogs
from CLIProxyAPI's model-definitions endpoint. Cached locally with
24h TTL, merges remote models with static catalog preserving
broken/deprecated flags. Dashboard API endpoint at /api/cliproxy/catalog.

Closes #477

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>

* chore(reviewer): upgrade review model from opus 4.5 to opus 4.6

- update default model in code-reviewer.ts
- update REVIEW_MODEL, ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL
  in ai-review.yml workflow
- aligns reviewer with AGY model catalog default

* chore(release): 7.38.0-dev.2 [skip ci]

* fix(hooks): add image analysis env vars for settings-based profiles (#484)

* chore(release): 7.38.0 [skip ci]

## [7.38.0](https://github.com/kaitranntt/ccs/compare/v7.37.1...v7.38.0) (2026-02-07)

### Features

* **release:** v7.38.0 - Extended Context, Qwen Models, Bug Fixes ([#480](https://github.com/kaitranntt/ccs/issues/480)) ([b454834](https://github.com/kaitranntt/ccs/commit/b4548341750804339c87c48259dd8741425d2acf)), closes [#472](https://github.com/kaitranntt/ccs/issues/472) [#474](https://github.com/kaitranntt/ccs/issues/474) [#103](https://github.com/kaitranntt/ccs/issues/103) [#478](https://github.com/kaitranntt/ccs/issues/478) [#482](https://github.com/kaitranntt/ccs/issues/482)

* fix(hooks): add image analysis env vars for settings-based profiles

Image analysis hook was injected into settings files for API profiles
but the CCS_IMAGE_ANALYSIS_* env vars were never set, causing the hook
to skip. Add getImageAnalysisHookEnv() call to both settings-based and
GLMT proxy execution paths, matching CLIProxy profile behavior.

Closes #440

* fix(hooks): add hook env vars to copilot executor

Copilot profile had same gap as settings-based profiles: hooks installed
but webSearch/imageAnalysis env vars and CCS_PROFILE_TYPE never set.
Add missing env var injection matching other profile flows.

---------

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>

* chore(release): 7.38.0-dev.3 [skip ci]

---------

Co-authored-by: Carlos Umanzor <cumanzor@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2026-02-06 23:54:03 -05:00
kaitranntt 91cd9ffc16 fix(ui): use UI color system for consistent CLI indicators 2025-12-22 19:41:05 -05:00
kaitranntt 5d343260c7 feat(global-env): add global environment variables injection for third-party profiles
- add global_env config section to unified config types and loader

- inject global env vars at runtime for cliproxy and copilot profiles

- add GET/PUT /api/global-env endpoints for UI management

- add Global Env tab to Settings page with enable toggle and var management

- add GlobalEnvIndicator component showing injected vars in profile editors

- support ?tab=globalenv query param for direct navigation from indicators
2025-12-18 22:38:25 -05:00
kaitranntt ec6face8db fix(copilot): use gpt-4.1 as default model and 127.0.0.1 for local connections
Key changes:
- Changed default model from claude-sonnet-4.5 to gpt-4.1 (free tier compatible)
- Updated all Claude models to minPlan: 'pro' (requires paid Copilot subscription)
- Replaced 'localhost' with '127.0.0.1' for more reliable local connections
  (bypasses DNS resolution and potential IPv6 issues)
- Updated UI presets: replaced Claude Haiku with Raptor Mini in free tier
- Fixed FREE_PRESETS to only include actually free models

This fixes the "model_not_supported" error when using free tier GitHub Copilot
subscription, which doesn't have access to Claude models.
2025-12-18 04:58:49 -05:00
kaitranntt 7653caba71 feat(copilot): add complete model catalog with plan tiers
Add 19 GitHub Copilot supported models with metadata:
- Anthropic: claude-sonnet-4.5, claude-sonnet-4, claude-opus-4.5,
  claude-opus-4.1, claude-haiku-4.5
- OpenAI: gpt-5.2, gpt-5.1-codex-max, gpt-5.1-codex, gpt-5.1-codex-mini,
  gpt-5.1, gpt-5-codex, gpt-5, gpt-5-mini, gpt-4.1
- Google: gemini-3-pro, gemini-3-flash, gemini-2.5-pro
- xAI: grok-code-fast-1
- Fine-tuned: raptor-mini

Each model includes:
- minPlan: free, pro, pro+, business, enterprise
- multiplier: 0 = free tier, 0.25-0.33 = cheap, 1 = standard, 3-10 = premium
- preview: boolean for non-GA models

Update default model to claude-sonnet-4.5 (standard multiplier).
2025-12-18 03:48:47 -05:00
kaitranntt 4783632958 fix(copilot): use token file check for instant auth status
- add hasTokenFile() for fast auth check without subprocess

- capture device code from copilot-api auth output

- export AuthFlowResult type with deviceCode and verificationUrl

- echo auth output to terminal while capturing for UI
2025-12-18 03:00:43 -05:00
kaitranntt 9a8eea82c5 refactor(copilot): use local installation from package manager
- copilot-auth: use getCopilotApiBinPath() instead of npx

- copilot-daemon: move PID file to ~/.ccs/copilot/daemon.pid

- copilot-executor: auto-install copilot-api on first use

- index: export package manager functions
2025-12-18 02:26:46 -05:00
kaitranntt ecdad1d6d0 feat(copilot): add self-managed package manager for copilot-api
- install copilot-api locally to ~/.ccs/copilot/

- auto-update with version caching (1hr TTL)

- version pinning support via .version-pin file

- mirrors CLIProxy binary-manager pattern
2025-12-18 02:26:11 -05:00
kaitranntt d21908ab63 feat(copilot): add model tier mapping support
- add opus_model, sonnet_model, haiku_model to CopilotConfig

- update generateCopilotEnv to use tier-specific models

- fall back to default model when tier not configured
2025-12-18 00:19:11 -05:00
kaitranntt 3b8a85c9ef feat(copilot): add copilot manager module
- copilot-auth.ts: GitHub OAuth handling via copilot-api

- copilot-daemon.ts: daemon lifecycle (start/stop/status)

- copilot-models.ts: model catalog with Anthropic/OpenAI models

- copilot-executor.ts: profile execution and env generation

- types.ts: CopilotStatus, CopilotModel interfaces
2025-12-17 21:38:11 -05:00