@moda-ai/cli 1.55.37 → 1.55.38

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.
Files changed (38) hide show
  1. package/dist/{agent-4pyeecf7.js → agent-9r58v0bc.js} +8 -8
  2. package/dist/{cli-s72pph9c.js → cli-3n040fp2.js} +1 -1
  3. package/dist/{cli-wh83c3ss.js → cli-93926afn.js} +4 -4
  4. package/dist/{cli-ef9eagsc.js → cli-9g5kzsg6.js} +1 -1
  5. package/dist/{cli-4d92a450.js → cli-b7nyw498.js} +1 -1
  6. package/dist/{cli-npkb08xt.js → cli-dmnayt2r.js} +8 -8
  7. package/dist/{cli-nqgyz74b.js → cli-n311b8g0.js} +1 -1
  8. package/dist/{cli-xkcy9wns.js → cli-nh23q6ay.js} +5 -5
  9. package/dist/{cli-wg6e2a1g.js → cli-rcjhfts4.js} +7 -6
  10. package/dist/{cli-gjzr7jq5.js → cli-sk1p71wr.js} +1 -1
  11. package/dist/{cli-x605txan.js → cli-skvvwp2q.js} +5 -5
  12. package/dist/{cli-w3ckvma5.js → cli-tdcx8yz9.js} +3 -3
  13. package/dist/{cli-cdx6yd7m.js → cli-xheg54qc.js} +63 -7
  14. package/dist/{cli-nzx7rqjs.js → cli-xk630wjq.js} +1 -1
  15. package/dist/{cli-cr44672e.js → cli-xtyszvq1.js} +5 -5
  16. package/dist/cli.js +162 -34
  17. package/dist/{doctor-w8z3wj1e.js → doctor-xq5bjvpq.js} +7 -7
  18. package/dist/{fix-667fyx00.js → fix-kvszavm1.js} +4 -4
  19. package/dist/{harness-github-actions-7s41s1vg.js → harness-github-actions-drbkcb8d.js} +5 -5
  20. package/dist/{harness-fb0083ap.js → harness-qatnwxrz.js} +5 -5
  21. package/dist/{index-4w5szrnw.js → index-y5jnz2t2.js} +11 -11
  22. package/dist/{production-intelligence-v2wq2aqv.js → production-intelligence-j55vaw6t.js} +61 -4
  23. package/dist/{profile-commands-3hw4trwk.js → profile-commands-skdxe17v.js} +3 -3
  24. package/dist/{prompt-attribution-g7md8hzc.js → prompt-attribution-zq38actx.js} +5 -5
  25. package/dist/prompt-source-mcp.js +5 -5
  26. package/dist/{prompts-ab-59r52mxw.js → prompts-ab-yd2dawe3.js} +7 -7
  27. package/dist/{prompts-90v9eg2k.js → prompts-cwqn8a57.js} +5 -5
  28. package/dist/{prompts-propose-cbenbk8w.js → prompts-propose-11dj9ked.js} +7 -7
  29. package/dist/{provision-8c4s6vgg.js → provision-ghca9d54.js} +5 -5
  30. package/dist/{registry-qvjyvbk8.js → registry-76sngjw6.js} +3 -3
  31. package/dist/{skills-z7w5x7jj.js → skills-btn9r48v.js} +5 -5
  32. package/dist/{sync-r32tgpar.js → sync-ye7nxeen.js} +7 -7
  33. package/package.json +1 -1
  34. package/skills/integration/index.json +2 -2
  35. package/skills/moda-cli/SKILL.md +3 -1
  36. package/skills/moda-cli/references/commands.md +1 -0
  37. package/skills/moda-cli/references/dashboard-parity.md +3 -0
  38. package/skills/moda-cli/references/detections.md +53 -0
package/dist/cli.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  withFrustrationAnchors,
21
21
  withToolFailureAnchors,
22
22
  withoutDetectionWindows
23
- } from "./cli-nqgyz74b.js";
23
+ } from "./cli-n311b8g0.js";
24
24
  import {
25
25
  createCommandContext,
26
26
  envOptOutSet,
@@ -28,7 +28,7 @@ import {
28
28
  optOutFlagSet,
29
29
  parseBooleanFlagValue,
30
30
  withoutFlag
31
- } from "./cli-4d92a450.js";
31
+ } from "./cli-b7nyw498.js";
32
32
  import {
33
33
  AuditSchema,
34
34
  COMMAND_FLAG_SPECS,
@@ -47,6 +47,7 @@ import {
47
47
  SIGNALS_MANAGEMENT_SUBCOMMANDS,
48
48
  SignalLabelSchema,
49
49
  StepScoresSchema,
50
+ TRACE_GRAIN_FLAGS,
50
51
  UUID_RE,
51
52
  assertFlags,
52
53
  assertPositionals,
@@ -70,12 +71,12 @@ import {
70
71
  unknownSignalsSubcommandError,
71
72
  usageLine,
72
73
  writeDryRun
73
- } from "./cli-cdx6yd7m.js";
74
+ } from "./cli-xheg54qc.js";
74
75
  import {
75
76
  ApiError,
76
77
  callControlAPI,
77
78
  callDataAPI
78
- } from "./cli-s72pph9c.js";
79
+ } from "./cli-3n040fp2.js";
79
80
  import {
80
81
  AGENT_ERROR_CODES,
81
82
  EXIT_AUTH_REQUIRED,
@@ -112,7 +113,7 @@ import {
112
113
  shellArg,
113
114
  validateConfig,
114
115
  wasOutputCancelled
115
- } from "./cli-wg6e2a1g.js";
116
+ } from "./cli-rcjhfts4.js";
116
117
  import {
117
118
  CliAccessError,
118
119
  CliAuthError,
@@ -2981,46 +2982,46 @@ function leafManifestFields(leaf, commands) {
2981
2982
  import { fileURLToPath } from "url";
2982
2983
  import { realpathSync } from "fs";
2983
2984
  async function runPromptsCommand(...args) {
2984
- return (await import("./prompts-90v9eg2k.js")).runPromptsCommand(...args);
2985
+ return (await import("./prompts-cwqn8a57.js")).runPromptsCommand(...args);
2985
2986
  }
2986
2987
  async function runSkillsCommand(...args) {
2987
- return (await import("./skills-z7w5x7jj.js")).runSkillsCommand(...args);
2988
+ return (await import("./skills-btn9r48v.js")).runSkillsCommand(...args);
2988
2989
  }
2989
2990
  async function runFixCommand(...args) {
2990
- return (await import("./fix-667fyx00.js")).runFixCommand(...args);
2991
+ return (await import("./fix-kvszavm1.js")).runFixCommand(...args);
2991
2992
  }
2992
2993
  async function runFixesCommand(...args) {
2993
- return (await import("./fix-667fyx00.js")).runFixesCommand(...args);
2994
+ return (await import("./fix-kvszavm1.js")).runFixesCommand(...args);
2994
2995
  }
2995
2996
  async function runHarnessCommand(...args) {
2996
- return (await import("./harness-fb0083ap.js")).runHarnessCommand(...args);
2997
+ return (await import("./harness-qatnwxrz.js")).runHarnessCommand(...args);
2997
2998
  }
2998
2999
  async function runSyncCommand(...args) {
2999
- return (await import("./sync-r32tgpar.js")).runSyncCommand(...args);
3000
+ return (await import("./sync-ye7nxeen.js")).runSyncCommand(...args);
3000
3001
  }
3001
3002
  async function runRegistryCommand(...args) {
3002
- return (await import("./registry-qvjyvbk8.js")).runRegistryCommand(...args);
3003
+ return (await import("./registry-76sngjw6.js")).runRegistryCommand(...args);
3003
3004
  }
3004
3005
  async function runDoctorCommand(...args) {
3005
- return (await import("./doctor-w8z3wj1e.js")).runDoctorCommand(...args);
3006
+ return (await import("./doctor-xq5bjvpq.js")).runDoctorCommand(...args);
3006
3007
  }
3007
3008
  async function runStatusCommand(...args) {
3008
- return (await import("./doctor-w8z3wj1e.js")).runStatusCommand(...args);
3009
+ return (await import("./doctor-xq5bjvpq.js")).runStatusCommand(...args);
3009
3010
  }
3010
3011
  async function runAuthCommand(...args) {
3011
- return (await import("./profile-commands-3hw4trwk.js")).runAuthCommand(...args);
3012
+ return (await import("./profile-commands-skdxe17v.js")).runAuthCommand(...args);
3012
3013
  }
3013
3014
  async function runConfigCommand(...args) {
3014
- return (await import("./profile-commands-3hw4trwk.js")).runConfigCommand(...args);
3015
+ return (await import("./profile-commands-skdxe17v.js")).runConfigCommand(...args);
3015
3016
  }
3016
3017
  async function runProfilesCommand(...args) {
3017
- return (await import("./profile-commands-3hw4trwk.js")).runProfilesCommand(...args);
3018
+ return (await import("./profile-commands-skdxe17v.js")).runProfilesCommand(...args);
3018
3019
  }
3019
3020
  async function runAgentCommand(...args) {
3020
- return (await import("./agent-4pyeecf7.js")).runAgentCommand(...args);
3021
+ return (await import("./agent-9r58v0bc.js")).runAgentCommand(...args);
3021
3022
  }
3022
3023
  async function runProductionCommand(...args) {
3023
- return (await import("./production-intelligence-v2wq2aqv.js")).runProductionCommand(...args);
3024
+ return (await import("./production-intelligence-j55vaw6t.js")).runProductionCommand(...args);
3024
3025
  }
3025
3026
  function parseArgs(argv) {
3026
3027
  const args = argv.slice(2);
@@ -3675,7 +3676,7 @@ var TOOL_FAILURE_DETAIL_DEFAULT_LIMIT = 5;
3675
3676
  var TOOL_FAILURE_AGENT_SUBTYPES = 20;
3676
3677
  var TOOL_FAILURE_CATALOG_LINKS = 3;
3677
3678
  var TOOL_CATALOG_DEFAULT_LIMIT = 25;
3678
- async function printWithOptionalWindows(enriched, listKey, includeWindow, windowSize, output, warnings, finalize, nextCommands = []) {
3679
+ async function printWithOptionalWindows(enriched, listKey, includeWindow, windowSize, output, warnings, finalize, nextCommands = [], summary) {
3679
3680
  const allWarnings = [...warnings ?? []];
3680
3681
  let data = enriched;
3681
3682
  if (includeWindow) {
@@ -3686,6 +3687,7 @@ async function printWithOptionalWindows(enriched, listKey, includeWindow, window
3686
3687
  if (finalize)
3687
3688
  data = finalize(data, allWarnings);
3688
3689
  const options = {
3690
+ ...summary ? { summary } : {},
3689
3691
  ...allWarnings.length > 0 ? { warnings: allWarnings } : {},
3690
3692
  ...nextCommands.length > 0 ? { nextCommands } : {}
3691
3693
  };
@@ -4535,6 +4537,91 @@ function processingDisabledWarning(data, family) {
4535
4537
  `${family === "emotion" ? "Emotion" : "Frustration"} analysis is disabled for this tenant (${setting} = false), ` + "so zero results do NOT mean users are not frustrated. Enable it in Settings → Account → Signal processing; " + "only traces ingested after enabling are analyzed."
4536
4538
  ];
4537
4539
  }
4540
+ function readsPerTrace(command, params, perRowScopes) {
4541
+ const filters = TRACE_GRAIN_FLAGS[command].filter((key) => params[key] !== undefined);
4542
+ const grain = params.group_by;
4543
+ if (grain !== undefined && grain !== "trace" && filters.length > 0) {
4544
+ rejectInapplicableFlags(command, params, filters, `with --group-by=${grain}; they filter the per-trace list (--group-by=trace)`);
4545
+ }
4546
+ const perTrace = grain === "trace" || filters.length > 0;
4547
+ if (perTrace) {
4548
+ rejectInapplicableFlags(command, params, perRowScopes, "to the per-trace list (--group-by=trace, or a filter that implies it); drop --group-by and the trace filters to use them");
4549
+ }
4550
+ return perTrace;
4551
+ }
4552
+ function setTraceFilters(query2, params, keys) {
4553
+ query2.set("group_by", "trace");
4554
+ for (const key of keys) {
4555
+ const value = params[key];
4556
+ if (value === undefined)
4557
+ continue;
4558
+ if (key === "signal")
4559
+ query2.set("signals", String(value).split(",").map((part) => part.trim()).join(","));
4560
+ else
4561
+ query2.set(key, String(value));
4562
+ }
4563
+ }
4564
+ function countingSummary(data) {
4565
+ const record = asRecord(data);
4566
+ const counting = asString(record?.counting);
4567
+ const total = asNumber(asRecord(record?.pagination)?.total);
4568
+ if (!counting || total === null)
4569
+ return;
4570
+ switch (counting) {
4571
+ case "per_trace":
4572
+ return `${total} trace(s) match. Counting: per trace, as the dashboard counts (pagination.total = traces).`;
4573
+ case "per_detection":
4574
+ return `${total} detection(s) match. Counting: per detection (one row per trace and family), not per trace; add --group-by=trace for the dashboard's per-trace count.`;
4575
+ case "per_message":
4576
+ return `${total} message detection(s) match. Counting: per scored message, not per trace; add --group-by=trace for the dashboard's per-trace count.`;
4577
+ default:
4578
+ return;
4579
+ }
4580
+ }
4581
+ function traceStateWarnings(data) {
4582
+ const record = asRecord(data);
4583
+ if (asString(record?.trace_state) === "unavailable") {
4584
+ return ["Trace processing state could not be read, so processing_status is null on every row; do not read missing detections as clean."];
4585
+ }
4586
+ const rows = Array.isArray(record?.conversations) ? record.conversations.map(asRecord) : [];
4587
+ const pending = rows.filter((row) => asString(row?.processing_status) === "pending").length;
4588
+ const errored = rows.filter((row) => asString(row?.error_message)).length;
4589
+ const warnings = [];
4590
+ if (pending > 0) {
4591
+ warnings.push(`${pending} of ${rows.length} trace(s) on this page are not fully processed yet (processing_status=pending), so their detections may be incomplete; missing detections do not mean they are clean.`);
4592
+ }
4593
+ if (errored > 0) {
4594
+ warnings.push(`${errored} trace(s) on this page have a processing error (error_message); their detections may be missing.`);
4595
+ }
4596
+ return warnings;
4597
+ }
4598
+ function singleTraceStateWarnings(value) {
4599
+ const traceState = asRecord(value);
4600
+ const warnings = [];
4601
+ if (asString(traceState?.processing_status) === "pending") {
4602
+ warnings.push("This trace is not fully processed yet (trace_state.processing_status=pending), so its detections may be incomplete; missing detections do not mean it is clean.");
4603
+ }
4604
+ if (asString(traceState?.error_message)) {
4605
+ warnings.push("This trace has a processing error (trace_state.error_message); its detections may be missing.");
4606
+ }
4607
+ return warnings;
4608
+ }
4609
+ function customSignalProcessingWarning(data, rows) {
4610
+ const record = asRecord(data);
4611
+ const processing = asRecord(record?.processing);
4612
+ const list = record?.[rows];
4613
+ if (!processing || !Array.isArray(list) || list.length > 0)
4614
+ return [];
4615
+ if (processing.enabled === false) {
4616
+ return [
4617
+ "Custom-signal judging is disabled for this tenant (signals.custom_signals = false), so no hits does NOT mean the traces are clean. " + "Enable it in Settings → Account → Signal processing; only conversations judged after enabling get hits."
4618
+ ];
4619
+ }
4620
+ if (processing.enabled === null) {
4621
+ return ["Could not confirm whether custom-signal judging is enabled for this tenant, so treat no hits with caution."];
4622
+ }
4623
+ return [];
4624
+ }
4538
4625
  var CONTEXT_USAGE = "Usage: moda traces get <conversation_id> [--msg-index=N (alias --message-index)] [--window=0-5 | --metadata-only]";
4539
4626
  var CONTEXT_ALL_USAGE = "Usage: moda traces get <conversation_id> --all [--from=N] [--max-messages=N]";
4540
4627
  var CONTEXT_BATCH_USAGE = `Usage: moda traces get <id>[@msg_index] <id>[@msg_index] ... | --ids-from=-|<file> [--window=0-5 | --metadata-only | --all [--from=N] [--max-messages=N]] (max ${BATCH_MAX_TARGETS} targets)`;
@@ -4640,6 +4727,7 @@ async function readFullTranscript(conversationId, opts = {}) {
4640
4727
  let total = 0;
4641
4728
  let summary = null;
4642
4729
  let ordering;
4730
+ let traceState;
4643
4731
  let nextFrom = null;
4644
4732
  let cursor = start;
4645
4733
  let readBytes = 0;
@@ -4656,6 +4744,7 @@ async function readFullTranscript(conversationId, opts = {}) {
4656
4744
  total = asNumber(page.total_messages) ?? 0;
4657
4745
  summary = stripLoneSurrogates(page.summary ?? null);
4658
4746
  ordering = stripLoneSurrogates(asRecord(page.ordering) ?? undefined);
4747
+ traceState = page.trace_state;
4659
4748
  }
4660
4749
  const batch = stripLoneSurrogates(pageMessages(page));
4661
4750
  messages.push(...batch);
@@ -4707,6 +4796,7 @@ async function readFullTranscript(conversationId, opts = {}) {
4707
4796
  next_from: next,
4708
4797
  summary,
4709
4798
  ...ordering ? { ordering } : {},
4799
+ ...traceState !== undefined ? { trace_state: traceState } : {},
4710
4800
  messages: returned
4711
4801
  },
4712
4802
  warnings: out,
@@ -4728,7 +4818,7 @@ async function readContextItem(params, inputWarnings, budget) {
4728
4818
  fits: fits ? (page) => fits(page.data, { warnings: page.warnings, nextCommands: page.nextCommands }) : undefined,
4729
4819
  maxBytes: budget?.maxBytes
4730
4820
  });
4731
- const fullWarnings = [...inputWarnings, ...full.warnings];
4821
+ const fullWarnings = [...inputWarnings, ...singleTraceStateWarnings(asRecord(full.data)?.trace_state), ...full.warnings];
4732
4822
  return {
4733
4823
  data: full.data,
4734
4824
  options: {
@@ -4750,7 +4840,7 @@ async function readContextItem(params, inputWarnings, budget) {
4750
4840
  const data = params.metadata_only === true ? await readContextMetadataOnly(contextPath, query2) : await callDataAPI(`${contextPath}${queryString}`);
4751
4841
  const ctxRecord = asRecord(data) ?? {};
4752
4842
  throwIfNotFound("trace", params.conversation_id, asNumber(ctxRecord.total_messages) === 0);
4753
- const warnings = [...inputWarnings];
4843
+ const warnings = [...inputWarnings, ...singleTraceStateWarnings(ctxRecord.trace_state)];
4754
4844
  const nextCommands = [];
4755
4845
  if (params.window !== undefined && params.window > CONTEXT_MAX_WINDOW) {
4756
4846
  const center = asNumber(asRecord(ctxRecord.context)?.center_index) ?? params.msg_index ?? 0;
@@ -5189,6 +5279,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
5189
5279
  searchWarnings.push("--sort=slowest: no trace in this page has a known duration (synthetic timestamps), so the order is not by duration. Use --sort=longest (message count) instead.");
5190
5280
  }
5191
5281
  }
5282
+ searchWarnings.push(...traceStateWarnings(data));
5192
5283
  const writeOptions = searchWarnings.length > 0 ? { warnings: searchWarnings } : undefined;
5193
5284
  if (params.include_world_state === true) {
5194
5285
  const enriched = asRecord(data) ?? {};
@@ -5356,6 +5447,15 @@ async function runCommand(command, positional, flags, positionals = positional ?
5356
5447
  query2.set("limit", params.limit.toString());
5357
5448
  if (params.offset !== undefined)
5358
5449
  query2.set("offset", params.offset.toString());
5450
+ if (readsPerTrace("frustrations", params, ["user_id", "conversation_id", "include_window"])) {
5451
+ query2.set("family", "frustration");
5452
+ setTraceFilters(query2, params, TRACE_GRAIN_FLAGS.frustrations);
5453
+ const data2 = await callDataAPI(`/emotions?${query2.toString()}`);
5454
+ const warnings = processingDisabledWarning(data2, "frustration");
5455
+ const summary = countingSummary(data2);
5456
+ context.output.writeData(data2, { ...summary ? { summary } : {}, ...warnings.length > 0 ? { warnings } : {} });
5457
+ break;
5458
+ }
5359
5459
  if (params.user_id)
5360
5460
  query2.set("user_id", params.user_id);
5361
5461
  if (params.conversation_id)
@@ -5367,7 +5467,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
5367
5467
  query2.set("include_context", "0");
5368
5468
  const data = frustrationsFromEmotions(await callDataAPI(`/emotions?${query2.toString()}`));
5369
5469
  const anchored = withFrustrationAnchors(data);
5370
- 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);
5470
+ 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, [], countingSummary(data));
5371
5471
  break;
5372
5472
  }
5373
5473
  case "tool-failures": {
@@ -5803,7 +5903,8 @@ async function runCommand(command, positional, flags, positionals = positional ?
5803
5903
  query2.set("offset", params.offset.toString());
5804
5904
  const queryString = query2.toString() ? `?${query2.toString()}` : "";
5805
5905
  const data = await callDataAPI(`/custom-signals/${id}/detections${queryString}`);
5806
- context.output.writeData(data);
5906
+ const warnings = customSignalProcessingWarning(data, "detections");
5907
+ context.output.writeData(data, warnings.length > 0 ? { warnings } : undefined);
5807
5908
  break;
5808
5909
  }
5809
5910
  case "trace-signals": {
@@ -5811,7 +5912,8 @@ async function runCommand(command, positional, flags, positionals = positional ?
5811
5912
  throw new CliInputError("<conversation_id> is required", "Usage: moda detections list --family=custom_signal --conversation-id=<conversation_id>");
5812
5913
  }
5813
5914
  const data = await callDataAPI(`/conversations/${encodeURIComponent(positional)}/custom-signals`);
5814
- context.output.writeData(data);
5915
+ const warnings = customSignalProcessingWarning(data, "detections");
5916
+ context.output.writeData(data, warnings.length > 0 ? { warnings } : undefined);
5815
5917
  break;
5816
5918
  }
5817
5919
  case "signal-label": {
@@ -6029,6 +6131,14 @@ async function runCommand(command, positional, flags, positionals = positional ?
6029
6131
  query2.set("offset", params.offset.toString());
6030
6132
  if (params.family)
6031
6133
  query2.set("family", params.family);
6134
+ if (readsPerTrace("emotions", params, ["user_id", "conversation_id", "include_window"])) {
6135
+ setTraceFilters(query2, params, TRACE_GRAIN_FLAGS.emotions);
6136
+ const data2 = await callDataAPI(`/emotions?${query2.toString()}`);
6137
+ const warnings = processingDisabledWarning(data2, "emotion");
6138
+ const summary2 = countingSummary(data2);
6139
+ context.output.writeData(data2, { ...summary2 ? { summary: summary2 } : {}, ...warnings.length > 0 ? { warnings } : {} });
6140
+ break;
6141
+ }
6032
6142
  if (params.user_id)
6033
6143
  query2.set("user_id", params.user_id);
6034
6144
  if (params.conversation_id)
@@ -6041,7 +6151,8 @@ async function runCommand(command, positional, flags, positionals = positional ?
6041
6151
  const processingWarnings = processingDisabledWarning(raw, "emotion");
6042
6152
  const record = asRecord(raw);
6043
6153
  const data = agentMode && params.include_window !== true && record ? withoutDetectionWindows(record, "detections", "conversation_context") : raw;
6044
- context.output.writeData(data, processingWarnings.length > 0 ? { warnings: processingWarnings } : undefined);
6154
+ const summary = countingSummary(data);
6155
+ context.output.writeData(data, summary || processingWarnings.length > 0 ? { ...summary ? { summary } : {}, ...processingWarnings.length > 0 ? { warnings: processingWarnings } : {} } : undefined);
6045
6156
  break;
6046
6157
  }
6047
6158
  case "laziness": {
@@ -6058,9 +6169,21 @@ async function runCommand(command, positional, flags, positionals = positional ?
6058
6169
  query2.set("conversation_id", params.conversation_id);
6059
6170
  if (params.family)
6060
6171
  query2.set("family", params.family);
6172
+ if (params.conversation_id) {
6173
+ rejectInapplicableFlags(command, params, ["search", "status", "sort", "order"], "to one trace's detections (--conversation-id); they filter and order the trace list");
6174
+ }
6175
+ if (params.search)
6176
+ query2.set("search", params.search);
6177
+ if (params.status)
6178
+ query2.set("status", params.status);
6179
+ if (params.sort)
6180
+ query2.set("sort", params.sort);
6181
+ if (params.order)
6182
+ query2.set("order", params.order);
6061
6183
  const queryString = query2.toString() ? `?${query2.toString()}` : "";
6062
6184
  const data = await callDataAPI(`/laziness${queryString}`);
6063
- context.output.writeData(data);
6185
+ const summary = countingSummary(data);
6186
+ context.output.writeData(data, summary ? { summary } : undefined);
6064
6187
  break;
6065
6188
  }
6066
6189
  case "hallucinations": {
@@ -6073,13 +6196,18 @@ async function runCommand(command, positional, flags, positionals = positional ?
6073
6196
  query2.set("limit", params.limit.toString());
6074
6197
  if (params.offset !== undefined)
6075
6198
  query2.set("offset", params.offset.toString());
6076
- if (params.conversation_id)
6077
- query2.set("conversation_id", params.conversation_id);
6078
- if (params.kind)
6079
- query2.set("kind", params.kind);
6199
+ if (readsPerTrace("hallucinations", params, ["conversation_id", "kind"])) {
6200
+ setTraceFilters(query2, params, TRACE_GRAIN_FLAGS.hallucinations);
6201
+ } else {
6202
+ if (params.conversation_id)
6203
+ query2.set("conversation_id", params.conversation_id);
6204
+ if (params.kind)
6205
+ query2.set("kind", params.kind);
6206
+ }
6080
6207
  const queryString = query2.toString() ? `?${query2.toString()}` : "";
6081
6208
  const data = await callDataAPI(`/hallucinations${queryString}`);
6082
- context.output.writeData(data);
6209
+ const summary = countingSummary(data);
6210
+ context.output.writeData(data, summary ? { summary } : undefined);
6083
6211
  break;
6084
6212
  }
6085
6213
  case "step-scores": {
@@ -6268,7 +6396,7 @@ var commandRegistry = createCommandRegistry([
6268
6396
  resetApiRequestCountBeforeRun: true,
6269
6397
  telemetry: "result-and-error",
6270
6398
  handler: async (context) => {
6271
- const { runInit } = await import("./index-4w5szrnw.js");
6399
+ const { runInit } = await import("./index-y5jnz2t2.js");
6272
6400
  if (context.outputMode === "agent-stream") {
6273
6401
  context.output.writeEvent({
6274
6402
  event: "started",
@@ -6318,7 +6446,7 @@ var commandRegistry = createCommandRegistry([
6318
6446
  resetApiRequestCountBeforeRun: true,
6319
6447
  telemetry: "result-and-error",
6320
6448
  handler: async (context) => {
6321
- const { runProvision } = await import("./provision-8c4s6vgg.js");
6449
+ const { runProvision } = await import("./provision-ghca9d54.js");
6322
6450
  return runProvision(context, {
6323
6451
  resumeCommand: buildResumeCommand("provision", context.rawFlags)
6324
6452
  });
@@ -3,15 +3,15 @@ import {
3
3
  promptsDiscoveredCheck,
4
4
  runDoctorCommand,
5
5
  runStatusCommand
6
- } from "./cli-cr44672e.js";
7
- import"./cli-gjzr7jq5.js";
8
- import"./cli-npkb08xt.js";
6
+ } from "./cli-xtyszvq1.js";
7
+ import"./cli-sk1p71wr.js";
8
+ import"./cli-dmnayt2r.js";
9
9
  import"./cli-mm48br00.js";
10
10
  import"./cli-xq45etg1.js";
11
- import"./cli-4d92a450.js";
12
- import"./cli-cdx6yd7m.js";
13
- import"./cli-s72pph9c.js";
14
- import"./cli-wg6e2a1g.js";
11
+ import"./cli-b7nyw498.js";
12
+ import"./cli-xheg54qc.js";
13
+ import"./cli-3n040fp2.js";
14
+ import"./cli-rcjhfts4.js";
15
15
  import"./cli-k4tqwah4.js";
16
16
  import"./cli-9kfxkxmk.js";
17
17
  import"./cli-ns5fcnkz.js";
@@ -2,13 +2,13 @@ import {
2
2
  DEFAULT_POLL_INTERVAL_MS,
3
3
  DEFAULT_WAIT_TIMEOUT_MS,
4
4
  fetchLatestRun
5
- } from "./cli-nzx7rqjs.js";
5
+ } from "./cli-xk630wjq.js";
6
6
  import {
7
7
  assertFlags
8
- } from "./cli-cdx6yd7m.js";
8
+ } from "./cli-xheg54qc.js";
9
9
  import {
10
10
  callControlAPI
11
- } from "./cli-s72pph9c.js";
11
+ } from "./cli-3n040fp2.js";
12
12
  import {
13
13
  EXIT_DEGRADED,
14
14
  EXIT_ERROR,
@@ -17,7 +17,7 @@ import {
17
17
  resolveApiTenantId,
18
18
  shellArg,
19
19
  validateConfig
20
- } from "./cli-wg6e2a1g.js";
20
+ } from "./cli-rcjhfts4.js";
21
21
  import {
22
22
  CliInputError
23
23
  } from "./cli-k4tqwah4.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  buildSourceSnapshot
3
- } from "./cli-x605txan.js";
3
+ } from "./cli-skvvwp2q.js";
4
4
  import"./cli-xq45etg1.js";
5
5
  import"./cli-97fnztpy.js";
6
6
  import"./cli-cesds766.js";
7
7
  import"./cli-qpq84eee.js";
8
- import"./cli-4d92a450.js";
9
- import"./cli-cdx6yd7m.js";
10
- import"./cli-s72pph9c.js";
8
+ import"./cli-b7nyw498.js";
9
+ import"./cli-xheg54qc.js";
10
+ import"./cli-3n040fp2.js";
11
11
  import {
12
12
  recordApiRequest
13
- } from "./cli-wg6e2a1g.js";
13
+ } from "./cli-rcjhfts4.js";
14
14
  import"./cli-k4tqwah4.js";
15
15
  import"./cli-9kfxkxmk.js";
16
16
  import"./cli-ns5fcnkz.js";
@@ -40,17 +40,17 @@ import {
40
40
  writeHarnessAnalyzeResult,
41
41
  writeHarnessArtifacts,
42
42
  writeHumanProgress
43
- } from "./cli-x605txan.js";
43
+ } from "./cli-skvvwp2q.js";
44
44
  import"./cli-xq45etg1.js";
45
45
  import"./cli-97fnztpy.js";
46
46
  import {
47
47
  HARNESS_ANALYZE_CONCERNS
48
48
  } from "./cli-cesds766.js";
49
49
  import"./cli-qpq84eee.js";
50
- import"./cli-4d92a450.js";
51
- import"./cli-cdx6yd7m.js";
52
- import"./cli-s72pph9c.js";
53
- import"./cli-wg6e2a1g.js";
50
+ import"./cli-b7nyw498.js";
51
+ import"./cli-xheg54qc.js";
52
+ import"./cli-3n040fp2.js";
53
+ import"./cli-rcjhfts4.js";
54
54
  import"./cli-k4tqwah4.js";
55
55
  import"./cli-9kfxkxmk.js";
56
56
  import"./cli-ns5fcnkz.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  buildDoctorReport
3
- } from "./cli-cr44672e.js";
3
+ } from "./cli-xtyszvq1.js";
4
4
  import {
5
5
  selectTenantAndCreateKey
6
- } from "./cli-w3ckvma5.js";
7
- import"./cli-ef9eagsc.js";
6
+ } from "./cli-tdcx8yz9.js";
7
+ import"./cli-9g5kzsg6.js";
8
8
  import {
9
9
  ConnectCodeError,
10
10
  connectWithCode,
11
11
  loadAuthSession,
12
12
  loadToken,
13
13
  login
14
- } from "./cli-gjzr7jq5.js";
14
+ } from "./cli-sk1p71wr.js";
15
15
  import {
16
16
  bundledSkillsDir,
17
17
  installIntegrationSkill,
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  agentsMdProblem,
22
22
  runSkillSync
23
- } from "./cli-wh83c3ss.js";
23
+ } from "./cli-93926afn.js";
24
24
  import"./cli-qm5b1vck.js";
25
25
  import {
26
26
  detectAgents
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  initPrompts,
34
34
  runPromptSync
35
- } from "./cli-npkb08xt.js";
35
+ } from "./cli-dmnayt2r.js";
36
36
  import"./cli-mm48br00.js";
37
37
  import {
38
38
  codingAgentDisplayName,
@@ -46,7 +46,7 @@ import {
46
46
  runCodingAgent,
47
47
  runHarnessCommand,
48
48
  startRemoteAnalyze
49
- } from "./cli-x605txan.js";
49
+ } from "./cli-skvvwp2q.js";
50
50
  import {
51
51
  canonicalText,
52
52
  renderInitBanner,
@@ -62,16 +62,16 @@ import"./cli-cesds766.js";
62
62
  import"./cli-qpq84eee.js";
63
63
  import {
64
64
  createCommandContext
65
- } from "./cli-4d92a450.js";
66
- import"./cli-cdx6yd7m.js";
67
- import"./cli-s72pph9c.js";
65
+ } from "./cli-b7nyw498.js";
66
+ import"./cli-xheg54qc.js";
67
+ import"./cli-3n040fp2.js";
68
68
  import {
69
69
  VERSION,
70
70
  recordApiRequest,
71
71
  resolveIngestUrl,
72
72
  resolveModaBaseUrl,
73
73
  shellArg
74
- } from "./cli-wg6e2a1g.js";
74
+ } from "./cli-rcjhfts4.js";
75
75
  import {
76
76
  CliAuthError,
77
77
  CliInputError