@unbrained/pm-cli 2026.8.23 → 2026.8.24

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 (147) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +14 -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-JB4KZWBF.js → chunk-AGUL3HUT.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-EG6CLDZT.js → chunk-DJNJBWAQ.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-F3AI2JFL.js → chunk-I5Q7QSZX.js} +2 -2
  18. package/dist/cli-bundle/chunks/chunk-IW72J5FW.js +2 -0
  19. package/dist/cli-bundle/chunks/{chunk-KXPMB2YL.js → chunk-L22NP5MA.js} +55 -55
  20. package/dist/cli-bundle/chunks/chunk-MKE6MD2K.js +36 -0
  21. package/dist/cli-bundle/chunks/{chunk-QDVHNHAQ.js → chunk-NXBFO63A.js} +2 -2
  22. package/dist/cli-bundle/chunks/chunk-TEQDR5KI.js +202 -0
  23. package/dist/cli-bundle/chunks/{chunk-KPH73XXJ.js → chunk-X7WWQDYQ.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-TFI5V5N2.js → chunk-YOLLRCLY.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-HWZ6CELB.js → chunk-ZAVCS2GH.js} +2 -2
  26. package/dist/cli-bundle/chunks/{register-list-query-UJB5FMV2.js → register-list-query-37A4P6O4.js} +2 -2
  27. package/dist/cli-bundle/chunks/register-mutation-TBJDHYIT.js +20 -0
  28. package/dist/cli-bundle/chunks/{register-operations-RXIJIYXC.js → register-operations-WRZNEBUM.js} +2 -2
  29. package/dist/cli-bundle/chunks/{register-setup-GFUZEKRE.js → register-setup-H4PDLACD.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/{chunk-AUFH5H35.js → chunk-4WP7LNE3.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/{chunk-LYVSW5VM.js → chunk-6MUTDXMP.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-6Z24ZMU3.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/{chunk-OGLQBL46.js → chunk-BFA6KKCI.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-QGFNI65N.js → chunk-CWCN5RLO.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-UYRFYCDQ.js → chunk-FCTT4CZU.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-IFLWKY2R.js → chunk-GJR6YEMR.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-37Z4OEAP.js → chunk-IMWTYKII.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-R27IDGHD.js → chunk-IZNRRCU3.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/{chunk-JOWDB2MH.js → chunk-MNPECIRL.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-OFVUGTLJ.js → chunk-O4ZXNJMT.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-Q63PSLO4.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/chunk-QBP5FSBX.js +4 -0
  43. package/dist/cli-bundle/focused-chunks/{chunk-OY7QAV4Y.js → chunk-QV5UP27O.js} +46 -46
  44. package/dist/cli-bundle/focused-chunks/{chunk-3UPTYG44.js → chunk-RASVBJX5.js} +2 -2
  45. package/dist/cli-bundle/focused-chunks/{chunk-5S7E72FY.js → chunk-RPRLENVA.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/chunk-TOFVXBWA.js +19 -0
  47. package/dist/cli-bundle/focused-chunks/{chunk-FZS4H32O.js → chunk-WZLSSGEU.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 +1 -1
  51. package/dist/cli-bundle/sdk-core.js +41 -41
  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 +33 -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/extensions/command-metadata-contract.d.ts +10 -0
  60. package/dist/core/extensions/command-metadata-contract.js +23 -0
  61. package/dist/core/extensions/command-visibility-tier.js +12 -2
  62. package/dist/core/extensions/extension-types.d.ts +6 -0
  63. package/dist/core/extensions/extension-types.js +2 -2
  64. package/dist/core/extensions/loader.js +4 -3
  65. package/dist/core/io/body-file.js +7 -2
  66. package/dist/core/io/bulk-ids-input.d.ts +24 -0
  67. package/dist/core/io/bulk-ids-input.js +113 -0
  68. package/dist/core/item/parse.d.ts +22 -2
  69. package/dist/core/item/parse.js +97 -4
  70. package/dist/mcp/server.d.ts +3 -2
  71. package/dist/mcp/server.js +16 -9
  72. package/dist/sdk/agent/refusal-closure-census.d.ts +66 -0
  73. package/dist/sdk/agent/refusal-closure-census.js +144 -0
  74. package/dist/sdk/agent-capability-contracts.d.ts +34 -1
  75. package/dist/sdk/agent-capability-contracts.js +104 -6
  76. package/dist/sdk/annotations.d.ts +2 -0
  77. package/dist/sdk/annotations.js +25 -7
  78. package/dist/sdk/cli-contracts/tool-parameter-tables.js +38 -2
  79. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +4 -1
  80. package/dist/sdk/cli-contracts/typed-action-inputs.js +2 -2
  81. package/dist/sdk/comments.js +15 -7
  82. package/dist/sdk/flag-invocation-contracts.d.ts +2 -0
  83. package/dist/sdk/flag-invocation-contracts.js +28 -3
  84. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +71 -38
  85. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +38 -2
  86. package/dist/sdk/guide-topics.d.ts +0 -5
  87. package/dist/sdk/guide-topics.js +28 -2
  88. package/dist/sdk/history-compact.d.ts +2 -1
  89. package/dist/sdk/history-compact.js +24 -5
  90. package/dist/sdk/history-mcp.js +11 -10
  91. package/dist/sdk/index.d.ts +1 -0
  92. package/dist/sdk/index.js +3 -2
  93. package/dist/sdk/item-transaction.js +19 -12
  94. package/dist/sdk/lifecycle/append.js +4 -4
  95. package/dist/sdk/lifecycle/close-many.js +16 -7
  96. package/dist/sdk/lifecycle/create.js +29 -21
  97. package/dist/sdk/lifecycle/plan.js +24 -6
  98. package/dist/sdk/lifecycle/update-many.js +15 -8
  99. package/dist/sdk/lifecycle/update.d.ts +2 -0
  100. package/dist/sdk/lifecycle/update.js +34 -24
  101. package/dist/sdk/runtime-extended-actions.js +5 -3
  102. package/dist/sdk/runtime-input.d.ts +4 -0
  103. package/dist/sdk/runtime-input.js +98 -23
  104. package/dist/sdk/runtime-primitives.d.ts +2 -1
  105. package/dist/sdk/runtime-primitives.js +4 -3
  106. package/dist/sdk/runtime.js +7 -20
  107. package/dist/sdk/scheduling-shortcuts.js +5 -3
  108. package/dist/sdk/structured-mutations.js +10 -3
  109. package/dist/sdk/workspace-contracts.d.ts +3 -0
  110. package/dist/sdk/workspace-contracts.js +3 -2
  111. package/docs/README.md +2 -0
  112. package/docs/RELEASING.md +40 -21
  113. package/docs/SCRIPTING.md +62 -3
  114. package/docs/SDK.md +8 -0
  115. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +17 -0
  116. package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -1
  117. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +355 -0
  118. package/marketplace.json +2 -2
  119. package/package.json +1 -1
  120. package/packages/pm-beads/package.json +1 -1
  121. package/packages/pm-calendar/package.json +1 -1
  122. package/packages/pm-command-kit/README.md +9 -11
  123. package/packages/pm-command-kit/extensions/command-kit/index.ts +3 -1
  124. package/packages/pm-command-kit/package.json +1 -1
  125. package/packages/pm-digital-twin/package.json +1 -1
  126. package/packages/pm-governance-audit/package.json +1 -1
  127. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +10 -0
  128. package/packages/pm-guide-shell/package.json +1 -1
  129. package/packages/pm-kanban/package.json +1 -1
  130. package/packages/pm-lifecycle-hooks/package.json +1 -1
  131. package/packages/pm-linked-test-adapters/package.json +1 -1
  132. package/packages/pm-search-advanced/package.json +1 -1
  133. package/packages/pm-templates/package.json +1 -1
  134. package/packages/pm-todos/package.json +1 -1
  135. package/packages/pm-vcs/package.json +1 -1
  136. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  137. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  138. package/scripts/generate-agent-capability-surfaces.mjs +27 -1
  139. package/sdk/public-surface.json +215 -11
  140. package/dist/cli-bundle/chunks/chunk-3ENVHX6C.js +0 -36
  141. package/dist/cli-bundle/chunks/chunk-DW2CGEMU.js +0 -2
  142. package/dist/cli-bundle/chunks/chunk-HZBMLSZI.js +0 -201
  143. package/dist/cli-bundle/chunks/register-mutation-NX5XE4VX.js +0 -20
  144. package/dist/cli-bundle/focused-chunks/chunk-E7X25GC3.js +0 -2
  145. package/dist/cli-bundle/focused-chunks/chunk-FQCSTBWE.js +0 -4
  146. package/dist/cli-bundle/focused-chunks/chunk-MRCNF3U6.js +0 -2
  147. package/dist/cli-bundle/focused-chunks/chunk-ZHVA42R5.js +0 -18
@@ -4,9 +4,9 @@
4
4
  * Implements the pm append command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="73184370-6517-533e-90db-536893402616")}catch(e){}}();
7
+ !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]="b4b1f63b-12f9-574c-8e92-a5cc9c6178c1")}catch(e){}}();
8
8
  import { assertInitializedTracker } from "../environment/tracker-preflight.js";
9
- import { EXIT_CODE, PmCliError, resolveAuthor, toItemRecord, createStdinTokenResolver, mutateItem, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
9
+ import { EXIT_CODE, PmCliError, resolveAuthor, toItemRecord, createStdinTokenResolver, shouldResolveMutationStdinTokenField, mutateItem, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
10
10
  /** Implements run append for the public runtime surface of this module. */
11
11
  export async function runAppend(id, options, global) {
12
12
  if (options.body === undefined) {
@@ -18,7 +18,7 @@ export async function runAppend(id, options, global) {
18
18
  const settings = await readSettings(pmRoot);
19
19
  const author = resolveAuthor(options.author, settings.author_default);
20
20
  // options.body is guaranteed defined by the guard above, so resolveValue returns a defined string.
21
- const bodyInput = await stdinResolver.resolveValue(options.body, "--body");
21
+ const bodyInput = await stdinResolver.resolveValue(options.body, "--body", shouldResolveMutationStdinTokenField(options, "body"));
22
22
  const appended = bodyInput.trim();
23
23
  if (appended.length === 0) {
24
24
  throw new PmCliError("--body text cannot be empty; append requires non-blank content and empty appends would only rewrite updated_at.", EXIT_CODE.USAGE, {
@@ -51,4 +51,4 @@ export async function runAppend(id, options, global) {
51
51
  };
52
52
  }
53
53
  //# sourceMappingURL=append.js.map
54
- //# debugId=73184370-6517-533e-90db-536893402616
54
+ //# debugId=b4b1f63b-12f9-574c-8e92-a5cc9c6178c1
@@ -4,7 +4,7 @@
4
4
  * Implements the pm close many command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="a7113374-b169-5f92-9c20-075a47520440")}catch(e){}}();
7
+ !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]="a97a3cf0-beef-5967-8f5b-2372a6c9f2f7")}catch(e){}}();
8
8
  import { assertInitializedTracker } from "../environment/tracker-preflight.js";
9
9
  import { createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, resolveAuthor, nowIso, listAllItemMetadataLight, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
10
10
  import { runClose } from "./close.js";
@@ -280,7 +280,14 @@ async function buildCloseManyPlanContext(params) {
280
280
  .map((entry) => entry.trim())
281
281
  .filter((entry) => entry.length > 0)),
282
282
  ];
283
- const matchedIds = new Set(matched.map((item) => item.id));
283
+ const existenceItems = requestedIds.length === 0
284
+ ? []
285
+ : (await runList(undefined, {
286
+ ids: requestedIds.join(","),
287
+ noTruncate: true,
288
+ full: true,
289
+ }, params.global)).items;
290
+ const existingIds = new Set(existenceItems.map((item) => item.id));
284
291
  const closePlannedIds = resolveCloseManyPlannedIds(matched, statusRegistry, force);
285
292
  return {
286
293
  pmRoot: params.pmRoot,
@@ -291,7 +298,9 @@ async function buildCloseManyPlanContext(params) {
291
298
  force,
292
299
  listed,
293
300
  matched,
294
- unmatchedIds: requestedIds.filter((id) => !matchedIds.has(id)),
301
+ unmatchedIds: requestedIds.length === 0
302
+ ? undefined
303
+ : requestedIds.filter((id) => !existingIds.has(id)),
295
304
  planRows: planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force),
296
305
  };
297
306
  }
@@ -309,7 +318,7 @@ function buildCloseManyDryRunResult(context) {
309
318
  : {}),
310
319
  item_plans: context.planRows,
311
320
  ids: [],
312
- ...(context.unmatchedIds.length > 0
321
+ ...(context.unmatchedIds !== undefined
313
322
  ? {
314
323
  unmatched_ids: context.unmatchedIds,
315
324
  unmatched_count: context.unmatchedIds.length,
@@ -392,7 +401,7 @@ export async function runCloseMany(options, global) {
392
401
  applied: closedCount,
393
402
  skipped: skippedCount,
394
403
  failed: failedCount,
395
- unmatched: context.unmatchedIds.length,
404
+ unmatched: context.unmatchedIds?.length ?? 0,
396
405
  }),
397
406
  mode: "apply",
398
407
  matched_count: context.matched.length,
@@ -408,7 +417,7 @@ export async function runCloseMany(options, global) {
408
417
  failed_count: failedCount,
409
418
  rows,
410
419
  ids: closedIds,
411
- ...(context.unmatchedIds.length > 0
420
+ ...(context.unmatchedIds !== undefined
412
421
  ? {
413
422
  unmatched_ids: context.unmatchedIds,
414
423
  unmatched_count: context.unmatchedIds.length,
@@ -427,4 +436,4 @@ export const _testOnly = {
427
436
  resolveReason,
428
437
  };
429
438
  //# sourceMappingURL=close-many.js.map
430
- //# debugId=a7113374-b169-5f92-9c20-075a47520440
439
+ //# debugId=a97a3cf0-beef-5967-8f5b-2372a6c9f2f7
@@ -4,9 +4,10 @@
4
4
  * Implements the pm create command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="f8c8e154-737b-58db-9a8b-7f4399342e83")}catch(e){}}();
7
+ !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]="02c41ea1-8d4e-5239-b95a-a07210b63d7f")}catch(e){}}();
8
8
  import { assertInitializedTracker } from "../environment/tracker-preflight.js";
9
- import { removeFileIfExists, writeFileAtomic, appendHistoryEntry, createHistoryEntry, generateItemId, normalizeItemId, canonicalDocument, normalizeItemMetadata, serializeItemDocument, assertParentReferenceIsNotSelf, isPlaceholderReferenceToken, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, assertNoUnknownCsvKeys, createStdinTokenResolver, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, resolvePriority, getFocusedItem, normalizeStatusInput, isTerminalStatus, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, acquireLock, printError, buildInvalidTypeError, resolveTypeSynonym, collectRuntimeCreateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, ITEM_METADATA_KEY_ORDER, PmCliError, nowIso, resolveIsoOrRelative, getActiveExtensionRegistrations, projectAfterCommandItemSnapshot, recordAfterCommandAffectedItem, runActiveCommandHandler, runActiveBeforeMutationHooks, runActiveOnWriteHooks, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, listAllItemMetadataLight, locateItem, createMutationGuardSdk, getHistoryPath, getItemPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
9
+ import { resolveMutationStdinTokenFields } from "../../core/item/parse.js";
10
+ import { removeFileIfExists, writeFileAtomic, appendHistoryEntry, createHistoryEntry, generateItemId, normalizeItemId, canonicalDocument, normalizeItemMetadata, serializeItemDocument, assertParentReferenceIsNotSelf, isPlaceholderReferenceToken, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, assertNoUnknownCsvKeys, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, shouldResolveMutationStdinTokens, transferMutationStdinTokenPolicy, resolvePriority, getFocusedItem, normalizeStatusInput, isTerminalStatus, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, acquireLock, printError, buildInvalidTypeError, resolveTypeSynonym, collectRuntimeCreateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, ITEM_METADATA_KEY_ORDER, PmCliError, nowIso, resolveIsoOrRelative, getActiveExtensionRegistrations, projectAfterCommandItemSnapshot, recordAfterCommandAffectedItem, runActiveCommandHandler, runActiveBeforeMutationHooks, runActiveOnWriteHooks, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, listAllItemMetadataLight, locateItem, createMutationGuardSdk, getHistoryPath, getItemPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
10
11
  import { requireTerminalReasonWithRecovery } from "../lifecycle-policy.js";
11
12
  import { evaluateSimilarityGovernance, similarityAdvisoryWarnings, } from "../similarity.js";
12
13
  import { acquireItemMetadataDerivedIndexLock, refreshItemMetadataDerivedIndex, } from "../item-metadata-index.js";
@@ -134,7 +135,7 @@ function normalizeLegacyNoneCreateOptions(options) {
134
135
  normalized[optionKey] = undefined;
135
136
  /* c8 ignore stop */
136
137
  }
137
- return applyLegacyNoneCollectionNormalizers(normalized, CREATE_LEGACY_NONE_COLLECTION_NORMALIZERS);
138
+ return transferMutationStdinTokenPolicy(options, applyLegacyNoneCollectionNormalizers(normalized, CREATE_LEGACY_NONE_COLLECTION_NORMALIZERS));
138
139
  }
139
140
  function parseOptionalString(value) {
140
141
  if (value === undefined)
@@ -544,22 +545,29 @@ function parseTypeOptions(raw) {
544
545
  };
545
546
  }
546
547
  async function resolveCreateStdinInputs(options) {
547
- const stdinResolver = createStdinTokenResolver();
548
- return {
549
- ...options,
550
- body: await stdinResolver.resolveValue(options.body, "--body"),
551
- dep: await stdinResolver.resolveList(options.dep, "--dep"),
552
- comment: await stdinResolver.resolveList(options.comment, "--comment"),
553
- note: await stdinResolver.resolveList(options.note, "--note"),
554
- learning: await stdinResolver.resolveList(options.learning, "--learning"),
555
- file: await stdinResolver.resolveList(options.file, "--file"),
556
- test: await stdinResolver.resolveList(options.test, "--test"),
557
- doc: await stdinResolver.resolveList(options.doc, "--doc"),
558
- reminder: await stdinResolver.resolveList(options.reminder, "--reminder"),
559
- event: await stdinResolver.resolveList(options.event, "--event"),
560
- typeOption: await stdinResolver.resolveList(options.typeOption, "--type-option"),
561
- field: await stdinResolver.resolveList(options.field, "--field"),
562
- };
548
+ const scalarFields = [
549
+ ["body", "--body"],
550
+ ["description", "--description"],
551
+ ];
552
+ const listFields = [
553
+ ["dep", "--dep"],
554
+ ["comment", "--comment"],
555
+ ["note", "--note"],
556
+ ["learning", "--learning"],
557
+ ["file", "--file"],
558
+ ["test", "--test"],
559
+ ["doc", "--doc"],
560
+ ["reminder", "--reminder"],
561
+ ["event", "--event"],
562
+ ["typeOption", "--type-option"],
563
+ ["field", "--field"],
564
+ ];
565
+ return await resolveMutationStdinTokenFields(options, scalarFields, listFields);
566
+ }
567
+ async function resolveCreateTransportInputs(options) {
568
+ return shouldResolveMutationStdinTokens(options)
569
+ ? await resolveCreateStdinInputs(options)
570
+ : options;
563
571
  }
564
572
  function resolveCreateMode(createMode, defaultMode) {
565
573
  if (createMode === undefined) {
@@ -1584,7 +1592,7 @@ async function writeCreatedItem(params) {
1584
1592
  }
1585
1593
  /** Implements run create for the public runtime surface of this module. */
1586
1594
  export async function runCreate(options, global) {
1587
- let resolvedOptions = normalizeLegacyNoneCreateOptions(await resolveCreateStdinInputs(options));
1595
+ let resolvedOptions = normalizeLegacyNoneCreateOptions(await resolveCreateTransportInputs(options));
1588
1596
  const pmRoot = resolvePmRoot(process.cwd(), global.path);
1589
1597
  await ensureInitHasRun(pmRoot);
1590
1598
  const settings = await readSettings(pmRoot);
@@ -1918,4 +1926,4 @@ export const _testOnlyCreateCommand = {
1918
1926
  typeOptionExampleValue,
1919
1927
  };
1920
1928
  //# sourceMappingURL=create.js.map
1921
- //# debugId=f8c8e154-737b-58db-9a8b-7f4399342e83
1929
+ //# debugId=02c41ea1-8d4e-5239-b95a-a07210b63d7f
@@ -4,9 +4,9 @@
4
4
  * Implements the pm plan command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="49fd5730-99c2-5a93-a80e-83c806a124bf")}catch(e){}}();
7
+ !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]="f7e870b6-fd80-5742-bc81-826d8f102d30")}catch(e){}}();
8
8
  import { assertInitializedTracker } from "../environment/tracker-preflight.js";
9
- import { getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, resolveTypeName, EXIT_CODE, PmCliError, splitCommaList, nowIso, locateItem, mutateItem, readLocatedItem, resolvePmRoot, readSettings, resolveAuthor, isTerminalPlanMode, } from "../runtime-primitives.js";
9
+ import { getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, resolveTypeName, EXIT_CODE, PmCliError, splitCommaList, nowIso, locateItem, mutateItem, readLocatedItem, resolvePmRoot, readSettings, resolveAuthor, isTerminalPlanMode, preserveMutationStdinTokenFields, transferMutationStdinTokenPolicy, } from "../runtime-primitives.js";
10
10
  import { PLAN_HARNESS_VALUES, PLAN_MODE_VALUES, PLAN_STEP_LINK_KIND_VALUES, PLAN_STEP_STATUS_VALUES, } from "../../types/index.js";
11
11
  import { runCreate, } from "./create.js";
12
12
  import { createUnknownSubcommandError } from "../agent/subcommand-recovery.js";
@@ -692,6 +692,12 @@ function buildInitialSteps(options) {
692
692
  hasPerStepDetailOptions: hasDetailOptions,
693
693
  };
694
694
  }
695
+ function preservePlanCreateStdinPolicy(source, createOptions, derivedLiteralFields = []) {
696
+ transferMutationStdinTokenPolicy(source, createOptions);
697
+ if (derivedLiteralFields.length > 0) {
698
+ preserveMutationStdinTokenFields(createOptions, derivedLiteralFields);
699
+ }
700
+ }
695
701
  async function planCreate(options, global, ctx) {
696
702
  const title = options.title?.trim();
697
703
  if (!title) {
@@ -738,6 +744,7 @@ async function planCreate(options, global, ctx) {
738
744
  message: options.message ??
739
745
  (fromSearch ? `plan create (search: ${fromSearch})` : `plan create`),
740
746
  };
747
+ preservePlanCreateStdinPolicy(options, createOptions);
741
748
  const createResult = await runCreate(createOptions, global);
742
749
  // Seed every Plan-specific field before assigning the requested owner so
743
750
  // cross-owner creation cannot reject a follow-up enrichment and leave a
@@ -1380,7 +1387,7 @@ async function createMaterializedStepItems(params) {
1380
1387
  materializeFields[fieldKey] = value;
1381
1388
  }
1382
1389
  for (const step of params.targets) {
1383
- const created = await runCreate({
1390
+ const createOptions = {
1384
1391
  ...materializeFields,
1385
1392
  title: step.title,
1386
1393
  description: step.body?.trim() || step.title,
@@ -1391,7 +1398,15 @@ async function createMaterializedStepItems(params) {
1391
1398
  message: params.options.message ??
1392
1399
  `materialized from plan ${params.planItemId} step ${step.id}`,
1393
1400
  dep: buildMaterializeDependencies(params.parent, params.planItemId, step),
1394
- }, { ...{}, path: params.pmRoot });
1401
+ };
1402
+ preservePlanCreateStdinPolicy(params.options, createOptions, [
1403
+ "description",
1404
+ ...Object.keys(materializeFields),
1405
+ ]);
1406
+ const created = await runCreate(createOptions, {
1407
+ ...{},
1408
+ path: params.pmRoot,
1409
+ });
1395
1410
  materialized.push({
1396
1411
  id: created.item.id,
1397
1412
  title: created.item.title,
@@ -1489,7 +1504,10 @@ function normalizePlanStepAliasInput(input) {
1489
1504
  if (stepValues.length === 1 && !input.options.stepTitle?.trim()) {
1490
1505
  return {
1491
1506
  ...input,
1492
- options: { ...input.options, stepTitle: stepValues[0] },
1507
+ options: transferMutationStdinTokenPolicy(input.options, {
1508
+ ...input.options,
1509
+ stepTitle: stepValues[0],
1510
+ }),
1493
1511
  };
1494
1512
  }
1495
1513
  return input;
@@ -1586,4 +1604,4 @@ export const _testOnlyPlanCommand = {
1586
1604
  changedPlanMetadataFields,
1587
1605
  };
1588
1606
  //# sourceMappingURL=plan.js.map
1589
- //# debugId=49fd5730-99c2-5a93-a80e-83c806a124bf
1607
+ //# debugId=f7e870b6-fd80-5742-bc81-826d8f102d30
@@ -4,15 +4,15 @@
4
4
  * Implements the pm update many command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="7a157c2e-e9e6-5bce-b124-0a7d34e3c7dc")}catch(e){}}();
7
+ !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]="fada7a33-ad1d-54f1-ae03-c5f8e4568d75")}catch(e){}}();
8
8
  import { assertInitializedTracker } from "../environment/tracker-preflight.js";
9
- import { createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, toItemRecord, applyAcceptanceCriteriaMutations, applyTagRemovals, mergeAdditiveTags, parseOptionalNonNegativeInteger, parseTags, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, resolveItemTypeRegistry, resolveTypeName, collectRuntimeUpdateFieldValues, buildInvalidTypeError, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, stableValueEquals, nowIso, resolveIsoOrRelative, getActiveExtensionRegistrations, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
9
+ import { createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, toItemRecord, applyAcceptanceCriteriaMutations, applyTagRemovals, mergeAdditiveTags, parseOptionalNonNegativeInteger, parseTags, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, resolveItemTypeRegistry, resolveTypeName, collectRuntimeUpdateFieldValues, buildInvalidTypeError, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, stableValueEquals, nowIso, preserveMutationStdinTokenLiterals, resolveIsoOrRelative, getActiveExtensionRegistrations, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
10
10
  import { assertDependencyTargetsResolvable } from "../dependency-flag-validation.js";
11
11
  import { parseStatusFilterCsv } from "../../core/item/status-filter.js";
12
12
  import { hasListFilters } from "../query/list-filter-shared.js";
13
13
  import { runList, } from "../query/list.js";
14
14
  import { runRestore } from "./restore.js";
15
- import { assertUpdateMutationOptionCombinations, parseDependencyAdditions, runUpdate, } from "./update.js";
15
+ import { assertUpdateMutationOptionCombinations, parseDependencyAdditions, resolveUpdateTransportOptions, runUpdate, } from "./update.js";
16
16
  import { derivePmBulkMutationEffect, } from "../cli-contracts/command-exit-contracts.js";
17
17
  const UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
18
18
  const UPDATE_MANY_CHECKPOINT_SUBDIR = "update-many";
@@ -703,11 +703,12 @@ const applyUpdateManyRows = async (params) => {
703
703
  continue;
704
704
  }
705
705
  try {
706
- const result = await runUpdate(item.id, {
706
+ const rowUpdateOptions = preserveMutationStdinTokenLiterals({
707
707
  ...params.options.update,
708
708
  message: updateMessage,
709
709
  runtimeFieldCommands: ["update_many"],
710
- }, params.global);
710
+ });
711
+ const result = await runUpdate(item.id, rowUpdateOptions, params.global);
711
712
  rows.push({
712
713
  id: item.id,
713
714
  status: "updated",
@@ -786,6 +787,12 @@ const applyUpdateManyPlan = async (params) => {
786
787
  export const runUpdateMany = async (options, global) => {
787
788
  const runtime = await loadUpdateManyRuntimeContext(global);
788
789
  const rollbackId = typeof options.rollback === "string" ? options.rollback : undefined;
790
+ if (rollbackId === undefined) {
791
+ options = {
792
+ ...options,
793
+ update: preserveMutationStdinTokenLiterals(await resolveUpdateTransportOptions(options.update)),
794
+ };
795
+ }
789
796
  const updateSummary = sanitizeUpdateOptionsForSummary(options.update);
790
797
  rejectBlankIdsFilter(options.list);
791
798
  if (rollbackId !== undefined) {
@@ -797,8 +804,8 @@ export const runUpdateMany = async (options, global) => {
797
804
  updateSummary,
798
805
  });
799
806
  }
800
- if (!hasAnyUpdateMutationInput(options.update)) {
801
- throw new PmCliError(`No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}).`, EXIT_CODE.USAGE);
807
+ if (!hasAnyUpdateMutationInput(options.update) && options.dryRun !== true) {
808
+ throw new PmCliError(`No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}), or pass --dry-run for a filter-only preview.`, EXIT_CODE.USAGE);
802
809
  }
803
810
  assertPlannedUpdateValuesValid(options.update, runtime.settings, runtime.statusRegistry, runtime.pmRoot);
804
811
  assertUpdateMutationOptionCombinations(options.update);
@@ -852,4 +859,4 @@ export const _testOnlyUpdateManyCommand = {
852
859
  toComparablePreviewValue,
853
860
  };
854
861
  //# sourceMappingURL=update-many.js.map
855
- //# debugId=7a157c2e-e9e6-5bce-b124-0a7d34e3c7dc
862
+ //# debugId=fada7a33-ad1d-54f1-ae03-c5f8e4568d75
@@ -159,6 +159,8 @@ interface UpdateMutationContext {
159
159
  author: string;
160
160
  pmRoot: string;
161
161
  }
162
+ /** Resolve update stdin tokens once while preserving transport-marked literals. */
163
+ export declare function resolveUpdateTransportOptions(options: UpdateCommandOptions): Promise<UpdateCommandOptions>;
162
164
  /** Validate mutually exclusive and required update mutation option combinations. */
163
165
  export declare function assertUpdateMutationOptionCombinations(options: UpdateCommandOptions): void;
164
166
  type UpdateStatusMutationContext = Pick<UpdateMutationContext, "options" | "statusRegistry" | "clearItemMetadataKeys" | "nowIso">;
@@ -4,9 +4,10 @@
4
4
  * Implements the pm update command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="c88f01be-6abe-5fa2-9792-3f54e61bb282")}catch(e){}}();
7
+ !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]="6865ca88-7ca1-52fd-86fb-2a3439abeafa")}catch(e){}}();
8
8
  import { assertInitializedTracker } from "../environment/tracker-preflight.js";
9
- import { COMMON_MUTATION_COMMAND_OPTION_KEYS, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, normalizeItemId, toItemRecord, buildInvalidTypeError, assertParentReferenceIsNotSelf, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, applyAcceptanceCriteriaMutations, applyTagRemovals, assertNoUnknownCsvKeys, createStdinTokenResolver, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, isTerminalStatus, collectRuntimeUpdateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, describeAllowedTransitions, evaluateTransition, resolveTypeWorkflows, EXIT_CODE, PmCliError, stableValueEquals, resolveIsoOrRelative, getActiveExtensionRegistrations, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, buildItemNotFoundError, listAllItemMetadataLight, locateItem, readLocatedItem, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
9
+ import { resolveMutationStdinTokenFields } from "../../core/item/parse.js";
10
+ import { COMMON_MUTATION_COMMAND_OPTION_KEYS, canonicalizeCommandOptionKey, commandOptionFlagLabel, resolveItemTypeRegistry, resolveCommandOptionPolicyState, resolveTypeDefinition, resolveTypeName, validateTypeOptions, normalizeItemId, toItemRecord, buildInvalidTypeError, assertParentReferenceIsNotSelf, normalizeParentReferenceValue, validateMissingParentReference, validateSprintOrReleaseValue, applyAcceptanceCriteriaMutations, applyTagRemovals, assertNoUnknownCsvKeys, looksLikeGenericKeyValueEntry, mergeAdditiveTags, parseCsvKv, parseOptionalNonNegativeInteger, parseOptionalNumber, parseTags, shouldResolveMutationStdinTokens, transferMutationStdinTokenPolicy, splitAcceptanceCriteria, resolvePriority, normalizeStatusInput, isTerminalStatus, collectRuntimeUpdateFieldValues, resolveItemTypesFilePath, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, describeAllowedTransitions, evaluateTransition, resolveTypeWorkflows, EXIT_CODE, PmCliError, stableValueEquals, resolveIsoOrRelative, getActiveExtensionRegistrations, collectRegisteredItemFieldNames, applyRegisteredItemFieldDefaultsAndValidation, parseRegisteredItemFieldAssignments, buildItemNotFoundError, listAllItemMetadataLight, locateItem, readLocatedItem, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
10
11
  import { mutateItemWithHistoryContextResolver } from "../../core/store/item-store.js";
11
12
  import { runClose } from "./close.js";
12
13
  import { normalizeRiskInput, normalizeSeverityInput, parseConfidenceInput, parseRegressionInput, } from "./metadata-normalizers.js";
@@ -108,7 +109,7 @@ function normalizeLegacyNoneUpdateOptions(options) {
108
109
  normalized[optionKey] = undefined;
109
110
  /* c8 ignore stop */
110
111
  }
111
- return applyLegacyNoneCollectionNormalizers(normalized, UPDATE_LEGACY_NONE_COLLECTION_NORMALIZERS);
112
+ return transferMutationStdinTokenPolicy(options, applyLegacyNoneCollectionNormalizers(normalized, UPDATE_LEGACY_NONE_COLLECTION_NORMALIZERS));
112
113
  }
113
114
  function parseUpdateUnsetTargets(raw, runtimeFieldRegistry, extensionFieldNames = []) {
114
115
  return parseCommandUnsetTargets({
@@ -858,23 +859,31 @@ function applyUpdateScalarMutations(definitions, options, context) {
858
859
  }
859
860
  }
860
861
  async function resolveStdinUpdateOptions(options) {
861
- const stdinResolver = createStdinTokenResolver();
862
- return normalizeLegacyNoneUpdateOptions({
863
- ...options,
864
- body: await stdinResolver.resolveValue(options.body, "--body"),
865
- dep: await stdinResolver.resolveList(options.dep, "--dep"),
866
- depRemove: await stdinResolver.resolveList(options.depRemove, "--dep-remove"),
867
- comment: await stdinResolver.resolveList(options.comment, "--comment"),
868
- note: await stdinResolver.resolveList(options.note, "--note"),
869
- learning: await stdinResolver.resolveList(options.learning, "--learning"),
870
- file: await stdinResolver.resolveList(options.file, "--file"),
871
- test: await stdinResolver.resolveList(options.test, "--test"),
872
- doc: await stdinResolver.resolveList(options.doc, "--doc"),
873
- reminder: await stdinResolver.resolveList(options.reminder, "--reminder"),
874
- event: await stdinResolver.resolveList(options.event, "--event"),
875
- typeOption: await stdinResolver.resolveList(options.typeOption, "--type-option"),
876
- field: await stdinResolver.resolveList(options.field, "--field"),
877
- });
862
+ const scalarFields = [
863
+ ["body", "--body"],
864
+ ["description", "--description"],
865
+ ];
866
+ const listFields = [
867
+ ["dep", "--dep"],
868
+ ["depRemove", "--dep-remove"],
869
+ ["comment", "--comment"],
870
+ ["note", "--note"],
871
+ ["learning", "--learning"],
872
+ ["file", "--file"],
873
+ ["test", "--test"],
874
+ ["doc", "--doc"],
875
+ ["reminder", "--reminder"],
876
+ ["event", "--event"],
877
+ ["typeOption", "--type-option"],
878
+ ["field", "--field"],
879
+ ];
880
+ return normalizeLegacyNoneUpdateOptions(await resolveMutationStdinTokenFields(options, scalarFields, listFields));
881
+ }
882
+ /** Resolve update stdin tokens once while preserving transport-marked literals. */
883
+ export async function resolveUpdateTransportOptions(options) {
884
+ return shouldResolveMutationStdinTokens(options)
885
+ ? await resolveStdinUpdateOptions(options)
886
+ : normalizeLegacyNoneUpdateOptions(options);
878
887
  }
879
888
  function buildClearCollectionDefinitions(options) {
880
889
  return [
@@ -1220,12 +1229,13 @@ async function routeCloseStatusUpdate(context) {
1220
1229
  const routeWarnings = [];
1221
1230
  let preChangedFields = [];
1222
1231
  if (otherFieldKeys.length > 0) {
1223
- const preUpdate = await runUpdate(context.id, {
1232
+ const preUpdateOptions = transferMutationStdinTokenPolicy(context.options, {
1224
1233
  ...context.options,
1225
1234
  status: undefined,
1226
1235
  closeReason: undefined,
1227
1236
  message: undefined,
1228
- }, context.global);
1237
+ });
1238
+ const preUpdate = await runUpdate(context.id, preUpdateOptions, context.global);
1229
1239
  preChangedFields = preUpdate.changed_fields;
1230
1240
  routeWarnings.push(...preUpdate.warnings);
1231
1241
  }
@@ -1804,7 +1814,7 @@ function mutateUpdateDocument(document, context) {
1804
1814
  }
1805
1815
  /** Implements run update for the public runtime surface of this module. */
1806
1816
  async function runUpdateWithContext(id, options, global, execution = {}) {
1807
- options = await resolveStdinUpdateOptions(options);
1817
+ options = await resolveUpdateTransportOptions(options);
1808
1818
  const pmRoot = resolvePmRoot(process.cwd(), global.path);
1809
1819
  await assertUpdateTrackerInitialized(pmRoot);
1810
1820
  const settings = await readSettings(pmRoot);
@@ -2111,4 +2121,4 @@ export const _testOnlyUpdateCommand = {
2111
2121
  resolveRuntimeUnsetDefinition: (token, registry) => resolveRuntimeUnsetFieldDefinition(token, "update", registry),
2112
2122
  };
2113
2123
  //# sourceMappingURL=update.js.map
2114
- //# debugId=c88f01be-6abe-5fa2-9792-3f54e61bb282
2124
+ //# debugId=6865ca88-7ca1-52fd-86fb-2a3439abeafa
@@ -1,7 +1,8 @@
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]="0492d773-2af2-5072-8164-9f8aab536191")}catch(e){}}();
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]="8a3a82a1-9e3d-555f-9111-3c3e19887f75")}catch(e){}}();
3
3
  import { EXIT_CODE } from "../core/shared/constants.js";
4
4
  import { PmCliError } from "../core/shared/errors.js";
5
+ import { transferMutationStdinTokenPolicy, } from "./runtime-primitives.js";
5
6
  import { createUnknownSubcommandError } from "./agent/subcommand-recovery.js";
6
7
  import { resolvePmRoot } from "../core/store/paths.js";
7
8
  import { runEval } from "./eval.js";
@@ -14,7 +15,8 @@ import { parseRuntimeInteger, readRuntimeString, readRuntimeStringArray, } from
14
15
  import { runEvent, runMeet, runRemind, } from "./scheduling-shortcuts.js";
15
16
  import { createWorkspaceSnapshot, deleteWorkspaceSnapshot, inspectWorkspaceSnapshot, listWorkspaceSnapshots, planWorkspaceSnapshotRestore, restoreWorkspaceSnapshotWithRecovery, } from "./workspace-snapshot.js";
16
17
  function mergedInput(context) {
17
- return { ...context.args, ...context.options };
18
+ const input = { ...context.args, ...context.options };
19
+ return transferMutationStdinTokenPolicy(context.options, input);
18
20
  }
19
21
  function requiredString(input, key) {
20
22
  const value = readRuntimeString(input, key);
@@ -169,4 +171,4 @@ export function runRuntimeSchedulingAction(context) {
169
171
  return runRemind(title, input, context.global);
170
172
  }
171
173
  //# sourceMappingURL=runtime-extended-actions.js.map
172
- //# debugId=0492d773-2af2-5072-8164-9f8aab536191
174
+ //# debugId=8a3a82a1-9e3d-555f-9111-3c3e19887f75
@@ -3,6 +3,10 @@ import type { CloseManyCommandOptions } from "./lifecycle/close-many.js";
3
3
  import type { UpdateManyCommandOptions } from "./lifecycle/update-many.js";
4
4
  import type { GraphCommandOptions } from "./graph/run.js";
5
5
  import type { ListOptions } from "./query/list.js";
6
+ /** Mark an action object decoded from the MCP JSON-RPC transport. */
7
+ export declare function markMcpMutationTransportInput<T extends object>(input: T): T;
8
+ /** Clone mutation options with overrides while retaining stdin provenance. */
9
+ export declare function mutationOptionsWithOverrides<Source extends object, Overrides extends object>(source: Source, overrides: Overrides, omittedKeys?: readonly PropertyKey[]): Source & Overrides;
6
10
  /** Read a non-empty string without altering its caller-provided whitespace. */
7
11
  export declare function readRuntimeString(args: Record<string, unknown>, key: string): string | undefined;
8
12
  /** Normalize a non-empty string or finite number into a scalar string. */