@moda-ai/cli 1.55.35 → 1.55.37

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-g07tg64w.js → agent-4pyeecf7.js} +8 -8
  2. package/dist/{cli-dr6x0zv7.js → cli-4d92a450.js} +1 -1
  3. package/dist/{cli-n2hng3gv.js → cli-cdx6yd7m.js} +19 -2
  4. package/dist/{cli-5fstvkva.js → cli-cr44672e.js} +5 -5
  5. package/dist/{cli-97jew729.js → cli-ef9eagsc.js} +1 -1
  6. package/dist/{cli-9bgnvth2.js → cli-gjzr7jq5.js} +1 -1
  7. package/dist/{cli-6j8h2ave.js → cli-npkb08xt.js} +8 -8
  8. package/dist/{cli-fwpqghgc.js → cli-nqgyz74b.js} +112 -2
  9. package/dist/{cli-yz8xcpyk.js → cli-nzx7rqjs.js} +1 -1
  10. package/dist/{cli-e23g9ywa.js → cli-s72pph9c.js} +1 -1
  11. package/dist/{cli-9bgk5jeh.js → cli-w3ckvma5.js} +3 -3
  12. package/dist/{cli-99p2jh28.js → cli-wg6e2a1g.js} +17 -4
  13. package/dist/{cli-k007ztbs.js → cli-wh83c3ss.js} +4 -4
  14. package/dist/{cli-x9cwat4a.js → cli-x605txan.js} +5 -5
  15. package/dist/{cli-602yx84w.js → cli-xkcy9wns.js} +5 -5
  16. package/dist/cli.js +179 -27
  17. package/dist/{doctor-tvre7zvk.js → doctor-w8z3wj1e.js} +7 -7
  18. package/dist/{fix-w5z02wt4.js → fix-667fyx00.js} +4 -4
  19. package/dist/{harness-6vwehf47.js → harness-fb0083ap.js} +5 -5
  20. package/dist/{harness-github-actions-6gdrpn4m.js → harness-github-actions-7s41s1vg.js} +5 -5
  21. package/dist/{index-75vcntpe.js → index-4w5szrnw.js} +11 -11
  22. package/dist/{production-intelligence-7wb1djy2.js → production-intelligence-v2wq2aqv.js} +3 -3
  23. package/dist/{profile-commands-h8evz9x0.js → profile-commands-3hw4trwk.js} +3 -3
  24. package/dist/{prompt-attribution-t0eq8gn8.js → prompt-attribution-g7md8hzc.js} +5 -5
  25. package/dist/prompt-source-mcp.js +5 -5
  26. package/dist/{prompts-b8qx3mrv.js → prompts-90v9eg2k.js} +5 -5
  27. package/dist/{prompts-ab-t7xptf0c.js → prompts-ab-59r52mxw.js} +7 -7
  28. package/dist/{prompts-propose-8feadk2t.js → prompts-propose-cbenbk8w.js} +7 -7
  29. package/dist/{provision-y5bdbh4y.js → provision-8c4s6vgg.js} +5 -5
  30. package/dist/{registry-ctnn8e26.js → registry-qvjyvbk8.js} +3 -3
  31. package/dist/{skills-96z55tj4.js → skills-z7w5x7jj.js} +5 -5
  32. package/dist/{sync-drz7req6.js → sync-r32tgpar.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 -2
  36. package/skills/moda-cli/references/commands.md +2 -0
  37. package/skills/moda-cli/references/dashboard-parity.md +1 -0
  38. package/skills/moda-cli/references/detections.md +40 -0
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  buildDoctorReport
3
- } from "./cli-5fstvkva.js";
4
- import"./cli-9bgnvth2.js";
5
- import"./cli-6j8h2ave.js";
3
+ } from "./cli-cr44672e.js";
4
+ import"./cli-gjzr7jq5.js";
5
+ import"./cli-npkb08xt.js";
6
6
  import"./cli-mm48br00.js";
7
7
  import {
8
8
  readHarnessSyncState
@@ -15,15 +15,15 @@ import {
15
15
  readHarnessReport,
16
16
  validateHarnessReport
17
17
  } from "./cli-cesds766.js";
18
- import"./cli-dr6x0zv7.js";
19
- import"./cli-n2hng3gv.js";
20
- import"./cli-e23g9ywa.js";
18
+ import"./cli-4d92a450.js";
19
+ import"./cli-cdx6yd7m.js";
20
+ import"./cli-s72pph9c.js";
21
21
  import {
22
22
  resolveApiKey,
23
23
  resolveIngestUrl,
24
24
  resolveModaBaseUrl,
25
25
  resolveTenantId
26
- } from "./cli-99p2jh28.js";
26
+ } from "./cli-wg6e2a1g.js";
27
27
  import {
28
28
  CliInputError
29
29
  } from "./cli-k4tqwah4.js";
@@ -94,7 +94,7 @@ async function buildAgentContext(context) {
94
94
  const graph = readHarnessGraphIfPresent(context.cwd);
95
95
  const reportState = readHarnessReportState(context.cwd);
96
96
  const syncState = readHarnessSyncState(context.cwd);
97
- const harness = graph ? await import("./harness-6vwehf47.js") : undefined;
97
+ const harness = graph ? await import("./harness-fb0083ap.js") : undefined;
98
98
  const topFindings = doctor.checks.filter((check) => check.status === "fail" || check.status === "warning").slice(0, 12).map(checkToFinding);
99
99
  const evidenceRefs = [
100
100
  ...doctor.checks.map(checkToEvidenceRef),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCliOutput,
3
3
  outputModeFromFlags
4
- } from "./cli-99p2jh28.js";
4
+ } from "./cli-wg6e2a1g.js";
5
5
 
6
6
  // src/boolean-words.ts
7
7
  var BOOLEAN_TRUE_WORDS = new Set(["true", "yes", "1", "on"]);
@@ -2,7 +2,7 @@ import {
2
2
  ApiError,
3
3
  callControlAPI,
4
4
  callDataAPI
5
- } from "./cli-e23g9ywa.js";
5
+ } from "./cli-s72pph9c.js";
6
6
  import {
7
7
  continuationCommand,
8
8
  embeddedTenantIdFromApiKey,
@@ -11,7 +11,7 @@ import {
11
11
  resolveApiTenantId,
12
12
  setPlatformTenantOverride,
13
13
  shellArg
14
- } from "./cli-99p2jh28.js";
14
+ } from "./cli-wg6e2a1g.js";
15
15
  import {
16
16
  CliAccessError,
17
17
  CliInputError
@@ -319,6 +319,21 @@ var ToolFailureDetailSchema = z.object({
319
319
  compact: boolFlag().describe("Drop each example's embedded messages (same as --include-window=false)"),
320
320
  window: z.number().int().min(1).max(5).default(1).optional().describe("Messages on each side of the anchor")
321
321
  });
322
+ var TOOL_CATALOG_SORTS = ["calls", "failure_rate", "failures", "traces", "last_seen"];
323
+ var TOOL_EFFECT_DIRECTIONS = ["read", "write", "send", "spawn", "compute", "unknown"];
324
+ var ToolCatalogSchema = z.object({
325
+ days_back: daysBackFlag(7),
326
+ sort: z.enum(TOOL_CATALOG_SORTS).default("calls").optional().describe("Sort order, descending (failures = failed calls, traces = traces that called the tool)"),
327
+ search: z.string().min(1).max(200).optional().describe("Only tools whose name contains this text"),
328
+ direction: z.enum(TOOL_EFFECT_DIRECTIONS).optional().describe("Only tools with this effect direction"),
329
+ limit: z.number().int().min(1).max(200).default(25).optional().describe("Maximum tools to return"),
330
+ offset: z.number().int().min(0).max(1e4).default(0).optional().describe("Number of tools to skip")
331
+ });
332
+ var ToolCatalogDetailSchema = z.object({
333
+ tool_name: z.string().min(1).max(255).describe("Tool name (from moda tools list)"),
334
+ days_back: daysBackFlag(7),
335
+ full: boolFlag().describe("Every observed field and value, recent call and full input (agent output caps them)")
336
+ });
322
337
  var AuditSchema = z.object({
323
338
  id: z.string().min(1).describe("Trace ID or OTLP trace_id"),
324
339
  kind: z.enum(["auto", "trace", "conversation"]).default("auto").optional().describe("How to read the id (auto tries trace, then conversation)"),
@@ -568,6 +583,8 @@ var COMMAND_FLAG_SPECS = {
568
583
  frustrations: { schema: FrustrationsSchema },
569
584
  "tool-failures": { schema: ToolFailuresSchema },
570
585
  "tool-failure-detail": { schema: ToolFailureDetailSchema, positionals: [{ name: "tool_name", key: "tool_name", required: true }] },
586
+ "tool-catalog": { schema: ToolCatalogSchema },
587
+ "tool-catalog-detail": { schema: ToolCatalogDetailSchema, positionals: [{ name: "tool_name", key: "tool_name", required: true }] },
571
588
  problems: {
572
589
  schema: ProblemsSchema,
573
590
  subcommands: { remainder: { schema: ProblemsRemainderSchema } }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isAuthSessionValid,
3
3
  loadAuthSession
4
- } from "./cli-9bgnvth2.js";
4
+ } from "./cli-gjzr7jq5.js";
5
5
  import {
6
6
  inspectPromptManifest
7
- } from "./cli-6j8h2ave.js";
7
+ } from "./cli-npkb08xt.js";
8
8
  import {
9
9
  readHarnessSyncState,
10
10
  renderDoctorHuman,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./cli-xq45etg1.js";
13
13
  import {
14
14
  callDataAPI
15
- } from "./cli-e23g9ywa.js";
15
+ } from "./cli-s72pph9c.js";
16
16
  import {
17
17
  ensureSecretFilePermissions,
18
18
  getActiveProfile,
@@ -26,7 +26,7 @@ import {
26
26
  resolveSecretReference,
27
27
  resolveTenantId,
28
28
  secretFilePathFromRef
29
- } from "./cli-99p2jh28.js";
29
+ } from "./cli-wg6e2a1g.js";
30
30
  import {
31
31
  __require
32
32
  } from "./cli-0v6na3yp.js";
@@ -376,7 +376,7 @@ async function harnessCurrentCheck(cwd, manifestPath, manifestExists, tenantId)
376
376
  };
377
377
  }
378
378
  try {
379
- const { scanHarness } = await import("./harness-6vwehf47.js");
379
+ const { scanHarness } = await import("./harness-fb0083ap.js");
380
380
  const current = scanHarness({
381
381
  rootDir: cwd,
382
382
  scannerVersion: "doctor",
@@ -5,7 +5,7 @@ import {
5
5
  resolveApiKey,
6
6
  resolveApiKeyFromActiveProfile,
7
7
  resolveModaBaseUrl
8
- } from "./cli-99p2jh28.js";
8
+ } from "./cli-wg6e2a1g.js";
9
9
 
10
10
  // src/api-key-auth.ts
11
11
  var PROBE_TIMEOUT_MS = 1e4;
@@ -6,7 +6,7 @@ import {
6
6
  saveProfileConfig,
7
7
  secretFilePathFromRef,
8
8
  writeSecretJsonFile
9
- } from "./cli-99p2jh28.js";
9
+ } from "./cli-wg6e2a1g.js";
10
10
  import {
11
11
  CliAuthError,
12
12
  CliInputError
@@ -4,14 +4,14 @@ import {
4
4
  } from "./cli-mm48br00.js";
5
5
  import {
6
6
  createCommandContext
7
- } from "./cli-dr6x0zv7.js";
7
+ } from "./cli-4d92a450.js";
8
8
  import {
9
9
  assertFlags,
10
10
  assertPositionals
11
- } from "./cli-n2hng3gv.js";
11
+ } from "./cli-cdx6yd7m.js";
12
12
  import {
13
13
  callControlAPI
14
- } from "./cli-e23g9ywa.js";
14
+ } from "./cli-s72pph9c.js";
15
15
  import {
16
16
  CliInputError
17
17
  } from "./cli-k4tqwah4.js";
@@ -5725,9 +5725,9 @@ async function runPromptsCommand(input, legacyFlags, legacyProfileOptions) {
5725
5725
  await promotePrompt(positionals, flags, profileOptions, context);
5726
5726
  break;
5727
5727
  case "ab":
5728
- return (await import("./prompts-ab-t7xptf0c.js")).runPromptAb(flags, profileOptions, context);
5728
+ return (await import("./prompts-ab-59r52mxw.js")).runPromptAb(flags, profileOptions, context);
5729
5729
  case "propose":
5730
- await (await import("./prompts-propose-8feadk2t.js")).runPromptPropose(positionals, flags, profileOptions, context);
5730
+ await (await import("./prompts-propose-cbenbk8w.js")).runPromptPropose(positionals, flags, profileOptions, context);
5731
5731
  break;
5732
5732
  case "list":
5733
5733
  case "show":
@@ -5830,7 +5830,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
5830
5830
  const analyzedDefinitions = new Map;
5831
5831
  if (flags["no-analyze"] !== "true") {
5832
5832
  options.onProgress?.("Analyzing prompt sources before sync.");
5833
- const { analyzeHarnessPrompts } = await import("./harness-6vwehf47.js");
5833
+ const { analyzeHarnessPrompts } = await import("./harness-fb0083ap.js");
5834
5834
  const result = await analyzeHarnessPrompts({
5835
5835
  rootDir: process.cwd(),
5836
5836
  existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
@@ -5858,7 +5858,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
5858
5858
  const mergedSources = mergePromptSources(manifest.sources, extraSources);
5859
5859
  const manifestUpdate = stableJson(mergedSources) === stableJson(mergePromptSources(manifest.sources, [])) ? undefined : $stringify({ version: 2, prompt_paths: manifest.promptPaths, sources: mergedSources });
5860
5860
  const prompts = await discoverPrompts(extraSources);
5861
- const { checkPromptAttribution } = await import("./prompt-attribution-t0eq8gn8.js");
5861
+ const { checkPromptAttribution } = await import("./prompt-attribution-g7md8hzc.js");
5862
5862
  const attribution = checkPromptAttribution(process.cwd(), prompts.map((prompt) => prompt.key));
5863
5863
  const brokenAttribution = attribution.references.filter((reference) => reference.status === "missing");
5864
5864
  if (brokenAttribution.length) {
@@ -6164,7 +6164,7 @@ async function migratePromptManifest(options = {}) {
6164
6164
  let addedSources = [];
6165
6165
  let pendingSources = [];
6166
6166
  if (options.discover) {
6167
- const { analyzeHarnessPrompts } = await import("./harness-6vwehf47.js");
6167
+ const { analyzeHarnessPrompts } = await import("./harness-fb0083ap.js");
6168
6168
  const result = await analyzeHarnessPrompts({
6169
6169
  rootDir: root,
6170
6170
  existing: manifest.sources,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shellArg
3
- } from "./cli-99p2jh28.js";
3
+ } from "./cli-wg6e2a1g.js";
4
4
  import {
5
5
  CliInputError
6
6
  } from "./cli-k4tqwah4.js";
@@ -422,6 +422,116 @@ function compactProblemDossier(response, problemId) {
422
422
  }
423
423
  return { data, nextCommands };
424
424
  }
425
+ function toolFailureExamplesCommand(toolName, daysBack, subtype) {
426
+ return `moda detections tools ${shellArg(toolName)}${subtype ? ` --subtype=${shellArg(subtype)}` : ""} --days-back=${daysBack}`;
427
+ }
428
+ function toolCatalogGetCommand(toolName, daysBack) {
429
+ return `moda tools get ${shellArg(toolName)} --days-back=${daysBack}`;
430
+ }
431
+ var TOOL_CATALOG_AGENT_LIMITS = {
432
+ valuesPerField: 3,
433
+ valueChars: 80,
434
+ fields: 20,
435
+ inputChars: 200,
436
+ examplesPerClass: 2,
437
+ recentCalls: 5
438
+ };
439
+ function traceGetCommand(conversationId, msgIndex) {
440
+ return `moda traces get ${shellArg(contextTarget(conversationId))} --msg-index=${msgIndex} --window=${TOOL_FAILURE_CONTEXT_RADIUS}`;
441
+ }
442
+ function shapeToolCatalogDetail(response, opts) {
443
+ const toolName = asString(response.tool_name) ?? "";
444
+ let shortened = 0;
445
+ const cut = (value, max) => {
446
+ if (!opts.shorten || typeof value !== "string" || value.length <= max)
447
+ return value;
448
+ shortened += 1;
449
+ return `${value.slice(0, max)}…`;
450
+ };
451
+ const failureBlock = asRecord(response.failure_categories);
452
+ const categories = Array.isArray(failureBlock?.categories) ? failureBlock.categories.map((item) => {
453
+ const row = asRecord(item);
454
+ if (!row)
455
+ return item;
456
+ const latest = asRecord(row.latest_failure);
457
+ const conversationId = asString(latest?.conversation_id);
458
+ const msgIndex = asNumber(latest?.msg_index);
459
+ const category = asString(row.category);
460
+ return {
461
+ ...row,
462
+ sample_error: cut(row.sample_error, TOOL_CATALOG_AGENT_LIMITS.inputChars),
463
+ ...conversationId && msgIndex !== null ? { context_command: traceGetCommand(conversationId, msgIndex) } : {},
464
+ ...category ? { examples_command: toolFailureExamplesCommand(toolName, opts.daysBack, category) } : {}
465
+ };
466
+ }) : undefined;
467
+ const definition = asRecord(response.definition);
468
+ const allObserved = Array.isArray(definition?.observed_fields) ? definition.observed_fields : undefined;
469
+ const keptObserved = allObserved && opts.shorten && allObserved.length > TOOL_CATALOG_AGENT_LIMITS.fields ? allObserved.slice(0, TOOL_CATALOG_AGENT_LIMITS.fields) : allObserved;
470
+ if (keptObserved && allObserved && keptObserved.length < allObserved.length)
471
+ shortened += 1;
472
+ const observed = keptObserved ? keptObserved.map((item) => {
473
+ const field = asRecord(item);
474
+ if (!field || !opts.shorten || !Array.isArray(field.common_values))
475
+ return item;
476
+ const values = field.common_values;
477
+ const over = values.length > TOOL_CATALOG_AGENT_LIMITS.valuesPerField;
478
+ if (over)
479
+ shortened += 1;
480
+ return {
481
+ ...field,
482
+ common_values: values.slice(0, TOOL_CATALOG_AGENT_LIMITS.valuesPerField).map((entry) => {
483
+ const value = asRecord(entry);
484
+ return value ? { ...value, value: cut(value.value, TOOL_CATALOG_AGENT_LIMITS.valueChars) } : entry;
485
+ }),
486
+ ...over ? { common_values_total: values.length } : {}
487
+ };
488
+ }) : undefined;
489
+ const toolClasses = Array.isArray(response.tool_classes) ? response.tool_classes.map((item) => {
490
+ const row = asRecord(item);
491
+ if (!row || !opts.shorten)
492
+ return item;
493
+ const examples = Array.isArray(row.example_inputs) ? row.example_inputs : [];
494
+ if (examples.length > TOOL_CATALOG_AGENT_LIMITS.examplesPerClass)
495
+ shortened += 1;
496
+ return {
497
+ ...row,
498
+ sample_input: cut(row.sample_input, TOOL_CATALOG_AGENT_LIMITS.inputChars),
499
+ example_inputs: examples.slice(0, TOOL_CATALOG_AGENT_LIMITS.examplesPerClass).map((example) => cut(example, TOOL_CATALOG_AGENT_LIMITS.inputChars))
500
+ };
501
+ }) : undefined;
502
+ const allRecent = Array.isArray(response.recent_calls) ? response.recent_calls : undefined;
503
+ if (allRecent && opts.shorten && allRecent.length > TOOL_CATALOG_AGENT_LIMITS.recentCalls)
504
+ shortened += 1;
505
+ const recent = allRecent ? (opts.shorten ? allRecent.slice(0, TOOL_CATALOG_AGENT_LIMITS.recentCalls) : allRecent).map((item) => {
506
+ const row = asRecord(item);
507
+ if (!row)
508
+ return item;
509
+ const conversationId = asString(row.conversation_id);
510
+ const msgIndex = asNumber(row.msg_index);
511
+ return {
512
+ ...row,
513
+ inputs: cut(row.inputs, TOOL_CATALOG_AGENT_LIMITS.inputChars),
514
+ ...conversationId && msgIndex !== null ? { context_command: traceGetCommand(conversationId, msgIndex) } : {}
515
+ };
516
+ }) : undefined;
517
+ return {
518
+ data: {
519
+ ...response,
520
+ ...definition ? {
521
+ definition: {
522
+ ...definition,
523
+ ...observed ? { observed_fields: observed } : {},
524
+ ...allObserved && observed && observed.length < allObserved.length ? { observed_fields_total: allObserved.length } : {}
525
+ }
526
+ } : {},
527
+ ...toolClasses ? { tool_classes: toolClasses } : {},
528
+ ...failureBlock ? { failure_categories: { ...failureBlock, ...categories ? { categories } : {} } } : {},
529
+ ...recent ? { recent_calls: recent } : {},
530
+ ...allRecent && recent && recent.length < allRecent.length ? { recent_calls_total: allRecent.length } : {}
531
+ },
532
+ shortened
533
+ };
534
+ }
425
535
 
426
536
  // src/intelligence-schema.ts
427
537
  var INTELLIGENCE_SCHEMA_VERSION = "moda.intelligence.v1";
@@ -566,4 +676,4 @@ var MODA_INTELLIGENCE_V1_JSON_SCHEMA = {
566
676
  }
567
677
  };
568
678
 
569
- export { BATCH_MAX_TARGETS, BATCH_CONCURRENCY, parseBatchTarget, collectBatchTargets, mapWithConcurrency, contextTarget, asRecord, asString, asNumber, frustrationAnchorIndex, frustrationsFromEmotions, withFrustrationAnchors, trimToolFailureConversations, withToolFailureAnchors, embeddedWindowSize, withoutDetectionWindows, compactProblemDossier, INTELLIGENCE_SCHEMA_VERSION, MODA_INTELLIGENCE_V1_JSON_SCHEMA };
679
+ export { BATCH_MAX_TARGETS, BATCH_CONCURRENCY, parseBatchTarget, collectBatchTargets, mapWithConcurrency, contextTarget, asRecord, asString, asNumber, frustrationAnchorIndex, frustrationsFromEmotions, withFrustrationAnchors, trimToolFailureConversations, withToolFailureAnchors, embeddedWindowSize, withoutDetectionWindows, compactProblemDossier, toolFailureExamplesCommand, toolCatalogGetCommand, shapeToolCatalogDetail, INTELLIGENCE_SCHEMA_VERSION, MODA_INTELLIGENCE_V1_JSON_SCHEMA };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  callControlAPI
3
- } from "./cli-e23g9ywa.js";
3
+ } from "./cli-s72pph9c.js";
4
4
 
5
5
  // src/replay-runs.ts
6
6
  var DEFAULT_POLL_INTERVAL_MS = 15000;
@@ -3,7 +3,7 @@ import {
3
3
  recordApiRequest,
4
4
  resolveApiKey,
5
5
  resolveModaBaseUrl
6
- } from "./cli-99p2jh28.js";
6
+ } from "./cli-wg6e2a1g.js";
7
7
 
8
8
  // src/api-client.ts
9
9
  var REQUEST_TIMEOUT_MS = 30000;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchApiKeyProbe
3
- } from "./cli-97jew729.js";
3
+ } from "./cli-ef9eagsc.js";
4
4
  import {
5
5
  authFetch,
6
6
  getCachedLoginContext
7
- } from "./cli-9bgnvth2.js";
7
+ } from "./cli-gjzr7jq5.js";
8
8
  import {
9
9
  embeddedTenantIdFromApiKey,
10
10
  getModaDir,
@@ -15,7 +15,7 @@ import {
15
15
  resolveTenantIdFromActiveProfile,
16
16
  saveCliConfig,
17
17
  writeSecretJsonFile
18
- } from "./cli-99p2jh28.js";
18
+ } from "./cli-wg6e2a1g.js";
19
19
  import {
20
20
  CliAccessError,
21
21
  CliInputError,
@@ -1277,7 +1277,7 @@ function createAgentEnvelope(options) {
1277
1277
  findings: text.findings,
1278
1278
  evidence_refs: text.evidence_refs,
1279
1279
  recommended_actions: text.recommended_actions,
1280
- next_commands: [...text.next_commands, ...canonicalSuggestions(bounded.nextCommands ?? [])],
1280
+ next_commands: [...withoutSupersededPaging(text.next_commands, bounded.supersededPaging), ...canonicalSuggestions(bounded.nextCommands ?? [])],
1281
1281
  artifacts: [
1282
1282
  ...options.artifacts ?? [],
1283
1283
  ...bounded.fullOutputPath ? [{ kind: "full_output", path: bounded.fullOutputPath, description: "Complete command output (the same JSON --json prints); data in this envelope was bounded." }] : [],
@@ -1921,6 +1921,7 @@ function continuationCommand(invocation, overrides) {
1921
1921
  }
1922
1922
  var PAGED_LIST_BY_COMMAND = {
1923
1923
  "tool-failure-detail": "examples",
1924
+ "tool-catalog": "tools",
1924
1925
  emotions: "detections",
1925
1926
  frustrations: "frustrations",
1926
1927
  laziness: "conversations",
@@ -1990,7 +1991,8 @@ function rewritePagination(list, isTopLevel, invocation) {
1990
1991
  purpose: `Fetch the ${omitted} row(s) of this page that were left out to fit the agent byte limit.`,
1991
1992
  mutability: "read",
1992
1993
  requires_approval: false
1993
- }
1994
+ },
1995
+ supersedes: "offset"
1994
1996
  };
1995
1997
  }
1996
1998
  if (hadCursor || "next_cursor" in pagination || "cursor" in invocation.flags) {
@@ -2002,7 +2004,8 @@ function rewritePagination(list, isTopLevel, invocation) {
2002
2004
  purpose: `Re-read this page at --limit=${kept} (what fits) to get a next_cursor that starts at the first omitted row.`,
2003
2005
  mutability: "read",
2004
2006
  requires_approval: false
2005
- }
2007
+ },
2008
+ supersedes: "cursor"
2006
2009
  };
2007
2010
  }
2008
2011
  return { note: `${where} holds ${kept} of ${originalLength} row(s)` };
@@ -2080,6 +2083,7 @@ function boundForAgent(data, maxBytes = agentMaxOutputBytes(), options = {}) {
2080
2083
  const root = asRecord(bounded);
2081
2084
  const notes = [];
2082
2085
  const nextCommands = [];
2086
+ const supersededPaging = new Set;
2083
2087
  for (const list of droppedLists.values()) {
2084
2088
  const rewritten = rewritePagination(list, root !== undefined && list.parent === root, options.invocation);
2085
2089
  if (!rewritten)
@@ -2087,6 +2091,8 @@ function boundForAgent(data, maxBytes = agentMaxOutputBytes(), options = {}) {
2087
2091
  notes.push(rewritten.note);
2088
2092
  if (rewritten.nextCommand)
2089
2093
  nextCommands.push(rewritten.nextCommand);
2094
+ if (rewritten.supersedes)
2095
+ supersededPaging.add(rewritten.supersedes);
2090
2096
  }
2091
2097
  const omittedTotal = dropped.reduce((sum, [, count]) => sum + count, 0);
2092
2098
  const actions = [
@@ -2112,9 +2118,16 @@ function boundForAgent(data, maxBytes = agentMaxOutputBytes(), options = {}) {
2112
2118
  }
2113
2119
  },
2114
2120
  fullOutputPath,
2115
- ...nextCommands.length > 0 ? { nextCommands } : {}
2121
+ ...nextCommands.length > 0 ? { nextCommands } : {},
2122
+ ...supersededPaging.size > 0 ? { supersededPaging: [...supersededPaging] } : {}
2116
2123
  };
2117
2124
  }
2125
+ function withoutSupersededPaging(commands, superseded) {
2126
+ if (!superseded || superseded.length === 0)
2127
+ return commands;
2128
+ const flags = superseded.map((flag) => new RegExp(`(^|\\s)--${flag}=`));
2129
+ return commands.filter((next) => !flags.some((flag) => flag.test(next.command)));
2130
+ }
2118
2131
  function asRecord(value) {
2119
2132
  return value && typeof value === "object" && !Array.isArray(value) ? value : undefined;
2120
2133
  }
@@ -13,22 +13,22 @@ import {
13
13
  } from "./cli-hcwdz9sd.js";
14
14
  import {
15
15
  createCommandContext
16
- } from "./cli-dr6x0zv7.js";
16
+ } from "./cli-4d92a450.js";
17
17
  import {
18
18
  assertFlags,
19
19
  assertPositionals,
20
20
  writeDryRun
21
- } from "./cli-n2hng3gv.js";
21
+ } from "./cli-cdx6yd7m.js";
22
22
  import {
23
23
  callControlAPI
24
- } from "./cli-e23g9ywa.js";
24
+ } from "./cli-s72pph9c.js";
25
25
  import {
26
26
  recordApiRequest,
27
27
  resolveApiKey,
28
28
  resolveIngestUrl,
29
29
  resolveTenantId,
30
30
  shellArg
31
- } from "./cli-99p2jh28.js";
31
+ } from "./cli-wg6e2a1g.js";
32
32
  import {
33
33
  CliInputError
34
34
  } from "./cli-k4tqwah4.js";
@@ -44,16 +44,16 @@ import {
44
44
  import {
45
45
  createCommandContext,
46
46
  stringOption
47
- } from "./cli-dr6x0zv7.js";
47
+ } from "./cli-4d92a450.js";
48
48
  import {
49
49
  assertFlags,
50
50
  assertPositionals,
51
51
  requireTenant
52
- } from "./cli-n2hng3gv.js";
52
+ } from "./cli-cdx6yd7m.js";
53
53
  import {
54
54
  ApiError,
55
55
  callControlAPI
56
- } from "./cli-e23g9ywa.js";
56
+ } from "./cli-s72pph9c.js";
57
57
  import {
58
58
  embeddedTenantIdFromApiKey,
59
59
  getActiveProfile,
@@ -63,7 +63,7 @@ import {
63
63
  resolveModaBaseUrl,
64
64
  resolveTenantId,
65
65
  shellArg
66
- } from "./cli-99p2jh28.js";
66
+ } from "./cli-wg6e2a1g.js";
67
67
  import {
68
68
  CliInputError,
69
69
  CliInputRequiredError
@@ -14048,7 +14048,7 @@ async function runHarnessCommand(context) {
14048
14048
  throw new CliInputError("Focused remote prompt analysis is not supported yet.", "Use local --analyst=claude|codex|cursor|local-scan, or drop --concern for a full remote report.");
14049
14049
  }
14050
14050
  if (context.flags["github-actions"] === "true") {
14051
- const { runGithubActionsAnalyze } = await import("./harness-github-actions-6gdrpn4m.js");
14051
+ const { runGithubActionsAnalyze } = await import("./harness-github-actions-7s41s1vg.js");
14052
14052
  const result = await runGithubActionsAnalyze(rootDir, {
14053
14053
  writeReport: (report2) => {
14054
14054
  const normalized = normalizeHarnessReport(report2);
@@ -4,19 +4,19 @@ import {
4
4
  parsePromptFileForAb,
5
5
  readPromptLock,
6
6
  runPromptSync
7
- } from "./cli-6j8h2ave.js";
7
+ } from "./cli-npkb08xt.js";
8
8
  import {
9
9
  DEFAULT_POLL_INTERVAL_MS,
10
10
  DEFAULT_WAIT_TIMEOUT_MS,
11
11
  fetchLatestRun
12
- } from "./cli-yz8xcpyk.js";
12
+ } from "./cli-nzx7rqjs.js";
13
13
  import {
14
14
  UUID_RE
15
- } from "./cli-n2hng3gv.js";
15
+ } from "./cli-cdx6yd7m.js";
16
16
  import {
17
17
  callControlAPI,
18
18
  callDataAPI
19
- } from "./cli-e23g9ywa.js";
19
+ } from "./cli-s72pph9c.js";
20
20
  import {
21
21
  EXIT_ERROR,
22
22
  EXIT_OK,
@@ -24,7 +24,7 @@ import {
24
24
  setPlatformTenantOverride,
25
25
  shellArg,
26
26
  validateConfig
27
- } from "./cli-99p2jh28.js";
27
+ } from "./cli-wg6e2a1g.js";
28
28
  import {
29
29
  CliInputError
30
30
  } from "./cli-k4tqwah4.js";