Commit Graph
68 Commits
Author SHA1 Message Date
Tam Nhu Tran 8d8f4469b6 fix(websearch): reject blank searxng status urls 2026-04-12 14:46:56 -04:00
Tam Nhu Tran 54791b5cca Merge remote-tracking branch 'origin/dev' into kai/fix/958-searxng-pr-review 2026-04-12 06:32:27 -04:00
Tam Nhu Tran 8b553c35c1 fix(websearch): harden searxng url handling 2026-04-12 06:31:20 -04:00
Tam Nhu Tran 898e7a6321 hotfix: detect bun-owned installs through symlinked ccs path 2026-04-12 01:33:48 -04:00
buiducnhat eec8c8b4a3 feat(websearch): add SearXNG provider support and configuration
- Updated websearch.md to include SearXNG in the configuration guide.
- Implemented SearXNG JSON API integration in websearch-transformer.cjs.
- Enhanced unified-config-loader.ts to support SearXNG settings.
- Defined SearXNG configuration types in unified-config-types.ts.
- Updated hook-env.ts to manage SearXNG environment variables.
- Modified status.ts to include SearXNG in web search provider checks.
- Added SearXNG routes and validation in websearch-routes.ts.
- Implemented SearXNG provider tests in websearch-transformer.test.ts.
- Updated readiness tests to account for SearXNG in status.test.ts.
- Enhanced websearch routes tests to validate SearXNG settings.
- Added SearXNG configuration fields in the UI settings.
2026-04-11 16:43:59 +07:00
Tam Nhu Tran 2aaabb2deb fix(update): target the current CCS installation 2026-04-10 21:39:50 -04:00
Tam Nhu Tran e090c8b0d4 fix(image-analysis): preserve default runtime deps 2026-04-10 17:40:27 -04:00
Tam Nhu Tran 2f02ddfb74 fix(image-analysis): tolerate missing auth init dependency 2026-04-10 17:21:26 -04:00
Tam Nhu Tran 64ecd8b3dc feat(image-analysis): make MCP-first provisioning self-healing 2026-04-08 13:36:05 -04:00
Kai (Tam Nhu) TranandGitHub 6e2dba8bfc Merge pull request #891 from kaitranntt/kai/fix/855-cursor-dual-mode-runtime-dev-refresh
fix(cursor): make Cursor a first-class runtime profile and harden integration
2026-04-03 00:03:45 -04:00
Tam Nhu Tran 0347f5a973 fix(image-analysis): stabilize mcp config locking 2026-04-02 18:56:13 -04:00
Tam Nhu Tran afc8b0bb6e fix(image-analysis): handle installer lock contention 2026-04-02 18:53:11 -04:00
Tam Nhu Tran 77b488f8b1 fix(image-analysis): harden runtime and provisioning 2026-04-02 18:36:19 -04:00
Tam Nhu Tran f379a4001f test(image-analysis): cover runtime auth and fallback 2026-04-02 15:44:13 -04:00
Tam Nhu Tran f7ddad6c19 fix(cursor): harden runtime follow-up regressions 2026-04-02 03:21:38 -04:00
Tam Nhu Tran 982ffc5895 feat(image): add native-read controls and autosave settings
- add per-profile native image preferences and native-capability detection
- redesign Settings -> Image around compact sections with Web-style autosave
- expose richer backend/profile status and update Gemini Flash defaults
2026-04-01 15:32:37 -04:00
Tam Nhu Tran 1a01c6fc68 fix(image-analysis): surface runtime readiness 2026-04-01 15:32:37 -04:00
Tam Nhu Tran d394772f7c fix(image-analysis): preview backend status safely 2026-04-01 15:32:37 -04:00
Tam Nhu Tran 9277b4a087 test(image-analysis): cover resolver and dashboard status 2026-04-01 15:32:37 -04:00
Tam Nhu Tran 7f83e041b7 feat(websearch): add managed mcp runtime and provider cooldowns
- switch ccs-websearch MCP to stdio-first framing and keep legacy compatibility

- add cooldown persistence and bounded retries for provider failures

- surface cooldown status in readiness output and regression tests
2026-03-31 14:22:11 -04:00
Tam Nhu Tran cae5b710b8 fix(websearch): close review gaps in managed runtime 2026-03-30 23:02:20 -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 b087c02738 fix: merge existing disallowed tool flags for websearch 2026-03-30 17:39:21 -04:00
Tam Nhu Tran e260df7178 feat: add first-class CCS WebSearch runtime 2026-03-30 16:10:39 -04:00
Tam Nhu Tran 0821c68559 fix(websearch): restore hook recovery and force register 2026-03-28 10:37:20 -04:00
Tam Nhu Tran 0e6965d205 fix(websearch): harden settings-profile hook setup
- fail enabled settings-profile create and launch flows when hook preparation is still unusable

- refresh stale shared hook binaries without rewriting unchanged installs or failing benign races

- add rollback and regression coverage for disabled, stale, invalid, copy, import, and launch paths
2026-03-28 09:51:13 -04:00
Tam Nhu Tran fbbdd80830 fix(websearch): avoid partial settings-hook migration
- verify the hook binary before migrating global WebSearch hook state

- centralize migration-marker helpers in hook-installer exports

- expand regression coverage for existing-hook, disabled, invalid-name, and failed-install paths
2026-03-27 17:22:56 -04:00
Tam Nhu Tran 39a3e9dfc0 fix(websearch): install hook for settings profiles
- ensure profile hook injection installs the transformer binary before writing the command

- keep migration marker cleanup in the installer to avoid a circular import

- add a regression test for isolated CCS_HOME settings profiles
2026-03-27 17:05:41 -04:00
Tam Nhu Tran 3ea9d2fc34 fix(settings): stabilize websearch and quota checks 2026-03-25 16:31:55 -04:00
Tam Nhu Tran 6c7d215ecc feat(websearch): add real provider chain 2026-03-23 15:26:05 -04:00
Tam Nhu Tran 5525098400 feat: deprecate GLMT user-facing surfaces 2026-03-17 15:49:29 -04:00
Tam Nhu Tran 1043a433f6 fix: normalize plugin metadata across shared launch flows 2026-03-17 09:56:31 -04:00
Tam Nhu Tran fd5d16f3f3 fix: align proxy routing across fetch and downloader 2026-03-16 07:10:39 -04:00
Tam Nhu Tran f50c9625de fix: harden global fetch proxy handling 2026-03-16 06:58:01 -04:00
Tam Nhu Tran 2be5c5a706 fix: sync error code docs links 2026-03-07 09:56:35 +07:00
Tam Nhu Tran 4cdb6594f8 fix: respect auto_update preference by disabling Claude auto-updater 2026-03-02 21:13:15 +07:00
Tam Nhu Tran 0aed60febb fix(ci): enforce parity gate and stabilize test execution 2026-02-23 23:53:09 +07:00
Tam Nhu Tran 04e4e61b68 fix(test): pin real child_process passthrough refs
- bind real spawn/spawnSync/execSync before module mocking

- avoid potential rebinding recursion or mock passthrough drift in CI

- keeps non-Claude process execution untouched during test mocks
2026-02-20 23:41:20 +07:00
Tam Nhu Tran 873b7adb70 fix(test): scope child_process mock to test lifecycle
- register child_process module mock in beforeAll instead of module load

- keep passthrough for non-Claude commands and restore after suite

- avoids cross-suite side effects that stalled cursor daemon CI tests
2026-02-20 23:36:22 +07:00
Tam Nhu Tran 5b164a6486 fix(test): prevent child_process mock cross-test leakage
- mock only Claude command spawns and pass through real child_process for others

- add missing ChildProcess-compatible fields (pid/unref) on mock child

- stabilizes cursor daemon and ccsd alias tests in CI parallel execution
2026-02-20 23:24:11 +07:00
Tam Nhu Tran 80a84edf1f test(delegation): add regression coverage for claudecode stripping
- verify case-insensitive CLAUDECODE removal helper behavior

- cover execClaude env merge, override, no-key, and Windows paths

- cover headless executor spawn env sanitization behavior

Refs #588
2026-02-20 23:01:09 +07:00
Tam Nhu Tran 0bf00b23d9 fix(profile): close km legacy kimi compatibility gaps 2026-02-19 13:02:56 +07:00
Tam Nhu Tran cf8070b5f0 fix(profile): handle km compatibility for legacy kimi api users 2026-02-19 12:43:41 +07:00
Tam Nhu Tran 672813beba chore: merge dev, resolve cursor-daemon test conflict 2026-02-17 17:05:47 +07:00
Tam Nhu Tran 539afea737 style: format source and test files 2026-02-17 17:03:11 +07:00
Kai (Tam Nhu) TranandGitHub 3c1f49ccd2 Merge pull request #577 from kaitranntt/feat/576-cursor-battle-test-integration
feat(cursor): harden daemon integration and model discovery
2026-02-17 16:49:29 +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 3da3407f9a fix(targets): harden adapter lifecycle and droid model edge cases 2026-02-17 04:09:48 +07:00
Tam Nhu Tran c9faf6cdc9 test(cliproxy): stabilize path-sensitive CI test assertions
- infer update cache paths from runtime module behavior instead of hardcoded ~/.ccs

- assert GLMT default log path via getCcsDir to avoid cross-suite env leakage
2026-02-13 06:47:32 +07:00
Kai (Tam Nhu) TranGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
051805074e feat: account safety, quota monitoring, and stability fixes (#530)
* fix(cliproxy): migrate deprecated gemini-claude-* model names to upstream claude-* names (#515)

* fix(cliproxy): migrate deprecated gemini-claude-* model names to upstream claude-* names

CLIProxyAPI registry no longer recognizes the gemini-claude-* prefix convention.
Model names in catalog, base config, and user settings are migrated to upstream
claude-* names. Auto-migration in env-builder rewrites existing user settings on
load and persists the change.

Closes #513

* fix: address code review feedback — sync UI layer and add migration tests

- Sync UI isNativeGeminiModel() with backend (remove gemini-claude- exclusion)
- Update UI model catalog agy entries from gemini-claude-* to claude-*
- Update CI/CD workflow and code-reviewer default model names
- Add unit tests for migrateDeprecatedModelNames() logic

* fix(hooks): isolate image type check before error-prone processing (#514)

* fix(hooks): isolate image type check before error-prone processing

Restructure processHook() into two phases so non-image Read calls
never see hook error messages. Phase 1 defensively checks tool name
and file extension, exiting 0 silently on any failure. Phase 2 only
runs for confirmed image/PDF files where errors are relevant.

Closes #511

* fix(hooks): sync image analyzer hook file on every profile launch

Add installImageAnalyzerHook() call to cliproxy executor, matching
the existing installWebSearchHook() pattern. This ensures the .cjs
file in ~/.ccs/hooks/ gets refreshed from the npm package on every
launch, so users receive hook updates after npm update.

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

* fix(cliproxy): add fork:true for Claude model aliases in config generator (#523)

Config generator now outputs fork:true for Claude model alias entries,
ensuring both upstream (claude-*) and aliased (gemini-claude-*) model
names appear in /v1/models listings. Also preserves fork flag when
parsing user-added aliases during config regeneration.

Bumps config version to v7 to trigger regeneration on next ccs doctor.

Closes #522

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

* feat(cliproxy): add account safety guards to prevent Google account bans (#516)

* feat(cliproxy): add account safety guards to prevent Google account bans

Implements cross-provider isolation to prevent Google from flagging
concurrent OAuth usage across different client IDs (ref: #509, #512).

Three pillars:
1. Auto-pause enforcement at session launch — conflicting accounts in
   other Google OAuth providers are paused so CLIProxyAPI can't use them,
   restored on session exit with crash recovery via auto-paused.json
2. Ban/disable detection — error responses matching Google ban patterns
   auto-pause the affected account to prevent further damage
3. Cross-provider conflict warnings during OAuth registration

Key design decisions:
- PID-based session tracking for crash recovery (dead PID = restore)
- Timestamp comparison prevents restoring ban-paused accounts on exit
- Schema validation on auto-paused.json prevents corrupted state
- Falls back to warn-only when another session is managing isolation

* fix(cliproxy): address code review feedback (attempt 1/5)

- Re-read auto-paused.json before write in enforceProviderIsolation to
  reduce concurrent write race window
- Use actual email from registry for display instead of raw accountId
- Export maskEmail for testability
- Add 27 unit tests covering ban detection, email masking,
  cross-provider duplicate detection, enforcement lifecycle,
  crash recovery, and timestamp-guarded restore

* fix(cliproxy): address remaining review feedback (attempt 2/5)

- Add handleBanDetection test verifying account pause on ban error
- Add warnCrossProviderDuplicates tests (true/false/non-Google)
- Document PID reuse limitation in isPidAlive JSDoc comment

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

* feat(cliproxy): runtime quota monitoring during active sessions (#529)

* feat(cliproxy): add runtime quota monitoring during active sessions

Adds adaptive background quota polling to detect and respond to quota
exhaustion during active CLIProxy sessions. Prevents rate-limit-driven
account bans by auto-cooling exhausted accounts and switching defaults.

- Adaptive polling: 300s normal, 60s at 20% threshold, stops at 0%
- Stderr warnings at 20%, boxed exhaustion alerts at 0%
- Cooldown + default switch on exhaustion (existing patterns)
- Configurable via quota_management.runtime_monitor in config.yaml
- Timer.unref() prevents blocking process exit
- monitorStopped guard for in-flight poll safety

Closes #524

* fix: address code review feedback (attempt 1/5)

- M1: Round quotaPercent display with Math.round() to avoid ugly floats
- M2: Rename exhaust_threshold -> exhaustion_threshold for consistency
  with existing auto.exhaustion_threshold config field
- M3: Replace async not.toThrow() with direct await assertion pattern

* fix: address code review feedback (attempt 2/5)

- Remove .claude/agent-memory/ from tracking and add to .gitignore
- Unify cooldown_minutes default to 5 (was 10 in runtime_monitor, 5 in auto)
- Add threshold validation in startQuotaMonitor (warn > exhaustion)
- Document intentional post-switch monitoring gap in code comment

* chore(release): 7.41.0-dev.4 [skip ci]

* fix(cliproxy): mask email in ban detection and fix JSDoc default

- Use maskEmail() in handleBanDetection output for consistency
- Fix cooldown_minutes JSDoc: default is 5, not 10

* chore(release): 7.41.0-dev.5 [skip ci]

* fix(cliproxy): address all review feedback (Low + informational)

- Add sync constraint comment on process.exit handler (executor)
- Add TOCTOU race acceptability comment (account-safety)
- Mask email in handleQuotaExhaustion reason string
- Use realistic exhaustion_threshold (5) in test configs

* chore(release): 7.41.0-dev.6 [skip ci]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-12 00:48:29 +07:00