@cavelon/cli 0.1.14 → 0.1.15
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.
|
@@ -70,7 +70,7 @@ export function confirmationRefused(error, sentId) {
|
|
|
70
70
|
`A confirmation lasts minutes and confirms one change once. \`${cavelonCommand("explain", CONFIRMATION_INVALID)}\` says more.`
|
|
71
71
|
: sentId
|
|
72
72
|
? `The instance asked again for a confirmation cavelon sent. \`${cavelonCommand("explain", CONFIRMATION_REQUIRED)}\` says more.`
|
|
73
|
-
: "The instance
|
|
73
|
+
: "The instance requires a confirmation bound to this exact change; cavelon asks the person first. The person runs the command in their own terminal with --confirm " +
|
|
74
74
|
"(or approves it in the MCP client's dialog), where cavelon asks the instance for the confirmation; or makes the change in the Admin. " +
|
|
75
75
|
`\`${cavelonCommand("explain", CONFIRMATION_REQUIRED)}\` says more.`;
|
|
76
76
|
return new CavelonError(ExitCode.needsAction, {
|
|
@@ -86,7 +86,8 @@ export function confirmationPointer(code) {
|
|
|
86
86
|
if (code !== CONFIRMATION_REQUIRED && code !== CONFIRMATION_INVALID)
|
|
87
87
|
return undefined;
|
|
88
88
|
return ("Only after the person approved the change does cavelon ask the instance for this confirmation: in their own terminal with " +
|
|
89
|
-
"--confirm, or in the MCP client's dialog when an agent confirms with the preview's token.
|
|
89
|
+
"--confirm, or in the MCP client's dialog when an agent confirms with the preview's token. The instance binds the id to the token, tenant and exact request; " +
|
|
90
|
+
"it does not verify the person's answer. Asking the person is cavelon's responsibility; never answer on their behalf. " +
|
|
90
91
|
(code === CONFIRMATION_INVALID
|
|
91
92
|
? "An expired, used or other change's confirmation needs a new preview and the person's yes again."
|
|
92
93
|
: "An older cavelon sends none: update it, or make the change in the Admin."));
|
package/dist/commands/api.js
CHANGED
|
@@ -331,8 +331,9 @@ async function previewUnlessConfirmed(ctx, input, doc, op, args, driven, command
|
|
|
331
331
|
lines.push("The confirm token is not this request's: the request changed since its preview, or the token is another one's.");
|
|
332
332
|
if (bare && driven.by === "agent")
|
|
333
333
|
lines.push("A coding agent cannot send it: the person sends it from their own terminal.");
|
|
334
|
-
if (op.confirmation)
|
|
335
|
-
lines.push(`The instance
|
|
334
|
+
if (op.confirmation) {
|
|
335
|
+
lines.push(`The instance requires a confirmation bound to this request (x-cavelon-confirmation)${op.confirmationWhen ? `: ${op.confirmationWhen}` : ""}`, "cavelon asks the person; the instance does not verify their answer.");
|
|
336
|
+
}
|
|
336
337
|
if (Object.keys(request.query).length)
|
|
337
338
|
lines.push(`Query: ${JSON.stringify(request.query)}`);
|
|
338
339
|
if (Object.keys(request.headers).length)
|
|
@@ -495,8 +496,8 @@ export const apiDescribe = {
|
|
|
495
496
|
if (secrets.length)
|
|
496
497
|
lines.push(`Secret values (x-cavelon-secret): ${secrets.join(", ")}. A person enters them; an agent leaves them out.`);
|
|
497
498
|
if (op.confirmation) {
|
|
498
|
-
lines.push(`
|
|
499
|
-
"confirmation once the person approved the call: in their own terminal, or in the MCP client's dialog.");
|
|
499
|
+
lines.push(`Bound confirmation required (x-cavelon-confirmation)${op.confirmationWhen ? `: ${op.confirmationWhen}` : "."} cavelon asks the instance for the ` +
|
|
500
|
+
"confirmation once the person approved the call: in their own terminal, or in the MCP client's dialog. The instance binds the id to the token, tenant and exact request; it does not verify the person's answer.");
|
|
500
501
|
}
|
|
501
502
|
if (data.description && data.description !== op.summary)
|
|
502
503
|
lines.push("", data.description);
|
package/dist/mcp.js
CHANGED
|
@@ -15,7 +15,7 @@ const INSTRUCTIONS = "Tools for one Cavelon instance, acting with the token a pe
|
|
|
15
15
|
"loop_start, sandbox_seed, artifacts_export) return operation ids at once; read them with operation_status, which returns " +
|
|
16
16
|
`the state at once, or waits up to its timeout (at most ${MCP_MAX_WAIT_MS / 1000} s) when given one, and reports waited_ms, ` +
|
|
17
17
|
"and follow a loop with loop_iterations. What needs confirmation: apply imports only with confirm set to a preview's id; " +
|
|
18
|
-
"tenant_create, variables_set where it replaces another value, loop_start, limits_set, models_set_limit, loop_cancel, sandbox_seed, " +
|
|
18
|
+
"tenant_create, variables_set where it replaces another value, variables_delete, loop_start, limits_set, models_set_limit, loop_cancel, sandbox_seed, " +
|
|
19
19
|
"trigger_identity, harness_default, activate of a solution a channel or trigger reaches or with make_default, deactivate, " +
|
|
20
20
|
"and api for an operation that is not read-only, " +
|
|
21
21
|
"return what they would do and a confirm_token, and change nothing until called again with the same arguments and " +
|
|
@@ -24,14 +24,16 @@ const INSTRUCTIONS = "Tools for one Cavelon instance, acting with the token a pe
|
|
|
24
24
|
"or that cannot be taken back, is the person's to confirm, and the token alone does not make it: its preview says " +
|
|
25
25
|
"needs_person. With needs_person \"client\", call again with the token and the client asks the person to approve exactly that " +
|
|
26
26
|
"change; their no, or no answer, changes nothing (confirm_declined). Only after their yes does cavelon ask the instance for " +
|
|
27
|
-
"the
|
|
27
|
+
"confirmation bound to the token, tenant and exact request. The instance does not verify the person's answer: asking them " +
|
|
28
|
+
"is the kit's responsibility alone. Ask before every guarded change; never answer on the person's behalf or reuse an earlier yes for another change. " +
|
|
29
|
+
"confirmation_required or confirmation_invalid changed nothing: preview again, never retry " +
|
|
28
30
|
"on your own. With needs_person \"terminal\" this client cannot ask " +
|
|
29
31
|
"them: give the person the preview's confirm command, which they run in their own terminal, never in yours. These are " +
|
|
30
32
|
"harness_default and activate (the default route and a solution something reaches: live traffic), deactivate, tenant_create, " +
|
|
31
|
-
"variables_set replacing a value (every solution of the tenant reads it), limits_set, models_set_limit, trigger_identity, " +
|
|
33
|
+
"variables_set replacing a value (every solution of the tenant reads it), variables_delete, limits_set, models_set_limit, trigger_identity, " +
|
|
32
34
|
"api for an operation that is not read-only, loop_start unless the trigger's solution is a draft (a run acts as the person " +
|
|
33
35
|
"and spends budget), and apply where its preview says show_to_person (tenant-wide sections, an active solution, deletions, " +
|
|
34
|
-
"env/prod). A draft's apply, a draft's loop_start, loop_cancel, sandbox_seed and kb_upload's replace you confirm with the " +
|
|
36
|
+
"env/prod, or database_queries.would_write). A draft's apply with no query writes or other person requirement, a draft's loop_start, loop_cancel, sandbox_seed and kb_upload's replace you confirm with the " +
|
|
35
37
|
"token once the person saw the preview. " +
|
|
36
38
|
"chat sends one message to a solution and returns its answer: the way to try one that is not the default route. " +
|
|
37
39
|
"kb_upload names files that match an active document of the knowledge base; with replace it replaces them, and where the " +
|
|
@@ -55,7 +57,7 @@ const INSTRUCTIONS = "Tools for one Cavelon instance, acting with the token a pe
|
|
|
55
57
|
"db_connections, db_queries and db_runs read database connections, saved queries and their runs. Connection commands " +
|
|
56
58
|
"and query-writing apply follow the permissions and needs_a_person the instance publishes: use whoami, including " +
|
|
57
59
|
"database_connectors.manage, instead of assuming every token is blocked. An authorized personal access token may " +
|
|
58
|
-
"manage definitions.
|
|
60
|
+
"manage definitions. Creating, changing or deleting a query, including imports that create or change one, needs the person's approval even on a draft; after approval cavelon sends the " +
|
|
59
61
|
"instance's confirmation for the exact change where required. Passwords, privilege acknowledgment and enabling writes " +
|
|
60
62
|
"stay with a person in the Admin; never accept or pass the database password or set allows_writes through a tool. " +
|
|
61
63
|
"variables_list/variables_get/variables_set handle plain-text {{var:…}} values; setting one needs a role that may manage " +
|
|
@@ -294,8 +294,8 @@ preview too.
|
|
|
294
294
|
## Show the person before confirming
|
|
295
295
|
|
|
296
296
|
Show every preview to the person. Confirm on your own only a preview that
|
|
297
|
-
needs no person: `apply` to a draft solution in a test environment (
|
|
298
|
-
|
|
297
|
+
needs no person: `apply` to a draft solution in a test environment (no query
|
|
298
|
+
writes or other reason to show it to a person), `loop start` of a trigger
|
|
299
299
|
of a draft solution, `loop cancel` and `sandbox seed` of a test run or Sandbox
|
|
300
300
|
you started, and `kb upload --replace`. Stop, show the preview, and wait for
|
|
301
301
|
the person when:
|
|
@@ -344,9 +344,19 @@ or active trigger reaches it and readiness explicitly publishes
|
|
|
344
344
|
null, the kit reads the matching list row; an unreadable list, missing row
|
|
345
345
|
or missing count keeps reach unknown and needs the person.
|
|
346
346
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
Asking the person is the kit's responsibility alone. Keep asking before every
|
|
348
|
+
guarded change; never answer on their behalf or reuse a previous yes for a
|
|
349
|
+
different change. This includes creating, changing or deleting a database
|
|
350
|
+
query and imports that create or change one, even on a draft.
|
|
351
|
+
|
|
352
|
+
Where the instance publishes `confirmations.enforced`, after the person's
|
|
353
|
+
yes `cavelon` asks it for an id bound to the token, tenant and exact request
|
|
354
|
+
(method, path and canonical body) and sends it along; you never handle it.
|
|
355
|
+
It is audited, usable once and lasts 10 minutes. The same personal access
|
|
356
|
+
token can issue it and send the change, so the instance cannot verify that
|
|
357
|
+
the person answered. After their yes, make the change directly: there is no
|
|
358
|
+
extra Admin approval step. Database passwords and **Allow write queries**
|
|
359
|
+
remain person-only, set in the Admin. `confirmation_required`
|
|
350
360
|
or `confirmation_invalid` (exit code 5) means the instance changed nothing:
|
|
351
361
|
show the person the preview again and let them confirm it (in the client's
|
|
352
362
|
dialog or their own terminal), never retry on your own.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cavelon/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
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",
|