@mutagent/cli 0.2.22 → 0.2.24

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 (2) hide show
  1. package/dist/bin/cli.js +38 -24
  2. package/package.json +2 -2
package/dist/bin/cli.js CHANGED
@@ -19762,15 +19762,18 @@ var LEAVES = {
19762
19762
  get: {
19763
19763
  details: `Reads a revision's agentspec, parsed: id, kind, version, description,
19764
19764
  criteria, tools, skills, harnesses, targets and instructions. Without --revision:
19765
- the default slot's active revision, else the newest. A revision whose spec cannot
19766
- be read answers status unreadable with the reason (exit 0: it is data).
19765
+ the default slot's active revision, else the newest. A revision with no
19766
+ agentspec answers status absent (agent.md defines the agent; the spec is
19767
+ optional). A revision whose spec cannot be read answers status unreadable with
19768
+ the reason. Both exit 0: they are data.
19767
19769
  --out writes the revision's raw agentspec.yaml bytes to a file; replacing an
19768
19770
  existing file needs --force.
19769
19771
  Examples:
19770
19772
  mutagent agent spec get invoice-pricing --json
19771
19773
  mutagent agent spec get invoice-pricing --out agentspec.yaml --force`,
19772
- directive: ` Read-only on the platform. --json prints { slug, status, revision, path, spec } or,
19773
- when unreadable, { status: "unreadable", reason }. With --out, 'written' names the file
19774
+ directive: ` Read-only on the platform. --json prints { slug, status, revision, path, spec };
19775
+ { status: "absent", path: null } when the revision has no agentspec (not an error);
19776
+ or { status: "unreadable", reason } when one is there but fails to read. With --out, 'written' names the file
19774
19777
  and its digest. Replacing a file is destructive: confirm with the user before --force.`
19775
19778
  },
19776
19779
  diff: {
@@ -19826,29 +19829,40 @@ function parseRevision(value) {
19826
19829
  usageError("--revision must be a revision such as v3 or 3.", "spec get");
19827
19830
  return number;
19828
19831
  }
19829
- function printCard(result) {
19832
+ function specCardLines(result) {
19830
19833
  const where = `${String(result.slug)} v${String(result.revision)} ${typeof result.path === "string" ? result.path : "(no agentspec)"}`;
19834
+ if (result.status === "absent") {
19835
+ return [
19836
+ `${chalk2.bold(where)} ${chalk2.dim("no spec")}`,
19837
+ chalk2.dim(" agent.md defines this agent, so an agentspec is optional.")
19838
+ ];
19839
+ }
19831
19840
  if (result.status !== "readable") {
19832
- console.log(`${chalk2.bold(where)} ${chalk2.yellow("unreadable")}`);
19833
- console.log(` ${String(result.reason)}`);
19834
- } else {
19835
- const spec = result.spec;
19836
- console.log(`${chalk2.bold(where)} ${chalk2.dim(`profile ${spec.profile}`)}`);
19837
- console.log(` id: ${spec.id} kind: ${spec.kind} version: ${spec.version || "(none)"}`);
19838
- if (spec.description)
19839
- console.log(` ${spec.description}`);
19840
- console.log(` criteria (${String(spec.criteria.length)}):`);
19841
- for (const c of spec.criteria)
19842
- console.log(` ${c.id || "-"} ${c.type ? `[${c.type}] ` : ""}${c.statement}`);
19843
- for (const [label, values] of [["tools", spec.tools], ["skills", spec.skills], ["harnesses", spec.harnesses]]) {
19844
- console.log(` ${label}: ${values.length > 0 ? values.join(", ") : "-"}`);
19845
- }
19846
- console.log(` targets: ${spec.targets.length > 0 ? spec.targets.map((t) => `${t.type}:${t.name}`).join(", ") : "-"}`);
19847
- if (spec.instructions)
19848
- console.log(` instructions: ${spec.instructions.split(`
19841
+ return [`${chalk2.bold(where)} ${chalk2.yellow("unreadable")}`, ` ${String(result.reason)}`];
19842
+ }
19843
+ const spec = result.spec;
19844
+ const lines = [
19845
+ `${chalk2.bold(where)} ${chalk2.dim(`profile ${spec.profile}`)}`,
19846
+ ` id: ${spec.id} kind: ${spec.kind} version: ${spec.version || "(none)"}`
19847
+ ];
19848
+ if (spec.description)
19849
+ lines.push(` ${spec.description}`);
19850
+ lines.push(` criteria (${String(spec.criteria.length)}):`);
19851
+ for (const c of spec.criteria)
19852
+ lines.push(` ${c.id || "-"} ${c.type ? `[${c.type}] ` : ""}${c.statement}`);
19853
+ for (const [label, values] of [["tools", spec.tools], ["skills", spec.skills], ["harnesses", spec.harnesses]]) {
19854
+ lines.push(` ${label}: ${values.length > 0 ? values.join(", ") : "-"}`);
19855
+ }
19856
+ lines.push(` targets: ${spec.targets.length > 0 ? spec.targets.map((t) => `${t.type}:${t.name}`).join(", ") : "-"}`);
19857
+ if (spec.instructions)
19858
+ lines.push(` instructions: ${spec.instructions.split(`
19849
19859
  `)[0] ?? ""}${spec.instructions.includes(`
19850
19860
  `) ? " …" : ""}`);
19851
- }
19861
+ return lines;
19862
+ }
19863
+ function printCard(result) {
19864
+ for (const line of specCardLines(result))
19865
+ console.log(line);
19852
19866
  const written = result.written;
19853
19867
  if (written)
19854
19868
  console.log(chalk2.green(`✓ Wrote ${written.file} (${String(written.bytes)} bytes)`));
@@ -37980,4 +37994,4 @@ if (process.env.CLI_VERSION) {
37980
37994
  }
37981
37995
  runCli(process.argv.slice(2), cliVersion);
37982
37996
 
37983
- //# debugId=A84F942DFD3F760E64756E2164756E21
37997
+ //# debugId=02AF2BDB9E29C77264756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutagent/cli",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Bun-native CLI for the MutagenT AI platform - auth, provider config, and lifecycle-tool installer for AI-native workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@inquirer/prompts": "^8.7.2",
48
- "@mutagent/sdk": "0.8.10",
48
+ "@mutagent/sdk": "0.8.11",
49
49
  "@sinclair/typebox": "^0.34.0",
50
50
  "chalk": "^5.3.0",
51
51
  "commander": "^12.1.0",