@cavelon/cli 0.1.5 → 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 +56 -18
- package/dist/command.js +10 -0
- package/dist/commands/api.js +40 -36
- package/dist/commands/chat.js +183 -0
- package/dist/commands/docs.js +77 -9
- package/dist/commands/fmt.js +61 -6
- package/dist/commands/index.js +3 -0
- package/dist/commands/init.js +61 -26
- package/dist/commands/inventory.js +21 -0
- package/dist/commands/limits-set.js +10 -6
- package/dist/commands/loops.js +22 -11
- package/dist/commands/models.js +11 -7
- package/dist/commands/sandboxes.js +11 -5
- package/dist/commands/schema.js +230 -48
- package/dist/commands/session.js +100 -14
- package/dist/commands/setup.js +22 -6
- package/dist/commands/solution.js +493 -86
- package/dist/commands/tenants.js +43 -10
- package/dist/commands/values.js +20 -11
- package/dist/commands/work.js +167 -33
- package/dist/confirm-token.js +72 -0
- package/dist/format.js +4 -4
- package/dist/harness-ref.js +17 -4
- package/dist/http.js +6 -0
- package/dist/kit-codes.js +11 -1
- package/dist/local-state.js +46 -10
- package/dist/main.js +38 -6
- package/dist/mcp.js +65 -14
- package/dist/openapi.js +30 -0
- package/dist/package-check.js +206 -18
- package/dist/package-files.js +98 -40
- package/dist/package-format.js +81 -8
- package/dist/package-references.js +77 -10
- package/dist/results.js +21 -1
- package/dist/session.js +9 -0
- package/dist/skills/cavelon-authoring/SKILL.md +54 -21
- package/dist/skills/cavelon-long-running/SKILL.md +13 -9
- package/dist/skills/cavelon-loop/SKILL.md +124 -28
- package/dist/skills/cavelon-testing/SKILL.md +69 -16
- package/dist/tenant-choice.js +19 -0
- package/dist/trace-view.js +172 -0
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -266,14 +266,19 @@ async function runCheck(ctx, input) {
|
|
|
266
266
|
const agents = setupAgents(env);
|
|
267
267
|
const named = namedAgents(input, agents);
|
|
268
268
|
const state = await loadState(env);
|
|
269
|
+
const strict = boolOption(input, "strict");
|
|
269
270
|
const checks = [];
|
|
270
271
|
for (const agent of named.length ? named : agents) {
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
const record = state.agents[agent.name];
|
|
273
|
+
const check = await checkAgent(agent, env, record);
|
|
274
|
+
if (!named.length && !check.found && !record)
|
|
275
|
+
continue;
|
|
276
|
+
const skipped = !named.length && !strict && !record && !check.ok;
|
|
277
|
+
checks.push(skipped ? { ...check, skipped: true } : check);
|
|
274
278
|
}
|
|
279
|
+
const counted = checks.filter((c) => !c.skipped);
|
|
275
280
|
const servers = [];
|
|
276
|
-
for (const server of
|
|
281
|
+
for (const server of counted.flatMap((c) => c.servers)) {
|
|
277
282
|
if (!servers.some((s) => JSON.stringify(s) === JSON.stringify(server)))
|
|
278
283
|
servers.push(server);
|
|
279
284
|
}
|
|
@@ -300,12 +305,18 @@ async function runCheck(ctx, input) {
|
|
|
300
305
|
loginCheck = { ok: false, instance: session.url, problem: `${err.message}${err.hint ? ` ${err.hint}` : ""}` };
|
|
301
306
|
}
|
|
302
307
|
}
|
|
303
|
-
const ok =
|
|
308
|
+
const ok = counted.length > 0 && counted.every((c) => c.ok) && probes.every((p) => p.ok) && loginCheck.ok;
|
|
304
309
|
const mark = (good) => (good ? ctx.style.green("ok ") : ctx.style.red("no "));
|
|
305
310
|
const lines = [];
|
|
306
311
|
if (!checks.length)
|
|
307
312
|
lines.push(`${mark(false)}No coding agent found, and setup has set up none.`);
|
|
313
|
+
else if (!counted.length)
|
|
314
|
+
lines.push(`${mark(false)}No coding agent is set up for Cavelon.`);
|
|
308
315
|
for (const check of checks) {
|
|
316
|
+
if (check.skipped) {
|
|
317
|
+
lines.push(`skip ${check.label}: found, not set up for Cavelon (${cavelonCommand("setup", "--agents", check.name)} sets it up)`);
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
309
320
|
lines.push(`${mark(check.ok)}${check.label}${check.found ? "" : " (not found on this computer)"}`);
|
|
310
321
|
for (const detail of check.details)
|
|
311
322
|
lines.push(` ${detail}`);
|
|
@@ -392,7 +403,9 @@ export const setup = {
|
|
|
392
403
|
"server in their user MCP configuration and the skills in their user skills folder. It touches nothing else in those files and\n" +
|
|
393
404
|
"records what it did, so --remove undoes exactly that. Then it logs in if needed, choosing the tenant by name as `login` does.\n" +
|
|
394
405
|
"The server starts as `cavelon mcp` when cavelon is installed, otherwise through npx. --check reports what is set up and\n" +
|
|
395
|
-
"working: each agent's entry, the MCP server starting, and the login.
|
|
406
|
+
"working: each agent's entry, the MCP server starting, and the login. An agent found but never set up for Cavelon is\n" +
|
|
407
|
+
"reported and skipped (exit 0 when the rest works); --strict, or naming it with --agents, counts it.\n" +
|
|
408
|
+
"Without a terminal it changes nothing unless --yes.",
|
|
396
409
|
readOnly: false,
|
|
397
410
|
destructive: true,
|
|
398
411
|
idempotent: true,
|
|
@@ -406,6 +419,7 @@ export const setup = {
|
|
|
406
419
|
},
|
|
407
420
|
yes: { type: "boolean", short: "y", description: "Make the changes without asking." },
|
|
408
421
|
check: { type: "boolean", description: "Report what is set up and working; change nothing." },
|
|
422
|
+
strict: { type: "boolean", description: "With --check: fail for every agent found that is not set up, not only the ones setup set up." },
|
|
409
423
|
remove: { type: "boolean", description: "Undo what setup did (your login stays)." },
|
|
410
424
|
},
|
|
411
425
|
examples: [
|
|
@@ -417,6 +431,8 @@ export const setup = {
|
|
|
417
431
|
async run(ctx, input) {
|
|
418
432
|
if (boolOption(input, "check") && boolOption(input, "remove"))
|
|
419
433
|
throw usageError("--check and --remove do not go together.");
|
|
434
|
+
if (boolOption(input, "strict") && !boolOption(input, "check"))
|
|
435
|
+
throw usageError("--strict goes with --check.");
|
|
420
436
|
if (boolOption(input, "check"))
|
|
421
437
|
return runCheck(ctx, input);
|
|
422
438
|
if (boolOption(input, "remove"))
|