@cavelon/cli 0.2.0 → 0.2.2
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/dist/api-approval-policy.js +43 -0
- package/dist/automation-policy.js +45 -0
- package/dist/command.js +1 -0
- package/dist/commands/api.js +27 -13
- package/dist/commands/index.js +4 -1
- package/dist/commands/init.js +29 -21
- package/dist/commands/inventory.js +2 -3
- package/dist/commands/loops.js +9 -6
- package/dist/commands/solution.js +23 -9
- package/dist/confirm-token.js +8 -5
- package/dist/context.js +28 -1
- package/dist/database-queries.js +2 -3
- package/dist/file-boundary.js +54 -0
- package/dist/local-state.js +29 -14
- package/dist/main.js +1 -0
- package/dist/mcp-directory.js +3 -3
- package/dist/mcp.js +22 -30
- package/dist/native-assets/kilo-server.mjs +5 -0
- package/dist/native-assets/kilo-tui.mjs +5 -0
- package/dist/native-assets/manifest.json +13 -13
- package/dist/native-assets/omp-extension.mjs +5 -0
- package/dist/native-assets/opencode-server.mjs +5 -0
- package/dist/native-assets/opencode-tui.mjs +5 -0
- package/dist/native-assets/pi-extension.mjs +5 -0
- package/dist/package-files.js +5 -9
- package/dist/paths.js +7 -24
- package/dist/project.js +8 -5
- package/dist/session.js +4 -2
- package/dist/skills/cavelon-authoring/SKILL.md +6 -4
- package/dist/skills/cavelon-long-running/SKILL.md +11 -4
- package/dist/skills/cavelon-loop/SKILL.md +54 -29
- package/dist/skills/cavelon-testing/SKILL.md +3 -1
- package/package.json +1 -1
|
@@ -66,12 +66,19 @@ cavelon wait <operation-id> --timeout 90s # exit 0 done, 1 failed, 5
|
|
|
66
66
|
|
|
67
67
|
A loop started from `cavelon` runs **as the person whose token it is**, checked
|
|
68
68
|
again on every iteration, and spends the tenant's budget. So `loop start`
|
|
69
|
-
previews first and starts nothing without `--confirm`. For a trigger of a
|
|
69
|
+
previews first and normally starts nothing without `--confirm`. For a trigger of a
|
|
70
70
|
draft solution, run the confirm command it prints (from your shell it carries
|
|
71
71
|
the preview's token; over MCP call `loop_start` again with `confirm` set to its
|
|
72
72
|
`confirm_token`). Any other run needs the person's yes (`needs_person` in the
|
|
73
73
|
preview): over MCP the client asks them when you confirm with the token; from
|
|
74
|
-
your shell the preview names the command they run in their own terminal.
|
|
74
|
+
your shell the preview names the command they run in their own terminal.
|
|
75
|
+
Do not ask for a separate chat approval before the native dialog. Reading and
|
|
76
|
+
confirming a routine draft preview within the requested work needs no extra
|
|
77
|
+
question. Explicit `--yolo` can combine preview and start for a trigger of the
|
|
78
|
+
selected draft solution within the process's original scope. It follows the
|
|
79
|
+
cavelon-loop skill's critical-change rules and grants no extra budget or
|
|
80
|
+
standing authority.
|
|
81
|
+
If `loop start` exits 8 (a timeout, a cut
|
|
75
82
|
connection), the run may have started: retry only with the
|
|
76
83
|
`--idempotency-key <key>` its error names, never without it, or a second run
|
|
77
84
|
starts and spends the budget again. `cavelon trace <operation-id>` reads the
|
|
@@ -130,8 +137,8 @@ Two reasons end work for capacity; each has its code in `cavelon explain`:
|
|
|
130
137
|
`max_concurrent_requests` and no slot freed within
|
|
131
138
|
`model_endpoint_slot_wait_seconds`. Retry later, or, if the endpoint can serve
|
|
132
139
|
more, propose raising the Model Registry row's `max_concurrent_requests`
|
|
133
|
-
(`cavelon models list` shows it).
|
|
134
|
-
|
|
140
|
+
(`cavelon models list` shows it). Preview `cavelon models set-limit
|
|
141
|
+
<model_id> <n>` for the person's decision: over MCP the client asks the person
|
|
135
142
|
when you confirm with the token; from your shell the person runs the confirm
|
|
136
143
|
command it prints in their own terminal.
|
|
137
144
|
|
|
@@ -86,7 +86,8 @@ use it when you parse the result.
|
|
|
86
86
|
chose, which may be another one. The commands `cavelon` prints carry the
|
|
87
87
|
`--tenant` (and `--env`) you gave, confirm lines included; run them as printed.
|
|
88
88
|
Every preview names where it acts (`acts on:`, `target` in `--json`): the
|
|
89
|
-
instance, the tenant and the mode;
|
|
89
|
+
instance, the tenant and the mode; check it against the requested work.
|
|
90
|
+
Include it whenever a change needs personal approval.
|
|
90
91
|
Over MCP, `use_tenant` chooses the tenant for this session only and never
|
|
91
92
|
changes the person's stored tenant. A tenant API key in `CAVELON_TOKEN` acts
|
|
92
93
|
only in its own tenant: a command that names another is refused with
|
|
@@ -275,11 +276,12 @@ successful activation's `took_default_route` and corresponding from/name
|
|
|
275
276
|
fields report the actual effect, which may differ. `status` shows the
|
|
276
277
|
preview too.
|
|
277
278
|
|
|
278
|
-
-
|
|
279
|
-
|
|
280
|
-
-
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
- Make the solution the default only when the user's request calls for it.
|
|
280
|
+
If the intended routing is unclear, ask; it changes live traffic.
|
|
281
|
+
- `cavelon activate --make-default` (or `cavelon harness default <solution>`)
|
|
282
|
+
previews the change, naming the current default. For a requested route
|
|
283
|
+
change, proceed directly to its approval step without another chat yes.
|
|
284
|
+
You cannot approve it yourself: over MCP the client asks the person when you
|
|
283
285
|
call the tool with the preview's token; from your shell the person runs the
|
|
284
286
|
confirm command it printed in their own terminal. `harness default` refuses a draft
|
|
285
287
|
(`solution_not_active`, exit 4): only an active solution can be the
|
|
@@ -299,14 +301,18 @@ preview too.
|
|
|
299
301
|
route; the default route itself is refused until another solution is the
|
|
300
302
|
default.
|
|
301
303
|
|
|
302
|
-
##
|
|
304
|
+
## Confirm routine work; ask once for critical changes
|
|
303
305
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
+
A technical preview is not a request for a chat approval. Within the user's
|
|
307
|
+
requested work, read and confirm a preview that needs no person without
|
|
308
|
+
asking them again or showing every intermediate preview. For `apply`, check
|
|
309
|
+
`show_to_person: false` and no `needs_person` requirement. This includes
|
|
310
|
+
`apply` to a draft solution in a test environment (no query
|
|
306
311
|
writes or other reason to show it to a person), `loop start` of a trigger
|
|
307
312
|
of a draft solution, `loop cancel` and `sandbox seed` of a test run or Sandbox
|
|
308
|
-
you started,
|
|
309
|
-
the person
|
|
313
|
+
you started, `kb upload --replace`, and known routine `api` operations.
|
|
314
|
+
Summarize the outcome with the work. A preview needs the person's decision
|
|
315
|
+
when:
|
|
310
316
|
|
|
311
317
|
- the preview lists an active solution under "reaches active", or the target
|
|
312
318
|
solution is active;
|
|
@@ -331,14 +337,15 @@ budget), `limits set`, `models set-limit`, `trigger identity` (standing
|
|
|
331
337
|
authority for a trigger), `harness default`, `activate --make-default`,
|
|
332
338
|
`activate` of a solution its preview says a channel or trigger reaches,
|
|
333
339
|
whose activation takes the default route, or whose reach or route effect is unknown,
|
|
334
|
-
`deactivate` (they move live traffic), and `api`
|
|
335
|
-
|
|
340
|
+
`deactivate` (they move live traffic), and `api` outside its known routine
|
|
341
|
+
operations, `cavelon` does not take your confirm as theirs. Their preview
|
|
336
342
|
says how in `needs_person`:
|
|
337
343
|
|
|
338
|
-
- `"client"` (over MCP, where your client can ask the person):
|
|
339
|
-
|
|
340
|
-
to its token (for `apply`, the preview id). The client
|
|
341
|
-
to approve exactly that change
|
|
344
|
+
- `"client"` (over MCP, where your client can ask the person): call the tool
|
|
345
|
+
again with the same arguments and `confirm` set
|
|
346
|
+
to its token (for `apply`, the preview id). The client presents the preview
|
|
347
|
+
and asks the person to approve exactly that change. Do not first ask for a
|
|
348
|
+
separate chat yes. Nothing changes without their answer. A no,
|
|
342
349
|
or no answer within 10 minutes, returns `confirm_declined` (exit code 5):
|
|
343
350
|
ask the person what they want instead of trying again.
|
|
344
351
|
- `"terminal"` (your shell, or a client that cannot ask): the preview's
|
|
@@ -352,9 +359,9 @@ or active trigger reaches it and readiness explicitly publishes
|
|
|
352
359
|
null, the kit reads the matching list row; an unreadable list, missing row
|
|
353
360
|
or missing count keeps reach unknown and needs the person.
|
|
354
361
|
|
|
355
|
-
Asking the person is the kit's responsibility alone.
|
|
356
|
-
|
|
357
|
-
different change. This includes creating, changing or deleting a database
|
|
362
|
+
Asking the person is the kit's responsibility alone. Use one personal approval
|
|
363
|
+
for each critical change; never answer on their behalf or reuse a previous
|
|
364
|
+
yes for a different change. This includes creating, changing or deleting a database
|
|
358
365
|
query and imports that create or change one, even on a draft.
|
|
359
366
|
|
|
360
367
|
Where the instance publishes `confirmations.enforced`, after the person's
|
|
@@ -369,6 +376,23 @@ or `confirmation_invalid` (exit code 5) means the instance changed nothing:
|
|
|
369
376
|
show the person the preview again and let them confirm it (in the client's
|
|
370
377
|
dialog or their own terminal), never retry on your own.
|
|
371
378
|
|
|
379
|
+
**YOLO is explicitly enabled by the person.** A CLI invocation may start with
|
|
380
|
+
`cavelon --yolo …`, or an MCP process with `cavelon mcp --yolo`. Eligible
|
|
381
|
+
routine work then previews and executes internally; do not add a question
|
|
382
|
+
of your own. It is not a tool argument or repository setting, and you must
|
|
383
|
+
not enable it to work around a refusal. Its allowance is bound to the
|
|
384
|
+
process's original instance, resolved tenant, credential, local solution
|
|
385
|
+
folder, selected solution, environment and bindings. A different MCP target
|
|
386
|
+
uses normal policy; returning to the original scope may use its allowance
|
|
387
|
+
again. Eligible work includes ordinary draft imports, known routine API
|
|
388
|
+
operations and starting a trigger of the selected draft solution. Existing
|
|
389
|
+
tenant budgets still apply. Critical changes still ask once. Saved database queries, live or shared changes,
|
|
390
|
+
production and deleting imports stay critical. YOLO does not automatically
|
|
391
|
+
confirm Sandbox replacement, document replacement, run cancellation or
|
|
392
|
+
connection deletion. Permissions, secret handling, person-only operations,
|
|
393
|
+
server request binding and end-user database write consent remain unchanged.
|
|
394
|
+
Your host's own shell/tool approvals are separate.
|
|
395
|
+
|
|
372
396
|
**Over MCP, confirm with the preview's token.** `api`, `tenant_create`,
|
|
373
397
|
`variables_set` where it replaces a value, `loop_start`, `limits_set`,
|
|
374
398
|
`models_set_limit`, `loop_cancel`, `sandbox_seed`, `trigger_identity`,
|
|
@@ -376,12 +400,12 @@ dialog or their own terminal), never retry on your own.
|
|
|
376
400
|
trigger reaches, whose activation takes the default route or whose reach or
|
|
377
401
|
route effect is unknown, or with `make_default`, and
|
|
378
402
|
`kb_upload` where it would deactivate documents return a `confirm_token` with
|
|
379
|
-
their preview.
|
|
403
|
+
their preview. Read
|
|
380
404
|
the preview, then call the tool again with the same arguments and `confirm`
|
|
381
405
|
set to that token; it makes exactly the change shown, after the person's yes
|
|
382
406
|
where the preview says `needs_person`. `confirm: true` is
|
|
383
407
|
refused (`confirm_token_required`), and a token of another change returns the
|
|
384
|
-
new preview with `token_mismatch` (exit code 4):
|
|
408
|
+
new preview with `token_mismatch` (exit code 4): review that one instead. Tool
|
|
385
409
|
arguments are spelled in snake_case (`make_default`, `keep_both`, `dry_run`);
|
|
386
410
|
an argument a tool does not list is refused (`unknown_argument`) with the
|
|
387
411
|
closest one named. Over MCP the next steps a tool returns (hints, `next`,
|
|
@@ -392,8 +416,9 @@ make the call as written, filling a value in angle brackets (a
|
|
|
392
416
|
**From your shell, `--confirm` takes the same token, where you may confirm.**
|
|
393
417
|
Run by a coding agent, `loop start` of a draft's trigger, `loop cancel`,
|
|
394
418
|
`sandbox seed` and `kb upload --replace` print their preview with a confirm
|
|
395
|
-
token and the command that confirms it (`… --confirm <token>`).
|
|
396
|
-
preview, then run exactly that command
|
|
419
|
+
token and the command that confirms it (`… --confirm <token>`). Read the
|
|
420
|
+
preview, then run exactly that command within the authorized work. Changes
|
|
421
|
+
that need the person's yes
|
|
397
422
|
print no token and name the command the person runs in their own terminal. A
|
|
398
423
|
bare `--confirm`, as the docs show it for a person's terminal, changes nothing
|
|
399
424
|
from your shell and exits 5; a token of another change exits 4 with the new
|
|
@@ -404,11 +429,11 @@ preview. A line printed before its preview exists ends in
|
|
|
404
429
|
**`cavelon api` from your shell has the guards of the MCP `api` tool**, since
|
|
405
430
|
`cavelon` sees that a coding agent runs it:
|
|
406
431
|
|
|
407
|
-
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
token (`confirm_needs_person`). Over MCP
|
|
411
|
-
person's
|
|
432
|
+
- Known routine mutations print a preview and token you may confirm within
|
|
433
|
+
the requested work without a separate chat approval. Critical or unknown
|
|
434
|
+
mutations instead name the person's own-terminal command; you cannot send
|
|
435
|
+
those yourself with a token (`confirm_needs_person`). Over MCP they require
|
|
436
|
+
the person's answer in the native dialog.
|
|
412
437
|
- It refuses an operation the instance keeps for a person
|
|
413
438
|
(`operation_for_a_person`) and a body that sets a field the instance marks as
|
|
414
439
|
a secret value (`secret_field_for_a_person`), with or without `--confirm`,
|
|
@@ -312,7 +312,9 @@ the body does the same, but needs the id and a confirm. `cavelon deactivate
|
|
|
312
312
|
--harness <solution>` takes an active solution out of live traffic again; it
|
|
313
313
|
previews first and is the person's decision: show the preview; over MCP the
|
|
314
314
|
client asks them when you confirm with its token, and from your shell they run
|
|
315
|
-
the confirm command in their own terminal.
|
|
315
|
+
the confirm command in their own terminal. Do not add a separate chat approval
|
|
316
|
+
before that native dialog; an explicitly enabled YOLO mode still asks for this
|
|
317
|
+
critical change. When every suite passes,
|
|
316
318
|
`cavelon activate --harness <name or slug>` goes through the readiness gate; if the
|
|
317
319
|
token may not activate, a person activates in the Admin. A solution that a
|
|
318
320
|
channel or an active trigger reaches goes live for them at once, so its
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cavelon/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "The cavelon binary: CLI and local MCP server for building Cavelon solutions with a coding agent.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/goodguys-gmbh/cavelon-dev-kit",
|