@mutagent/cli 0.2.119 → 0.2.120
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/dist/bin/cli.js +13 -5
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -22089,7 +22089,7 @@ When a sandbox session ends, the platform checks its work: specs in sync, stage
|
|
|
22089
22089
|
runs finished, reports pushed. If something is missing, the session is woken with
|
|
22090
22090
|
the list and continues. Finish your runs and push your reports before you stop.
|
|
22091
22091
|
`,
|
|
22092
|
-
"workflows/agent-deployment.md": "# Managed agents: check, deploy and run an agent.md folder\n\nUse this journey when the user has an agent folder whose entry file is a\nlowercase `agent.md` (YAML frontmatter, then the standing prompt), optionally\nwith TypeScript tools, skill folders and files. Read `mutagent agent --help` and\nthe leaf's help before the first use; help owns the flags and the JSON shapes.\nThe CLI compiles the tools and packages the folder. Do not write registration\nglue or forward a path on this machine to the server.\n\nThe format, in one paragraph: `name` (the slug), `description`, `model`\n(`provider/model`, as `mutagent helix models` lists it), `thinking`, `tools`,\n`disallowed_tools` and `skills` are the local brief. Deployment settings sit in\none optional `harness:` block: `tools.builtin`, `tools.modules`, `skills`,\n`files`, `bindings.secrets`, `runtime.mode` (`interactive` or `headless`) and\n`runtime.scaffold` (`standard`). A deployed agent gets exactly the tools and\nskills `harness:` declares. `apiVersion`, `kind` and `metadata` are refused.\n\n1. **Check.** `mutagent agent check <agent.md> --json`. No network, no model call,\n no tool code runs. Fix every diagnostic before going further.\n2. **Run locally, when the user wants to try it.**\n `mutagent agent run <agent.md> \"<task>\" --json` runs the task with the local\n Helix binary and this machine's LLM provider key. It is not isolated and\n creates nothing in the workspace. It takes a file; a slug is refused.\n3. **Deploy.** `mutagent agent deploy <agent.md> [--env <name>] --json`. `--env`\n names the slot (the agent in that Environment); without it the default slot\n is used. One server-side operation validates and stores the package as the\n next revision and activates it. The server refuses, before writing anything:\n a model outside the workspace model list, an Environment the workspace lacks,\n a required secret binding, an inline agent that already has the slug, and a\n server with no sandbox provider that can stage a package. Report the message\n as the server words it. Show `_directive.renderedCard` verbatim.\n `--no-activate` stores the revision and leaves the slot on its active one.\n4. **Run the managed agent.**\n `mutagent helix agent @<slug> [--env <name>] -p \"<task>\"` runs headless;\n `--rpc` runs interactive. `@<slug>:vN` pins a revision; `@<slug>:latest` runs\n the newest validated one. The receipt (reference, sessionId: the hs1_ session\n id, agent, mode) is one JSON line on stderr: keep the reference. `mutagent helix session attach`,\n `send` (interactive only), `signal`, `checkpoint`, `checkpoints` and\n `close-input` take it. Restore of a managed agent's session is refused today;\n start a new run. A person starts a managed agent run (terminal, Desktop, web); from inside a\n cloud sandbox the platform refuses the launch (`SANDBOX_CANNOT_LAUNCH`): show the refusal as-is.\n5. **Inspect.** `mutagent agent inspect <slug> [--env <name>] --json` shows the\n revisions, each slot's active revision and the sessions launched from it.\n `mutagent agent list --json` lists the workspace's managed agents.\n6. **Roll back or retire.** `mutagent agent activate <slug> --revision vN\n [--env <name>] --json` makes an older revision active for new runs; running\n sessions keep theirs. `mutagent agent retire <slug> [--env <name>] --force`\n disables the slot; `activate` re-enables it. Retire refuses without `--force`\n in every mode: confirm with the user first.\n\nOn an uncertain deploy or activate (a network error, a 5xx), retry the same\ncommand with the same `--idempotency-key` the error's recovery names; a new key\nis a new request. `mutagent agent inspect --operation <id>` shows the recorded\noutcome of one operation. `pack --output <archive>` writes the archive for\ninspection; the path must be outside the agent folder and replacing a file\nneeds `--force`.\n",
|
|
22092
|
+
"workflows/agent-deployment.md": "# Managed agents: check, deploy and run an agent.md folder\n\nUse this journey when the user has an agent folder whose entry file is a\nlowercase `agent.md` (YAML frontmatter, then the standing prompt), optionally\nwith TypeScript tools, skill folders and files. Read `mutagent agent --help` and\nthe leaf's help before the first use; help owns the flags and the JSON shapes.\nThe CLI compiles the tools and packages the folder. Do not write registration\nglue or forward a path on this machine to the server.\n\nThe format, in one paragraph: `name` (the slug), `description`, `model`\n(`provider/model`, as `mutagent helix models` lists it), `thinking`, `tools`,\n`disallowed_tools` and `skills` are the local brief. Deployment settings sit in\none optional `harness:` block: `tools.builtin`, `tools.modules`, `skills`,\n`files`, `bindings.secrets`, `runtime.mode` (`interactive` or `headless`) and\n`runtime.scaffold` (`standard`). A deployed agent gets exactly the tools and\nskills `harness:` declares. `apiVersion`, `kind` and `metadata` are refused.\n\n1. **Check.** `mutagent agent check <agent.md> --json`. No network, no model call,\n no tool code runs. Fix every diagnostic before going further.\n2. **Run locally, when the user wants to try it.**\n `mutagent agent run <agent.md> \"<task>\" --json` runs the task with the local\n Helix binary and this machine's LLM provider key. It is not isolated and\n creates nothing in the workspace. It takes a file; a slug is refused.\n3. **Deploy.** `mutagent agent deploy <agent.md> [--env <name>] --json`. `--env`\n names the slot (the agent in that Environment); without it the default slot\n is used. One server-side operation validates and stores the package as the\n next revision and activates it. The server refuses, before writing anything:\n a model outside the workspace model list, an Environment the workspace lacks,\n a required secret binding, an inline agent that already has the slug, and a\n server with no sandbox provider that can stage a package. Report the message\n as the server words it. Show `_directive.renderedCard` verbatim.\n `--no-activate` stores the revision and leaves the slot on its active one.\n4. **Run the managed agent.**\n `mutagent helix agent @<slug> [--env <name>] -p \"<task>\"` runs headless;\n `--rpc` runs interactive. `@<slug>:vN` pins a revision; `@<slug>:latest` runs\n the newest validated one. The receipt (reference, sessionId: the hs1_ session\n id, agent, mode) is one JSON line on stderr: keep the reference. `mutagent helix session attach`,\n `send` (interactive only), `signal`, `checkpoint`, `checkpoints` and\n `close-input` take it. Restore of a managed agent's session is refused today;\n start a new run. A person starts a managed agent run (terminal, Desktop, web); from inside a\n cloud sandbox the platform refuses the launch (`SANDBOX_CANNOT_LAUNCH`): show the refusal as-is.\n5. **Inspect.** `mutagent agent inspect <slug> [--env <name>] --json` shows the\n revisions, each slot's active revision and the sessions launched from it.\n `mutagent agent list --json` lists the workspace's managed agents. Both run on\n a laptop only: inside a cloud sandbox they fail with `SANDBOX_SCOPE`, and the\n deployment check is `mutagent factory show <entry> --json` instead.\n6. **Roll back or retire.** `mutagent agent activate <slug> --revision vN\n [--env <name>] --json` makes an older revision active for new runs; running\n sessions keep theirs. `mutagent agent retire <slug> [--env <name>] --force`\n disables the slot; `activate` re-enables it. Retire refuses without `--force`\n in every mode: confirm with the user first.\n\nOn an uncertain deploy or activate (a network error, a 5xx), retry the same\ncommand with the same `--idempotency-key` the error's recovery names; a new key\nis a new request. `mutagent agent inspect --operation <id>` shows the recorded\noutcome of one operation. `pack --output <archive>` writes the archive for\ninspection; the path must be outside the agent folder and replacing a file\nneeds `--force`.\n",
|
|
22093
22093
|
"workflows/factory-register.md": `---
|
|
22094
22094
|
name: mutagent-cli-workflows-factory-register
|
|
22095
22095
|
description: |
|
|
@@ -22119,7 +22119,9 @@ before the first use.
|
|
|
22119
22119
|
2. **Validate without writing.** \`mutagent factory add <agentspec-file> --dry-run --json\`.
|
|
22120
22120
|
The spec is checked in the CLI before anything is sent. Fix each field in
|
|
22121
22121
|
\`errors[]\` on \`SPEC_INVALID\`.
|
|
22122
|
-
3. **Confirm with the user
|
|
22122
|
+
3. **Confirm with the user (required).** Show the drafted spec's summary (id, kind,
|
|
22123
|
+
name, targets, components) and wait for the user's yes. Never run \`factory add\`
|
|
22124
|
+
without it. Then register:
|
|
22123
22125
|
\`mutagent factory add <agentspec-file> --json\`. The file's git remote, path and
|
|
22124
22126
|
HEAD commit are read from its checkout and recorded as v1.
|
|
22125
22127
|
4. **Show the result.** Render \`_directive.renderedCard\` verbatim, then
|
|
@@ -22144,7 +22146,8 @@ A system's spec lists its members under \`spec.multiAgent.members[]\`, each with
|
|
|
22144
22146
|
2. \`mutagent factory add <system-agentspec> --dry-run --json\`. The member files
|
|
22145
22147
|
are read from the system spec's folder for their ids, and each becomes a
|
|
22146
22148
|
component pinned to its current spec version.
|
|
22147
|
-
3.
|
|
22149
|
+
3. Show the system spec's summary and its members, wait for the user's yes, then
|
|
22150
|
+
\`mutagent factory add <system-agentspec> --json\`.
|
|
22148
22151
|
4. \`mutagent factory show <system-id> --json\` lists the components and their pins.
|
|
22149
22152
|
|
|
22150
22153
|
Changing a member later: push the member's spec, then push the system's spec so
|
|
@@ -28771,7 +28774,11 @@ function alreadyGone(error) {
|
|
|
28771
28774
|
function notEnded(reference, error) {
|
|
28772
28775
|
if (!(error instanceof MutagentError) || NOT_ENDED_CODES.has(error.code))
|
|
28773
28776
|
return error;
|
|
28774
|
-
|
|
28777
|
+
const label = sessionLabel(reference);
|
|
28778
|
+
if (label === reference) {
|
|
28779
|
+
return new MutagentError("SESSION_END_FAILED", `${reference} was not ended: ${error.message}`, `Run: mutagent helix session end ${reference} --force`);
|
|
28780
|
+
}
|
|
28781
|
+
return new MutagentError("SESSION_END_FAILED", `${label} was not ended: ${error.message}. A session is ended by its hs1_ session id: find it in session list, then run mutagent helix session end <hs1_ref> --force.`, "Run: mutagent helix session list --json");
|
|
28775
28782
|
}
|
|
28776
28783
|
async function end(reference) {
|
|
28777
28784
|
if (resolveCredential().kind !== "sandbox-token")
|
|
@@ -28791,6 +28798,7 @@ defaults to its own session (MUTAGENT_SESSION_ID).
|
|
|
28791
28798
|
Errors (code: recovery):
|
|
28792
28799
|
CONFIRMATION_REQUIRED Confirm with the user, then: mutagent helix session end <hs1_ref> --force (nothing was sent)
|
|
28793
28800
|
SESSION_END_FAILED hs1_… was not ended: <reason>. Retry: mutagent helix session end hs1_… --force
|
|
28801
|
+
(not an hs1_ id: find the hs1_ id with mutagent helix session list)
|
|
28794
28802
|
MISSING_ARGUMENTS Pass the hs1_ session id (locally it has no default)
|
|
28795
28803
|
|
|
28796
28804
|
AI Agent Directive:
|
|
@@ -40483,4 +40491,4 @@ if (process.env.CLI_VERSION) {
|
|
|
40483
40491
|
}
|
|
40484
40492
|
runCli(process.argv.slice(2), cliVersion);
|
|
40485
40493
|
|
|
40486
|
-
//# debugId=
|
|
40494
|
+
//# debugId=E30DBAF2E9D42B6F64756E2164756E21
|
package/package.json
CHANGED