Commit Graph
669 Commits
Author SHA1 Message Date
kaitranntt 5d4f49e4bb feat(ui): add absolute path copy for error logs
- add absolutePath field to CliproxyErrorLog interface
- inject absolute path in routes.ts from getCliproxyWritablePath()
- update copy button to use absolute path with fallback to filename
- refactor error-logs-monitor to remove demo mode
- add error-log-parser lib for structured log parsing
2025-12-18 21:06:20 -05:00
github-actions[bot] 78a14e873d chore(release): 6.5.0-dev.2 [skip ci] 2025-12-18 23:32:18 +00:00
Kai (Tam Nhu) TranandGitHub 03e9bdc917 Merge pull request #133 from kaitranntt/kai/feat/error-log-viewer
feat(dashboard): add error log viewer for CLIProxy diagnostics
2025-12-18 18:31:16 -05:00
kaitranntt 8f47b8775f feat(ui): redesign error logs monitor with split view layout
- Replace dropdown accordion with master-detail split view
- Add log list panel (240px) on left with selection state
- Add content viewer panel on right for better readability
- Add demo mode prop for UI testing
- Auto-select first log via useMemo/derived state
2025-12-18 18:23:38 -05:00
github-actions[bot] 7eba223d8d chore(release): 6.5.0-dev.1 [skip ci] 2025-12-18 23:17:54 +00:00
kaitranntt 4b969b6870 fix(ci): remove deprecated installer references from dev-release workflow
The native shell installers (install.sh, install.ps1) were removed in the
recent refactor, but the dev-release workflow still tried to update and
commit them, causing CI failures.
2025-12-18 18:16:39 -05:00
kaitranntt 126cffc6dc refactor: remove deprecated native shell installers
- Remove installers/ directory (install.sh, install.ps1, uninstall.sh, uninstall.ps1)
- Update CloudFlare worker to 301 redirect /install* to npm docs
- Remove detectInstallationMethod() - npm is now only install method
- Simplify update-command.ts to npm-only updates
- Clean up tests to remove direct install references

BREAKING CHANGE: Native shell installers (curl/irm) no longer work.
Use `npm install -g @kaitranntt/ccs` instead.
2025-12-18 16:52:57 -05:00
semantic-release-bot be2b87ba98 chore(release): 6.5.0 [skip ci]
# [6.5.0](https://github.com/kaitranntt/ccs/compare/v6.4.0...v6.5.0) (2025-12-18)

### Bug Fixes

* **cli:** allow ccs copilot as profile by routing only known subcommands ([2c6dfe7](https://github.com/kaitranntt/ccs/commit/2c6dfe746b19dcbc43492dc8a03870b18a0b03f6))
* **cli:** route 'ccs copilot' without subcommand to help ([671a9e7](https://github.com/kaitranntt/ccs/commit/671a9e76fb1dc4b58099e82d94f63fd346b52146))
* **copilot:** use gpt-4.1 as default model and 127.0.0.1 for local connections ([ec6face](https://github.com/kaitranntt/ccs/commit/ec6face8db78e9c5cad4f91dcfd39e08665e1415))
* **copilot:** use token file check for instant auth status ([4783632](https://github.com/kaitranntt/ccs/commit/47836329580711bc551ebc52e20136a38bf15320))
* **copilot:** widen sidebar and balance split-view layout ([63bdc3a](https://github.com/kaitranntt/ccs/commit/63bdc3ae3990472d91c190bd29ee95c5181e4d12))
* **ui:** add install button to copilot page sidebar ([3865747](https://github.com/kaitranntt/ccs/commit/386574715470b8ff10e8d0ffae9231e001810e99))
* **ui:** constrain copilot config left panel width to 540px ([da5dc31](https://github.com/kaitranntt/ccs/commit/da5dc31ec4e94d98c17aa750f23e079145ac040c))
* **ui:** handle 404 errors in profile settings fetch ([60c01c7](https://github.com/kaitranntt/ccs/commit/60c01c7e60f850a28cb995e92aad21dbb09a1acf))
* **ui:** improve copilot sidebar logical order and remove redundancy ([f9b89de](https://github.com/kaitranntt/ccs/commit/f9b89dee12acdec5bf2b53e04eb60708bfee8340))

### Features

* **api:** add copilot install and info endpoints ([fee241d](https://github.com/kaitranntt/ccs/commit/fee241d00be4a573e04011dd84712f90ed2d4a1f))
* **api:** add copilot REST API endpoints ([c84db38](https://github.com/kaitranntt/ccs/commit/c84db38f6a16598955334fc02e0ccbe50187655f))
* **auth:** add copilot profile detection ([e5a1f60](https://github.com/kaitranntt/ccs/commit/e5a1f60bb6f97dba5ccd021087941ddf733292d5))
* **cli:** add copilot CLI commands ([d25db1f](https://github.com/kaitranntt/ccs/commit/d25db1fce10ea9c37b949a8c3c39115f357812d8))
* **config:** add copilot configuration types and loader ([b87aeae](https://github.com/kaitranntt/ccs/commit/b87aeaeb01800b11640b14fafa36412d82d0f522))
* **copilot:** add complete model catalog with plan tiers ([7653cab](https://github.com/kaitranntt/ccs/commit/7653caba710f847ff4c25fcc5b68f1b0381dd2d2))
* **copilot:** add copilot manager module ([3b8a85c](https://github.com/kaitranntt/ccs/commit/3b8a85c9ef1d4a227b8ea77f9c892ba547e92eed))
* **copilot:** add model tier mapping support ([d21908a](https://github.com/kaitranntt/ccs/commit/d21908ab63aca6e96f14f6e0c78eb882de1177b9))
* **copilot:** add raw settings API and model mapping routes ([a3e2153](https://github.com/kaitranntt/ccs/commit/a3e2153498ac8a1a9b84319f6b0835fa8f085b3d))
* **copilot:** add raw settings support to useCopilot hook ([882792a](https://github.com/kaitranntt/ccs/commit/882792a4fbdd48b81840b4bb3f093831fe60de76))
* **copilot:** add self-managed package manager for copilot-api ([ecdad1d](https://github.com/kaitranntt/ccs/commit/ecdad1d6d0c21f47547573f666d68bb6d1164437))
* **copilot:** redesign config form to match CLIProxy pattern ([7886259](https://github.com/kaitranntt/ccs/commit/7886259c363914224b6717ff4d4a74104141d696))
* **ui:** add copilot dashboard page ([6b04532](https://github.com/kaitranntt/ccs/commit/6b04532f419622f9bfcd99d9e499445310f850d8))
* **ui:** add copilot-api install button and version display ([f813ad0](https://github.com/kaitranntt/ccs/commit/f813ad06f61ad6146698d82c4aed4b3a8e90dc5d))
* **ui:** display plan tiers and presets in copilot model selector ([87c2acc](https://github.com/kaitranntt/ccs/commit/87c2acc416c35b15377e4bce2ee45bc6d20d761a))
* **ui:** expose auth result with device code in hook ([5f0fde9](https://github.com/kaitranntt/ccs/commit/5f0fde9a612e7ec1ea13dd5fc807d033bf215fb8))
* **update:** add automatic update check on startup ([8a0ad53](https://github.com/kaitranntt/ccs/commit/8a0ad5308262ba14fb0fe23ff8a87f3c5ecaa139))
2025-12-18 11:22:37 +00:00
Kai (Tam Nhu) TranandGitHub 5d51b8b113 Merge pull request #139 from kaitranntt/dev
feat(release): GitHub Copilot integration and auto-update check
2025-12-18 06:19:57 -05:00
github-actions[bot] 7c7e1ab5e0 chore(release): 6.4.0-dev.3 [skip ci] 2025-12-18 11:14:00 +00:00
kaitranntt 8a0ad53082 feat(update): add automatic update check on startup
- check cached update result synchronously on every command
- show warnBox notification if update available
- skip check for version/help/update commands
- refresh cache in background if stale (>24h)
- use proper UI components (warnBox) for notification
2025-12-18 06:12:40 -05:00
github-actions[bot] a0751ed604 chore(release): 6.4.0-dev.2 [skip ci] 2025-12-18 10:42:41 +00:00
Kai (Tam Nhu) TranandGitHub efdf53c83c Merge pull request #138 from kaitranntt/kai/feat/copilot-integration
feat(copilot): add GitHub Copilot integration with CLI, API, and dashboard
2025-12-18 05:41:38 -05:00
kaitranntt da5dc31ec4 fix(ui): constrain copilot config left panel width to 540px 2025-12-18 05:31:37 -05:00
github-actions[bot] 7a668dd8eb chore(release): 6.4.0-dev.1 [skip ci] 2025-12-18 10:29:18 +00:00
kaitranntt f9b89dee12 fix(ui): improve copilot sidebar logical order and remove redundancy
Changes:
- Reordered sidebar to follow logical flow:
  1. Setup: copilot-api binary → Integration enabled
  2. Auth: GitHub connection (only after binary installed)
  3. Daemon: status/port (only after authenticated)
- Removed redundant Config section (Model/Account already in right panel)
- Progressive disclosure: sections appear as prerequisites are met
2025-12-18 05:26:58 -05:00
kaitranntt 60c01c7e60 fix(ui): handle 404 errors in profile settings fetch
- throw on non-OK responses in ProfileEditor queryFn
- add isError state with user-friendly message and retry button
- add defensive null check for data.path before .replace() call
- apply same defensive check to provider-editor.tsx

Fixes blank screen when API profile settings file doesn't exist.
2025-12-18 05:25:52 -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 2c6dfe746b fix(cli): allow ccs copilot as profile by routing only known subcommands
Changed copilot command routing logic to only intercept known subcommands
(auth, status, models, start, stop, enable, disable, help). When user runs
bare 'ccs copilot' without subcommands, it now falls through to profile
detection and executes Claude with the Copilot API backend.

This allows:
- `ccs copilot auth` → command handler (authenticate)
- `ccs copilot status` → command handler (show status)
- `ccs copilot` → profile execution (run Claude with Copilot)
2025-12-18 04:47:44 -05:00
kaitranntt 3a7cb0c4e8 docs(cli): improve copilot help with quick start guide 2025-12-18 04:43:35 -05:00
kaitranntt 671a9e76fb fix(cli): route 'ccs copilot' without subcommand to help 2025-12-18 04:34:33 -05:00
semantic-release-bot d746ec77ca chore(release): 6.4.0 [skip ci]
# [6.4.0](https://github.com/kaitranntt/ccs/compare/v6.3.1...v6.4.0) (2025-12-18)

### Bug Fixes

* **websearch:** detect Gemini CLI auth status before showing Ready ([98c21ef](https://github.com/kaitranntt/ccs/commit/98c21efb5a3b7a39b27fda958691837545235f2d))

### Features

* **cliproxy:** implement interactive project selection for OAuth flows ([a66abba](https://github.com/kaitranntt/ccs/commit/a66abba174eb77555b4443f3e930be30264da7e4))
2025-12-18 09:25:16 +00:00
Kai (Tam Nhu) TranandGitHub f7cf30fac4 Merge pull request #136 from kaitranntt/dev
feat(cliproxy): implement interactive project selection for OAuth flows
2025-12-18 04:24:15 -05:00
github-actions[bot] 898198ad6e chore(release): 6.3.1-dev.3 [skip ci] 2025-12-18 09:23:56 +00:00
kaitranntt a9788d02ea docs(copilot): add prominent disclaimer for unofficial API
Make the "use at your own risk" warning more transparent:
- UI: Expanded warning banner with clear "Unofficial API" heading
- UI: Added explicit no warranty/no responsibility text
- Config YAML: Updated comments with !! DISCLAIMER !! section
- Types: Updated CopilotConfig JSDoc with full disclaimer

CCS provides no warranty and accepts no responsibility for
consequences of using this reverse-engineered GitHub Copilot API.
2025-12-18 04:20:58 -05:00
kaitranntt 87c2acc416 feat(ui): display plan tiers and presets in copilot model selector
- Add CopilotPlanTier type and extend CopilotModel with minPlan,
  multiplier, preview fields
- Show plan tier badges (free/pro/pro+/business/enterprise) with
  color-coded styling in model dropdown
- Display multiplier info (0x=free, 1x=standard, 3x-10x=premium)
- Add Preview badge for non-GA models
- Create 3 free tier presets: GPT-4.1, GPT-5 Mini, Claude Haiku 4.5
- Create 5 paid presets: Claude Opus/Sonnet 4.5, GPT-5.2,
  GPT-5.1 Codex Max, Gemini 2.5 Pro
- Separate presets into Free Tier and Pro+ Required sections
2025-12-18 04:15:08 -05:00
kaitranntt a66abba174 feat(cliproxy): implement interactive project selection for OAuth flows
- Add ProjectSelectionHandler to parse and handle CLIProxy project prompts
- Integrate project selection into AuthHandler with UI-first support
- Add project selection API endpoints and WebSocket events
- Implement ProjectSelectionDialog and useProjectSelection hook in UI
- Fixes macOS OAuth timeout by handling interactive project selection via UI
2025-12-18 04:11:59 -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
github-actions[bot] a87ef973fc chore(release): 6.3.1-dev.1 [skip ci] 2025-12-18 08:26:14 +00:00
kaitranntt 98c21efb5a fix(websearch): detect Gemini CLI auth status before showing Ready
Previously, WebSearch status showed "Ready (Gemini)" when the CLI binary
was installed, misleading users who hadn't authenticated yet.

Changes:
- Add isGeminiAuthenticated() to check ~/.gemini/oauth_creds.json
- Add 'needs_auth' state to WebSearchReadiness type
- Show warning "[!] Gemini: run 'gemini' to login" when not authenticated
- Fix incorrect 'gemini auth login' references (no such command exists)
- Update docs with correct npm install and authentication instructions
2025-12-18 03:24:59 -05:00
kaitranntt 5f0fde9a61 feat(ui): expose auth result with device code in hook
- add CopilotAuthResult interface with deviceCode field

- expose startAuthAsync and authResult from useCopilot hook

- immediately refetch status on auth success
2025-12-18 03:01:12 -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
semantic-release-bot f3a6f4ef4e chore(release): 6.3.1 [skip ci]
## [6.3.1](https://github.com/kaitranntt/ccs/compare/v6.3.0...v6.3.1) (2025-12-18)

### Bug Fixes

* **ui:** limit Connection Timeline to 100 events to prevent lag ([170dcdc](https://github.com/kaitranntt/ccs/commit/170dcdc44f825bb64bedd7eb53fff6127ca94bce))
2025-12-18 07:56:16 +00:00
Kai (Tam Nhu) TranandGitHub 576d282356 Merge pull request #134 from kaitranntt/dev
fix(ui): limit Connection Timeline events to prevent lag
2025-12-18 02:55:18 -05:00
kaitranntt 6b9396fbc6 feat(cliproxy): set WRITABLE_PATH for log storage in ~/.ccs/cliproxy/
- Add getCliproxyWritablePath() helper function
- Set WRITABLE_PATH env var when spawning CLIProxy in both executors
- Logs will now be stored in ~/.ccs/cliproxy/logs/ instead of CWD
- Enables error log viewer to find logs in predictable location

Note: CLIProxyAPI still has hardcoded MaxBackups=0 (unlimited).
Log rotation should be addressed in CLIProxyAPI upstream.
2025-12-18 02:54:46 -05:00
kaitranntt 1ef625ee86 fix(error-logs-monitor): properly handle status loading state
- Add isStatusLoading check to prevent false-negative rendering
- Use nullish coalescing for enabled param to ensure boolean value
- Component now waits for status before deciding visibility

Fixes initial render returning null due to undefined status
2025-12-18 02:45:58 -05:00
kaitranntt 3865747154 fix(ui): add install button to copilot page sidebar
- show Install copilot-api button when not installed

- display version in status when installed
2025-12-18 02:38:58 -05:00
kaitranntt ddf7b704a5 Merge remote-tracking branch 'origin/dev' into kai/feat/error-log-viewer 2025-12-18 02:33:06 -05:00
github-actions[bot] b98c428a89 chore(release): 6.3.0-dev.1 [skip ci] 2025-12-18 07:32:22 +00:00
kaitranntt 170dcdc44f fix(ui): limit Connection Timeline to 100 events to prevent lag
- add MAX_TIMELINE_EVENTS constant (100)

- slice events in useMemo to cap DOM elements

- prevents UI freeze with high request counts
2025-12-18 02:30:47 -05:00
kaitranntt f813ad06f6 feat(ui): add copilot-api install button and version display
- add CopilotInfo type and install mutation to useCopilot hook

- show version in status card when installed

- add Install button with loading state when not installed
2025-12-18 02:27:35 -05:00
kaitranntt fee241d00b feat(api): add copilot install and info endpoints
- POST /api/copilot/install: install copilot-api (optional version)

- GET /api/copilot/info: get install status, version, path

- GET /api/copilot/status: include version in response
2025-12-18 02:27:11 -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 5b3d56548a feat(dashboard): add error log viewer for CLIProxy diagnostics
Add ErrorLogsMonitor component to Home page that displays CLIProxyAPI
error logs when requests fail. Users can now diagnose why success rates
drop by viewing detailed error log contents.

Backend:
- Add fetchCliproxyErrorLogs/fetchCliproxyErrorLogContent in stats-fetcher
- Add GET /api/cliproxy/error-logs and /api/cliproxy/error-logs/:name routes
- Include path traversal protection for filename validation

Frontend:
- Add CliproxyErrorLog type and errorLogs API methods
- Add useCliproxyErrorLogs/useCliproxyErrorLogContent hooks
- Create ErrorLogsMonitor component with expandable log viewer
- Integrate into Home page below AuthMonitor

Closes #132
2025-12-18 02:15:35 -05:00
semantic-release-bot 15927b8e58 chore(release): 6.3.0 [skip ci]
# [6.3.0](https://github.com/kaitranntt/ccs/compare/v6.2.1...v6.3.0) (2025-12-18)

### Bug Fixes

* **dashboard:** detect legacy proxy instances without session lock ([85cfbde](https://github.com/kaitranntt/ccs/commit/85cfbde5fd95850a28e962be01fc8655a69e8b1c))

### Features

* **cliproxy:** default session persistence for CLIProxy ([a7450bd](https://github.com/kaitranntt/ccs/commit/a7450bdffeb9679a02608cb76686e006afa6455f)), closes [#129](https://github.com/kaitranntt/ccs/issues/129)
* **dashboard:** add CLIProxy status widget with start button ([589cd2c](https://github.com/kaitranntt/ccs/commit/589cd2c2b7607b1092f6ee1ce4bf044269ba05e5))
2025-12-18 06:49:10 +00:00
Kai (Tam Nhu) TranandGitHub 1f0e270fca Merge pull request #131 from kaitranntt/dev
feat(release): CLIProxy session persistence and dashboard status widget
2025-12-18 01:48:13 -05:00
github-actions[bot] 1a140e4a32 chore(release): 6.2.1-dev.2 [skip ci] 2025-12-18 06:46:12 +00:00
kaitranntt b4a63b6b71 docs(claude): restructure CLAUDE.md for clearer quality gate workflow
- Add Common Mistakes section to prevent format step being skipped
- Make pre-commit sequence explicit: format → lint:fix → validate
- Explain WHY this order matters (validate only checks, doesn't fix)
- Condense branching section from 110+ to 35 lines
- Merge 3 checklists into 1 unified Pre-Commit Checklist
- Remove duplicate ESLint/TS tables (now single merged table)
- Reduce total lines from 407 to 273 (-33%)
2025-12-18 01:43:58 -05:00
github-actions[bot] 26f45604ff chore(release): 6.2.1-dev.1 [skip ci] 2025-12-18 06:42:01 +00:00