@moda-ai/cli 1.55.42 → 1.55.44
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/README.md +1 -1
- package/dist/{agent-86hghww1.js → agent-5ax7fqhe.js} +9 -8
- package/dist/{cli-daqkdnm1.js → cli-4pc0a18x.js} +1 -1
- package/dist/{cli-1z1sx8dg.js → cli-5aa48ry5.js} +5 -4
- package/dist/{cli-xddtv3yn.js → cli-8pcq2et6.js} +2 -40
- package/dist/{cli-hjm9151g.js → cli-8pksf2x7.js} +5 -5
- package/dist/{cli-vwpbspr5.js → cli-d4cdczhe.js} +5 -5
- package/dist/{cli-0xc5htv7.js → cli-dmm9jm9m.js} +1 -1
- package/dist/cli-e0kbye4s.js +39 -0
- package/dist/{cli-t0pb7qbs.js → cli-e24fjyrb.js} +118 -10
- package/dist/{cli-gt3yq1y5.js → cli-k2ka2kjb.js} +184 -2
- package/dist/{cli-pmzh2qjy.js → cli-sejqvvhv.js} +14 -6
- package/dist/{cli-srwzar82.js → cli-t4xfvrry.js} +34 -15
- package/dist/{cli-4sy4tytm.js → cli-tztzrh6b.js} +19 -5
- package/dist/{cli-he8csgsr.js → cli-wwbr5caw.js} +8 -8
- package/dist/{cli-77ekrx7d.js → cli-xcpwp0gb.js} +14 -7
- package/dist/{cli-mxfyq5nq.js → cli-xx0pjzkh.js} +4 -4
- package/dist/cli.js +82 -41
- package/dist/{doctor-c05njdv8.js → doctor-k4tdgvgv.js} +8 -7
- package/dist/{fix-aghp304m.js → fix-nk5xffz8.js} +4 -4
- package/dist/{harness-vabp33ak.js → harness-avynbq4f.js} +6 -5
- package/dist/{harness-github-actions-112503xs.js → harness-github-actions-gd6vyxb0.js} +6 -5
- package/dist/{index-dtxvvcq2.js → index-63k2a6gb.js} +12 -11
- package/dist/{production-intelligence-e5vsc6cw.js → production-intelligence-sv3qx7f4.js} +24 -7
- package/dist/{profile-commands-se9947c1.js → profile-commands-mh3kfqkn.js} +98 -20
- package/dist/{prompt-attribution-pbns1ya3.js → prompt-attribution-wvvnzw4m.js} +6 -5
- package/dist/prompt-source-mcp.js +6 -5
- package/dist/{prompts-ab-f5qrvpkt.js → prompts-ab-y7egdzg4.js} +8 -7
- package/dist/{prompts-propose-jg2j41wx.js → prompts-propose-5nw25v9a.js} +8 -7
- package/dist/{prompts-qppk0mhp.js → prompts-snnbyxmz.js} +6 -5
- package/dist/{provision-cya5rpxa.js → provision-t1dpzcjp.js} +6 -5
- package/dist/{registry-8a1940sr.js → registry-8zkxefjs.js} +3 -3
- package/dist/{skills-sh93b156.js → skills-d4215fa9.js} +6 -5
- package/dist/{sync-0pp1c8hs.js → sync-17f9yxb1.js} +8 -7
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +6 -3
- package/skills/moda-cli/references/auth.md +16 -7
- package/skills/moda-cli/references/commands.md +4 -2
- package/skills/moda-cli/references/dashboard-parity.md +3 -0
- package/skills/moda-cli/references/detections.md +20 -0
- package/skills/moda-cli/references/output-protocol.md +1 -1
- package/skills/moda-cli/references/production-intelligence.md +48 -0
- package/skills/moda-cli/references/search-and-traces.md +3 -1
- package/skills/moda-cli/references/troubleshooting.md +14 -0
package/dist/cli.js
CHANGED
|
@@ -6,31 +6,37 @@ import {
|
|
|
6
6
|
asNumber,
|
|
7
7
|
asRecord,
|
|
8
8
|
asString,
|
|
9
|
+
assertCompareScope,
|
|
9
10
|
collectBatchTargets,
|
|
10
11
|
compactProblemDossier,
|
|
11
12
|
contextTarget,
|
|
12
13
|
embeddedWindowSize,
|
|
13
14
|
frustrationsFromEmotions,
|
|
15
|
+
loadFamilyCompare,
|
|
14
16
|
mapWithConcurrency,
|
|
15
17
|
parseBatchTarget,
|
|
16
18
|
parseTargetLines,
|
|
19
|
+
problemTrendSummary,
|
|
17
20
|
readIdsFrom,
|
|
18
21
|
shapeToolCatalogDetail,
|
|
19
22
|
toolCatalogGetCommand,
|
|
20
23
|
toolFailureExamplesCommand,
|
|
21
24
|
trimToolFailureConversations,
|
|
22
25
|
withFrustrationAnchors,
|
|
26
|
+
withSummaryCompare,
|
|
23
27
|
withToolFailureAnchors,
|
|
24
28
|
withoutDetectionWindows
|
|
25
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-k2ka2kjb.js";
|
|
30
|
+
import {
|
|
31
|
+
createCommandContext
|
|
32
|
+
} from "./cli-8pcq2et6.js";
|
|
26
33
|
import {
|
|
27
|
-
createCommandContext,
|
|
28
34
|
envOptOutSet,
|
|
29
35
|
envSwitchedOff,
|
|
30
36
|
optOutFlagSet,
|
|
31
37
|
parseBooleanFlagValue,
|
|
32
38
|
withoutFlag
|
|
33
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-e0kbye4s.js";
|
|
34
40
|
import {
|
|
35
41
|
AuditSchema,
|
|
36
42
|
BOOK_PROBLEM_SORTS,
|
|
@@ -81,12 +87,12 @@ import {
|
|
|
81
87
|
unknownSignalsSubcommandError,
|
|
82
88
|
usageLine,
|
|
83
89
|
writeDryRun
|
|
84
|
-
} from "./cli-
|
|
90
|
+
} from "./cli-tztzrh6b.js";
|
|
85
91
|
import {
|
|
86
92
|
ApiError,
|
|
87
93
|
callControlAPI,
|
|
88
94
|
callDataAPI
|
|
89
|
-
} from "./cli-
|
|
95
|
+
} from "./cli-dmm9jm9m.js";
|
|
90
96
|
import {
|
|
91
97
|
AGENT_ERROR_CODES,
|
|
92
98
|
EXIT_AUTH_REQUIRED,
|
|
@@ -123,7 +129,7 @@ import {
|
|
|
123
129
|
shellArg,
|
|
124
130
|
validateConfig,
|
|
125
131
|
wasOutputCancelled
|
|
126
|
-
} from "./cli-
|
|
132
|
+
} from "./cli-e24fjyrb.js";
|
|
127
133
|
import {
|
|
128
134
|
CliAccessError,
|
|
129
135
|
CliAuthError,
|
|
@@ -1357,7 +1363,7 @@ var CANONICAL_LEAVES = [
|
|
|
1357
1363
|
args: "<problem_id>",
|
|
1358
1364
|
handler: "problem",
|
|
1359
1365
|
summary: "One Problem: dossier, its --evidence/--reports/--traces/--feedback pages, or --view=dream",
|
|
1360
|
-
examples: ["moda problems get <problem_id>", "moda problems get <problem_id> --view=dream", "moda problems get <problem_id> --evidence --limit=10", "moda problems get <problem_id> --traces --family=tool_failure"]
|
|
1366
|
+
examples: ["moda problems get <problem_id>", "moda problems get <problem_id> --view=dream", "moda problems get <problem_id> --evidence --limit=10", "moda problems get <problem_id> --traces --family=tool_failure", "moda problems get <problem_id> --trend --days-back=14"]
|
|
1361
1367
|
},
|
|
1362
1368
|
{
|
|
1363
1369
|
noun: "problems",
|
|
@@ -1425,7 +1431,8 @@ var CANONICAL_LEAVES = [
|
|
|
1425
1431
|
"moda detections list --family=frustration --limit=10",
|
|
1426
1432
|
"moda detections list --family=emotion:confusion --days-back=14",
|
|
1427
1433
|
"moda detections list --family=hallucination --kind=contradicted",
|
|
1428
|
-
"moda detections list --family=custom_signal --signal-id=<signal_id>"
|
|
1434
|
+
"moda detections list --family=custom_signal --signal-id=<signal_id>",
|
|
1435
|
+
"moda detections list --family=frustration --compare --days-back=7"
|
|
1429
1436
|
]
|
|
1430
1437
|
},
|
|
1431
1438
|
{
|
|
@@ -3241,46 +3248,46 @@ function leafManifestFields(leaf, commands) {
|
|
|
3241
3248
|
import { fileURLToPath } from "url";
|
|
3242
3249
|
import { realpathSync } from "fs";
|
|
3243
3250
|
async function runPromptsCommand(...args) {
|
|
3244
|
-
return (await import("./prompts-
|
|
3251
|
+
return (await import("./prompts-snnbyxmz.js")).runPromptsCommand(...args);
|
|
3245
3252
|
}
|
|
3246
3253
|
async function runSkillsCommand(...args) {
|
|
3247
|
-
return (await import("./skills-
|
|
3254
|
+
return (await import("./skills-d4215fa9.js")).runSkillsCommand(...args);
|
|
3248
3255
|
}
|
|
3249
3256
|
async function runFixCommand(...args) {
|
|
3250
|
-
return (await import("./fix-
|
|
3257
|
+
return (await import("./fix-nk5xffz8.js")).runFixCommand(...args);
|
|
3251
3258
|
}
|
|
3252
3259
|
async function runFixesCommand(...args) {
|
|
3253
|
-
return (await import("./fix-
|
|
3260
|
+
return (await import("./fix-nk5xffz8.js")).runFixesCommand(...args);
|
|
3254
3261
|
}
|
|
3255
3262
|
async function runHarnessCommand(...args) {
|
|
3256
|
-
return (await import("./harness-
|
|
3263
|
+
return (await import("./harness-avynbq4f.js")).runHarnessCommand(...args);
|
|
3257
3264
|
}
|
|
3258
3265
|
async function runSyncCommand(...args) {
|
|
3259
|
-
return (await import("./sync-
|
|
3266
|
+
return (await import("./sync-17f9yxb1.js")).runSyncCommand(...args);
|
|
3260
3267
|
}
|
|
3261
3268
|
async function runRegistryCommand(...args) {
|
|
3262
|
-
return (await import("./registry-
|
|
3269
|
+
return (await import("./registry-8zkxefjs.js")).runRegistryCommand(...args);
|
|
3263
3270
|
}
|
|
3264
3271
|
async function runDoctorCommand(...args) {
|
|
3265
|
-
return (await import("./doctor-
|
|
3272
|
+
return (await import("./doctor-k4tdgvgv.js")).runDoctorCommand(...args);
|
|
3266
3273
|
}
|
|
3267
3274
|
async function runStatusCommand(...args) {
|
|
3268
|
-
return (await import("./doctor-
|
|
3275
|
+
return (await import("./doctor-k4tdgvgv.js")).runStatusCommand(...args);
|
|
3269
3276
|
}
|
|
3270
3277
|
async function runAuthCommand(...args) {
|
|
3271
|
-
return (await import("./profile-commands-
|
|
3278
|
+
return (await import("./profile-commands-mh3kfqkn.js")).runAuthCommand(...args);
|
|
3272
3279
|
}
|
|
3273
3280
|
async function runConfigCommand(...args) {
|
|
3274
|
-
return (await import("./profile-commands-
|
|
3281
|
+
return (await import("./profile-commands-mh3kfqkn.js")).runConfigCommand(...args);
|
|
3275
3282
|
}
|
|
3276
3283
|
async function runProfilesCommand(...args) {
|
|
3277
|
-
return (await import("./profile-commands-
|
|
3284
|
+
return (await import("./profile-commands-mh3kfqkn.js")).runProfilesCommand(...args);
|
|
3278
3285
|
}
|
|
3279
3286
|
async function runAgentCommand(...args) {
|
|
3280
|
-
return (await import("./agent-
|
|
3287
|
+
return (await import("./agent-5ax7fqhe.js")).runAgentCommand(...args);
|
|
3281
3288
|
}
|
|
3282
3289
|
async function runProductionCommand(...args) {
|
|
3283
|
-
return (await import("./production-intelligence-
|
|
3290
|
+
return (await import("./production-intelligence-sv3qx7f4.js")).runProductionCommand(...args);
|
|
3284
3291
|
}
|
|
3285
3292
|
function parseArgs(argv) {
|
|
3286
3293
|
const args = argv.slice(2);
|
|
@@ -4571,6 +4578,13 @@ async function searchFallbackToTraces(params) {
|
|
|
4571
4578
|
params.until ? `--until=${shellArg(params.until)}` : "",
|
|
4572
4579
|
`--limit=${limit}`
|
|
4573
4580
|
].filter(Boolean).join(" ");
|
|
4581
|
+
if (params.mode === "keyword") {
|
|
4582
|
+
return {
|
|
4583
|
+
kind: "notice",
|
|
4584
|
+
warning: "Message-level keyword search returned 0 results. No trace-level search was run: `moda traces --search` ranks by relevance (its results may not contain the exact words), so it cannot answer --mode=keyword. " + (params.originalMessagesRead ? "The original messages in this window were also read for a literal match." : "Zero results here does NOT mean the words never appear; the message index may be incomplete."),
|
|
4585
|
+
nextCommands: [{ command: tracesCommand, purpose: "See relevance-ranked trace-level results (they may not contain the exact words).", mutability: "read", requires_approval: false }]
|
|
4586
|
+
};
|
|
4587
|
+
}
|
|
4574
4588
|
let traces;
|
|
4575
4589
|
try {
|
|
4576
4590
|
traces = asRecord(await callDataAPI(`/conversations?${query2.toString()}`)) ?? {};
|
|
@@ -4590,13 +4604,6 @@ async function searchFallbackToTraces(params) {
|
|
|
4590
4604
|
const serverHasMore = pagination?.has_more === true;
|
|
4591
4605
|
const traceMode = asString(traces.search_mode) ?? "keyword";
|
|
4592
4606
|
const literal = traceMode === "keyword";
|
|
4593
|
-
if (params.mode === "keyword" && !literal) {
|
|
4594
|
-
return {
|
|
4595
|
-
kind: "notice",
|
|
4596
|
-
warning: `Message-level keyword search returned 0 results. Trace-level search is only available ${traceMode}-ranked here (results may not contain the exact words), so none are substituted for --mode=keyword. Zero results here does NOT mean the words never appear; the message index may be incomplete.`,
|
|
4597
|
-
nextCommands: [{ command: tracesCommand, purpose: "See ranked trace-level results instead.", mutability: "read", requires_approval: false }]
|
|
4598
|
-
};
|
|
4599
|
-
}
|
|
4600
4607
|
const results = rows.map((row) => ({
|
|
4601
4608
|
match_grain: "trace",
|
|
4602
4609
|
conversation_id: row.conversation_id,
|
|
@@ -5943,7 +5950,11 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
5943
5950
|
warnings.push(`--offset=${params.offset} was not applied: message-level search is not pageable (it returns the top --limit hits). --offset only pages the trace-level fallback. Narrow with --time-range/--user-id or raise --limit instead.`);
|
|
5944
5951
|
}
|
|
5945
5952
|
if (results.length === 0 && !params.conversation_id) {
|
|
5946
|
-
const fallback = await searchFallbackToTraces({
|
|
5953
|
+
const fallback = await searchFallbackToTraces({
|
|
5954
|
+
...params,
|
|
5955
|
+
offset: params.offset,
|
|
5956
|
+
originalMessagesRead: asRecord(searchRecord.coverage)?.original_messages_search === "used"
|
|
5957
|
+
});
|
|
5947
5958
|
if (fallback?.kind === "notice") {
|
|
5948
5959
|
warnings.push(fallback.warning);
|
|
5949
5960
|
context.output.writeData(data, { warnings, nextCommands: fallback.nextCommands });
|
|
@@ -6058,6 +6069,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6058
6069
|
case "frustrations": {
|
|
6059
6070
|
const args = flagsToArgs(flags);
|
|
6060
6071
|
const params = parseSpecFlags("frustrations", args, command);
|
|
6072
|
+
const compare = params.compare === true ? await loadFamilyCompare("frustrations", params) : undefined;
|
|
6061
6073
|
const query2 = new URLSearchParams;
|
|
6062
6074
|
if (params.days_back)
|
|
6063
6075
|
query2.set("days_back", params.days_back.toString());
|
|
@@ -6068,7 +6080,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6068
6080
|
if (readsPerTrace("frustrations", params, ["user_id", "conversation_id", "conversation_ids", "ids_from", "include_window"])) {
|
|
6069
6081
|
query2.set("family", "frustration");
|
|
6070
6082
|
setTraceFilters(query2, params, TRACE_GRAIN_FLAGS.frustrations);
|
|
6071
|
-
const data2 = await callDataAPI(`/emotions?${query2.toString()}`);
|
|
6083
|
+
const data2 = withSummaryCompare(await callDataAPI(`/emotions?${query2.toString()}`), compare);
|
|
6072
6084
|
const warnings = processingDisabledWarning(data2, "frustration");
|
|
6073
6085
|
context.output.writeData(data2, withCohortScope(params.cohort, data2, { summary: countingSummary(data2), warnings }));
|
|
6074
6086
|
break;
|
|
@@ -6086,7 +6098,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6086
6098
|
if (agentMode && !includeWindow)
|
|
6087
6099
|
query2.set("include_context", "0");
|
|
6088
6100
|
const data = frustrationsFromEmotions(await callDataAPI(`/emotions?${query2.toString()}`));
|
|
6089
|
-
const anchored = withFrustrationAnchors(data);
|
|
6101
|
+
const anchored = withSummaryCompare(withFrustrationAnchors(data), compare);
|
|
6090
6102
|
await printWithOptionalWindows(agentMode && !includeWindow ? withoutDetectionWindows(anchored, "frustrations", "conversation") : anchored, "frustrations", includeWindow, params.window ?? 1, context.output, processingDisabledWarning(data, "frustration"), agentMode && includeWindow ? (payload) => withoutRepeatedFrustrationWindow(payload) : undefined, [], countingSummary(data));
|
|
6091
6103
|
break;
|
|
6092
6104
|
}
|
|
@@ -6099,7 +6111,13 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6099
6111
|
if (params.cohort)
|
|
6100
6112
|
tfQuery.set("cohort", params.cohort);
|
|
6101
6113
|
const queryString = tfQuery.toString() ? `?${tfQuery.toString()}` : "";
|
|
6102
|
-
|
|
6114
|
+
if (params.compare === true)
|
|
6115
|
+
assertCompareScope("tool-failures", params);
|
|
6116
|
+
const [listed, compare] = await Promise.all([
|
|
6117
|
+
callDataAPI(`/tool-failures${queryString}`),
|
|
6118
|
+
params.compare === true ? loadFamilyCompare("tool-failures", params) : Promise.resolve(undefined)
|
|
6119
|
+
]);
|
|
6120
|
+
const data = withSummaryCompare(listed, compare);
|
|
6103
6121
|
const daysBack = params.days_back ?? 7;
|
|
6104
6122
|
const failing = (Array.isArray(asRecord(data)?.tools) ? asRecord(data).tools : []).map((row) => asString(asRecord(row)?.tool_name)).filter((name) => Boolean(name)).slice(0, TOOL_FAILURE_CATALOG_LINKS);
|
|
6105
6123
|
const nextCommands = failing.flatMap((name, index) => [
|
|
@@ -6305,11 +6323,21 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6305
6323
|
}
|
|
6306
6324
|
const args = flagsToArgs(flags, "id", positional);
|
|
6307
6325
|
const params = parseSpecFlags("problem", args, command);
|
|
6326
|
+
if (params.trend === true) {
|
|
6327
|
+
rejectInapplicableFlags(command, params, ["evidence", "reports", "traces", "conversations", "feedback", "full", "limit", "cursor", "family", "door", "view", "offset"], "with --trend; it reads the Problem's per-day history (only --days-back applies)");
|
|
6328
|
+
const query3 = params.days_back ? `?days_back=${params.days_back}` : "";
|
|
6329
|
+
const data2 = await callDataAPI(`/problems/${encodeURIComponent(params.id)}/history${query3}`);
|
|
6330
|
+
context.output.writeData(data2, {
|
|
6331
|
+
summary: problemTrendSummary(data2),
|
|
6332
|
+
nextCommands: [{ command: `moda problems get ${shellArg(params.id)}`, purpose: "Open the Problem dossier.", mutability: "read", requires_approval: false }]
|
|
6333
|
+
});
|
|
6334
|
+
break;
|
|
6335
|
+
}
|
|
6308
6336
|
if (params.view === "dream") {
|
|
6309
6337
|
await runDreamProblem(params, context, command);
|
|
6310
6338
|
break;
|
|
6311
6339
|
}
|
|
6312
|
-
rejectInapplicableFlags(command, params, ["offset", "days_back"], "without --view=dream; the dossier pages page with --limit and --cursor");
|
|
6340
|
+
rejectInapplicableFlags(command, params, ["offset", "days_back"], "without --view=dream or --trend; the dossier pages page with --limit and --cursor");
|
|
6313
6341
|
const traceView = params.traces === true || params.conversations === true;
|
|
6314
6342
|
const views = ["evidence", "reports", "conversations", "feedback"].filter((view2) => view2 === "conversations" ? traceView : params[view2] === true);
|
|
6315
6343
|
if (views.length > 1) {
|
|
@@ -6738,6 +6766,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6738
6766
|
case "emotions": {
|
|
6739
6767
|
const args = flagsToArgs(flags);
|
|
6740
6768
|
const params = parseSpecFlags("emotions", args, command);
|
|
6769
|
+
const compare = params.compare === true ? await loadFamilyCompare("emotions", params) : undefined;
|
|
6741
6770
|
const query2 = new URLSearchParams;
|
|
6742
6771
|
if (params.days_back)
|
|
6743
6772
|
query2.set("days_back", params.days_back.toString());
|
|
@@ -6749,7 +6778,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6749
6778
|
query2.set("family", params.family);
|
|
6750
6779
|
if (readsPerTrace("emotions", params, ["user_id", "conversation_id", "conversation_ids", "ids_from", "include_window"])) {
|
|
6751
6780
|
setTraceFilters(query2, params, TRACE_GRAIN_FLAGS.emotions);
|
|
6752
|
-
const data2 = await callDataAPI(`/emotions?${query2.toString()}`);
|
|
6781
|
+
const data2 = withSummaryCompare(await callDataAPI(`/emotions?${query2.toString()}`), compare);
|
|
6753
6782
|
const warnings = processingDisabledWarning(data2, "emotion");
|
|
6754
6783
|
context.output.writeData(data2, withCohortScope(params.cohort, data2, { summary: countingSummary(data2), warnings }));
|
|
6755
6784
|
break;
|
|
@@ -6765,7 +6794,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6765
6794
|
if (agentMode && params.include_window !== true)
|
|
6766
6795
|
query2.set("include_context", "0");
|
|
6767
6796
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
6768
|
-
const raw = await callDataAPI(`/emotions${queryString}`);
|
|
6797
|
+
const raw = withSummaryCompare(await callDataAPI(`/emotions${queryString}`), compare);
|
|
6769
6798
|
const processingWarnings = processingDisabledWarning(raw, "emotion");
|
|
6770
6799
|
const record = asRecord(raw);
|
|
6771
6800
|
const data = agentMode && params.include_window !== true && record ? withoutDetectionWindows(record, "detections", "conversation_context") : raw;
|
|
@@ -6804,7 +6833,13 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6804
6833
|
if (params.order)
|
|
6805
6834
|
query2.set("order", params.order);
|
|
6806
6835
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
6807
|
-
|
|
6836
|
+
if (params.compare === true)
|
|
6837
|
+
assertCompareScope("laziness", params);
|
|
6838
|
+
const [listed, compare] = await Promise.all([
|
|
6839
|
+
callDataAPI(`/laziness${queryString}`),
|
|
6840
|
+
params.compare === true ? loadFamilyCompare("laziness", params) : Promise.resolve(undefined)
|
|
6841
|
+
]);
|
|
6842
|
+
const data = withSummaryCompare(listed, compare);
|
|
6808
6843
|
context.output.writeData(data, withCohortScope(params.cohort, data, { summary: countingSummary(data) }));
|
|
6809
6844
|
break;
|
|
6810
6845
|
}
|
|
@@ -6830,7 +6865,13 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6830
6865
|
query2.set("kind", params.kind);
|
|
6831
6866
|
}
|
|
6832
6867
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
6833
|
-
|
|
6868
|
+
if (params.compare === true)
|
|
6869
|
+
assertCompareScope("hallucinations", params);
|
|
6870
|
+
const [listed, compare] = await Promise.all([
|
|
6871
|
+
callDataAPI(`/hallucinations${queryString}`),
|
|
6872
|
+
params.compare === true ? loadFamilyCompare("hallucinations", params) : Promise.resolve(undefined)
|
|
6873
|
+
]);
|
|
6874
|
+
const data = withSummaryCompare(listed, compare);
|
|
6834
6875
|
context.output.writeData(data, withCohortScope(params.cohort, data, { summary: countingSummary(data) }));
|
|
6835
6876
|
break;
|
|
6836
6877
|
}
|
|
@@ -7020,7 +7061,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
7020
7061
|
resetApiRequestCountBeforeRun: true,
|
|
7021
7062
|
telemetry: "result-and-error",
|
|
7022
7063
|
handler: async (context) => {
|
|
7023
|
-
const { runInit } = await import("./index-
|
|
7064
|
+
const { runInit } = await import("./index-63k2a6gb.js");
|
|
7024
7065
|
if (context.outputMode === "agent-stream") {
|
|
7025
7066
|
context.output.writeEvent({
|
|
7026
7067
|
event: "started",
|
|
@@ -7070,7 +7111,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
7070
7111
|
resetApiRequestCountBeforeRun: true,
|
|
7071
7112
|
telemetry: "result-and-error",
|
|
7072
7113
|
handler: async (context) => {
|
|
7073
|
-
const { runProvision } = await import("./provision-
|
|
7114
|
+
const { runProvision } = await import("./provision-t1dpzcjp.js");
|
|
7074
7115
|
return runProvision(context, {
|
|
7075
7116
|
resumeCommand: buildResumeCommand("provision", context.rawFlags)
|
|
7076
7117
|
});
|
|
@@ -7484,7 +7525,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
7484
7525
|
legacyCommand({
|
|
7485
7526
|
name: "overview",
|
|
7486
7527
|
description: "Harness health briefing from production data",
|
|
7487
|
-
examples: ["moda overview --days-back=30", "moda --agent overview"],
|
|
7528
|
+
examples: ["moda overview --days-back=30", "moda --agent overview", "moda overview --compare --since=2026-10-17T14:00:00Z # after a deploy against the same span before it", "moda overview --series --days-back=14"],
|
|
7488
7529
|
...dataApiDefaults
|
|
7489
7530
|
}),
|
|
7490
7531
|
legacyCommand({
|
|
@@ -3,15 +3,16 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
} from "./cli-t4xfvrry.js";
|
|
7
|
+
import"./cli-sejqvvhv.js";
|
|
8
|
+
import"./cli-wwbr5caw.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
10
|
import"./cli-xq45etg1.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
11
|
+
import"./cli-8pcq2et6.js";
|
|
12
|
+
import"./cli-e0kbye4s.js";
|
|
13
|
+
import"./cli-tztzrh6b.js";
|
|
14
|
+
import"./cli-dmm9jm9m.js";
|
|
15
|
+
import"./cli-e24fjyrb.js";
|
|
15
16
|
import"./cli-k4tqwah4.js";
|
|
16
17
|
import"./cli-9kfxkxmk.js";
|
|
17
18
|
import"./cli-ns5fcnkz.js";
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
DEFAULT_POLL_INTERVAL_MS,
|
|
3
3
|
DEFAULT_WAIT_TIMEOUT_MS,
|
|
4
4
|
fetchLatestRun
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-4pc0a18x.js";
|
|
6
6
|
import {
|
|
7
7
|
assertFlags
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-tztzrh6b.js";
|
|
9
9
|
import {
|
|
10
10
|
callControlAPI
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-dmm9jm9m.js";
|
|
12
12
|
import {
|
|
13
13
|
EXIT_DEGRADED,
|
|
14
14
|
EXIT_ERROR,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolveApiTenantId,
|
|
18
18
|
shellArg,
|
|
19
19
|
validateConfig
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-e24fjyrb.js";
|
|
21
21
|
import {
|
|
22
22
|
CliInputError
|
|
23
23
|
} from "./cli-k4tqwah4.js";
|
|
@@ -40,17 +40,18 @@ import {
|
|
|
40
40
|
writeHarnessAnalyzeResult,
|
|
41
41
|
writeHarnessArtifacts,
|
|
42
42
|
writeHumanProgress
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-d4cdczhe.js";
|
|
44
44
|
import"./cli-xq45etg1.js";
|
|
45
45
|
import"./cli-97fnztpy.js";
|
|
46
46
|
import {
|
|
47
47
|
HARNESS_ANALYZE_CONCERNS
|
|
48
48
|
} from "./cli-cesds766.js";
|
|
49
49
|
import"./cli-qpq84eee.js";
|
|
50
|
-
import"./cli-
|
|
51
|
-
import"./cli-
|
|
52
|
-
import"./cli-
|
|
53
|
-
import"./cli-
|
|
50
|
+
import"./cli-8pcq2et6.js";
|
|
51
|
+
import"./cli-e0kbye4s.js";
|
|
52
|
+
import"./cli-tztzrh6b.js";
|
|
53
|
+
import"./cli-dmm9jm9m.js";
|
|
54
|
+
import"./cli-e24fjyrb.js";
|
|
54
55
|
import"./cli-k4tqwah4.js";
|
|
55
56
|
import"./cli-9kfxkxmk.js";
|
|
56
57
|
import"./cli-ns5fcnkz.js";
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-d4cdczhe.js";
|
|
4
4
|
import"./cli-xq45etg1.js";
|
|
5
5
|
import"./cli-97fnztpy.js";
|
|
6
6
|
import"./cli-cesds766.js";
|
|
7
7
|
import"./cli-qpq84eee.js";
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
8
|
+
import"./cli-8pcq2et6.js";
|
|
9
|
+
import"./cli-e0kbye4s.js";
|
|
10
|
+
import"./cli-tztzrh6b.js";
|
|
11
|
+
import"./cli-dmm9jm9m.js";
|
|
11
12
|
import {
|
|
12
13
|
recordApiRequest
|
|
13
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-e24fjyrb.js";
|
|
14
15
|
import"./cli-k4tqwah4.js";
|
|
15
16
|
import"./cli-9kfxkxmk.js";
|
|
16
17
|
import"./cli-ns5fcnkz.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDoctorReport
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-t4xfvrry.js";
|
|
4
4
|
import {
|
|
5
5
|
selectTenantAndCreateKey
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-5aa48ry5.js";
|
|
7
|
+
import"./cli-xcpwp0gb.js";
|
|
8
8
|
import {
|
|
9
9
|
ConnectCodeError,
|
|
10
10
|
connectWithCode,
|
|
11
11
|
loadAuthSession,
|
|
12
12
|
loadToken,
|
|
13
13
|
login
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-sejqvvhv.js";
|
|
15
15
|
import {
|
|
16
16
|
bundledSkillsDir,
|
|
17
17
|
installIntegrationSkill,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
agentsMdProblem,
|
|
22
22
|
runSkillSync
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-xx0pjzkh.js";
|
|
24
24
|
import"./cli-qm5b1vck.js";
|
|
25
25
|
import {
|
|
26
26
|
detectAgents
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
initPrompts,
|
|
34
34
|
runPromptSync
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-wwbr5caw.js";
|
|
36
36
|
import"./cli-mm48br00.js";
|
|
37
37
|
import {
|
|
38
38
|
codingAgentDisplayName,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
runCodingAgent,
|
|
47
47
|
runHarnessCommand,
|
|
48
48
|
startRemoteAnalyze
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-d4cdczhe.js";
|
|
50
50
|
import {
|
|
51
51
|
canonicalText,
|
|
52
52
|
renderInitBanner,
|
|
@@ -62,16 +62,17 @@ import"./cli-cesds766.js";
|
|
|
62
62
|
import"./cli-qpq84eee.js";
|
|
63
63
|
import {
|
|
64
64
|
createCommandContext
|
|
65
|
-
} from "./cli-
|
|
66
|
-
import"./cli-
|
|
67
|
-
import"./cli-
|
|
65
|
+
} from "./cli-8pcq2et6.js";
|
|
66
|
+
import"./cli-e0kbye4s.js";
|
|
67
|
+
import"./cli-tztzrh6b.js";
|
|
68
|
+
import"./cli-dmm9jm9m.js";
|
|
68
69
|
import {
|
|
69
70
|
VERSION,
|
|
70
71
|
recordApiRequest,
|
|
71
72
|
resolveIngestUrl,
|
|
72
73
|
resolveModaBaseUrl,
|
|
73
74
|
shellArg
|
|
74
|
-
} from "./cli-
|
|
75
|
+
} from "./cli-e24fjyrb.js";
|
|
75
76
|
import {
|
|
76
77
|
CliAuthError,
|
|
77
78
|
CliInputError
|
|
@@ -5,18 +5,23 @@ import {
|
|
|
5
5
|
asString,
|
|
6
6
|
contextTarget,
|
|
7
7
|
frustrationAnchorIndex,
|
|
8
|
-
frustrationsFromEmotions
|
|
9
|
-
|
|
8
|
+
frustrationsFromEmotions,
|
|
9
|
+
loadTrends,
|
|
10
|
+
overviewTrendsQuery,
|
|
11
|
+
renderTrendsHuman,
|
|
12
|
+
trendsSummaryText
|
|
13
|
+
} from "./cli-k2ka2kjb.js";
|
|
10
14
|
import {
|
|
11
15
|
renderMarkdownForTerminal,
|
|
12
16
|
shouldColorTerminalOutput,
|
|
13
17
|
stripAnsi,
|
|
14
18
|
terminalStyles
|
|
15
19
|
} from "./cli-97fnztpy.js";
|
|
20
|
+
import"./cli-e0kbye4s.js";
|
|
16
21
|
import {
|
|
17
22
|
callControlAPI,
|
|
18
23
|
callDataAPI
|
|
19
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-dmm9jm9m.js";
|
|
20
25
|
import {
|
|
21
26
|
EXIT_DEGRADED,
|
|
22
27
|
EXIT_OK,
|
|
@@ -26,7 +31,7 @@ import {
|
|
|
26
31
|
resolveModaBaseUrl,
|
|
27
32
|
safeWriteStderr,
|
|
28
33
|
shellArg
|
|
29
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-e24fjyrb.js";
|
|
30
35
|
import {
|
|
31
36
|
CliAuthError,
|
|
32
37
|
CliInputError,
|
|
@@ -407,7 +412,12 @@ function isAuthFailure(error) {
|
|
|
407
412
|
async function runProductionCommand(context) {
|
|
408
413
|
const daysBack = daysBackFlag(context.flags);
|
|
409
414
|
if (context.command === "overview") {
|
|
410
|
-
const
|
|
415
|
+
const trendsQuery = overviewTrendsQuery(context.flags, daysBack);
|
|
416
|
+
const [loaded, trends] = await Promise.all([
|
|
417
|
+
loadOverviewBriefing({ daysBack, cwd: context.cwd }),
|
|
418
|
+
trendsQuery ? loadTrends(trendsQuery) : Promise.resolve(undefined)
|
|
419
|
+
]);
|
|
420
|
+
const briefing = trends ? { ...loaded, trends } : loaded;
|
|
411
421
|
if (context.flags.raw === "true") {
|
|
412
422
|
context.output.writeData(briefing.rawOverview, {
|
|
413
423
|
summary: "Loaded raw Moda overview.",
|
|
@@ -1463,16 +1473,19 @@ function investigationAgentOptions(investigation) {
|
|
|
1463
1473
|
};
|
|
1464
1474
|
}
|
|
1465
1475
|
function overviewAgentOptions(briefing) {
|
|
1476
|
+
const trendText = briefing.trends ? trendsSummaryText(briefing.trends) : null;
|
|
1477
|
+
const trendNotes = Array.isArray(briefing.trends?.notes) ? briefing.trends.notes.map(String) : [];
|
|
1478
|
+
const warnings = [...detectorWarnings(briefing.detectors), ...trendNotes];
|
|
1466
1479
|
return {
|
|
1467
1480
|
summary: {
|
|
1468
|
-
text: `Moda health briefing: ${briefing.status}
|
|
1481
|
+
text: `Moda health briefing: ${briefing.status}.${trendText ? ` ${trendText}` : ""} Next: ${briefing.nextCommand}`,
|
|
1469
1482
|
confidence: briefing.topFinding ? briefing.topFinding.confidence : "medium"
|
|
1470
1483
|
},
|
|
1471
1484
|
findings: briefing.topFinding ? [agentFinding(briefing.topFinding)] : [],
|
|
1472
1485
|
evidenceRefs: briefing.evidenceRefs.map(agentEvidence),
|
|
1473
1486
|
recommendedActions: briefing.topFinding ? briefing.topFinding.recommendedActions.map(agentAction) : [],
|
|
1474
1487
|
nextCommands: [nextCommand(briefing.nextCommand)],
|
|
1475
|
-
...
|
|
1488
|
+
...warnings.length > 0 ? { warnings } : {}
|
|
1476
1489
|
};
|
|
1477
1490
|
}
|
|
1478
1491
|
function askAgentOptions(result) {
|
|
@@ -1558,6 +1571,10 @@ function renderOverviewBriefingHuman(briefing) {
|
|
|
1558
1571
|
for (const warning of detectorWarnings(briefing.detectors))
|
|
1559
1572
|
lines.push(` Warning: ${warning}`);
|
|
1560
1573
|
}
|
|
1574
|
+
if (briefing.trends) {
|
|
1575
|
+
lines.push("");
|
|
1576
|
+
lines.push(...renderTrendsHuman(briefing.trends));
|
|
1577
|
+
}
|
|
1561
1578
|
lines.push("");
|
|
1562
1579
|
lines.push("Top signal");
|
|
1563
1580
|
if (briefing.topFinding) {
|