@moda-ai/cli 1.55.25 → 1.55.27
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-t7dxmpdq.js → agent-vp9prdma.js} +8 -8
- package/dist/{cli-qycsmxev.js → cli-0pkc8jhg.js} +3 -3
- package/dist/{cli-mebf5vtr.js → cli-4h0ave0f.js} +5 -5
- package/dist/{cli-m0045npe.js → cli-6et4z504.js} +10 -8
- package/dist/{cli-9hc5bg2r.js → cli-ccjfwzqx.js} +1 -1
- package/dist/{cli-0wr3483h.js → cli-hmjdgxrn.js} +1 -1
- package/dist/{cli-9btx12wp.js → cli-pg5qfmqc.js} +1 -1
- package/dist/{cli-m805msp6.js → cli-q9nsvqqg.js} +14 -14
- package/dist/{cli-7xc585hc.js → cli-qwgct6x7.js} +7 -6
- package/dist/{cli-dve50x7p.js → cli-r5pp7qny.js} +140 -455
- package/dist/{cli-qvg26twp.js → cli-v8q7sd7g.js} +38 -13
- package/dist/cli-vdkwkkp5.js +567 -0
- package/dist/{cli-dn91fb56.js → cli-wzds257x.js} +92 -49
- package/dist/cli.js +986 -362
- package/dist/{doctor-q21mr5ya.js → doctor-wmre3mr7.js} +8 -8
- package/dist/{fix-0qdtdz5h.js → fix-75s9s0d6.js} +45 -47
- package/dist/{harness-vzy7n7ea.js → harness-a7tb9a23.js} +5 -5
- package/dist/{harness-github-actions-atc5bbkj.js → harness-github-actions-6v4wydb8.js} +5 -5
- package/dist/{index-4b1ybz51.js → index-91bpc8g8.js} +15 -14
- package/dist/{production-intelligence-c8e0xw3n.js → production-intelligence-7nqddd4f.js} +88 -28
- package/dist/{profile-commands-6e2dgv72.js → profile-commands-49yn02yg.js} +5 -4
- package/dist/prompt-source-mcp.js +5 -5
- package/dist/{prompts-3h5jcjrw.js → prompts-17wyrst6.js} +6 -6
- package/dist/{provision-q86phh4a.js → provision-bc3h68e1.js} +5 -5
- package/dist/{registry-s2vdsfw8.js → registry-fpzhjznj.js} +3 -3
- package/dist/{skills-vq3njc8a.js → skills-ccdbqghj.js} +5 -5
- package/dist/{sync-hq9dpqpr.js → sync-hkxce5zh.js} +7 -7
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +4 -1
- package/skills/moda-cli/references/dashboard-parity.md +1 -1
- package/skills/moda-cli/references/output-protocol.md +35 -10
- package/skills/moda-cli/references/search-and-traces.md +20 -2
- package/dist/cli-bb7133m7.js +0 -144
|
@@ -2,16 +2,18 @@ import {
|
|
|
2
2
|
ApiError,
|
|
3
3
|
callControlAPI,
|
|
4
4
|
callDataAPI
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-pg5qfmqc.js";
|
|
6
6
|
import {
|
|
7
7
|
CliAccessError,
|
|
8
8
|
CliInputError,
|
|
9
|
+
continuationCommand,
|
|
9
10
|
embeddedTenantIdFromApiKey,
|
|
10
11
|
isPlatformApiKey,
|
|
11
12
|
resolveApiKey,
|
|
12
13
|
resolveApiTenantId,
|
|
13
|
-
setPlatformTenantOverride
|
|
14
|
-
|
|
14
|
+
setPlatformTenantOverride,
|
|
15
|
+
shellArg
|
|
16
|
+
} from "./cli-r5pp7qny.js";
|
|
15
17
|
|
|
16
18
|
// src/schemas.ts
|
|
17
19
|
import { z } from "zod";
|
|
@@ -41,12 +43,12 @@ var ClustersSchema = z.object({
|
|
|
41
43
|
search: z.string().min(2).max(200).optional().describe("Find clusters by name or meaning"),
|
|
42
44
|
node_id: z.string().min(1).max(512).optional().describe("Resolve one cluster node by id (deep link)"),
|
|
43
45
|
mode: z.enum(["fuzzy", "semantic", "hybrid"]).optional().describe("Cluster search mode (server default hybrid)"),
|
|
44
|
-
limit: z.number().min(1).max(50).optional().describe("Maximum clusters to return (with --search/--node-id)")
|
|
46
|
+
limit: z.number().int().min(1).max(50).optional().describe("Maximum clusters to return (with --search/--node-id)")
|
|
45
47
|
});
|
|
46
48
|
var ClusterConversationsSchema = z.object({
|
|
47
49
|
node_id: z.string().describe("Cluster node id (from moda clusters)"),
|
|
48
|
-
limit: z.number().min(1).max(100).default(10).optional().describe("Maximum traces to return"),
|
|
49
|
-
offset: z.number().min(0).default(0).optional().describe("Number of traces to skip")
|
|
50
|
+
limit: z.number().int().min(1).max(100).default(10).optional().describe("Maximum traces to return"),
|
|
51
|
+
offset: z.number().int().min(0).default(0).optional().describe("Number of traces to skip")
|
|
50
52
|
});
|
|
51
53
|
var ConversationsSchema = z.object({
|
|
52
54
|
search: z.string().optional().describe("Ranked trace search (hybrid when embeddings exist, else keyword)"),
|
|
@@ -60,20 +62,20 @@ var ConversationsSchema = z.object({
|
|
|
60
62
|
outcome: z.enum(["any", "positive", "negative"]).default("any").optional().describe("Filter by trace outcome (trajectory + frustration)"),
|
|
61
63
|
include_world_state: boolFlag().describe("Attach each result's world-state summary"),
|
|
62
64
|
sort: z.enum(["recent", "longest", "slowest"]).optional().describe("recent = newest activity, longest = most messages, slowest = longest span"),
|
|
63
|
-
limit: z.number().min(1).max(100).default(20).optional().describe("Maximum traces to return"),
|
|
64
|
-
offset: z.number().min(0).default(0).optional().describe("Number of traces to skip")
|
|
65
|
+
limit: z.number().int().min(1).max(100).default(20).optional().describe("Maximum traces to return"),
|
|
66
|
+
offset: z.number().int().min(0).default(0).optional().describe("Number of traces to skip")
|
|
65
67
|
});
|
|
66
68
|
var WorldStateSchema = z.object({
|
|
67
69
|
conversation_id: z.string().describe("Trace ID"),
|
|
68
70
|
summary_only: boolFlag().describe("Segment summaries only (omit the event stream)"),
|
|
69
|
-
event_limit: z.number().min(1).max(5000).default(2000).optional().describe("Maximum world-state events to return"),
|
|
71
|
+
event_limit: z.number().int().min(1).max(5000).default(2000).optional().describe("Maximum world-state events to return"),
|
|
70
72
|
snapshot: boolFlag().describe("Folded slots at one tick (what the agent believed at that turn)"),
|
|
71
|
-
msg_index: z.number().min(0).max(1e5).optional().describe("Snapshot tick: message index (default 0)"),
|
|
72
|
-
block_index: z.number().min(0).max(1e5).optional().describe("Snapshot tick: content block index (default 0)"),
|
|
73
|
-
segment_index: z.number().min(0).max(65535).optional().describe("Scope the snapshot to one segment"),
|
|
73
|
+
msg_index: z.number().int().min(0).max(1e5).optional().describe("Snapshot tick: message index (default 0)"),
|
|
74
|
+
block_index: z.number().int().min(0).max(1e5).optional().describe("Snapshot tick: content block index (default 0)"),
|
|
75
|
+
segment_index: z.number().int().min(0).max(65535).optional().describe("Scope the snapshot to one segment"),
|
|
74
76
|
replay: boolFlag().describe("State-over-time replay (frames mode needs --message-count)"),
|
|
75
77
|
format: z.enum(["frames", "fold-inputs"]).optional().describe("Replay format (default frames)"),
|
|
76
|
-
message_count: z.number().min(1).max(1e6).optional().describe("Messages to fold in frames mode")
|
|
78
|
+
message_count: z.number().int().min(1).max(1e6).optional().describe("Messages to fold in frames mode")
|
|
77
79
|
});
|
|
78
80
|
var ContextSchema = z.object({
|
|
79
81
|
conversation_id: z.string().min(1).describe("Trace ID"),
|
|
@@ -87,10 +89,10 @@ var ContextSchema = z.object({
|
|
|
87
89
|
});
|
|
88
90
|
var FrustrationsSchema = z.object({
|
|
89
91
|
days_back: daysBackFlag(7),
|
|
90
|
-
limit: z.number().min(1).max(20).default(10).optional().describe("Maximum detections to return"),
|
|
91
|
-
offset: z.number().min(0).default(0).optional().describe("Number of detections to skip"),
|
|
92
|
+
limit: z.number().int().min(1).max(20).default(10).optional().describe("Maximum detections to return"),
|
|
93
|
+
offset: z.number().int().min(0).default(0).optional().describe("Number of detections to skip"),
|
|
92
94
|
include_window: boolFlag().describe("Attach the surrounding messages to each detection (agent output omits them by default)"),
|
|
93
|
-
window: z.number().min(1).max(5).default(1).optional().describe("Messages on each side with --include-window"),
|
|
95
|
+
window: z.number().int().min(1).max(5).default(1).optional().describe("Messages on each side with --include-window"),
|
|
94
96
|
user_id: z.string().min(1).max(256).optional().describe("Scope everything to one end user"),
|
|
95
97
|
conversation_id: z.string().min(1).max(256).optional().describe("Scope everything to one trace ID")
|
|
96
98
|
});
|
|
@@ -99,7 +101,7 @@ var ToolFailuresSchema = z.object({
|
|
|
99
101
|
});
|
|
100
102
|
var ProblemsSchema = z.object({
|
|
101
103
|
days_back: daysBackFlag(30),
|
|
102
|
-
limit: z.number().min(1).max(25).default(25).optional().describe("Maximum Problems to return")
|
|
104
|
+
limit: z.number().int().min(1).max(25).default(25).optional().describe("Maximum Problems to return")
|
|
103
105
|
});
|
|
104
106
|
var REMAINDER_FAMILIES = [
|
|
105
107
|
"tool_failure",
|
|
@@ -112,7 +114,7 @@ var REMAINDER_FAMILIES = [
|
|
|
112
114
|
];
|
|
113
115
|
var ProblemsRemainderSchema = z.object({
|
|
114
116
|
days_back: daysBackFlag(30),
|
|
115
|
-
limit: z.number().min(1).max(25).default(25).optional().describe("Maximum groups to return"),
|
|
117
|
+
limit: z.number().int().min(1).max(25).default(25).optional().describe("Maximum groups to return"),
|
|
116
118
|
family: z.enum(REMAINDER_FAMILIES).optional().describe("Only this signal family (frustration is under emotion)"),
|
|
117
119
|
cursor: z.string().min(1).max(4096).optional().describe("next_cursor from the previous page, verbatim")
|
|
118
120
|
});
|
|
@@ -150,7 +152,7 @@ var ProblemSchema = z.object({
|
|
|
150
152
|
conversations: boolFlag().describe("Legacy alias of --traces"),
|
|
151
153
|
feedback: boolFlag().describe("Feedback history page"),
|
|
152
154
|
full: boolFlag().describe("Complete dossier in agent output (default is a compact dossier)"),
|
|
153
|
-
limit: z.number().min(1).max(50).optional().describe("Page size for a sub-resource page"),
|
|
155
|
+
limit: z.number().int().min(1).max(50).optional().describe("Page size for a sub-resource page"),
|
|
154
156
|
cursor: z.string().optional().describe("next_cursor from the previous page, verbatim"),
|
|
155
157
|
family: z.enum(PROBLEM_FAMILIES).optional().describe("With --traces: only this signal family"),
|
|
156
158
|
door: z.enum(PROBLEM_DOORS).optional().describe("With --traces: only this attribution door")
|
|
@@ -180,8 +182,8 @@ var SignalSchema = z.object({
|
|
|
180
182
|
id: z.string().min(1).max(255).describe("Custom signal id"),
|
|
181
183
|
detections: boolFlag().describe("List recent hits instead of the summary"),
|
|
182
184
|
days_back: daysBackFlag(),
|
|
183
|
-
limit: z.number().min(1).max(20).optional().describe("Hits page size (server default 10)"),
|
|
184
|
-
offset: z.number().min(0).max(1e4).optional().describe("Number of hits to skip")
|
|
185
|
+
limit: z.number().int().min(1).max(20).optional().describe("Hits page size (server default 10)"),
|
|
186
|
+
offset: z.number().int().min(0).max(1e4).optional().describe("Number of hits to skip")
|
|
185
187
|
});
|
|
186
188
|
var SIGNAL_LABELS = ["fits", "does_not_fit"];
|
|
187
189
|
var SignalLabelSchema = z.object({
|
|
@@ -251,8 +253,8 @@ var EMOTION_FAMILIES = [
|
|
|
251
253
|
];
|
|
252
254
|
var EmotionsSchema = z.object({
|
|
253
255
|
days_back: daysBackFlag(7),
|
|
254
|
-
limit: z.number().min(1).max(20).default(10).optional().describe("Maximum detections to return"),
|
|
255
|
-
offset: z.number().min(0).max(1e4).optional().describe("Number of detections to skip"),
|
|
256
|
+
limit: z.number().int().min(1).max(20).default(10).optional().describe("Maximum detections to return"),
|
|
257
|
+
offset: z.number().int().min(0).max(1e4).optional().describe("Number of detections to skip"),
|
|
256
258
|
family: z.enum(EMOTION_FAMILIES).optional().describe("Only this family in the detections list (summary covers all)"),
|
|
257
259
|
user_id: z.string().min(1).max(256).optional().describe("Scope everything to one end user"),
|
|
258
260
|
conversation_id: z.string().min(1).max(256).optional().describe("Scope everything to one trace ID"),
|
|
@@ -260,8 +262,8 @@ var EmotionsSchema = z.object({
|
|
|
260
262
|
});
|
|
261
263
|
var HallucinationsSchema = z.object({
|
|
262
264
|
days_back: daysBackFlag(7),
|
|
263
|
-
limit: z.number().min(1).max(20).default(10).optional().describe("Maximum detections to return"),
|
|
264
|
-
offset: z.number().min(0).max(1e4).optional().describe("Number of detections to skip"),
|
|
265
|
+
limit: z.number().int().min(1).max(20).default(10).optional().describe("Maximum detections to return"),
|
|
266
|
+
offset: z.number().int().min(0).max(1e4).optional().describe("Number of detections to skip"),
|
|
265
267
|
conversation_id: z.string().max(200).optional().describe("Scope summary and list to one trace ID"),
|
|
266
268
|
kind: z.enum(["contradicted", "verified"]).optional().describe("Only this kind in the detections list")
|
|
267
269
|
});
|
|
@@ -288,8 +290,8 @@ var LAZINESS_FAMILIES = [
|
|
|
288
290
|
];
|
|
289
291
|
var LazinessSchema = z.object({
|
|
290
292
|
days_back: daysBackFlag(7),
|
|
291
|
-
limit: z.number().min(1).max(50).default(10).optional().describe("Maximum detections to return"),
|
|
292
|
-
offset: z.number().min(0).max(1e4).optional().describe("Number of detections to skip"),
|
|
293
|
+
limit: z.number().int().min(1).max(50).default(10).optional().describe("Maximum detections to return"),
|
|
294
|
+
offset: z.number().int().min(0).max(1e4).optional().describe("Number of detections to skip"),
|
|
293
295
|
conversation_id: z.string().max(200).optional().describe("One trace's detections"),
|
|
294
296
|
family: z.enum(LAZINESS_FAMILIES).optional().describe("Only this laziness family")
|
|
295
297
|
});
|
|
@@ -298,30 +300,32 @@ var StepScoresSchema = z.object({
|
|
|
298
300
|
});
|
|
299
301
|
var TAIL_SIGNALS = ["traces", "conversations", "emotions", "all"];
|
|
300
302
|
var TailSchema = z.object({
|
|
301
|
-
interval: z.number().min(5).max(3600).default(15).optional().describe("Seconds between polls"),
|
|
303
|
+
interval: z.number().int().min(5).max(3600).default(15).optional().describe("Seconds between polls"),
|
|
302
304
|
signal: z.enum(TAIL_SIGNALS).default("traces").optional().describe("What to tail (conversations = legacy alias of traces)"),
|
|
303
305
|
once: boolFlag().describe("Poll once, then exit (baseline page)"),
|
|
304
|
-
limit: z.number().min(1).max(50).default(20).optional().describe("Page size per poll"),
|
|
305
|
-
max_events: z.number().min(1).max(1e5).optional().describe("Stop after this many stdout records"),
|
|
306
|
+
limit: z.number().int().min(1).max(50).default(20).optional().describe("Page size per poll"),
|
|
307
|
+
max_events: z.number().int().min(1).max(1e5).optional().describe("Stop after this many stdout records"),
|
|
306
308
|
full_scan: boolFlag().describe("Emotions: scan the whole window, not the top-scoring prefix (many more requests)")
|
|
307
309
|
});
|
|
308
310
|
var ToolFailureDetailSchema = z.object({
|
|
309
311
|
tool_name: z.string().describe("Tool name (from moda detections tools)"),
|
|
310
312
|
subtype: z.string().optional().describe("Only this failure subtype"),
|
|
311
313
|
days_back: daysBackFlag(7),
|
|
312
|
-
limit: z.number().min(1).max(20).default(5).optional().describe("Maximum examples to return"),
|
|
313
|
-
offset: z.number().min(0).default(0).optional().describe("Number of examples to skip"),
|
|
314
|
+
limit: z.number().int().min(1).max(20).default(5).optional().describe("Maximum examples to return"),
|
|
315
|
+
offset: z.number().int().min(0).default(0).optional().describe("Number of examples to skip"),
|
|
314
316
|
include_window: boolFlag().describe("Embed each example's surrounding messages (on by default)"),
|
|
315
317
|
compact: boolFlag().describe("Drop each example's embedded messages (same as --include-window=false)"),
|
|
316
|
-
window: z.number().min(1).max(5).default(1).optional().describe("Messages on each side of the anchor")
|
|
318
|
+
window: z.number().int().min(1).max(5).default(1).optional().describe("Messages on each side of the anchor")
|
|
317
319
|
});
|
|
318
320
|
var AuditSchema = z.object({
|
|
319
321
|
id: z.string().min(1).describe("Trace ID or OTLP trace_id"),
|
|
320
322
|
kind: z.enum(["auto", "trace", "conversation"]).default("auto").optional().describe("How to read the id (auto tries trace, then conversation)"),
|
|
321
323
|
include_raw: boolFlag().describe("Include raw span rows"),
|
|
322
324
|
include_bodies: boolFlag().describe("Keep prompt/response bodies (omitted by default; long strings truncated)"),
|
|
323
|
-
limit: z.number().min(1).max(1000).default(200).optional().describe("Ingest rows to read; warns when capped"),
|
|
325
|
+
limit: z.number().int().min(1).max(1000).default(200).optional().describe("Ingest rows to read; warns when capped"),
|
|
324
326
|
cursor: z.string().min(1).max(512).optional().describe("next_cursor from the previous page"),
|
|
327
|
+
span_offset: z.number().int().min(0).max(1e5).optional().describe("Skip this many spans of the page (continues a page cut to the agent output limit)"),
|
|
328
|
+
page_bytes: z.number().int().min(1).max(1e7).optional().describe("Server page size in bytes (keeps a --span-offset continuation on the same page)"),
|
|
325
329
|
ids_from: z.string().min(1).optional().describe("Read several trace ids, one per line, from a file or - for stdin (batch mode, up to 25)")
|
|
326
330
|
});
|
|
327
331
|
var TIME_RANGES = ["all", "1h", "3d", "7d", "24h", "30d", "90d"];
|
|
@@ -334,9 +338,9 @@ var SearchSchema = z.object({
|
|
|
334
338
|
time_range: z.enum(TIME_RANGES).default("all").optional().describe("Time window"),
|
|
335
339
|
since: isoBoundFlag().describe("Absolute UTC start, inclusive (ISO date or datetime); intersected with --time-range"),
|
|
336
340
|
until: isoBoundFlag().describe("Absolute UTC end, inclusive (ISO date or datetime; a date covers that whole day)"),
|
|
337
|
-
limit: z.number().min(1).max(100).default(20).optional().describe("Maximum results to return"),
|
|
341
|
+
limit: z.number().int().min(1).max(100).default(20).optional().describe("Maximum results to return"),
|
|
338
342
|
include_tool_io: boolFlag().describe("Also search tool inputs and outputs"),
|
|
339
|
-
offset: z.number().min(0).max(1e4).optional().describe("Skip results (pages the trace-level fallback only)")
|
|
343
|
+
offset: z.number().int().min(0).max(1e4).optional().describe("Skip results (pages the trace-level fallback only)")
|
|
340
344
|
});
|
|
341
345
|
var InvestigateSchema = z.object({
|
|
342
346
|
days_back: daysBackFlag(7),
|
|
@@ -500,19 +504,58 @@ function dedicatedCommandHint(category, rawCategory) {
|
|
|
500
504
|
return "Feedback is read by the Moda team but does not change the problem. To act on it directly, use " + "`moda problems feedback <problem_id> --action=flag_attribution --attribution-id=<uuid> --reason=TEXT` (a trace wrongly " + "attributed to a problem), `moda review <kind> <target> --reason=TEXT` (a detection that should not " + "have fired), or `moda fix dismiss <fix_id> --reason=TEXT` (a fix aimed at the wrong problem).";
|
|
501
505
|
}
|
|
502
506
|
|
|
507
|
+
// src/dry-run.ts
|
|
508
|
+
function plannedEndpoint(plane, path) {
|
|
509
|
+
return plane === "data" ? `/api/v1/data${path}` : `/api${path}`;
|
|
510
|
+
}
|
|
511
|
+
function realRunCommand(context) {
|
|
512
|
+
const invocation = context.invocation ?? {
|
|
513
|
+
command: context.command,
|
|
514
|
+
positionals: context.positionals,
|
|
515
|
+
flags: context.rawFlags,
|
|
516
|
+
...context.bareFlags ? { bareFlags: context.bareFlags } : {}
|
|
517
|
+
};
|
|
518
|
+
const flags = Object.fromEntries(Object.entries(invocation.flags).filter(([key]) => key.replace(/_/g, "-") !== "dry-run"));
|
|
519
|
+
return continuationCommand({ ...invocation, flags }, {});
|
|
520
|
+
}
|
|
521
|
+
function writeDryRun(context, request) {
|
|
522
|
+
const endpoint = plannedEndpoint(request.plane, request.path);
|
|
523
|
+
const command = realRunCommand(context);
|
|
524
|
+
context.output.writeData({
|
|
525
|
+
dryRun: true,
|
|
526
|
+
planned: {
|
|
527
|
+
method: request.method,
|
|
528
|
+
endpoint,
|
|
529
|
+
...request.body !== undefined ? { body: request.body } : {},
|
|
530
|
+
...request.generatedFields?.length ? { generated_at_send: request.generatedFields } : {}
|
|
531
|
+
}
|
|
532
|
+
}, {
|
|
533
|
+
summary: { text: `Dry run: would ${request.method} ${endpoint}. Nothing was sent.`, confidence: "high" },
|
|
534
|
+
nextCommands: [{
|
|
535
|
+
command,
|
|
536
|
+
purpose: "Send this write for real (the same command without --dry-run).",
|
|
537
|
+
mutability: "write",
|
|
538
|
+
requires_approval: true
|
|
539
|
+
}]
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
|
|
503
543
|
// src/command-flags.ts
|
|
504
544
|
import { z as z3 } from "zod";
|
|
545
|
+
var DRY_RUN = z3.object({
|
|
546
|
+
dry_run: z3.boolean().optional().describe("Validate and print the exact request (method, path, body); send nothing")
|
|
547
|
+
});
|
|
505
548
|
var TRACE_ID = { name: "conversation_id", key: "conversation_id", required: true };
|
|
506
549
|
var PROBLEM_ID = { name: "problem_id", key: "id", required: true };
|
|
507
550
|
var COMMAND_FLAG_SPECS = {
|
|
508
551
|
overview: { schema: OverviewSchema, extra: z3.object({ raw: z3.boolean().optional().describe("Print the raw briefing data") }) },
|
|
509
552
|
investigate: { schema: InvestigateSchema, handParsed: true },
|
|
510
553
|
failures: { schema: FailuresSchema, handParsed: true },
|
|
511
|
-
ask: { schema: AskSchema, handParsed: true, positionals: [{ name: "question", key: "question", required: true }] },
|
|
554
|
+
ask: { schema: AskSchema, handParsed: true, positionals: [{ name: "question", key: "question", required: true, variadic: true }] },
|
|
512
555
|
clusters: { schema: ClustersSchema },
|
|
513
556
|
"cluster-traces": { schema: ClusterConversationsSchema, positionals: [{ name: "node_id", key: "node_id", required: true }] },
|
|
514
557
|
traces: { schema: ConversationsSchema },
|
|
515
|
-
search: { schema: SearchSchema, positionals: [{ name: "query", key: "q", required: true }] },
|
|
558
|
+
search: { schema: SearchSchema, positionals: [{ name: "query", key: "q", required: true, variadic: true }] },
|
|
516
559
|
"world-state": { schema: WorldStateSchema, positionals: [TRACE_ID] },
|
|
517
560
|
context: {
|
|
518
561
|
schema: ContextSchema,
|
|
@@ -529,14 +572,15 @@ var COMMAND_FLAG_SPECS = {
|
|
|
529
572
|
},
|
|
530
573
|
"problem-impact": { schema: ProblemImpactSchema, handParsed: true },
|
|
531
574
|
problem: { schema: ProblemSchema, positionals: [PROBLEM_ID] },
|
|
532
|
-
"problem-feedback": { schema: ProblemFeedbackSchema, handParsed: true, positionals: [PROBLEM_ID] },
|
|
575
|
+
"problem-feedback": { schema: ProblemFeedbackSchema, extra: DRY_RUN, handParsed: true, positionals: [PROBLEM_ID] },
|
|
533
576
|
"problem-reopen": { schema: ProblemReopenSchema, handParsed: true, positionals: [PROBLEM_ID] },
|
|
534
577
|
"problem-linear": { schema: ProblemLinearSchema, handParsed: true, positionals: [PROBLEM_ID] },
|
|
535
|
-
"problem-linear-file": { schema: ProblemLinearFileSchema, handParsed: true, positionals: [PROBLEM_ID] },
|
|
578
|
+
"problem-linear-file": { schema: ProblemLinearFileSchema, extra: DRY_RUN, handParsed: true, positionals: [PROBLEM_ID] },
|
|
536
579
|
"detection-reviews": { schema: DetectionReviewsSchema, handParsed: true, positionals: [TRACE_ID] },
|
|
537
|
-
"detection-review": { schema: DetectionReviewSchema, handParsed: true, positionals: [PROBLEM_ID] },
|
|
580
|
+
"detection-review": { schema: DetectionReviewSchema, extra: DRY_RUN, handParsed: true, positionals: [PROBLEM_ID] },
|
|
538
581
|
"false-positive": {
|
|
539
582
|
schema: FalsePositiveSchema,
|
|
583
|
+
extra: DRY_RUN,
|
|
540
584
|
handParsed: true,
|
|
541
585
|
positionals: [
|
|
542
586
|
{ name: "kind", key: "kind", required: true },
|
|
@@ -551,7 +595,7 @@ var COMMAND_FLAG_SPECS = {
|
|
|
551
595
|
signals: { schema: SignalsListSchema, handParsed: true },
|
|
552
596
|
signal: { schema: SignalSchema, positionals: [{ name: "signal_id", key: "id", required: true }] },
|
|
553
597
|
"trace-signals": { schema: TraceSignalsSchema, handParsed: true, positionals: [TRACE_ID] },
|
|
554
|
-
"signal-label": { schema: SignalLabelSchema, handParsed: true, positionals: [{ name: "signal_id", key: "id", required: true }] },
|
|
598
|
+
"signal-label": { schema: SignalLabelSchema, extra: DRY_RUN, handParsed: true, positionals: [{ name: "signal_id", key: "id", required: true }] },
|
|
555
599
|
emotions: { schema: EmotionsSchema },
|
|
556
600
|
laziness: { schema: LazinessSchema },
|
|
557
601
|
hallucinations: { schema: HallucinationsSchema },
|
|
@@ -559,6 +603,7 @@ var COMMAND_FLAG_SPECS = {
|
|
|
559
603
|
tail: { schema: TailSchema },
|
|
560
604
|
feedback: {
|
|
561
605
|
schema: FeedbackSchema,
|
|
606
|
+
extra: DRY_RUN,
|
|
562
607
|
handParsed: true,
|
|
563
608
|
idRefFlags: true,
|
|
564
609
|
positionals: [{ name: "note", key: "note", required: true, variadic: true, alsoFlag: true }]
|
|
@@ -878,7 +923,8 @@ function assertFlags(command, flags, allowed) {
|
|
|
878
923
|
"stream",
|
|
879
924
|
"no-stream",
|
|
880
925
|
"tui",
|
|
881
|
-
"no-tui"
|
|
926
|
+
"no-tui",
|
|
927
|
+
"pretty"
|
|
882
928
|
];
|
|
883
929
|
const known = new Set([...allowed, ...globals]);
|
|
884
930
|
const unknown = Object.keys(flags).filter((flag) => !known.has(flag));
|
|
@@ -939,10 +985,7 @@ var LLM_WRITE_TIMEOUT_MS = 180000;
|
|
|
939
985
|
async function send(context, plane, method, endpoint, body, options = {}) {
|
|
940
986
|
const init = { method, ...body !== undefined ? { body: JSON.stringify(body) } : {} };
|
|
941
987
|
if (method !== "GET" && context.dryRun) {
|
|
942
|
-
context
|
|
943
|
-
dryRun: true,
|
|
944
|
-
planned: { method, endpoint: plane === "data" ? `/api/v1/data${endpoint}` : `/api${endpoint}`, ...body !== undefined ? { body } : {} }
|
|
945
|
-
}, { summary: { text: `Dry run: would ${method} ${endpoint}. Nothing was sent.`, confidence: "high" } });
|
|
988
|
+
writeDryRun(context, { plane, method, path: endpoint, ...body !== undefined ? { body } : {} });
|
|
946
989
|
return;
|
|
947
990
|
}
|
|
948
991
|
const requestOptions = method === "GET" ? {} : { retries: 0, ...options.slow ? { timeoutMs: LLM_WRITE_TIMEOUT_MS } : {} };
|
|
@@ -1290,11 +1333,11 @@ var SIGNALS_MANAGEMENT_SUBCOMMANDS = new Set([
|
|
|
1290
1333
|
]);
|
|
1291
1334
|
function unknownSignalsSubcommandError(sub, args = []) {
|
|
1292
1335
|
if (sub === "archive") {
|
|
1293
|
-
const id = args[0]
|
|
1336
|
+
const id = args[0] ? shellArg(args[0]) : "<signal_id>";
|
|
1294
1337
|
return new CliInputError(`Unknown signals subcommand 'archive': archiving a signal is dashboard-only, so nothing was sent.`, `To stop a signal from running, pause it: moda signals pause ${id}. Drafts can be deleted with moda signals delete ${id}.`);
|
|
1295
1338
|
}
|
|
1296
1339
|
return new CliInputError(`Unknown signals subcommand '${sub}', so nothing was sent. Valid subcommands: ${[...SIGNALS_MANAGEMENT_SUBCOMMANDS].join(", ")}.`, `Bare 'moda signals' lists custom signals; 'moda signal <signal_id>' opens one. Usage:
|
|
1297
1340
|
${SIGNAL_USAGE}`);
|
|
1298
1341
|
}
|
|
1299
1342
|
|
|
1300
|
-
export { ProblemsRemainderSchema, UUID_RE, ProblemImpactSchema, PROBLEM_FEEDBACK_ACTIONS, ProblemFeedbackSchema, ProblemLinearFileSchema, SignalLabelSchema, DETECTION_VERDICTS, DetectionReviewSchema, FALSE_POSITIVE_KINDS, FalsePositiveSchema, EMOTION_FAMILIES, LAZINESS_FAMILIES, StepScoresSchema, AuditSchema, FEEDBACK_USAGE, isFeedbackRefFlag, buildFeedbackRequest, COMMAND_FLAG_SPECS, flagSpecFor, kebabFlag, schemaShape, specFlagKeys, specFlagNames, describeSpecFlags, closestMatches, renderFlagHelp, subcommandHelpFlags, manifestFlagFields, requireTenant, assertFlags, assertPositionals, runUsersCommand, runUserCommand, runProblemReopenCommand, runSignalsManagementCommand, SIGNALS_MANAGEMENT_SUBCOMMANDS, unknownSignalsSubcommandError };
|
|
1343
|
+
export { ProblemsRemainderSchema, UUID_RE, ProblemImpactSchema, PROBLEM_FEEDBACK_ACTIONS, ProblemFeedbackSchema, ProblemLinearFileSchema, SignalLabelSchema, DETECTION_VERDICTS, DetectionReviewSchema, FALSE_POSITIVE_KINDS, FalsePositiveSchema, EMOTION_FAMILIES, LAZINESS_FAMILIES, StepScoresSchema, AuditSchema, FEEDBACK_USAGE, isFeedbackRefFlag, buildFeedbackRequest, writeDryRun, COMMAND_FLAG_SPECS, flagSpecFor, kebabFlag, schemaShape, describeField, specFlagKeys, specFlagNames, describeSpecFlags, closestMatches, usageLine, renderFlagHelp, subcommandHelpFlags, manifestFlagFields, requireTenant, assertFlags, assertPositionals, runUsersCommand, runUserCommand, runProblemReopenCommand, runSignalsManagementCommand, SIGNALS_MANAGEMENT_SUBCOMMANDS, unknownSignalsSubcommandError };
|