@kaitranntt/ccs 7.50.0 → 7.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -4
- package/config/base-iflow.settings.json +4 -4
- package/dist/api/services/index.d.ts +2 -2
- package/dist/api/services/index.d.ts.map +1 -1
- package/dist/api/services/index.js +2 -1
- package/dist/api/services/index.js.map +1 -1
- package/dist/api/services/profile-reader.d.ts.map +1 -1
- package/dist/api/services/profile-reader.js +13 -0
- package/dist/api/services/profile-reader.js.map +1 -1
- package/dist/api/services/profile-types.d.ts +9 -0
- package/dist/api/services/profile-types.d.ts.map +1 -1
- package/dist/api/services/profile-writer.d.ts +8 -2
- package/dist/api/services/profile-writer.d.ts.map +1 -1
- package/dist/api/services/profile-writer.js +83 -8
- package/dist/api/services/profile-writer.js.map +1 -1
- package/dist/auth/account-context.d.ts +11 -0
- package/dist/auth/account-context.d.ts.map +1 -1
- package/dist/auth/account-context.js +42 -8
- package/dist/auth/account-context.js.map +1 -1
- package/dist/auth/auth-commands.d.ts.map +1 -1
- package/dist/auth/auth-commands.js +9 -0
- package/dist/auth/auth-commands.js.map +1 -1
- package/dist/auth/commands/create-command-env.d.ts +3 -0
- package/dist/auth/commands/create-command-env.d.ts.map +1 -0
- package/dist/auth/commands/create-command-env.js +55 -0
- package/dist/auth/commands/create-command-env.js.map +1 -0
- package/dist/auth/commands/create-command.d.ts.map +1 -1
- package/dist/auth/commands/create-command.js +136 -30
- package/dist/auth/commands/create-command.js.map +1 -1
- package/dist/auth/commands/list-command.d.ts.map +1 -1
- package/dist/auth/commands/list-command.js +5 -1
- package/dist/auth/commands/list-command.js.map +1 -1
- package/dist/auth/commands/show-command.d.ts.map +1 -1
- package/dist/auth/commands/show-command.js +1 -0
- package/dist/auth/commands/show-command.js.map +1 -1
- package/dist/auth/commands/types.d.ts +3 -0
- package/dist/auth/commands/types.d.ts.map +1 -1
- package/dist/auth/commands/types.js +24 -0
- package/dist/auth/commands/types.js.map +1 -1
- package/dist/auth/profile-detector.d.ts.map +1 -1
- package/dist/auth/profile-detector.js +8 -0
- package/dist/auth/profile-detector.js.map +1 -1
- package/dist/auth/profile-registry.d.ts +2 -0
- package/dist/auth/profile-registry.d.ts.map +1 -1
- package/dist/auth/profile-registry.js +45 -7
- package/dist/auth/profile-registry.js.map +1 -1
- package/dist/ccs.js +154 -4
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/account-safety.d.ts.map +1 -1
- package/dist/cliproxy/account-safety.js +4 -0
- package/dist/cliproxy/account-safety.js.map +1 -1
- package/dist/cliproxy/antigravity-responsibility.d.ts +36 -0
- package/dist/cliproxy/antigravity-responsibility.d.ts.map +1 -0
- package/dist/cliproxy/antigravity-responsibility.js +171 -0
- package/dist/cliproxy/antigravity-responsibility.js.map +1 -0
- package/dist/cliproxy/auth/auth-types.d.ts +2 -0
- package/dist/cliproxy/auth/auth-types.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.js +18 -0
- package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
- package/dist/cliproxy/config/env-builder.d.ts.map +1 -1
- package/dist/cliproxy/config/env-builder.js +57 -0
- package/dist/cliproxy/config/env-builder.js.map +1 -1
- package/dist/cliproxy/config/generator.d.ts +2 -1
- package/dist/cliproxy/config/generator.d.ts.map +1 -1
- package/dist/cliproxy/config/generator.js +18 -8
- package/dist/cliproxy/config/generator.js.map +1 -1
- package/dist/cliproxy/executor/index.d.ts.map +1 -1
- package/dist/cliproxy/executor/index.js +30 -0
- package/dist/cliproxy/executor/index.js.map +1 -1
- package/dist/cliproxy/services/variant-config-adapter.d.ts +4 -35
- package/dist/cliproxy/services/variant-config-adapter.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-config-adapter.js +11 -34
- package/dist/cliproxy/services/variant-config-adapter.js.map +1 -1
- package/dist/cliproxy/services/variant-service.d.ts +5 -1
- package/dist/cliproxy/services/variant-service.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-service.js +19 -9
- package/dist/cliproxy/services/variant-service.js.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.d.ts.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.js +14 -2
- package/dist/cliproxy/sync/profile-mapper.js.map +1 -1
- package/dist/commands/api-command.d.ts +2 -0
- package/dist/commands/api-command.d.ts.map +1 -1
- package/dist/commands/api-command.js +45 -10
- package/dist/commands/api-command.js.map +1 -1
- package/dist/commands/cliproxy/auth-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/auth-subcommand.js +5 -2
- package/dist/commands/cliproxy/auth-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.js +1 -0
- package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/variant-subcommand.d.ts +15 -0
- package/dist/commands/cliproxy/variant-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/variant-subcommand.js +144 -15
- package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
- package/dist/commands/help-command.d.ts.map +1 -1
- package/dist/commands/help-command.js +34 -2
- package/dist/commands/help-command.js.map +1 -1
- package/dist/config/migration-manager.d.ts.map +1 -1
- package/dist/config/migration-manager.js +19 -0
- package/dist/config/migration-manager.js.map +1 -1
- package/dist/config/unified-config-loader.d.ts +11 -1
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +127 -59
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +16 -0
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +8 -1
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/management/instance-manager.d.ts +1 -0
- package/dist/management/instance-manager.d.ts.map +1 -1
- package/dist/management/instance-manager.js +14 -8
- package/dist/management/instance-manager.js.map +1 -1
- package/dist/management/profile-context-sync-lock.d.ts +14 -0
- package/dist/management/profile-context-sync-lock.d.ts.map +1 -0
- package/dist/management/profile-context-sync-lock.js +174 -0
- package/dist/management/profile-context-sync-lock.js.map +1 -0
- package/dist/management/shared-manager.d.ts +18 -0
- package/dist/management/shared-manager.d.ts.map +1 -1
- package/dist/management/shared-manager.js +145 -6
- package/dist/management/shared-manager.js.map +1 -1
- package/dist/targets/droid-adapter.d.ts +2 -4
- package/dist/targets/droid-adapter.d.ts.map +1 -1
- package/dist/targets/droid-adapter.js +20 -10
- package/dist/targets/droid-adapter.js.map +1 -1
- package/dist/targets/droid-command-router.d.ts +26 -0
- package/dist/targets/droid-command-router.d.ts.map +1 -0
- package/dist/targets/droid-command-router.js +240 -0
- package/dist/targets/droid-command-router.js.map +1 -0
- package/dist/targets/droid-config-manager.d.ts +9 -1
- package/dist/targets/droid-config-manager.d.ts.map +1 -1
- package/dist/targets/droid-config-manager.js +134 -6
- package/dist/targets/droid-config-manager.js.map +1 -1
- package/dist/targets/droid-provider.d.ts +40 -0
- package/dist/targets/droid-provider.d.ts.map +1 -0
- package/dist/targets/droid-provider.js +140 -0
- package/dist/targets/droid-provider.js.map +1 -0
- package/dist/targets/droid-reasoning-runtime.d.ts +14 -0
- package/dist/targets/droid-reasoning-runtime.d.ts.map +1 -0
- package/dist/targets/droid-reasoning-runtime.js +42 -0
- package/dist/targets/droid-reasoning-runtime.js.map +1 -0
- package/dist/targets/index.d.ts +2 -0
- package/dist/targets/index.d.ts.map +1 -1
- package/dist/targets/index.js +4 -1
- package/dist/targets/index.js.map +1 -1
- package/dist/targets/target-adapter.d.ts +6 -0
- package/dist/targets/target-adapter.d.ts.map +1 -1
- package/dist/targets/target-resolver.d.ts.map +1 -1
- package/dist/targets/target-resolver.js +6 -3
- package/dist/targets/target-resolver.js.map +1 -1
- package/dist/types/config.d.ts +7 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js.map +1 -1
- package/dist/ui/assets/accounts-y2u0CVK8.js +1 -0
- package/dist/ui/assets/{alert-dialog-YcmZPFim.js → alert-dialog-CetY4Iww.js} +1 -1
- package/dist/ui/assets/api-5q1FT1uL.js +1 -0
- package/dist/ui/assets/auth-section-CaQeee-F.js +1 -0
- package/dist/ui/assets/{backups-section-DmAsqMfq.js → backups-section-hF88BjYJ.js} +1 -1
- package/dist/ui/assets/{checkbox-Cfg9kbJX.js → checkbox-Dhm5Fzkb.js} +1 -1
- package/dist/ui/assets/cliproxy-BeYNWmY_.js +3 -0
- package/dist/ui/assets/cliproxy-control-panel-CJELeI80.js +1 -0
- package/dist/ui/assets/{confirm-dialog-CRcV2Yc4.js → confirm-dialog-Dn3SrwNV.js} +1 -1
- package/dist/ui/assets/{copilot-EarFqUyJ.js → copilot-vwT-4_V4.js} +2 -2
- package/dist/ui/assets/{cursor-Dbe4Wtw2.js → cursor-CN3lIX63.js} +1 -1
- package/dist/ui/assets/droid-DBP2yCY7.js +2 -0
- package/dist/ui/assets/{form-utils-C-pVd1--.js → form-utils-Cn_Uld6y.js} +1 -1
- package/dist/ui/assets/globalenv-section-DNKAJasL.js +1 -0
- package/dist/ui/assets/{health-Cvr359ff.js → health-C7tNiLzc.js} +1 -1
- package/dist/ui/assets/icons-DrewC9c3.js +1 -0
- package/dist/ui/assets/index-C8-ef-r7.js +1 -0
- package/dist/ui/assets/{index-Cp8K9_TQ.js → index-MGh88HoC.js} +1 -1
- package/dist/ui/assets/{index-DTDftvd-.js → index-QBUSDLTx.js} +1 -1
- package/dist/ui/assets/index-k-HuyjpO.js +47 -0
- package/dist/ui/assets/index-s-oTl3hW.css +1 -0
- package/dist/ui/assets/{index-CLBNUja8.js → index-uYnNU6Ut.js} +1 -1
- package/dist/ui/assets/proxy-status-widget-CIm5vKY7.js +1 -0
- package/dist/ui/assets/{radix-ui-DKgfU5rd.js → radix-ui-C1Gpgz6I.js} +1 -1
- package/dist/ui/assets/{separator-CdOKc0gJ.js → separator-BLVyAGAm.js} +1 -1
- package/dist/ui/assets/shared-CHH09ZNi.js +8 -0
- package/dist/ui/assets/{switch-B2ALi24E.js → switch-CwLyB4JK.js} +1 -1
- package/dist/ui/assets/{tanstack-5ndrQy-j.js → tanstack-DDJIhNJd.js} +1 -1
- package/dist/ui/assets/updates-VlxL3aum.js +1 -0
- package/dist/ui/index.html +6 -6
- package/dist/web-server/model-pricing.d.ts.map +1 -1
- package/dist/web-server/model-pricing.js +114 -22
- package/dist/web-server/model-pricing.js.map +1 -1
- package/dist/web-server/routes/account-route-helpers.d.ts +20 -0
- package/dist/web-server/routes/account-route-helpers.d.ts.map +1 -0
- package/dist/web-server/routes/account-route-helpers.js +34 -0
- package/dist/web-server/routes/account-route-helpers.js.map +1 -0
- package/dist/web-server/routes/account-routes.d.ts.map +1 -1
- package/dist/web-server/routes/account-routes.js +160 -27
- package/dist/web-server/routes/account-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.js +58 -24
- package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
- package/dist/web-server/routes/config-routes.d.ts.map +1 -1
- package/dist/web-server/routes/config-routes.js +73 -0
- package/dist/web-server/routes/config-routes.js.map +1 -1
- package/dist/web-server/routes/droid-routes.d.ts +3 -0
- package/dist/web-server/routes/droid-routes.d.ts.map +1 -0
- package/dist/web-server/routes/droid-routes.js +61 -0
- package/dist/web-server/routes/droid-routes.js.map +1 -0
- package/dist/web-server/routes/index.d.ts.map +1 -1
- package/dist/web-server/routes/index.js +3 -0
- package/dist/web-server/routes/index.js.map +1 -1
- package/dist/web-server/routes/profile-routes.d.ts +2 -0
- package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
- package/dist/web-server/routes/profile-routes.js +86 -6
- package/dist/web-server/routes/profile-routes.js.map +1 -1
- package/dist/web-server/routes/route-helpers.d.ts +2 -1
- package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/route-helpers.js +20 -1
- package/dist/web-server/routes/route-helpers.js.map +1 -1
- package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/settings-routes.js +110 -12
- package/dist/web-server/routes/settings-routes.js.map +1 -1
- package/dist/web-server/routes/variant-routes.d.ts +2 -0
- package/dist/web-server/routes/variant-routes.d.ts.map +1 -1
- package/dist/web-server/routes/variant-routes.js +50 -6
- package/dist/web-server/routes/variant-routes.js.map +1 -1
- package/dist/web-server/services/compatible-cli-docs-registry.d.ts +23 -0
- package/dist/web-server/services/compatible-cli-docs-registry.d.ts.map +1 -0
- package/dist/web-server/services/compatible-cli-docs-registry.js +81 -0
- package/dist/web-server/services/compatible-cli-docs-registry.js.map +1 -0
- package/dist/web-server/services/compatible-cli-json-file-service.d.ts +41 -0
- package/dist/web-server/services/compatible-cli-json-file-service.d.ts.map +1 -0
- package/dist/web-server/services/compatible-cli-json-file-service.js +205 -0
- package/dist/web-server/services/compatible-cli-json-file-service.js.map +1 -0
- package/dist/web-server/services/compatible-cli-types.d.ts +82 -0
- package/dist/web-server/services/compatible-cli-types.d.ts.map +1 -0
- package/dist/web-server/services/compatible-cli-types.js +3 -0
- package/dist/web-server/services/compatible-cli-types.js.map +1 -0
- package/dist/web-server/services/droid-dashboard-service.d.ts +29 -0
- package/dist/web-server/services/droid-dashboard-service.d.ts.map +1 -0
- package/dist/web-server/services/droid-dashboard-service.js +238 -0
- package/dist/web-server/services/droid-dashboard-service.js.map +1 -0
- package/dist/web-server/shared-routes.d.ts.map +1 -1
- package/dist/web-server/shared-routes.js +350 -52
- package/dist/web-server/shared-routes.js.map +1 -1
- package/lib/hooks/websearch-transformer.cjs +78 -52
- package/package.json +4 -2
- package/scripts/maintainability-check.js +163 -0
- package/dist/ui/assets/accounts-DIqClJ7z.js +0 -1
- package/dist/ui/assets/api-BWyCgbMh.js +0 -1
- package/dist/ui/assets/auth-section-Amm4rwiS.js +0 -1
- package/dist/ui/assets/cliproxy-B-q7RjS2.js +0 -3
- package/dist/ui/assets/cliproxy-control-panel-BliRTkbb.js +0 -1
- package/dist/ui/assets/globalenv-section-CBp73q9k.js +0 -1
- package/dist/ui/assets/icons-DGASzt3M.js +0 -1
- package/dist/ui/assets/index-8n-yIlea.js +0 -47
- package/dist/ui/assets/index-B5aulDs4.js +0 -1
- package/dist/ui/assets/index-BBCDm6dS.css +0 -1
- package/dist/ui/assets/proxy-status-widget-C0G0aOCW.js +0 -1
- package/dist/ui/assets/shared-zsUXmES2.js +0 -1
package/README.md
CHANGED
|
@@ -53,15 +53,19 @@ ccs config
|
|
|
53
53
|
# Opens http://localhost:3000
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
Dashboard updates hub: `http://localhost:3000/updates`
|
|
57
|
+
|
|
56
58
|
Want to run the dashboard in Docker? See `docker/README.md`.
|
|
57
59
|
|
|
58
60
|
### 3. Configure Your Accounts
|
|
59
61
|
|
|
60
62
|
The dashboard provides visual management for all account types:
|
|
61
63
|
|
|
62
|
-
- **Claude Accounts**:
|
|
64
|
+
- **Claude Accounts**: Isolation-first by default (work, personal, client), with explicit shared context opt-in
|
|
63
65
|
- **OAuth Providers**: One-click auth for Gemini, Codex, Antigravity, Kiro, Copilot
|
|
64
66
|
- **API Profiles**: Configure GLM, Kimi with your keys
|
|
67
|
+
- **Factory Droid**: Track Droid install location and BYOK settings health
|
|
68
|
+
- **Updates Center**: Track support rollouts (Droid target, CLIProxy provider changes, WebSearch integrations)
|
|
65
69
|
- **Health Monitor**: Real-time status across all profiles
|
|
66
70
|
|
|
67
71
|
**Analytics Dashboard**
|
|
@@ -154,6 +158,56 @@ ccsd glm
|
|
|
154
158
|
|
|
155
159
|
Need additional alias names? Set `CCS_DROID_ALIASES` as a comma-separated list (for example: `CCS_DROID_ALIASES=ccs-droid,mydroid`).
|
|
156
160
|
|
|
161
|
+
For Factory BYOK compatibility, CCS also stores a per-profile Droid provider hint
|
|
162
|
+
(`CCS_DROID_PROVIDER`) using one of:
|
|
163
|
+
`anthropic`, `openai`, or `generic-chat-completion-api`.
|
|
164
|
+
If the hint is missing, CCS resolves provider from base URL/model at runtime.
|
|
165
|
+
|
|
166
|
+
CCS also persists Droid's active model selector in `~/.factory/settings.json`
|
|
167
|
+
(`model: custom:<alias>`). This avoids passing `-m` argv in interactive mode,
|
|
168
|
+
which Droid treats as queued prompt text.
|
|
169
|
+
|
|
170
|
+
CCS supports structural Droid command passthrough after profile selection:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
ccsd codex exec --skip-permissions-unsafe "fix failing tests"
|
|
174
|
+
ccsd codex --skip-permissions-unsafe "fix failing tests" # auto-routed to: droid exec ...
|
|
175
|
+
ccsd codex -m custom:gpt-5.3-codex "fix failing tests" # short exec flags auto-routed too
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
If you pass exec-only flags without a prompt (for example `--skip-permissions-unsafe`),
|
|
179
|
+
Droid `exec` will return its native "No prompt provided" usage guidance.
|
|
180
|
+
|
|
181
|
+
If multiple reasoning flags are provided in Droid exec mode, CCS keeps the first
|
|
182
|
+
flag and warns about duplicates.
|
|
183
|
+
|
|
184
|
+
Dashboard parity: `ccs config` -> `Factory Droid`
|
|
185
|
+
|
|
186
|
+
### Per-Profile Target Defaults
|
|
187
|
+
|
|
188
|
+
You can pin a default target (`claude` or `droid`) per profile:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# API profile defaults to Droid
|
|
192
|
+
ccs api create myglm --preset glm --target droid
|
|
193
|
+
|
|
194
|
+
# CLIProxy variant defaults to Droid
|
|
195
|
+
ccs cliproxy create mycodex --provider codex --target droid
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Built-in CLIProxy providers also work with Droid alias/target override:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
ccsd codex
|
|
202
|
+
ccsd agy
|
|
203
|
+
ccs codex --target droid
|
|
204
|
+
ccsd codex exec --auto high "triage this bug report"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Dashboard parity:
|
|
208
|
+
- `ccs config` -> `API Profiles` -> set **Default Target**
|
|
209
|
+
- `ccs config` -> `CLIProxy` -> create/edit variant -> set **Default Target**
|
|
210
|
+
|
|
157
211
|
### Kiro Auth Methods
|
|
158
212
|
|
|
159
213
|
`ccs kiro --auth` defaults to AWS Builder ID Device OAuth (best support for AWS org accounts).
|
|
@@ -221,17 +275,66 @@ ccs work "implement feature" # Terminal 1
|
|
|
221
275
|
ccs "review code" # Terminal 2 (personal account)
|
|
222
276
|
```
|
|
223
277
|
|
|
224
|
-
|
|
278
|
+
#### Account Context Modes (Isolation-First)
|
|
279
|
+
|
|
280
|
+
Account profiles are isolated by default.
|
|
281
|
+
|
|
282
|
+
| Mode | Default | Requirements |
|
|
283
|
+
|------|---------|--------------|
|
|
284
|
+
| `isolated` | Yes | No `context_group` required |
|
|
285
|
+
| `shared` | No (explicit opt-in) | Valid non-empty `context_group` |
|
|
286
|
+
|
|
287
|
+
Shared mode continuity depth:
|
|
288
|
+
|
|
289
|
+
- `standard` (default): shares project workspace context only
|
|
290
|
+
- `deeper` (advanced opt-in): additionally syncs `session-env`, `file-history`, `shell-snapshots`, `todos`
|
|
291
|
+
|
|
292
|
+
Opt in to shared context when needed:
|
|
225
293
|
|
|
226
294
|
```bash
|
|
227
295
|
# Share context with default group
|
|
228
296
|
ccs auth create backup --share-context
|
|
229
297
|
|
|
230
|
-
#
|
|
298
|
+
# Share context only within named group
|
|
231
299
|
ccs auth create backup2 --context-group sprint-a
|
|
300
|
+
|
|
301
|
+
# Advanced deeper continuity mode (requires shared mode)
|
|
302
|
+
ccs auth create backup3 --context-group sprint-a --deeper-continuity
|
|
232
303
|
```
|
|
233
304
|
|
|
234
|
-
|
|
305
|
+
Update existing accounts without recreating login:
|
|
306
|
+
|
|
307
|
+
1. Run `ccs config`
|
|
308
|
+
2. Open `Accounts`
|
|
309
|
+
3. Click the pencil icon in Actions and set `isolated` or `shared` mode + continuity depth
|
|
310
|
+
|
|
311
|
+
Shared mode metadata in `~/.ccs/config.yaml`:
|
|
312
|
+
|
|
313
|
+
```yaml
|
|
314
|
+
accounts:
|
|
315
|
+
work:
|
|
316
|
+
created: "2026-02-24T00:00:00.000Z"
|
|
317
|
+
last_used: null
|
|
318
|
+
context_mode: "shared"
|
|
319
|
+
context_group: "team-alpha"
|
|
320
|
+
continuity_mode: "standard"
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
`context_group` rules:
|
|
324
|
+
|
|
325
|
+
- lowercase letters, numbers, `_`, `-`
|
|
326
|
+
- must start with a letter
|
|
327
|
+
- max length `64`
|
|
328
|
+
- non-empty after normalization
|
|
329
|
+
- normalized by trim + lowercase + whitespace collapse (`" Team Alpha "` -> `"team-alpha"`)
|
|
330
|
+
|
|
331
|
+
Shared context with `standard` depth links project workspace data. `deeper` depth links additional continuity artifacts. Credentials remain isolated per account.
|
|
332
|
+
|
|
333
|
+
Alternative path for lower manual switching:
|
|
334
|
+
|
|
335
|
+
- Use CLIProxy Claude pool (`ccs cliproxy auth claude`) and manage pool behavior in `ccs config` -> `CLIProxy Plus`.
|
|
336
|
+
|
|
337
|
+
Technical details: [`docs/session-sharing-technical-analysis.md`](docs/session-sharing-technical-analysis.md)
|
|
235
338
|
|
|
236
339
|
<br>
|
|
237
340
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"env": {
|
|
3
3
|
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/iflow",
|
|
4
4
|
"ANTHROPIC_AUTH_TOKEN": "ccs-internal-managed",
|
|
5
|
-
"ANTHROPIC_MODEL": "
|
|
6
|
-
"ANTHROPIC_DEFAULT_OPUS_MODEL": "
|
|
7
|
-
"ANTHROPIC_DEFAULT_SONNET_MODEL": "
|
|
8
|
-
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "
|
|
5
|
+
"ANTHROPIC_MODEL": "qwen3-coder-plus",
|
|
6
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "qwen3-coder-plus",
|
|
7
|
+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "qwen3-coder-plus",
|
|
8
|
+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "qwen3-coder-plus"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Barrel export for API-related business logic services.
|
|
5
5
|
*/
|
|
6
6
|
export { validateApiName, validateUrl, getUrlWarning, sanitizeBaseUrl } from './validation-service';
|
|
7
|
-
export { type ModelMapping, type ApiProfileInfo, type CliproxyVariantInfo, type ApiListResult, type CreateApiProfileResult, type RemoveApiProfileResult, } from './profile-types';
|
|
7
|
+
export { type ModelMapping, type ApiProfileInfo, type CliproxyVariantInfo, type ApiListResult, type CreateApiProfileResult, type RemoveApiProfileResult, type UpdateApiProfileTargetResult, } from './profile-types';
|
|
8
8
|
export { apiProfileExists, isApiProfileConfigured, listApiProfiles, getApiProfileNames, isUsingUnifiedConfig, } from './profile-reader';
|
|
9
|
-
export { createApiProfile, removeApiProfile } from './profile-writer';
|
|
9
|
+
export { createApiProfile, removeApiProfile, updateApiProfileTarget } from './profile-writer';
|
|
10
10
|
export { isOpenRouterUrl, fetchOpenRouterModels, type OpenRouterModel } from './openrouter-catalog';
|
|
11
11
|
export { pickOpenRouterModel, type OpenRouterSelection } from './openrouter-picker';
|
|
12
12
|
export { PROVIDER_PRESETS, PRESET_ALIASES, OPENROUTER_BASE_URL, getPresetById, getPresetAliases, getPresetIds, isValidPresetId, type ProviderPreset, type PresetCategory, } from './provider-presets';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGpG,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGpG,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,GAClC,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG9F,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGpF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Barrel export for API-related business logic services.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.isValidPresetId = exports.getPresetIds = exports.getPresetAliases = exports.getPresetById = exports.OPENROUTER_BASE_URL = exports.PRESET_ALIASES = exports.PROVIDER_PRESETS = exports.pickOpenRouterModel = exports.fetchOpenRouterModels = exports.isOpenRouterUrl = exports.removeApiProfile = exports.createApiProfile = exports.isUsingUnifiedConfig = exports.getApiProfileNames = exports.listApiProfiles = exports.isApiProfileConfigured = exports.apiProfileExists = exports.sanitizeBaseUrl = exports.getUrlWarning = exports.validateUrl = exports.validateApiName = void 0;
|
|
8
|
+
exports.isValidPresetId = exports.getPresetIds = exports.getPresetAliases = exports.getPresetById = exports.OPENROUTER_BASE_URL = exports.PRESET_ALIASES = exports.PROVIDER_PRESETS = exports.pickOpenRouterModel = exports.fetchOpenRouterModels = exports.isOpenRouterUrl = exports.updateApiProfileTarget = exports.removeApiProfile = exports.createApiProfile = exports.isUsingUnifiedConfig = exports.getApiProfileNames = exports.listApiProfiles = exports.isApiProfileConfigured = exports.apiProfileExists = exports.sanitizeBaseUrl = exports.getUrlWarning = exports.validateUrl = exports.validateApiName = void 0;
|
|
9
9
|
// Validation services
|
|
10
10
|
var validation_service_1 = require("./validation-service");
|
|
11
11
|
Object.defineProperty(exports, "validateApiName", { enumerable: true, get: function () { return validation_service_1.validateApiName; } });
|
|
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "isUsingUnifiedConfig", { enumerable: true, get:
|
|
|
23
23
|
var profile_writer_1 = require("./profile-writer");
|
|
24
24
|
Object.defineProperty(exports, "createApiProfile", { enumerable: true, get: function () { return profile_writer_1.createApiProfile; } });
|
|
25
25
|
Object.defineProperty(exports, "removeApiProfile", { enumerable: true, get: function () { return profile_writer_1.removeApiProfile; } });
|
|
26
|
+
Object.defineProperty(exports, "updateApiProfileTarget", { enumerable: true, get: function () { return profile_writer_1.updateApiProfileTarget; } });
|
|
26
27
|
// OpenRouter catalog and picker
|
|
27
28
|
var openrouter_catalog_1 = require("./openrouter-catalog");
|
|
28
29
|
Object.defineProperty(exports, "isOpenRouterUrl", { enumerable: true, get: function () { return openrouter_catalog_1.isOpenRouterUrl; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,sBAAsB;AACtB,2DAAoG;AAA3F,qHAAA,eAAe,OAAA;AAAE,iHAAA,WAAW,OAAA;AAAE,mHAAA,aAAa,OAAA;AAAE,qHAAA,eAAe,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,sBAAsB;AACtB,2DAAoG;AAA3F,qHAAA,eAAe,OAAA;AAAE,iHAAA,WAAW,OAAA;AAAE,mHAAA,aAAa,OAAA;AAAE,qHAAA,eAAe,OAAA;AAarE,0BAA0B;AAC1B,mDAM0B;AALxB,kHAAA,gBAAgB,OAAA;AAChB,wHAAA,sBAAsB,OAAA;AACtB,iHAAA,eAAe,OAAA;AACf,oHAAA,kBAAkB,OAAA;AAClB,sHAAA,oBAAoB,OAAA;AAGtB,2BAA2B;AAC3B,mDAA8F;AAArF,kHAAA,gBAAgB,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,wHAAA,sBAAsB,OAAA;AAEnE,gCAAgC;AAChC,2DAAoG;AAA3F,qHAAA,eAAe,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAC/C,yDAAoF;AAA3E,wHAAA,mBAAmB,OAAA;AAE5B,2BAA2B;AAC3B,uDAU4B;AAT1B,oHAAA,gBAAgB,OAAA;AAChB,kHAAA,cAAc,OAAA;AACd,uHAAA,mBAAmB,OAAA;AACnB,iHAAA,aAAa,OAAA;AACb,oHAAA,gBAAgB,OAAA;AAChB,gHAAA,YAAY,OAAA;AACZ,mHAAA,eAAe,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-reader.d.ts","sourceRoot":"","sources":["../../../src/api/services/profile-reader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"profile-reader.d.ts","sourceRoot":"","sources":["../../../src/api/services/profile-reader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EAAuC,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAW1F;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWtD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAc/D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,aAAa,CAgE/C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAO7C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C"}
|
|
@@ -34,6 +34,13 @@ const fs = __importStar(require("fs"));
|
|
|
34
34
|
const path = __importStar(require("path"));
|
|
35
35
|
const config_manager_1 = require("../../utils/config-manager");
|
|
36
36
|
const unified_config_loader_1 = require("../../config/unified-config-loader");
|
|
37
|
+
const VALID_TARGETS = new Set(['claude', 'droid']);
|
|
38
|
+
function sanitizeTarget(target) {
|
|
39
|
+
if (typeof target === 'string' && VALID_TARGETS.has(target)) {
|
|
40
|
+
return target;
|
|
41
|
+
}
|
|
42
|
+
return 'claude';
|
|
43
|
+
}
|
|
37
44
|
/**
|
|
38
45
|
* Check if API profile exists in config
|
|
39
46
|
*/
|
|
@@ -91,6 +98,7 @@ function listApiProfiles() {
|
|
|
91
98
|
settingsPath: profile.settings || 'config.yaml',
|
|
92
99
|
isConfigured: isApiProfileConfigured(name),
|
|
93
100
|
configSource: 'unified',
|
|
101
|
+
target: sanitizeTarget(profile.target),
|
|
94
102
|
});
|
|
95
103
|
}
|
|
96
104
|
// CLIProxy variants
|
|
@@ -102,11 +110,14 @@ function listApiProfiles() {
|
|
|
102
110
|
name,
|
|
103
111
|
provider,
|
|
104
112
|
settings: variant?.settings || '-',
|
|
113
|
+
target: sanitizeTarget(variant?.target),
|
|
105
114
|
});
|
|
106
115
|
}
|
|
107
116
|
}
|
|
108
117
|
else {
|
|
109
118
|
const config = (0, config_manager_1.loadConfigSafe)();
|
|
119
|
+
const legacyTargetMap = config
|
|
120
|
+
.profile_targets;
|
|
110
121
|
for (const [name, settingsPath] of Object.entries(config.profiles)) {
|
|
111
122
|
// Skip 'default' profile - it's the user's native Claude settings
|
|
112
123
|
if (name === 'default' && settingsPath.includes('.claude/settings.json')) {
|
|
@@ -117,6 +128,7 @@ function listApiProfiles() {
|
|
|
117
128
|
settingsPath: settingsPath,
|
|
118
129
|
isConfigured: isApiProfileConfigured(name),
|
|
119
130
|
configSource: 'legacy',
|
|
131
|
+
target: sanitizeTarget(legacyTargetMap?.[name]),
|
|
120
132
|
});
|
|
121
133
|
}
|
|
122
134
|
// CLIProxy variants
|
|
@@ -127,6 +139,7 @@ function listApiProfiles() {
|
|
|
127
139
|
name,
|
|
128
140
|
provider: variant.provider,
|
|
129
141
|
settings: variant.settings,
|
|
142
|
+
target: sanitizeTarget(variant.target),
|
|
130
143
|
});
|
|
131
144
|
}
|
|
132
145
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-reader.js","sourceRoot":"","sources":["../../../src/api/services/profile-reader.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,+DAAuE;AACvE,8EAA8F;
|
|
1
|
+
{"version":3,"file":"profile-reader.js","sourceRoot":"","sources":["../../../src/api/services/profile-reader.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,+DAAuE;AACvE,8EAA8F;AAI9F,MAAM,aAAa,GAA4B,IAAI,GAAG,CAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAExF,SAAS,cAAc,CAAC,MAAe;IACrC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC,MAAoB,CAAC,EAAE,CAAC;QAC1E,OAAO,MAAoB,CAAC;IAC9B,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC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ACD,MAAM,MAAM,GAAG,IAAA,+BAAc,GAAE,CAAC;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACtC,CAAC;AAPD,gDAOC;AAED;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO,IAAA,qCAAa,GAAE,CAAC;AACzB,CAAC;AAFD,oDAEC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared type definitions for API profile services.
|
|
5
5
|
*/
|
|
6
|
+
import type { TargetType } from '../../targets/target-adapter';
|
|
6
7
|
/** Model mapping for API profiles */
|
|
7
8
|
export interface ModelMapping {
|
|
8
9
|
default: string;
|
|
@@ -16,12 +17,14 @@ export interface ApiProfileInfo {
|
|
|
16
17
|
settingsPath: string;
|
|
17
18
|
isConfigured: boolean;
|
|
18
19
|
configSource: 'unified' | 'legacy';
|
|
20
|
+
target: TargetType;
|
|
19
21
|
}
|
|
20
22
|
/** CLIProxy variant info */
|
|
21
23
|
export interface CliproxyVariantInfo {
|
|
22
24
|
name: string;
|
|
23
25
|
provider: string;
|
|
24
26
|
settings: string;
|
|
27
|
+
target: TargetType;
|
|
25
28
|
}
|
|
26
29
|
/** Result from list operation */
|
|
27
30
|
export interface ApiListResult {
|
|
@@ -39,4 +42,10 @@ export interface RemoveApiProfileResult {
|
|
|
39
42
|
success: boolean;
|
|
40
43
|
error?: string;
|
|
41
44
|
}
|
|
45
|
+
/** Result from updating API profile target */
|
|
46
|
+
export interface UpdateApiProfileTargetResult {
|
|
47
|
+
success: boolean;
|
|
48
|
+
target?: TargetType;
|
|
49
|
+
error?: string;
|
|
50
|
+
}
|
|
42
51
|
//# sourceMappingURL=profile-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-types.d.ts","sourceRoot":"","sources":["../../../src/api/services/profile-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,SAAS,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"profile-types.d.ts","sourceRoot":"","sources":["../../../src/api/services/profile-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,SAAS,GAAG,QAAQ,CAAC;IACnC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,4BAA4B;AAC5B,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,iCAAiC;AACjC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED,mCAAmC;AACnC,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,mCAAmC;AACnC,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8CAA8C;AAC9C,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TargetType } from '../../targets/target-adapter';
|
|
2
|
+
import type { ModelMapping, CreateApiProfileResult, RemoveApiProfileResult, UpdateApiProfileTargetResult } from './profile-types';
|
|
2
3
|
/** Create a new API profile */
|
|
3
|
-
export declare function createApiProfile(name: string, baseUrl: string, apiKey: string, models: ModelMapping): CreateApiProfileResult;
|
|
4
|
+
export declare function createApiProfile(name: string, baseUrl: string, apiKey: string, models: ModelMapping, target?: TargetType, provider?: string): CreateApiProfileResult;
|
|
5
|
+
/**
|
|
6
|
+
* Update API profile target (claude/droid).
|
|
7
|
+
* Persists to config.yaml in unified mode and config.json profile_targets in legacy mode.
|
|
8
|
+
*/
|
|
9
|
+
export declare function updateApiProfileTarget(name: string, target: TargetType): UpdateApiProfileTargetResult;
|
|
4
10
|
/** Remove an API profile */
|
|
5
11
|
export declare function removeApiProfile(name: string): RemoveApiProfileResult;
|
|
6
12
|
//# sourceMappingURL=profile-writer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-writer.d.ts","sourceRoot":"","sources":["../../../src/api/services/profile-writer.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"profile-writer.d.ts","sourceRoot":"","sources":["../../../src/api/services/profile-writer.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AAkIzB,+BAA+B;AAC/B,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,YAAY,EACpB,MAAM,GAAE,UAAqB,EAC7B,QAAQ,CAAC,EAAE,MAAM,GAChB,sBAAsB,CAmBxB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,GACjB,4BAA4B,CAgD9B;AAqDD,4BAA4B;AAC5B,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAWrE"}
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.removeApiProfile = exports.createApiProfile = void 0;
|
|
26
|
+
exports.removeApiProfile = exports.updateApiProfileTarget = exports.createApiProfile = void 0;
|
|
27
27
|
/**
|
|
28
28
|
* API Profile Writer Service - Create/remove operations for API profiles.
|
|
29
29
|
* Supports both unified YAML config and legacy JSON config.
|
|
@@ -34,14 +34,20 @@ const config_manager_1 = require("../../utils/config-manager");
|
|
|
34
34
|
const helpers_1 = require("../../utils/helpers");
|
|
35
35
|
const unified_config_loader_1 = require("../../config/unified-config-loader");
|
|
36
36
|
const profile_hook_injector_1 = require("../../utils/websearch/profile-hook-injector");
|
|
37
|
+
const droid_provider_1 = require("../../targets/droid-provider");
|
|
37
38
|
/** Check if URL is an OpenRouter endpoint */
|
|
38
39
|
function isOpenRouterUrl(baseUrl) {
|
|
39
40
|
return baseUrl.toLowerCase().includes('openrouter.ai');
|
|
40
41
|
}
|
|
41
42
|
/** Create settings.json file for API profile (legacy format) */
|
|
42
|
-
function createSettingsFile(name, baseUrl, apiKey, models) {
|
|
43
|
+
function createSettingsFile(name, baseUrl, apiKey, models, provider) {
|
|
43
44
|
const ccsDir = (0, config_manager_1.getCcsDir)();
|
|
44
45
|
const settingsPath = path.join(ccsDir, `${name}.settings.json`);
|
|
46
|
+
const droidProvider = (0, droid_provider_1.resolveDroidProvider)({
|
|
47
|
+
provider,
|
|
48
|
+
baseUrl,
|
|
49
|
+
model: models.default,
|
|
50
|
+
});
|
|
45
51
|
const settings = {
|
|
46
52
|
env: {
|
|
47
53
|
ANTHROPIC_BASE_URL: baseUrl,
|
|
@@ -50,6 +56,7 @@ function createSettingsFile(name, baseUrl, apiKey, models) {
|
|
|
50
56
|
ANTHROPIC_DEFAULT_OPUS_MODEL: models.opus,
|
|
51
57
|
ANTHROPIC_DEFAULT_SONNET_MODEL: models.sonnet,
|
|
52
58
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: models.haiku,
|
|
59
|
+
CCS_DROID_PROVIDER: droidProvider,
|
|
53
60
|
// OpenRouter requires explicitly blanking the API key to prevent conflicts
|
|
54
61
|
...(isOpenRouterUrl(baseUrl) && { ANTHROPIC_API_KEY: '' }),
|
|
55
62
|
},
|
|
@@ -60,7 +67,7 @@ function createSettingsFile(name, baseUrl, apiKey, models) {
|
|
|
60
67
|
return settingsPath;
|
|
61
68
|
}
|
|
62
69
|
/** Update config.json with new API profile (legacy format) */
|
|
63
|
-
function updateLegacyConfig(name) {
|
|
70
|
+
function updateLegacyConfig(name, target = 'claude') {
|
|
64
71
|
const configPath = (0, config_manager_1.getConfigPath)();
|
|
65
72
|
const ccsDir = (0, config_manager_1.getCcsDir)();
|
|
66
73
|
let config;
|
|
@@ -72,6 +79,13 @@ function updateLegacyConfig(name) {
|
|
|
72
79
|
}
|
|
73
80
|
const relativePath = `~/.ccs/${name}.settings.json`;
|
|
74
81
|
config.profiles[name] = relativePath;
|
|
82
|
+
config.profile_targets = config.profile_targets || {};
|
|
83
|
+
if (target === 'claude') {
|
|
84
|
+
delete config.profile_targets[name];
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
config.profile_targets[name] = target;
|
|
88
|
+
}
|
|
75
89
|
if (!fs.existsSync(ccsDir)) {
|
|
76
90
|
fs.mkdirSync(ccsDir, { recursive: true });
|
|
77
91
|
}
|
|
@@ -81,10 +95,15 @@ function updateLegacyConfig(name) {
|
|
|
81
95
|
fs.renameSync(tempPath, configPath);
|
|
82
96
|
}
|
|
83
97
|
/** Create API profile in unified config */
|
|
84
|
-
function createApiProfileUnified(name, baseUrl, apiKey, models) {
|
|
98
|
+
function createApiProfileUnified(name, baseUrl, apiKey, models, target = 'claude', provider) {
|
|
85
99
|
const ccsDir = (0, config_manager_1.getCcsDir)();
|
|
86
100
|
const settingsFile = `${name}.settings.json`;
|
|
87
101
|
const settingsPath = path.join(ccsDir, settingsFile);
|
|
102
|
+
const droidProvider = (0, droid_provider_1.resolveDroidProvider)({
|
|
103
|
+
provider,
|
|
104
|
+
baseUrl,
|
|
105
|
+
model: models.default,
|
|
106
|
+
});
|
|
88
107
|
const settings = {
|
|
89
108
|
env: {
|
|
90
109
|
ANTHROPIC_BASE_URL: baseUrl,
|
|
@@ -93,6 +112,7 @@ function createApiProfileUnified(name, baseUrl, apiKey, models) {
|
|
|
93
112
|
ANTHROPIC_DEFAULT_OPUS_MODEL: models.opus,
|
|
94
113
|
ANTHROPIC_DEFAULT_SONNET_MODEL: models.sonnet,
|
|
95
114
|
ANTHROPIC_DEFAULT_HAIKU_MODEL: models.haiku,
|
|
115
|
+
CCS_DROID_PROVIDER: droidProvider,
|
|
96
116
|
// OpenRouter requires explicitly blanking the API key to prevent conflicts
|
|
97
117
|
...(isOpenRouterUrl(baseUrl) && { ANTHROPIC_API_KEY: '' }),
|
|
98
118
|
},
|
|
@@ -107,19 +127,20 @@ function createApiProfileUnified(name, baseUrl, apiKey, models) {
|
|
|
107
127
|
config.profiles[name] = {
|
|
108
128
|
type: 'api',
|
|
109
129
|
settings: `~/.ccs/${settingsFile}`,
|
|
130
|
+
...(target !== 'claude' && { target }),
|
|
110
131
|
};
|
|
111
132
|
(0, unified_config_loader_1.saveUnifiedConfig)(config);
|
|
112
133
|
}
|
|
113
134
|
/** Create a new API profile */
|
|
114
|
-
function createApiProfile(name, baseUrl, apiKey, models) {
|
|
135
|
+
function createApiProfile(name, baseUrl, apiKey, models, target = 'claude', provider) {
|
|
115
136
|
try {
|
|
116
137
|
const settingsFile = `~/.ccs/${name}.settings.json`;
|
|
117
138
|
if ((0, unified_config_loader_1.isUnifiedMode)()) {
|
|
118
|
-
createApiProfileUnified(name, baseUrl, apiKey, models);
|
|
139
|
+
createApiProfileUnified(name, baseUrl, apiKey, models, target, provider);
|
|
119
140
|
}
|
|
120
141
|
else {
|
|
121
|
-
createSettingsFile(name, baseUrl, apiKey, models);
|
|
122
|
-
updateLegacyConfig(name);
|
|
142
|
+
createSettingsFile(name, baseUrl, apiKey, models, provider);
|
|
143
|
+
updateLegacyConfig(name, target);
|
|
123
144
|
}
|
|
124
145
|
return { success: true, settingsFile };
|
|
125
146
|
}
|
|
@@ -132,6 +153,54 @@ function createApiProfile(name, baseUrl, apiKey, models) {
|
|
|
132
153
|
}
|
|
133
154
|
}
|
|
134
155
|
exports.createApiProfile = createApiProfile;
|
|
156
|
+
/**
|
|
157
|
+
* Update API profile target (claude/droid).
|
|
158
|
+
* Persists to config.yaml in unified mode and config.json profile_targets in legacy mode.
|
|
159
|
+
*/
|
|
160
|
+
function updateApiProfileTarget(name, target) {
|
|
161
|
+
try {
|
|
162
|
+
if ((0, unified_config_loader_1.isUnifiedMode)()) {
|
|
163
|
+
const config = (0, unified_config_loader_1.loadOrCreateUnifiedConfig)();
|
|
164
|
+
if (!config.profiles[name]) {
|
|
165
|
+
return { success: false, error: `API profile not found: ${name}` };
|
|
166
|
+
}
|
|
167
|
+
if (target === 'claude') {
|
|
168
|
+
delete config.profiles[name].target;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
config.profiles[name].target = target;
|
|
172
|
+
}
|
|
173
|
+
(0, unified_config_loader_1.saveUnifiedConfig)(config);
|
|
174
|
+
return { success: true, target };
|
|
175
|
+
}
|
|
176
|
+
const configPath = (0, config_manager_1.getConfigPath)();
|
|
177
|
+
let config;
|
|
178
|
+
try {
|
|
179
|
+
config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
config = { profiles: {} };
|
|
183
|
+
}
|
|
184
|
+
if (!config.profiles[name]) {
|
|
185
|
+
return { success: false, error: `API profile not found: ${name}` };
|
|
186
|
+
}
|
|
187
|
+
config.profile_targets = config.profile_targets || {};
|
|
188
|
+
if (target === 'claude') {
|
|
189
|
+
delete config.profile_targets[name];
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
config.profile_targets[name] = target;
|
|
193
|
+
}
|
|
194
|
+
const tempPath = configPath + '.tmp';
|
|
195
|
+
fs.writeFileSync(tempPath, JSON.stringify(config, null, 2) + '\n', 'utf8');
|
|
196
|
+
fs.renameSync(tempPath, configPath);
|
|
197
|
+
return { success: true, target };
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
return { success: false, error: error.message };
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
exports.updateApiProfileTarget = updateApiProfileTarget;
|
|
135
204
|
/** Remove API profile from unified config */
|
|
136
205
|
function removeApiProfileUnified(name) {
|
|
137
206
|
const config = (0, unified_config_loader_1.loadOrCreateUnifiedConfig)();
|
|
@@ -158,6 +227,12 @@ function removeApiProfileUnified(name) {
|
|
|
158
227
|
function removeApiProfileLegacy(name) {
|
|
159
228
|
const config = (0, config_manager_1.loadConfigSafe)();
|
|
160
229
|
delete config.profiles[name];
|
|
230
|
+
if (config.profile_targets) {
|
|
231
|
+
delete config.profile_targets[name];
|
|
232
|
+
if (Object.keys(config.profile_targets).length === 0) {
|
|
233
|
+
delete config.profile_targets;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
161
236
|
const configPath = (0, config_manager_1.getConfigPath)();
|
|
162
237
|
const tempPath = configPath + '.tmp';
|
|
163
238
|
fs.writeFileSync(tempPath, JSON.stringify(config, null, 2) + '\n', 'utf8');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-writer.js","sourceRoot":"","sources":["../../../src/api/services/profile-writer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,+DAAsF;AACtF,iDAAiD;AACjD,8EAI4C;AAC5C,uFAAiF;
|
|
1
|
+
{"version":3,"file":"profile-writer.js","sourceRoot":"","sources":["../../../src/api/services/profile-writer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,+DAAsF;AACtF,iDAAiD;AACjD,8EAI4C;AAC5C,uFAAiF;AAEjF,iEAAoE;AAQpE,6CAA6C;AAC7C,SAAS,eAAe,CAAC,OAAe;IACtC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACzD,CAAC;AAED,gEAAgE;AAChE,SAAS,kBAAkB,CACzB,IAAY,EACZ,OAAe,EACf,MAAc,EACd,MAAoB,EACpB,QAAiB;IAEjB,MAAM,MAAM,GAAG,IAAA,0BAAS,GAAE,CAAC;IAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,gBAAgB,CAAC,CAAC;IAChE,MAAM,aAAa,GAAG,IAAA,qCAAoB,EAAC;QACzC,QAAQ;QACR,OAAO;QACP,KAAK,EAAE,MAAM,CAAC,OAAO;KACtB,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG;QACf,GAAG,EAAE;YACH,kBAAkB,EAAE,OAAO;YAC3B,oBAAoB,EAAE,MAAM;YAC5B,eAAe,EAAE,MAAM,CAAC,OAA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AA,0BAAS,GAAE,EAAE,GAAG,IAAI,gBAAgB,CAAC,CAAC;IACrE,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,4BAA4B;AAC5B,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,IAAI,CAAC;QACH,IAAI,IAAA,qCAAa,GAAE,EAAE,CAAC;YACpB,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,sBAAsB,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC;IAC7D,CAAC;AACH,CAAC;AAXD,4CAWC"}
|
|
@@ -5,17 +5,21 @@
|
|
|
5
5
|
* project workspace context with other accounts in the same context group.
|
|
6
6
|
*/
|
|
7
7
|
export type AccountContextMode = 'isolated' | 'shared';
|
|
8
|
+
export type AccountContinuityMode = 'standard' | 'deeper';
|
|
8
9
|
export interface AccountContextMetadata {
|
|
9
10
|
context_mode?: AccountContextMode;
|
|
10
11
|
context_group?: string;
|
|
12
|
+
continuity_mode?: AccountContinuityMode;
|
|
11
13
|
}
|
|
12
14
|
export interface AccountContextPolicy {
|
|
13
15
|
mode: AccountContextMode;
|
|
14
16
|
group?: string;
|
|
17
|
+
continuityMode?: AccountContinuityMode;
|
|
15
18
|
}
|
|
16
19
|
export interface CreateAccountContextInput {
|
|
17
20
|
shareContext: boolean;
|
|
18
21
|
contextGroup?: string;
|
|
22
|
+
deeperContinuity?: boolean;
|
|
19
23
|
}
|
|
20
24
|
export interface ResolvedCreateAccountContext {
|
|
21
25
|
policy: AccountContextPolicy;
|
|
@@ -23,6 +27,9 @@ export interface ResolvedCreateAccountContext {
|
|
|
23
27
|
}
|
|
24
28
|
export declare const DEFAULT_ACCOUNT_CONTEXT_MODE: AccountContextMode;
|
|
25
29
|
export declare const DEFAULT_ACCOUNT_CONTEXT_GROUP = "default";
|
|
30
|
+
export declare const DEFAULT_ACCOUNT_CONTINUITY_MODE: AccountContinuityMode;
|
|
31
|
+
export declare const MAX_CONTEXT_GROUP_LENGTH = 64;
|
|
32
|
+
export declare const ACCOUNT_PROFILE_NAME_PATTERN: RegExp;
|
|
26
33
|
/**
|
|
27
34
|
* Normalize context group names so paths and config stay consistent.
|
|
28
35
|
*/
|
|
@@ -31,6 +38,10 @@ export declare function normalizeContextGroupName(value: string): string;
|
|
|
31
38
|
* Validate context group naming constraints.
|
|
32
39
|
*/
|
|
33
40
|
export declare function isValidContextGroupName(value: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Validate account profile naming constraints.
|
|
43
|
+
*/
|
|
44
|
+
export declare function isValidAccountProfileName(value: string): boolean;
|
|
34
45
|
/**
|
|
35
46
|
* Runtime type guard for account context metadata payloads.
|
|
36
47
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-context.d.ts","sourceRoot":"","sources":["../../src/auth/account-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"account-context.d.ts","sourceRoot":"","sources":["../../src/auth/account-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,qBAAqB,CAAC;CAC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