@moda-ai/cli 1.55.23 → 1.55.25
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-f8a1kejk.js → agent-t7dxmpdq.js} +8 -8
- package/dist/{cli-9g8vz4sv.js → cli-0wr3483h.js} +1 -1
- package/dist/{cli-4f6jkrnm.js → cli-7xc585hc.js} +5 -5
- package/dist/{cli-wkmdw40s.js → cli-9btx12wp.js} +1 -1
- package/dist/{cli-4yarp5s1.js → cli-9hc5bg2r.js} +1 -1
- package/dist/{cli-cv3jt1ms.js → cli-dn91fb56.js} +10 -10
- package/dist/{cli-t3a6eknn.js → cli-dve50x7p.js} +233 -28
- package/dist/{cli-54zhv6cx.js → cli-m0045npe.js} +17 -14
- package/dist/{cli-s6tw1fje.js → cli-m805msp6.js} +210 -23
- package/dist/{cli-z3g07t65.js → cli-mebf5vtr.js} +5 -5
- package/dist/{cli-2cggp8ww.js → cli-qvg26twp.js} +5 -4
- package/dist/{cli-d2zews6c.js → cli-qycsmxev.js} +3 -3
- package/dist/cli.js +1292 -335
- package/dist/{doctor-snb87jvy.js → doctor-q21mr5ya.js} +8 -8
- package/dist/{fix-fr48gr0w.js → fix-0qdtdz5h.js} +6 -6
- package/dist/{harness-github-actions-cfkx9ty9.js → harness-github-actions-atc5bbkj.js} +5 -5
- package/dist/{harness-m63b6s0k.js → harness-vzy7n7ea.js} +5 -5
- package/dist/{index-nsaph4as.js → index-4b1ybz51.js} +17 -17
- package/dist/{production-intelligence-fwjh572m.js → production-intelligence-c8e0xw3n.js} +11 -11
- package/dist/{profile-commands-548ts402.js → profile-commands-6e2dgv72.js} +3 -3
- package/dist/prompt-source-mcp.js +5 -5
- package/dist/{prompts-p66y7wep.js → prompts-3h5jcjrw.js} +6 -6
- package/dist/{provision-r9fhrvpw.js → provision-q86phh4a.js} +5 -5
- package/dist/{registry-n7dsdxmg.js → registry-s2vdsfw8.js} +3 -3
- package/dist/{skills-c17gg69y.js → skills-vq3njc8a.js} +5 -5
- package/dist/{sync-bne90xvj.js → sync-hq9dpqpr.js} +7 -7
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +35 -30
- package/skills/moda-cli/references/commands.md +22 -22
- package/skills/moda-cli/references/dashboard-parity.md +4 -4
- package/skills/moda-cli/references/detections.md +10 -10
- package/skills/moda-cli/references/feedback.md +2 -2
- package/skills/moda-cli/references/output-protocol.md +2 -2
- package/skills/moda-cli/references/production-intelligence.md +13 -12
- package/skills/moda-cli/references/prompts.md +6 -2
- package/skills/moda-cli/references/recipes.md +14 -14
- package/skills/moda-cli/references/search-and-traces.md +32 -32
- package/skills/moda-cli/references/signals-and-false-positives.md +29 -29
- package/skills/moda-cli/references/troubleshooting.md +4 -4
|
@@ -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-mebf5vtr.js";
|
|
7
|
+
import"./cli-0wr3483h.js";
|
|
8
|
+
import"./cli-m805msp6.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-7xc585hc.js";
|
|
11
11
|
import"./cli-97fnztpy.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
12
|
+
import"./cli-qvg26twp.js";
|
|
13
|
+
import"./cli-dn91fb56.js";
|
|
14
|
+
import"./cli-9btx12wp.js";
|
|
15
|
+
import"./cli-dve50x7p.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-m805msp6.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-7xc585hc.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-qvg26twp.js";
|
|
10
10
|
import {
|
|
11
11
|
assertFlags
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-dn91fb56.js";
|
|
13
13
|
import {
|
|
14
14
|
callControlAPI
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-9btx12wp.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-dve50x7p.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-7xc585hc.js";
|
|
4
4
|
import"./cli-97fnztpy.js";
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
5
|
+
import"./cli-qvg26twp.js";
|
|
6
|
+
import"./cli-dn91fb56.js";
|
|
7
|
+
import"./cli-9btx12wp.js";
|
|
8
8
|
import {
|
|
9
9
|
recordApiRequest
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-dve50x7p.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-7xc585hc.js";
|
|
46
46
|
import"./cli-97fnztpy.js";
|
|
47
|
-
import"./cli-
|
|
48
|
-
import"./cli-
|
|
49
|
-
import"./cli-
|
|
50
|
-
import"./cli-
|
|
47
|
+
import"./cli-qvg26twp.js";
|
|
48
|
+
import"./cli-dn91fb56.js";
|
|
49
|
+
import"./cli-9btx12wp.js";
|
|
50
|
+
import"./cli-dve50x7p.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-qycsmxev.js";
|
|
4
|
+
import"./cli-9hc5bg2r.js";
|
|
5
5
|
import {
|
|
6
6
|
buildDoctorReport
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-mebf5vtr.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-0wr3483h.js";
|
|
15
15
|
import {
|
|
16
16
|
initPrompts,
|
|
17
17
|
runPromptSync
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-m805msp6.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-7xc585hc.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-m0045npe.js";
|
|
51
51
|
import {
|
|
52
52
|
createCommandContext
|
|
53
|
-
} from "./cli-
|
|
54
|
-
import"./cli-
|
|
55
|
-
import"./cli-
|
|
53
|
+
} from "./cli-qvg26twp.js";
|
|
54
|
+
import"./cli-dn91fb56.js";
|
|
55
|
+
import"./cli-9btx12wp.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-dve50x7p.js";
|
|
64
64
|
import {
|
|
65
65
|
detectAgents,
|
|
66
66
|
installRules,
|
|
@@ -269,7 +269,7 @@ function renderSdkIntegrationGuideContent() {
|
|
|
269
269
|
"```",
|
|
270
270
|
"",
|
|
271
271
|
"Exact-trace confirmation: send one request through your app with a known trace ID,",
|
|
272
|
-
"then run `moda
|
|
272
|
+
"then run `moda traces spans <that-id>` — you should see your llm span(s).",
|
|
273
273
|
""
|
|
274
274
|
].join(`
|
|
275
275
|
`);
|
|
@@ -2274,7 +2274,7 @@ function buildSetupPlan(options) {
|
|
|
2274
2274
|
status: "planned",
|
|
2275
2275
|
approved: true,
|
|
2276
2276
|
files: [".claude/skills", ".cursor/rules"],
|
|
2277
|
-
command: "moda skills
|
|
2277
|
+
command: "moda skills push"
|
|
2278
2278
|
},
|
|
2279
2279
|
{
|
|
2280
2280
|
category: "sdk",
|
|
@@ -2300,7 +2300,7 @@ function buildSetupPlan(options) {
|
|
|
2300
2300
|
status: options.configureAutosync ? "planned" : "manual",
|
|
2301
2301
|
approved: options.configureAutosync,
|
|
2302
2302
|
files: [".github/workflows/moda-autosync.yml"],
|
|
2303
|
-
command: "moda prompts sync && moda skills
|
|
2303
|
+
command: "moda prompts sync && moda skills push",
|
|
2304
2304
|
reason: options.configureAutosync ? undefined : "No autosync workflow is written until it is explicitly approved (--autosync)."
|
|
2305
2305
|
},
|
|
2306
2306
|
{
|
|
@@ -2359,7 +2359,7 @@ function applySdkIntegrationOutcome(setupPlan, outcome, deps) {
|
|
|
2359
2359
|
break;
|
|
2360
2360
|
}
|
|
2361
2361
|
case "telemetry_not_observed":
|
|
2362
|
-
laneBoard?.warn("sdk", `integration applied but the verification trace was not observed; check MODA_API_KEY at runtime, then moda
|
|
2362
|
+
laneBoard?.warn("sdk", `integration applied but the verification trace was not observed; check MODA_API_KEY at runtime, then moda traces spans ${verificationId}`);
|
|
2363
2363
|
markManual(setupPlan, "sdk", outcome.detail ?? "Verification trace was not observed.");
|
|
2364
2364
|
break;
|
|
2365
2365
|
case "needs_human_input": {
|
|
@@ -2376,7 +2376,7 @@ function applySdkIntegrationOutcome(setupPlan, outcome, deps) {
|
|
|
2376
2376
|
sdkAction.reason = outcome.detail ?? "Existing Moda integration verified.";
|
|
2377
2377
|
break;
|
|
2378
2378
|
}
|
|
2379
|
-
const reason = outcome.verification ? "agent reports Moda is already integrated but the verification trace was not observed; " + `check MODA_API_KEY at runtime, then \`moda
|
|
2379
|
+
const reason = outcome.verification ? "agent reports Moda is already integrated but the verification trace was not observed; " + `check MODA_API_KEY at runtime, then \`moda traces spans ${verificationId}\`` : "agent reports Moda is already integrated — not independently verified; " + "send a real request through your app with a trace ID (`conversation_id`) you choose, then run `moda traces spans` with that id";
|
|
2380
2380
|
laneBoard?.warn("sdk", reason);
|
|
2381
2381
|
markManual(setupPlan, "sdk", reason);
|
|
2382
2382
|
break;
|
|
@@ -2480,7 +2480,7 @@ function writeAutosyncWorkflow(cwd = process.cwd()) {
|
|
|
2480
2480
|
` - name: Sync prompts to Moda`,
|
|
2481
2481
|
` run: ${GENERATED_WORKFLOW_NPX} prompts sync`,
|
|
2482
2482
|
` - name: Sync skills to Moda`,
|
|
2483
|
-
` run: ${GENERATED_WORKFLOW_NPX} skills
|
|
2483
|
+
` run: ${GENERATED_WORKFLOW_NPX} skills push`,
|
|
2484
2484
|
""
|
|
2485
2485
|
].join(`
|
|
2486
2486
|
`)}`);
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
callControlAPI,
|
|
12
12
|
callDataAPI
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-9btx12wp.js";
|
|
14
14
|
import {
|
|
15
15
|
CliAuthError,
|
|
16
16
|
CliInputError,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveModaBaseUrl,
|
|
29
29
|
safeWriteStderr,
|
|
30
30
|
shellWord
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-dve50x7p.js";
|
|
32
32
|
import"./cli-0v6na3yp.js";
|
|
33
33
|
|
|
34
34
|
// src/production-intelligence.ts
|
|
@@ -523,10 +523,10 @@ async function investigateProduction(options) {
|
|
|
523
523
|
warnings.push(result.warning);
|
|
524
524
|
}
|
|
525
525
|
if (options.toolName && tools.status === "ok" && toolRows(tools.data, options.toolName).every((row) => row.count <= 0)) {
|
|
526
|
-
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
|
|
526
|
+
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
527
|
}
|
|
528
528
|
if (options.conversationId) {
|
|
529
|
-
warnings.push(`Scoped to trace ${options.conversationId} for frustration evidence only; overview and tool failures are tenant-wide. ` + `Open the trace itself with \`moda
|
|
529
|
+
warnings.push(`Scoped to trace ${options.conversationId} for frustration evidence only; overview and tool failures are tenant-wide. ` + `Open the trace itself with \`moda traces spans ${options.conversationId}\`.`);
|
|
530
530
|
}
|
|
531
531
|
const evidenceRefs = [];
|
|
532
532
|
const findings = [];
|
|
@@ -792,7 +792,7 @@ function findingsFromOverview(overview, daysBack, hints, evidenceRefs) {
|
|
|
792
792
|
id: "action_investigate_frustration",
|
|
793
793
|
title: "Inspect frustration anchors.",
|
|
794
794
|
rationale: "Frustration anchors show the user turn where the experience degraded.",
|
|
795
|
-
command: `moda
|
|
795
|
+
command: `moda detections list --family=frustration --days-back=${daysBack} --include-window`,
|
|
796
796
|
mutability: "read",
|
|
797
797
|
requiresApproval: false
|
|
798
798
|
}]
|
|
@@ -845,7 +845,7 @@ function toolFailureFindings(data, daysBack, hints, evidenceRefs, scopedTool) {
|
|
|
845
845
|
id: `action_tool_detail_${slug(name)}`,
|
|
846
846
|
title: `Inspect ${name} failure examples.`,
|
|
847
847
|
rationale: "Examples include trace anchors and error subtypes.",
|
|
848
|
-
command: `moda
|
|
848
|
+
command: `moda detections tools ${name} --days-back=${daysBack} --include-window`,
|
|
849
849
|
mutability: "read",
|
|
850
850
|
requiresApproval: false
|
|
851
851
|
}]
|
|
@@ -891,7 +891,7 @@ function frustrationFindings(data, daysBack, evidenceRefs) {
|
|
|
891
891
|
id: "action_frustration_window",
|
|
892
892
|
title: "Read the frustration window.",
|
|
893
893
|
rationale: "The user quote and nearby turns reveal what confused or blocked the user.",
|
|
894
|
-
command: conversationId ? `moda
|
|
894
|
+
command: conversationId ? `moda traces get ${shellWord(contextTarget(conversationId))}${anchorIndex !== null ? ` --msg-index=${anchorIndex}` : ""} --window=3` : `moda detections list --family=frustration --days-back=${daysBack} --include-window`,
|
|
895
895
|
mutability: "read",
|
|
896
896
|
requiresApproval: false
|
|
897
897
|
}]
|
|
@@ -956,7 +956,7 @@ function problemFindings(data, daysBack, evidenceRefs) {
|
|
|
956
956
|
id: `action_problem_${slug(problem.id)}`,
|
|
957
957
|
title: `Open the Problem dossier for ${problem.name}.`,
|
|
958
958
|
rationale: "The dossier has the cause, evidence, affected traces and verification state.",
|
|
959
|
-
command: `moda
|
|
959
|
+
command: `moda problems get ${problem.id}`,
|
|
960
960
|
mutability: "read",
|
|
961
961
|
requiresApproval: false
|
|
962
962
|
}]
|
|
@@ -1778,13 +1778,13 @@ function slug(value) {
|
|
|
1778
1778
|
function purposeForCommand(command) {
|
|
1779
1779
|
if (command.startsWith("moda investigate"))
|
|
1780
1780
|
return "Open the ranked production investigation.";
|
|
1781
|
-
if (command.startsWith("moda
|
|
1781
|
+
if (command.startsWith("moda detections tools"))
|
|
1782
1782
|
return "Inspect tool failure examples and trace anchors.";
|
|
1783
1783
|
if (command.startsWith("moda problems"))
|
|
1784
1784
|
return "List the ranked Problems.";
|
|
1785
|
-
if (command.startsWith("moda
|
|
1785
|
+
if (command.startsWith("moda problems get "))
|
|
1786
1786
|
return "Open the Problem dossier.";
|
|
1787
|
-
if (command.startsWith("moda
|
|
1787
|
+
if (command.startsWith("moda traces get"))
|
|
1788
1788
|
return "Read the relevant trace window.";
|
|
1789
1789
|
if (command.startsWith("moda doctor"))
|
|
1790
1790
|
return "Validate Moda setup and data flow.";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
probeApiKey,
|
|
3
3
|
redactApiKey,
|
|
4
4
|
resolveApiKeyCredential
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-9hc5bg2r.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-0wr3483h.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-dve50x7p.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-7xc585hc.js";
|
|
9
9
|
import"./cli-97fnztpy.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
10
|
+
import"./cli-qvg26twp.js";
|
|
11
|
+
import"./cli-dn91fb56.js";
|
|
12
|
+
import"./cli-9btx12wp.js";
|
|
13
|
+
import"./cli-dve50x7p.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-m805msp6.js";
|
|
15
15
|
import {
|
|
16
16
|
promptSourceHashPayload
|
|
17
17
|
} from "./cli-mm48br00.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-7xc585hc.js";
|
|
19
19
|
import"./cli-97fnztpy.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
20
|
+
import"./cli-qvg26twp.js";
|
|
21
|
+
import"./cli-dn91fb56.js";
|
|
22
|
+
import"./cli-9btx12wp.js";
|
|
23
|
+
import"./cli-dve50x7p.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-qycsmxev.js";
|
|
4
|
+
import"./cli-9hc5bg2r.js";
|
|
5
5
|
import {
|
|
6
6
|
loadAuthSession
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-0wr3483h.js";
|
|
8
8
|
import {
|
|
9
9
|
stringOption
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-qvg26twp.js";
|
|
11
11
|
import {
|
|
12
12
|
CliAuthError,
|
|
13
13
|
resolveIngestUrl,
|
|
14
14
|
resolveModaBaseUrl
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-dve50x7p.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-dn91fb56.js";
|
|
4
4
|
import {
|
|
5
5
|
callControlAPI
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-9btx12wp.js";
|
|
7
7
|
import {
|
|
8
8
|
CliInputError,
|
|
9
9
|
explicitOutputMode,
|
|
10
10
|
resolveApiKey
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-dve50x7p.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-m0045npe.js";
|
|
7
|
+
import"./cli-qvg26twp.js";
|
|
8
|
+
import"./cli-dn91fb56.js";
|
|
9
|
+
import"./cli-9btx12wp.js";
|
|
10
|
+
import"./cli-dve50x7p.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-m805msp6.js";
|
|
4
4
|
import"./cli-mm48br00.js";
|
|
5
5
|
import {
|
|
6
6
|
runHarnessCommand
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-7xc585hc.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-m0045npe.js";
|
|
12
|
+
import"./cli-qvg26twp.js";
|
|
13
|
+
import"./cli-dn91fb56.js";
|
|
14
|
+
import"./cli-9btx12wp.js";
|
|
15
15
|
import {
|
|
16
16
|
CliInputError
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-dve50x7p.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
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moda-cli
|
|
3
3
|
version: 3.0.0
|
|
4
|
-
description: Investigate a production AI agent with the Moda CLI (`moda`) - find where something happened in real traces (search, then
|
|
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
|
|
|
7
7
|
# Moda CLI
|
|
8
8
|
|
|
9
9
|
`moda` queries one Moda tenant's production analytics. A **trace** is one agent
|
|
10
10
|
run: every message, tool call, and step sharing one `conversation_id` (older
|
|
11
|
-
names: "conversation"; `moda conversations` is an alias of `moda traces`).
|
|
12
|
-
Analytics commands are read-only.
|
|
13
|
-
|
|
11
|
+
names: "conversation"; `moda conversations` is an alias of `moda traces list`).
|
|
12
|
+
Analytics commands are read-only. Commands are `moda <noun> <verb>` (`traces`,
|
|
13
|
+
`problems`, `detections`, `review`); older names such as `moda context` still
|
|
14
|
+
work but warn (`meta.deprecated`), so use the forms below. Detailed guides live
|
|
15
|
+
in `references/`; read one only when the task needs it.
|
|
14
16
|
|
|
15
17
|
## Before the first command
|
|
16
18
|
|
|
@@ -23,7 +25,7 @@ one only when the task needs it.
|
|
|
23
25
|
- Not installed: `npx -y -p @moda-ai/cli moda <command>`.
|
|
24
26
|
- If a response carries `meta.update`, the installed CLI is out of date and
|
|
25
27
|
may not match this guide; tell the user how to update.
|
|
26
|
-
- Flags: `moda <
|
|
28
|
+
- Flags: `moda <noun> <verb> --help` lists every flag the command accepts, with
|
|
27
29
|
types, ranges, and defaults. Each command rejects flags it does not take and
|
|
28
30
|
the error lists the valid ones; read that list instead of guessing.
|
|
29
31
|
|
|
@@ -53,74 +55,77 @@ Details: `references/output-protocol.md`.
|
|
|
53
55
|
|
|
54
56
|
| Goal | First command | Then |
|
|
55
57
|
|---|---|---|
|
|
56
|
-
| Where did X happen / traces about Y | `moda search "<words>"` (`--mode=keyword` for ids, error codes, exact strings; `--include-tool-io` for tool inputs/outputs) | `moda
|
|
58
|
+
| 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` |
|
|
57
59
|
| Search returned nothing | Read `.warnings` (degraded mode, reason). Try a shorter phrase, `--mode=keyword`, a wider `--time-range` | `moda traces --search="<words>"` |
|
|
58
60
|
| Is the agent healthy? | `moda overview --days-back=7` | `moda investigate` |
|
|
59
|
-
| What to fix first? | `moda investigate` or `moda problems` (free) | `moda
|
|
60
|
-
| Why is tool T failing? | `moda
|
|
61
|
-
| What frustrates users? | `moda
|
|
62
|
-
| Other emotions, laziness, hallucinations | `moda
|
|
63
|
-
| Read one whole trace | `moda
|
|
64
|
-
| Read several traces or turns | `moda
|
|
65
|
-
| One user's experience | `moda users`, `moda user <user_id>` | `moda search "<words>" --user-id=<id>` |
|
|
61
|
+
| What to fix first? | `moda investigate` or `moda problems` (free) | `moda problems get <problem_id>`, then `--evidence` / `--traces` |
|
|
62
|
+
| Why is tool T failing? | `moda detections tools` | `moda detections tools <T>` (use each row's `anchor`) |
|
|
63
|
+
| What frustrates users? | `moda detections list --family=frustration --limit=10` | `moda traces get <anchor.conversation_id> --msg-index=<anchor.msg_index>` |
|
|
64
|
+
| Other emotions, laziness, hallucinations | `moda detections list --family=emotion:<f>`, `moda detections list --family=laziness`, `moda detections list --family=hallucination --kind=contradicted` | context on the row's anchor |
|
|
65
|
+
| Read one whole trace | `moda traces get <id> --all` (pages of up to 500 messages) | `moda traces spans <id>` for raw spans |
|
|
66
|
+
| Read several traces or turns | `moda traces get <id1>@<msg_index> <id2>@<msg_index> ...` (up to 25; or one per line via `--ids-from=-`) | Same for `moda traces spans <id1> <id2> ...` |
|
|
67
|
+
| One user's experience | `moda users`, `moda user <user_id>` | `moda traces search "<words>" --user-id=<id>` |
|
|
66
68
|
| Topic mix | `moda clusters` | `moda cluster-traces <node_id>` |
|
|
67
|
-
| What the agent believed at a turn | `moda
|
|
69
|
+
| What the agent believed at a turn | `moda traces state <id> --snapshot --msg-index=<n>` | |
|
|
68
70
|
| A synthesized answer | `moda ask "<question>"` only when the user asks: each call is a paid agent run (up to about 200k tokens) | Exit 3 means degraded |
|
|
69
|
-
| A detection is wrong | `moda
|
|
71
|
+
| A detection is wrong | `moda review <kind> <target> --reason="..."` | `references/signals-and-false-positives.md` |
|
|
70
72
|
| Moda data looks wrong or missing | `moda feedback "<what and why>" --conversation-id=<id>` | |
|
|
71
73
|
| Prompts, replays, registry push | Only on explicit request | `references/prompts.md`, `references/replays-and-registry.md` |
|
|
72
74
|
|
|
73
75
|
Time windows differ by command: `--days-back=N` (1-90) on overview,
|
|
74
76
|
investigate, problems, and detection commands; `--time-range=1h|24h|3d|7d|30d|90d|all`
|
|
75
|
-
on search, traces, and clusters. `moda <
|
|
77
|
+
on search, traces, and clusters. `moda <noun> <verb> --help` shows which.
|
|
76
78
|
|
|
77
79
|
## Fixing a Problem
|
|
78
80
|
|
|
79
81
|
1. `moda investigate` or `moda problems` to pick one; note its `problem_id`.
|
|
80
|
-
2. `moda
|
|
81
|
-
`moda
|
|
82
|
+
2. `moda problems get <problem_id> --evidence` and open two or three anchors with
|
|
83
|
+
`moda traces get <id> --msg-index=<n>` before deciding on a cause.
|
|
82
84
|
3. Make the change in code; cite the problem id and trace ids in the commit or PR.
|
|
83
|
-
4.
|
|
84
|
-
|
|
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:
|
|
89
|
+
`moda problems feedback <problem_id> --action=mark_fixed`.
|
|
85
90
|
More: `references/production-intelligence.md`.
|
|
86
91
|
|
|
87
92
|
## Rules
|
|
88
93
|
|
|
89
94
|
- Read evidence before acting on a summary; quote trace ids and message
|
|
90
95
|
indexes when you report.
|
|
91
|
-
- Never run writes (`
|
|
96
|
+
- Never run writes (`problems feedback`, `review`,
|
|
92
97
|
`signals create|update|...`, `prompts sync|promote|ab`, `registry push`)
|
|
93
98
|
unless the user asked. Use `--dry-run` where a command offers it.
|
|
94
99
|
- An empty result in a window means "nothing in that window". Widen the window
|
|
95
100
|
once before saying something never happened.
|
|
96
|
-
- Batch reads instead of looping one id per call: `moda
|
|
97
|
-
`moda
|
|
101
|
+
- Batch reads instead of looping one id per call: `moda traces get` and
|
|
102
|
+
`moda traces spans` take up to 25 ids and report per-item results.
|
|
98
103
|
- Do not load `moda manifest --json` or `moda --json-schemas` to learn the CLI
|
|
99
|
-
(about 20k and 11k tokens). Use `moda <
|
|
104
|
+
(about 20k and 11k tokens). Use `moda <noun> <verb> --help`.
|
|
100
105
|
|
|
101
106
|
## Recipes
|
|
102
107
|
|
|
103
108
|
Find where something happened and read the turn:
|
|
104
109
|
|
|
105
110
|
```bash
|
|
106
|
-
moda search "refund not processed" --limit=5 --json \
|
|
111
|
+
moda traces search "refund not processed" --limit=5 --json \
|
|
107
112
|
| jq -r 'first(.results[] | select(.message_index != null)) | "\(.conversation_id) \(.message_index)"' \
|
|
108
|
-
| while read id idx; do moda
|
|
113
|
+
| while read id idx; do moda traces get "$id" --msg-index="$idx" --window=3; done
|
|
109
114
|
```
|
|
110
115
|
|
|
111
116
|
Open the turn behind the top frustration:
|
|
112
117
|
|
|
113
118
|
```bash
|
|
114
|
-
moda
|
|
119
|
+
moda detections list --family=frustration --limit=5 --json \
|
|
115
120
|
| jq -r 'first(.frustrations[] | select(.anchor.msg_index != null)) | .anchor | "\(.conversation_id) \(.msg_index)"' \
|
|
116
|
-
| while read id idx; do moda
|
|
121
|
+
| while read id idx; do moda traces get "$id" --msg-index="$idx" --window=2; done
|
|
117
122
|
```
|
|
118
123
|
|
|
119
124
|
Which tool fails most, and an example:
|
|
120
125
|
|
|
121
126
|
```bash
|
|
122
|
-
moda
|
|
123
|
-
moda
|
|
127
|
+
moda detections tools --json | jq '.tools[] | {tool: .tool_name, failures: .failure_count}'
|
|
128
|
+
moda detections tools <tool_name> --limit=3
|
|
124
129
|
```
|
|
125
130
|
|
|
126
131
|
## References
|