@margay/ccl-core 1.5.1-alpha.4 → 1.5.1-alpha.6

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
@@ -7,13 +7,15 @@ from an npm package or source checkout. For the full feature map, see [README.md
7
7
  ## 1. Install
8
8
 
9
9
  ```bash
10
- npm install -g @margay/ccl-core
11
- margay --version
12
- # Prints the installed version; npm uses the published default tag.
10
+ npm install -g @margay/ccl-core@1.5.1-alpha.6
11
+ ccl --version
12
+ # Expected: 1.5.1-alpha.6 (CCL); the latest tag is unchanged.
13
13
  ```
14
14
 
15
- Starting with `1.4.5-rc.10`, the package registers both `ccl` and `margay` for the
16
- same CLI. The `1.4.5-rc.9` package registers only `margay`.
15
+ Starting with `1.5.1-alpha.6`, this package provides only `ccl`. Upgrade older
16
+ dual-entry CCL packages before installing the independent `@margay/cli`, which
17
+ will provide `margay` on the 1.8 cleanhouse line. Existing CCL scripts should use
18
+ `ccl`; old documentation using the former alias refers to that same CCL command.
17
19
  See [CLI installation and upgrades](docs/cli-installation.md) for local
18
20
  versus global installation and migration of older launchers.
19
21
 
@@ -27,7 +29,7 @@ node dist/cli.js --version
27
29
 
28
30
  ## Local analytics on the upgraded workstation
29
31
 
30
- Use `margay analytics status` to inspect collection and `margay analytics gate status` to inspect the analysis feature. Collection starts disabled and requires an authorized local website account to upload; installing this build does not change your login or connect production events. See [viewing events and controlling switches](docs/local-analytics-quickstart.md).
32
+ Use `ccl analytics status` to inspect collection and `ccl analytics gate status` to inspect the analysis feature. Collection starts disabled and requires an authorized local website account to upload; installing this build does not change your login or connect production events. See [viewing events and controlling switches](docs/local-analytics-quickstart.md).
31
33
 
32
34
  ## 2. Choose Authentication
33
35
 
@@ -53,7 +55,7 @@ Inside the interactive CLI, `/gateway login` or `/gateway register` without
53
55
  arguments opens the same website flow. `/gateway status` shows the saved
54
56
  account's verified membership and balance. `/gateway logout` signs out locally.
55
57
  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.
58
+ later; Esc cancels an in-progress TUI login. `/login` opens the same Margay website flow.
57
59
 
58
60
  Website credentials use the system credential store; `gateway.json` contains
59
61
  an account reference and metadata. Store access failure stops login without
@@ -66,7 +68,7 @@ saved session. To sign out from a shell, use `node dist/cli.js logout`.
66
68
  These existing TUI paths remain available:
67
69
 
68
70
  ```text
69
- margay
71
+ ccl
70
72
  /gateway login <GATEWAY_URL> <GATEWAY_TOKEN>
71
73
  /gateway register <GATEWAY_URL> <INVITE_CODE> [username] [email] [phone]
72
74
  /gateway register --invite <INVITE_CODE>
@@ -84,20 +86,22 @@ explicit environment override. See the
84
86
  [account and gateway guide](./docs/gateway-quickstart.md) for defaults,
85
87
  status meanings, storage prerequisites, and troubleshooting.
86
88
 
87
- ### Claude OAuth
89
+ ### Interactive account login
88
90
 
89
91
  ```text
90
- margay
92
+ ccl
91
93
  /login
92
94
  ```
93
95
 
94
- The first interactive launch can also guide you through OAuth login.
96
+ This signs in to your Margay website account. First-launch account setup uses
97
+ the same flow. `/login` does not obtain external-service credentials; existing credentials
98
+ may still be used by compatible channels, but are not created by this command.
95
99
 
96
- ### Anthropic API Key
100
+ ### Messages API Key
97
101
 
98
102
  ```bash
99
103
  export ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY>
100
- margay --model sonnet
104
+ ccl --model "<available-model-id>"
101
105
  ```
102
106
 
103
107
  Do not paste real keys into docs, shell history examples, bug reports, or shared
@@ -108,23 +112,23 @@ screenshots.
108
112
  Interactive:
109
113
 
110
114
  ```bash
111
- margay
112
- margay --model deepseek-v4-pro
113
- margay --cwd /path/to/project
115
+ ccl
116
+ ccl --model deepseek-v4-pro
117
+ ccl --cwd /path/to/project
114
118
  ```
115
119
 
116
120
  One-shot:
117
121
 
118
122
  ```bash
119
- margay -p "explain this error" < error.log
120
- margay -p "summarize the current repository" --max-turns 20
121
- margay -p "return JSON" --output-format json
123
+ ccl -p "explain this error" < error.log
124
+ ccl -p "summarize the current repository" --max-turns 20
125
+ ccl -p "return JSON" --output-format json
122
126
  ```
123
127
 
124
128
  Streaming automation:
125
129
 
126
130
  ```bash
127
- margay -p "run a compact audit" --output-format stream-json --verbose
131
+ ccl -p "run a compact audit" --output-format stream-json --verbose
128
132
  ```
129
133
 
130
134
  ## 4. Useful First Slash Commands
@@ -153,13 +157,13 @@ Run slash commands inside the interactive TUI.
153
157
  ## 5. Common CLI Options
154
158
 
155
159
  ```bash
156
- margay --help
157
- margay -p "task" --model sonnet --effort high
158
- margay -p "task" --allowedTools "Bash(git:*) Edit"
159
- margay -p "task" --disallowedTools "Bash(rm:*)"
160
- margay --bare -p "minimal startup task"
161
- margay --resume <SESSION_ID>
162
- margay --continue
160
+ ccl --help
161
+ ccl -p "task" --model "<available-model-id>" --effort high
162
+ ccl -p "task" --allowedTools "Bash(git:*) Edit"
163
+ ccl -p "task" --disallowedTools "Bash(rm:*)"
164
+ ccl --bare -p "minimal startup task"
165
+ ccl --resume <SESSION_ID>
166
+ ccl --continue
163
167
  ```
164
168
 
165
169
  Important safety options:
@@ -174,10 +178,10 @@ Important safety options:
174
178
  ## 6. Workflows
175
179
 
176
180
  ```bash
177
- margay workflow validate <name-or-path>
178
- margay workflow run <name-or-path> --json
179
- margay workflow run <name-or-path> --dry-run
180
- margay workflow generate "produce a release audit workflow"
181
+ ccl workflow validate <name-or-path>
182
+ ccl workflow run <name-or-path> --json
183
+ ccl workflow run <name-or-path> --dry-run
184
+ ccl workflow generate "produce a release audit workflow"
181
185
  ```
182
186
 
183
187
  Inside CCL:
@@ -221,7 +225,7 @@ headless mode, `needs_user` means user intervention is needed before continuing.
221
225
  | Symptom | Fix |
222
226
  |---|---|
223
227
  | 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` |
228
+ | No credentials found | Margay: `/login` or `/gateway login`; direct Messages API: `ANTHROPIC_API_KEY` |
225
229
  | 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
230
  | Output budget lower than configured | The observed gateway/model ceiling clamps output tokens; this is separate from account credit |
227
231
  | 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
@@ -18,23 +18,25 @@ The analytics commands support opt-in event upload, funnel/retention/path/experi
18
18
 
19
19
  ## Requirements
20
20
 
21
- - Node.js 20 or newer.
21
+ - Node.js 22.19.0 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
 
29
29
  ```bash
30
- npm install -g @margay/ccl-core
31
- margay --version
32
- # Prints the installed version; npm uses the published default tag.
30
+ npm install -g @margay/ccl-core@1.5.1-alpha.6
31
+ ccl --version
32
+ # Expected: 1.5.1-alpha.6 (CCL); the latest tag is unchanged.
33
33
  ```
34
34
 
35
- Starting with `1.4.5-rc.10`, the package registers both `ccl` and `margay` for the
36
- same CLI. The `1.4.5-rc.9` package registers only `margay`.
37
- For installation scope, dual-entry verification and old
35
+ Starting with `1.5.1-alpha.6`, this package provides only `ccl`. Upgrade older
36
+ dual-entry CCL packages before installing the independent `@margay/cli`, which
37
+ will provide `margay` on the 1.8 cleanhouse line. Existing CCL scripts should use
38
+ `ccl`; old documentation using the former alias refers to that same CCL command.
39
+ For installation scope, command ownership and old
38
40
  launcher migration, see [CLI installation and upgrades](docs/cli-installation.md).
39
41
 
40
42
  From a source checkout:
@@ -48,18 +50,18 @@ node dist/cli.js --version
48
50
  ## Start A Session
49
51
 
50
52
  ```bash
51
- margay
52
- margay "review the current git diff"
53
- margay --model deepseek-v4-pro
54
- margay --cwd /path/to/project
53
+ ccl
54
+ ccl "review the current git diff"
55
+ ccl --model deepseek-v4-pro
56
+ ccl --cwd /path/to/project
55
57
  ```
56
58
 
57
59
  Use `--print` for scripts and pipelines:
58
60
 
59
61
  ```bash
60
- margay -p "explain this stack trace" < error.log
61
- margay -p "return JSON only" --output-format json
62
- margay -p "stream events" --output-format stream-json --verbose
62
+ ccl -p "explain this stack trace" < error.log
63
+ ccl -p "return JSON only" --output-format json
64
+ ccl -p "stream events" --output-format stream-json --verbose
63
65
  ```
64
66
 
65
67
  ## Authentication
@@ -69,10 +71,10 @@ configuration.
69
71
 
70
72
  | Channel | Use For | Setup |
71
73
  |---|---|---|
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 |
74
+ | Margay website account | Shared Margay identity and gateway-routed models | `ccl login`, or `/login` / `/gateway login` in the TUI |
73
75
  | 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>` |
76
+ | Existing external-service OAuth credentials | Compatible external-service channels | Legacy credential compatibility; `/login` and first-launch onboarding use Margay website authorization |
77
+ | Messages API key | Direct API use | Set `ANTHROPIC_API_KEY=<key>` or pass `--api-key <key>` |
76
78
 
77
79
  The website-account implementation is available in this source checkout; real
78
80
  website authorization and commercial readiness remain unverified. No published
@@ -108,8 +110,8 @@ Run these inside an interactive CCL session:
108
110
  ```
109
111
 
110
112
  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
113
+ URL/token or URL/invite, they use the existing manual flow. `/login` opens
114
+ the same Margay website authorization flow. Website sign-out removes the local account; it does not revoke
113
115
  the website session or cancel a subscription. Explicit environment overrides
114
116
  remain effective until removed from the launching shell.
115
117
 
@@ -126,7 +128,7 @@ recovery, see [docs/gateway-quickstart.md](./docs/gateway-quickstart.md).
126
128
 
127
129
  ## CLI Surface
128
130
 
129
- `margay --help` is the exact runtime source for command-line behavior. The current
131
+ `ccl --help` is the exact runtime source for command-line behavior. The current
130
132
  top-level commands are:
131
133
 
132
134
  | Command | Purpose |
@@ -226,9 +228,9 @@ Copies isolate normal test output, not hostile same-user shell commands. See
226
228
 
227
229
  ## Models And Routing
228
230
 
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.
231
+ Use `/model` to inspect the models available in your current configuration.
232
+ Choose a model ID from that list for an explicit `--model` invocation. The
233
+ connected gateway determines its available model catalog.
232
234
 
233
235
  Useful controls:
234
236
 
@@ -242,8 +244,8 @@ Useful controls:
242
244
  For one-off runs:
243
245
 
244
246
  ```bash
245
- margay -p "summarize this diff" --model sonnet
246
- margay -p "generate a migration plan" --model deepseek-v4-pro --effort high
247
+ ccl -p "summarize this diff" --model "<available-model-id>"
248
+ ccl -p "generate a migration plan" --model "<available-model-id>" --effort high
247
249
  ```
248
250
 
249
251
  Capability pools use explicit `cost-first ranking` and `quality-first ranking`
@@ -253,7 +255,7 @@ Qwen 3.8 Flash → Grok 4.5 → K3 / Moonshot Platform. DeepSeek Vision remains
253
255
  experimental. The hidden K3 visual route is reported as canonical model
254
256
  `kimi-platform/kimi-k3`.
255
257
 
256
- Anthropic Messages remains the transport for the main Agent, planning, editing,
258
+ The Messages API remains the transport for the main Agent, planning, editing,
257
259
  tool calling, Advisor, Critic, and general subagent loops. Native OpenAI Chat
258
260
  Completions support is deliberately bounded to zero-tool, one-shot visual
259
261
  analysis and context compaction. These consumers select and pin one configured
@@ -266,11 +268,11 @@ The `workflow` command and `/workflows` slash command run multi-step task
266
268
  automation.
267
269
 
268
270
  ```bash
269
- margay workflow run <name-or-path>
270
- margay workflow run <name-or-path> --params '{"out":"report.md"}' --json
271
- margay workflow run <name-or-path> --dry-run
272
- margay workflow validate <name-or-path>
273
- margay workflow generate "create a regression audit workflow"
271
+ ccl workflow run <name-or-path>
272
+ ccl workflow run <name-or-path> --params '{"out":"report.md"}' --json
273
+ ccl workflow run <name-or-path> --dry-run
274
+ ccl workflow validate <name-or-path>
275
+ ccl workflow generate "create a regression audit workflow"
274
276
  ```
275
277
 
276
278
  Inside the TUI:
@@ -335,7 +337,7 @@ and the SDK distinction between recovery outcomes and pending tool approvals.
335
337
  |---|---|
336
338
  | `CCL_GATEWAY_URL`, `CCL_GATEWAY_KEY` | Margay gateway URL and credential; prefer `/gateway login` over manual export |
337
339
  | `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 |
340
+ | `ANTHROPIC_API_KEY`, `ANTHROPIC_BASE_URL` | Direct Messages API channel |
339
341
  | `CCL_MAX_OUTPUT_TOKENS` | Output budget; takes precedence over `CLAUDE_CODE_MAX_OUTPUT_TOKENS` and remains subject to model/gateway limits |
340
342
  | `CCL_MODEL` | Default model |
341
343
  | `CCL_ROUTING_PRIORITY` | Default routing preference, usually `cost` or `quality` |
@@ -369,12 +371,12 @@ Config locations:
369
371
 
370
372
  | Symptom | Check |
371
373
  |---|---|
372
- | `margay` cannot authenticate | Run `/doctor`, `/gateway doctor`, or `/login` |
374
+ | `ccl` cannot authenticate | Run `/doctor`, `/gateway doctor`, or `/login` |
373
375
  | Gateway status differs between shells | Check exported `CCL_GATEWAY_URL` and `CCL_GATEWAY_KEY` versus `~/.ccl/gateway.json` |
374
376
  | A model name fails | Run `/model` or query the gateway's model list |
375
377
  | `--print` runs too long | Set `--max-turns`, `--max-budget-usd`, or `CCL_PRINT_MAX_TURNS` |
376
378
  | Tool permission prompts block automation | Use `--allowedTools`, `--disallowedTools`, `--permission-mode`, or the SDK `canUseTool` callback |
377
- | MCP servers behave unexpectedly | Run `margay doctor` from a trusted directory and inspect `--mcp-config` inputs |
379
+ | MCP servers behave unexpectedly | Run `ccl doctor` from a trusted directory and inspect `--mcp-config` inputs |
378
380
 
379
381
  ## Source Of Truth
380
382
 
@@ -392,6 +394,6 @@ The current authoritative documentation set is:
392
394
 
393
395
  ### Project instructions
394
396
 
395
- Margay automatically loads `CCL.md`, `.ccl/CCL.md`, `CCL.local.md`, and `.ccl/rules/**/*.md`, respecting the existing scope, exclusions, and conditional rules. Project and local instructions are included by default.
397
+ CCL automatically loads `CCL.md`, `.ccl/CCL.md`, `CCL.local.md`, and `.ccl/rules/**/*.md`, respecting the existing scope, exclusions, and conditional rules. Project and local instructions are included by default.
396
398
 
397
399
  `CLAUDE.md`, `CLAUDE.local.md`, `.ccl/CLAUDE.md`, and `.claude/rules/` are not discovered automatically, even when no CCL file exists. To share a document deliberately, import it from `CCL.md` with `@CLAUDE.md`; normal import permissions still apply. Explicit file reads and existing conversation history remain available.