@mutagent/cli 0.2.140 → 0.2.142
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 +26 -5
- package/dist/index.js +6 -3
- package/package.json +3 -3
package/dist/bin/cli.js
CHANGED
|
@@ -455,9 +455,12 @@ function sandboxScopedFailure(failure, commandPath) {
|
|
|
455
455
|
return failure;
|
|
456
456
|
const command = commandPath === "" ? "This command" : `\`mutagent ${commandPath}\``;
|
|
457
457
|
const alternative = SANDBOX_ALTERNATIVES[commandPath.split(" ")[0] ?? ""];
|
|
458
|
-
return new MutagentError("SANDBOX_SCOPE", `${command} isn't available inside a cloud session: this session is signed in with its own session token, which covers
|
|
458
|
+
return new MutagentError("SANDBOX_SCOPE", `${command} isn't available inside a cloud session: this session is signed in with its own session token, which covers ${TOKEN_COVERS}.`, alternative === undefined ? IN_SESSION_COMMANDS : `Run: ${alternative}`);
|
|
459
459
|
}
|
|
460
|
-
|
|
460
|
+
function sandboxSignInRefusal() {
|
|
461
|
+
return new MutagentError("SANDBOX_SCOPE", `There is nothing to sign in to inside a cloud session: this session is signed in with its own session token, the only credential a sandbox uses, which covers ${TOKEN_COVERS}.`, IN_SESSION_COMMANDS);
|
|
462
|
+
}
|
|
463
|
+
var SANDBOX_TOKEN_VAR2 = "MUTAGENT_SANDBOX_TOKEN", SANDBOX_ALTERNATIVES, TOKEN_COVERS = "the Factory, traces, pushing, updating, listing and showing reports, and this session", IN_SESSION_COMMANDS = "Inside this session use the Factory and traces commands, or reports push, reports update, reports list or reports show (mutagent --help lists them).";
|
|
461
464
|
var init_sandbox_scope_error = __esm(() => {
|
|
462
465
|
init_config();
|
|
463
466
|
init_errors();
|
|
@@ -19043,6 +19046,9 @@ class BrowserAuthError extends Error {
|
|
|
19043
19046
|
}
|
|
19044
19047
|
}
|
|
19045
19048
|
|
|
19049
|
+
// src/lib/auth-flow.ts
|
|
19050
|
+
init_sandbox_scope_error();
|
|
19051
|
+
|
|
19046
19052
|
// src/lib/gateway-poll.ts
|
|
19047
19053
|
function sleep2(ms) {
|
|
19048
19054
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -19080,6 +19086,8 @@ async function pollUntil(fetchOnce, isDone, opts = {}) {
|
|
|
19080
19086
|
|
|
19081
19087
|
// src/lib/auth-flow.ts
|
|
19082
19088
|
async function performLoginAction(opts) {
|
|
19089
|
+
if (inSandboxSession())
|
|
19090
|
+
throw sandboxSignInRefusal();
|
|
19083
19091
|
const { isJson, output } = opts;
|
|
19084
19092
|
const wasFirstLogin = !hasCredentials();
|
|
19085
19093
|
const envApiKey = process.env.MUTAGENT_API_KEY;
|
|
@@ -33152,6 +33160,8 @@ function nextForRun(run) {
|
|
|
33152
33160
|
}
|
|
33153
33161
|
function printRunStatus(run) {
|
|
33154
33162
|
console.log(`${chalk49.bold(run.eventId)} ${run.phase}`);
|
|
33163
|
+
if (run.runId)
|
|
33164
|
+
console.log(chalk49.dim(` run: ${run.runId} (session and model: mutagent gateway runs show ${run.runId})`));
|
|
33155
33165
|
if (run.sandbox)
|
|
33156
33166
|
console.log(chalk49.dim(` sandbox: ${run.sandbox.kind} (${run.sandbox.environment})`));
|
|
33157
33167
|
if (run.startedAt)
|
|
@@ -33205,6 +33215,15 @@ function printRunSummary(r) {
|
|
|
33205
33215
|
console.log(` ${r.id} ${chalk49.dim(r.state)} ${r.origin.kind}${r.origin.id ? `:${r.origin.id}` : ""} ${r.repository?.name ?? ""}`);
|
|
33206
33216
|
printRunError(r.error, " ");
|
|
33207
33217
|
}
|
|
33218
|
+
function printRunDetail(r) {
|
|
33219
|
+
printRunSummary(r);
|
|
33220
|
+
if (typeof r.sessionRef === "string" && r.sessionRef !== "") {
|
|
33221
|
+
console.log(chalk49.dim(` session: ${r.sessionRef} (traces: mutagent traces get --session ${r.sessionRef})`));
|
|
33222
|
+
}
|
|
33223
|
+
if (r.model !== undefined) {
|
|
33224
|
+
console.log(chalk49.dim(` model: ${r.model ?? "platform default (not pinned; Helix chose its default)"}`));
|
|
33225
|
+
}
|
|
33226
|
+
}
|
|
33208
33227
|
function assertUntil(value) {
|
|
33209
33228
|
const v = value.trim();
|
|
33210
33229
|
if (v === "now" || /^[1-9][0-9]{0,3}[mhd]$/.test(v) || /^\d{4}-\d{2}-\d{2}/.test(v) && !Number.isNaN(Date.parse(v)))
|
|
@@ -33281,7 +33300,9 @@ AI Agent Directive:
|
|
|
33281
33300
|
--json returns { success, ok, data }. An event-id hit has 'phase'; a run-id hit has 'state'
|
|
33282
33301
|
— branch on whichever key is present. Once the event started a run, the event-id hit
|
|
33283
33302
|
also has runId (the primary run) and runIds (every run, primary first): the ids
|
|
33284
|
-
'runs logs' and 'runs cancel' take.
|
|
33303
|
+
'runs logs' and 'runs cancel' take. A run-id hit also has sessionRef (the hs1_ that
|
|
33304
|
+
'mutagent traces get --session' takes; null until the run starts) and model (null: not
|
|
33305
|
+
pinned by the platform, Helix chose its default). data.error.code filed_as_triage is not a failure:
|
|
33285
33306
|
read data.error.triageItem { id, link } (null when the server did not name them) and
|
|
33286
33307
|
run 'next' to show the item.
|
|
33287
33308
|
`).action(async (id) => {
|
|
@@ -33299,7 +33320,7 @@ AI Agent Directive:
|
|
|
33299
33320
|
const run = await asRunId(found.runId, (runId) => getRun(runId, workspaceId));
|
|
33300
33321
|
const display = withDisplayError(run);
|
|
33301
33322
|
printGatewayOk(isJson, display, { human: () => {
|
|
33302
|
-
|
|
33323
|
+
printRunDetail(display);
|
|
33303
33324
|
} });
|
|
33304
33325
|
return;
|
|
33305
33326
|
});
|
|
@@ -40641,4 +40662,4 @@ if (process.env.CLI_VERSION) {
|
|
|
40641
40662
|
}
|
|
40642
40663
|
runCli(process.argv.slice(2), cliVersion);
|
|
40643
40664
|
|
|
40644
|
-
//# debugId=
|
|
40665
|
+
//# debugId=C855CBAEE7DB260264756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -454,9 +454,12 @@ function sandboxScopedFailure(failure, commandPath) {
|
|
|
454
454
|
return failure;
|
|
455
455
|
const command = commandPath === "" ? "This command" : `\`mutagent ${commandPath}\``;
|
|
456
456
|
const alternative = SANDBOX_ALTERNATIVES[commandPath.split(" ")[0] ?? ""];
|
|
457
|
-
return new MutagentError("SANDBOX_SCOPE", `${command} isn't available inside a cloud session: this session is signed in with its own session token, which covers
|
|
457
|
+
return new MutagentError("SANDBOX_SCOPE", `${command} isn't available inside a cloud session: this session is signed in with its own session token, which covers ${TOKEN_COVERS}.`, alternative === undefined ? IN_SESSION_COMMANDS : `Run: ${alternative}`);
|
|
458
458
|
}
|
|
459
|
-
|
|
459
|
+
function sandboxSignInRefusal() {
|
|
460
|
+
return new MutagentError("SANDBOX_SCOPE", `There is nothing to sign in to inside a cloud session: this session is signed in with its own session token, the only credential a sandbox uses, which covers ${TOKEN_COVERS}.`, IN_SESSION_COMMANDS);
|
|
461
|
+
}
|
|
462
|
+
var SANDBOX_TOKEN_VAR2 = "MUTAGENT_SANDBOX_TOKEN", SANDBOX_ALTERNATIVES, TOKEN_COVERS = "the Factory, traces, pushing, updating, listing and showing reports, and this session", IN_SESSION_COMMANDS = "Inside this session use the Factory and traces commands, or reports push, reports update, reports list or reports show (mutagent --help lists them).";
|
|
460
463
|
var init_sandbox_scope_error = __esm(() => {
|
|
461
464
|
init_config();
|
|
462
465
|
init_errors();
|
|
@@ -2088,4 +2091,4 @@ export {
|
|
|
2088
2091
|
version
|
|
2089
2092
|
};
|
|
2090
2093
|
|
|
2091
|
-
//# debugId=
|
|
2094
|
+
//# debugId=37053E84CDADCCC664756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutagent/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.142",
|
|
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.75",
|
|
49
49
|
"@sinclair/typebox": "^0.34.0",
|
|
50
50
|
"chalk": "^5.3.0",
|
|
51
51
|
"commander": "^12.1.0",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"bugs": {
|
|
95
95
|
"url": "https://docs.mutagent.io/support"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "32535345c087a364c85f7d7e43f8121543a56b25"
|
|
98
98
|
}
|