@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.
Files changed (42) hide show
  1. package/README.md +56 -18
  2. package/dist/command.js +10 -0
  3. package/dist/commands/api.js +40 -36
  4. package/dist/commands/chat.js +183 -0
  5. package/dist/commands/docs.js +77 -9
  6. package/dist/commands/fmt.js +61 -6
  7. package/dist/commands/index.js +3 -0
  8. package/dist/commands/init.js +61 -26
  9. package/dist/commands/inventory.js +21 -0
  10. package/dist/commands/limits-set.js +10 -6
  11. package/dist/commands/loops.js +22 -11
  12. package/dist/commands/models.js +11 -7
  13. package/dist/commands/sandboxes.js +11 -5
  14. package/dist/commands/schema.js +230 -48
  15. package/dist/commands/session.js +100 -14
  16. package/dist/commands/setup.js +22 -6
  17. package/dist/commands/solution.js +493 -86
  18. package/dist/commands/tenants.js +43 -10
  19. package/dist/commands/values.js +20 -11
  20. package/dist/commands/work.js +167 -33
  21. package/dist/confirm-token.js +72 -0
  22. package/dist/format.js +4 -4
  23. package/dist/harness-ref.js +17 -4
  24. package/dist/http.js +6 -0
  25. package/dist/kit-codes.js +11 -1
  26. package/dist/local-state.js +46 -10
  27. package/dist/main.js +38 -6
  28. package/dist/mcp.js +65 -14
  29. package/dist/openapi.js +30 -0
  30. package/dist/package-check.js +206 -18
  31. package/dist/package-files.js +98 -40
  32. package/dist/package-format.js +81 -8
  33. package/dist/package-references.js +77 -10
  34. package/dist/results.js +21 -1
  35. package/dist/session.js +9 -0
  36. package/dist/skills/cavelon-authoring/SKILL.md +54 -21
  37. package/dist/skills/cavelon-long-running/SKILL.md +13 -9
  38. package/dist/skills/cavelon-loop/SKILL.md +124 -28
  39. package/dist/skills/cavelon-testing/SKILL.md +69 -16
  40. package/dist/tenant-choice.js +19 -0
  41. package/dist/trace-view.js +172 -0
  42. package/package.json +1 -1
@@ -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 check = await checkAgent(agent, env, state.agents[agent.name]);
272
- if (named.length || check.found || state.agents[agent.name])
273
- checks.push(check);
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 checks.flatMap((c) => c.servers)) {
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 = checks.length > 0 && checks.every((c) => c.ok) && probes.every((p) => p.ok) && loginCheck.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. Without a terminal it changes nothing unless --yes.",
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"))