@moda-ai/cli 1.55.24 → 1.55.26
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-b4tdzy9q.js → agent-nqmha8ck.js} +8 -8
- package/dist/{cli-9hc5bg2r.js → cli-1mbb0ct0.js} +1 -1
- package/dist/{cli-vg88mg20.js → cli-5g1tv80h.js} +5 -5
- package/dist/{cli-rt26sbz7.js → cli-8tfk8qeb.js} +10 -6
- package/dist/{cli-y2ty9vtv.js → cli-b4740tnv.js} +210 -23
- package/dist/{cli-qvg26twp.js → cli-cdrvjva5.js} +11 -8
- package/dist/{cli-7xc585hc.js → cli-d577kq6h.js} +5 -5
- package/dist/{cli-dn91fb56.js → cli-jgfm7w1r.js} +89 -47
- package/dist/{cli-9btx12wp.js → cli-jtyvbd8d.js} +1 -1
- package/dist/{cli-qycsmxev.js → cli-k6q8dbpk.js} +3 -3
- package/dist/{cli-0wr3483h.js → cli-q6f6vrrr.js} +1 -1
- package/dist/{cli-dve50x7p.js → cli-sqsjd08w.js} +784 -725
- package/dist/cli.js +713 -234
- package/dist/{doctor-3r19ry92.js → doctor-w913fj4g.js} +8 -8
- package/dist/{fix-exvxzvtz.js → fix-crkwdkt4.js} +6 -6
- package/dist/{harness-github-actions-atc5bbkj.js → harness-github-actions-fjhvhgpj.js} +5 -5
- package/dist/{harness-vzy7n7ea.js → harness-x3e7d68b.js} +5 -5
- package/dist/{index-e1pf1qz2.js → index-2kf3fnnb.js} +11 -11
- package/dist/{production-intelligence-c8e0xw3n.js → production-intelligence-7n83c701.js} +75 -15
- package/dist/{profile-commands-6e2dgv72.js → profile-commands-ct2t0bfr.js} +3 -3
- package/dist/prompt-source-mcp.js +5 -5
- package/dist/{prompts-cvzt994j.js → prompts-92aqqb2k.js} +6 -6
- package/dist/{provision-q86phh4a.js → provision-gn8raqpt.js} +5 -5
- package/dist/{registry-s2vdsfw8.js → registry-ex162j5y.js} +3 -3
- package/dist/{skills-tadh1jss.js → skills-2mbsj9bt.js} +5 -5
- package/dist/{sync-g8wtecz1.js → sync-kghmmmk5.js} +7 -7
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +8 -2
- package/skills/moda-cli/references/dashboard-parity.md +1 -1
- package/skills/moda-cli/references/output-protocol.md +35 -10
- package/skills/moda-cli/references/production-intelligence.md +3 -2
- package/skills/moda-cli/references/prompts.md +6 -2
- package/skills/moda-cli/references/search-and-traces.md +20 -2
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
} from "./cli-5g1tv80h.js";
|
|
7
|
+
import"./cli-q6f6vrrr.js";
|
|
8
|
+
import"./cli-b4740tnv.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-d577kq6h.js";
|
|
11
11
|
import"./cli-97fnztpy.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
12
|
+
import"./cli-cdrvjva5.js";
|
|
13
|
+
import"./cli-jgfm7w1r.js";
|
|
14
|
+
import"./cli-jtyvbd8d.js";
|
|
15
|
+
import"./cli-sqsjd08w.js";
|
|
16
16
|
import"./cli-0v6na3yp.js";
|
|
17
17
|
export {
|
|
18
18
|
runStatusCommand,
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
DEFAULT_POLL_INTERVAL_MS,
|
|
3
3
|
DEFAULT_WAIT_TIMEOUT_MS,
|
|
4
4
|
fetchLatestRun
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-b4740tnv.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-d577kq6h.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-cdrvjva5.js";
|
|
10
10
|
import {
|
|
11
11
|
assertFlags
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-jgfm7w1r.js";
|
|
13
13
|
import {
|
|
14
14
|
callControlAPI
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-jtyvbd8d.js";
|
|
16
16
|
import {
|
|
17
17
|
CliInputError,
|
|
18
18
|
EXIT_DEGRADED,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getModaPaths,
|
|
22
22
|
resolveApiTenantId,
|
|
23
23
|
validateConfig
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-sqsjd08w.js";
|
|
25
25
|
import"./cli-0v6na3yp.js";
|
|
26
26
|
|
|
27
27
|
// src/fix.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-d577kq6h.js";
|
|
4
4
|
import"./cli-97fnztpy.js";
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
5
|
+
import"./cli-cdrvjva5.js";
|
|
6
|
+
import"./cli-jgfm7w1r.js";
|
|
7
|
+
import"./cli-jtyvbd8d.js";
|
|
8
8
|
import {
|
|
9
9
|
recordApiRequest
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-sqsjd08w.js";
|
|
11
11
|
import"./cli-0v6na3yp.js";
|
|
12
12
|
|
|
13
13
|
// src/harness-github-actions.ts
|
|
@@ -42,12 +42,12 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-d577kq6h.js";
|
|
46
46
|
import"./cli-97fnztpy.js";
|
|
47
|
-
import"./cli-
|
|
48
|
-
import"./cli-
|
|
49
|
-
import"./cli-
|
|
50
|
-
import"./cli-
|
|
47
|
+
import"./cli-cdrvjva5.js";
|
|
48
|
+
import"./cli-jgfm7w1r.js";
|
|
49
|
+
import"./cli-jtyvbd8d.js";
|
|
50
|
+
import"./cli-sqsjd08w.js";
|
|
51
51
|
import"./cli-0v6na3yp.js";
|
|
52
52
|
export {
|
|
53
53
|
writeHumanProgress,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-k6q8dbpk.js";
|
|
4
|
+
import"./cli-1mbb0ct0.js";
|
|
5
5
|
import {
|
|
6
6
|
buildDoctorReport
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-5g1tv80h.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-q6f6vrrr.js";
|
|
15
15
|
import {
|
|
16
16
|
initPrompts,
|
|
17
17
|
runPromptSync
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-b4740tnv.js";
|
|
19
19
|
import"./cli-mm48br00.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalText,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
runCodingAgent,
|
|
36
36
|
runHarnessCommand,
|
|
37
37
|
startRemoteAnalyze
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-d577kq6h.js";
|
|
39
39
|
import {
|
|
40
40
|
stripAnsi
|
|
41
41
|
} from "./cli-97fnztpy.js";
|
|
@@ -47,12 +47,12 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
agentsMdProblem,
|
|
49
49
|
runSkillSync
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-8tfk8qeb.js";
|
|
51
51
|
import {
|
|
52
52
|
createCommandContext
|
|
53
|
-
} from "./cli-
|
|
54
|
-
import"./cli-
|
|
55
|
-
import"./cli-
|
|
53
|
+
} from "./cli-cdrvjva5.js";
|
|
54
|
+
import"./cli-jgfm7w1r.js";
|
|
55
|
+
import"./cli-jtyvbd8d.js";
|
|
56
56
|
import {
|
|
57
57
|
CliAuthError,
|
|
58
58
|
CliInputError,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
recordApiRequest,
|
|
61
61
|
resolveIngestUrl,
|
|
62
62
|
resolveModaBaseUrl
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-sqsjd08w.js";
|
|
64
64
|
import {
|
|
65
65
|
detectAgents,
|
|
66
66
|
installRules,
|
|
@@ -10,12 +10,13 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
callControlAPI,
|
|
12
12
|
callDataAPI
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-jtyvbd8d.js";
|
|
14
14
|
import {
|
|
15
15
|
CliAuthError,
|
|
16
16
|
CliInputError,
|
|
17
17
|
EXIT_DEGRADED,
|
|
18
18
|
EXIT_OK,
|
|
19
|
+
apiErrorStatus,
|
|
19
20
|
apiKeyHeaders,
|
|
20
21
|
asNumber,
|
|
21
22
|
asRecord,
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
resolveModaBaseUrl,
|
|
29
30
|
safeWriteStderr,
|
|
30
31
|
shellWord
|
|
31
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-sqsjd08w.js";
|
|
32
33
|
import"./cli-0v6na3yp.js";
|
|
33
34
|
|
|
34
35
|
// src/production-intelligence.ts
|
|
@@ -406,6 +407,9 @@ var OVERVIEW_SCHEMA_VERSION = "production_overview.v0.1";
|
|
|
406
407
|
var ASK_SCHEMA_VERSION = "production_ask.v0.1";
|
|
407
408
|
var INVESTIGATION_PROBLEM_LIMIT = 3;
|
|
408
409
|
var INVESTIGATION_PROBLEM_SLOTS = INVESTIGATION_PROBLEM_LIMIT;
|
|
410
|
+
function isAuthFailure(error) {
|
|
411
|
+
return error instanceof CliAuthError || apiErrorStatus(error) === 401;
|
|
412
|
+
}
|
|
409
413
|
async function runProductionCommand(context) {
|
|
410
414
|
const daysBack = daysBackFlag(context.flags);
|
|
411
415
|
if (context.command === "overview") {
|
|
@@ -419,7 +423,8 @@ async function runProductionCommand(context) {
|
|
|
419
423
|
if (!context.quiet)
|
|
420
424
|
console.log(renderOverviewBriefingHuman(briefing));
|
|
421
425
|
} else {
|
|
422
|
-
|
|
426
|
+
const { rawOverview: _rawOverview, ...withoutRaw } = briefing;
|
|
427
|
+
context.output.writeData(withoutRaw, overviewAgentOptions(briefing));
|
|
423
428
|
}
|
|
424
429
|
return { exitCode: 0 };
|
|
425
430
|
}
|
|
@@ -448,7 +453,7 @@ async function runProductionCommand(context) {
|
|
|
448
453
|
toolName: context.flags.tool
|
|
449
454
|
});
|
|
450
455
|
writeInvestigation(context, investigation);
|
|
451
|
-
return { exitCode:
|
|
456
|
+
return { exitCode: investigation.degraded ? EXIT_DEGRADED : EXIT_OK };
|
|
452
457
|
}
|
|
453
458
|
if (context.command === "investigate") {
|
|
454
459
|
const investigation = await investigateProduction({
|
|
@@ -458,7 +463,7 @@ async function runProductionCommand(context) {
|
|
|
458
463
|
toolName: context.flags.tool
|
|
459
464
|
});
|
|
460
465
|
writeInvestigation(context, investigation);
|
|
461
|
-
return { exitCode:
|
|
466
|
+
return { exitCode: investigation.degraded ? EXIT_DEGRADED : EXIT_OK };
|
|
462
467
|
}
|
|
463
468
|
throw new CliInputError(`Unknown production command '${context.command}'`);
|
|
464
469
|
}
|
|
@@ -522,6 +527,13 @@ async function investigateProduction(options) {
|
|
|
522
527
|
if (result.warning)
|
|
523
528
|
warnings.push(result.warning);
|
|
524
529
|
}
|
|
530
|
+
const failed = Object.entries(sources).filter(([, result]) => result.status === "unavailable");
|
|
531
|
+
const authFailure = failed.find(([, result]) => isAuthFailure(result.error));
|
|
532
|
+
if (authFailure)
|
|
533
|
+
throw authFailure[1].error;
|
|
534
|
+
if (failed.length > 0 && failed.length === Object.keys(sources).length)
|
|
535
|
+
throw failed[0][1].error;
|
|
536
|
+
const failedSources = failed.map(([key]) => key);
|
|
525
537
|
if (options.toolName && tools.status === "ok" && toolRows(tools.data, options.toolName).every((row) => row.count <= 0)) {
|
|
526
538
|
warnings.push(`No failures found for tool "${options.toolName}" in the last ${options.daysBack} day(s) — the tool may have no failures in this window, or the name may not exist in this tenant. ` + "Run `moda detections tools` to list tools with recorded failures, or widen --days-back.");
|
|
527
539
|
}
|
|
@@ -537,12 +549,17 @@ async function investigateProduction(options) {
|
|
|
537
549
|
findings.push(...problemFindings(problems.data, options.daysBack, evidenceRefs));
|
|
538
550
|
}
|
|
539
551
|
if (findings.length === 0) {
|
|
540
|
-
findings.push(insufficientDataFinding(overview.data, evidenceRefs));
|
|
552
|
+
findings.push(failedSources.length > 0 ? incompleteDataFinding(failedSources, Object.keys(sources).length) : insufficientDataFinding(overview.data, evidenceRefs));
|
|
541
553
|
}
|
|
542
554
|
findings.sort(compareFindings);
|
|
543
555
|
const boundedFindings = capFindings(findings, 8, INVESTIGATION_PROBLEM_SLOTS);
|
|
544
556
|
const nextCommands = nextCommandsForFindings(boundedFindings, options.daysBack, !options.failureOnly);
|
|
545
557
|
const summary = summarizeInvestigation(boundedFindings);
|
|
558
|
+
if (failedSources.length > 0) {
|
|
559
|
+
summary.text = `Incomplete: could not load ${failedSources.join(", ")}, so findings cover only ${Object.keys(sources).filter((key) => !failedSources.includes(key)).join(", ")}. ${summary.text}`;
|
|
560
|
+
if (summary.confidence === "high" || summary.confidence === "medium")
|
|
561
|
+
summary.confidence = "low";
|
|
562
|
+
}
|
|
546
563
|
if (options.conversationId) {
|
|
547
564
|
summary.text = `${summary.text} (Only frustration evidence is scoped to trace ${options.conversationId}.)`;
|
|
548
565
|
}
|
|
@@ -560,7 +577,9 @@ async function investigateProduction(options) {
|
|
|
560
577
|
evidenceRefs: uniqueEvidenceRefs(evidenceRefs),
|
|
561
578
|
nextCommands,
|
|
562
579
|
warnings,
|
|
563
|
-
sourceStatus
|
|
580
|
+
sourceStatus,
|
|
581
|
+
degraded: failedSources.length > 0,
|
|
582
|
+
failedSources
|
|
564
583
|
};
|
|
565
584
|
}
|
|
566
585
|
async function askModa(options) {
|
|
@@ -592,8 +611,8 @@ async function askModa(options) {
|
|
|
592
611
|
cwd: options.cwd,
|
|
593
612
|
question: options.question
|
|
594
613
|
});
|
|
595
|
-
const top = investigation.findings
|
|
596
|
-
const answer = top ? `Moda Cloud intelligence is not available, so I synthesized this from production evidence. The strongest signal is: ${top.title}. ${top.summary}` : "Moda Cloud intelligence is not available, and the local Data API evidence did not contain a strong production signal.";
|
|
614
|
+
const top = investigation.findings.find((finding) => finding.kind !== "insufficient_data");
|
|
615
|
+
const answer = top ? `Moda Cloud intelligence is not available, so I synthesized this from production evidence${investigation.degraded ? ` (${investigation.failedSources.join(", ")} could not be loaded)` : ""}. The strongest signal is: ${top.title}. ${top.summary}` : investigation.degraded ? `Moda Cloud intelligence is not available, and ${investigation.failedSources.join(", ")} could not be loaded, so no answer could be synthesized and no issue is ruled out.` : "Moda Cloud intelligence is not available, and the local Data API evidence did not contain a strong production signal.";
|
|
597
616
|
const confidence = capFallbackConfidence(investigation.summary.confidence);
|
|
598
617
|
const evidenceRefs = investigation.evidenceRefs.slice(0, 12);
|
|
599
618
|
const findings = investigation.findings.slice(0, 5);
|
|
@@ -717,9 +736,16 @@ function writeInvestigation(context, investigation) {
|
|
|
717
736
|
if (context.outputMode === "human") {
|
|
718
737
|
if (!context.quiet)
|
|
719
738
|
console.log(renderInvestigationHuman(investigation));
|
|
739
|
+
if (investigation.degraded) {
|
|
740
|
+
safeWriteStderr(`Warning: incomplete result, could not load ${investigation.failedSources.join(", ")}.
|
|
741
|
+
`);
|
|
742
|
+
}
|
|
720
743
|
return;
|
|
721
744
|
}
|
|
722
|
-
context.output.writeData(investigation,
|
|
745
|
+
context.output.writeData(investigation, {
|
|
746
|
+
...investigationAgentOptions(investigation),
|
|
747
|
+
...investigation.degraded ? { status: "degraded" } : {}
|
|
748
|
+
});
|
|
723
749
|
}
|
|
724
750
|
async function safeData(endpoint) {
|
|
725
751
|
try {
|
|
@@ -728,7 +754,8 @@ async function safeData(endpoint) {
|
|
|
728
754
|
return {
|
|
729
755
|
data: null,
|
|
730
756
|
status: "unavailable",
|
|
731
|
-
warning: `Could not load ${endpoint}: ${error instanceof Error ? error.message : String(error)}
|
|
757
|
+
warning: `Could not load ${endpoint}: ${error instanceof Error ? error.message : String(error)}`,
|
|
758
|
+
error
|
|
732
759
|
};
|
|
733
760
|
}
|
|
734
761
|
}
|
|
@@ -817,7 +844,7 @@ function toolFailureFindings(data, daysBack, hints, evidenceRefs, scopedTool) {
|
|
|
817
844
|
label: `${name}: ${count} failure(s)${subtype}`,
|
|
818
845
|
endpoint: scopedTool ? `/tool-failures/${encodeURIComponent(name)}?days_back=${daysBack}` : `/tool-failures?days_back=${daysBack}`,
|
|
819
846
|
toolName: name,
|
|
820
|
-
value: tool.
|
|
847
|
+
value: { tool_name: name, failure_count: count, conversation_count: tool.conversations, ...tool.subtype ? { subtype: tool.subtype } : {} }
|
|
821
848
|
});
|
|
822
849
|
const location = likelyToolLocation(name, hints);
|
|
823
850
|
if (location?.path) {
|
|
@@ -874,7 +901,7 @@ function frustrationFindings(data, daysBack, evidenceRefs) {
|
|
|
874
901
|
label: quote ? `Frustration anchor: "${quote}"` : `${count} frustrated trace(s)`,
|
|
875
902
|
endpoint: investigateFrustrationsEndpoint(daysBack),
|
|
876
903
|
...conversationId ? { conversationId } : {},
|
|
877
|
-
value: first
|
|
904
|
+
value: first ? frustrationEvidenceIds(first, anchorIndex) : { frustrated_count: count, at_risk_count: atRisk }
|
|
878
905
|
});
|
|
879
906
|
return [{
|
|
880
907
|
id: "finding_frustration_rate",
|
|
@@ -897,6 +924,17 @@ function frustrationFindings(data, daysBack, evidenceRefs) {
|
|
|
897
924
|
}]
|
|
898
925
|
}];
|
|
899
926
|
}
|
|
927
|
+
function frustrationEvidenceIds(row, anchorIndex) {
|
|
928
|
+
const ids = {};
|
|
929
|
+
for (const key of ["detection_id", "conversation_id", "trace_id", "user_id"]) {
|
|
930
|
+
const value = asString(row[key]);
|
|
931
|
+
if (value)
|
|
932
|
+
ids[key] = value;
|
|
933
|
+
}
|
|
934
|
+
if (anchorIndex !== null)
|
|
935
|
+
ids.msg_index = anchorIndex;
|
|
936
|
+
return ids;
|
|
937
|
+
}
|
|
900
938
|
function problemRows(data) {
|
|
901
939
|
const record = asRecord(data);
|
|
902
940
|
const rows = [];
|
|
@@ -938,7 +976,7 @@ function problemFindings(data, daysBack, evidenceRefs) {
|
|
|
938
976
|
kind: "problem",
|
|
939
977
|
label: `Problem "${problem.name}" (${trustNote})`,
|
|
940
978
|
endpoint: `/problems?days_back=${daysBack}&limit=${INVESTIGATION_PROBLEM_LIMIT}`,
|
|
941
|
-
value: problem.
|
|
979
|
+
value: { problem_id: problem.id, lifecycle: problem.lifecycle, trust: problem.trust, affected_conversations: problem.affectedConversations }
|
|
942
980
|
});
|
|
943
981
|
const affected = problem.affectedConversations;
|
|
944
982
|
return {
|
|
@@ -971,7 +1009,7 @@ function insufficientDataFinding(overview, evidenceRefs) {
|
|
|
971
1009
|
kind: "data_api",
|
|
972
1010
|
label: "Overview did not contain actionable production signals",
|
|
973
1011
|
endpoint: "/overview",
|
|
974
|
-
value: overview
|
|
1012
|
+
value: overviewMetrics(overview)
|
|
975
1013
|
});
|
|
976
1014
|
}
|
|
977
1015
|
return {
|
|
@@ -995,6 +1033,28 @@ function insufficientDataFinding(overview, evidenceRefs) {
|
|
|
995
1033
|
}]
|
|
996
1034
|
};
|
|
997
1035
|
}
|
|
1036
|
+
function incompleteDataFinding(failedSources, total) {
|
|
1037
|
+
return {
|
|
1038
|
+
id: "finding_incomplete_data",
|
|
1039
|
+
kind: "insufficient_data",
|
|
1040
|
+
title: `Could not check ${failedSources.join(", ")} (${failedSources.length} of ${total} sources failed)`,
|
|
1041
|
+
severity: "info",
|
|
1042
|
+
confidence: "low",
|
|
1043
|
+
impactScore: 10,
|
|
1044
|
+
rankReason: "The sources that loaded show no ranked issue, but the failed ones were not checked.",
|
|
1045
|
+
summary: "This is not evidence that production is healthy; re-run once the failed sources load (see warnings).",
|
|
1046
|
+
evidenceRefIds: [],
|
|
1047
|
+
likelyLocations: [],
|
|
1048
|
+
recommendedActions: [{
|
|
1049
|
+
id: "action_doctor_online",
|
|
1050
|
+
title: "Check connectivity and the API key.",
|
|
1051
|
+
rationale: "Failed reads usually mean a network, server, or credential problem.",
|
|
1052
|
+
command: "moda doctor --online",
|
|
1053
|
+
mutability: "read",
|
|
1054
|
+
requiresApproval: false
|
|
1055
|
+
}]
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
998
1058
|
function normalizeCloudAsk(response, question) {
|
|
999
1059
|
const record = asRecord(response);
|
|
1000
1060
|
const answer = asString(record?.answer);
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
probeApiKey,
|
|
3
3
|
redactApiKey,
|
|
4
4
|
resolveApiKeyCredential
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-1mbb0ct0.js";
|
|
6
6
|
import {
|
|
7
7
|
authFetch,
|
|
8
8
|
clearAuthSession,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
loadAuthSession,
|
|
11
11
|
login,
|
|
12
12
|
revokeCliSessionToken
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-q6f6vrrr.js";
|
|
14
14
|
import {
|
|
15
15
|
CliInputError,
|
|
16
16
|
DEFAULT_INGEST_URL,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
secretFilePathFromRef,
|
|
36
36
|
setActiveProfile,
|
|
37
37
|
upsertProfile
|
|
38
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-sqsjd08w.js";
|
|
39
39
|
import"./cli-0v6na3yp.js";
|
|
40
40
|
|
|
41
41
|
// src/profile-commands.ts
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
inspectCodeSelectors,
|
|
6
6
|
inspectPythonSelectors,
|
|
7
7
|
safePromptEvidencePath
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-d577kq6h.js";
|
|
9
9
|
import"./cli-97fnztpy.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
10
|
+
import"./cli-cdrvjva5.js";
|
|
11
|
+
import"./cli-jgfm7w1r.js";
|
|
12
|
+
import"./cli-jtyvbd8d.js";
|
|
13
|
+
import"./cli-sqsjd08w.js";
|
|
14
14
|
import {
|
|
15
15
|
__commonJS,
|
|
16
16
|
__toESM
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
runPromptSync,
|
|
12
12
|
runPromptsCommand,
|
|
13
13
|
writePromptSyncProgress
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-b4740tnv.js";
|
|
15
15
|
import {
|
|
16
16
|
promptSourceHashPayload
|
|
17
17
|
} from "./cli-mm48br00.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-d577kq6h.js";
|
|
19
19
|
import"./cli-97fnztpy.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
20
|
+
import"./cli-cdrvjva5.js";
|
|
21
|
+
import"./cli-jgfm7w1r.js";
|
|
22
|
+
import"./cli-jtyvbd8d.js";
|
|
23
|
+
import"./cli-sqsjd08w.js";
|
|
24
24
|
import"./cli-0v6na3yp.js";
|
|
25
25
|
export {
|
|
26
26
|
writePromptSyncProgress,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-k6q8dbpk.js";
|
|
4
|
+
import"./cli-1mbb0ct0.js";
|
|
5
5
|
import {
|
|
6
6
|
loadAuthSession
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-q6f6vrrr.js";
|
|
8
8
|
import {
|
|
9
9
|
stringOption
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-cdrvjva5.js";
|
|
11
11
|
import {
|
|
12
12
|
CliAuthError,
|
|
13
13
|
resolveIngestUrl,
|
|
14
14
|
resolveModaBaseUrl
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-sqsjd08w.js";
|
|
16
16
|
import"./cli-0v6na3yp.js";
|
|
17
17
|
|
|
18
18
|
// src/provision.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertFlags
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-jgfm7w1r.js";
|
|
4
4
|
import {
|
|
5
5
|
callControlAPI
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-jtyvbd8d.js";
|
|
7
7
|
import {
|
|
8
8
|
CliInputError,
|
|
9
9
|
explicitOutputMode,
|
|
10
10
|
resolveApiKey
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-sqsjd08w.js";
|
|
12
12
|
import"./cli-0v6na3yp.js";
|
|
13
13
|
|
|
14
14
|
// src/registry.ts
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
pullSkills,
|
|
4
4
|
runSkillSync,
|
|
5
5
|
runSkillsCommand
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
6
|
+
} from "./cli-8tfk8qeb.js";
|
|
7
|
+
import"./cli-cdrvjva5.js";
|
|
8
|
+
import"./cli-jgfm7w1r.js";
|
|
9
|
+
import"./cli-jtyvbd8d.js";
|
|
10
|
+
import"./cli-sqsjd08w.js";
|
|
11
11
|
import"./cli-8dtnwp9r.js";
|
|
12
12
|
import"./cli-0v6na3yp.js";
|
|
13
13
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPromptsCommand
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-b4740tnv.js";
|
|
4
4
|
import"./cli-mm48br00.js";
|
|
5
5
|
import {
|
|
6
6
|
runHarnessCommand
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-d577kq6h.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
9
|
import {
|
|
10
10
|
runSkillsCommand
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
11
|
+
} from "./cli-8tfk8qeb.js";
|
|
12
|
+
import"./cli-cdrvjva5.js";
|
|
13
|
+
import"./cli-jgfm7w1r.js";
|
|
14
|
+
import"./cli-jtyvbd8d.js";
|
|
15
15
|
import {
|
|
16
16
|
CliInputError
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-sqsjd08w.js";
|
|
18
18
|
import"./cli-8dtnwp9r.js";
|
|
19
19
|
import"./cli-0v6na3yp.js";
|
|
20
20
|
|
package/package.json
CHANGED
package/skills/moda-cli/SKILL.md
CHANGED
|
@@ -82,7 +82,10 @@ on search, traces, and clusters. `moda <noun> <verb> --help` shows which.
|
|
|
82
82
|
2. `moda problems get <problem_id> --evidence` and open two or three anchors with
|
|
83
83
|
`moda traces get <id> --msg-index=<n>` before deciding on a cause.
|
|
84
84
|
3. Make the change in code; cite the problem id and trace ids in the commit or PR.
|
|
85
|
-
4.
|
|
85
|
+
4. Test a prompt change on the Problem's failing traces (a paid replay, so ask
|
|
86
|
+
first; prompt changes only today):
|
|
87
|
+
`moda prompts ab --problem=<problem_id> --baseline=<prompt_key> --candidate=<edited file>`.
|
|
88
|
+
5. After it ships, and only if the user agrees:
|
|
86
89
|
`moda problems feedback <problem_id> --action=mark_fixed`.
|
|
87
90
|
More: `references/production-intelligence.md`.
|
|
88
91
|
|
|
@@ -92,7 +95,10 @@ More: `references/production-intelligence.md`.
|
|
|
92
95
|
indexes when you report.
|
|
93
96
|
- Never run writes (`problems feedback`, `review`,
|
|
94
97
|
`signals create|update|...`, `prompts sync|promote|ab`, `registry push`)
|
|
95
|
-
unless the user asked.
|
|
98
|
+
unless the user asked. Preview with `--dry-run` (every write except
|
|
99
|
+
`prompts promote|ab|propose` takes it): it validates and applies nothing.
|
|
100
|
+
Most writes print the exact request and a `next_commands` entry that runs
|
|
101
|
+
it for real (see `references/output-protocol.md`).
|
|
96
102
|
- An empty result in a window means "nothing in that window". Widen the window
|
|
97
103
|
once before saying something never happened.
|
|
98
104
|
- Batch reads instead of looping one id per call: `moda traces get` and
|
|
@@ -5,7 +5,7 @@ Loaded on demand from the moda-cli skill.
|
|
|
5
5
|
### 10. Everything the dashboard does, from the CLI
|
|
6
6
|
|
|
7
7
|
Every command below needs only an API key, and the tenant comes from the key.
|
|
8
|
-
Writes listed here accept `--dry-run
|
|
8
|
+
Writes listed here accept `--dry-run`: it validates the call, prints the exact request (method, endpoint, body) and sends nothing, and its `next_commands` entry is the command that sends it for real (`mutability: write`, `requires_approval: true`). That covers `problems feedback|reopen|link`, `review`, `feedback` and the `signals` writes. `prompts promote|ab|propose` refuse `--dry-run` before sending anything, so run them only when you mean it.
|
|
9
9
|
|
|
10
10
|
| Dashboard | CLI |
|
|
11
11
|
|---|---|
|