@moda-ai/cli 1.55.110 → 1.55.112
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 +3 -3
- package/dist/{agent-5kfdbx36.js → agent-38z6n98a.js} +4 -4
- package/dist/{change-impact-v2vbcphy.js → change-impact-yd2f4mev.js} +2 -2
- package/dist/{cli-mh94f7gp.js → cli-8g0rxjgw.js} +3 -11
- package/dist/{cli-hv4bztsm.js → cli-ecp9sdye.js} +1 -1
- package/dist/{cli-6zmc6asf.js → cli-eecp6bft.js} +3 -3
- package/dist/{cli-ahqr7wsp.js → cli-jyj7ac5g.js} +1 -1
- package/dist/{cli-ew4pkn5b.js → cli-mtjw2xtp.js} +2 -2
- package/dist/{cli-84jkd2x7.js → cli-ndag29z1.js} +10 -10
- package/dist/{cli-3r578f36.js → cli-rmxcfxy5.js} +4 -4
- package/dist/cli.js +56 -58
- package/dist/{doctor-t0b99wnq.js → doctor-yennaeda.js} +3 -3
- package/dist/{harness-github-actions-e4zrcrym.js → harness-github-actions-3jnzwgk1.js} +2 -2
- package/dist/{harness-phdj0eqr.js → harness-tpmp0sgy.js} +2 -2
- package/dist/{index-86wb6vbh.js → index-gp66kk63.js} +3 -3
- package/dist/{index-65grk0mp.js → index-pz84mnye.js} +2 -2
- package/dist/{index-zhg2zc3x.js → index-ted8jvg4.js} +5 -5
- package/dist/{prompt-attribution-8ak38a3q.js → prompt-attribution-k9cncjzt.js} +2 -2
- package/dist/prompt-source-mcp.js +2 -2
- package/dist/{prompts-a8zcvc1c.js → prompts-4x1mtvzq.js} +2 -2
- package/dist/{registry-p07epn79.js → registry-egersrtj.js} +1 -1
- package/dist/{skills-5atq9sgh.js → skills-ze0zxz7e.js} +2 -2
- package/dist/{sync-e76vmfty.js → sync-hem2vxd9.js} +4 -4
- package/package.json +4 -5
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +1 -1
- package/skills/moda-cli/references/commands.md +1 -1
- package/skills/moda-cli/references/output-protocol.md +5 -0
- package/skills/moda-cli/references/troubleshooting.md +11 -2
package/README.md
CHANGED
|
@@ -157,9 +157,9 @@ moda traces --search="error" --environment=production
|
|
|
157
157
|
moda cluster-traces <node_id> # Traces assigned to one cluster node
|
|
158
158
|
moda clusters # Walk the topic hierarchy
|
|
159
159
|
moda clusters --search="billing disputes" # Find a cluster by meaning
|
|
160
|
-
moda
|
|
161
|
-
moda
|
|
162
|
-
moda
|
|
160
|
+
moda traces state <conversation_id> # Agent memory now: tasks and facts
|
|
161
|
+
moda traces state <id> --summary-only # Fact counts per segment
|
|
162
|
+
moda traces get <id> --msg-index=42 # What happened at turn 42 (state snapshots and replay are retired)
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
Live tail (one JSON line per new item — `tail -f` for your agent):
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDoctorReport
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-mtjw2xtp.js";
|
|
4
4
|
import"./cli-bgbtrmtr.js";
|
|
5
|
-
import"./cli-
|
|
5
|
+
import"./cli-rmxcfxy5.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
7
|
import"./cli-764m5azg.js";
|
|
8
8
|
import {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
validateHarnessReport
|
|
18
18
|
} from "./cli-krm4w2v9.js";
|
|
19
19
|
import"./cli-3thzh1mq.js";
|
|
20
|
-
import"./cli-
|
|
20
|
+
import"./cli-8g0rxjgw.js";
|
|
21
21
|
import"./cli-e0kbye4s.js";
|
|
22
22
|
import"./cli-cp8gv24j.js";
|
|
23
23
|
import {
|
|
@@ -96,7 +96,7 @@ async function buildAgentContext(context) {
|
|
|
96
96
|
const graph = readHarnessGraphIfPresent(context.cwd);
|
|
97
97
|
const reportState = readHarnessReportState(context.cwd);
|
|
98
98
|
const syncState = readHarnessSyncState(context.cwd);
|
|
99
|
-
const harness = graph ? await import("./harness-
|
|
99
|
+
const harness = graph ? await import("./harness-tpmp0sgy.js") : undefined;
|
|
100
100
|
const topFindings = doctor.checks.filter((check) => check.status === "fail" || check.status === "warning").slice(0, 12).map(checkToFinding);
|
|
101
101
|
const evidenceRefs = [
|
|
102
102
|
...doctor.checks.map(checkToEvidenceRef),
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
resolvedSymbol,
|
|
12
12
|
returnExpressions,
|
|
13
13
|
valueDeclaration
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-ndag29z1.js";
|
|
15
15
|
import"./cli-rpyepjwb.js";
|
|
16
16
|
import"./cli-97fnztpy.js";
|
|
17
17
|
import {
|
|
18
18
|
detectBoundRuntimeClasses
|
|
19
19
|
} from "./cli-krm4w2v9.js";
|
|
20
20
|
import"./cli-3thzh1mq.js";
|
|
21
|
-
import"./cli-
|
|
21
|
+
import"./cli-8g0rxjgw.js";
|
|
22
22
|
import"./cli-e0kbye4s.js";
|
|
23
23
|
import"./cli-cp8gv24j.js";
|
|
24
24
|
import"./cli-tca7sztv.js";
|
|
@@ -73,9 +73,9 @@ var ConversationsSchema = z.object({
|
|
|
73
73
|
since: isoBoundFlag().describe("Absolute UTC start, inclusive (ISO date or datetime); intersected with --time-range"),
|
|
74
74
|
until: isoBoundFlag().describe("Absolute UTC end, inclusive (ISO date or datetime; a date covers that whole day)"),
|
|
75
75
|
environment: z.enum(["all", "development", "staging", "production"]).default("all").optional().describe("Only traces from this environment"),
|
|
76
|
-
world_state: z.string().max(200).optional().describe("Match world-state content (
|
|
76
|
+
world_state: z.string().max(200).optional().describe("Match world-state content (task goals; task-engine facts and profile); comma = AND"),
|
|
77
77
|
outcome: z.enum(["any", "positive", "negative"]).default("any").optional().describe("Filter by trace outcome: negative = a frustration was detected in the trace, positive = no frustration detected"),
|
|
78
|
-
include_world_state: boolFlag().describe("Attach each result's world-state summary"),
|
|
78
|
+
include_world_state: boolFlag().describe("Attach each result's world-state summary (hasData, fact counts per segment)"),
|
|
79
79
|
sort: z.enum(["recent", "longest", "slowest"]).optional().describe("recent = newest activity, longest = most messages, slowest = longest span"),
|
|
80
80
|
cohort: cohortFlag("Only traces of this cohort's current members (builtin:<key> or a saved cohort id)"),
|
|
81
81
|
limit: z.number().int().min(1).max(100).default(20).optional().describe("Maximum traces to return"),
|
|
@@ -83,15 +83,7 @@ var ConversationsSchema = z.object({
|
|
|
83
83
|
});
|
|
84
84
|
var WorldStateSchema = z.object({
|
|
85
85
|
conversation_id: z.string().describe("Trace ID"),
|
|
86
|
-
summary_only: boolFlag().describe("
|
|
87
|
-
event_limit: z.number().int().min(1).max(5000).default(2000).optional().describe("Maximum world-state events to return"),
|
|
88
|
-
snapshot: boolFlag().describe("Folded slots at one tick (what the agent believed at that turn)"),
|
|
89
|
-
msg_index: z.number().int().min(0).max(1e5).optional().describe("Snapshot tick: message index (default 0)"),
|
|
90
|
-
block_index: z.number().int().min(0).max(1e5).optional().describe("Snapshot tick: content block index (default 0)"),
|
|
91
|
-
segment_index: z.number().int().min(0).max(65535).optional().describe("Scope the snapshot to one segment"),
|
|
92
|
-
replay: boolFlag().describe("State-over-time replay (frames mode needs --message-count)"),
|
|
93
|
-
format: z.enum(["frames", "fold-inputs"]).optional().describe("Replay format (default frames)"),
|
|
94
|
-
message_count: z.number().int().min(1).max(1e6).optional().describe("Messages to fold in frames mode")
|
|
86
|
+
summary_only: boolFlag().describe("Fact counts and top facts per segment instead of the full segments (tasks and facts)")
|
|
95
87
|
});
|
|
96
88
|
var ContextSchema = z.object({
|
|
97
89
|
conversation_id: z.string().min(1).describe("Trace ID"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
enumerateToolCatalog,
|
|
3
3
|
enumerateWorkflows
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-ecp9sdye.js";
|
|
5
5
|
import {
|
|
6
6
|
require_out
|
|
7
7
|
} from "./cli-764m5azg.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
unwrap,
|
|
35
35
|
valueDeclaration,
|
|
36
36
|
visit
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-ndag29z1.js";
|
|
38
38
|
import"./cli-rpyepjwb.js";
|
|
39
39
|
import"./cli-97fnztpy.js";
|
|
40
40
|
import {
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
isTestWorkerConfig
|
|
43
43
|
} from "./cli-krm4w2v9.js";
|
|
44
44
|
import"./cli-3thzh1mq.js";
|
|
45
|
-
import"./cli-
|
|
45
|
+
import"./cli-8g0rxjgw.js";
|
|
46
46
|
import"./cli-e0kbye4s.js";
|
|
47
47
|
import"./cli-cp8gv24j.js";
|
|
48
48
|
import {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./cli-bgbtrmtr.js";
|
|
5
5
|
import {
|
|
6
6
|
inspectPromptManifest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-rmxcfxy5.js";
|
|
8
8
|
import {
|
|
9
9
|
readHarnessSyncState,
|
|
10
10
|
renderDoctorHuman,
|
|
@@ -393,7 +393,7 @@ async function harnessCurrentCheck(cwd, manifestPath, manifestExists, tenantId)
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
try {
|
|
396
|
-
const { scanHarness } = await import("./harness-
|
|
396
|
+
const { scanHarness } = await import("./harness-tpmp0sgy.js");
|
|
397
397
|
const current = scanHarness({
|
|
398
398
|
rootDir: cwd,
|
|
399
399
|
scannerVersion: "doctor",
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
assertFlags,
|
|
45
45
|
assertPositionals,
|
|
46
46
|
requireTenant
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-8g0rxjgw.js";
|
|
48
48
|
import {
|
|
49
49
|
ApiError,
|
|
50
50
|
callControlAPI
|
|
@@ -21010,7 +21010,7 @@ async function runHarnessCommand(context) {
|
|
|
21010
21010
|
throw new CliInputError(`'moda harness ${subcommand}' has no dry-run mode, so nothing was sent.`, `Remove --dry-run to run it for real. Harness commands with a real dry-run: ${[...HARNESS_DRY_RUN_SUBCOMMANDS].join(", ")}.`);
|
|
21011
21011
|
}
|
|
21012
21012
|
if (subcommand === "skeleton" || subcommand === "skeleton-diff") {
|
|
21013
|
-
const { runSkeletonCommand } = await import("./cli-
|
|
21013
|
+
const { runSkeletonCommand } = await import("./cli-eecp6bft.js");
|
|
21014
21014
|
return runSkeletonCommand(context);
|
|
21015
21015
|
}
|
|
21016
21016
|
if (subcommand === "register")
|
|
@@ -21022,7 +21022,7 @@ async function runHarnessCommand(context) {
|
|
|
21022
21022
|
assertPositionals("harness impact", context.positionals, 1, "moda harness impact --from=<commit> --to=<commit>");
|
|
21023
21023
|
if (!context.flags.from)
|
|
21024
21024
|
throw new CliInputError("harness impact requires --from=<old-commit>.");
|
|
21025
|
-
const { localChangeImpact, readRecordedImpactCalls } = await import("./change-impact-
|
|
21025
|
+
const { localChangeImpact, readRecordedImpactCalls } = await import("./change-impact-yd2f4mev.js");
|
|
21026
21026
|
const result = localChangeImpact({
|
|
21027
21027
|
checkout: resolve10(context.cwd, context.flags.path ?? "."),
|
|
21028
21028
|
from: context.flags.from,
|
|
@@ -21294,7 +21294,7 @@ async function runHarnessCommand(context) {
|
|
|
21294
21294
|
throw new CliInputError("Focused remote prompt analysis is not supported yet.", "Use local --analyst=claude|codex|cursor|local-scan, or drop --concern for a full remote report.");
|
|
21295
21295
|
}
|
|
21296
21296
|
if (context.flags["github-actions"] === "true") {
|
|
21297
|
-
const { runGithubActionsAnalyze } = await import("./harness-github-actions-
|
|
21297
|
+
const { runGithubActionsAnalyze } = await import("./harness-github-actions-3jnzwgk1.js");
|
|
21298
21298
|
const result = await runGithubActionsAnalyze(rootDir, {
|
|
21299
21299
|
writeReport: (report2) => {
|
|
21300
21300
|
const normalized = normalizeHarnessReport(report2);
|
|
@@ -21445,8 +21445,8 @@ async function runHarnessCommand(context) {
|
|
|
21445
21445
|
}
|
|
21446
21446
|
const { artifacts, unknowns, canonicalAgentIdentities } = deterministicGraphItems(rootDir, promote === "all" ? undefined : promote);
|
|
21447
21447
|
tagComponentStatus({ runtimeAgents: [], artifacts }, rootDir);
|
|
21448
|
-
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-
|
|
21449
|
-
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-
|
|
21448
|
+
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-pz84mnye.js");
|
|
21449
|
+
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-gp66kk63.js");
|
|
21450
21450
|
let components = { runtimeAgents: [], artifacts: [], warnings: [] };
|
|
21451
21451
|
if (promote === "all" || promote === "topology" || promote === "tools") {
|
|
21452
21452
|
const { result, ctx } = extractHarnessWithContext2(rootDir);
|
|
@@ -21518,8 +21518,8 @@ async function runHarnessCommand(context) {
|
|
|
21518
21518
|
}
|
|
21519
21519
|
case "extract": {
|
|
21520
21520
|
writeHumanProgress(context, "Harness extract: tracing model call sites (no LLM, no network)...");
|
|
21521
|
-
const { extractHarnessWithContext: extractHarnessWithContext2, serializeExtractResult } = await import("./index-
|
|
21522
|
-
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-
|
|
21521
|
+
const { extractHarnessWithContext: extractHarnessWithContext2, serializeExtractResult } = await import("./index-pz84mnye.js");
|
|
21522
|
+
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-gp66kk63.js");
|
|
21523
21523
|
const { result, ctx } = extractHarnessWithContext2(rootDir, { fresh: true });
|
|
21524
21524
|
const items = deterministicGraphItems(rootDir);
|
|
21525
21525
|
const artifacts = items.artifacts;
|
|
@@ -22426,8 +22426,8 @@ var CONCERN_PROMOTED_ARTIFACT_TYPES = {
|
|
|
22426
22426
|
evals: new Set(["model_config", "eval"])
|
|
22427
22427
|
};
|
|
22428
22428
|
async function deterministicFloorGraph(rootDir, options = {}) {
|
|
22429
|
-
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-
|
|
22430
|
-
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-
|
|
22429
|
+
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-pz84mnye.js");
|
|
22430
|
+
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-gp66kk63.js");
|
|
22431
22431
|
const { result, ctx } = extractHarnessWithContext2(rootDir);
|
|
22432
22432
|
const items = deterministicGraphItems(rootDir);
|
|
22433
22433
|
const components = mergeEnumeratedComponents(items.artifacts, enumerateHarnessComponents(result, ctx));
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
assertFlags,
|
|
13
13
|
assertPositionals
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-8g0rxjgw.js";
|
|
15
15
|
import {
|
|
16
16
|
callControlAPI
|
|
17
17
|
} from "./cli-cp8gv24j.js";
|
|
@@ -270,7 +270,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
|
|
|
270
270
|
const analyzedDefinitions = new Map;
|
|
271
271
|
if (flags["no-analyze"] !== "true") {
|
|
272
272
|
options.onProgress?.("Analyzing prompt sources before sync.");
|
|
273
|
-
const { analyzeHarnessPrompts } = await import("./harness-
|
|
273
|
+
const { analyzeHarnessPrompts } = await import("./harness-tpmp0sgy.js");
|
|
274
274
|
const result = await analyzeHarnessPrompts({
|
|
275
275
|
rootDir: process.cwd(),
|
|
276
276
|
existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
|
|
@@ -298,7 +298,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
|
|
|
298
298
|
const mergedSources = mergePromptSources(manifest.sources, extraSources);
|
|
299
299
|
const manifestUpdate = stableJson(mergedSources) === stableJson(mergePromptSources(manifest.sources, [])) ? undefined : $stringify({ version: 2, prompt_paths: manifest.promptPaths, sources: mergedSources });
|
|
300
300
|
const prompts = await discoverPrompts(extraSources);
|
|
301
|
-
const { checkPromptAttribution } = await import("./prompt-attribution-
|
|
301
|
+
const { checkPromptAttribution } = await import("./prompt-attribution-k9cncjzt.js");
|
|
302
302
|
const attribution = checkPromptAttribution(process.cwd(), prompts.map((prompt) => prompt.key));
|
|
303
303
|
const brokenAttribution = attribution.references.filter((reference) => reference.status === "missing");
|
|
304
304
|
if (brokenAttribution.length) {
|
|
@@ -604,7 +604,7 @@ async function migratePromptManifest(options = {}) {
|
|
|
604
604
|
let addedSources = [];
|
|
605
605
|
let pendingSources = [];
|
|
606
606
|
if (options.discover) {
|
|
607
|
-
const { analyzeHarnessPrompts } = await import("./harness-
|
|
607
|
+
const { analyzeHarnessPrompts } = await import("./harness-tpmp0sgy.js");
|
|
608
608
|
const result = await analyzeHarnessPrompts({
|
|
609
609
|
rootDir: root,
|
|
610
610
|
existing: manifest.sources,
|
package/dist/cli.js
CHANGED
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
unknownSignalsSubcommandError,
|
|
78
78
|
usageLine,
|
|
79
79
|
writeDryRun
|
|
80
|
-
} from "./cli-
|
|
80
|
+
} from "./cli-8g0rxjgw.js";
|
|
81
81
|
import {
|
|
82
82
|
envOptOutSet,
|
|
83
83
|
envSwitchedOff,
|
|
@@ -1200,8 +1200,8 @@ var CANONICAL_LEAVES = [
|
|
|
1200
1200
|
path: "traces state",
|
|
1201
1201
|
args: "<conversation_id>",
|
|
1202
1202
|
handler: "world-state",
|
|
1203
|
-
summary: "A trace's world state (
|
|
1204
|
-
examples: ["moda traces state <conversation_id>
|
|
1203
|
+
summary: "A trace's world state now (tasks and facts)",
|
|
1204
|
+
examples: ["moda traces state <conversation_id>", "moda traces state <conversation_id> --summary-only"]
|
|
1205
1205
|
},
|
|
1206
1206
|
{
|
|
1207
1207
|
noun: "traces",
|
|
@@ -3021,25 +3021,25 @@ function leafManifestFields(leaf, commands) {
|
|
|
3021
3021
|
import { fileURLToPath } from "url";
|
|
3022
3022
|
import { realpathSync } from "fs";
|
|
3023
3023
|
async function runPromptsCommand(...args) {
|
|
3024
|
-
return (await import("./prompts-
|
|
3024
|
+
return (await import("./prompts-4x1mtvzq.js")).runPromptsCommand(...args);
|
|
3025
3025
|
}
|
|
3026
3026
|
async function runSkillsCommand(...args) {
|
|
3027
|
-
return (await import("./skills-
|
|
3027
|
+
return (await import("./skills-ze0zxz7e.js")).runSkillsCommand(...args);
|
|
3028
3028
|
}
|
|
3029
3029
|
async function runHarnessCommand(...args) {
|
|
3030
|
-
return (await import("./harness-
|
|
3030
|
+
return (await import("./harness-tpmp0sgy.js")).runHarnessCommand(...args);
|
|
3031
3031
|
}
|
|
3032
3032
|
async function runSyncCommand(...args) {
|
|
3033
|
-
return (await import("./sync-
|
|
3033
|
+
return (await import("./sync-hem2vxd9.js")).runSyncCommand(...args);
|
|
3034
3034
|
}
|
|
3035
3035
|
async function runRegistryCommand(...args) {
|
|
3036
|
-
return (await import("./registry-
|
|
3036
|
+
return (await import("./registry-egersrtj.js")).runRegistryCommand(...args);
|
|
3037
3037
|
}
|
|
3038
3038
|
async function runDoctorCommand(...args) {
|
|
3039
|
-
return (await import("./doctor-
|
|
3039
|
+
return (await import("./doctor-yennaeda.js")).runDoctorCommand(...args);
|
|
3040
3040
|
}
|
|
3041
3041
|
async function runStatusCommand(...args) {
|
|
3042
|
-
return (await import("./doctor-
|
|
3042
|
+
return (await import("./doctor-yennaeda.js")).runStatusCommand(...args);
|
|
3043
3043
|
}
|
|
3044
3044
|
async function runAuthCommand(...args) {
|
|
3045
3045
|
return (await import("./profile-commands-tz3jykvh.js")).runAuthCommand(...args);
|
|
@@ -3051,7 +3051,7 @@ async function runProfilesCommand(...args) {
|
|
|
3051
3051
|
return (await import("./profile-commands-tz3jykvh.js")).runProfilesCommand(...args);
|
|
3052
3052
|
}
|
|
3053
3053
|
async function runAgentCommand(...args) {
|
|
3054
|
-
return (await import("./agent-
|
|
3054
|
+
return (await import("./agent-38z6n98a.js")).runAgentCommand(...args);
|
|
3055
3055
|
}
|
|
3056
3056
|
async function runProductionCommand(...args) {
|
|
3057
3057
|
return (await import("./production-intelligence-nphep7xw.js")).runProductionCommand(...args);
|
|
@@ -3728,14 +3728,32 @@ function throwIfNotFound(entity, id, isMissing, message) {
|
|
|
3728
3728
|
return;
|
|
3729
3729
|
throw new CliNotFoundError(entity, id, message, NOT_FOUND_HINTS[entity]);
|
|
3730
3730
|
}
|
|
3731
|
-
function
|
|
3732
|
-
|
|
3731
|
+
function noWorldStateWarning(conversationId) {
|
|
3732
|
+
return `No world state for trace "${conversationId}": the trace may not exist in this tenant, or no tasks have been tracked for it yet. Check the trace exists with: moda traces get ${shellArg(contextTarget(conversationId))} --metadata-only`;
|
|
3733
|
+
}
|
|
3734
|
+
var RETIRED_WORLD_STATE_FLAGS = {
|
|
3735
|
+
snapshot: "snapshot",
|
|
3736
|
+
msg_index: "snapshot",
|
|
3737
|
+
block_index: "snapshot",
|
|
3738
|
+
segment_index: "snapshot",
|
|
3739
|
+
replay: "replay",
|
|
3740
|
+
message_count: "replay"
|
|
3741
|
+
};
|
|
3742
|
+
var RETIRED_REPLAY_FORMATS = new Set(["frames", "fold-inputs", "fold_inputs"]);
|
|
3743
|
+
function disabledRetiredMode(args, key) {
|
|
3744
|
+
return (key === "snapshot" || key === "replay") && parseBooleanFlagValue(args[key]) === false;
|
|
3745
|
+
}
|
|
3746
|
+
var RETIRED_EVENT_LIMIT_WARNING = "--event-limit is ignored: the world-state event log was retired, so there are no events to limit.";
|
|
3747
|
+
function retiredWorldStateFlagError(args, conversationId) {
|
|
3748
|
+
const flag = Object.keys(RETIRED_WORLD_STATE_FLAGS).find((key) => (key in args) && !disabledRetiredMode(args, key)) ?? (RETIRED_REPLAY_FORMATS.has(String(args.format ?? "")) ? "format" : undefined);
|
|
3749
|
+
if (!flag)
|
|
3733
3750
|
return;
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
}
|
|
3751
|
+
const view = flag === "format" ? "replay" : RETIRED_WORLD_STATE_FLAGS[flag];
|
|
3752
|
+
const state = `moda traces state ${shellArg(conversationId)}`;
|
|
3753
|
+
const target = shellArg(contextTarget(conversationId));
|
|
3754
|
+
const msgIndex = Number(args.msg_index);
|
|
3755
|
+
const read = view === "snapshot" ? `moda traces get ${target}${Number.isInteger(msgIndex) && msgIndex >= 0 ? ` --msg-index=${msgIndex}` : ""}` : `moda traces get ${target} --all`;
|
|
3756
|
+
return new CliInputError(view === "snapshot" ? "World-state snapshots (--snapshot, with --msg-index, --block-index and --segment-index) were retired with the world-state v1 event log they were folded from, which Moda no longer writes, so nothing was sent." : "World-state replay (--replay, with --message-count and --format=frames|fold-inputs) was retired with the world-state v1 event log it was folded from, which Moda no longer writes, so nothing was sent.", `Run '${state}' for the trace's current tasks and facts, and '${read}' to read ${view === "snapshot" ? "the messages at that turn" : "its messages in order"}.`, "retired_flag", { field: `--${flag.replace(/_/g, "-")}`, suggestedCommands: [state, read] });
|
|
3739
3757
|
}
|
|
3740
3758
|
var AUDIT_DEFAULT_LIMIT = 200;
|
|
3741
3759
|
var AUDIT_MAX_LIMIT = 1000;
|
|
@@ -5741,48 +5759,26 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
5741
5759
|
}
|
|
5742
5760
|
case "world-state": {
|
|
5743
5761
|
if (!positional) {
|
|
5744
|
-
throw new CliInputError("<conversation_id> is required", "Usage: moda traces state <conversation_id> [--summary-only]
|
|
5762
|
+
throw new CliInputError("<conversation_id> is required", "Usage: moda traces state <conversation_id> [--summary-only]");
|
|
5745
5763
|
}
|
|
5746
5764
|
const args = flagsToArgs(flags, "conversation_id", positional);
|
|
5747
|
-
const
|
|
5748
|
-
if (
|
|
5749
|
-
throw
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
query2.set("segment_index", params.segment_index.toString());
|
|
5758
|
-
const data2 = await callDataAPI(`/conversations/${encodeURIComponent(params.conversation_id)}/world-state/snapshot?${query2.toString()}`);
|
|
5759
|
-
const snapshotRecord = asRecord(data2) ?? {};
|
|
5760
|
-
context.output.writeData(data2, noWorldStateWarnings(params.conversation_id, snapshotRecord.found === false));
|
|
5761
|
-
break;
|
|
5762
|
-
}
|
|
5763
|
-
if (params.replay === true) {
|
|
5764
|
-
const format = params.format ?? "frames";
|
|
5765
|
-
if (format === "frames" && params.message_count === undefined) {
|
|
5766
|
-
throw new CliInputError("--message-count=N is required with --replay in frames mode (the API returns no frames without it). Use --format=fold-inputs for the raw keyframes/events without a count.");
|
|
5767
|
-
}
|
|
5768
|
-
const query2 = new URLSearchParams;
|
|
5769
|
-
query2.set("format", format === "fold-inputs" ? "fold_inputs" : "frames");
|
|
5770
|
-
if (params.message_count !== undefined)
|
|
5771
|
-
query2.set("message_count", params.message_count.toString());
|
|
5772
|
-
const data2 = await callDataAPI(`/conversations/${encodeURIComponent(params.conversation_id)}/world-state/replay?${query2.toString()}`);
|
|
5773
|
-
const replayRecord = asRecord(data2) ?? {};
|
|
5774
|
-
context.output.writeData(data2, noWorldStateWarnings(params.conversation_id, replayRecord.hasData === false));
|
|
5775
|
-
break;
|
|
5765
|
+
const retired = retiredWorldStateFlagError(args, positional);
|
|
5766
|
+
if (retired)
|
|
5767
|
+
throw retired;
|
|
5768
|
+
for (const mode of ["snapshot", "replay"])
|
|
5769
|
+
if (disabledRetiredMode(args, mode))
|
|
5770
|
+
delete args[mode];
|
|
5771
|
+
const warnings = [];
|
|
5772
|
+
if ("event_limit" in args) {
|
|
5773
|
+
delete args.event_limit;
|
|
5774
|
+
warnings.push(RETIRED_EVENT_LIMIT_WARNING);
|
|
5776
5775
|
}
|
|
5777
|
-
const
|
|
5778
|
-
|
|
5779
|
-
query.set("summary_only", "1");
|
|
5780
|
-
if (params.event_limit)
|
|
5781
|
-
query.set("event_limit", params.event_limit.toString());
|
|
5782
|
-
const queryString = query.toString() ? `?${query.toString()}` : "";
|
|
5776
|
+
const params = parseSpecFlags("world-state", args, command);
|
|
5777
|
+
const queryString = params.summary_only === true ? "?summary_only=1" : "";
|
|
5783
5778
|
const data = await callDataAPI(`/conversations/${encodeURIComponent(params.conversation_id)}/world-state${queryString}`);
|
|
5784
|
-
|
|
5785
|
-
|
|
5779
|
+
if (asRecord(data)?.hasData === false)
|
|
5780
|
+
warnings.push(noWorldStateWarning(params.conversation_id));
|
|
5781
|
+
context.output.writeData(data, warnings.length > 0 ? { warnings } : undefined);
|
|
5786
5782
|
break;
|
|
5787
5783
|
}
|
|
5788
5784
|
case "context": {
|
|
@@ -6791,7 +6787,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
6791
6787
|
resetApiRequestCountBeforeRun: true,
|
|
6792
6788
|
telemetry: "result-and-error",
|
|
6793
6789
|
handler: async (context) => {
|
|
6794
|
-
const { runInit } = await import("./index-
|
|
6790
|
+
const { runInit } = await import("./index-ted8jvg4.js");
|
|
6795
6791
|
if (context.outputMode === "agent-stream") {
|
|
6796
6792
|
context.output.writeEvent({
|
|
6797
6793
|
event: "started",
|
|
@@ -7309,7 +7305,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
7309
7305
|
}),
|
|
7310
7306
|
legacyCommand({
|
|
7311
7307
|
name: "world-state",
|
|
7312
|
-
description: "Get a trace's world state (
|
|
7308
|
+
description: "Get a trace's world state (tasks and facts)",
|
|
7313
7309
|
examples: [
|
|
7314
7310
|
"moda traces state <conversation_id>",
|
|
7315
7311
|
"moda traces state <conversation_id> --summary-only"
|
|
@@ -8398,6 +8394,7 @@ export {
|
|
|
8398
8394
|
searchDegradeWarning,
|
|
8399
8395
|
searchCoverageWarnings,
|
|
8400
8396
|
runCommand,
|
|
8397
|
+
retiredWorldStateFlagError,
|
|
8401
8398
|
resolveTailSignal,
|
|
8402
8399
|
printCliError,
|
|
8403
8400
|
parseContextRequest,
|
|
@@ -8422,6 +8419,7 @@ export {
|
|
|
8422
8419
|
buildResumeCommand,
|
|
8423
8420
|
auditCapStatus,
|
|
8424
8421
|
TAIL_LIMITS,
|
|
8422
|
+
RETIRED_EVENT_LIMIT_WARNING,
|
|
8425
8423
|
RAW_BOOLEAN_FLAGS,
|
|
8426
8424
|
FULL_TRANSCRIPT_DEFAULT_MAX_MESSAGES,
|
|
8427
8425
|
CliInputError,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-mtjw2xtp.js";
|
|
7
7
|
import"./cli-bgbtrmtr.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-rmxcfxy5.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
10
|
import"./cli-764m5azg.js";
|
|
11
11
|
import"./cli-rpyepjwb.js";
|
|
12
12
|
import"./cli-3thzh1mq.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-8g0rxjgw.js";
|
|
14
14
|
import"./cli-e0kbye4s.js";
|
|
15
15
|
import"./cli-cp8gv24j.js";
|
|
16
16
|
import"./cli-tca7sztv.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-ndag29z1.js";
|
|
4
4
|
import"./cli-rpyepjwb.js";
|
|
5
5
|
import"./cli-97fnztpy.js";
|
|
6
6
|
import"./cli-krm4w2v9.js";
|
|
7
7
|
import"./cli-3thzh1mq.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-8g0rxjgw.js";
|
|
9
9
|
import"./cli-e0kbye4s.js";
|
|
10
10
|
import"./cli-cp8gv24j.js";
|
|
11
11
|
import {
|
|
@@ -48,14 +48,14 @@ import {
|
|
|
48
48
|
writeHarnessAnalyzeResult,
|
|
49
49
|
writeHarnessArtifacts,
|
|
50
50
|
writeHumanProgress
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-ndag29z1.js";
|
|
52
52
|
import"./cli-rpyepjwb.js";
|
|
53
53
|
import"./cli-97fnztpy.js";
|
|
54
54
|
import {
|
|
55
55
|
HARNESS_ANALYZE_CONCERNS
|
|
56
56
|
} from "./cli-krm4w2v9.js";
|
|
57
57
|
import"./cli-3thzh1mq.js";
|
|
58
|
-
import"./cli-
|
|
58
|
+
import"./cli-8g0rxjgw.js";
|
|
59
59
|
import"./cli-e0kbye4s.js";
|
|
60
60
|
import"./cli-cp8gv24j.js";
|
|
61
61
|
import"./cli-tca7sztv.js";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
enumerateToolCatalog,
|
|
4
4
|
enumerateWorkflows,
|
|
5
5
|
mergeEnumeratedComponents
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-ecp9sdye.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentScopeResolver,
|
|
9
9
|
enumerateAgents
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-ndag29z1.js";
|
|
11
11
|
import"./cli-rpyepjwb.js";
|
|
12
12
|
import"./cli-97fnztpy.js";
|
|
13
13
|
import"./cli-krm4w2v9.js";
|
|
14
14
|
import"./cli-3thzh1mq.js";
|
|
15
|
-
import"./cli-
|
|
15
|
+
import"./cli-8g0rxjgw.js";
|
|
16
16
|
import"./cli-e0kbye4s.js";
|
|
17
17
|
import"./cli-cp8gv24j.js";
|
|
18
18
|
import"./cli-tca7sztv.js";
|
|
@@ -20,12 +20,12 @@ import {
|
|
|
20
20
|
serializeExtractResult,
|
|
21
21
|
toolNamesOf,
|
|
22
22
|
valueChildren
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-ndag29z1.js";
|
|
24
24
|
import"./cli-rpyepjwb.js";
|
|
25
25
|
import"./cli-97fnztpy.js";
|
|
26
26
|
import"./cli-krm4w2v9.js";
|
|
27
27
|
import"./cli-3thzh1mq.js";
|
|
28
|
-
import"./cli-
|
|
28
|
+
import"./cli-8g0rxjgw.js";
|
|
29
29
|
import"./cli-e0kbye4s.js";
|
|
30
30
|
import"./cli-cp8gv24j.js";
|
|
31
31
|
import"./cli-tca7sztv.js";
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
agentsMdProblem,
|
|
6
6
|
runSkillSync
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-jyj7ac5g.js";
|
|
8
8
|
import"./cli-6df723jn.js";
|
|
9
9
|
import {
|
|
10
10
|
buildDoctorReport
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-mtjw2xtp.js";
|
|
12
12
|
import {
|
|
13
13
|
ConnectCodeError,
|
|
14
14
|
connectWithCode,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
initPrompts,
|
|
21
21
|
runPromptSync
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-rmxcfxy5.js";
|
|
23
23
|
import {
|
|
24
24
|
bundledSkillsDir,
|
|
25
25
|
installIntegrationSkill,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
runCodingAgent,
|
|
48
48
|
runHarnessCommand,
|
|
49
49
|
startRemoteAnalyze
|
|
50
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-ndag29z1.js";
|
|
51
51
|
import {
|
|
52
52
|
canonicalText,
|
|
53
53
|
renderInitBanner,
|
|
@@ -63,7 +63,7 @@ import"./cli-krm4w2v9.js";
|
|
|
63
63
|
import {
|
|
64
64
|
createCommandContext
|
|
65
65
|
} from "./cli-3thzh1mq.js";
|
|
66
|
-
import"./cli-
|
|
66
|
+
import"./cli-8g0rxjgw.js";
|
|
67
67
|
import"./cli-e0kbye4s.js";
|
|
68
68
|
import"./cli-cp8gv24j.js";
|
|
69
69
|
import {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inventoryFiles,
|
|
3
3
|
safePromptEvidencePath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-ndag29z1.js";
|
|
5
5
|
import"./cli-rpyepjwb.js";
|
|
6
6
|
import"./cli-97fnztpy.js";
|
|
7
7
|
import"./cli-krm4w2v9.js";
|
|
8
8
|
import"./cli-3thzh1mq.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-8g0rxjgw.js";
|
|
10
10
|
import"./cli-e0kbye4s.js";
|
|
11
11
|
import"./cli-cp8gv24j.js";
|
|
12
12
|
import"./cli-tca7sztv.js";
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
checkPromptMapping,
|
|
4
4
|
discoverHarnessPromptSources,
|
|
5
5
|
safePromptEvidencePath
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-ndag29z1.js";
|
|
7
7
|
import"./cli-rpyepjwb.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
9
|
import"./cli-krm4w2v9.js";
|
|
10
10
|
import"./cli-3thzh1mq.js";
|
|
11
|
-
import"./cli-
|
|
11
|
+
import"./cli-8g0rxjgw.js";
|
|
12
12
|
import"./cli-e0kbye4s.js";
|
|
13
13
|
import"./cli-cp8gv24j.js";
|
|
14
14
|
import"./cli-tca7sztv.js";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
runPromptSync,
|
|
10
10
|
runPromptsCommand,
|
|
11
11
|
writePromptSyncProgress
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-rmxcfxy5.js";
|
|
13
13
|
import {
|
|
14
14
|
promptSourceHashPayload
|
|
15
15
|
} from "./cli-mm48br00.js";
|
|
16
16
|
import"./cli-764m5azg.js";
|
|
17
17
|
import"./cli-3thzh1mq.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-8g0rxjgw.js";
|
|
19
19
|
import"./cli-e0kbye4s.js";
|
|
20
20
|
import"./cli-cp8gv24j.js";
|
|
21
21
|
import"./cli-tca7sztv.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runSkillSync,
|
|
3
3
|
runSkillsCommand
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-jyj7ac5g.js";
|
|
5
5
|
import"./cli-2fv0q9tx.js";
|
|
6
6
|
import"./cli-3thzh1mq.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-8g0rxjgw.js";
|
|
8
8
|
import"./cli-e0kbye4s.js";
|
|
9
9
|
import"./cli-cp8gv24j.js";
|
|
10
10
|
import"./cli-tca7sztv.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runSkillsCommand
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-jyj7ac5g.js";
|
|
4
4
|
import {
|
|
5
5
|
runPromptsCommand
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-rmxcfxy5.js";
|
|
7
7
|
import"./cli-2fv0q9tx.js";
|
|
8
8
|
import"./cli-mm48br00.js";
|
|
9
9
|
import"./cli-764m5azg.js";
|
|
10
10
|
import {
|
|
11
11
|
runHarnessCommand
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-ndag29z1.js";
|
|
13
13
|
import"./cli-rpyepjwb.js";
|
|
14
14
|
import"./cli-97fnztpy.js";
|
|
15
15
|
import"./cli-krm4w2v9.js";
|
|
16
16
|
import"./cli-3thzh1mq.js";
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-8g0rxjgw.js";
|
|
18
18
|
import"./cli-e0kbye4s.js";
|
|
19
19
|
import"./cli-cp8gv24j.js";
|
|
20
20
|
import"./cli-tca7sztv.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moda-ai/cli",
|
|
3
|
-
"version": "1.55.
|
|
3
|
+
"version": "1.55.112",
|
|
4
4
|
"description": "CLI for Moda: production monitoring and evals for AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"export:admin-manifest": "bun scripts/export-admin-command-manifest.ts",
|
|
31
31
|
"build": "bun run bundle:skills && tsc --noEmit && tsc -p tsconfig.prompt-hash.json && bun build ./src/cli.ts ./src/prompt-source-mcp.ts ./src/prompt-hash.ts --target=node --format=esm --outdir=dist --splitting --external @inquirer/prompts --external open --external zod",
|
|
32
32
|
"dev": "tsc --watch",
|
|
33
|
-
"typecheck": "tsc --noEmit",
|
|
33
|
+
"typecheck": "tsc-native --noEmit",
|
|
34
34
|
"test": "bun run bundle:skills && vitest run",
|
|
35
35
|
"test:watch": "vitest",
|
|
36
|
-
"lint": "
|
|
36
|
+
"lint": "oxlint ."
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
@@ -62,14 +62,13 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@moda/database": "*",
|
|
65
|
-
"@moda/
|
|
65
|
+
"@moda/dev-tools": "*",
|
|
66
66
|
"@moda/harness-bundle": "*",
|
|
67
67
|
"@moda/harness-snapshot": "*",
|
|
68
68
|
"@moda/integration-skills": "*",
|
|
69
69
|
"@moda/messaging": "*",
|
|
70
70
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
71
71
|
"@types/node": "^22.10.5",
|
|
72
|
-
"eslint": "^9.17.0",
|
|
73
72
|
"fast-glob": "^3.3.3",
|
|
74
73
|
"typescript": "^5.7.2",
|
|
75
74
|
"vitest": "^4.0.14",
|
package/skills/moda-cli/SKILL.md
CHANGED
|
@@ -77,7 +77,7 @@ Details: `references/output-protocol.md`.
|
|
|
77
77
|
| One user's experience | `moda users`, `moda user <user_id>` | `moda traces search "<words>" --user-id=<id>` |
|
|
78
78
|
| Is this only hurting <segment> (enterprise, new users, ...)? | `moda cohorts list` (the ref of a built-in or saved cohort), then `moda problems list --sort=users --cohort=<ref>` and the same command without `--cohort` | `moda detections list --family=frustration --cohort=<ref>` vs no `--cohort` (totals count traces); `moda cohorts compare <ref> builtin:power_users` for size, health and failure mix |
|
|
79
79
|
| Topic mix | `moda clusters` | `moda cluster-traces <node_id>` |
|
|
80
|
-
| What the agent
|
|
80
|
+
| What the agent knows about a trace (its tasks and facts) | `moda traces state <id>` (the current state only; snapshots and replay are retired) | `moda traces get <id> --msg-index=<n>` for what happened at a turn |
|
|
81
81
|
| 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 |
|
|
82
82
|
| A detection is wrong | `moda review <kind> <target> --reason="..."` | `references/signals-and-false-positives.md` |
|
|
83
83
|
| Moda data looks wrong or missing | `moda feedback "<what and why>" --conversation-id=<id>` | |
|
|
@@ -47,7 +47,7 @@ Loaded on demand from the moda-cli skill. This table can lag the CLI: `moda <com
|
|
|
47
47
|
| `moda detections list --family=custom_signal --conversation-id=<conversation_id>` | Custom signal hits on one trace |
|
|
48
48
|
| `moda review custom-signal <signal_id>` | Write: `--conversation-id`, `--verdict=correct\|false_positive\|clear`, optional `--note`, `--msg-index`/`--msg-dedup-token` |
|
|
49
49
|
| `moda traces findings <conversation_id>...` | Everything flagged on a trace, no time window: per family a `state` (`found`/`none`/`not_run`/`unknown`), count and top rows with `msg_index`, plus its Problems; up to 25 ids or `--ids-from`; `--limit` rows per family |
|
|
50
|
-
| `moda traces state <conversation_id>` | Agent memory:
|
|
50
|
+
| `moda traces state <conversation_id>` | Agent memory now: tasks (every status; a subtask names its parent) and facts, from the task engine or the task tracker, plus the user's durable profile; `--summary-only` (fact counts per segment). There is no state history: `--snapshot` and `--replay` are retired (rejected locally with `retired_flag`, nothing sent) and `--event-limit` is ignored with a warning |
|
|
51
51
|
| `moda failures` | Tool failures only, ranked (no frustrations or Problems) |
|
|
52
52
|
| `moda tail` | Live tail: one JSON line per new trace/detection (`--signal=traces\|emotions\|all`, legacy alias `--signal=conversations`, `--interval=N`, `--once`, `--max-events=N`). **Emotions caveat:** `/emotions` is ranked by score with no time ordering or cursor, so the tail follows the *highest-scoring* detections rather than everything; each poll emits a `tail_coverage` line with `scanned`/`total`/`coverage_pct`/`complete`. Pass `--full-scan` for a complete window scan (many more requests, capped by the API's offset ceiling of 10000). |
|
|
53
53
|
| `moda feedback "<note>"` | Flag wrong/missing data or CLI quirks to the Moda team |
|
|
@@ -199,6 +199,11 @@ Treat an answer as degraded if **any** of these hold:
|
|
|
199
199
|
per-row extras (`--include-window`, `--include-world-state`, batch reads)
|
|
200
200
|
stop reading once the budget is spent; rows they did not enrich carry
|
|
201
201
|
`window_skipped` / `world_state_skipped: "agent_output_budget"`.
|
|
202
|
+
`--include-world-state` attaches each row's world-state summary as
|
|
203
|
+
`world_state`: `hasData`, `segmentSummaries` (fact counts and top facts per
|
|
204
|
+
segment) and `summary` (`segmentCount`, `lastUpdatedAt`), with no event
|
|
205
|
+
count. `hasData: false` means nothing is tracked for that trace yet (or the
|
|
206
|
+
id is unknown); a failed read is `{ "error": ... }`.
|
|
202
207
|
- **`--json` is compact when piped.** `--json` prints one line of JSON when
|
|
203
208
|
stdout is not a terminal (indented on a terminal); `--pretty` indents it
|
|
204
209
|
anyway. `--json` prints the payload as read: `--profile` is stamped only on
|
|
@@ -15,7 +15,7 @@ Loaded on demand from the moda-cli skill.
|
|
|
15
15
|
- An unknown trace, problem, or cluster id exits 1 with
|
|
16
16
|
`errors[0].code: "not_found"`; it is not an empty success.
|
|
17
17
|
- `moda traces state` returns success with a warning when state is missing.
|
|
18
|
-
This can mean an unknown trace or a real trace
|
|
18
|
+
This can mean an unknown trace or a real trace with no tracked tasks yet.
|
|
19
19
|
Use `moda traces get <id> --metadata-only` to check whether the trace exists.
|
|
20
20
|
- If the JSON has `"conversations": []` or `"frustrations": []`, the call
|
|
21
21
|
worked but the time window is empty. Widen the window once
|
|
@@ -49,7 +49,7 @@ the tenant the key acts on.
|
|
|
49
49
|
|
|
50
50
|
**`not_found` (exit 1)**
|
|
51
51
|
The trace, problem, or cluster id does not exist in this tenant (a trace with
|
|
52
|
-
no
|
|
52
|
+
no tracked world state returns a warning, not `not_found`).
|
|
53
53
|
`errors[0].cause` names the listing command: `moda traces search`/`moda traces`,
|
|
54
54
|
`moda problems`, `moda clusters`. A tool name with no failures in the window
|
|
55
55
|
returns an empty result with a warning instead.
|
|
@@ -62,6 +62,15 @@ A flag value didn't match the schema. Check enums (`time_range` must be
|
|
|
62
62
|
warning that gives the `--all` command for a wider slice.
|
|
63
63
|
`moda <command> --help` lists every flag with its range.
|
|
64
64
|
|
|
65
|
+
**`retired_flag` (exit 1)**
|
|
66
|
+
`moda traces state --snapshot` and `--replay` (and their `--msg-index`,
|
|
67
|
+
`--block-index`, `--segment-index`, `--message-count`, `--format=frames|fold-inputs`)
|
|
68
|
+
are retired with the world-state event log they were folded from, so nothing
|
|
69
|
+
was sent. `errors[0].suggested_commands` names what replaces them:
|
|
70
|
+
`moda traces state <id>` for the current tasks and facts, and
|
|
71
|
+
`moda traces get <id>` for the messages (`--msg-index=N` for a snapshot's
|
|
72
|
+
turn, `--all` in place of a replay).
|
|
73
|
+
|
|
65
74
|
**Empty results**
|
|
66
75
|
Widen the window: try `--days-back=30` or `--time-range=30d`. Confirm with
|
|
67
76
|
`moda overview` that data exists in the tenant at all.
|