@moda-ai/cli 1.55.26 → 1.55.28

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 (44) hide show
  1. package/dist/{agent-nqmha8ck.js → agent-0w9rtdsw.js} +22 -16
  2. package/dist/cli-3n0gz4d0.js +17971 -0
  3. package/dist/{cli-b4740tnv.js → cli-3retgh64.js} +85 -1165
  4. package/dist/{cli-1mbb0ct0.js → cli-97jew729.js} +1 -1
  5. package/dist/{cli-sqsjd08w.js → cli-99p2jh28.js} +105 -893
  6. package/dist/{cli-k6q8dbpk.js → cli-9bgk5jeh.js} +8 -6
  7. package/dist/{cli-q6f6vrrr.js → cli-9bgnvth2.js} +5 -3
  8. package/dist/cli-9kfxkxmk.js +6994 -0
  9. package/dist/cli-cesds766.js +1516 -0
  10. package/dist/{cli-cdrvjva5.js → cli-dr6x0zv7.js} +28 -6
  11. package/dist/{cli-jtyvbd8d.js → cli-e23g9ywa.js} +1 -1
  12. package/dist/cli-fwpqghgc.js +569 -0
  13. package/dist/cli-k4tqwah4.js +89 -0
  14. package/dist/{cli-8tfk8qeb.js → cli-mg5zv4s6.js} +18 -15
  15. package/dist/{cli-jgfm7w1r.js → cli-n2hng3gv.js} +9 -6
  16. package/dist/cli-ns5fcnkz.js +341 -0
  17. package/dist/{cli-5g1tv80h.js → cli-ny48a8de.js} +12 -9
  18. package/dist/{cli-d577kq6h.js → cli-qpq84eee.js} +5220 -32715
  19. package/dist/cli-xq45etg1.js +1098 -0
  20. package/dist/cli-yf39avhh.js +754 -0
  21. package/dist/cli-yz8xcpyk.js +12 -0
  22. package/dist/cli.js +355 -283
  23. package/dist/doctor-k3ta6h2y.js +24 -0
  24. package/dist/{fix-crkwdkt4.js → fix-w5z02wt4.js} +47 -50
  25. package/dist/{harness-x3e7d68b.js → harness-7azmzytc.js} +15 -7
  26. package/dist/{harness-github-actions-fjhvhgpj.js → harness-github-actions-bv2qrnqb.js} +11 -5
  27. package/dist/harness-report-rd9c4e9v.js +54 -0
  28. package/dist/{index-2kf3fnnb.js → index-d1z50dsq.js} +45 -36
  29. package/dist/{production-intelligence-7n83c701.js → production-intelligence-wvsgjxth.js} +21 -18
  30. package/dist/{profile-commands-ct2t0bfr.js → profile-commands-h8evz9x0.js} +9 -5
  31. package/dist/prompt-attribution-1nytc9wj.js +148 -0
  32. package/dist/prompt-source-mcp.js +14 -7
  33. package/dist/prompt-sources-07tczyqa.js +19 -0
  34. package/dist/{prompts-92aqqb2k.js → prompts-6y9wfq5z.js} +8 -7
  35. package/dist/prompts-ab-ezrd63sk.js +70 -0
  36. package/dist/prompts-propose-2k3enm2q.js +255 -0
  37. package/dist/{provision-gn8raqpt.js → provision-y5bdbh4y.js} +9 -6
  38. package/dist/{registry-ex162j5y.js → registry-96aze5wp.js} +7 -4
  39. package/dist/{skills-2mbsj9bt.js → skills-j8865009.js} +7 -5
  40. package/dist/{sync-kghmmmk5.js → sync-ew7yvy0e.js} +16 -10
  41. package/package.json +1 -1
  42. package/skills/integration/index.json +2 -2
  43. package/dist/cli-bb7133m7.js +0 -144
  44. package/dist/doctor-w913fj4g.js +0 -22
@@ -0,0 +1,24 @@
1
+ import {
2
+ buildDoctorReport,
3
+ promptsDiscoveredCheck,
4
+ runDoctorCommand,
5
+ runStatusCommand
6
+ } from "./cli-ny48a8de.js";
7
+ import"./cli-9bgnvth2.js";
8
+ import"./cli-3retgh64.js";
9
+ import"./cli-mm48br00.js";
10
+ import"./cli-xq45etg1.js";
11
+ import"./cli-dr6x0zv7.js";
12
+ import"./cli-n2hng3gv.js";
13
+ import"./cli-e23g9ywa.js";
14
+ import"./cli-99p2jh28.js";
15
+ import"./cli-k4tqwah4.js";
16
+ import"./cli-9kfxkxmk.js";
17
+ import"./cli-ns5fcnkz.js";
18
+ import"./cli-0v6na3yp.js";
19
+ export {
20
+ runStatusCommand,
21
+ runDoctorCommand,
22
+ promptsDiscoveredCheck,
23
+ buildDoctorReport
24
+ };
@@ -2,26 +2,26 @@ import {
2
2
  DEFAULT_POLL_INTERVAL_MS,
3
3
  DEFAULT_WAIT_TIMEOUT_MS,
4
4
  fetchLatestRun
5
- } from "./cli-b4740tnv.js";
6
- import"./cli-mm48br00.js";
7
- import"./cli-d577kq6h.js";
8
- import"./cli-97fnztpy.js";
9
- import"./cli-cdrvjva5.js";
5
+ } from "./cli-yz8xcpyk.js";
10
6
  import {
11
7
  assertFlags
12
- } from "./cli-jgfm7w1r.js";
8
+ } from "./cli-n2hng3gv.js";
13
9
  import {
14
10
  callControlAPI
15
- } from "./cli-jtyvbd8d.js";
11
+ } from "./cli-e23g9ywa.js";
16
12
  import {
17
- CliInputError,
18
13
  EXIT_DEGRADED,
19
14
  EXIT_ERROR,
20
15
  EXIT_OK,
21
16
  getModaPaths,
22
17
  resolveApiTenantId,
18
+ shellArg,
23
19
  validateConfig
24
- } from "./cli-sqsjd08w.js";
20
+ } from "./cli-99p2jh28.js";
21
+ import {
22
+ CliInputError
23
+ } from "./cli-k4tqwah4.js";
24
+ import"./cli-ns5fcnkz.js";
25
25
  import"./cli-0v6na3yp.js";
26
26
 
27
27
  // src/fix.ts
@@ -154,7 +154,7 @@ async function runFixesCommand(context) {
154
154
  confidence: "high"
155
155
  },
156
156
  nextCommands: fixes.slice(0, 1).map((fix) => ({
157
- command: `moda fix ${fix.id}`,
157
+ command: `moda fix ${shellArg(fix.id)}`,
158
158
  purpose: "Open the top-ranked fix (status, gate result, next actions).",
159
159
  mutability: "read",
160
160
  requires_approval: false
@@ -528,13 +528,13 @@ async function runFixStart(context, profileOptions, tenantId) {
528
528
  },
529
529
  nextCommands: [
530
530
  {
531
- command: `moda fix start ${problemId} --wait`,
531
+ command: `moda fix start ${shellArg(problemId)} --wait`,
532
532
  purpose: "Drive the pipeline (scope → propose → gate) to a resting status.",
533
533
  mutability: "write",
534
534
  requires_approval: false
535
535
  },
536
536
  {
537
- command: `moda fix ${created.id}`,
537
+ command: `moda fix ${shellArg(created.id)}`,
538
538
  purpose: "Inspect the fix status and gate result.",
539
539
  mutability: "read",
540
540
  requires_approval: false
@@ -598,12 +598,12 @@ async function runFixVerify(context, profileOptions, tenantId) {
598
598
  if (noWait) {
599
599
  context.output.writeData({ fixId, gateRunId: enqueue.gateRunId, status: "GATING" }, {
600
600
  summary: {
601
- text: `Gate + control runs enqueued (gate run ${enqueue.gateRunId}). Resume with \`moda fix ${fixId} --wait\`.`,
601
+ text: `Gate + control runs enqueued (gate run ${enqueue.gateRunId}). Resume with \`moda fix ${shellArg(fixId)} --wait\`.`,
602
602
  confidence: "high"
603
603
  },
604
604
  nextCommands: [
605
605
  {
606
- command: `moda fix ${fixId} --wait`,
606
+ command: `moda fix ${shellArg(fixId)} --wait`,
607
607
  purpose: "Drive the advance-on-poll gate to a verdict.",
608
608
  mutability: "write",
609
609
  requires_approval: false
@@ -700,14 +700,14 @@ async function runFixCheckout(context, profileOptions, tenantId) {
700
700
  }
701
701
  const fix = await getFix(tenantId, fixId, profileOptions);
702
702
  if (isArtifactFix(fix)) {
703
- throw new CliInputError(`Fix MODA-FIX-${fix.shortRef} is a ${fix.fixType} fix — its candidate is applied in your own stack, not checked out. Run \`moda fix ${fixId} --packet\` for the candidate (written as local artifacts), apply it, then confirm with \`moda fix mark-applied ${fixId}\`.`);
703
+ throw new CliInputError(`Fix MODA-FIX-${fix.shortRef} is a ${fix.fixType} fix — its candidate is applied in your own stack, not checked out. Run \`moda fix ${shellArg(fixId)} --packet\` for the candidate (written as local artifacts), apply it, then confirm with \`moda fix mark-applied ${shellArg(fixId)}\`.`);
704
704
  }
705
705
  if (!fix.targetSourcePath) {
706
- throw new CliInputError(`Fix MODA-FIX-${fix.shortRef} has no target source path — ${fix.fixType} fixes are packet-only. Run \`moda fix ${fixId} --packet\` for the diagnosis packet.`);
706
+ throw new CliInputError(`Fix MODA-FIX-${fix.shortRef} has no target source path — ${fix.fixType} fixes are packet-only. Run \`moda fix ${shellArg(fixId)} --packet\` for the diagnosis packet.`);
707
707
  }
708
708
  const candidateVersionId = fix.candidateRef?.promptVersionId ?? "";
709
709
  if (!candidateVersionId) {
710
- throw new CliInputError(`Fix MODA-FIX-${fix.shortRef} has no registered candidate version yet (status ${fix.status}). Run \`moda fix start ${fix.problemId} --wait\` to propose one, or edit the target locally and gate it with \`moda fix verify ${fixId} --prompt-file=<path>\`.`);
710
+ throw new CliInputError(`Fix MODA-FIX-${fix.shortRef} has no registered candidate version yet (status ${fix.status}). Run \`moda fix start ${shellArg(fix.problemId)} --wait\` to propose one, or edit the target locally and gate it with \`moda fix verify ${shellArg(fixId)} --prompt-file=<path>\`.`);
711
711
  }
712
712
  if (!fix.promptId) {
713
713
  throw new CliInputError(`Fix MODA-FIX-${fix.shortRef} has no routed prompt — the candidate content cannot be resolved.`);
@@ -729,8 +729,8 @@ async function runFixCheckout(context, profileOptions, tenantId) {
729
729
  "",
730
730
  "Next steps (the CLI never runs git — branching and committing are yours):",
731
731
  ` 1. git checkout -b ${branch}`,
732
- ` 2. Review the diff. Re-gate any edits: moda fix verify ${fix.id} --prompt-file=${relPath}`,
733
- ` 3. Hand back: moda fix submit ${fix.id} --pr (or --local-ref=${branch})`,
732
+ ` 2. Review the diff. Re-gate any edits: moda fix verify ${shellArg(fix.id)} --prompt-file=${shellArg(relPath)}`,
733
+ ` 3. Hand back: moda fix submit ${shellArg(fix.id)} --pr (or --local-ref=${shellArg(branch)})`,
734
734
  ` A hand-authored PR body must end with the magic word: ${magicWord}`,
735
735
  ""
736
736
  ].join(`
@@ -758,13 +758,13 @@ async function runFixCheckout(context, profileOptions, tenantId) {
758
758
  ],
759
759
  nextCommands: [
760
760
  {
761
- command: `moda fix verify ${fix.id} --prompt-file=${relPath}`,
761
+ command: `moda fix verify ${shellArg(fix.id)} --prompt-file=${shellArg(relPath)}`,
762
762
  purpose: "Re-gate the (possibly edited) local candidate on the frozen holdout.",
763
763
  mutability: "write",
764
764
  requires_approval: false
765
765
  },
766
766
  {
767
- command: `moda fix submit ${fix.id} --pr`,
767
+ command: `moda fix submit ${shellArg(fix.id)} --pr`,
768
768
  purpose: `Open the draft fix PR (branch ${branch}, magic word "${magicWord}").`,
769
769
  mutability: "write",
770
770
  requires_approval: true
@@ -800,7 +800,7 @@ async function runFixSubmit(context, profileOptions, tenantId) {
800
800
  },
801
801
  nextCommands: [
802
802
  {
803
- command: `moda fix ${fixId}`,
803
+ command: `moda fix ${shellArg(fixId)}`,
804
804
  purpose: "Track delivery and confirmation status.",
805
805
  mutability: "read",
806
806
  requires_approval: false
@@ -832,7 +832,7 @@ async function runFixMarkApplied(context, profileOptions, tenantId) {
832
832
  },
833
833
  nextCommands: [
834
834
  {
835
- command: `moda fix ${fix.id}`,
835
+ command: `moda fix ${shellArg(fix.id)}`,
836
836
  purpose: "Track confirmation monitoring (HELD after 14 clean days; REGRESSED on reopen).",
837
837
  mutability: "read",
838
838
  requires_approval: false
@@ -967,15 +967,12 @@ async function assertRegateCooldown(tenantId, fixId, context, profileOptions, ca
967
967
  if (ageMs >= VERIFY_COOLDOWN_MS)
968
968
  return;
969
969
  const waitMin = Math.ceil((VERIFY_COOLDOWN_MS - ageMs) / 60000);
970
- const rerun = ["moda", "fix", "verify", fixId, ...Object.entries(context.flags).filter(([key]) => key !== "yes" && key !== "fix-id").map(([key, value]) => value === "true" ? `--${key}` : `--${key}=${shellQuote(value)}`), "--yes"].join(" ");
970
+ const rerun = ["moda", "fix", "verify", shellArg(fixId), ...Object.entries(context.flags).filter(([key]) => key !== "yes" && key !== "fix-id").map(([key, value]) => value === "true" ? `--${key}` : `--${key}=${shellArg(value)}`), "--yes"].join(" ");
971
971
  throw new CliInputError(`MODA-FIX-${current.shortRef} was gated ${Math.max(0, Math.floor(ageMs / 60000))} min ago (verdict ${gate.verdict}); re-gating within 10 minutes re-runs the replay. Nothing was sent.`, `Wait ~${waitMin} min, or re-run with --yes to gate now: ${rerun}`);
972
972
  }
973
973
  function sha256(content) {
974
974
  return createHash("sha256").update(content, "utf8").digest("hex");
975
975
  }
976
- function shellQuote(value) {
977
- return /^[A-Za-z0-9_@%+=:,./-]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
978
- }
979
976
  async function getFix(tenantId, fixId, profileOptions) {
980
977
  return await callControlAPI(`${fixesBase(tenantId)}/${encodeURIComponent(fixId)}`, { method: "GET" }, profileOptions);
981
978
  }
@@ -1053,7 +1050,7 @@ function materializePacketCandidates(packet, fixId, human) {
1053
1050
  const paramNotes = (Array.isArray(tool.param_notes) ? tool.param_notes : []).filter((note) => typeof note === "string" && note !== "");
1054
1051
  const rationale = typeof tool.rationale === "string" ? tool.rationale : "";
1055
1052
  const currentPath = writeCandidateFile("tool-description.current.md", typeof tool.current_description === "string" ? tool.current_description : "", "fix_tool_description_current", `Current description of tool '${toolName}'${source ? ` (from ${source})` : ""} — the diff base.`);
1056
- const proposedPath = writeCandidateFile("tool-description.proposed.md", tool.proposed_description ?? "", "fix_tool_description_proposed", `Proposed description for tool '${toolName}' — apply it to your tool definition, then \`moda fix mark-applied ${fixId}\`.`);
1053
+ const proposedPath = writeCandidateFile("tool-description.proposed.md", tool.proposed_description ?? "", "fix_tool_description_proposed", `Proposed description for tool '${toolName}' — apply it to your tool definition, then \`moda fix mark-applied ${shellArg(fixId)}\`.`);
1057
1054
  findings.push({
1058
1055
  id: "fix:candidate_tool",
1059
1056
  title: `tool '${toolName}' description candidate${source ? ` (current from ${source})` : ""}`,
@@ -1076,19 +1073,19 @@ function materializePacketCandidates(packet, fixId, human) {
1076
1073
  if (rationale)
1077
1074
  block("rationale", rationale);
1078
1075
  if (currentPath && proposedPath) {
1079
- w(` diff: diff ${currentPath} ${proposedPath}`);
1076
+ w(` diff: diff ${shellArg(currentPath)} ${shellArg(proposedPath)}`);
1080
1077
  }
1081
1078
  }
1082
1079
  }
1083
1080
  if (hasSkill && skill) {
1084
1081
  const skillName = typeof skill.skill_name === "string" && skill.skill_name ? skill.skill_name : "moda-fix-skill";
1085
- const skillPath = writeCandidateFile("SKILL.md", skill.skill_md ?? "", "fix_candidate_skill", `Drafted SKILL.md for '${skillName}' — install it (for example .claude/skills/${skillName}/SKILL.md), then \`moda fix mark-applied ${fixId}\`.`);
1082
+ const skillPath = writeCandidateFile("SKILL.md", skill.skill_md ?? "", "fix_candidate_skill", `Drafted SKILL.md for '${skillName}' — install it (for example .claude/skills/${skillName}/SKILL.md), then \`moda fix mark-applied ${shellArg(fixId)}\`.`);
1086
1083
  findings.push({
1087
1084
  id: "fix:candidate_skill",
1088
1085
  title: `skill '${skillName}' drafted (SKILL.md, ${(skill.skill_md ?? "").length} chars)`,
1089
1086
  status: "proposed",
1090
1087
  severity: "info",
1091
- description: `Install the skill in your agent, then confirm with \`moda fix mark-applied ${fixId}\`. Gating on the replay holdout stays pending until the skill is registered with the skill harness.`
1088
+ description: `Install the skill in your agent, then confirm with \`moda fix mark-applied ${shellArg(fixId)}\`. Gating on the replay holdout stays pending until the skill is registered with the skill harness.`
1092
1089
  });
1093
1090
  summaryParts.push(`Includes a drafted SKILL.md candidate ('${skillName}').`);
1094
1091
  if (human) {
@@ -1097,20 +1094,20 @@ function materializePacketCandidates(packet, fixId, human) {
1097
1094
  if (skillPath)
1098
1095
  w(` SKILL.md written to ${skillPath}`);
1099
1096
  w(` install it (for example .claude/skills/${skillName}/SKILL.md), then confirm:`);
1100
- w(` moda fix mark-applied ${fixId} --note="installed skill ${skillName}"`);
1097
+ w(` moda fix mark-applied ${shellArg(fixId)} --note=${shellArg(`installed skill ${skillName}`)}`);
1101
1098
  }
1102
1099
  }
1103
1100
  if (hasSkillEdit && skillEdit) {
1104
1101
  const skillKey = typeof skillEdit.skill_key === "string" && skillEdit.skill_key ? skillEdit.skill_key : typeof skillEdit.skill_name === "string" && skillEdit.skill_name ? skillEdit.skill_name : "moda-skill";
1105
1102
  const changeSummary = typeof skillEdit.change_summary === "string" ? skillEdit.change_summary : "";
1106
1103
  const currentPath = writeCandidateFile("SKILL.current.md", typeof skillEdit.current_skill_md === "string" ? skillEdit.current_skill_md : "", "fix_skill_edit_current", `Current SKILL.md of your synced skill '${skillKey}' — the diff base.`);
1107
- const proposedPath = writeCandidateFile("SKILL.proposed.md", skillEdit.proposed_skill_md ?? "", "fix_skill_edit_proposed", `Proposed SKILL.md for '${skillKey}' (minimal edit) — apply it to the existing skill in your repo, then \`moda fix mark-applied ${fixId}\`.`);
1104
+ const proposedPath = writeCandidateFile("SKILL.proposed.md", skillEdit.proposed_skill_md ?? "", "fix_skill_edit_proposed", `Proposed SKILL.md for '${skillKey}' (minimal edit) — apply it to the existing skill in your repo, then \`moda fix mark-applied ${shellArg(fixId)}\`.`);
1108
1105
  findings.push({
1109
1106
  id: "fix:candidate_skill_edit",
1110
1107
  title: `skill '${skillKey}' edit proposed${changeSummary ? `: ${changeSummary}` : " (minimal delta to the existing skill)"}`,
1111
1108
  status: "proposed",
1112
1109
  severity: "info",
1113
- description: `This amends the EXISTING synced skill '${skillKey}' — a minimal delta, not a new skill. Apply the proposed SKILL.md in your repo, then confirm with \`moda fix mark-applied ${fixId}\`.`
1110
+ description: `This amends the EXISTING synced skill '${skillKey}' — a minimal delta, not a new skill. Apply the proposed SKILL.md in your repo, then confirm with \`moda fix mark-applied ${shellArg(fixId)}\`.`
1114
1111
  });
1115
1112
  summaryParts.push(`Includes a skill-edit candidate amending existing skill '${skillKey}'.`);
1116
1113
  if (human) {
@@ -1123,13 +1120,13 @@ function materializePacketCandidates(packet, fixId, human) {
1123
1120
  if (proposedPath)
1124
1121
  w(` proposed SKILL.md written to ${proposedPath}`);
1125
1122
  if (currentPath && proposedPath)
1126
- w(` diff: diff ${currentPath} ${proposedPath}`);
1123
+ w(` diff: diff ${shellArg(currentPath)} ${shellArg(proposedPath)}`);
1127
1124
  w(` apply the edit to the existing skill in your repo, then confirm:`);
1128
- w(` moda fix mark-applied ${fixId} --note="amended skill ${skillKey}"`);
1125
+ w(` moda fix mark-applied ${shellArg(fixId)} --note=${shellArg(`amended skill ${skillKey}`)}`);
1129
1126
  }
1130
1127
  }
1131
1128
  nextCommands.push({
1132
- command: `moda fix mark-applied ${fixId} --note="where/how you applied it"`,
1129
+ command: `moda fix mark-applied ${shellArg(fixId)} --note="where/how you applied it"`,
1133
1130
  purpose: "Confirm you applied the candidate in your own stack (no PR) — flips the fix to SHIPPED and starts recurrence monitoring.",
1134
1131
  mutability: "write",
1135
1132
  requires_approval: true
@@ -1232,13 +1229,13 @@ function passLabel(value) {
1232
1229
  }
1233
1230
  function nextCommandsFor(fix) {
1234
1231
  const packetCommand = {
1235
- command: `moda fix ${fix.id} --packet`,
1232
+ command: `moda fix ${shellArg(fix.id)} --packet`,
1236
1233
  purpose: "Read the packet — the tool/skill candidate is written as local artifacts to apply in your own stack.",
1237
1234
  mutability: "write",
1238
1235
  requires_approval: false
1239
1236
  };
1240
1237
  const markAppliedCommand = {
1241
- command: `moda fix mark-applied ${fix.id} --note="where/how you applied it"`,
1238
+ command: `moda fix mark-applied ${shellArg(fix.id)} --note="where/how you applied it"`,
1242
1239
  purpose: "Confirm you applied the candidate in your own stack (no PR) — flips the fix to SHIPPED and starts recurrence monitoring.",
1243
1240
  mutability: "write",
1244
1241
  requires_approval: true
@@ -1251,13 +1248,13 @@ function nextCommandsFor(fix) {
1251
1248
  }
1252
1249
  return [
1253
1250
  {
1254
- command: `moda fix submit ${fix.id} --pr`,
1251
+ command: `moda fix submit ${shellArg(fix.id)} --pr`,
1255
1252
  purpose: "Open the draft fix PR (merge with the magic word to confirm).",
1256
1253
  mutability: "write",
1257
1254
  requires_approval: true
1258
1255
  },
1259
1256
  {
1260
- command: `moda fix checkout ${fix.id}`,
1257
+ command: `moda fix checkout ${shellArg(fix.id)}`,
1261
1258
  purpose: "Write the verified candidate locally instead of opening a PR.",
1262
1259
  mutability: "write",
1263
1260
  requires_approval: false
@@ -1269,7 +1266,7 @@ function nextCommandsFor(fix) {
1269
1266
  }
1270
1267
  return [
1271
1268
  {
1272
- command: `moda fix verify ${fix.id}`,
1269
+ command: `moda fix verify ${shellArg(fix.id)}`,
1273
1270
  purpose: "Gate the proposed candidate on the frozen holdout.",
1274
1271
  mutability: "write",
1275
1272
  requires_approval: false
@@ -1279,7 +1276,7 @@ function nextCommandsFor(fix) {
1279
1276
  if (isArtifactFix(fix)) {
1280
1277
  return [
1281
1278
  {
1282
- command: `moda fix verify ${fix.id}`,
1279
+ command: `moda fix verify ${shellArg(fix.id)}`,
1283
1280
  purpose: "Re-gate the stored candidate on the frozen holdout.",
1284
1281
  mutability: "write",
1285
1282
  requires_approval: false
@@ -1289,13 +1286,13 @@ function nextCommandsFor(fix) {
1289
1286
  }
1290
1287
  return [
1291
1288
  {
1292
- command: `moda fix checkout ${fix.id}`,
1289
+ command: `moda fix checkout ${shellArg(fix.id)}`,
1293
1290
  purpose: "Check out the candidate, edit it, and re-gate (fail-to-pass loop).",
1294
1291
  mutability: "write",
1295
1292
  requires_approval: false
1296
1293
  },
1297
1294
  {
1298
- command: `moda fix verify ${fix.id} --prompt-file=<path>`,
1295
+ command: `moda fix verify ${shellArg(fix.id)} --prompt-file=<path>`,
1299
1296
  purpose: "Re-gate an edited local candidate on the frozen holdout.",
1300
1297
  mutability: "write",
1301
1298
  requires_approval: false
@@ -1304,7 +1301,7 @@ function nextCommandsFor(fix) {
1304
1301
  case "GATE_INCONCLUSIVE":
1305
1302
  return [
1306
1303
  {
1307
- command: `moda fix verify ${fix.id}`,
1304
+ command: `moda fix verify ${shellArg(fix.id)}`,
1308
1305
  purpose: "Re-run the gate — the last run was inconclusive (never a pass).",
1309
1306
  mutability: "write",
1310
1307
  requires_approval: false
@@ -1313,7 +1310,7 @@ function nextCommandsFor(fix) {
1313
1310
  case "UNROUTED":
1314
1311
  return [
1315
1312
  {
1316
- command: `moda fix ${fix.id} --packet`,
1313
+ command: `moda fix ${shellArg(fix.id)} --packet`,
1317
1314
  purpose: "Read the investigation packet — this fix is deliverable as diagnosis.",
1318
1315
  mutability: "read",
1319
1316
  requires_approval: false
@@ -1330,7 +1327,7 @@ function nextCommandsFor(fix) {
1330
1327
  case "NO_HEADROOM":
1331
1328
  return [
1332
1329
  {
1333
- command: `moda fix ${fix.id} --packet`,
1330
+ command: `moda fix ${shellArg(fix.id)} --packet`,
1334
1331
  purpose: "Read the investigation packet — this fix is deliverable as diagnosis.",
1335
1332
  mutability: "read",
1336
1333
  requires_approval: false
@@ -1342,7 +1339,7 @@ function nextCommandsFor(fix) {
1342
1339
  case "GATING":
1343
1340
  return [
1344
1341
  {
1345
- command: `moda fix ${fix.id} --wait`,
1342
+ command: `moda fix ${shellArg(fix.id)} --wait`,
1346
1343
  purpose: "Drive the advance-on-poll pipeline to its next resting status.",
1347
1344
  mutability: "write",
1348
1345
  requires_approval: false
@@ -1351,7 +1348,7 @@ function nextCommandsFor(fix) {
1351
1348
  default:
1352
1349
  return [
1353
1350
  {
1354
- command: `moda fix ${fix.id}`,
1351
+ command: `moda fix ${shellArg(fix.id)}`,
1355
1352
  purpose: "Track the fix status.",
1356
1353
  mutability: "read",
1357
1354
  requires_approval: false
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  CONCERN_CANDIDATE_KINDS,
3
- HARNESS_ANALYZE_CONCERNS,
4
3
  SEED_CANDIDATE_KIND_LABELS,
5
4
  analystEventProgress,
6
5
  analyzeHarnessPrompts,
@@ -23,7 +22,6 @@ import {
23
22
  numericEnv,
24
23
  numericEnvAllowZero,
25
24
  promptNameFromPath,
26
- readHarnessSyncState,
27
25
  renderAnalystCandidateLines,
28
26
  renderAnalystSeedLines,
29
27
  renderExternalHarnessAnalystPrompt,
@@ -42,12 +40,22 @@ import {
42
40
  writeHarnessAnalyzeResult,
43
41
  writeHarnessArtifacts,
44
42
  writeHumanProgress
45
- } from "./cli-d577kq6h.js";
43
+ } from "./cli-3n0gz4d0.js";
44
+ import {
45
+ readHarnessSyncState
46
+ } from "./cli-xq45etg1.js";
46
47
  import"./cli-97fnztpy.js";
47
- import"./cli-cdrvjva5.js";
48
- import"./cli-jgfm7w1r.js";
49
- import"./cli-jtyvbd8d.js";
50
- import"./cli-sqsjd08w.js";
48
+ import {
49
+ HARNESS_ANALYZE_CONCERNS
50
+ } from "./cli-cesds766.js";
51
+ import"./cli-qpq84eee.js";
52
+ import"./cli-dr6x0zv7.js";
53
+ import"./cli-n2hng3gv.js";
54
+ import"./cli-e23g9ywa.js";
55
+ import"./cli-99p2jh28.js";
56
+ import"./cli-k4tqwah4.js";
57
+ import"./cli-9kfxkxmk.js";
58
+ import"./cli-ns5fcnkz.js";
51
59
  import"./cli-0v6na3yp.js";
52
60
  export {
53
61
  writeHumanProgress,
@@ -1,13 +1,19 @@
1
1
  import {
2
2
  buildSourceSnapshot
3
- } from "./cli-d577kq6h.js";
3
+ } from "./cli-3n0gz4d0.js";
4
+ import"./cli-xq45etg1.js";
4
5
  import"./cli-97fnztpy.js";
5
- import"./cli-cdrvjva5.js";
6
- import"./cli-jgfm7w1r.js";
7
- import"./cli-jtyvbd8d.js";
6
+ import"./cli-cesds766.js";
7
+ import"./cli-qpq84eee.js";
8
+ import"./cli-dr6x0zv7.js";
9
+ import"./cli-n2hng3gv.js";
10
+ import"./cli-e23g9ywa.js";
8
11
  import {
9
12
  recordApiRequest
10
- } from "./cli-sqsjd08w.js";
13
+ } from "./cli-99p2jh28.js";
14
+ import"./cli-k4tqwah4.js";
15
+ import"./cli-9kfxkxmk.js";
16
+ import"./cli-ns5fcnkz.js";
11
17
  import"./cli-0v6na3yp.js";
12
18
 
13
19
  // src/harness-github-actions.ts
@@ -0,0 +1,54 @@
1
+ import {
2
+ HARNESS_ANALYZE_CONCERNS,
3
+ HARNESS_REPORT_APPROVAL_PATH,
4
+ HARNESS_REPORT_APPROVAL_SCHEMA_VERSION,
5
+ HARNESS_REPORT_MARKDOWN_PATH,
6
+ HARNESS_REPORT_PATH,
7
+ HARNESS_REPORT_SCHEMA_VERSION,
8
+ HARNESS_REPORT_VALIDATION_PATH,
9
+ HARNESS_REPORT_VALIDATION_SCHEMA_VERSION,
10
+ approveHarnessReport,
11
+ artifactHasBody,
12
+ createHarnessReport,
13
+ firstEvidencePath,
14
+ graphForReport,
15
+ hashHarnessReport,
16
+ hashStableJson,
17
+ loadHarnessReportForSync,
18
+ normalizeHarnessReport,
19
+ readHarnessReport,
20
+ renderHarnessReportMarkdown,
21
+ requiresArtifactBody,
22
+ resolveHarnessReportPath,
23
+ stampRemoteSnapshotTruncation,
24
+ validateHarnessReport,
25
+ writeHarnessReportArtifacts
26
+ } from "./cli-cesds766.js";
27
+ import"./cli-k4tqwah4.js";
28
+ import"./cli-0v6na3yp.js";
29
+ export {
30
+ writeHarnessReportArtifacts,
31
+ validateHarnessReport,
32
+ stampRemoteSnapshotTruncation,
33
+ resolveHarnessReportPath,
34
+ requiresArtifactBody,
35
+ renderHarnessReportMarkdown,
36
+ readHarnessReport,
37
+ normalizeHarnessReport,
38
+ loadHarnessReportForSync,
39
+ hashStableJson,
40
+ hashHarnessReport,
41
+ graphForReport,
42
+ firstEvidencePath,
43
+ createHarnessReport,
44
+ artifactHasBody,
45
+ approveHarnessReport,
46
+ HARNESS_REPORT_VALIDATION_SCHEMA_VERSION,
47
+ HARNESS_REPORT_VALIDATION_PATH,
48
+ HARNESS_REPORT_SCHEMA_VERSION,
49
+ HARNESS_REPORT_PATH,
50
+ HARNESS_REPORT_MARKDOWN_PATH,
51
+ HARNESS_REPORT_APPROVAL_SCHEMA_VERSION,
52
+ HARNESS_REPORT_APPROVAL_PATH,
53
+ HARNESS_ANALYZE_CONCERNS
54
+ };
@@ -1,24 +1,37 @@
1
- import {
2
- selectTenantAndCreateKey
3
- } from "./cli-k6q8dbpk.js";
4
- import"./cli-1mbb0ct0.js";
5
1
  import {
6
2
  buildDoctorReport
7
- } from "./cli-5g1tv80h.js";
3
+ } from "./cli-ny48a8de.js";
4
+ import {
5
+ selectTenantAndCreateKey
6
+ } from "./cli-9bgk5jeh.js";
7
+ import"./cli-97jew729.js";
8
8
  import {
9
9
  ConnectCodeError,
10
10
  connectWithCode,
11
11
  loadAuthSession,
12
12
  loadToken,
13
13
  login
14
- } from "./cli-q6f6vrrr.js";
14
+ } from "./cli-9bgnvth2.js";
15
+ import {
16
+ bundledSkillsDir,
17
+ installIntegrationSkill,
18
+ readBundledIndex
19
+ } from "./cli-frhm2wz7.js";
20
+ import {
21
+ agentsMdProblem,
22
+ runSkillSync
23
+ } from "./cli-mg5zv4s6.js";
24
+ import {
25
+ detectAgents,
26
+ installRules,
27
+ summarizeInstall
28
+ } from "./cli-8dtnwp9r.js";
15
29
  import {
16
30
  initPrompts,
17
31
  runPromptSync
18
- } from "./cli-b4740tnv.js";
32
+ } from "./cli-3retgh64.js";
19
33
  import"./cli-mm48br00.js";
20
34
  import {
21
- canonicalText,
22
35
  codingAgentDisplayName,
23
36
  describeCodingAgentEvent,
24
37
  describeSyncIdentity,
@@ -27,45 +40,41 @@ import {
27
40
  isDeterministicLocalAnalyst,
28
41
  isRecoverableRemoteRun,
29
42
  pollRemoteAnalyzeUntilDone,
43
+ runCodingAgent,
44
+ runHarnessCommand,
45
+ startRemoteAnalyze
46
+ } from "./cli-3n0gz4d0.js";
47
+ import {
48
+ canonicalText,
30
49
  renderInitBanner,
31
50
  renderInitComplete,
32
51
  renderInitNote,
33
52
  renderInitSetupPlan,
34
- renderInitStep,
35
- runCodingAgent,
36
- runHarnessCommand,
37
- startRemoteAnalyze
38
- } from "./cli-d577kq6h.js";
53
+ renderInitStep
54
+ } from "./cli-xq45etg1.js";
39
55
  import {
40
56
  stripAnsi
41
57
  } from "./cli-97fnztpy.js";
42
- import {
43
- bundledSkillsDir,
44
- installIntegrationSkill,
45
- readBundledIndex
46
- } from "./cli-frhm2wz7.js";
47
- import {
48
- agentsMdProblem,
49
- runSkillSync
50
- } from "./cli-8tfk8qeb.js";
58
+ import"./cli-cesds766.js";
59
+ import"./cli-qpq84eee.js";
51
60
  import {
52
61
  createCommandContext
53
- } from "./cli-cdrvjva5.js";
54
- import"./cli-jgfm7w1r.js";
55
- import"./cli-jtyvbd8d.js";
62
+ } from "./cli-dr6x0zv7.js";
63
+ import"./cli-n2hng3gv.js";
64
+ import"./cli-e23g9ywa.js";
56
65
  import {
57
- CliAuthError,
58
- CliInputError,
59
66
  VERSION,
60
67
  recordApiRequest,
61
68
  resolveIngestUrl,
62
- resolveModaBaseUrl
63
- } from "./cli-sqsjd08w.js";
69
+ resolveModaBaseUrl,
70
+ shellArg
71
+ } from "./cli-99p2jh28.js";
64
72
  import {
65
- detectAgents,
66
- installRules,
67
- summarizeInstall
68
- } from "./cli-8dtnwp9r.js";
73
+ CliAuthError,
74
+ CliInputError
75
+ } from "./cli-k4tqwah4.js";
76
+ import"./cli-9kfxkxmk.js";
77
+ import"./cli-ns5fcnkz.js";
69
78
  import"./cli-0v6na3yp.js";
70
79
 
71
80
  // src/init/index.ts
@@ -2122,7 +2131,7 @@ Harness analysis keeps running on Moda. Resume anytime with \`${HARNESS_PULL_REC
2122
2131
  laneBoard?.update("sdk", message);
2123
2132
  emitLaneProgress("apply", "sdk", message);
2124
2133
  },
2125
- onPhase: (phase, message) => {
2134
+ onPhase: (_phase, message) => {
2126
2135
  laneBoard?.update("sdk", message);
2127
2136
  emitLaneProgress("apply", "sdk", message);
2128
2137
  },
@@ -2359,7 +2368,7 @@ function applySdkIntegrationOutcome(setupPlan, outcome, deps) {
2359
2368
  break;
2360
2369
  }
2361
2370
  case "telemetry_not_observed":
2362
- laneBoard?.warn("sdk", `integration applied but the verification trace was not observed; check MODA_API_KEY at runtime, then moda traces spans ${verificationId}`);
2371
+ laneBoard?.warn("sdk", `integration applied but the verification trace was not observed; check MODA_API_KEY at runtime, then moda traces spans ${shellArg(verificationId)}`);
2363
2372
  markManual(setupPlan, "sdk", outcome.detail ?? "Verification trace was not observed.");
2364
2373
  break;
2365
2374
  case "needs_human_input": {
@@ -2376,7 +2385,7 @@ function applySdkIntegrationOutcome(setupPlan, outcome, deps) {
2376
2385
  sdkAction.reason = outcome.detail ?? "Existing Moda integration verified.";
2377
2386
  break;
2378
2387
  }
2379
- const reason = outcome.verification ? "agent reports Moda is already integrated but the verification trace was not observed; " + `check MODA_API_KEY at runtime, then \`moda traces spans ${verificationId}\`` : "agent reports Moda is already integrated — not independently verified; " + "send a real request through your app with a trace ID (`conversation_id`) you choose, then run `moda traces spans` with that id";
2388
+ const reason = outcome.verification ? "agent reports Moda is already integrated but the verification trace was not observed; " + `check MODA_API_KEY at runtime, then \`moda traces spans ${shellArg(verificationId)}\`` : "agent reports Moda is already integrated — not independently verified; " + "send a real request through your app with a trace ID (`conversation_id`) you choose, then run `moda traces spans` with that id";
2380
2389
  laneBoard?.warn("sdk", reason);
2381
2390
  markManual(setupPlan, "sdk", reason);
2382
2391
  break;