@moda-ai/cli 1.55.42 → 1.55.43
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/{agent-86hghww1.js → agent-x1gwrrvd.js} +6 -5
- package/dist/{cli-xddtv3yn.js → cli-5fhqfx04.js} +1 -39
- package/dist/{cli-gt3yq1y5.js → cli-5y9tj6cb.js} +183 -1
- package/dist/{cli-4sy4tytm.js → cli-9a0a3v13.js} +17 -3
- package/dist/cli-e0kbye4s.js +39 -0
- package/dist/{cli-hjm9151g.js → cli-fpd1pfvt.js} +2 -2
- package/dist/{cli-srwzar82.js → cli-h62j4jn7.js} +2 -2
- package/dist/{cli-he8csgsr.js → cli-k5drmy8r.js} +7 -7
- package/dist/{cli-vwpbspr5.js → cli-s1w5phms.js} +3 -3
- package/dist/{cli-mxfyq5nq.js → cli-stfpr2ct.js} +2 -2
- package/dist/cli.js +65 -28
- package/dist/{doctor-c05njdv8.js → doctor-wrgajgev.js} +5 -4
- package/dist/{fix-aghp304m.js → fix-7aajsdbf.js} +1 -1
- package/dist/{harness-vabp33ak.js → harness-1rn1hqzz.js} +4 -3
- package/dist/{harness-github-actions-112503xs.js → harness-github-actions-m95qvgbs.js} +4 -3
- package/dist/{index-dtxvvcq2.js → index-svfzq5rb.js} +7 -6
- package/dist/{production-intelligence-e5vsc6cw.js → production-intelligence-7jvfdz6b.js} +22 -5
- package/dist/{prompt-attribution-pbns1ya3.js → prompt-attribution-hc6mcvee.js} +4 -3
- package/dist/prompt-source-mcp.js +4 -3
- package/dist/{prompts-ab-f5qrvpkt.js → prompts-ab-ws66335h.js} +5 -4
- package/dist/{prompts-propose-jg2j41wx.js → prompts-propose-a9m0p9nr.js} +5 -4
- package/dist/{prompts-qppk0mhp.js → prompts-xe5bgbx8.js} +4 -3
- package/dist/{provision-cya5rpxa.js → provision-a9kkfvp7.js} +2 -1
- package/dist/{registry-8a1940sr.js → registry-j2dsfh6v.js} +1 -1
- package/dist/{skills-sh93b156.js → skills-vveagdwe.js} +4 -3
- package/dist/{sync-0pp1c8hs.js → sync-yy3fgnxe.js} +6 -5
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +3 -1
- 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/production-intelligence.md +48 -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-5y9tj6cb.js";
|
|
30
|
+
import {
|
|
31
|
+
createCommandContext
|
|
32
|
+
} from "./cli-5fhqfx04.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,7 +87,7 @@ import {
|
|
|
81
87
|
unknownSignalsSubcommandError,
|
|
82
88
|
usageLine,
|
|
83
89
|
writeDryRun
|
|
84
|
-
} from "./cli-
|
|
90
|
+
} from "./cli-9a0a3v13.js";
|
|
85
91
|
import {
|
|
86
92
|
ApiError,
|
|
87
93
|
callControlAPI,
|
|
@@ -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,31 +3248,31 @@ 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-xe5bgbx8.js")).runPromptsCommand(...args);
|
|
3245
3252
|
}
|
|
3246
3253
|
async function runSkillsCommand(...args) {
|
|
3247
|
-
return (await import("./skills-
|
|
3254
|
+
return (await import("./skills-vveagdwe.js")).runSkillsCommand(...args);
|
|
3248
3255
|
}
|
|
3249
3256
|
async function runFixCommand(...args) {
|
|
3250
|
-
return (await import("./fix-
|
|
3257
|
+
return (await import("./fix-7aajsdbf.js")).runFixCommand(...args);
|
|
3251
3258
|
}
|
|
3252
3259
|
async function runFixesCommand(...args) {
|
|
3253
|
-
return (await import("./fix-
|
|
3260
|
+
return (await import("./fix-7aajsdbf.js")).runFixesCommand(...args);
|
|
3254
3261
|
}
|
|
3255
3262
|
async function runHarnessCommand(...args) {
|
|
3256
|
-
return (await import("./harness-
|
|
3263
|
+
return (await import("./harness-1rn1hqzz.js")).runHarnessCommand(...args);
|
|
3257
3264
|
}
|
|
3258
3265
|
async function runSyncCommand(...args) {
|
|
3259
|
-
return (await import("./sync-
|
|
3266
|
+
return (await import("./sync-yy3fgnxe.js")).runSyncCommand(...args);
|
|
3260
3267
|
}
|
|
3261
3268
|
async function runRegistryCommand(...args) {
|
|
3262
|
-
return (await import("./registry-
|
|
3269
|
+
return (await import("./registry-j2dsfh6v.js")).runRegistryCommand(...args);
|
|
3263
3270
|
}
|
|
3264
3271
|
async function runDoctorCommand(...args) {
|
|
3265
|
-
return (await import("./doctor-
|
|
3272
|
+
return (await import("./doctor-wrgajgev.js")).runDoctorCommand(...args);
|
|
3266
3273
|
}
|
|
3267
3274
|
async function runStatusCommand(...args) {
|
|
3268
|
-
return (await import("./doctor-
|
|
3275
|
+
return (await import("./doctor-wrgajgev.js")).runStatusCommand(...args);
|
|
3269
3276
|
}
|
|
3270
3277
|
async function runAuthCommand(...args) {
|
|
3271
3278
|
return (await import("./profile-commands-se9947c1.js")).runAuthCommand(...args);
|
|
@@ -3277,10 +3284,10 @@ async function runProfilesCommand(...args) {
|
|
|
3277
3284
|
return (await import("./profile-commands-se9947c1.js")).runProfilesCommand(...args);
|
|
3278
3285
|
}
|
|
3279
3286
|
async function runAgentCommand(...args) {
|
|
3280
|
-
return (await import("./agent-
|
|
3287
|
+
return (await import("./agent-x1gwrrvd.js")).runAgentCommand(...args);
|
|
3281
3288
|
}
|
|
3282
3289
|
async function runProductionCommand(...args) {
|
|
3283
|
-
return (await import("./production-intelligence-
|
|
3290
|
+
return (await import("./production-intelligence-7jvfdz6b.js")).runProductionCommand(...args);
|
|
3284
3291
|
}
|
|
3285
3292
|
function parseArgs(argv) {
|
|
3286
3293
|
const args = argv.slice(2);
|
|
@@ -6058,6 +6065,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6058
6065
|
case "frustrations": {
|
|
6059
6066
|
const args = flagsToArgs(flags);
|
|
6060
6067
|
const params = parseSpecFlags("frustrations", args, command);
|
|
6068
|
+
const compare = params.compare === true ? await loadFamilyCompare("frustrations", params) : undefined;
|
|
6061
6069
|
const query2 = new URLSearchParams;
|
|
6062
6070
|
if (params.days_back)
|
|
6063
6071
|
query2.set("days_back", params.days_back.toString());
|
|
@@ -6068,7 +6076,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6068
6076
|
if (readsPerTrace("frustrations", params, ["user_id", "conversation_id", "conversation_ids", "ids_from", "include_window"])) {
|
|
6069
6077
|
query2.set("family", "frustration");
|
|
6070
6078
|
setTraceFilters(query2, params, TRACE_GRAIN_FLAGS.frustrations);
|
|
6071
|
-
const data2 = await callDataAPI(`/emotions?${query2.toString()}`);
|
|
6079
|
+
const data2 = withSummaryCompare(await callDataAPI(`/emotions?${query2.toString()}`), compare);
|
|
6072
6080
|
const warnings = processingDisabledWarning(data2, "frustration");
|
|
6073
6081
|
context.output.writeData(data2, withCohortScope(params.cohort, data2, { summary: countingSummary(data2), warnings }));
|
|
6074
6082
|
break;
|
|
@@ -6086,7 +6094,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6086
6094
|
if (agentMode && !includeWindow)
|
|
6087
6095
|
query2.set("include_context", "0");
|
|
6088
6096
|
const data = frustrationsFromEmotions(await callDataAPI(`/emotions?${query2.toString()}`));
|
|
6089
|
-
const anchored = withFrustrationAnchors(data);
|
|
6097
|
+
const anchored = withSummaryCompare(withFrustrationAnchors(data), compare);
|
|
6090
6098
|
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
6099
|
break;
|
|
6092
6100
|
}
|
|
@@ -6099,7 +6107,13 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6099
6107
|
if (params.cohort)
|
|
6100
6108
|
tfQuery.set("cohort", params.cohort);
|
|
6101
6109
|
const queryString = tfQuery.toString() ? `?${tfQuery.toString()}` : "";
|
|
6102
|
-
|
|
6110
|
+
if (params.compare === true)
|
|
6111
|
+
assertCompareScope("tool-failures", params);
|
|
6112
|
+
const [listed, compare] = await Promise.all([
|
|
6113
|
+
callDataAPI(`/tool-failures${queryString}`),
|
|
6114
|
+
params.compare === true ? loadFamilyCompare("tool-failures", params) : Promise.resolve(undefined)
|
|
6115
|
+
]);
|
|
6116
|
+
const data = withSummaryCompare(listed, compare);
|
|
6103
6117
|
const daysBack = params.days_back ?? 7;
|
|
6104
6118
|
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
6119
|
const nextCommands = failing.flatMap((name, index) => [
|
|
@@ -6305,11 +6319,21 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6305
6319
|
}
|
|
6306
6320
|
const args = flagsToArgs(flags, "id", positional);
|
|
6307
6321
|
const params = parseSpecFlags("problem", args, command);
|
|
6322
|
+
if (params.trend === true) {
|
|
6323
|
+
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)");
|
|
6324
|
+
const query3 = params.days_back ? `?days_back=${params.days_back}` : "";
|
|
6325
|
+
const data2 = await callDataAPI(`/problems/${encodeURIComponent(params.id)}/history${query3}`);
|
|
6326
|
+
context.output.writeData(data2, {
|
|
6327
|
+
summary: problemTrendSummary(data2),
|
|
6328
|
+
nextCommands: [{ command: `moda problems get ${shellArg(params.id)}`, purpose: "Open the Problem dossier.", mutability: "read", requires_approval: false }]
|
|
6329
|
+
});
|
|
6330
|
+
break;
|
|
6331
|
+
}
|
|
6308
6332
|
if (params.view === "dream") {
|
|
6309
6333
|
await runDreamProblem(params, context, command);
|
|
6310
6334
|
break;
|
|
6311
6335
|
}
|
|
6312
|
-
rejectInapplicableFlags(command, params, ["offset", "days_back"], "without --view=dream; the dossier pages page with --limit and --cursor");
|
|
6336
|
+
rejectInapplicableFlags(command, params, ["offset", "days_back"], "without --view=dream or --trend; the dossier pages page with --limit and --cursor");
|
|
6313
6337
|
const traceView = params.traces === true || params.conversations === true;
|
|
6314
6338
|
const views = ["evidence", "reports", "conversations", "feedback"].filter((view2) => view2 === "conversations" ? traceView : params[view2] === true);
|
|
6315
6339
|
if (views.length > 1) {
|
|
@@ -6738,6 +6762,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6738
6762
|
case "emotions": {
|
|
6739
6763
|
const args = flagsToArgs(flags);
|
|
6740
6764
|
const params = parseSpecFlags("emotions", args, command);
|
|
6765
|
+
const compare = params.compare === true ? await loadFamilyCompare("emotions", params) : undefined;
|
|
6741
6766
|
const query2 = new URLSearchParams;
|
|
6742
6767
|
if (params.days_back)
|
|
6743
6768
|
query2.set("days_back", params.days_back.toString());
|
|
@@ -6749,7 +6774,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6749
6774
|
query2.set("family", params.family);
|
|
6750
6775
|
if (readsPerTrace("emotions", params, ["user_id", "conversation_id", "conversation_ids", "ids_from", "include_window"])) {
|
|
6751
6776
|
setTraceFilters(query2, params, TRACE_GRAIN_FLAGS.emotions);
|
|
6752
|
-
const data2 = await callDataAPI(`/emotions?${query2.toString()}`);
|
|
6777
|
+
const data2 = withSummaryCompare(await callDataAPI(`/emotions?${query2.toString()}`), compare);
|
|
6753
6778
|
const warnings = processingDisabledWarning(data2, "emotion");
|
|
6754
6779
|
context.output.writeData(data2, withCohortScope(params.cohort, data2, { summary: countingSummary(data2), warnings }));
|
|
6755
6780
|
break;
|
|
@@ -6765,7 +6790,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6765
6790
|
if (agentMode && params.include_window !== true)
|
|
6766
6791
|
query2.set("include_context", "0");
|
|
6767
6792
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
6768
|
-
const raw = await callDataAPI(`/emotions${queryString}`);
|
|
6793
|
+
const raw = withSummaryCompare(await callDataAPI(`/emotions${queryString}`), compare);
|
|
6769
6794
|
const processingWarnings = processingDisabledWarning(raw, "emotion");
|
|
6770
6795
|
const record = asRecord(raw);
|
|
6771
6796
|
const data = agentMode && params.include_window !== true && record ? withoutDetectionWindows(record, "detections", "conversation_context") : raw;
|
|
@@ -6804,7 +6829,13 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6804
6829
|
if (params.order)
|
|
6805
6830
|
query2.set("order", params.order);
|
|
6806
6831
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
6807
|
-
|
|
6832
|
+
if (params.compare === true)
|
|
6833
|
+
assertCompareScope("laziness", params);
|
|
6834
|
+
const [listed, compare] = await Promise.all([
|
|
6835
|
+
callDataAPI(`/laziness${queryString}`),
|
|
6836
|
+
params.compare === true ? loadFamilyCompare("laziness", params) : Promise.resolve(undefined)
|
|
6837
|
+
]);
|
|
6838
|
+
const data = withSummaryCompare(listed, compare);
|
|
6808
6839
|
context.output.writeData(data, withCohortScope(params.cohort, data, { summary: countingSummary(data) }));
|
|
6809
6840
|
break;
|
|
6810
6841
|
}
|
|
@@ -6830,7 +6861,13 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
6830
6861
|
query2.set("kind", params.kind);
|
|
6831
6862
|
}
|
|
6832
6863
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
6833
|
-
|
|
6864
|
+
if (params.compare === true)
|
|
6865
|
+
assertCompareScope("hallucinations", params);
|
|
6866
|
+
const [listed, compare] = await Promise.all([
|
|
6867
|
+
callDataAPI(`/hallucinations${queryString}`),
|
|
6868
|
+
params.compare === true ? loadFamilyCompare("hallucinations", params) : Promise.resolve(undefined)
|
|
6869
|
+
]);
|
|
6870
|
+
const data = withSummaryCompare(listed, compare);
|
|
6834
6871
|
context.output.writeData(data, withCohortScope(params.cohort, data, { summary: countingSummary(data) }));
|
|
6835
6872
|
break;
|
|
6836
6873
|
}
|
|
@@ -7020,7 +7057,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
7020
7057
|
resetApiRequestCountBeforeRun: true,
|
|
7021
7058
|
telemetry: "result-and-error",
|
|
7022
7059
|
handler: async (context) => {
|
|
7023
|
-
const { runInit } = await import("./index-
|
|
7060
|
+
const { runInit } = await import("./index-svfzq5rb.js");
|
|
7024
7061
|
if (context.outputMode === "agent-stream") {
|
|
7025
7062
|
context.output.writeEvent({
|
|
7026
7063
|
event: "started",
|
|
@@ -7070,7 +7107,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
7070
7107
|
resetApiRequestCountBeforeRun: true,
|
|
7071
7108
|
telemetry: "result-and-error",
|
|
7072
7109
|
handler: async (context) => {
|
|
7073
|
-
const { runProvision } = await import("./provision-
|
|
7110
|
+
const { runProvision } = await import("./provision-a9kkfvp7.js");
|
|
7074
7111
|
return runProvision(context, {
|
|
7075
7112
|
resumeCommand: buildResumeCommand("provision", context.rawFlags)
|
|
7076
7113
|
});
|
|
@@ -7484,7 +7521,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
7484
7521
|
legacyCommand({
|
|
7485
7522
|
name: "overview",
|
|
7486
7523
|
description: "Harness health briefing from production data",
|
|
7487
|
-
examples: ["moda overview --days-back=30", "moda --agent overview"],
|
|
7524
|
+
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
7525
|
...dataApiDefaults
|
|
7489
7526
|
}),
|
|
7490
7527
|
legacyCommand({
|
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-h62j4jn7.js";
|
|
7
7
|
import"./cli-pmzh2qjy.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-k5drmy8r.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
10
|
import"./cli-xq45etg1.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
import"./cli-5fhqfx04.js";
|
|
12
|
+
import"./cli-e0kbye4s.js";
|
|
13
|
+
import"./cli-9a0a3v13.js";
|
|
13
14
|
import"./cli-0xc5htv7.js";
|
|
14
15
|
import"./cli-t0pb7qbs.js";
|
|
15
16
|
import"./cli-k4tqwah4.js";
|
|
@@ -40,15 +40,16 @@ import {
|
|
|
40
40
|
writeHarnessAnalyzeResult,
|
|
41
41
|
writeHarnessArtifacts,
|
|
42
42
|
writeHumanProgress
|
|
43
|
-
} from "./cli-
|
|
43
|
+
} from "./cli-s1w5phms.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-
|
|
50
|
+
import"./cli-5fhqfx04.js";
|
|
51
|
+
import"./cli-e0kbye4s.js";
|
|
52
|
+
import"./cli-9a0a3v13.js";
|
|
52
53
|
import"./cli-0xc5htv7.js";
|
|
53
54
|
import"./cli-t0pb7qbs.js";
|
|
54
55
|
import"./cli-k4tqwah4.js";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-s1w5phms.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-
|
|
8
|
+
import"./cli-5fhqfx04.js";
|
|
9
|
+
import"./cli-e0kbye4s.js";
|
|
10
|
+
import"./cli-9a0a3v13.js";
|
|
10
11
|
import"./cli-0xc5htv7.js";
|
|
11
12
|
import {
|
|
12
13
|
recordApiRequest
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDoctorReport
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-h62j4jn7.js";
|
|
4
4
|
import {
|
|
5
5
|
selectTenantAndCreateKey
|
|
6
6
|
} from "./cli-1z1sx8dg.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
agentsMdProblem,
|
|
22
22
|
runSkillSync
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-stfpr2ct.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-k5drmy8r.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-s1w5phms.js";
|
|
50
50
|
import {
|
|
51
51
|
canonicalText,
|
|
52
52
|
renderInitBanner,
|
|
@@ -62,8 +62,9 @@ import"./cli-cesds766.js";
|
|
|
62
62
|
import"./cli-qpq84eee.js";
|
|
63
63
|
import {
|
|
64
64
|
createCommandContext
|
|
65
|
-
} from "./cli-
|
|
66
|
-
import"./cli-
|
|
65
|
+
} from "./cli-5fhqfx04.js";
|
|
66
|
+
import"./cli-e0kbye4s.js";
|
|
67
|
+
import"./cli-9a0a3v13.js";
|
|
67
68
|
import"./cli-0xc5htv7.js";
|
|
68
69
|
import {
|
|
69
70
|
VERSION,
|
|
@@ -5,14 +5,19 @@ 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-5y9tj6cb.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
|
|
@@ -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) {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inventoryFiles,
|
|
3
3
|
safePromptEvidencePath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-s1w5phms.js";
|
|
5
5
|
import"./cli-xq45etg1.js";
|
|
6
6
|
import"./cli-97fnztpy.js";
|
|
7
7
|
import"./cli-cesds766.js";
|
|
8
8
|
import {
|
|
9
9
|
require_typescript
|
|
10
10
|
} from "./cli-qpq84eee.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
import"./cli-5fhqfx04.js";
|
|
12
|
+
import"./cli-e0kbye4s.js";
|
|
13
|
+
import"./cli-9a0a3v13.js";
|
|
13
14
|
import"./cli-0xc5htv7.js";
|
|
14
15
|
import"./cli-t0pb7qbs.js";
|
|
15
16
|
import"./cli-k4tqwah4.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
checkPromptMapping,
|
|
4
4
|
discoverHarnessPromptSources,
|
|
5
5
|
safePromptEvidencePath
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-s1w5phms.js";
|
|
7
7
|
import"./cli-xq45etg1.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
9
|
import"./cli-cesds766.js";
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
inspectCodeSelectors,
|
|
12
12
|
inspectPythonSelectors
|
|
13
13
|
} from "./cli-qpq84eee.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
14
|
+
import"./cli-5fhqfx04.js";
|
|
15
|
+
import"./cli-e0kbye4s.js";
|
|
16
|
+
import"./cli-9a0a3v13.js";
|
|
16
17
|
import"./cli-0xc5htv7.js";
|
|
17
18
|
import"./cli-t0pb7qbs.js";
|
|
18
19
|
import"./cli-k4tqwah4.js";
|
|
@@ -23,12 +23,13 @@ import {
|
|
|
23
23
|
runPromptAb,
|
|
24
24
|
selectProblemCases,
|
|
25
25
|
waitLabel
|
|
26
|
-
} from "./cli-
|
|
27
|
-
import"./cli-
|
|
26
|
+
} from "./cli-fpd1pfvt.js";
|
|
27
|
+
import"./cli-k5drmy8r.js";
|
|
28
28
|
import"./cli-daqkdnm1.js";
|
|
29
29
|
import"./cli-mm48br00.js";
|
|
30
|
-
import"./cli-
|
|
31
|
-
import"./cli-
|
|
30
|
+
import"./cli-5fhqfx04.js";
|
|
31
|
+
import"./cli-e0kbye4s.js";
|
|
32
|
+
import"./cli-9a0a3v13.js";
|
|
32
33
|
import"./cli-0xc5htv7.js";
|
|
33
34
|
import"./cli-t0pb7qbs.js";
|
|
34
35
|
import"./cli-k4tqwah4.js";
|
|
@@ -7,12 +7,13 @@ import {
|
|
|
7
7
|
formatVerdict,
|
|
8
8
|
rerunWithYes,
|
|
9
9
|
resolvePromptArmSpec
|
|
10
|
-
} from "./cli-
|
|
11
|
-
import"./cli-
|
|
10
|
+
} from "./cli-fpd1pfvt.js";
|
|
11
|
+
import"./cli-k5drmy8r.js";
|
|
12
12
|
import"./cli-daqkdnm1.js";
|
|
13
13
|
import"./cli-mm48br00.js";
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
14
|
+
import"./cli-5fhqfx04.js";
|
|
15
|
+
import"./cli-e0kbye4s.js";
|
|
16
|
+
import"./cli-9a0a3v13.js";
|
|
16
17
|
import {
|
|
17
18
|
callControlAPI
|
|
18
19
|
} from "./cli-0xc5htv7.js";
|
|
@@ -11,12 +11,13 @@ import {
|
|
|
11
11
|
runPromptSync,
|
|
12
12
|
runPromptsCommand,
|
|
13
13
|
writePromptSyncProgress
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-k5drmy8r.js";
|
|
15
15
|
import {
|
|
16
16
|
promptSourceHashPayload
|
|
17
17
|
} from "./cli-mm48br00.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-5fhqfx04.js";
|
|
19
|
+
import"./cli-e0kbye4s.js";
|
|
20
|
+
import"./cli-9a0a3v13.js";
|
|
20
21
|
import"./cli-0xc5htv7.js";
|
|
21
22
|
import"./cli-t0pb7qbs.js";
|
|
22
23
|
import"./cli-k4tqwah4.js";
|
|
@@ -3,12 +3,13 @@ import {
|
|
|
3
3
|
pullSkills,
|
|
4
4
|
runSkillSync,
|
|
5
5
|
runSkillsCommand
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-stfpr2ct.js";
|
|
7
7
|
import"./cli-qm5b1vck.js";
|
|
8
8
|
import"./cli-rjav0vj1.js";
|
|
9
9
|
import"./cli-hcwdz9sd.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
10
|
+
import"./cli-5fhqfx04.js";
|
|
11
|
+
import"./cli-e0kbye4s.js";
|
|
12
|
+
import"./cli-9a0a3v13.js";
|
|
12
13
|
import"./cli-0xc5htv7.js";
|
|
13
14
|
import"./cli-t0pb7qbs.js";
|
|
14
15
|
import"./cli-k4tqwah4.js";
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runSkillsCommand
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-stfpr2ct.js";
|
|
4
4
|
import"./cli-qm5b1vck.js";
|
|
5
5
|
import"./cli-rjav0vj1.js";
|
|
6
6
|
import"./cli-hcwdz9sd.js";
|
|
7
7
|
import {
|
|
8
8
|
runPromptsCommand
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-k5drmy8r.js";
|
|
10
10
|
import"./cli-mm48br00.js";
|
|
11
11
|
import {
|
|
12
12
|
runHarnessCommand
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-s1w5phms.js";
|
|
14
14
|
import"./cli-xq45etg1.js";
|
|
15
15
|
import"./cli-97fnztpy.js";
|
|
16
16
|
import"./cli-cesds766.js";
|
|
17
17
|
import"./cli-qpq84eee.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-5fhqfx04.js";
|
|
19
|
+
import"./cli-e0kbye4s.js";
|
|
20
|
+
import"./cli-9a0a3v13.js";
|
|
20
21
|
import"./cli-0xc5htv7.js";
|
|
21
22
|
import"./cli-t0pb7qbs.js";
|
|
22
23
|
import {
|
package/package.json
CHANGED
package/skills/moda-cli/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moda-cli
|
|
3
|
-
version: 3.0.
|
|
3
|
+
version: 3.0.9
|
|
4
4
|
description: Investigate a production AI agent with the Moda CLI (`moda`) - find where something happened in real traces (traces search, then traces get), check agent health, rank what to fix (investigate, problems), and dig into tool failures, user frustration, and hallucinations. Also prompt registry sync/promote, replays, custom signals, and false-positive marking. Use when the user mentions Moda, production traces or conversations of their agent, agent failures, or asks what to fix.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -60,6 +60,8 @@ Details: `references/output-protocol.md`.
|
|
|
60
60
|
| Where did X happen / traces about Y | `moda traces search "<words>"` (`--mode=keyword` for ids, error codes, exact strings; `--include-tool-io` for tool inputs/outputs) | `moda traces get <conversation_id> --msg-index=<message_index> --window=3` |
|
|
61
61
|
| Search returned nothing | Read `.warnings` (degraded mode, reason). Try a shorter phrase, `--mode=keyword`, a wider `--time-range` | `moda traces --search="<words>"` |
|
|
62
62
|
| Is the agent healthy? | `moda overview --days-back=7` | `moda investigate` |
|
|
63
|
+
| Did my change make it worse? | `moda overview --compare --since=<deploy time, ISO UTC>` (after the deploy against the same span before it; add `--agent-name=<sub-agent>` for one sub-agent) | `moda overview --series --since=<deploy time>` (per hour up to 2 days, else per day), `moda detections list --family=<f> --compare`, `moda problems get <problem_id> --trend` |
|
|
64
|
+
| Is X trending up? | `moda overview --compare --series --days-back=14` | `moda problems get <problem_id> --trend --days-back=30` (incidents per day) |
|
|
63
65
|
| What to fix first? | `moda investigate` or `moda problems list` (free; both rank the same list the dashboard shows, `data.problemsView` names it) | `moda problems get <problem_id>` (`--view=dream` on a dream-grouped tenant), then `--evidence` / `--traces` |
|
|
64
66
|
| Why is tool T failing? | `moda detections tools` | `moda detections tools <T>` (use each row's `anchor`) |
|
|
65
67
|
| How often is tool T called / what is its schema? | `moda tools list` (every tool: calls, failed calls, success rate; `--sort=failure_rate`) | `moda tools get <T>` (registered schema, observed payload fields, usage over time, top failure categories) |
|