@margay/ccl-core 1.5.1-alpha.3 → 1.5.1-alpha.5

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/QUICKSTART.md CHANGED
@@ -53,7 +53,7 @@ Inside the interactive CLI, `/gateway login` or `/gateway register` without
53
53
  arguments opens the same website flow. `/gateway status` shows the saved
54
54
  account's verified membership and balance. `/gateway logout` signs out locally.
55
55
  The first-launch account step supports Enter to sign in and S/Esc to set up
56
- later; Esc cancels an in-progress TUI login. `/login` remains Claude OAuth.
56
+ later; Esc cancels an in-progress TUI login. `/login` opens the same Margay website flow.
57
57
 
58
58
  Website credentials use the system credential store; `gateway.json` contains
59
59
  an account reference and metadata. Store access failure stops login without
@@ -84,20 +84,22 @@ explicit environment override. See the
84
84
  [account and gateway guide](./docs/gateway-quickstart.md) for defaults,
85
85
  status meanings, storage prerequisites, and troubleshooting.
86
86
 
87
- ### Claude OAuth
87
+ ### Interactive account login
88
88
 
89
89
  ```text
90
90
  margay
91
91
  /login
92
92
  ```
93
93
 
94
- The first interactive launch can also guide you through OAuth login.
94
+ This signs in to your Margay website account. First-launch account setup uses
95
+ the same flow. `/login` does not obtain external-service credentials; existing credentials
96
+ may still be used by compatible channels, but are not created by this command.
95
97
 
96
- ### Anthropic API Key
98
+ ### Messages API Key
97
99
 
98
100
  ```bash
99
101
  export ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY>
100
- margay --model sonnet
102
+ margay --model "<available-model-id>"
101
103
  ```
102
104
 
103
105
  Do not paste real keys into docs, shell history examples, bug reports, or shared
@@ -154,7 +156,7 @@ Run slash commands inside the interactive TUI.
154
156
 
155
157
  ```bash
156
158
  margay --help
157
- margay -p "task" --model sonnet --effort high
159
+ margay -p "task" --model "<available-model-id>" --effort high
158
160
  margay -p "task" --allowedTools "Bash(git:*) Edit"
159
161
  margay -p "task" --disallowedTools "Bash(rm:*)"
160
162
  margay --bare -p "minimal startup task"
@@ -221,7 +223,7 @@ headless mode, `needs_user` means user intervention is needed before continuing.
221
223
  | Symptom | Fix |
222
224
  |---|---|
223
225
  | Gateway login worked but a new shell uses the old gateway | Check and clear or update all four exported Gateway fields |
224
- | No credentials found | Margay: `/gateway login`; Claude: `/login` or `ANTHROPIC_API_KEY` |
226
+ | No credentials found | Margay: `/login` or `/gateway login`; direct Messages API: `ANTHROPIC_API_KEY` |
225
227
  | Persistent network, authentication, or account-credit failure | Follow the reported `blocked_external` reason; restore access or credit, then continue after checking prior tool results |
226
228
  | Output budget lower than configured | The observed gateway/model ceiling clamps output tokens; this is separate from account credit |
227
229
  | Model unavailable | Use `/model` to inspect configured options or check the gateway model list |
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  CCL is the `@margay/ccl-core` command-line agent runtime. It starts an
4
4
  interactive coding assistant by default, supports non-interactive scripting with
5
- `--print`, and can run either direct Claude channels or Margay gateway routed
5
+ `--print`, and can run either direct API channels or Margay gateway routed
6
6
  models from the same CLI surface.
7
7
 
8
8
  The package version is recorded in `package.json`. Check the installed runtime
@@ -21,8 +21,8 @@ The analytics commands support opt-in event upload, funnel/retention/path/experi
21
21
  - Node.js 20 or newer.
22
22
  - At least one authentication path:
23
23
  - Margay website account or gateway token for gateway-routed models.
24
- - Claude OAuth for subscription-backed Claude use.
25
- - Anthropic API key for direct API-key Claude use.
24
+ - Existing external-service OAuth credentials for compatible subscription-backed channels; `/login` signs in to Margay.
25
+ - API key for a compatible Messages API service.
26
26
 
27
27
  ## Install
28
28
 
@@ -69,10 +69,10 @@ configuration.
69
69
 
70
70
  | Channel | Use For | Setup |
71
71
  |---|---|---|
72
- | Margay website account (current checkout) | Shared Margay identity and gateway-routed models | Build this checkout, then `node dist/cli.js login`, or use `/gateway login` in the TUI |
72
+ | Margay website account | Shared Margay identity and gateway-routed models | `margay login`, or `/login` / `/gateway login` in the TUI |
73
73
  | Manual Margay gateway | Existing gateway tokens or invite codes | `/gateway login <url> <token>` or `/gateway register <url> <invite>` |
74
- | Claude OAuth | Claude subscription sessions | Run `margay` and follow the login prompt, or use `/login` |
75
- | Anthropic API key | Direct Anthropic API use | Set `ANTHROPIC_API_KEY=<key>` or pass `--api-key <key>` |
74
+ | Existing external-service OAuth credentials | Compatible external-service channels | Legacy credential compatibility; `/login` and first-launch onboarding use Margay website authorization |
75
+ | Messages API key | Direct API use | Set `ANTHROPIC_API_KEY=<key>` or pass `--api-key <key>` |
76
76
 
77
77
  The website-account implementation is available in this source checkout; real
78
78
  website authorization and commercial readiness remain unverified. No published
@@ -108,8 +108,8 @@ Run these inside an interactive CCL session:
108
108
  ```
109
109
 
110
110
  With no arguments, `login` and `register` open website authorization. With a
111
- URL/token or URL/invite, they use the existing manual flow. `/login` remains
112
- Claude OAuth. Website sign-out removes the local account; it does not revoke
111
+ URL/token or URL/invite, they use the existing manual flow. `/login` opens
112
+ the same Margay website authorization flow. Website sign-out removes the local account; it does not revoke
113
113
  the website session or cancel a subscription. Explicit environment overrides
114
114
  remain effective until removed from the launching shell.
115
115
 
@@ -226,9 +226,9 @@ Copies isolate normal test output, not hostile same-user shell commands. See
226
226
 
227
227
  ## Models And Routing
228
228
 
229
- CCL accepts model aliases such as `sonnet` or `opus` and gateway model names such
230
- as `deepseek-v4-pro` or `kimi-for-coding`. The actual available gateway models
231
- are determined by the connected gateway.
229
+ Use `/model` to inspect the models available in your current configuration.
230
+ Choose a model ID from that list for an explicit `--model` invocation. The
231
+ connected gateway determines its available model catalog.
232
232
 
233
233
  Useful controls:
234
234
 
@@ -242,8 +242,8 @@ Useful controls:
242
242
  For one-off runs:
243
243
 
244
244
  ```bash
245
- margay -p "summarize this diff" --model sonnet
246
- margay -p "generate a migration plan" --model deepseek-v4-pro --effort high
245
+ margay -p "summarize this diff" --model "<available-model-id>"
246
+ margay -p "generate a migration plan" --model "<available-model-id>" --effort high
247
247
  ```
248
248
 
249
249
  Capability pools use explicit `cost-first ranking` and `quality-first ranking`
@@ -253,7 +253,7 @@ Qwen 3.8 Flash → Grok 4.5 → K3 / Moonshot Platform. DeepSeek Vision remains
253
253
  experimental. The hidden K3 visual route is reported as canonical model
254
254
  `kimi-platform/kimi-k3`.
255
255
 
256
- Anthropic Messages remains the transport for the main Agent, planning, editing,
256
+ The Messages API remains the transport for the main Agent, planning, editing,
257
257
  tool calling, Advisor, Critic, and general subagent loops. Native OpenAI Chat
258
258
  Completions support is deliberately bounded to zero-tool, one-shot visual
259
259
  analysis and context compaction. These consumers select and pin one configured
@@ -335,7 +335,7 @@ and the SDK distinction between recovery outcomes and pending tool approvals.
335
335
  |---|---|
336
336
  | `CCL_GATEWAY_URL`, `CCL_GATEWAY_KEY` | Margay gateway URL and credential; prefer `/gateway login` over manual export |
337
337
  | `CCL_GATEWAY_CREDENTIAL_TYPE`, `CCL_GATEWAY_ISSUER` | Credential admission metadata; required as an atomic pair for opaque environment credentials |
338
- | `ANTHROPIC_API_KEY`, `ANTHROPIC_BASE_URL` | Direct Anthropic API-key channel |
338
+ | `ANTHROPIC_API_KEY`, `ANTHROPIC_BASE_URL` | Direct Messages API channel |
339
339
  | `CCL_MAX_OUTPUT_TOKENS` | Output budget; takes precedence over `CLAUDE_CODE_MAX_OUTPUT_TOKENS` and remains subject to model/gateway limits |
340
340
  | `CCL_MODEL` | Default model |
341
341
  | `CCL_ROUTING_PRIORITY` | Default routing preference, usually `cost` or `quality` |