Commit Graph
127 Commits
Author SHA1 Message Date
Tam Nhu Tran bbcf9e8b15 fix: mask Docker key rotation banner 2026-05-22 17:04:19 -04:00
Tam Nhu Tran 30971ebb28 fix: preserve Docker legacy API key during rotation 2026-05-22 16:49:16 -04:00
Tam Nhu Tran 3dc1810540 feat: report permission mode persist receipt status 2026-05-22 11:14:17 -04:00
Kai (Tam Nhu) TranandGitHub 67fe6d9c7f fix(persist): print recovery receipt after settings write (#1302) 2026-05-19 15:23:37 -04:00
Kai (Tam Nhu) TranandGitHub 3b2016462a fix(persist): block codex claude settings bridge 2026-05-19 07:32:04 -04:00
Kai (Tam Nhu) TranandGitHub d61469edcb fix(config): bind dashboard to loopback by default 2026-05-12 10:59:49 -04:00
Kai (Tam Nhu) TranandGitHub 248b6b735d Merge pull request #1200 from kaitranntt/kai/feat/1199-shared-resource-controls
feat(auth): add shared resource controls
2026-05-10 22:01:57 -04:00
Tam Nhu Tran 9d0690e1a8 test(ci): make routing mock complete and websearch trace path env-robust
Two pre-existing test bugs surfaced under CCS CI on the new claw self-
hosted runners but stayed hidden locally:

1. tests/unit/commands/cliproxy-routing-subcommand.test.ts mocks the
   routing-subcommand module with only 3 exports, but
   src/commands/cliproxy/index.ts statically imports 6. Bun resolves
   the static import graph against the mock and reports
     SyntaxError: Export named 'handleRoutingAffinitySet' not found
   for every test in the file. Add the missing 3 exports
   (handleRoutingAffinityStatus, handleRoutingAffinityHelp,
   handleRoutingAffinitySet) to the mock and document why the mock
   must mirror every named export of the target module.

2. tests/unit/hooks/websearch-transformer.test.ts builds the
   "disallowed" trace path from process.cwd() and from os.homedir().
   Both fall under the os.tmpdir() safe-prefix in two real
   environments: CI runners with cwd == /tmp/runner/work/... and Bun
   test isolation that re-roots HOME under tmpdir. The hook treats
   them as safe, writes the trace, and the assertion that the file
   does NOT exist fails. Anchor disallowedTracePath under /etc/...
   instead so it cannot satisfy the tmpdir, /var/log, or
   <CCS_HOME>/.ccs/logs prefixes in any host environment.

Both fixes are independent of the OAuth callback traceability change
that this branch otherwise carries, but ship together so the PR
clears CI on the new runner stack.
2026-05-10 20:23:02 -04:00
Tam Nhu Tran 64e1d1f815 feat(auth): add shared resource controls 2026-05-08 11:15:28 -04:00
Tam Nhu Tran a7c10be72e Merge origin/dev into fix/cliproxy-local-port-config
Resolve the dispatcher and dashboard conflicts from origin/dev while preserving the configured local CLIProxy port behavior. Also harden lifecycle port fallback and wait for the actual stopped port during binary installs.
2026-05-03 13:56:43 -04:00
MolkoandClaude Opus 4.7 509bd5dbef fix(cliproxy): respect configured local port instead of hardcoding 8317
All call sites that spawn or probe CLIProxyApiPlus now read
cliproxy_server.local.port from config via resolveLifecyclePort()
instead of using the hardcoded CLIPROXY_DEFAULT_PORT constant.

- Move resolveLifecyclePort helper to src/cliproxy/config/port-manager.ts
- Fix 7 call sites: ccs.ts, config-command.ts, copilot-executor.ts,
  lifecycle.ts, binary-manager.ts, cliproxy-stats-routes.ts,
  cliproxy-local-proxy.ts
- Remove duplicate resolveLocalCliproxyPort helper
- Cache port resolution in /proxy-status handler to avoid repeated I/O

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 07:40:48 -04:00
Tam Nhu Tran e5fe86f520 feat: add native Claude effort override 2026-04-30 22:36:47 -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
Kai (Tam Nhu) TranandGitHub a8e0d95bc8 Merge pull request #1117 from kaitranntt/kai/feat/1115-session-affinity
feat: add local CLIProxy session affinity controls
2026-04-28 13:37:37 -04:00
Tam Nhu Tran c277955762 fix(cliproxy): tighten session affinity review issues 2026-04-28 12:33:12 -04:00
Tam Nhu Tran 119aa3be98 fix: keep config dashboard alive when interface detection fails 2026-04-28 11:39:40 -04:00
Tam Nhu Tran 7f14c565df test: cover --extra-models parsing and CLIProxy sync dedup 2026-04-25 11:30:44 -04:00
Tam Nhu Tran b3bc17639c fix(ui): surface the max thinking level in settings and help 2026-04-22 21:43:32 -04:00
Tam Nhu Tran 6604357b22 fix(browser): default browser tooling to manual opt-in 2026-04-20 21:15:31 -04:00
Tam Nhu Tran 039ed63a39 fix(browser): harden runtime policy edge cases 2026-04-20 21:01:19 -04:00
Tam Nhu Tran 7d02f55f9f feat(browser): add explicit runtime policy controls 2026-04-20 21:01:19 -04:00
Wooseong Kim 6928d8bb65 fix(proxy): parse flag options before profile args 2026-04-20 15:44:20 +09:00
Wooseong Kim c0c119867a fix(proxy): persist daemon state after startup 2026-04-20 15:04:24 +09:00
Wooseong Kim 2a80f7b1c1 fix(proxy): handle end-of-options parsing 2026-04-20 14:27:09 +09:00
Tam Nhu Tran f36c4a6e32 fix: keep browser setup config-only 2026-04-19 22:07:58 -04:00
Tam Nhu Tran 7ad8bbf0a1 feat: add browser setup flow for Claude attach 2026-04-19 22:00:16 -04:00
Tam Nhu Tran 4e30c9b080 feat(cli): add browser automation commands 2026-04-16 18:49:24 -04:00
Tam Nhu Tran 2e2ba1c09b test(ci): use runtime-relative isolated child scripts
- derive repo imports from each test file via file URLs

- avoid hardcoded paths in the repo

- launch child scripts with the current runtime for consistent local and runner behavior
2026-04-16 00:20:01 -04:00
Tam Nhu Tran 2ba3a0ab02 test(ci): stabilize runner-sensitive isolated tests
- isolate tokens and session-tracker tests in child processes

- make child scripts resolve repo modules from the test location

- avoid machine-specific paths in the repo
2026-04-16 00:08:46 -04:00
Tam Nhu Tran 27f1416181 fix(cliproxy): avoid network-bound local startup
- skip CLIProxy auto-update checks on runtime bootstrap paths

- fail fast when local startup needs a missing binary instead of attempting installs

- add regression coverage for dashboard limited mode and startup test isolation
2026-04-15 22:55:11 -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 4e738ee021 fix(cli): document gitlab shortcut flags and harden cursor routing 2026-04-15 01:39:31 -04:00
Tam Nhu Tran 2d9f8c9695 feat(cliproxy): integrate missing provider support 2026-04-15 00:26:12 -04:00
Tam Nhu Tran cb1d78bd9d test(tokens): isolate auth rotation from mocked handlers 2026-04-14 13:58:30 -04:00
Tam Nhu Tran f067f39245 fix: apply api-key updates during token regeneration 2026-04-13 22:57:27 -04:00
Tam Nhu Tran 394d7d94fc test(update): isolate current-install command deps
- load a fresh update-command module instance per test via query-string import

- prevent Bun mock.module leakage from command-router tests from masking handleUpdateCommand in CI
2026-04-13 15:09:35 -04:00
Tam Nhu Tran b148d1ba66 fix(ci): stabilize update-command tests under parallel runners 2026-04-13 11:56:30 -04:00
Tam Nhu Tran 7b337e2f7d Merge remote-tracking branch 'origin/dev' into kai/fix/pr-974-browser-mcp-ci 2026-04-13 08:41:32 -04:00
Kai (Tam Nhu) TranandGitHub 0394281480 Merge pull request #963 from sgaluza/fix/test-isolation-ccs-managed-env
test(ci): isolate CCS-managed env vars from host session
2026-04-13 08:40:30 -04:00
walker1211 2527889d1d test(ui): 修复彩色输出下的脆弱断言 2026-04-13 11:19:16 +08:00
Sergey Galuza 22acd96ba4 feat(cliproxy): add thinking config to catalog --json and test false values
- Include thinking support configuration (type, min, max, levels) in
  JSON output for reasoning-capable models
- Add test verifying explicit false booleans are preserved (not omitted)
- Add test verifying thinking config appears for thinking models

Built [OnSteroids](https://onsteroids.ai)
2026-04-11 20:12:46 +02:00
Sergey Galuza fbfb130f4d feat(cliproxy): include model metadata in catalog --json output
- Expose tier, description, deprecated, broken, extendedContext,
  nativeImageInput fields (omitted when undefined)
- Simplify tests to use static imports instead of dynamic cache-busting
- Add integration tests verifying --json routing through handleCliproxyCommand
- Test --json priority over refresh/reset subcommands

Built [OnSteroids](https://onsteroids.ai)
2026-04-11 20:12:46 +02:00
Sergey Galuza 509d2e4dd8 test(cliproxy): add catalog --json tests and clarify flag priority
- Add unit tests verifying JSON output structure, field filtering,
  and minified format
- Document that --json takes priority over subcommands (refresh/reset)

Built [OnSteroids](https://onsteroids.ai)
2026-04-11 20:12:46 +02:00
Sergey Galuza 79251d7af8 test(ci): add env isolation comment to persist-command-handler
Align with claudecode-env-stripping.test.ts style — explain why
CLAUDE_CONFIG_DIR is cleared in beforeEach for consistency across
test files.

Built [OnSteroids](https://onsteroids.ai)
2026-04-11 17:29:15 +02:00
Sergey Galuza 2cc92e8bb8 test(ci): isolate CCS-managed env vars from host session
When tests run inside a CCS-managed Claude session, host env vars
(CLAUDE_CONFIG_DIR, CCS_PROFILE_TYPE) leak into subprocess spawns
and fixture setup, causing 9 test failures:

- persist-command-handler: reads real symlinked settings.json instead
  of temp fixture because CLAUDE_CONFIG_DIR overrides scoped CCS_HOME
- websearch-transformer: hook silently exits via shouldSkipHook()
  because CCS_PROFILE_TYPE=account triggers native_account_profile skip
- claudecode-env-stripping: normalizeSharedPluginMetadataPaths receives
  leaked CLAUDE_CONFIG_DIR instead of undefined for default profiles

Fix: clear CCS-managed env vars in beforeEach and neutralize
CCS_PROFILE_TYPE in subprocess env blocks.

Built [OnSteroids](https://onsteroids.ai)
2026-04-11 07:16:50 +02:00
Tam Nhu Tran 94bcad2d1a fix(update): align no-update dependency injection 2026-04-10 23:06:37 -04:00
Tam Nhu Tran a4496ff1d9 fix(update): harden install verification flow 2026-04-10 22:44:46 -04:00
Tam Nhu Tran 59e04cb56f fix(update): isolate updater test dependencies 2026-04-10 22:27:07 -04:00
Tam Nhu Tran 2aaabb2deb fix(update): target the current CCS installation 2026-04-10 21:39:50 -04:00
Tam Nhu Tran 52ac29e7a8 fix(api): constrain preset target defaults
- limit preset default targets to persisted API profile targets

- add regression coverage for preset target resolution and profile target persistence
2026-04-10 17:44:25 -04:00