@cavelon/cli 0.1.6 → 0.1.7
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/README.md +41 -13
- package/dist/command.js +10 -0
- package/dist/commands/chat.js +17 -11
- package/dist/commands/docs.js +15 -4
- package/dist/commands/fmt.js +56 -4
- package/dist/commands/init.js +35 -12
- package/dist/commands/limits-set.js +1 -0
- package/dist/commands/loops.js +7 -2
- package/dist/commands/models.js +2 -1
- package/dist/commands/sandboxes.js +3 -1
- package/dist/commands/schema.js +19 -5
- package/dist/commands/session.js +21 -3
- package/dist/commands/solution.js +202 -47
- package/dist/commands/tenants.js +6 -4
- package/dist/commands/values.js +3 -3
- package/dist/commands/work.js +59 -12
- package/dist/format.js +4 -4
- package/dist/harness-ref.js +4 -4
- package/dist/http.js +6 -0
- package/dist/kit-codes.js +6 -2
- package/dist/local-state.js +18 -0
- package/dist/main.js +2 -5
- package/dist/mcp.js +3 -1
- package/dist/package-check.js +33 -5
- package/dist/package-files.js +24 -2
- package/dist/session.js +9 -0
- package/dist/skills/cavelon-authoring/SKILL.md +7 -3
- package/dist/skills/cavelon-long-running/SKILL.md +13 -9
- package/dist/skills/cavelon-loop/SKILL.md +47 -15
- package/package.json +1 -1
|
@@ -14,7 +14,8 @@ use it when you parse the result.
|
|
|
14
14
|
## Before anything
|
|
15
15
|
|
|
16
16
|
- `cavelon status` says which instance, tenant and solution this folder is
|
|
17
|
-
bound to, the solution's state (draft
|
|
17
|
+
bound to, the solution's state (draft, active, or inactive after a
|
|
18
|
+
deactivate; whether it is ready to
|
|
18
19
|
activate, its latest test run), the last pull and the open previews.
|
|
19
20
|
`cavelon whoami` says who the token acts as, when it expires, whether it may
|
|
20
21
|
enter Platform mode and which tenants it reaches.
|
|
@@ -45,7 +46,14 @@ use it when you parse the result.
|
|
|
45
46
|
add `cavelon pull` after it. From your shell, `init --harness "<name>"`
|
|
46
47
|
creates a solution that does not exist yet as a draft; the MCP tool `init`
|
|
47
48
|
never creates one and names the `cavelon harness new <slug> --name "<name>"`
|
|
48
|
-
that does.
|
|
49
|
+
that does. A name close to an existing solution's is refused as a likely
|
|
50
|
+
typo (`solution_not_found`, naming the closest ones, creating nothing): ask
|
|
51
|
+
the person whether they meant that one, and only for a new solution run
|
|
52
|
+
`cavelon init ... --harness "<name>" --new`. Until a `cavelon.yaml` exists,
|
|
53
|
+
pass `--tenant` (and `--instance`) to every command, `harness new` and
|
|
54
|
+
`pull` included: without it a command acts in the tenant `cavelon use`
|
|
55
|
+
chose, which may be another one. The commands `cavelon` prints carry the
|
|
56
|
+
`--tenant` you gave; run them as printed. `apply` never creates a solution: when the one an env file names
|
|
49
57
|
is missing it stops with `solution_not_found` and names that command. To start from a package file (a blueprint, an
|
|
50
58
|
export from another instance), run
|
|
51
59
|
`cavelon init --instance <url> --tenant <tenant> --from <file>` instead of
|
|
@@ -67,8 +75,13 @@ use it when you parse the result.
|
|
|
67
75
|
commit. `git diff` then shows what someone changed in the Admin. A test
|
|
68
76
|
suite goes back to the file it came from, whatever its name. A solution's
|
|
69
77
|
pull leaves the tenant-wide sections (the tenant's settings, its model
|
|
70
|
-
list) out of the folder
|
|
71
|
-
|
|
78
|
+
list) out of the folder, and `apply` leaves them out of the solution's
|
|
79
|
+
import. `pull --tenant-wide` writes them; `apply --tenant-wide` imports
|
|
80
|
+
them, for every solution of the tenant, so only with the person's say-so.
|
|
81
|
+
`validate` warns about a tenant-wide file in the folder
|
|
82
|
+
(`tenant_wide_section`); on an instance that does not publish
|
|
83
|
+
`include_tenant_wide`, `apply` imports such a file anyway and says so:
|
|
84
|
+
remove it unless the person wants it.
|
|
72
85
|
2. **Edit** the files in `package/` (one file per schema section) and `tests/`
|
|
73
86
|
(one file per test suite). See the cavelon-authoring skill.
|
|
74
87
|
3. **Validate** offline: `cavelon validate`. Fix every error; `cavelon explain
|
|
@@ -83,7 +96,9 @@ use it when you parse the result.
|
|
|
83
96
|
names a check it could not make (offline, no list). After writing files by
|
|
84
97
|
hand, run `cavelon fmt`: it fills in the defaults the export writes and
|
|
85
98
|
numbers test cases in their written order, so the first `pull` after the
|
|
86
|
-
apply rewrites only what changed on the instance.
|
|
99
|
+
apply rewrites only what changed on the instance. It drops comments, as
|
|
100
|
+
pull does, and names each file whose comments it drops (`cavelon fmt
|
|
101
|
+
--check` says so first): keep notes the person needs elsewhere.
|
|
87
102
|
4. **Preview**: `cavelon apply --env test` (or `--harness <name or slug>`). Nothing is
|
|
88
103
|
imported yet. Read the preview: what is created, updated or deleted, which
|
|
89
104
|
active solutions it reaches, what the target still needs (variables and
|
|
@@ -93,12 +108,16 @@ use it when you parse the result.
|
|
|
93
108
|
old → new`) and the fields it does not apply ("not applied", with the
|
|
94
109
|
command that sets each). A blocked preview names each blocker with its
|
|
95
110
|
code, package file and path, and hint; `cavelon explain <code>` says more.
|
|
111
|
+
A preview that changes nothing says "Nothing to import" and stores no
|
|
112
|
+
preview: there is nothing to confirm.
|
|
96
113
|
5. **Confirm** exactly that preview: `cavelon apply --confirm <preview-id>`
|
|
97
114
|
(the line `apply` printed, with the same `--env` and `--tenant`). Exit 4
|
|
98
115
|
means the preview is stale and nothing was imported: the target changed on
|
|
99
|
-
the instance (`import_preview_stale
|
|
100
|
-
(`preview_files_changed`, naming them),
|
|
101
|
-
old (`preview_expired`)
|
|
116
|
+
the instance (`import_preview_stale`; a recent instance names what changed), the package files changed since
|
|
117
|
+
(`preview_files_changed`, naming them), the preview is more than a day
|
|
118
|
+
old (`preview_expired`), another preview was imported after it
|
|
119
|
+
(`preview_superseded`), it was imported already (`preview_applied`), or it
|
|
120
|
+
was discarded (`preview_discarded`). Preview again, show the new preview when the rules
|
|
102
121
|
below say so, and confirm the new id. Use `--allow-stale` only when the
|
|
103
122
|
person wants exactly the old preview imported. When the error lists
|
|
104
123
|
`blockers`, the import's own check found them as it applied: fix what each
|
|
@@ -125,6 +144,12 @@ use it when you parse the result.
|
|
|
125
144
|
document is replaced once the new file is verified; where it cannot,
|
|
126
145
|
`--replace` shows the documents it would deactivate after the upload and
|
|
127
146
|
needs `--confirm`: show the person that first.
|
|
147
|
+
- A file whose content is already an active document is not uploaded
|
|
148
|
+
again: "identical to the active document …; nothing new was created
|
|
149
|
+
(deduplicated)", with nothing to wait for and nothing replaced. Where the
|
|
150
|
+
instance publishes its documents' file hashes, `--dry-run` says it first
|
|
151
|
+
("nothing new would be created"; `--json`: `identical`, and
|
|
152
|
+
`content_compared` false where it cannot tell).
|
|
128
153
|
A test Sandbox gets its files with `cavelon sandbox seed <sandbox> <folder>`
|
|
129
154
|
(isolated container) or `cavelon sandbox refresh <sandbox>` after the files
|
|
130
155
|
were put on the VM (customer VM).
|
|
@@ -159,9 +184,12 @@ says when the solution it activated is not the default.
|
|
|
159
184
|
conversation to trace. A draft answers only a person's token, as a
|
|
160
185
|
Playground run.
|
|
161
186
|
- `cavelon deactivate --harness <solution>` takes an active solution out of
|
|
162
|
-
live traffic: it previews, and only
|
|
163
|
-
|
|
164
|
-
|
|
187
|
+
live traffic: it previews, and only the confirm command it prints
|
|
188
|
+
deactivates. Its status becomes `inactive`, not `draft`: it keeps its
|
|
189
|
+
configuration, answers no live traffic, and `cavelon activate` puts it back
|
|
190
|
+
through its readiness gate. It is the person's decision, like the default
|
|
191
|
+
route; the default route itself is refused until another solution is the
|
|
192
|
+
default.
|
|
165
193
|
|
|
166
194
|
## Show the person before confirming
|
|
167
195
|
|
|
@@ -172,6 +200,9 @@ show the preview to the person, and confirm only after they agree, when:
|
|
|
172
200
|
solution is active;
|
|
173
201
|
- the environment is `prod` (`--env prod`), or the preview deletes anything
|
|
174
202
|
(`--mode replace`);
|
|
203
|
+
- the preview changes tenant-wide sections (`tenant-wide: … change for every
|
|
204
|
+
solution of the tenant`, after `--tenant-wide` or on an instance that
|
|
205
|
+
imports them anyway): every solution of the tenant sees the change;
|
|
175
206
|
- the preview lists target needs (secrets, grants, identities): only a person
|
|
176
207
|
can provide them, with `cavelon secrets set <name>` or in the Admin.
|
|
177
208
|
|
|
@@ -200,11 +231,12 @@ closest one named.
|
|
|
200
231
|
**From your shell, `--confirm` takes the same token.** Run by a coding agent,
|
|
201
232
|
`limits set`, `models set-limit`, `loop cancel`, `sandbox seed`,
|
|
202
233
|
`trigger identity`, `harness default`, `activate --make-default`,
|
|
203
|
-
`kb upload --replace`, `variables delete` and `secrets delete`
|
|
204
|
-
preview with a confirm token and the command that confirms it
|
|
234
|
+
`deactivate`, `kb upload --replace`, `variables delete` and `secrets delete`
|
|
235
|
+
print their preview with a confirm token and the command that confirms it
|
|
205
236
|
(`… --confirm <token>`). Show the preview, then run exactly that command. A
|
|
206
|
-
bare `--confirm
|
|
207
|
-
4 with the new
|
|
237
|
+
bare `--confirm`, as the docs show it for a person's terminal, changes nothing
|
|
238
|
+
from your shell and exits 5; a token of another change exits 4 with the new
|
|
239
|
+
preview.
|
|
208
240
|
|
|
209
241
|
**`cavelon api` from your shell has the guards of the MCP `api` tool**, since
|
|
210
242
|
`cavelon` sees that a coding agent runs it (`CLAUDECODE`, `CODEX_THREAD_ID`, `CODEX_SANDBOX`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cavelon/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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",
|