@mutagent/cli 0.2.130 → 0.2.132
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 +66 -24
- package/package.json +2 -2
package/dist/bin/cli.js
CHANGED
|
@@ -22060,12 +22060,13 @@ In a cloud sandbox launched for a Factory entry, the platform sets these:
|
|
|
22060
22060
|
| \`MUTAGENT_SESSION_ID\` | this session's id (\`hs1_…\`) | every \`--session\`, e.g. \`mutagent traces get\` |
|
|
22061
22061
|
| \`MUTAGENT_SUBJECT_ID\` | the Factory entry the session is bound to | every entry \`<id>\` and \`--subject\` |
|
|
22062
22062
|
| \`MUTAGENT_STAGE_RUN_ID\` | the stage run the platform opened for this session | \`factory stage finish\`, \`factory stage show\` |
|
|
22063
|
-
| \`MUTAGENT_RUN_ID\` | the gateway run, when a gateway routine started the session |
|
|
22063
|
+
| \`MUTAGENT_RUN_ID\` | the gateway run, when a gateway routine started the session | nothing: no command reads it |
|
|
22064
22064
|
|
|
22065
22065
|
So in a sandbox you write \`mutagent factory stage finish --state succeeded --json\`
|
|
22066
22066
|
with no run id, and \`mutagent reports push <run-dir> --json\` with no
|
|
22067
22067
|
\`--stage-run\`: the server attaches the report to the session's open run, with its
|
|
22068
|
-
entry, spec version and build (the checkout's HEAD).
|
|
22068
|
+
entry, spec version and build (the checkout's HEAD). A report's run id comes from
|
|
22069
|
+
\`--run-id\`, else the report's own render input (its \`runId\`).
|
|
22069
22070
|
|
|
22070
22071
|
Locally none of this exists: pass the entry id, the run id and the build
|
|
22071
22072
|
(\`--build-target\`, \`--build-rev\`) explicitly. A command that needs one and gets
|
|
@@ -22075,7 +22076,10 @@ none fails with \`MISSING_ARGUMENTS\`; it never guesses.
|
|
|
22075
22076
|
|
|
22076
22077
|
A sandbox session works on one entry. A session launched with
|
|
22077
22078
|
\`mutagent helix agent … --subject <id> --stage <stage>\` is bound to that entry from
|
|
22078
|
-
the start
|
|
22079
|
+
the start, with the stage run open. One launched with \`--subject <id>\` and no stage
|
|
22080
|
+
(an entry session, as the web's "Run in Helix" starts) is bound with no run open: it
|
|
22081
|
+
opens the run itself when it starts a stage (see
|
|
22082
|
+
[workflows/factory-stages.md](../workflows/factory-stages.md)). A session started without one binds on its first Factory write (for
|
|
22079
22083
|
example \`mutagent factory add\`). A write to any other entry is refused with
|
|
22080
22084
|
\`SANDBOX_SCOPE\`, which names the scope and the bound entry; the only exception is
|
|
22081
22085
|
an entry whose repository matches the sandbox's checkout.
|
|
@@ -22092,6 +22096,10 @@ refuses it (\`SANDBOX_CANNOT_LAUNCH\`); a person starts one from a terminal, Des
|
|
|
22092
22096
|
When a sandbox session ends, the platform checks its work: specs in sync, stage
|
|
22093
22097
|
runs finished, reports pushed. If something is missing, the session is woken with
|
|
22094
22098
|
the list and continues. Finish your runs and push your reports before you stop.
|
|
22099
|
+
|
|
22100
|
+
Code changes travel the same way:
|
|
22101
|
+
the platform opens the PR with this session's changes when the session ends;
|
|
22102
|
+
don't push or open PRs yourself.
|
|
22095
22103
|
`,
|
|
22096
22104
|
"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",
|
|
22097
22105
|
"workflows/factory-register.md": `---
|
|
@@ -22316,6 +22324,11 @@ outcome". Reports are its evidence. The six stages are spec, build, evaluate,
|
|
|
22316
22324
|
diagnose, optimize and ship. Read \`mutagent factory stage --help\` before the first
|
|
22317
22325
|
use.
|
|
22318
22326
|
|
|
22327
|
+
Reports are discovery, diagnostics, \`--kind evaluator\` (an evaluation) and
|
|
22328
|
+
review (the human-in-the-loop calibration of a judge). The spec stage pushes no report: its
|
|
22329
|
+
output is the spec version (\`mutagent factory spec push\`, see
|
|
22330
|
+
[factory-spec-sync.md](./factory-spec-sync.md)). Record or finish its run without one.
|
|
22331
|
+
|
|
22319
22332
|
## P3: a stage in this session
|
|
22320
22333
|
|
|
22321
22334
|
A stage runs here: the user types \`/<stage>\` (\`/evaluate\`) or asks for one;
|
|
@@ -22329,6 +22342,13 @@ user confirms). Locally, record it as in P4. In a cloud sandbox:
|
|
|
22329
22342
|
3. **Finish the run:** \`mutagent factory stage finish --state succeeded --verdict PASS --json\`.
|
|
22330
22343
|
4. A session ending with work missing is woken with the list.
|
|
22331
22344
|
|
|
22345
|
+
**An entry session** is bound to an entry but launched with no stage (the web's
|
|
22346
|
+
"Run in Helix", or \`mutagent helix agent … --subject <entry-id>\` with no \`--stage\`):
|
|
22347
|
+
no run is open. Its first message names the stage: \`/<stage> …\` means run that stage
|
|
22348
|
+
in this session. Open its run with \`mutagent factory stage start --stage <stage> --json\`
|
|
22349
|
+
(the entry is the bound one), do the work, then push the report and finish the run
|
|
22350
|
+
as in steps 2 and 3.
|
|
22351
|
+
|
|
22332
22352
|
**Only when the user asks for a separate sandbox, and never from inside a sandbox:**
|
|
22333
22353
|
\`mutagent helix agent --name <agent> --subject <entry-id> --stage <stage> -p "<task>"\`
|
|
22334
22354
|
starts a visible child session (\`mutagent helix session list\`, the web); its agent
|
|
@@ -22910,9 +22930,11 @@ user which filters were not applied.
|
|
|
22910
22930
|
## In a cloud sandbox
|
|
22911
22931
|
|
|
22912
22932
|
With no filter, the commands read the sandbox's own session (\`MUTAGENT_SESSION_ID\`).
|
|
22913
|
-
A
|
|
22914
|
-
|
|
22915
|
-
|
|
22933
|
+
A filter that names a client agent (\`--agent\`, \`--skill\`, \`--workflow\`, or a client's
|
|
22934
|
+
own session id) reads any client agent's traces in its workspace, with no stage run
|
|
22935
|
+
needed. Other Helix sessions stay out of reach, except an entry's sessions for a run
|
|
22936
|
+
launched for its evaluate, diagnose or optimize stage. Anything else is refused with
|
|
22937
|
+
\`TRACES_SCOPE\`: narrow to your own session or a client agent. See
|
|
22916
22938
|
[concepts/where-helix-runs.md](../concepts/where-helix-runs.md).
|
|
22917
22939
|
|
|
22918
22940
|
Gateway runs carry the same window: \`mutagent gateway runs --session <hs1_…> --json\`
|
|
@@ -27276,7 +27298,8 @@ async function runCloudLaunch(plan, mode) {
|
|
|
27276
27298
|
...plan.preset === undefined ? {} : { preset: plan.preset },
|
|
27277
27299
|
...plan.sandboxProvider === undefined ? {} : { sandboxProvider: plan.sandboxProvider },
|
|
27278
27300
|
...repositoryFields(plan),
|
|
27279
|
-
...plan.factory === undefined ? {} : { subject: plan.factory.subject
|
|
27301
|
+
...plan.factory === undefined ? {} : { subject: plan.factory.subject },
|
|
27302
|
+
...plan.factory?.stage === undefined ? {} : { stage: plan.factory.stage }
|
|
27280
27303
|
}).catch((error) => {
|
|
27281
27304
|
throw entryRefusal(launchRepositoryRefusal(error));
|
|
27282
27305
|
});
|
|
@@ -27826,7 +27849,7 @@ async function resolveFactoryDefault(name, explicit, usage, conn, env = process.
|
|
|
27826
27849
|
var MISSING_TASK_MESSAGE = 'a cloud run needs a task: pass -p "<task>", or --rpc for an interactive session';
|
|
27827
27850
|
function registerAgentCommand(parent, registration, deps = defaultPlanDeps()) {
|
|
27828
27851
|
const jsonSource = registration?.jsonSource ?? parent;
|
|
27829
|
-
parent.command("agent").description("Run a Helix agent in the cloud, or a managed agent by @slug").argument("[argv...]", "Agent definition, then the task and Helix flags; or @slug[:vN|:latest] for a managed agent").allowUnknownOption(true).allowExcessArguments(true).addOption(new Option("--sandbox <id>", "Run in an existing sandbox, by sandbox id").hideHelp()).option("--preset <name>", "Sandbox preset (not with --sandbox)").option("--sandbox-provider <name>", "Run on this configured sandbox provider").option("--env <name>", "Workspace Environment to load for this run (see mutagent env list)").option("--rpc", "Read JSON commands on stdin; write events on stdout").option("--cwd <path>", "Working directory in the sandbox").option("--repository <owner/name>", "Native brief only: run in a checkout of this GitHub repository (not with --sandbox or --cwd)").option("--branch <name>", "Branch of --repository to check out (default: its default branch)").option("--subject <id>", "Native brief only: bind the session to this Factory entry (with --stage)").option("--stage <stage>", `The platform opens a stage run first (${FACTORY_STAGES.join("|")}); the entry is --subject, else inferred`).addHelpText("after", [
|
|
27852
|
+
parent.command("agent").description("Run a Helix agent in the cloud, or a managed agent by @slug").argument("[argv...]", "Agent definition, then the task and Helix flags; or @slug[:vN|:latest] for a managed agent").allowUnknownOption(true).allowExcessArguments(true).addOption(new Option("--sandbox <id>", "Run in an existing sandbox, by sandbox id").hideHelp()).option("--preset <name>", "Sandbox preset (not with --sandbox)").option("--sandbox-provider <name>", "Run on this configured sandbox provider").option("--env <name>", "Workspace Environment to load for this run (see mutagent env list)").option("--rpc", "Read JSON commands on stdin; write events on stdout").option("--cwd <path>", "Working directory in the sandbox").option("--repository <owner/name>", "Native brief only: run in a checkout of this GitHub repository (not with --sandbox or --cwd)").option("--branch <name>", "Branch of --repository to check out (default: its default branch)").option("--subject <id>", "Native brief only: bind the session to this Factory entry (with or without --stage)").option("--stage <stage>", `The platform opens a stage run first (${FACTORY_STAGES.join("|")}); the entry is --subject, else inferred`).addHelpText("after", [
|
|
27830
27853
|
"",
|
|
27831
27854
|
"Examples:",
|
|
27832
27855
|
' mutagent helix agent @invoice-pricing --env prod -p "Price three widget units."',
|
|
@@ -27837,6 +27860,7 @@ function registerAgentCommand(parent, registration, deps = defaultPlanDeps()) {
|
|
|
27837
27860
|
' mutagent helix agent --name reviewer --env staging -p "check the deploy"',
|
|
27838
27861
|
' mutagent helix agent --name reviewer --repository acme/api --branch feat/login -p "review the branch"',
|
|
27839
27862
|
' mutagent helix agent --name evaluator --subject invoice-pricing --stage evaluate -p "Evaluate spec version 4"',
|
|
27863
|
+
' mutagent helix agent --name evaluator --subject invoice-pricing -p "/evaluate spec version 4"',
|
|
27840
27864
|
"",
|
|
27841
27865
|
"Managed agents (deployed with mutagent agent deploy):",
|
|
27842
27866
|
" @slug runs the slot's active revision; @slug:vN pins revision N; @slug:latest runs the newest validated revision.",
|
|
@@ -27850,7 +27874,9 @@ function registerAgentCommand(parent, registration, deps = defaultPlanDeps()) {
|
|
|
27850
27874
|
" The platform opens a stage run, binds the session to the entry and derives the sandbox",
|
|
27851
27875
|
" token's scopes from the entry, the stage and its policy. There is no grant flag.",
|
|
27852
27876
|
" Without --subject the entry is MUTAGENT_SUBJECT_ID, else the session's, else this checkout's .mutagent/factory.json.",
|
|
27853
|
-
"
|
|
27877
|
+
" --subject without --stage opens an entry session: bound to the entry, no stage run opened;",
|
|
27878
|
+
" the session runs its stage itself (mutagent factory stage start --stage <stage>).",
|
|
27879
|
+
" Errors: FLAG_CONFLICT (--subject or --stage with @id); MISSING_ARGUMENTS (no entry inferred: pass --subject);",
|
|
27854
27880
|
" ENTRY_NOT_FOUND (run: mutagent factory list); VALIDATION_ERROR (--stage is one of the six stages).",
|
|
27855
27881
|
"",
|
|
27856
27882
|
"Definition and task:",
|
|
@@ -27952,17 +27978,14 @@ function factoryLaunchRefusal(argv, options) {
|
|
|
27952
27978
|
if (isManagedAgentAddress(argv[0])) {
|
|
27953
27979
|
return new MutagentError("FLAG_CONFLICT", "@id already names the entry it runs as; --subject and --stage are for a native brief.", "Drop --subject and --stage, or pass them with a native brief (--name, --file or --prompt).");
|
|
27954
27980
|
}
|
|
27955
|
-
if (stage
|
|
27956
|
-
return new MutagentError("FLAG_CONFLICT", "--subject needs --stage <stage>: the stage run is what binds the session to the entry.", "Pass --stage <stage> with --subject <id>");
|
|
27957
|
-
}
|
|
27958
|
-
if (!FACTORY_STAGES.includes(stage)) {
|
|
27981
|
+
if (stage !== undefined && !FACTORY_STAGES.includes(stage)) {
|
|
27959
27982
|
return new MutagentError("VALIDATION_ERROR", `--stage ${stage} is not one of ${FACTORY_STAGES.join(", ")}.`, `Pass one of: ${FACTORY_STAGES.join(" | ")}`);
|
|
27960
27983
|
}
|
|
27961
27984
|
return;
|
|
27962
27985
|
}
|
|
27963
27986
|
async function factoryTarget(opts) {
|
|
27964
27987
|
if (opts.stage === undefined)
|
|
27965
|
-
return;
|
|
27988
|
+
return opts.subject === undefined ? undefined : { subject: opts.subject };
|
|
27966
27989
|
const subject = await resolveFactoryDefault("subject", opts.subject, { what: "--subject <id>", command: "mutagent helix agent" }, connectPlatform);
|
|
27967
27990
|
return { subject, stage: opts.stage };
|
|
27968
27991
|
}
|
|
@@ -34275,8 +34298,9 @@ Examples:
|
|
|
34275
34298
|
The HTML is never printed; it is served as a file under a sandboxing CSP.
|
|
34276
34299
|
|
|
34277
34300
|
AI Agent Directive:
|
|
34278
|
-
--json returns { report, sessionRef, specVersion, buildRef, renderInput,
|
|
34279
|
-
_links } plus htmlFile when --html was given.
|
|
34301
|
+
--json returns { report, sessionRef, harnessSessionId, specVersion, buildRef, renderInput,
|
|
34302
|
+
htmlPath, _links } plus htmlFile when --html was given. harnessSessionId is the session id
|
|
34303
|
+
Helix itself used (null when not known); sessionRef is the hs1_ reference. An unknown id is REPORT_NOT_FOUND, exit 1.
|
|
34280
34304
|
`).action(async (id, options, command) => {
|
|
34281
34305
|
await runReportsAction(command, async (isJson) => {
|
|
34282
34306
|
const conn = await connectReports({ sandboxBearer: false });
|
|
@@ -34298,7 +34322,7 @@ AI Agent Directive:
|
|
|
34298
34322
|
}
|
|
34299
34323
|
const r = detail.report;
|
|
34300
34324
|
console.log(chalk53.bold(r.title));
|
|
34301
|
-
for (const [label, value] of Object.entries({ ...row(r), session: detail.sessionRef ?? "", html: links.html })) {
|
|
34325
|
+
for (const [label, value] of Object.entries({ ...row(r), session: detail.sessionRef ?? "", "helix id": detail.harnessSessionId ?? "", html: links.html })) {
|
|
34302
34326
|
if (label !== "title" && value !== "")
|
|
34303
34327
|
console.log(` ${label.padEnd(9)}${value}`);
|
|
34304
34328
|
}
|
|
@@ -34611,6 +34635,16 @@ async function defaultReportKind(renderInput, htmlPath, openStageRunStage) {
|
|
|
34611
34635
|
throw new MutagentError("VALIDATION_ERROR", `--kind is required: nothing says what kind of report ${htmlPath} is (no open stage run with a report kind, ` + `no kind in the render input, no ${COMPLETION_FILE} stage). Allowed: ${REPORT_KINDS.join(", ")}.`, `Pass --kind <${REPORT_KINDS.join("|")}>`);
|
|
34612
34636
|
}
|
|
34613
34637
|
|
|
34638
|
+
// src/lib/harness-session.ts
|
|
34639
|
+
var HARNESS_SESSION_VAR = "PI_SESSION_ID";
|
|
34640
|
+
var MAX_LENGTH = 200;
|
|
34641
|
+
function harnessSessionField(env = process.env) {
|
|
34642
|
+
const value = env[HARNESS_SESSION_VAR]?.trim();
|
|
34643
|
+
if (value === undefined || value === "" || value.length > MAX_LENGTH)
|
|
34644
|
+
return {};
|
|
34645
|
+
return { harnessSessionId: value };
|
|
34646
|
+
}
|
|
34647
|
+
|
|
34614
34648
|
// src/commands/reports/push.ts
|
|
34615
34649
|
var PUSH_USAGE = "mutagent reports push <run-dir|report-file> [--kind <diagnostics|discovery|evaluator|hitl>] [--run-id <id>] [--subject <id>] [--session-ref <ref>] [--title <text>] [--render-input <file>] [--replace] [--stage-run <run-id>] [--spec-version <n>] [--build-target <target-id>] [--build-rev <rev>] [--apply-id <id>] [--optimize-run <id> --iteration <n>]";
|
|
34616
34650
|
async function openStageRunStage(conn, stageRun) {
|
|
@@ -34722,6 +34756,7 @@ AI Agent Directive:
|
|
|
34722
34756
|
renderInput,
|
|
34723
34757
|
...runId === undefined ? {} : { runId },
|
|
34724
34758
|
...options.sessionRef === undefined ? {} : { sessionRef: options.sessionRef },
|
|
34759
|
+
...harnessSessionField(),
|
|
34725
34760
|
...options.replace === true ? { replace: true } : {},
|
|
34726
34761
|
...links,
|
|
34727
34762
|
...optimize
|
|
@@ -38584,7 +38619,8 @@ function registerAdd2(factory) {
|
|
|
38584
38619
|
...git === undefined ? {} : { git },
|
|
38585
38620
|
...components.length === 0 ? {} : { components },
|
|
38586
38621
|
...options.dryRun === true ? { dryRun: true } : {},
|
|
38587
|
-
origin: "cli"
|
|
38622
|
+
origin: "cli",
|
|
38623
|
+
...harnessSessionField()
|
|
38588
38624
|
}, "mutagent factory add --help");
|
|
38589
38625
|
const id = result.entry.id;
|
|
38590
38626
|
if (!result.dryRun && result.entry.specVersion !== null)
|
|
@@ -38918,7 +38954,8 @@ function registerPush(spec) {
|
|
|
38918
38954
|
...components.length === 0 ? {} : { components },
|
|
38919
38955
|
...options.message === undefined ? {} : { message: options.message },
|
|
38920
38956
|
...options.dryRun === true ? { dryRun: true } : {},
|
|
38921
|
-
origin: "cli"
|
|
38957
|
+
origin: "cli",
|
|
38958
|
+
...harnessSessionField()
|
|
38922
38959
|
}, String(base), "mutagent factory spec push --help");
|
|
38923
38960
|
const version = result.specVersion.id;
|
|
38924
38961
|
if (!result.dryRun)
|
|
@@ -39077,7 +39114,8 @@ function registerStart2(stage) {
|
|
|
39077
39114
|
...fields,
|
|
39078
39115
|
...build,
|
|
39079
39116
|
...session.source === "explicit" || session.source === "env" ? { session: session.value } : {},
|
|
39080
|
-
origin: "cli"
|
|
39117
|
+
origin: "cli",
|
|
39118
|
+
...harnessSessionField()
|
|
39081
39119
|
}, "mutagent factory stage start --help");
|
|
39082
39120
|
const tips = [`Finish it: mutagent factory stage finish ${arg(result.stageRun.id)} --state succeeded --verdict PASS`];
|
|
39083
39121
|
if (isJson) {
|
|
@@ -39118,7 +39156,8 @@ function registerFinish(stage) {
|
|
|
39118
39156
|
...options.verdict === undefined ? {} : { verdict: options.verdict },
|
|
39119
39157
|
...score === undefined ? {} : { score },
|
|
39120
39158
|
...options.summary === undefined ? {} : { summary: options.summary },
|
|
39121
|
-
...options.report === undefined ? {} : { reports: options.report }
|
|
39159
|
+
...options.report === undefined ? {} : { reports: options.report },
|
|
39160
|
+
...harnessSessionField()
|
|
39122
39161
|
}, "mutagent factory stage finish --help");
|
|
39123
39162
|
if (isJson) {
|
|
39124
39163
|
output.output({ success: true, stageRun: run, _links: { ...factoryLinks(conn.endpoint, run.entry), stageRun: `/api/factory/stage-runs/${encodeURIComponent(run.id)}` } });
|
|
@@ -39171,7 +39210,8 @@ function registerRecord(stage) {
|
|
|
39171
39210
|
...options.report === undefined ? {} : { reports: options.report },
|
|
39172
39211
|
...startedAt === undefined ? {} : { startedAt },
|
|
39173
39212
|
...endedAt === undefined ? {} : { endedAt },
|
|
39174
|
-
origin: "cli"
|
|
39213
|
+
origin: "cli",
|
|
39214
|
+
...harnessSessionField()
|
|
39175
39215
|
}, "mutagent factory stage record --help");
|
|
39176
39216
|
if (isJson) {
|
|
39177
39217
|
output.output({ success: true, ...result, ...warningsOf2(recordHint), _links: factoryLinks(conn.endpoint, entryId) });
|
|
@@ -39231,7 +39271,9 @@ function registerShow7(stage) {
|
|
|
39231
39271
|
return;
|
|
39232
39272
|
}
|
|
39233
39273
|
console.log(stageLine(detail.stageRun));
|
|
39234
|
-
|
|
39274
|
+
const { origin } = detail.stageRun;
|
|
39275
|
+
const harness = origin.harnessSessionId ?? null;
|
|
39276
|
+
console.log(` Owner: ${detail.stageRun.owner.kind} ${detail.stageRun.owner.id}${origin.session === null ? "" : ` Session: ${origin.session}`}${harness === null ? "" : ` Helix session: ${harness}`}`);
|
|
39235
39277
|
for (const report of detail.reports)
|
|
39236
39278
|
console.log(` Report: ${report.id} ${report.title}${report.verdict === null ? "" : ` ${report.verdict}`}`);
|
|
39237
39279
|
console.log(` Findings: ${String(detail.findings)}`);
|
|
@@ -40578,4 +40620,4 @@ if (process.env.CLI_VERSION) {
|
|
|
40578
40620
|
}
|
|
40579
40621
|
runCli(process.argv.slice(2), cliVersion);
|
|
40580
40622
|
|
|
40581
|
-
//# debugId=
|
|
40623
|
+
//# debugId=8D7F27126F75763C64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutagent/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.132",
|
|
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.
|
|
48
|
+
"@mutagent/sdk": "0.8.67",
|
|
49
49
|
"@sinclair/typebox": "^0.34.0",
|
|
50
50
|
"chalk": "^5.3.0",
|
|
51
51
|
"commander": "^12.1.0",
|