@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 +36 -32
- package/README.md +40 -38
- package/dist/cli.js +260537 -284355
- package/dist/sdk/mcpServer.d.ts +1 -1
- package/dist/sdk/mcpServer.js +1 -1
- package/dist/sdk/query.js +2 -2
- package/dist/sdk/types.d.ts +5 -7
- package/dist/sdk/types.js +2 -4
- package/docs/ccl-duo-agent.md +1 -1
- package/docs/cli-installation.md +23 -22
- package/docs/error-recovery-usage.md +6 -4
- package/docs/gateway-quickstart.md +2 -2
- package/docs/gateway-vision-capabilities.md +38 -0
- package/docs/releases/1.5.1-alpha.5.md +35 -0
- package/docs/releases/1.5.1-alpha.6.md +24 -0
- package/docs/self-hosted-product-events.md +1 -1
- package/package.json +7 -5
- package/sdk/API.md +3 -3
- package/sdk/README.md +5 -7
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
|
-
|
|
12
|
-
#
|
|
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.
|
|
16
|
-
|
|
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 `
|
|
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`
|
|
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
|
-
|
|
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
|
-
###
|
|
89
|
+
### Interactive account login
|
|
88
90
|
|
|
89
91
|
```text
|
|
90
|
-
|
|
92
|
+
ccl
|
|
91
93
|
/login
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
|
|
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
|
-
###
|
|
100
|
+
### Messages API Key
|
|
97
101
|
|
|
98
102
|
```bash
|
|
99
103
|
export ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY>
|
|
100
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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`;
|
|
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
|
|
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
|
|
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
|
-
-
|
|
25
|
-
-
|
|
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
|
-
|
|
32
|
-
#
|
|
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.
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
|
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
|
-
|
|
|
75
|
-
|
|
|
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`
|
|
112
|
-
|
|
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
|
-
`
|
|
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
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
246
|
-
|
|
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
|
-
|
|
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
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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
|
|
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
|
-
| `
|
|
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 `
|
|
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
|
-
|
|
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.
|