@moda-ai/cli 1.43.0 → 1.43.2
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/{cli-xsmsjny3.js → cli-5tsqk3jt.js} +2 -2
- package/dist/{cli-rp912ypf.js → cli-8c60k2p4.js} +7 -2
- package/dist/{cli-ecrx32mm.js → cli-ewerh7e2.js} +71 -58
- package/dist/{cli-yy8fwg1a.js → cli-j2fapt3g.js} +2 -2
- package/dist/{cli-dyeywy9d.js → cli-rycpwqzm.js} +1 -1
- package/dist/cli.js +7 -8
- package/dist/{harness-github-actions-1qt4sgxd.js → harness-github-actions-pg0azf3h.js} +2 -2
- package/dist/{harness-191xt7bq.js → harness-sqngqjrd.js} +2 -2
- package/dist/{index-r1egcg99.js → index-n8vtc24p.js} +5 -5
- package/dist/prompt-source-mcp.js +2 -2
- package/dist/{provision-gabtks29.js → provision-02wqtkvm.js} +3 -3
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
resolveTenantId,
|
|
26
26
|
shouldInventoryFile,
|
|
27
27
|
stringOption
|
|
28
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-8c60k2p4.js";
|
|
29
29
|
import {
|
|
30
30
|
__commonJS,
|
|
31
31
|
__require,
|
|
@@ -184813,7 +184813,7 @@ async function runHarnessCommand(context) {
|
|
|
184813
184813
|
throw new CliInputError("Focused remote prompt analysis is not supported yet.", "Use local --analyst=claude|codex|cursor|local-scan, or drop --concern for a full remote report.");
|
|
184814
184814
|
}
|
|
184815
184815
|
if (context.flags["github-actions"] === "true") {
|
|
184816
|
-
const { runGithubActionsAnalyze } = await import("./harness-github-actions-
|
|
184816
|
+
const { runGithubActionsAnalyze } = await import("./harness-github-actions-pg0azf3h.js");
|
|
184817
184817
|
const result = await runGithubActionsAnalyze(rootDir, {
|
|
184818
184818
|
writeReport: (report2) => {
|
|
184819
184819
|
const normalized = normalizeHarnessReport(report2);
|
|
@@ -1213,7 +1213,7 @@ function createCliOutput(options) {
|
|
|
1213
1213
|
if (options.quiet || state.terminal)
|
|
1214
1214
|
return;
|
|
1215
1215
|
const agentError = errorToAgentError(error);
|
|
1216
|
-
const envelope = createAgentErrorEnvelope(options.command || "unknown", agentError, state.runId);
|
|
1216
|
+
const envelope = createAgentErrorEnvelope(options.command || "unknown", agentError, state.runId, errorWarnings(error));
|
|
1217
1217
|
if (options.mode === "agent-stream") {
|
|
1218
1218
|
ensureStarted();
|
|
1219
1219
|
if (error instanceof CliInputRequiredError) {
|
|
@@ -1315,11 +1315,16 @@ function agentEnvelopeFits(command, data, options = {}) {
|
|
|
1315
1315
|
const envelope = createAgentEnvelope({ command, status: "ok", data, ...options });
|
|
1316
1316
|
return !envelope.truncation && Buffer.byteLength(JSON.stringify(envelope), "utf8") <= maxBytes;
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function errorWarnings(error) {
|
|
1319
|
+
const warnings = error?.warnings;
|
|
1320
|
+
return Array.isArray(warnings) && warnings.length ? warnings.filter((w) => typeof w === "string") : undefined;
|
|
1321
|
+
}
|
|
1322
|
+
function createAgentErrorEnvelope(command, error, runId, warnings) {
|
|
1319
1323
|
return createAgentEnvelope({
|
|
1320
1324
|
command,
|
|
1321
1325
|
status: "error",
|
|
1322
1326
|
data: null,
|
|
1327
|
+
warnings: warnings ?? [],
|
|
1323
1328
|
meta: runId ? { run_id: runId } : undefined,
|
|
1324
1329
|
summary: {
|
|
1325
1330
|
text: error.message,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolvePromptSource,
|
|
14
14
|
safePromptEvidencePath,
|
|
15
15
|
scanHarness
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-5tsqk3jt.js";
|
|
17
17
|
import {
|
|
18
18
|
SKILL_SOURCE_HARNESS,
|
|
19
19
|
SKILL_SOURCE_INTEGRATION_BUNDLED,
|
|
@@ -26,9 +26,11 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
isAuthSessionValid,
|
|
28
28
|
loadAuthSession
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-rycpwqzm.js";
|
|
30
30
|
import {
|
|
31
31
|
CliInputError,
|
|
32
|
+
EXIT_ERROR,
|
|
33
|
+
EXIT_OK,
|
|
32
34
|
createCommandContext,
|
|
33
35
|
ensureSecretFilePermissions,
|
|
34
36
|
getActiveProfile,
|
|
@@ -43,7 +45,7 @@ import {
|
|
|
43
45
|
resolveTenantId,
|
|
44
46
|
secretFilePathFromRef,
|
|
45
47
|
validateConfig
|
|
46
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-8c60k2p4.js";
|
|
47
49
|
import {
|
|
48
50
|
__commonJS,
|
|
49
51
|
__require,
|
|
@@ -5638,62 +5640,73 @@ async function runPromptAb(flags, profileOptions, context) {
|
|
|
5638
5640
|
`);
|
|
5639
5641
|
}
|
|
5640
5642
|
const writeOptions = warnings.length ? { warnings } : undefined;
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5643
|
+
try {
|
|
5644
|
+
const enqueue = await callControlAPI(`/tenants/${encodeURIComponent(tenantId)}/replay-sets/${encodeURIComponent(replaySetId)}/run`, {
|
|
5645
|
+
method: "POST",
|
|
5646
|
+
body: JSON.stringify({
|
|
5647
|
+
promptArms,
|
|
5648
|
+
seedsPerCase,
|
|
5649
|
+
assistantModel: assistantModel || undefined,
|
|
5650
|
+
promotePrimary: flags.promote === "true" && flags["no-promote"] !== "true",
|
|
5651
|
+
...plan.kind === "existing" ? replayCasePin(plan.caseIds) : {}
|
|
5652
|
+
})
|
|
5653
|
+
}, profileOptions, { timeoutMs: 120000, retries: 0 });
|
|
5654
|
+
if (context.outputMode === "human")
|
|
5655
|
+
warnIfQueued(enqueue);
|
|
5656
|
+
const noWait = flags.wait === "false" || flags["no-wait"] === "true";
|
|
5657
|
+
if (noWait) {
|
|
5658
|
+
context.output.writeData({
|
|
5659
|
+
replaySetId,
|
|
5660
|
+
...caseSources ? { caseSources } : {},
|
|
5661
|
+
...warnings.length ? { warnings } : {},
|
|
5662
|
+
runId: enqueue.runId,
|
|
5663
|
+
status: enqueue.status,
|
|
5664
|
+
message: enqueue.message ?? "Replay comparison queued",
|
|
5665
|
+
plannedPlayouts
|
|
5666
|
+
}, writeOptions);
|
|
5667
|
+
return EXIT_OK;
|
|
5668
|
+
}
|
|
5669
|
+
const deadline = Date.now() + timeoutMs;
|
|
5670
|
+
let latest = null;
|
|
5671
|
+
while (Date.now() < deadline) {
|
|
5672
|
+
latest = await fetchLatestRun(tenantId, replaySetId, enqueue.runId, profileOptions);
|
|
5673
|
+
const status = latest.run?.status ?? "";
|
|
5674
|
+
const runId = latest.run?.runId ?? "";
|
|
5675
|
+
if (TERMINAL_RUN_STATUSES.has(status) && runId === enqueue.runId) {
|
|
5676
|
+
break;
|
|
5677
|
+
}
|
|
5678
|
+
if (context.outputMode === "human") {
|
|
5679
|
+
process.stderr.write(`Waiting for replay run (${waitLabel(latest.run)})...
|
|
5680
|
+
`);
|
|
5681
|
+
}
|
|
5682
|
+
await sleep(pollIntervalMs);
|
|
5683
|
+
}
|
|
5684
|
+
if (!latest?.run || latest.run.runId !== enqueue.runId || !TERMINAL_RUN_STATUSES.has(latest.run.status)) {
|
|
5685
|
+
throw new Error(`Timed out after ${timeoutMs}ms waiting for replay run ${enqueue.runId} to finish`);
|
|
5686
|
+
}
|
|
5687
|
+
const result = {
|
|
5656
5688
|
replaySetId,
|
|
5657
5689
|
...caseSources ? { caseSources } : {},
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
let latest = null;
|
|
5667
|
-
while (Date.now() < deadline) {
|
|
5668
|
-
latest = await fetchLatestRun(tenantId, replaySetId, enqueue.runId, profileOptions);
|
|
5669
|
-
const status = latest.run?.status ?? "";
|
|
5670
|
-
const runId = latest.run?.runId ?? "";
|
|
5671
|
-
if (TERMINAL_RUN_STATUSES.has(status) && runId === enqueue.runId) {
|
|
5672
|
-
break;
|
|
5673
|
-
}
|
|
5690
|
+
...warnings.length ? { warnings } : {},
|
|
5691
|
+
plannedPlayouts,
|
|
5692
|
+
runId: latest.run.runId,
|
|
5693
|
+
status: latest.run.status,
|
|
5694
|
+
verdict: formatVerdict(latest),
|
|
5695
|
+
run: { ...latest.run },
|
|
5696
|
+
cases: latest.cases.map((row) => ({ ...row }))
|
|
5697
|
+
};
|
|
5674
5698
|
if (context.outputMode === "human") {
|
|
5675
|
-
|
|
5676
|
-
`);
|
|
5699
|
+
printHumanVerdict(result);
|
|
5677
5700
|
}
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
plannedPlayouts,
|
|
5687
|
-
runId: latest.run.runId,
|
|
5688
|
-
status: latest.run.status,
|
|
5689
|
-
verdict: formatVerdict(latest),
|
|
5690
|
-
run: { ...latest.run },
|
|
5691
|
-
cases: latest.cases.map((row) => ({ ...row }))
|
|
5692
|
-
};
|
|
5693
|
-
if (context.outputMode === "human") {
|
|
5694
|
-
printHumanVerdict(result);
|
|
5701
|
+
const failed = result.status === "error";
|
|
5702
|
+
context.output.writeData(result, { ...writeOptions, ...failed ? { status: "error" } : {} });
|
|
5703
|
+
return failed ? EXIT_ERROR : EXIT_OK;
|
|
5704
|
+
} catch (error) {
|
|
5705
|
+
if (warnings.length && error && typeof error === "object") {
|
|
5706
|
+
Object.assign(error, { warnings });
|
|
5707
|
+
}
|
|
5708
|
+
throw error;
|
|
5695
5709
|
}
|
|
5696
|
-
context.output.writeData(result, writeOptions);
|
|
5697
5710
|
}
|
|
5698
5711
|
function warnIfQueued(enqueue) {
|
|
5699
5712
|
const { runsAhead, maxActiveRuns } = enqueue;
|
|
@@ -5955,7 +5968,7 @@ async function createSetFromTraces(conversationIds, flags, tenantId, profileOpti
|
|
|
5955
5968
|
}
|
|
5956
5969
|
const warnings = [];
|
|
5957
5970
|
if (fallback.length) {
|
|
5958
|
-
const why = unavailable ? `Moda could not distill these traces (${unavailable.slice(0,
|
|
5971
|
+
const why = unavailable ? `Moda could not distill these traces (${unavailable.slice(0, 600)})` : "Moda could not distill a scenario for these traces";
|
|
5959
5972
|
warnings.push(`${why}, so ${fallback.length} of ${traces.length} case(s) use only the opening user message and three generic ` + `success criteria, which long traces pass easily: ${fallback.slice(0, 10).join(", ")}${fallback.length > 10 ? ", …" : ""}. ` + "Edit their scenario/criteria in the dashboard, or pass --set-id with a curated set.");
|
|
5960
5973
|
}
|
|
5961
5974
|
return { setId: set.id, caseSources: { distilled, fallback }, warnings };
|
|
@@ -6599,8 +6612,7 @@ async function runPromptsCommand(input, legacyFlags, legacyProfileOptions) {
|
|
|
6599
6612
|
await promotePrompt(positionals, flags, profileOptions, context);
|
|
6600
6613
|
break;
|
|
6601
6614
|
case "ab":
|
|
6602
|
-
|
|
6603
|
-
break;
|
|
6615
|
+
return runPromptAb(flags, profileOptions, context);
|
|
6604
6616
|
case "propose":
|
|
6605
6617
|
await runPromptPropose(positionals, flags, profileOptions, context);
|
|
6606
6618
|
break;
|
|
@@ -6615,6 +6627,7 @@ async function runPromptsCommand(input, legacyFlags, legacyProfileOptions) {
|
|
|
6615
6627
|
default:
|
|
6616
6628
|
throw new Error(`Unknown prompts command '${subcommand}'. Use init, status, diff, sync, promote, ab, propose, list, show, proposals, usage, replay-runs, or decide.`);
|
|
6617
6629
|
}
|
|
6630
|
+
return 0;
|
|
6618
6631
|
}
|
|
6619
6632
|
async function initPrompts(options = {}) {
|
|
6620
6633
|
const cwd = process.cwd();
|
|
@@ -6698,7 +6711,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
|
|
|
6698
6711
|
const analyzedDefinitions = new Map;
|
|
6699
6712
|
if (flags["no-analyze"] !== "true") {
|
|
6700
6713
|
options.onProgress?.("Analyzing prompt sources before sync.");
|
|
6701
|
-
const { analyzeHarnessPrompts } = await import("./harness-
|
|
6714
|
+
const { analyzeHarnessPrompts } = await import("./harness-sqngqjrd.js");
|
|
6702
6715
|
const result = await analyzeHarnessPrompts({
|
|
6703
6716
|
rootDir: process.cwd(),
|
|
6704
6717
|
existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authFetch,
|
|
3
3
|
getCachedLoginContext
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-rycpwqzm.js";
|
|
5
5
|
import {
|
|
6
6
|
CliAccessError,
|
|
7
7
|
CliInputError,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveTenantIdFromActiveProfile,
|
|
16
16
|
saveCliConfig,
|
|
17
17
|
writeSecretJsonFile
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-8c60k2p4.js";
|
|
19
19
|
|
|
20
20
|
// src/init/tenant.ts
|
|
21
21
|
import { randomUUID } from "node:crypto";
|
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
runPromptsCommand,
|
|
9
9
|
runSkillsCommand,
|
|
10
10
|
runStatusCommand
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-ewerh7e2.js";
|
|
12
12
|
import {
|
|
13
13
|
ApiError,
|
|
14
14
|
HARNESS_REPORT_APPROVAL_PATH,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
terminalStyles,
|
|
38
38
|
unknownSignalsSubcommandError,
|
|
39
39
|
validateHarnessReport
|
|
40
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-5tsqk3jt.js";
|
|
41
41
|
import"./cli-ssfq84k5.js";
|
|
42
42
|
import {
|
|
43
43
|
authFetch,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
loadAuthSession,
|
|
47
47
|
login,
|
|
48
48
|
revokeCliSessionToken
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-rycpwqzm.js";
|
|
50
50
|
import {
|
|
51
51
|
AGENT_ERROR_CODES,
|
|
52
52
|
CliAccessError,
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
validateConfig,
|
|
96
96
|
wasOutputCancelled,
|
|
97
97
|
writeSecretJsonFile
|
|
98
|
-
} from "./cli-
|
|
98
|
+
} from "./cli-8c60k2p4.js";
|
|
99
99
|
import {
|
|
100
100
|
__require
|
|
101
101
|
} from "./cli-0v6na3yp.js";
|
|
@@ -8330,8 +8330,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
8330
8330
|
assertHandParsedFlags(command, flags, positionals);
|
|
8331
8331
|
switch (command) {
|
|
8332
8332
|
case "prompts": {
|
|
8333
|
-
|
|
8334
|
-
break;
|
|
8333
|
+
return runPromptsCommand(context);
|
|
8335
8334
|
}
|
|
8336
8335
|
case "overview": {
|
|
8337
8336
|
const args = flagsToArgs(flags);
|
|
@@ -9375,7 +9374,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
9375
9374
|
resetApiRequestCountBeforeRun: true,
|
|
9376
9375
|
telemetry: "result",
|
|
9377
9376
|
handler: async (context) => {
|
|
9378
|
-
const { runInit } = await import("./index-
|
|
9377
|
+
const { runInit } = await import("./index-n8vtc24p.js");
|
|
9379
9378
|
if (context.outputMode === "agent-stream") {
|
|
9380
9379
|
context.output.writeEvent({
|
|
9381
9380
|
event: "started",
|
|
@@ -9416,7 +9415,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
9416
9415
|
resetApiRequestCountBeforeRun: true,
|
|
9417
9416
|
telemetry: "result-and-error",
|
|
9418
9417
|
handler: async (context) => {
|
|
9419
|
-
const { runProvision } = await import("./provision-
|
|
9418
|
+
const { runProvision } = await import("./provision-02wqtkvm.js");
|
|
9420
9419
|
return runProvision(context, {
|
|
9421
9420
|
resumeCommand: buildResumeCommand("provision", context.rawFlags)
|
|
9422
9421
|
});
|
|
@@ -42,8 +42,8 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
46
|
-
import"./cli-
|
|
45
|
+
} from "./cli-5tsqk3jt.js";
|
|
46
|
+
import"./cli-8c60k2p4.js";
|
|
47
47
|
import"./cli-0v6na3yp.js";
|
|
48
48
|
export {
|
|
49
49
|
writeHumanProgress,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
initPrompts,
|
|
4
4
|
runPromptSync,
|
|
5
5
|
runSkillSync
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-ewerh7e2.js";
|
|
7
7
|
import {
|
|
8
8
|
codingAgentDisplayName,
|
|
9
9
|
describeCodingAgentEvent,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
runHarnessCommand,
|
|
23
23
|
startRemoteAnalyze,
|
|
24
24
|
stripAnsi
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-5tsqk3jt.js";
|
|
26
26
|
import {
|
|
27
27
|
bundledSkillsDir,
|
|
28
28
|
installIntegrationSkill,
|
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
} from "./cli-ssfq84k5.js";
|
|
35
35
|
import {
|
|
36
36
|
selectTenantAndCreateKey
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-j2fapt3g.js";
|
|
38
38
|
import {
|
|
39
39
|
ConnectCodeError,
|
|
40
40
|
connectWithCode,
|
|
41
41
|
loadAuthSession,
|
|
42
42
|
loadToken,
|
|
43
43
|
login
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-rycpwqzm.js";
|
|
45
45
|
import {
|
|
46
46
|
CliAuthError,
|
|
47
47
|
CliInputError,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
createCommandContext,
|
|
50
50
|
resolveIngestUrl,
|
|
51
51
|
resolveModaBaseUrl
|
|
52
|
-
} from "./cli-
|
|
52
|
+
} from "./cli-8c60k2p4.js";
|
|
53
53
|
import"./cli-0v6na3yp.js";
|
|
54
54
|
|
|
55
55
|
// src/init/index.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-j2fapt3g.js";
|
|
4
4
|
import {
|
|
5
5
|
loadAuthSession
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-rycpwqzm.js";
|
|
7
7
|
import {
|
|
8
8
|
CliAuthError,
|
|
9
9
|
resolveIngestUrl,
|
|
10
10
|
resolveModaBaseUrl,
|
|
11
11
|
stringOption
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-8c60k2p4.js";
|
|
13
13
|
import"./cli-0v6na3yp.js";
|
|
14
14
|
|
|
15
15
|
// src/provision.ts
|
package/package.json
CHANGED