@moda-ai/cli 1.55.16 → 1.55.18
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-a2xwfeeh.js → agent-cha3kg9d.js} +9 -9
- package/dist/{cli-86q35fpq.js → cli-0e8bfvn7.js} +8 -8
- package/dist/{cli-3gwbg0xp.js → cli-1exddmc0.js} +2 -2
- package/dist/{cli-b3cxcxgn.js → cli-3ezzeqcy.js} +669 -37
- package/dist/{cli-kf3d6y8c.js → cli-5hq827jt.js} +8 -2
- package/dist/{cli-xy6zn80e.js → cli-5q1gyvxn.js} +5 -5
- package/dist/{cli-7fc44hhq.js → cli-a1mv0ypm.js} +5 -5
- package/dist/{cli-zdeywyn9.js → cli-av3dqgj5.js} +4 -4
- package/dist/cli-bb7133m7.js +144 -0
- package/dist/{cli-2ars875d.js → cli-c8p69n55.js} +2 -2
- package/dist/{cli-atx672xv.js → cli-eazeanvt.js} +1 -1
- package/dist/{cli-53mvsfgn.js → cli-kg0kz05e.js} +3 -3
- package/dist/{cli-6ca1sz0a.js → cli-qmjnh4z9.js} +1 -1
- package/dist/cli.js +120 -49
- package/dist/{doctor-e2xrbpmp.js → doctor-kg0yq1wf.js} +9 -9
- package/dist/{fix-v8xka487.js → fix-q8er8egx.js} +7 -7
- package/dist/{harness-github-actions-301nak95.js → harness-github-actions-ver6cprq.js} +6 -6
- package/dist/{harness-28wbzncq.js → harness-v9s0k9s7.js} +6 -6
- package/dist/{index-ccdpy9ma.js → index-7zqa7t5c.js} +11 -11
- package/dist/{production-intelligence-0wqcvvxk.js → production-intelligence-k36jsvqx.js} +13 -13
- package/dist/{profile-commands-f5kysjrv.js → profile-commands-88sdwzbg.js} +3 -3
- package/dist/prompt-source-mcp.js +6 -6
- package/dist/{prompts-jg0stjfb.js → prompts-2r756vtd.js} +7 -7
- package/dist/{provision-25bw5rd7.js → provision-n3r7yway.js} +4 -4
- package/dist/{registry-39xzetsc.js → registry-5v63ga01.js} +4 -4
- package/dist/{skills-gjesa81c.js → skills-fed17et3.js} +6 -6
- package/dist/{sync-7ts9psky.js → sync-r4tncne4.js} +8 -8
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +20 -8
- package/dist/cli-438g4nwh.js +0 -465
package/dist/cli.js
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
MODA_INTELLIGENCE_V1_JSON_SCHEMA,
|
|
6
|
-
asNumber,
|
|
7
|
-
asRecord,
|
|
8
|
-
asString,
|
|
9
|
-
collectBatchTargets,
|
|
10
|
-
contextTarget,
|
|
11
|
-
embeddedWindowSize,
|
|
12
|
-
frustrationsFromEmotions,
|
|
13
|
-
mapWithConcurrency,
|
|
14
|
-
parseBatchTarget,
|
|
15
|
-
trimToolFailureConversations,
|
|
16
|
-
withFrustrationAnchors,
|
|
17
|
-
withToolFailureAnchors
|
|
18
|
-
} from "./cli-438g4nwh.js";
|
|
3
|
+
MODA_INTELLIGENCE_V1_JSON_SCHEMA
|
|
4
|
+
} from "./cli-bb7133m7.js";
|
|
19
5
|
import {
|
|
20
6
|
createCommandContext,
|
|
21
7
|
parseBooleanFlagValue
|
|
22
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-5hq827jt.js";
|
|
23
9
|
import {
|
|
24
10
|
SIGNALS_MANAGEMENT_SUBCOMMANDS,
|
|
25
11
|
assertFlags,
|
|
@@ -29,19 +15,21 @@ import {
|
|
|
29
15
|
runUserCommand,
|
|
30
16
|
runUsersCommand,
|
|
31
17
|
unknownSignalsSubcommandError
|
|
32
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-kg0kz05e.js";
|
|
33
19
|
import {
|
|
34
20
|
ApiError,
|
|
35
21
|
callControlAPI,
|
|
36
22
|
callDataAPI
|
|
37
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-c8p69n55.js";
|
|
38
24
|
import {
|
|
39
25
|
apiKeyHeaders,
|
|
40
26
|
isPlatformApiKey,
|
|
41
27
|
setPlatformTenantOverride
|
|
42
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-eazeanvt.js";
|
|
43
29
|
import {
|
|
44
30
|
AGENT_ERROR_CODES,
|
|
31
|
+
BATCH_CONCURRENCY,
|
|
32
|
+
BATCH_MAX_TARGETS,
|
|
45
33
|
CliAccessError,
|
|
46
34
|
CliAuthError,
|
|
47
35
|
CliCancellationError,
|
|
@@ -59,14 +47,24 @@ import {
|
|
|
59
47
|
agentEnvelopeFits,
|
|
60
48
|
agentMaxOutputBytes,
|
|
61
49
|
apiErrorStatus,
|
|
50
|
+
asNumber,
|
|
51
|
+
asRecord,
|
|
52
|
+
asString,
|
|
53
|
+
collectBatchTargets,
|
|
54
|
+
compactProblemDossier,
|
|
55
|
+
contextTarget,
|
|
62
56
|
createCliOutput,
|
|
63
57
|
embeddedTenantIdFromApiKey,
|
|
58
|
+
embeddedWindowSize,
|
|
64
59
|
errorToAgentError,
|
|
60
|
+
frustrationsFromEmotions,
|
|
65
61
|
getApiRequestCount,
|
|
66
62
|
getModaDir,
|
|
67
63
|
isApiLikeError,
|
|
68
64
|
isNetworkLikeError,
|
|
69
65
|
loadProfileConfig,
|
|
66
|
+
mapWithConcurrency,
|
|
67
|
+
parseBatchTarget,
|
|
70
68
|
resetApiRequestCount,
|
|
71
69
|
resolveApiKey,
|
|
72
70
|
resolveApiTenantId,
|
|
@@ -75,9 +73,13 @@ import {
|
|
|
75
73
|
safeWriteStderr,
|
|
76
74
|
safeWriteStdout,
|
|
77
75
|
setAgentUpdateNotice,
|
|
76
|
+
trimToolFailureConversations,
|
|
78
77
|
validateConfig,
|
|
79
|
-
wasOutputCancelled
|
|
80
|
-
|
|
78
|
+
wasOutputCancelled,
|
|
79
|
+
withFrustrationAnchors,
|
|
80
|
+
withToolFailureAnchors,
|
|
81
|
+
withoutDetectionWindows
|
|
82
|
+
} from "./cli-3ezzeqcy.js";
|
|
81
83
|
import {
|
|
82
84
|
__require
|
|
83
85
|
} from "./cli-0v6na3yp.js";
|
|
@@ -101,6 +103,9 @@ var daysBackFlag = (fallback) => {
|
|
|
101
103
|
const days = z.number({ invalid_type_error: DAYS_BACK_MESSAGE }).int(DAYS_BACK_MESSAGE).min(1, DAYS_BACK_MESSAGE).max(90, DAYS_BACK_MESSAGE);
|
|
102
104
|
return fallback === undefined ? days.optional() : days.default(fallback).optional();
|
|
103
105
|
};
|
|
106
|
+
var ISO_BOUND_MESSAGE = "must be an ISO 8601 date (2026-10-07) or datetime (2026-10-07T14:30:00Z)";
|
|
107
|
+
var ISO_BOUND = /^\d{4}-\d{2}-\d{2}(?:[Tt ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:[Zz]|[+-]\d{2}:?\d{2})?)?$/;
|
|
108
|
+
var isoBoundFlag = () => z.string().trim().regex(ISO_BOUND, ISO_BOUND_MESSAGE).optional();
|
|
104
109
|
var OverviewSchema = z.object({
|
|
105
110
|
days_back: daysBackFlag(7)
|
|
106
111
|
});
|
|
@@ -122,6 +127,8 @@ var ConversationsSchema = z.object({
|
|
|
122
127
|
cluster_id: z.string().optional(),
|
|
123
128
|
user_id: z.string().optional(),
|
|
124
129
|
time_range: z.enum(["all", "1h", "3d", "24h", "7d", "30d", "90d"]).default("all").optional(),
|
|
130
|
+
since: isoBoundFlag(),
|
|
131
|
+
until: isoBoundFlag(),
|
|
125
132
|
environment: z.enum(["all", "development", "staging", "production"]).default("all").optional(),
|
|
126
133
|
world_state: z.string().max(200).optional(),
|
|
127
134
|
outcome: z.enum(["any", "positive", "negative"]).default("any").optional(),
|
|
@@ -216,6 +223,7 @@ var ProblemSchema = z.object({
|
|
|
216
223
|
traces: boolFlag(),
|
|
217
224
|
conversations: boolFlag(),
|
|
218
225
|
feedback: boolFlag(),
|
|
226
|
+
full: boolFlag(),
|
|
219
227
|
limit: z.number().min(1).max(50).optional(),
|
|
220
228
|
cursor: z.string().optional(),
|
|
221
229
|
family: z.enum(PROBLEM_FAMILIES).optional(),
|
|
@@ -321,7 +329,8 @@ var EmotionsSchema = z.object({
|
|
|
321
329
|
offset: z.number().min(0).max(1e4).optional(),
|
|
322
330
|
family: z.enum(EMOTION_FAMILIES).optional(),
|
|
323
331
|
user_id: z.string().min(1).max(256).optional(),
|
|
324
|
-
conversation_id: z.string().min(1).max(256).optional()
|
|
332
|
+
conversation_id: z.string().min(1).max(256).optional(),
|
|
333
|
+
include_window: boolFlag()
|
|
325
334
|
});
|
|
326
335
|
var HallucinationsSchema = z.object({
|
|
327
336
|
days_back: daysBackFlag(7),
|
|
@@ -397,6 +406,8 @@ var SearchSchema = z.object({
|
|
|
397
406
|
user_id: z.string().optional(),
|
|
398
407
|
conversation_id: z.string().min(1).max(256).optional(),
|
|
399
408
|
time_range: z.enum(TIME_RANGES).default("all").optional(),
|
|
409
|
+
since: isoBoundFlag(),
|
|
410
|
+
until: isoBoundFlag(),
|
|
400
411
|
limit: z.number().min(1).max(100).default(20).optional(),
|
|
401
412
|
include_tool_io: boolFlag(),
|
|
402
413
|
offset: z.number().min(0).max(1e4).optional()
|
|
@@ -2201,46 +2212,46 @@ function exitCodesForCommand(command) {
|
|
|
2201
2212
|
import { fileURLToPath } from "url";
|
|
2202
2213
|
import { realpathSync } from "fs";
|
|
2203
2214
|
async function runPromptsCommand(...args) {
|
|
2204
|
-
return (await import("./prompts-
|
|
2215
|
+
return (await import("./prompts-2r756vtd.js")).runPromptsCommand(...args);
|
|
2205
2216
|
}
|
|
2206
2217
|
async function runSkillsCommand(...args) {
|
|
2207
|
-
return (await import("./skills-
|
|
2218
|
+
return (await import("./skills-fed17et3.js")).runSkillsCommand(...args);
|
|
2208
2219
|
}
|
|
2209
2220
|
async function runFixCommand(...args) {
|
|
2210
|
-
return (await import("./fix-
|
|
2221
|
+
return (await import("./fix-q8er8egx.js")).runFixCommand(...args);
|
|
2211
2222
|
}
|
|
2212
2223
|
async function runFixesCommand(...args) {
|
|
2213
|
-
return (await import("./fix-
|
|
2224
|
+
return (await import("./fix-q8er8egx.js")).runFixesCommand(...args);
|
|
2214
2225
|
}
|
|
2215
2226
|
async function runHarnessCommand(...args) {
|
|
2216
|
-
return (await import("./harness-
|
|
2227
|
+
return (await import("./harness-v9s0k9s7.js")).runHarnessCommand(...args);
|
|
2217
2228
|
}
|
|
2218
2229
|
async function runSyncCommand(...args) {
|
|
2219
|
-
return (await import("./sync-
|
|
2230
|
+
return (await import("./sync-r4tncne4.js")).runSyncCommand(...args);
|
|
2220
2231
|
}
|
|
2221
2232
|
async function runRegistryCommand(...args) {
|
|
2222
|
-
return (await import("./registry-
|
|
2233
|
+
return (await import("./registry-5v63ga01.js")).runRegistryCommand(...args);
|
|
2223
2234
|
}
|
|
2224
2235
|
async function runDoctorCommand(...args) {
|
|
2225
|
-
return (await import("./doctor-
|
|
2236
|
+
return (await import("./doctor-kg0yq1wf.js")).runDoctorCommand(...args);
|
|
2226
2237
|
}
|
|
2227
2238
|
async function runStatusCommand(...args) {
|
|
2228
|
-
return (await import("./doctor-
|
|
2239
|
+
return (await import("./doctor-kg0yq1wf.js")).runStatusCommand(...args);
|
|
2229
2240
|
}
|
|
2230
2241
|
async function runAuthCommand(...args) {
|
|
2231
|
-
return (await import("./profile-commands-
|
|
2242
|
+
return (await import("./profile-commands-88sdwzbg.js")).runAuthCommand(...args);
|
|
2232
2243
|
}
|
|
2233
2244
|
async function runConfigCommand(...args) {
|
|
2234
|
-
return (await import("./profile-commands-
|
|
2245
|
+
return (await import("./profile-commands-88sdwzbg.js")).runConfigCommand(...args);
|
|
2235
2246
|
}
|
|
2236
2247
|
async function runProfilesCommand(...args) {
|
|
2237
|
-
return (await import("./profile-commands-
|
|
2248
|
+
return (await import("./profile-commands-88sdwzbg.js")).runProfilesCommand(...args);
|
|
2238
2249
|
}
|
|
2239
2250
|
async function runAgentCommand(...args) {
|
|
2240
|
-
return (await import("./agent-
|
|
2251
|
+
return (await import("./agent-cha3kg9d.js")).runAgentCommand(...args);
|
|
2241
2252
|
}
|
|
2242
2253
|
async function runProductionCommand(...args) {
|
|
2243
|
-
return (await import("./production-intelligence-
|
|
2254
|
+
return (await import("./production-intelligence-k36jsvqx.js")).runProductionCommand(...args);
|
|
2244
2255
|
}
|
|
2245
2256
|
function parseArgs(argv) {
|
|
2246
2257
|
const args = argv.slice(2);
|
|
@@ -2602,12 +2613,14 @@ Traces flags:
|
|
|
2602
2613
|
--include-world-state Attach each result's world-state summary
|
|
2603
2614
|
--user-id=ID Filter to a single user
|
|
2604
2615
|
--environment=ENV Filter by environment (all|development|staging|production)
|
|
2616
|
+
--since=DATE --until=DATE Absolute UTC bounds: ISO date or datetime, inclusive; a date --until covers that whole day
|
|
2605
2617
|
|
|
2606
2618
|
Search flags:
|
|
2607
2619
|
--mode=keyword|semantic|hybrid Search mode (default hybrid)
|
|
2608
2620
|
--user-id=ID Filter to a single user
|
|
2609
2621
|
--conversation-id=ID Search inside one trace only
|
|
2610
2622
|
--time-range=RANGE Time range filter (all|1h|3d|7d|24h|30d|90d)
|
|
2623
|
+
--since=DATE --until=DATE Absolute UTC bounds: ISO date or datetime, inclusive; a date --until covers that whole day
|
|
2611
2624
|
--limit=N Maximum results to return (1-100, default 20)
|
|
2612
2625
|
|
|
2613
2626
|
World-state flags:
|
|
@@ -2623,6 +2636,8 @@ Emotions flags:
|
|
|
2623
2636
|
--family=F frustration|disapproval|sadness|confusion|anxiety|trust|positive
|
|
2624
2637
|
--days-back=N --limit=N Window 1-90 (default 7); page size 1-20 (default 10)
|
|
2625
2638
|
--offset=N Skip N detections (0-10000)
|
|
2639
|
+
--include-window Keep each detection's conversation window in agent output
|
|
2640
|
+
(also frustrations; omitted by default, use context_command)
|
|
2626
2641
|
|
|
2627
2642
|
Laziness flags:
|
|
2628
2643
|
--family=F One laziness family (e.g. omission_phrase, stub_body, deflection, completion, tool_selection)
|
|
@@ -2635,6 +2650,8 @@ Hallucinations flags:
|
|
|
2635
2650
|
--days-back=N --limit=N Window 1-90 (default 7); page size 1-20 (default 10)
|
|
2636
2651
|
|
|
2637
2652
|
Problem flags (moda problem <id>):
|
|
2653
|
+
--full Whole dossier in agent output (default there: header, summary,
|
|
2654
|
+
top 5 evidence anchors, report titles)
|
|
2638
2655
|
--evidence|--reports|--traces|--feedback
|
|
2639
2656
|
Open one sub-resource page (at most one)
|
|
2640
2657
|
--limit=N --cursor=TOKEN Keyset paging (1-50; pass next_cursor back verbatim)
|
|
@@ -2933,6 +2950,19 @@ async function printWithOptionalWindows(enriched, listKey, includeWindow, window
|
|
|
2933
2950
|
data = finalize(data, allWarnings);
|
|
2934
2951
|
output.writeData(data, allWarnings.length > 0 ? { warnings: allWarnings } : undefined);
|
|
2935
2952
|
}
|
|
2953
|
+
function withoutRepeatedFrustrationWindow(data) {
|
|
2954
|
+
if (!Array.isArray(data.frustrations))
|
|
2955
|
+
return data;
|
|
2956
|
+
const frustrations = data.frustrations.map((item) => {
|
|
2957
|
+
const row = asRecord(item);
|
|
2958
|
+
const window = asRecord(row?.window);
|
|
2959
|
+
if (!row || !window || "error" in window)
|
|
2960
|
+
return item;
|
|
2961
|
+
const { conversation: _conversation, ...rest } = row;
|
|
2962
|
+
return rest;
|
|
2963
|
+
});
|
|
2964
|
+
return { ...data, frustrations };
|
|
2965
|
+
}
|
|
2936
2966
|
var NOT_FOUND_HINTS = {
|
|
2937
2967
|
trace: 'Find trace ids with: moda search "<text>" or moda traces --search=<text>',
|
|
2938
2968
|
cluster: "List cluster node ids with: moda clusters",
|
|
@@ -3457,6 +3487,10 @@ async function searchFallbackToTraces(params) {
|
|
|
3457
3487
|
query2.set("user_id", params.user_id);
|
|
3458
3488
|
if (params.time_range)
|
|
3459
3489
|
query2.set("time_range", params.time_range);
|
|
3490
|
+
if (params.since)
|
|
3491
|
+
query2.set("since", params.since);
|
|
3492
|
+
if (params.until)
|
|
3493
|
+
query2.set("until", params.until);
|
|
3460
3494
|
query2.set("limit", String(limit));
|
|
3461
3495
|
if (offset > 0)
|
|
3462
3496
|
query2.set("offset", String(offset));
|
|
@@ -3464,6 +3498,8 @@ async function searchFallbackToTraces(params) {
|
|
|
3464
3498
|
`moda traces --search=${shellArg(params.q)}`,
|
|
3465
3499
|
params.user_id ? `--user-id=${shellArg(params.user_id)}` : "",
|
|
3466
3500
|
params.time_range ? `--time-range=${shellArg(params.time_range)}` : "",
|
|
3501
|
+
params.since ? `--since=${shellArg(params.since)}` : "",
|
|
3502
|
+
params.until ? `--until=${shellArg(params.until)}` : "",
|
|
3467
3503
|
`--limit=${limit}`
|
|
3468
3504
|
].filter(Boolean).join(" ");
|
|
3469
3505
|
let traces;
|
|
@@ -3963,7 +3999,7 @@ async function readAuditItem(command, params, budget) {
|
|
|
3963
3999
|
if (budget && !budget.fits(page.data, page.options)) {
|
|
3964
4000
|
page.options.warnings = [
|
|
3965
4001
|
...page.options.warnings ?? [],
|
|
3966
|
-
"This page is
|
|
4002
|
+
"This page is larger than the agent output budget even at the smallest page the server returns, so some of its spans are cut from this output. Rerun this command with --json (no byte limit) or a higher MODA_AGENT_MAX_OUTPUT_BYTES to see the whole row before following next_cursor."
|
|
3967
4003
|
];
|
|
3968
4004
|
}
|
|
3969
4005
|
return page;
|
|
@@ -4133,7 +4169,7 @@ async function runAuditBatch(command, positionals, flags, context) {
|
|
|
4133
4169
|
const base = parseCommandFlags(AuditSchema, flagsToArgs(rest, "id", targets[0].id), command, { positionalKey: "id" });
|
|
4134
4170
|
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4135
4171
|
const share = agentMode ? auditItemByteShare(targets.length) : undefined;
|
|
4136
|
-
const results = await mapWithConcurrency(targets, BATCH_CONCURRENCY, (target) => readBatchItem(target, () => readAuditItem(command, { ...base, id: target.id }, share !== undefined ? { maxBytes: share, fits: fitsShare(share) } : undefined)));
|
|
4172
|
+
const results = await mapWithConcurrency(targets, BATCH_CONCURRENCY, (target) => readBatchItem(target, () => readAuditItem(command, { ...base, id: target.id }, share !== undefined ? { maxBytes: Math.max(AUDIT_MIN_PAGE_BYTES, share), fits: fitsShare(share) } : undefined)));
|
|
4137
4173
|
return writeBatchResult(command, context, targets, results, [], rest);
|
|
4138
4174
|
}
|
|
4139
4175
|
async function runCommand(command, positional, flags, positionals = positional ? [positional] : [], context = createCommandContext({ command, positional, positionals, flags })) {
|
|
@@ -4214,6 +4250,10 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4214
4250
|
query2.set("user_id", params.user_id);
|
|
4215
4251
|
if (params.time_range)
|
|
4216
4252
|
query2.set("time_range", params.time_range);
|
|
4253
|
+
if (params.since)
|
|
4254
|
+
query2.set("since", params.since);
|
|
4255
|
+
if (params.until)
|
|
4256
|
+
query2.set("until", params.until);
|
|
4217
4257
|
if (params.environment)
|
|
4218
4258
|
query2.set("environment", params.environment);
|
|
4219
4259
|
if (params.world_state)
|
|
@@ -4259,7 +4299,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4259
4299
|
}
|
|
4260
4300
|
case "search": {
|
|
4261
4301
|
if (!positional || positional.trim() === "") {
|
|
4262
|
-
throw new CliInputError("<query> is required", 'Usage: moda search "<query>" [--mode=keyword|semantic|hybrid] [--user-id=ID] [--conversation-id=ID] [--time-range=RANGE] [--include-tool-io] [--limit=N]');
|
|
4302
|
+
throw new CliInputError("<query> is required", 'Usage: moda search "<query>" [--mode=keyword|semantic|hybrid] [--user-id=ID] [--conversation-id=ID] [--time-range=RANGE] [--since=DATE] [--until=DATE] [--include-tool-io] [--limit=N]');
|
|
4263
4303
|
}
|
|
4264
4304
|
const args = withStringIdFlags(flagsToArgs(flags, "q", positional), flags);
|
|
4265
4305
|
const params = parseCommandFlags(SearchSchema, args, command, { positionalKey: "q" });
|
|
@@ -4273,6 +4313,10 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4273
4313
|
query2.set("conversation_id", params.conversation_id);
|
|
4274
4314
|
if (params.time_range)
|
|
4275
4315
|
query2.set("time_range", params.time_range);
|
|
4316
|
+
if (params.since)
|
|
4317
|
+
query2.set("since", params.since);
|
|
4318
|
+
if (params.until)
|
|
4319
|
+
query2.set("until", params.until);
|
|
4276
4320
|
if (params.limit)
|
|
4277
4321
|
query2.set("limit", params.limit.toString());
|
|
4278
4322
|
if (params.include_tool_io)
|
|
@@ -4397,7 +4441,10 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4397
4441
|
query2.set("conversation_id", params.conversation_id);
|
|
4398
4442
|
query2.set("family", "frustration");
|
|
4399
4443
|
const data = frustrationsFromEmotions(await callDataAPI(`/emotions?${query2.toString()}`));
|
|
4400
|
-
|
|
4444
|
+
const includeWindow = params.include_window === true;
|
|
4445
|
+
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4446
|
+
const anchored = withFrustrationAnchors(data);
|
|
4447
|
+
await printWithOptionalWindows(agentMode && !includeWindow ? withoutDetectionWindows(anchored, "frustrations", "conversation") : anchored, "frustrations", includeWindow, params.window ?? 1, context.output, processingDisabledWarning(data, "frustration"), agentMode && includeWindow ? (payload) => withoutRepeatedFrustrationWindow(payload) : undefined);
|
|
4401
4448
|
break;
|
|
4402
4449
|
}
|
|
4403
4450
|
case "tool-failures": {
|
|
@@ -4524,7 +4571,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4524
4571
|
break;
|
|
4525
4572
|
}
|
|
4526
4573
|
if (!positional) {
|
|
4527
|
-
throw new CliInputError("<problem_id> is required", "Usage: moda problem <problem_id> [--evidence|--reports|--traces|--feedback] [--limit=N] [--cursor=TOKEN] [--family=F] [--door=D]");
|
|
4574
|
+
throw new CliInputError("<problem_id> is required", "Usage: moda problem <problem_id> [--full | --evidence|--reports|--traces|--feedback] [--limit=N] [--cursor=TOKEN] [--family=F] [--door=D]");
|
|
4528
4575
|
}
|
|
4529
4576
|
const args = flagsToArgs(flags, "id", positional);
|
|
4530
4577
|
const params = parseCommandFlags(ProblemSchema, args, command, { positionalKey: "id" });
|
|
@@ -4535,10 +4582,25 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4535
4582
|
throw new CliInputError(`Choose at most one of --evidence, --reports, --traces, --feedback (got ${got}).`, "Usage: moda problem <problem_id> [--evidence|--reports|--traces|--feedback]");
|
|
4536
4583
|
}
|
|
4537
4584
|
const view = views[0];
|
|
4585
|
+
if (view !== undefined && params.full === true) {
|
|
4586
|
+
throw new CliInputError("--full applies to the dossier only; the --evidence/--reports/--traces/--feedback pages are always whole.", "Usage: moda problem <problem_id> [--full] | moda problem <problem_id> --evidence|--reports|--traces|--feedback");
|
|
4587
|
+
}
|
|
4538
4588
|
if (view === undefined) {
|
|
4539
4589
|
const data2 = await callDataAPI(`/problems/${encodeURIComponent(params.id)}`);
|
|
4540
4590
|
const record = asRecord(data2) ?? {};
|
|
4541
4591
|
throwIfNotFound("problem", params.id, record.found === false, `No problem found for id "${params.id}" in this tenant; it may have been merged into another problem.`);
|
|
4592
|
+
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4593
|
+
if (agentMode) {
|
|
4594
|
+
const compact = compactProblemDossier(record, params.id);
|
|
4595
|
+
if (params.full === true) {
|
|
4596
|
+
context.output.writeData(data2, {
|
|
4597
|
+
nextCommands: compact.nextCommands.filter((next) => !next.command.endsWith(" --full"))
|
|
4598
|
+
});
|
|
4599
|
+
} else {
|
|
4600
|
+
context.output.writeData(compact.data, { nextCommands: compact.nextCommands });
|
|
4601
|
+
}
|
|
4602
|
+
break;
|
|
4603
|
+
}
|
|
4542
4604
|
context.output.writeData(data2);
|
|
4543
4605
|
break;
|
|
4544
4606
|
}
|
|
@@ -4894,8 +4956,11 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4894
4956
|
if (params.conversation_id)
|
|
4895
4957
|
query2.set("conversation_id", params.conversation_id);
|
|
4896
4958
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
4897
|
-
const
|
|
4898
|
-
const processingWarnings = processingDisabledWarning(
|
|
4959
|
+
const raw = await callDataAPI(`/emotions${queryString}`);
|
|
4960
|
+
const processingWarnings = processingDisabledWarning(raw, "emotion");
|
|
4961
|
+
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4962
|
+
const record = asRecord(raw);
|
|
4963
|
+
const data = agentMode && params.include_window !== true && record ? withoutDetectionWindows(record, "detections", "conversation_context") : raw;
|
|
4899
4964
|
context.output.writeData(data, processingWarnings.length > 0 ? { warnings: processingWarnings } : undefined);
|
|
4900
4965
|
break;
|
|
4901
4966
|
}
|
|
@@ -5095,7 +5160,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
5095
5160
|
resetApiRequestCountBeforeRun: true,
|
|
5096
5161
|
telemetry: "result-and-error",
|
|
5097
5162
|
handler: async (context) => {
|
|
5098
|
-
const { runInit } = await import("./index-
|
|
5163
|
+
const { runInit } = await import("./index-7zqa7t5c.js");
|
|
5099
5164
|
if (context.outputMode === "agent-stream") {
|
|
5100
5165
|
context.output.writeEvent({
|
|
5101
5166
|
event: "started",
|
|
@@ -5136,7 +5201,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
5136
5201
|
resetApiRequestCountBeforeRun: true,
|
|
5137
5202
|
telemetry: "result-and-error",
|
|
5138
5203
|
handler: async (context) => {
|
|
5139
|
-
const { runProvision } = await import("./provision-
|
|
5204
|
+
const { runProvision } = await import("./provision-n3r7yway.js");
|
|
5140
5205
|
return runProvision(context, {
|
|
5141
5206
|
resumeCommand: buildResumeCommand("provision", context.rawFlags)
|
|
5142
5207
|
});
|
|
@@ -5579,7 +5644,8 @@ var commandRegistry = createCommandRegistry([
|
|
|
5579
5644
|
description: "Search trace messages (keyword, semantic, or hybrid)",
|
|
5580
5645
|
examples: [
|
|
5581
5646
|
'moda search "billing error"',
|
|
5582
|
-
'moda search "refund flow" --mode=semantic --time-range=7d --limit=10'
|
|
5647
|
+
'moda search "refund flow" --mode=semantic --time-range=7d --limit=10',
|
|
5648
|
+
'moda search "area code" --since=2026-10-07 --until=2026-10-07'
|
|
5583
5649
|
],
|
|
5584
5650
|
...dataApiDefaults
|
|
5585
5651
|
}),
|
|
@@ -5624,7 +5690,10 @@ var commandRegistry = createCommandRegistry([
|
|
|
5624
5690
|
legacyCommand({
|
|
5625
5691
|
name: "frustrations",
|
|
5626
5692
|
description: "User frustration detections: the frustration family of `emotions` (same data as the dashboard), legacy field names",
|
|
5627
|
-
examples: [
|
|
5693
|
+
examples: [
|
|
5694
|
+
"moda frustrations --days-back=14",
|
|
5695
|
+
"moda frustrations --days-back=14 --include-window # agent output omits conversation windows unless asked"
|
|
5696
|
+
],
|
|
5628
5697
|
...dataApiDefaults
|
|
5629
5698
|
}),
|
|
5630
5699
|
legacyCommand({
|
|
@@ -5671,6 +5740,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
5671
5740
|
description: "Open one Problem: dossier, or --evidence/--reports/--traces/--feedback pages (--conversations is a legacy alias of --traces)",
|
|
5672
5741
|
examples: [
|
|
5673
5742
|
"moda problem <problem_id>",
|
|
5743
|
+
"moda problem <problem_id> --full # whole dossier (agent output defaults to a compact one)",
|
|
5674
5744
|
"moda problem <problem_id> --evidence --limit=10",
|
|
5675
5745
|
"moda problem <problem_id> --reports",
|
|
5676
5746
|
"moda problem <problem_id> --traces --family=tool_failure",
|
|
@@ -5797,7 +5867,8 @@ var commandRegistry = createCommandRegistry([
|
|
|
5797
5867
|
description: "Multi-family emotion detections (frustration, disapproval, sadness, confusion, anxiety, trust, positive)",
|
|
5798
5868
|
examples: [
|
|
5799
5869
|
"moda emotions --days-back=7",
|
|
5800
|
-
"moda emotions --family=confusion --limit=20"
|
|
5870
|
+
"moda emotions --family=confusion --limit=20",
|
|
5871
|
+
"moda emotions --include-window # keep conversation windows in agent output"
|
|
5801
5872
|
],
|
|
5802
5873
|
...dataApiDefaults
|
|
5803
5874
|
}),
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
} from "./cli-5q1gyvxn.js";
|
|
7
|
+
import"./cli-qmjnh4z9.js";
|
|
8
|
+
import"./cli-0e8bfvn7.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-a1mv0ypm.js";
|
|
11
11
|
import"./cli-97fnztpy.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
12
|
+
import"./cli-5hq827jt.js";
|
|
13
|
+
import"./cli-kg0kz05e.js";
|
|
14
|
+
import"./cli-c8p69n55.js";
|
|
15
|
+
import"./cli-eazeanvt.js";
|
|
16
|
+
import"./cli-3ezzeqcy.js";
|
|
17
17
|
import"./cli-0v6na3yp.js";
|
|
18
18
|
export {
|
|
19
19
|
runStatusCommand,
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
DEFAULT_POLL_INTERVAL_MS,
|
|
3
3
|
DEFAULT_WAIT_TIMEOUT_MS,
|
|
4
4
|
fetchLatestRun
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-0e8bfvn7.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-a1mv0ypm.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-5hq827jt.js";
|
|
10
10
|
import {
|
|
11
11
|
assertFlags
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-kg0kz05e.js";
|
|
13
13
|
import {
|
|
14
14
|
callControlAPI
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
} from "./cli-c8p69n55.js";
|
|
16
|
+
import"./cli-eazeanvt.js";
|
|
17
17
|
import {
|
|
18
18
|
CliInputError,
|
|
19
19
|
EXIT_DEGRADED,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
getModaPaths,
|
|
23
23
|
resolveApiTenantId,
|
|
24
24
|
validateConfig
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-3ezzeqcy.js";
|
|
26
26
|
import"./cli-0v6na3yp.js";
|
|
27
27
|
|
|
28
28
|
// src/fix.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-a1mv0ypm.js";
|
|
4
4
|
import"./cli-97fnztpy.js";
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
5
|
+
import"./cli-5hq827jt.js";
|
|
6
|
+
import"./cli-kg0kz05e.js";
|
|
7
|
+
import"./cli-c8p69n55.js";
|
|
8
|
+
import"./cli-eazeanvt.js";
|
|
9
9
|
import {
|
|
10
10
|
recordApiRequest
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-3ezzeqcy.js";
|
|
12
12
|
import"./cli-0v6na3yp.js";
|
|
13
13
|
|
|
14
14
|
// src/harness-github-actions.ts
|
|
@@ -42,13 +42,13 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-a1mv0ypm.js";
|
|
46
46
|
import"./cli-97fnztpy.js";
|
|
47
|
-
import"./cli-
|
|
48
|
-
import"./cli-
|
|
49
|
-
import"./cli-
|
|
50
|
-
import"./cli-
|
|
51
|
-
import"./cli-
|
|
47
|
+
import"./cli-5hq827jt.js";
|
|
48
|
+
import"./cli-kg0kz05e.js";
|
|
49
|
+
import"./cli-c8p69n55.js";
|
|
50
|
+
import"./cli-eazeanvt.js";
|
|
51
|
+
import"./cli-3ezzeqcy.js";
|
|
52
52
|
import"./cli-0v6na3yp.js";
|
|
53
53
|
export {
|
|
54
54
|
writeHumanProgress,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-1exddmc0.js";
|
|
4
4
|
import {
|
|
5
5
|
buildDoctorReport
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-5q1gyvxn.js";
|
|
7
7
|
import {
|
|
8
8
|
ConnectCodeError,
|
|
9
9
|
connectWithCode,
|
|
10
10
|
loadAuthSession,
|
|
11
11
|
loadToken,
|
|
12
12
|
login
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-qmjnh4z9.js";
|
|
14
14
|
import {
|
|
15
15
|
initPrompts,
|
|
16
16
|
runPromptSync
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-0e8bfvn7.js";
|
|
18
18
|
import"./cli-mm48br00.js";
|
|
19
19
|
import {
|
|
20
20
|
canonicalText,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
runCodingAgent,
|
|
35
35
|
runHarnessCommand,
|
|
36
36
|
startRemoteAnalyze
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-a1mv0ypm.js";
|
|
38
38
|
import {
|
|
39
39
|
stripAnsi
|
|
40
40
|
} from "./cli-97fnztpy.js";
|
|
@@ -45,13 +45,13 @@ import {
|
|
|
45
45
|
} from "./cli-c5c6f0yw.js";
|
|
46
46
|
import {
|
|
47
47
|
runSkillSync
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-av3dqgj5.js";
|
|
49
49
|
import {
|
|
50
50
|
createCommandContext
|
|
51
|
-
} from "./cli-
|
|
52
|
-
import"./cli-
|
|
53
|
-
import"./cli-
|
|
54
|
-
import"./cli-
|
|
51
|
+
} from "./cli-5hq827jt.js";
|
|
52
|
+
import"./cli-kg0kz05e.js";
|
|
53
|
+
import"./cli-c8p69n55.js";
|
|
54
|
+
import"./cli-eazeanvt.js";
|
|
55
55
|
import {
|
|
56
56
|
CliAuthError,
|
|
57
57
|
CliInputError,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
recordApiRequest,
|
|
60
60
|
resolveIngestUrl,
|
|
61
61
|
resolveModaBaseUrl
|
|
62
|
-
} from "./cli-
|
|
62
|
+
} from "./cli-3ezzeqcy.js";
|
|
63
63
|
import {
|
|
64
64
|
detectAgents,
|
|
65
65
|
installRules
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
INTELLIGENCE_SCHEMA_VERSION
|
|
3
|
-
|
|
4
|
-
asRecord,
|
|
5
|
-
asString,
|
|
6
|
-
contextTarget,
|
|
7
|
-
frustrationAnchorIndex,
|
|
8
|
-
frustrationsFromEmotions,
|
|
9
|
-
shellWord
|
|
10
|
-
} from "./cli-438g4nwh.js";
|
|
2
|
+
INTELLIGENCE_SCHEMA_VERSION
|
|
3
|
+
} from "./cli-bb7133m7.js";
|
|
11
4
|
import {
|
|
12
5
|
renderMarkdownForTerminal,
|
|
13
6
|
shouldColorTerminalOutput,
|
|
@@ -17,20 +10,27 @@ import {
|
|
|
17
10
|
import {
|
|
18
11
|
callControlAPI,
|
|
19
12
|
callDataAPI
|
|
20
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-c8p69n55.js";
|
|
21
14
|
import {
|
|
22
15
|
apiKeyHeaders
|
|
23
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-eazeanvt.js";
|
|
24
17
|
import {
|
|
25
18
|
CliAuthError,
|
|
26
19
|
CliInputError,
|
|
27
20
|
EXIT_DEGRADED,
|
|
28
21
|
EXIT_OK,
|
|
22
|
+
asNumber,
|
|
23
|
+
asRecord,
|
|
24
|
+
asString,
|
|
25
|
+
contextTarget,
|
|
26
|
+
frustrationAnchorIndex,
|
|
27
|
+
frustrationsFromEmotions,
|
|
29
28
|
recordApiRequest,
|
|
30
29
|
resolveApiKey,
|
|
31
30
|
resolveModaBaseUrl,
|
|
32
|
-
safeWriteStderr
|
|
33
|
-
|
|
31
|
+
safeWriteStderr,
|
|
32
|
+
shellWord
|
|
33
|
+
} from "./cli-3ezzeqcy.js";
|
|
34
34
|
import"./cli-0v6na3yp.js";
|
|
35
35
|
|
|
36
36
|
// src/production-intelligence.ts
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
loadAuthSession,
|
|
6
6
|
login,
|
|
7
7
|
revokeCliSessionToken
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-qmjnh4z9.js";
|
|
9
9
|
import {
|
|
10
10
|
apiKeyHeaders
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-eazeanvt.js";
|
|
12
12
|
import {
|
|
13
13
|
CliInputError,
|
|
14
14
|
DEFAULT_INGEST_URL,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
secretFilePathFromRef,
|
|
35
35
|
setActiveProfile,
|
|
36
36
|
upsertProfile
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-3ezzeqcy.js";
|
|
38
38
|
import"./cli-0v6na3yp.js";
|
|
39
39
|
|
|
40
40
|
// src/api-key-auth.ts
|