Commit Graph
368 Commits
Author SHA1 Message Date
Tam Nhu Tran 0309630193 fix(auth): harden shared-context isolation and config safety 2026-02-25 04:19:28 +07:00
Tam Nhu Tran 0b070a3f34 fix(auth): close shared-context isolation edge cases 2026-02-25 04:09:46 +07:00
Tam Nhu Tran 7d5e604e53 fix(auth): harden shared-context isolation edge cases 2026-02-25 04:09:46 +07:00
Tam Nhu Tran 4fed74c64b feat(auth): add opt-in shared context groups across accounts 2026-02-24 23:54:03 +07:00
Tam Nhu Tran 36d5cb723e fix(proxy): harden AGY risk persistence and confirm UX
- add lock-held mutateUnifiedConfig read-modify-write path for config.yaml

- use atomic mutation in /api/settings/auth/antigravity-risk to prevent stale overwrites

- replace browser confirm with in-app 2-step banner + typed phrase validation

- verify saved AGY power-user value with post-save read before showing success

Refs #509
2026-02-24 18:45:41 +07:00
Tam Nhu Tran b602ab99ab fix(auth): harden agy safety endpoints and config writes
- add safer error responses for settings/auth routes to avoid leaking internals

- guard sensitive AGY settings endpoints to localhost when dashboard auth is off

- validate start-route bodies and reject OAuth start in remote mode for consistency

- preserve cliproxy.kiro_no_incognito and token_refresh during config merges

- enforce AGY acknowledgement in remote auth-token run/auth command paths
2026-02-24 18:09:36 +07:00
Tam Nhu Tran d3c271ab2c feat(agy): add power-user bypass for responsibility acknowledgement 2026-02-24 17:42:57 +07:00
Tam Nhu Tran 3b1271b5e4 fix(agy): enforce multi-step responsibility acknowledgement for antigravity oauth 2026-02-24 17:23:02 +07:00
Tam Nhu Tran 4eb2be79fc fix(cliproxy): prevent blank page in remote mode 2026-02-24 00:47:40 +07:00
Tam Nhu Tran c98e58383c Merge remote-tracking branch 'origin/dev' into pr-612-review
# Conflicts:
#	src/utils/claude-config-path.ts
#	src/web-server/shared-routes.ts
2026-02-23 23:30:03 +07:00
Tam Nhu Tran 498b66d9cc fix(web-server): harden shared route symlink scanning 2026-02-23 23:22:29 +07:00
Tam Nhu Tran be96b84e61 fix(codex): canonicalize dashboard presets and migrate suffixed settings 2026-02-23 22:52:44 +07:00
innovatiasandClaude Opus 4.6 e3dbc67634 fix(web-server): detect symlinked shared entries
Handle shared skills and agents when entries are symlinked directories.
Also avoid classifying root markdown files in skills/agents as commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:08:53 +07:00
Tam Nhu Tran ca58cb5a08 fix(cliproxy): harden quota guards and review follow-ups 2026-02-22 02:35:07 +07:00
Tam Nhu Tran d47620592d Merge remote-tracking branch 'origin/dev' into fix/548-claude-quota-balance
# Conflicts:
#	src/commands/cliproxy/help-subcommand.ts
#	src/commands/cliproxy/index.ts
#	src/commands/cliproxy/quota-subcommand.ts
2026-02-22 01:24:44 +07:00
Tam Nhu Tran 2385d9028a feat(cliproxy): add Claude quota windows and account failover 2026-02-22 01:19:02 +07:00
Tam Nhu Tran 343ec959fc fix(core): resolve edge cases and hardcoded drift 2026-02-21 10:32:19 +07:00
Tam Nhu Tran 8d2ec86155 refactor(core): centralize claude paths and command parsing 2026-02-21 01:31:16 +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) TranandGitHub e63292c793 Merge pull request #587 from kaitranntt/kai/feat/583-thinking-ux-dx
feat(thinking): complete thinking UX/DX for all providers
2026-02-19 16:32:05 +07:00
Tam Nhu Tran 954baecfe4 fix(thinking): handle clear no-op and tighten override coverage 2026-02-19 16:26:56 +07:00
Tam Nhu Tran 92e2ec111d fix(thinking): harden codex reasoning controls across cli and dashboard 2026-02-19 14:13:41 +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 dd38df6b8d fix(cliproxy): add kimi-k2 pricing and kimi catalog tests
Address review feedback from PR #585:
- Add missing kimi-k2 pricing entry ($0.60/$2.50, cache $0.15)
  to avoid fallback to unknown model pricing
- Add kimi provider tests to model-catalog.test.js verifying
  catalog structure, default model, and model IDs
2026-02-19 10:36:42 +07:00
Tam Nhu Tran 3767b95735 fix(cliproxy): add Kimi model catalog, sync, and pricing to dashboard
- Add kimi entry to UI model-catalogs.ts with K2.5, K2 Thinking, K2
  models and preset mappings so dashboard shows available models
- Add kimi to CHANNEL_TO_PROVIDER and SYNCABLE_PROVIDERS in
  catalog-cache.ts so models sync from upstream CLIProxyAPI
- Add kimi/moonshot to provider-editor ownerMap for model filtering
- Update Kimi model pricing to match official Kimi Platform rates:
  kimi-k2.5 ($0.60/$3.00), kimi-k2-thinking ($0.60/$2.50),
  kimi-k2-turbo-preview ($1.15/$8.00)
- Add missing kimi-k2.5 pricing entry

Closes #581
2026-02-19 10:28:40 +07:00
Tam Nhu Tran 90b8d04d71 refactor(cliproxy): use shared default port in management paths
- replace 8317 literals with CLIPROXY_DEFAULT_PORT constant

- keep http/https fallback behavior unchanged in runtime checks
2026-02-18 03:10:09 +07:00
Tam Nhu Tran 94b03c7f75 refactor(cliproxy): DRY provider lists into single source of truth
- unify CLIPROXY_SUPPORTED_PROVIDERS to import from CLIPROXY_PROVIDER_IDS
- replace 4 inline union types with CLIProxyProvider import
- replace hardcoded provider arrays in migration-manager and proxy-routes
- remove duplicate PROVIDER_DISPLAY_NAMES, use getProviderDisplayName()
- sync test now imports from ui/src/lib/provider-config instead of hardcoded array

Adding a new CLIProxy provider no longer requires updating 14+ hardcoded lists.
2026-02-17 17:02:45 +07:00
Tam Nhu Tran 0431adf306 fix(targets): close all remaining multi-target droid edge cases 2026-02-17 03:22:45 +07:00
Tam Nhu Tran 7d7054e2c0 feat(targets): add multi-target CLI adapter system (Droid support)
Implement target adapter pattern enabling CCS CLI to support multiple backend targets
(Claude, Droid) via pluggable adapters. Core additions:

- TargetAdapter interface for pluggable target implementations
- ClaudeAdapter and DroidAdapter concrete implementations
- Target registry (singleton Map-based storage)
- Target resolver with precedence: --target flag > per-profile config > busybox detection
- Droid config manager with atomic writes and file locking to ~/.factory/settings.json
- Droid binary detector to validate runtime environment
- Adapter dispatch integrated into ccs.ts main execution flow
- ccsd busybox alias for seamless Droid invocation
- --target flag documentation in help
- Session tracking enriched with target metadata
- Dashboard target badge for visual identification

Testing:
- 43 unit tests covering resolver, registry, config manager, and adapters
- Full coverage of target detection logic and edge cases

Documentation:
- Refactored system-architecture.md into modular docs/system-architecture/ subdirectory
- Updated code-standards.md with target adapter guidelines
- Updated codebase-summary.md with architecture overview
- Updated maintainability baseline (33.8% → 35.2%)

This establishes extensible foundation for multi-target support without breaking
existing Claude workflows. Droid adapter is production-ready but defaults to Claude
for backward compatibility.
2026-02-16 10:49:09 +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 4f086aa34a fix(cursor-settings): remove sync fs calls in settings sync
- switch cursor settings file reads/writes to fs.promises

- make settings sync and route handler async with awaited file ops

- restores maintainability baseline for synchronous fs references
2026-02-14 17:48:00 +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 577991c282 fix(web-server): make kiro auth routes method-aware
- validate kiroMethod on /start and /start-url with clear errors

- route Kiro management start-url requests with upstream method query

- accept state-first responses and keep auth_url optional

- add start-url guard tests for Kiro social and aws-authcode paths

Refs #552

Refs #233
2026-02-14 13:33:48 +07:00
Tam Nhu Tran 826a42d8d6 fix(cliproxy): harden kiro device-code auth flow consistency 2026-02-14 10:55:14 +07:00
Kai (Tam Nhu) TranandGitHub 174a4c2777 Merge pull request #558 from kaitranntt/kai/fix/555-cursor-e2e
feat(cursor): complete end-to-end integration and dedicated dashboard UX
2026-02-14 09:03:09 +07:00
Tam Nhu Tran 9a76f866b0 fix(cursor): guard raw-settings save race and enforce daemon preconditions 2026-02-14 07:11:02 +07:00
Tam Nhu Tran b3d9dce6e1 fix(codex): reduce quota timeout flakes in dashboard 2026-02-14 06:23:31 +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 7bb9ceb4af fix(cliproxy): keep variant updates atomic and persisted
- require model when changing single-variant provider to avoid mixed config

- rewrite provider-specific core env when provider changes while preserving custom fields

- preserve custom composite settings path and return persisted composite PUT state
2026-02-13 06:19:12 +07:00
Tam Nhu Tran 1a23f912a4 fix(cliproxy): harden composite validation and runtime safeguards 2026-02-13 05:34:30 +07:00
Tam Nhu Tran 2816c6652d chore(merge): resolve conflicts with origin/dev 2026-02-12 16:25:25 +07:00
Kai (Tam Nhu) TranandGitHub a2520d2ed8 Merge pull request #543 from kaitranntt/kai/feat/538-stream-d-hardening
chore(hardening): add debt inventory and async I/O kickoff (stream D)
2026-02-12 16:21:18 +07:00
Tam Nhu Tran e914fe9778 fix(cliproxy): fix thinking off regression and composite error handling
- P1: Thinking "off" now fully disables all tier thinking
  When thinkingValue === 'off' AND no per-tier config, return early
  Preserves behavior for "off" with per-tier config (skips main, processes tiers)
  Fixes regression where tier defaults were applied despite explicit off setting

- P2: Handle composite-create thrown errors in POST route
  Wrap createCompositeVariant() in try/catch
  Returns 400 instead of generic 500 when function throws (e.g., legacy mode)
2026-02-12 13:34:17 +07:00
Tam Nhu Tran 924e3686c8 refactor(cliproxy): centralize provider capability registry 2026-02-12 12:59:17 +07:00
Tam Nhu Tran cefb564948 chore(hardening): add debt inventory and async io kickoff 2026-02-12 12:57:46 +07:00
Tam Nhu Tran a99180fa22 fix(cliproxy): restore POST tier validation and guard null payloads
- Add requireAllTiers parameter to validateCompositeTiers (default false)
- POST/create passes true to enforce all 3 tiers required
- PUT/update passes false (default) to allow partial updates
- Guard against null tier values that would throw at runtime
2026-02-12 11:45:20 +07:00
Tam Nhu Tran 61f46e738d fix(cliproxy): address 3 functional regressions in composite variants
P1 (Critical): Remote composite execution now correctly uses remote endpoint
- Reorder condition to check useRemoteProxy before isComposite
- Composite variants now work with remote CLIProxy instances

P2a (Medium): Tier deep-merge preserves optional fields during updates
- Use spread merge instead of ?? to preserve fallback/thinking/account

P2b (Medium): API accepts partial tier updates in PUT endpoint
- Skip validation for tiers not present in request
- Aligns with updateCompositeVariant's merge behavior
2026-02-12 11:22:43 +07:00
Tam Nhu Tran ef77607c41 fix(cliproxy): add circular fallback and empty model validation in API
- Validate fallback doesn't point to same provider+model (circular)
- Reject empty/whitespace model strings in composite tiers
- Add TODO comment for concurrent modification race condition
2026-02-12 11:02:11 +07:00
Tam Nhu Tran 4c002caee1 fix(cliproxy): address code review feedback (attempt 4/5)
- Add default_tier and provider validation in POST/PUT routes
- Extract shared validateCompositeTiers() helper for DRY
- Validate providers against CLIPROXY_SUPPORTED_PROVIDERS
2026-02-12 08:46:38 +07:00
Tam Nhu Tran 6cfbdd649b fix(cliproxy): address code review feedback (attempt 3/5)
- Allow partial composite updates in PUT endpoint (|| -> &&)
- Map service validation errors to 400 status, not 404
- Widen 4xx regex to cover full 400-499 range
2026-02-12 08:39:46 +07:00