@unbrained/pm-cli 2026.8.23 → 2026.8.25

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 (172) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +27 -1
  3. package/dist/cli/description-stdin.js +5 -4
  4. package/dist/cli/extension-command-help.d.ts +5 -0
  5. package/dist/cli/extension-command-help.js +6 -2
  6. package/dist/cli/help-content.d.ts +5 -0
  7. package/dist/cli/help-content.js +56 -3
  8. package/dist/cli/help-json-payload.d.ts +5 -2
  9. package/dist/cli/help-json-payload.js +57 -17
  10. package/dist/cli/main.d.ts +3 -0
  11. package/dist/cli/main.js +28 -3
  12. package/dist/cli/register-annotations.js +5 -5
  13. package/dist/cli/register-mutation.js +73 -27
  14. package/dist/cli-bundle/bundle-manifest.json +152 -152
  15. package/dist/cli-bundle/chunks/{chunk-HWZ6CELB.js → chunk-244MI4GS.js} +3 -3
  16. package/dist/cli-bundle/chunks/{chunk-QDVHNHAQ.js → chunk-2F3LUFMW.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-EG6CLDZT.js → chunk-5I5RWIJC.js} +2 -2
  18. package/dist/cli-bundle/chunks/{chunk-KPH73XXJ.js → chunk-65MHLHAA.js} +2 -2
  19. package/dist/cli-bundle/chunks/chunk-6C7GIMIL.js +13 -0
  20. package/dist/cli-bundle/chunks/chunk-OWHNAR2B.js +2 -0
  21. package/dist/cli-bundle/chunks/chunk-QKGMHGEI.js +202 -0
  22. package/dist/cli-bundle/chunks/chunk-QLUORNIB.js +2092 -0
  23. package/dist/cli-bundle/chunks/{chunk-JB4KZWBF.js → chunk-T2ENPRXF.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-F3AI2JFL.js → chunk-TPQIBSL2.js} +2 -2
  25. package/dist/cli-bundle/chunks/chunk-YQMYF3YD.js +35 -0
  26. package/dist/cli-bundle/chunks/{register-list-query-UJB5FMV2.js → register-list-query-XVN2ZLI7.js} +2 -2
  27. package/dist/cli-bundle/chunks/register-mutation-QCKAEGIJ.js +20 -0
  28. package/dist/cli-bundle/chunks/{register-operations-RXIJIYXC.js → register-operations-SDEAXE7E.js} +2 -2
  29. package/dist/cli-bundle/chunks/{register-setup-GFUZEKRE.js → register-setup-LXVBRCJ3.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-QGFNI65N.js → chunk-2UIWOP3O.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-42S3GGZ7.js +50 -0
  32. package/dist/cli-bundle/focused-chunks/{chunk-OGLQBL46.js → chunk-7I23XGWO.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/chunk-7YCDTCBC.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/{chunk-OFVUGTLJ.js → chunk-A644DUFQ.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-AUFH5H35.js → chunk-GQR3WH3F.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-3UPTYG44.js → chunk-H5JZEIQV.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/chunk-IBZZZGK3.js +2 -0
  38. package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +5 -0
  39. package/dist/cli-bundle/focused-chunks/{chunk-LYVSW5VM.js → chunk-N7W67YIG.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-37Z4OEAP.js → chunk-NOOZGIXP.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/{chunk-FZS4H32O.js → chunk-OHIHZ7HS.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/chunk-ONYQCALA.js +19 -0
  43. package/dist/cli-bundle/focused-chunks/chunk-OVJL6NZE.js +4 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-RAFKLNZX.js +16 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-IFLWKY2R.js → chunk-VXWATRFL.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-R27IDGHD.js → chunk-XUQPEKRN.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/{chunk-JOWDB2MH.js → chunk-YO3ZF3FI.js} +2 -2
  48. package/dist/cli-bundle/main.js +18 -17
  49. package/dist/cli-bundle/sdk-authoring.js +1 -1
  50. package/dist/cli-bundle/sdk-contracts.js +2 -2
  51. package/dist/cli-bundle/sdk-core.js +32 -32
  52. package/dist/cli-bundle/sdk-governance.js +1 -1
  53. package/dist/cli-bundle/sdk-graph.js +1 -1
  54. package/dist/cli-bundle/sdk-merge.js +32 -33
  55. package/dist/cli-bundle/sdk-query.js +1 -1
  56. package/dist/cli-bundle/sdk-runtime.js +1 -1
  57. package/dist/cli-bundle/sdk-testing.js +1 -1
  58. package/dist/cli-bundle/sdk.js +6 -5
  59. package/dist/core/diagnostics/remediation.js +17 -2
  60. package/dist/core/extensions/command-metadata-contract.d.ts +10 -0
  61. package/dist/core/extensions/command-metadata-contract.js +23 -0
  62. package/dist/core/extensions/command-visibility-tier.js +12 -2
  63. package/dist/core/extensions/extension-types.d.ts +6 -0
  64. package/dist/core/extensions/extension-types.js +2 -2
  65. package/dist/core/extensions/loader.js +4 -3
  66. package/dist/core/io/body-file.js +7 -2
  67. package/dist/core/io/bulk-ids-input.d.ts +24 -0
  68. package/dist/core/io/bulk-ids-input.js +113 -0
  69. package/dist/core/item/parse.d.ts +22 -2
  70. package/dist/core/item/parse.js +97 -4
  71. package/dist/mcp/server.d.ts +3 -2
  72. package/dist/mcp/server.js +16 -9
  73. package/dist/sdk/agent/refusal-closure-census.d.ts +66 -0
  74. package/dist/sdk/agent/refusal-closure-census.js +144 -0
  75. package/dist/sdk/agent-capability-contracts.d.ts +34 -1
  76. package/dist/sdk/agent-capability-contracts.js +104 -6
  77. package/dist/sdk/annotations.d.ts +2 -0
  78. package/dist/sdk/annotations.js +25 -7
  79. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +10 -0
  80. package/dist/sdk/cli-contracts/runtime-contracts.js +20 -3
  81. package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
  82. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +4 -1
  83. package/dist/sdk/cli-contracts/typed-action-inputs.js +2 -2
  84. package/dist/sdk/comments.js +15 -7
  85. package/dist/sdk/flag-invocation-contracts.d.ts +2 -0
  86. package/dist/sdk/flag-invocation-contracts.js +28 -3
  87. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +109 -52
  88. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +62 -2
  89. package/dist/sdk/governance/health.js +98 -11
  90. package/dist/sdk/governance/validate.js +15 -9
  91. package/dist/sdk/guide-topics.d.ts +0 -5
  92. package/dist/sdk/guide-topics.js +28 -2
  93. package/dist/sdk/history-compact.d.ts +2 -1
  94. package/dist/sdk/history-compact.js +24 -5
  95. package/dist/sdk/history-mcp.js +11 -10
  96. package/dist/sdk/history-repair.d.ts +24 -0
  97. package/dist/sdk/history-repair.js +145 -4
  98. package/dist/sdk/index.d.ts +1 -0
  99. package/dist/sdk/index.js +3 -2
  100. package/dist/sdk/item-transaction.js +19 -12
  101. package/dist/sdk/lifecycle/append.js +4 -4
  102. package/dist/sdk/lifecycle/close-many.js +16 -7
  103. package/dist/sdk/lifecycle/create.js +29 -21
  104. package/dist/sdk/lifecycle/plan.js +24 -6
  105. package/dist/sdk/lifecycle/update-many.js +15 -8
  106. package/dist/sdk/lifecycle/update.d.ts +2 -0
  107. package/dist/sdk/lifecycle/update.js +34 -24
  108. package/dist/sdk/merge/driver.js +25 -4
  109. package/dist/sdk/merge/receipt-file-boundary.d.ts +21 -0
  110. package/dist/sdk/merge/receipt-file-boundary.js +47 -0
  111. package/dist/sdk/merge/receipts.d.ts +24 -1
  112. package/dist/sdk/merge/receipts.js +342 -36
  113. package/dist/sdk/merge/reconcile.js +117 -47
  114. package/dist/sdk/read-output/continuation.d.ts +15 -2
  115. package/dist/sdk/read-output/continuation.js +86 -6
  116. package/dist/sdk/read-output-contracts.d.ts +4 -1
  117. package/dist/sdk/read-output-contracts.js +9 -6
  118. package/dist/sdk/runtime-extended-actions.js +5 -3
  119. package/dist/sdk/runtime-input.d.ts +4 -0
  120. package/dist/sdk/runtime-input.js +98 -23
  121. package/dist/sdk/runtime-primitives.d.ts +2 -1
  122. package/dist/sdk/runtime-primitives.js +4 -3
  123. package/dist/sdk/runtime.js +7 -20
  124. package/dist/sdk/scheduling-shortcuts.js +5 -3
  125. package/dist/sdk/structured-mutations.js +10 -3
  126. package/dist/sdk/workspace-contracts.d.ts +3 -0
  127. package/dist/sdk/workspace-contracts.js +3 -2
  128. package/docs/MERGE_SAFETY.md +34 -5
  129. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +13 -1
  130. package/docs/README.md +2 -0
  131. package/docs/READ_OUTPUT_CONTRACTS.md +25 -2
  132. package/docs/RELEASING.md +40 -21
  133. package/docs/SCRIPTING.md +62 -3
  134. package/docs/SDK.md +8 -0
  135. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +17 -0
  136. package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -1
  137. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +359 -0
  138. package/marketplace.json +2 -2
  139. package/package.json +1 -1
  140. package/packages/pm-beads/package.json +1 -1
  141. package/packages/pm-calendar/package.json +1 -1
  142. package/packages/pm-command-kit/README.md +9 -11
  143. package/packages/pm-command-kit/extensions/command-kit/index.ts +3 -1
  144. package/packages/pm-command-kit/package.json +1 -1
  145. package/packages/pm-digital-twin/package.json +1 -1
  146. package/packages/pm-governance-audit/package.json +1 -1
  147. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +10 -0
  148. package/packages/pm-guide-shell/package.json +1 -1
  149. package/packages/pm-kanban/package.json +1 -1
  150. package/packages/pm-lifecycle-hooks/package.json +1 -1
  151. package/packages/pm-linked-test-adapters/package.json +1 -1
  152. package/packages/pm-search-advanced/package.json +1 -1
  153. package/packages/pm-templates/package.json +1 -1
  154. package/packages/pm-todos/package.json +1 -1
  155. package/packages/pm-vcs/package.json +1 -1
  156. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  157. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  158. package/scripts/generate-agent-capability-surfaces.mjs +27 -1
  159. package/sdk/public-surface.json +351 -26
  160. package/dist/cli-bundle/chunks/chunk-3ENVHX6C.js +0 -36
  161. package/dist/cli-bundle/chunks/chunk-DW2CGEMU.js +0 -2
  162. package/dist/cli-bundle/chunks/chunk-HZBMLSZI.js +0 -201
  163. package/dist/cli-bundle/chunks/chunk-KXPMB2YL.js +0 -2092
  164. package/dist/cli-bundle/chunks/chunk-TFI5V5N2.js +0 -13
  165. package/dist/cli-bundle/chunks/register-mutation-NX5XE4VX.js +0 -20
  166. package/dist/cli-bundle/focused-chunks/chunk-5S7E72FY.js +0 -16
  167. package/dist/cli-bundle/focused-chunks/chunk-E7X25GC3.js +0 -2
  168. package/dist/cli-bundle/focused-chunks/chunk-FQCSTBWE.js +0 -4
  169. package/dist/cli-bundle/focused-chunks/chunk-MRCNF3U6.js +0 -2
  170. package/dist/cli-bundle/focused-chunks/chunk-OY7QAV4Y.js +0 -51
  171. package/dist/cli-bundle/focused-chunks/chunk-UYRFYCDQ.js +0 -5
  172. package/dist/cli-bundle/focused-chunks/chunk-ZHVA42R5.js +0 -18
@@ -1,6 +1,6 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="49cddeba-127e-5d6c-a62d-4a63088ce8c6")}catch(e){}}();
3
- import { resolveBodyFileContent, EXIT_CODE, splitCommaList, PmCliError, createUnknownSubcommandError, } from "../sdk/runtime-primitives.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="28a59fb9-80bc-5e2a-b926-1bb227c103c6")}catch(e){}}();
3
+ import { resolveBodyFileContent, resolveCliBulkIdsInput, EXIT_CODE, splitCommaList, PmCliError, createUnknownSubcommandError, } from "../sdk/runtime-primitives.js";
4
4
  import { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, MERGE_SUBCOMMAND_VALUES, PLAN_CREATE_METADATA_PARAMETER_KEYS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, } from "../sdk/cli-contracts.js";
5
5
  import { BUILTIN_ITEM_TYPE_VALUES, PLAN_STEP_LINK_KIND_VALUES, } from "../types/index.js";
6
6
  import { MERGE_DRIVER_ARTIFACT_VALUES, runMergeDriver, runMergeInstall, runMergeReconcile, runMergeReceiptReport, } from "./commands/merge.js";
@@ -22,7 +22,7 @@ import { runRestore } from "./commands/restore.js";
22
22
  import * as schemaModule from "./commands/schema.js";
23
23
  import { runUpdate } from "./commands/update.js";
24
24
  import { runUpdateMany } from "./commands/update-many.js";
25
- import { createStdinTokenResolver } from "../sdk/runtime-primitives.js";
25
+ import { createStdinTokenResolver, preserveMutationStdinTokenFields, preserveMutationStdinTokenLiterals, } from "../sdk/runtime-primitives.js";
26
26
  import { resolveDescriptionStdin } from "./description-stdin.js";
27
27
  import { itemDocumentToMutationOptions } from "../sdk/structured-mutations.js";
28
28
  import { registerStructuredMutationCommands } from "./register-structured-mutation.js";
@@ -484,6 +484,7 @@ function assertCreatePositionalTypeHasTitle(positionalType, positionalTitle, opt
484
484
  }
485
485
  const STRUCTURED_STDIN_CONFLICT_KEYS = [
486
486
  "body",
487
+ "bodyFile",
487
488
  "description",
488
489
  "dep",
489
490
  "depRemove",
@@ -497,21 +498,45 @@ const STRUCTURED_STDIN_CONFLICT_KEYS = [
497
498
  "event",
498
499
  "typeOption",
499
500
  "field",
501
+ "ids",
500
502
  ];
501
- function assertExclusiveStructuredStdin(options) {
502
- const conflictingFlags = STRUCTURED_STDIN_CONFLICT_KEYS.filter((key) => {
503
+ function assertSingleMutationStdinConsumer(options) {
504
+ const stdinFlags = STRUCTURED_STDIN_CONFLICT_KEYS.flatMap((key) => {
503
505
  const value = options[key];
504
- return value === "-" || (Array.isArray(value) && value.includes("-"));
505
- }).map((key) => `--${key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}`);
506
- if (conflictingFlags.length > 0) {
507
- throw new PmCliError(`--stdin-json cannot be combined with other stdin consumers: ${conflictingFlags.join(", ")}`, EXIT_CODE.USAGE);
506
+ const count = typeof value === "string" && value.trim() === "-"
507
+ ? 1
508
+ : Array.isArray(value)
509
+ ? value.filter((entry) => typeof entry === "string" && entry.trim() === "-").length
510
+ : 0;
511
+ const flag = `--${key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}`;
512
+ return Array.from({ length: count }, () => flag);
513
+ });
514
+ if (options.stdinJson === true) {
515
+ stdinFlags.unshift("--stdin-json");
516
+ }
517
+ if (stdinFlags.length > 1) {
518
+ throw new PmCliError(`Only one option may consume stdin per command invocation. Found: ${stdinFlags.join(", ")}.`, EXIT_CODE.USAGE);
508
519
  }
509
520
  }
521
+ function preserveResolvedMutationStdinFields(options, bodyFileResolved, descriptionStdinResolved) {
522
+ const fields = [];
523
+ if (bodyFileResolved)
524
+ fields.push("body");
525
+ if (descriptionStdinResolved)
526
+ fields.push("description");
527
+ preserveMutationStdinTokenFields(options, fields);
528
+ }
529
+ function isDescriptionStdinConsumer(options, stdinJsonConsumed) {
530
+ return (!stdinJsonConsumed &&
531
+ typeof options.description === "string" &&
532
+ options.description.trim() === "-");
533
+ }
510
534
  async function runCreateAction(typeOrTitle, secondTitle, options, command) {
511
535
  const globalOptions = getGlobalOptions(command);
512
536
  const startedAt = Date.now();
513
- if (options.stdinJson === true) {
514
- assertExclusiveStructuredStdin(options);
537
+ assertSingleMutationStdinConsumer(options);
538
+ const stdinJsonConsumed = options.stdinJson === true;
539
+ if (stdinJsonConsumed) {
515
540
  const input = await createStdinTokenResolver().resolveValue("-", "--stdin-json");
516
541
  options = itemDocumentToMutationOptions(input ?? "", "create", options);
517
542
  }
@@ -526,12 +551,19 @@ async function runCreateAction(typeOrTitle, secondTitle, options, command) {
526
551
  positionals.positionalTitle.length > 0 &&
527
552
  options.title === undefined)
528
553
  options.title = positionals.positionalTitle;
529
- await resolveDescriptionStdin(options);
530
- if (typeof options.bodyFile === "string") {
531
- options.body = await resolveBodyFileContent(options.bodyFile, options.body !== undefined ? String(options.body) : undefined);
554
+ const descriptionStdinResolved = isDescriptionStdinConsumer(options, stdinJsonConsumed);
555
+ if (!stdinJsonConsumed) {
556
+ await resolveDescriptionStdin(options);
557
+ }
558
+ const bodyFileResolved = typeof options.bodyFile === "string";
559
+ if (bodyFileResolved) {
560
+ options.body = await resolveBodyFileContent(String(options.bodyFile), options.body !== undefined ? String(options.body) : undefined);
532
561
  delete options.bodyFile;
533
562
  }
534
563
  const normalized = normalizeCreateOptions(options, { requireType: false });
564
+ preserveResolvedMutationStdinFields(normalized, bodyFileResolved, descriptionStdinResolved);
565
+ if (stdinJsonConsumed)
566
+ preserveMutationStdinTokenLiterals(normalized);
535
567
  const result = await runCreate(normalized, globalOptions);
536
568
  await invalidateSearchCachesForMutation(globalOptions, result);
537
569
  printResult(result, globalOptions);
@@ -564,6 +596,8 @@ function buildCloseManyListOptions(options) {
564
596
  async function runCloseManyAction(options, command) {
565
597
  const globalOptions = getGlobalOptions(command);
566
598
  const startedAt = Date.now();
599
+ assertSingleMutationStdinConsumer(options);
600
+ options.ids = await resolveCliBulkIdsInput(readOptionString(options, "ids"));
567
601
  const result = await runCloseMany({
568
602
  status: readOptionString(options, "filterStatus"),
569
603
  list: buildCloseManyListOptions(options),
@@ -591,6 +625,8 @@ async function runCloseManyAction(options, command) {
591
625
  async function runUpdateManyAction(options, command) {
592
626
  const globalOptions = getGlobalOptions(command);
593
627
  const startedAt = Date.now();
628
+ assertSingleMutationStdinConsumer(options);
629
+ options.ids = await resolveCliBulkIdsInput(readOptionString(options, "ids"));
594
630
  const result = await runUpdateMany({
595
631
  status: readOptionString(options, "filterStatus"),
596
632
  list: buildUpdateManyListOptions(options),
@@ -834,7 +870,8 @@ async function runMergeAction(subcommand, artifact, base, ours, theirs, options,
834
870
  async function runHistoryCompactAction(id, options, command) {
835
871
  const globalOptions = getGlobalOptions(command);
836
872
  const startedAt = Date.now();
837
- const ids = typeof options.ids === "string" ? splitCommaList(options.ids) : undefined;
873
+ const idsValue = await resolveCliBulkIdsInput(readOptionString(options, "ids"));
874
+ const ids = idsValue === undefined ? undefined : splitCommaList(idsValue);
838
875
  const allOver = parseNonNegativeIntFlag(options.allOver, "--all-over");
839
876
  const minEntries = parseNonNegativeIntFlag(options.minEntries, "--min-entries");
840
877
  if (options.closed === true && options.allStreams === true) {
@@ -987,19 +1024,28 @@ async function runFocusAction(id, options, command) {
987
1024
  async function runUpdateAction(id, options, command) {
988
1025
  const globalOptions = getGlobalOptions(command);
989
1026
  const startedAt = Date.now();
990
- if (options.stdinJson === true) {
991
- assertExclusiveStructuredStdin(options);
1027
+ assertSingleMutationStdinConsumer(options);
1028
+ const stdinJsonConsumed = options.stdinJson === true;
1029
+ if (stdinJsonConsumed) {
992
1030
  const input = await createStdinTokenResolver().resolveValue("-", "--stdin-json");
993
1031
  options = itemDocumentToMutationOptions(input ?? "", "update", options);
994
1032
  }
995
- await resolveDescriptionStdin(options);
1033
+ const descriptionStdinResolved = isDescriptionStdinConsumer(options, stdinJsonConsumed);
1034
+ if (!stdinJsonConsumed) {
1035
+ await resolveDescriptionStdin(options);
1036
+ }
996
1037
  // GH-214: resolve --body-file into the existing body field before
997
1038
  // normalization so the rest of update is unchanged. CLI-only input alias.
998
- if (typeof options.bodyFile === "string") {
999
- options.body = await resolveBodyFileContent(options.bodyFile, options.body !== undefined ? String(options.body) : undefined);
1039
+ const bodyFileResolved = typeof options.bodyFile === "string";
1040
+ if (bodyFileResolved) {
1041
+ options.body = await resolveBodyFileContent(String(options.bodyFile), options.body !== undefined ? String(options.body) : undefined);
1000
1042
  delete options.bodyFile;
1001
1043
  }
1002
- const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
1044
+ const normalized = normalizeUpdateOptions(options);
1045
+ preserveResolvedMutationStdinFields(normalized, bodyFileResolved, descriptionStdinResolved);
1046
+ if (stdinJsonConsumed)
1047
+ preserveMutationStdinTokenLiterals(normalized);
1048
+ const result = await runUpdate(id, normalized, globalOptions);
1003
1049
  await invalidateSearchCachesForMutation(globalOptions, result);
1004
1050
  printResult(await applyActiveCommandResultService("update", [id], options, globalOptions, result), globalOptions);
1005
1051
  if (globalOptions.profile) {
@@ -1239,7 +1285,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1239
1285
  registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
1240
1286
  createCommand
1241
1287
  .option("--stdin-json", "Read a full item JSON document from stdin; explicit flags override document values")
1242
- .option("--body-file <path>", "Load the item markdown body from a file (mutually exclusive with --body)")
1288
+ .option("--body-file <path>", "Load body from a file or stdin (-); conflicts with --body")
1243
1289
  .option("--clear-deps", "Clear dependency entries")
1244
1290
  .option("--clear-comments", "Clear comments")
1245
1291
  .option("--clear-notes", "Clear notes")
@@ -1277,7 +1323,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1277
1323
  registerCommanderOptionContracts(updateCommand, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
1278
1324
  updateCommand
1279
1325
  .option("--stdin-json", "Read a full item JSON document from stdin; explicit flags override document values")
1280
- .option("--body-file <path>", "Load the item markdown body from a file (mutually exclusive with --body)")
1326
+ .option("--body-file <path>", "Load body from a file or stdin (-); conflicts with --body")
1281
1327
  .option("--replace-deps", "Atomically replace dependency entries with the provided --dep values")
1282
1328
  .option("--replace-tests", "Atomically replace linked test entries with the provided --test values")
1283
1329
  .option("--replace-files", "Atomically replace linked file entries with the provided --file values")
@@ -1319,7 +1365,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1319
1365
  .option("--filter-metadata-missing", "Select only items missing any tracked metadata (AC, estimate, or resolution)");
1320
1366
  registerBulkContentAndGovernanceFilters(updateManyCommand, "applying updates");
1321
1367
  updateManyCommand
1322
- .option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)")
1368
+ .option("--ids <value>", "Explicit ID allowlist: comma/newline text, - stdin, or @path file")
1323
1369
  .option("--limit <n>", "Limit matched item count before apply/preview")
1324
1370
  .option("--offset <n>", "Skip first n matched rows before apply/preview")
1325
1371
  .option("--dry-run", "Preview per-item diffs and checkpoint intent without mutating")
@@ -1477,7 +1523,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1477
1523
  .option("--filter-release <value>", "Filter by release before closing");
1478
1524
  registerBulkContentAndGovernanceFilters(closeManyCommand, "closing");
1479
1525
  closeManyCommand
1480
- .option("--ids <value>", "Restrict to an explicit comma-separated ID allowlist (intersected with other filters)")
1526
+ .option("--ids <value>", "Explicit ID allowlist: comma/newline text, - stdin, or @path file")
1481
1527
  .option("--limit <n>", "Limit matched item count before apply/preview")
1482
1528
  .option("--offset <n>", "Skip first n matched rows before apply/preview")
1483
1529
  .option("--reason <value>", "Shared close reason applied to matched items (required when governance.require_close_reason is enabled)")
@@ -1711,7 +1757,7 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1711
1757
  .command("history-compact")
1712
1758
  .argument("[id]", "Item id (omit when using a bulk selector)")
1713
1759
  .option("--before <value>", "Compact entries strictly before this version number or ISO timestamp (single-id mode only)")
1714
- .option("--ids <value>", "Bulk: compact an explicit comma-separated list of item ids")
1760
+ .option("--ids <value>", "Bulk IDs: comma/newline text, - stdin, or @path file")
1715
1761
  .option("--all-over <n>", "Bulk: compact every stream with more than N entries")
1716
1762
  .option("--closed", "Bulk: compact only closed (terminal) items' streams")
1717
1763
  .option("--all-streams", "Bulk: compact every history stream regardless of lifecycle state")
@@ -1840,4 +1886,4 @@ export function registerMutationCommands(program, registrationOptions = {}) {
1840
1886
  .action(runDepsAction);
1841
1887
  }
1842
1888
  //# sourceMappingURL=register-mutation.js.map
1843
- //# debugId=49cddeba-127e-5d6c-a62d-4a63088ce8c6
1889
+ //# debugId=28a59fb9-80bc-5e2a-b926-1bb227c103c6