@unbrained/pm-cli 2026.8.7 → 2026.8.8

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 (226) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +35 -0
  3. package/dist/cli/main.js +4 -3
  4. package/dist/cli/register-annotations.d.ts +11 -0
  5. package/dist/cli/register-annotations.js +195 -0
  6. package/dist/cli/register-history-author.js +7 -30
  7. package/dist/cli/register-mutation.js +25 -206
  8. package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
  9. package/dist/cli/runtime-compatibility-boundary.js +43 -0
  10. package/dist/cli-bundle/bundle-manifest.json +155 -691
  11. package/dist/cli-bundle/chunks/chunk-2ZMXX3Q6.js +2068 -0
  12. package/dist/cli-bundle/chunks/chunk-ALDHXLPS.js +3 -0
  13. package/dist/cli-bundle/chunks/chunk-CBLA33YK.js +8 -0
  14. package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +5 -0
  15. package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +2 -0
  16. package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +26 -0
  17. package/dist/cli-bundle/chunks/chunk-NUXRRNAB.js +77 -0
  18. package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +13 -0
  19. package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +194 -0
  20. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
  21. package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +2 -0
  22. package/dist/cli-bundle/chunks/{register-list-query-FJZCJ67O.js → register-list-query-WFZAMJHZ.js} +8 -8
  23. package/dist/cli-bundle/chunks/register-mutation-SOKKOTHQ.js +20 -0
  24. package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +2 -0
  25. package/dist/cli-bundle/chunks/register-setup-2HL5ZHMK.js +2 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +2 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-VZFU2R4M.js → chunk-5FLBTZJQ.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +2 -0
  29. package/dist/cli-bundle/focused-chunks/{chunk-HNL6IFGS.js → chunk-ANTMGYLI.js} +2 -2
  30. package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +14 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-NBJKQP4S.js → chunk-DMKOMTTY.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/{chunk-CIXVQPB7.js → chunk-F5B3HBEZ.js} +2 -2
  33. package/dist/cli-bundle/focused-chunks/{chunk-R2LEMEV5.js → chunk-FI6DWU2M.js} +2 -2
  34. package/dist/cli-bundle/focused-chunks/{chunk-3K4XV2BF.js → chunk-FNOKJG6N.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/{chunk-RW5IYD4J.js → chunk-FPDYXZBK.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-QHRTT7WT.js → chunk-GWI6YIKJ.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-MHMTKV5V.js → chunk-HCUC62AB.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/{chunk-MOTJFQ3F.js → chunk-HGNKPSCB.js} +12 -12
  39. package/dist/cli-bundle/focused-chunks/{chunk-4VJQTS3P.js → chunk-IAS7PMLG.js} +2 -2
  40. package/dist/cli-bundle/focused-chunks/{chunk-TIKDBG4D.js → chunk-PL2EYDJK.js} +27 -27
  41. package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +2 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-RPNYG5MO.js → chunk-TCSAPH33.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +18 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-YZEZAPJK.js → chunk-YSAHYUXX.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-73JUDYXT.js → chunk-ZOLDTUU7.js} +2 -2
  47. package/dist/cli-bundle/main.js +13 -13
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +38 -38
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +1 -1
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +2 -1
  58. package/dist/cli.js +14 -4
  59. package/dist/core/output/output.js +9 -2
  60. package/dist/core/sentry/helpers.d.ts +10 -0
  61. package/dist/core/sentry/helpers.js +59 -4
  62. package/dist/core/shared/constants.d.ts +2 -0
  63. package/dist/core/shared/constants.js +4 -2
  64. package/dist/sdk/annotations.d.ts +40 -0
  65. package/dist/sdk/annotations.js +61 -9
  66. package/dist/sdk/author-attribution.d.ts +12 -0
  67. package/dist/sdk/author-attribution.js +73 -11
  68. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
  69. package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
  70. package/dist/sdk/cli-contracts/completeness.js +5 -3
  71. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  72. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -0
  73. package/dist/sdk/cli-contracts/runtime-contracts.js +29 -2
  74. package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -2
  75. package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
  76. package/dist/sdk/cli-contracts/tool-schema.js +6 -3
  77. package/dist/sdk/comments.d.ts +7 -0
  78. package/dist/sdk/comments.js +2 -2
  79. package/dist/sdk/completion.js +9 -5
  80. package/dist/sdk/contracts.d.ts +1 -0
  81. package/dist/sdk/contracts.js +3 -2
  82. package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
  83. package/dist/sdk/environment/host-environment-errors.js +124 -0
  84. package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
  85. package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
  86. package/dist/sdk/environment/source-context.d.ts +23 -0
  87. package/dist/sdk/environment/source-context.js +29 -0
  88. package/dist/sdk/error-code-catalog.d.ts +6 -0
  89. package/dist/sdk/error-code-catalog.js +62 -8
  90. package/dist/sdk/generated-error-code-catalog.js +629 -3
  91. package/dist/sdk/governance/health.d.ts +11 -3
  92. package/dist/sdk/governance/health.js +5 -5
  93. package/dist/sdk/index.d.ts +7 -3
  94. package/dist/sdk/index.js +9 -5
  95. package/dist/sdk/learnings.d.ts +15 -0
  96. package/dist/sdk/learnings.js +2 -2
  97. package/dist/sdk/lifecycle/close-many.d.ts +6 -1
  98. package/dist/sdk/lifecycle/close-many.js +43 -5
  99. package/dist/sdk/lifecycle/update-many.d.ts +2 -1
  100. package/dist/sdk/lifecycle/update-many.js +29 -5
  101. package/dist/sdk/merge/index.d.ts +1 -1
  102. package/dist/sdk/merge/index.js +3 -3
  103. package/dist/sdk/merge/install.d.ts +21 -0
  104. package/dist/sdk/merge/install.js +50 -20
  105. package/dist/sdk/notes.d.ts +7 -0
  106. package/dist/sdk/notes.js +2 -2
  107. package/dist/sdk/read-output-contracts.js +83 -4
  108. package/dist/sdk/runtime.d.ts +1 -1
  109. package/dist/sdk/runtime.js +9 -25
  110. package/dist/sdk/test/execution.js +4 -2
  111. package/dist/sdk/test/parsers.js +5 -2
  112. package/dist/sdk/workspace-snapshot.d.ts +9 -0
  113. package/dist/sdk/workspace-snapshot.js +48 -16
  114. package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
  115. package/docs/README.md +1 -0
  116. package/docs/RELEASING.md +27 -2
  117. package/docs/SCRIPTING.md +27 -1
  118. package/docs/SDK_CONTEXT_INTEGRITY.md +66 -0
  119. package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
  120. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
  121. package/docs/TESTING.md +17 -0
  122. package/marketplace.json +2 -2
  123. package/package.json +5 -3
  124. package/packages/pm-beads/package.json +1 -1
  125. package/packages/pm-calendar/package.json +1 -1
  126. package/packages/pm-command-kit/package.json +1 -1
  127. package/packages/pm-digital-twin/package.json +1 -1
  128. package/packages/pm-governance-audit/package.json +1 -1
  129. package/packages/pm-guide-shell/package.json +1 -1
  130. package/packages/pm-kanban/package.json +1 -1
  131. package/packages/pm-lifecycle-hooks/package.json +1 -1
  132. package/packages/pm-linked-test-adapters/package.json +1 -1
  133. package/packages/pm-search-advanced/package.json +1 -1
  134. package/packages/pm-templates/package.json +1 -1
  135. package/packages/pm-todos/package.json +1 -1
  136. package/packages/pm-vcs/package.json +1 -1
  137. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  138. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  139. package/sdk/public-surface.json +529 -34
  140. package/dist/cli-bundle/chunks/append-7BXBFDGD.js +0 -2
  141. package/dist/cli-bundle/chunks/chunk-2AXF3VSK.js +0 -2
  142. package/dist/cli-bundle/chunks/chunk-2XS43CCV.js +0 -2
  143. package/dist/cli-bundle/chunks/chunk-3A6KWB72.js +0 -8
  144. package/dist/cli-bundle/chunks/chunk-3ISTDB42.js +0 -8
  145. package/dist/cli-bundle/chunks/chunk-4MTI7XOV.js +0 -5
  146. package/dist/cli-bundle/chunks/chunk-6BX5UDCN.js +0 -3
  147. package/dist/cli-bundle/chunks/chunk-6QPO7KLR.js +0 -2
  148. package/dist/cli-bundle/chunks/chunk-7MXHZHSQ.js +0 -5
  149. package/dist/cli-bundle/chunks/chunk-7ZPMJW4U.js +0 -2
  150. package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
  151. package/dist/cli-bundle/chunks/chunk-AGYNSNCI.js +0 -2
  152. package/dist/cli-bundle/chunks/chunk-B4H7FEFH.js +0 -5
  153. package/dist/cli-bundle/chunks/chunk-B4KLBBMN.js +0 -2
  154. package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
  155. package/dist/cli-bundle/chunks/chunk-CALJHNBL.js +0 -23
  156. package/dist/cli-bundle/chunks/chunk-CFIGP5LY.js +0 -2
  157. package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
  158. package/dist/cli-bundle/chunks/chunk-CS6MRHG7.js +0 -2
  159. package/dist/cli-bundle/chunks/chunk-CUGNQQKH.js +0 -2
  160. package/dist/cli-bundle/chunks/chunk-D4FPS43D.js +0 -164
  161. package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
  162. package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
  163. package/dist/cli-bundle/chunks/chunk-H5Y5YE6A.js +0 -2
  164. package/dist/cli-bundle/chunks/chunk-H5Y6UV6E.js +0 -2
  165. package/dist/cli-bundle/chunks/chunk-H7KGWPDF.js +0 -2
  166. package/dist/cli-bundle/chunks/chunk-HFSD77TQ.js +0 -2
  167. package/dist/cli-bundle/chunks/chunk-HX2GTA6L.js +0 -2
  168. package/dist/cli-bundle/chunks/chunk-J2IEKAVR.js +0 -2
  169. package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
  170. package/dist/cli-bundle/chunks/chunk-K44PYFXH.js +0 -2
  171. package/dist/cli-bundle/chunks/chunk-K4KGEEBT.js +0 -2
  172. package/dist/cli-bundle/chunks/chunk-KFLK5TRH.js +0 -21
  173. package/dist/cli-bundle/chunks/chunk-KL6IEBV2.js +0 -2
  174. package/dist/cli-bundle/chunks/chunk-KWQZDZSS.js +0 -2
  175. package/dist/cli-bundle/chunks/chunk-KZ4X3DGU.js +0 -3
  176. package/dist/cli-bundle/chunks/chunk-LD77HJMQ.js +0 -13
  177. package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
  178. package/dist/cli-bundle/chunks/chunk-ME2JJ4LA.js +0 -3
  179. package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
  180. package/dist/cli-bundle/chunks/chunk-NFLJ3FHD.js +0 -2
  181. package/dist/cli-bundle/chunks/chunk-NG6OXIBR.js +0 -19
  182. package/dist/cli-bundle/chunks/chunk-NYIGHWQY.js +0 -8
  183. package/dist/cli-bundle/chunks/chunk-NZ75GNSA.js +0 -2
  184. package/dist/cli-bundle/chunks/chunk-PCJWJNC2.js +0 -2
  185. package/dist/cli-bundle/chunks/chunk-PD3225AM.js +0 -2
  186. package/dist/cli-bundle/chunks/chunk-PDEGKG7P.js +0 -2
  187. package/dist/cli-bundle/chunks/chunk-PIE5HBNA.js +0 -2
  188. package/dist/cli-bundle/chunks/chunk-PW2H7YJR.js +0 -56
  189. package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
  190. package/dist/cli-bundle/chunks/chunk-TPKN3S7S.js +0 -2
  191. package/dist/cli-bundle/chunks/chunk-TPXAXTCO.js +0 -2
  192. package/dist/cli-bundle/chunks/chunk-UFWUJO4V.js +0 -2
  193. package/dist/cli-bundle/chunks/chunk-UQLZQVFW.js +0 -55
  194. package/dist/cli-bundle/chunks/chunk-VT3Z5G7D.js +0 -2
  195. package/dist/cli-bundle/chunks/chunk-WOD3WWUN.js +0 -2
  196. package/dist/cli-bundle/chunks/chunk-WSJEIGJF.js +0 -3
  197. package/dist/cli-bundle/chunks/chunk-WYNUU7ZW.js +0 -2008
  198. package/dist/cli-bundle/chunks/chunk-YGPNCCXZ.js +0 -2
  199. package/dist/cli-bundle/chunks/close-CMY3BAUG.js +0 -2
  200. package/dist/cli-bundle/chunks/close-many-SA4XZCTK.js +0 -2
  201. package/dist/cli-bundle/chunks/comments-EZ556ZD3.js +0 -2
  202. package/dist/cli-bundle/chunks/copy-ZSGPA52X.js +0 -2
  203. package/dist/cli-bundle/chunks/create-I5DVV4YG.js +0 -2
  204. package/dist/cli-bundle/chunks/delete-RL3JACSW.js +0 -2
  205. package/dist/cli-bundle/chunks/deps-S7UBCECS.js +0 -2
  206. package/dist/cli-bundle/chunks/docs-ZZNVBBYO.js +0 -2
  207. package/dist/cli-bundle/chunks/files-27C337VT.js +0 -2
  208. package/dist/cli-bundle/chunks/focus-5Z2SG7LU.js +0 -2
  209. package/dist/cli-bundle/chunks/history-compact-HJQK67CZ.js +0 -2
  210. package/dist/cli-bundle/chunks/history-redact-PWC6PDWA.js +0 -2
  211. package/dist/cli-bundle/chunks/history-repair-N3CY4WBF.js +0 -2
  212. package/dist/cli-bundle/chunks/learnings-4FH23XDT.js +0 -2
  213. package/dist/cli-bundle/chunks/profile-5Y5XXH5N.js +0 -2
  214. package/dist/cli-bundle/chunks/register-mutation-YGYPW3BL.js +0 -20
  215. package/dist/cli-bundle/chunks/register-operations-WMDSUMQF.js +0 -2
  216. package/dist/cli-bundle/chunks/register-setup-DL7FFABC.js +0 -2
  217. package/dist/cli-bundle/chunks/restore-6KYBV5BY.js +0 -2
  218. package/dist/cli-bundle/chunks/schema-EQGKBYXJ.js +0 -2
  219. package/dist/cli-bundle/chunks/update-QVTYOD6I.js +0 -2
  220. package/dist/cli-bundle/chunks/update-many-DJSBU525.js +0 -2
  221. package/dist/cli-bundle/focused-chunks/chunk-2ECLECMK.js +0 -12
  222. package/dist/cli-bundle/focused-chunks/chunk-4EX25PXM.js +0 -8
  223. package/dist/cli-bundle/focused-chunks/chunk-DLTS3IHM.js +0 -2
  224. package/dist/cli-bundle/focused-chunks/chunk-DQ6FKGL3.js +0 -14
  225. package/dist/cli-bundle/focused-chunks/chunk-JLG2C4EQ.js +0 -2
  226. package/dist/cli-bundle/focused-chunks/chunk-ZJIMJHDB.js +0 -2
@@ -45,13 +45,13 @@ export interface RunHealthOptions {
45
45
  strictDirectories?: boolean;
46
46
  /** Treat absent clone-local merge drivers as a required health failure instead of an advisory. */
47
47
  requireMergeDrivers?: boolean;
48
- /** Value that configures or reports check only for this contract. */
48
+ /** Preserve the legacy compact check projection while keeping diagnostics read-only. */
49
49
  checkOnly?: boolean;
50
50
  /** Value that configures or reports check telemetry for this contract. */
51
51
  checkTelemetry?: boolean;
52
- /** Value that configures or reports no refresh for this contract. */
52
+ /** Explicitly document that vector refresh is disabled. */
53
53
  noRefresh?: boolean;
54
- /** Value that configures or reports refresh vectors for this contract. */
54
+ /** Opt in to the only mutating health operation: refreshing stale vectors. */
55
55
  refreshVectors?: boolean;
56
56
  /** Value that configures or reports verbose stale items for this contract. */
57
57
  verboseStaleItems?: boolean;
@@ -70,6 +70,12 @@ export interface RunHealthOptions {
70
70
  /** Value that configures or reports summary for this contract. */
71
71
  summary?: boolean;
72
72
  }
73
+ interface VectorRefreshPolicy {
74
+ enabled: boolean;
75
+ checkOnly: boolean;
76
+ noRefresh: boolean;
77
+ refreshVectors: boolean;
78
+ }
73
79
  interface MigrationStatusEntry {
74
80
  layer: "global" | "project";
75
81
  name: string;
@@ -163,6 +169,7 @@ declare function probeTelemetryEndpointHealth(endpoint: string): Promise<{
163
169
  error?: string;
164
170
  }>;
165
171
  declare function buildVectorizationProviderDetails(settings: PmSettings, snapshot: VectorizationRuntimeSnapshot): Record<string, unknown>;
172
+ declare function resolveVectorRefreshPolicy(options: RunHealthOptions): VectorRefreshPolicy;
166
173
  interface HealthSkipPolicy {
167
174
  summaryMode: boolean;
168
175
  skipIntegrity: boolean;
@@ -196,6 +203,7 @@ export declare const _testOnlyHealthCommand: {
196
203
  resolveActionableUnknownAuthorEventCount: (authorAttribution: HistoryAuthorAttributionScan) => number;
197
204
  resolveHealthSkipPolicy: typeof resolveHealthSkipPolicy;
198
205
  resolveUnknownAuthorEventCount: (authorAttribution: HistoryAuthorAttributionScan) => number;
206
+ resolveVectorRefreshPolicy: typeof resolveVectorRefreshPolicy;
199
207
  selectStaleItemDetail: typeof selectStaleItemDetail;
200
208
  summarizeHealthCheckDetails: typeof summarizeHealthCheckDetails;
201
209
  summarizeExtensionList: typeof summarizeExtensionList;
@@ -4,7 +4,7 @@
4
4
  * Implements the pm health 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]="34fc99f6-45e5-53f2-96eb-767d50ed449c")}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]="4efa3db2-6be7-5650-b1c7-d80e125694aa")}catch(e){}}();
8
8
  import fs from "node:fs/promises";
9
9
  import path from "node:path";
10
10
  import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
@@ -1549,7 +1549,6 @@ function validateSettingsValues(settings) {
1549
1549
  }
1550
1550
  function resolveVectorRefreshPolicy(options) {
1551
1551
  const checkOnly = options.checkOnly === true;
1552
- const noRefresh = options.noRefresh === true || checkOnly;
1553
1552
  const refreshVectors = options.refreshVectors === true;
1554
1553
  if (refreshVectors && checkOnly) {
1555
1554
  throw new PmCliError("--check-only cannot be combined with --refresh-vectors", EXIT_CODE.USAGE);
@@ -1558,9 +1557,9 @@ function resolveVectorRefreshPolicy(options) {
1558
1557
  throw new PmCliError("--no-refresh cannot be combined with --refresh-vectors", EXIT_CODE.USAGE);
1559
1558
  }
1560
1559
  return {
1561
- enabled: refreshVectors || !noRefresh,
1560
+ enabled: refreshVectors,
1562
1561
  checkOnly,
1563
- noRefresh,
1562
+ noRefresh: !refreshVectors,
1564
1563
  refreshVectors,
1565
1564
  };
1566
1565
  }
@@ -1955,6 +1954,7 @@ export const _testOnlyHealthCommand = {
1955
1954
  resolveActionableUnknownAuthorEventCount,
1956
1955
  resolveHealthSkipPolicy,
1957
1956
  resolveUnknownAuthorEventCount,
1957
+ resolveVectorRefreshPolicy,
1958
1958
  selectStaleItemDetail,
1959
1959
  summarizeHealthCheckDetails,
1960
1960
  summarizeExtensionList,
@@ -1964,4 +1964,4 @@ export const _testOnlyHealthCommand = {
1964
1964
  warningCode,
1965
1965
  };
1966
1966
  //# sourceMappingURL=health.js.map
1967
- //# debugId=34fc99f6-45e5-53f2-96eb-767d50ed449c
1967
+ //# debugId=4efa3db2-6be7-5650-b1c7-d80e125694aa
@@ -6,8 +6,8 @@
6
6
  export { PM_COMMAND_VISIBILITY_CONTRACTS, PM_MCP_PROMPT_CONTRACTS, PM_MCP_RESOURCE_CONTRACTS, PM_MCP_TOOL_COMMAND_CONTRACTS, listPmCommandsForTier, listPmMcpToolsForProfile, renderPmCommandVisibilityMarkdown, resolvePmCommandVisibilityTier, } from "./agent-capability-contracts.js";
7
7
  export * from "./agent-session-context.js";
8
8
  export type { PmCommandVisibilityContract, PmCommandVisibilityTier, PmMcpPromptArgumentContract, PmMcpPromptContract, PmMcpResourceContract, PmMcpToolProfile, } from "./agent-capability-contracts.js";
9
- export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, type AnnotationCommandConfig, type AnnotationCommandOptions, type AnnotationCommandResult, type AnnotationEntry, type AnnotationInput, type AnnotationSourceOptions, type OwnershipConflictGuidance, } from "./annotations.js";
10
- export { acknowledgeUnknownAuthorHistoryEvents, inspectHistoryAuthorStream, scanHistoryAuthorAttribution, type AcknowledgeUnknownAuthorEventsOptions, type HistoryAuthorAttributionScan, type UnknownAuthorHistoryEvent, } from "./author-attribution.js";
9
+ export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, normalizeAnnotationTransportOptions, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, type AnnotationCommandConfig, type AnnotationCommandOptions, type AnnotationCommandResult, type AnnotationEntry, type AnnotationInput, type AnnotationHistoryRestoration, type AnnotationMutationReceipt, type AnnotationOmissionReceipt, type AnnotationSourceOptions, type OwnershipConflictGuidance, } from "./annotations.js";
10
+ export { acknowledgeUnknownAuthorHistoryEvents, acknowledgeUnknownAuthorHistoryEventsFromTransport, inspectHistoryAuthorStream, parseUnknownAuthorHistoryEventCoordinates, resolveUnknownAuthorAcknowledgmentSelector, scanHistoryAuthorAttribution, type AcknowledgeUnknownAuthorEventsOptions, type HistoryAuthorAttributionScan, type UnknownAuthorHistoryEvent, } from "./author-attribution.js";
11
11
  export { BUILTIN_CORPUS_SHAPES, PM_CORPUS_SHAPE_SCHEMA, buildCorpusShapeItemPlan, createCorpusShapeMeasurement, defineCorpusShape, listBuiltinCorpusShapes, measureCorpusShapePlan, resolveBuiltinCorpusShape, type BuiltinCorpusShapeName, type CorpusShape, type CorpusShapeEdgeWeight, type CorpusShapeItemPlan, type CorpusShapeMeasurement, type CorpusShapeProfile, } from "./corpus-shape.js";
12
12
  export * from "./core-governance.js";
13
13
  export { createPmCliProgram } from "./cli-program.js";
@@ -29,7 +29,7 @@ export { runEvent, runMeet, runRemind, type MeetingEventShortcutOptions, type Re
29
29
  export { createExtensionCommandSdk } from "./extension-command-context.js";
30
30
  export { isRuntimeRecord } from "./runtime-input.js";
31
31
  export { resolveStartTaskInProgressStatus } from "./start-task-status.js";
32
- export { auditMergeAttributeFence, buildMergeAttributePatterns, findGitWorkspaceRoot, installMergeFence, refreshMergeAttributeFenceIfInstalled, resolveProjectMergeTypeFolders, runMergeInstall, type MergeFenceAuditResult, type MergeFenceRefreshOutcome, type MergeInstallOptions, type MergeInstallResult, } from "./merge/install.js";
32
+ export { auditMergeAttributeFence, buildMergeAttributePatterns, findGitWorkspaceRoot, installMergeFence, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, resolveProjectMergeTypeFolders, runMergeInstall, type MergeFenceAuditResult, type MergeFenceRefreshOutcome, type MergeInstallOptions, type MergeInstallContextResolution, type MergeInstallResult, } from "./merge/install.js";
33
33
  export { deriveSchemaEvolutionMigrationId, formatSchemaEvolutionMigrationHuman, planSchemaEvolutionMigration, runSchemaEvolutionMigration, type PlanSchemaEvolutionMigrationOptions, type SchemaEvolutionFieldChange, type SchemaEvolutionItemPlan, type SchemaEvolutionMigrationPlan, } from "./schema-migration.js";
34
34
  export { runWithActiveExtensions, type ActiveExtensionScopeOptions, } from "./runtime.js";
35
35
  export { applyInvocationAuthorOverride } from "./invocation-author.js";
@@ -52,6 +52,10 @@ export { ACTIVITY_FLAG_CONTRACTS, ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, AG
52
52
  export type { CliFlagContract, OptionsFromContracts, PmActionSchemaContract, PmActionToolInputSchemaOptions, PmToolCustomFieldCollision, PmBulkMutationControlOptions, PmBulkMutationFilterOptions, PmCloseActionOptions, PmCloseManyActionOptions, PmCreateActionOptions, PmMutationAttributionOptions, PmOptionScalar, PmCommandOutputBudgetContract, PmOutputBudgetClass, PmOutputDegradationStep, PmUpdateActionOptions, PmUpdateManyActionOptions, PmExtensionCapabilityContract, PmExtensionPolicyModeContract, PmExtensionPolicySurfaceContract, PmExtensionSandboxProfileContract, PmExtensionServiceNameContract, PmExtensionTrustModeContract, PmToolAction, SdkCliActionParameterCoverage, SdkCliCompletenessContractSource, SdkCliParameterCoverageEntry, SdkCliParameterDisposition, ToolOptionFlagContract, } from "./cli-contracts.js";
53
53
  export * from "./compose.js";
54
54
  export * from "./compile-cache.js";
55
+ export * from "./environment/project-runtime-compatibility.js";
56
+ export * from "./environment/source-context.js";
57
+ export * from "./environment/host-environment-errors.js";
58
+ export * from "./cli-contracts/command-exit-contracts.js";
55
59
  export * from "./context-relevance.js";
56
60
  export * from "./context-intent-contracts.js";
57
61
  export * from "./context-intent-runtime.js";
package/dist/sdk/index.js CHANGED
@@ -4,11 +4,11 @@
4
4
  * Defines public SDK APIs and package-author helpers for Index.
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]="346cbfc0-a42a-5ae6-b95a-af3bd63fc6d1")}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]="ae84c7af-bfa7-577d-b9f3-2bd9450d5755")}catch(e){}}();
8
8
  export { PM_COMMAND_VISIBILITY_CONTRACTS, PM_MCP_PROMPT_CONTRACTS, PM_MCP_RESOURCE_CONTRACTS, PM_MCP_TOOL_COMMAND_CONTRACTS, listPmCommandsForTier, listPmMcpToolsForProfile, renderPmCommandVisibilityMarkdown, resolvePmCommandVisibilityTier, } from "./agent-capability-contracts.js";
9
9
  export * from "./agent-session-context.js";
10
- export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, } from "./annotations.js";
11
- export { acknowledgeUnknownAuthorHistoryEvents, inspectHistoryAuthorStream, scanHistoryAuthorAttribution, } from "./author-attribution.js";
10
+ export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, normalizeAnnotationTransportOptions, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, } from "./annotations.js";
11
+ export { acknowledgeUnknownAuthorHistoryEvents, acknowledgeUnknownAuthorHistoryEventsFromTransport, inspectHistoryAuthorStream, parseUnknownAuthorHistoryEventCoordinates, resolveUnknownAuthorAcknowledgmentSelector, scanHistoryAuthorAttribution, } from "./author-attribution.js";
12
12
  export { BUILTIN_CORPUS_SHAPES, PM_CORPUS_SHAPE_SCHEMA, buildCorpusShapeItemPlan, createCorpusShapeMeasurement, defineCorpusShape, listBuiltinCorpusShapes, measureCorpusShapePlan, resolveBuiltinCorpusShape, } from "./corpus-shape.js";
13
13
  export * from "./core-governance.js";
14
14
  export { createPmCliProgram } from "./cli-program.js";
@@ -30,7 +30,7 @@ export { runEvent, runMeet, runRemind, } from "./scheduling-shortcuts.js";
30
30
  export { createExtensionCommandSdk } from "./extension-command-context.js";
31
31
  export { isRuntimeRecord } from "./runtime-input.js";
32
32
  export { resolveStartTaskInProgressStatus } from "./start-task-status.js";
33
- export { auditMergeAttributeFence, buildMergeAttributePatterns, findGitWorkspaceRoot, installMergeFence, refreshMergeAttributeFenceIfInstalled, resolveProjectMergeTypeFolders, runMergeInstall, } from "./merge/install.js";
33
+ export { auditMergeAttributeFence, buildMergeAttributePatterns, findGitWorkspaceRoot, installMergeFence, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, resolveProjectMergeTypeFolders, runMergeInstall, } from "./merge/install.js";
34
34
  export { deriveSchemaEvolutionMigrationId, formatSchemaEvolutionMigrationHuman, planSchemaEvolutionMigration, runSchemaEvolutionMigration, } from "./schema-migration.js";
35
35
  export { runWithActiveExtensions, } from "./runtime.js";
36
36
  export { applyInvocationAuthorOverride } from "./invocation-author.js";
@@ -50,6 +50,10 @@ export { PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS, PM_PACKAGE_RESOURCE_KINDS, coll
50
50
  export { ACTIVITY_FLAG_CONTRACTS, ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_ACTION_OPTION_KEYS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PLAN_FLAG_CONTRACTS, PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_CORE_COMMAND_NAMES, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_ACTIONS, analyzePmToolActionParity, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, PROFILE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, compactFlagAliasContracts, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, analyzeSdkCliParameterCompleteness, isPmExtensionCapabilityContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, isPmExtensionServiceNameContract, isPmToolAction, hasSubcommandFlagContractsForCommand, readFirstStringFromCommanderOptions, readFirstValueFromCommanderOptions, readStringArrayFromCommanderOptions, resolveSubcommandFlagContractsForCommand, resolvePmCommandOutputBudget, resolvePmToolCustomFieldCollision, toCompletionFlagString, withFlagAliasMetadata, } from "./cli-contracts.js";
51
51
  export * from "./compose.js";
52
52
  export * from "./compile-cache.js";
53
+ export * from "./environment/project-runtime-compatibility.js";
54
+ export * from "./environment/source-context.js";
55
+ export * from "./environment/host-environment-errors.js";
56
+ export * from "./cli-contracts/command-exit-contracts.js";
53
57
  export * from "./context-relevance.js";
54
58
  export * from "./context-intent-contracts.js";
55
59
  export * from "./context-intent-runtime.js";
@@ -137,4 +141,4 @@ export * from "./governance.js";
137
141
  export * from "./query.js";
138
142
  export * from "./testing.js";
139
143
  //# sourceMappingURL=index.js.map
140
- //# debugId=346cbfc0-a42a-5ae6-b95a-af3bd63fc6d1
144
+ //# debugId=ae84c7af-bfa7-577d-b9f3-2bd9450d5755
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { type GlobalOptions } from "./runtime-primitives.js";
7
7
  import type { LogNote } from "../types/index.js";
8
+ import { type AnnotationMutationReceipt, type AnnotationOmissionReceipt } from "./annotations.js";
8
9
  /** Documents the learnings command options payload exchanged by command, SDK, and package integrations. */
9
10
  export interface LearningsCommandOptions {
10
11
  /** Value that configures or reports add for this contract. */
@@ -19,6 +20,8 @@ export interface LearningsCommandOptions {
19
20
  delete?: number;
20
21
  /** Value that configures or reports limit for this contract. */
21
22
  limit?: string;
23
+ /** Return complete learning history after a mutation instead of a bounded receipt. */
24
+ fullHistory?: boolean;
22
25
  /** Value that configures or reports author for this contract. */
23
26
  author?: string;
24
27
  /** Human-readable explanation suitable for logs and agent-facing output. */
@@ -34,6 +37,18 @@ export interface LearningsResult {
34
37
  learnings: LogNote[];
35
38
  /** Value that configures or reports count for this contract. */
36
39
  count: number;
40
+ /** Total learning count after the mutation. */
41
+ total_count?: number;
42
+ /** Number of learning entries returned in this projection. */
43
+ returned_count?: number;
44
+ /** Whether additional stored learning entries were withheld. */
45
+ has_more?: boolean;
46
+ /** Applied read limit when one was requested. */
47
+ limit?: number;
48
+ /** Mutation identity when this result changed the collection. */
49
+ mutation_receipt?: AnnotationMutationReceipt;
50
+ /** Declares whether older learnings were withheld from a mutation response. */
51
+ omission_receipt?: AnnotationOmissionReceipt;
37
52
  }
38
53
  /** Implements run learnings for the public runtime surface of this module. */
39
54
  export declare function runLearnings(id: string, options: LearningsCommandOptions, global: GlobalOptions): Promise<LearningsResult>;
@@ -1,5 +1,5 @@
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]="26e30c82-7d6d-51b9-909f-b779213846b1")}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]="93184f29-f215-5413-9628-fb5b34523995")}catch(e){}}();
3
3
  import { parseAnnotationTextInput, resolveAnnotationInput, runAnnotationCommand, } from "./annotations.js";
4
4
  /** Implements run learnings for the public runtime surface of this module. */
5
5
  export async function runLearnings(id, options, global) {
@@ -24,4 +24,4 @@ export async function runLearnings(id, options, global) {
24
24
  });
25
25
  }
26
26
  //# sourceMappingURL=learnings.js.map
27
- //# debugId=26e30c82-7d6d-51b9-909f-b779213846b1
27
+ //# debugId=93184f29-f215-5413-9628-fb5b34523995
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { type GlobalOptions, readSettings } from "../runtime-primitives.js";
7
7
  import { type ListOptions } from "../query/list.js";
8
+ import { type PmCommandEffectReceipt } from "../cli-contracts/command-exit-contracts.js";
8
9
  /** Documents the close many command options payload exchanged by command, SDK, and package integrations. */
9
10
  export interface CloseManyCommandOptions {
10
11
  /** Lifecycle state reported for status. */
@@ -55,7 +56,7 @@ interface CloseManyApplyRow {
55
56
  error?: string;
56
57
  }
57
58
  /** Documents the close many result payload exchanged by command, SDK, and package integrations. */
58
- export interface CloseManyResult {
59
+ export interface CloseManyResult extends PmCommandEffectReceipt {
59
60
  /** Value that configures or reports mode for this contract. */
60
61
  mode: "dry_run" | "apply" | "rollback";
61
62
  /** Number of matched entries represented by this result. */
@@ -97,6 +98,10 @@ export interface CloseManyResult {
97
98
  }>;
98
99
  /** Value that configures or reports ids for this contract. */
99
100
  ids: string[];
101
+ /** Explicitly requested --ids values that matched no selected item. */
102
+ unmatched_ids?: string[];
103
+ /** Number of explicitly requested --ids values that matched no selected item. */
104
+ unmatched_count?: number;
100
105
  }
101
106
  declare function hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean;
102
107
  declare function hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean;
@@ -4,12 +4,13 @@
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]="1be4d7c4-3ede-59cc-8d70-df966a66e67e")}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]="4da07a98-855e-59cf-a6a4-2f59a8b3c0bd")}catch(e){}}();
8
8
  import { pathExists, createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, getActiveExtensionRegistrations, isTerminalStatus, resolveItemTypeRegistry, resolveRuntimeStatusRegistry, EXIT_CODE, PmCliError, toErrorMessage, resolveAuthor, nowIso, listAllItemMetadataLight, getSettingsPath, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
9
9
  import { runClose } from "./close.js";
10
10
  import { hasListFilters } from "../query/list-filter-shared.js";
11
11
  import { runList } from "../query/list.js";
12
12
  import { runRestore } from "./restore.js";
13
+ import { derivePmBulkMutationEffect, } from "../cli-contracts/command-exit-contracts.js";
13
14
  const CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
14
15
  const CLOSE_MANY_CHECKPOINT_SUBDIR = "close-many";
15
16
  const CLOSE_MANY_FILTER_GUIDANCE = [
@@ -139,6 +140,12 @@ async function runCloseManyRollback(params) {
139
140
  const restoreMessage = params.options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;
140
141
  const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) => runRestore(id, targetUpdatedAt, { author: params.options.author, message: restoreMessage, force: true }, params.global));
141
142
  return {
143
+ ...derivePmBulkMutationEffect({
144
+ applied: rollback.restored_ids.length,
145
+ skipped: 0,
146
+ failed: rollback.failed_count,
147
+ unmatched: 0,
148
+ }),
142
149
  mode: "rollback",
143
150
  matched_count: checkpoint.items.length,
144
151
  dry_run: false,
@@ -266,6 +273,13 @@ async function buildCloseManyPlanContext(params) {
266
273
  const listed = await runList(params.options.status, activeListOptions(params.options.list), params.global);
267
274
  const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(params.pmRoot, params.settings);
268
275
  const matched = sortCloseManyMatchedItems(listed.items, parentByChild);
276
+ const requestedIds = [
277
+ ...new Set(String(params.options.list?.ids ?? "")
278
+ .split(",")
279
+ .map((entry) => entry.trim())
280
+ .filter((entry) => entry.length > 0)),
281
+ ];
282
+ const matchedIds = new Set(matched.map((item) => item.id));
269
283
  const closePlannedIds = resolveCloseManyPlannedIds(matched, statusRegistry, force);
270
284
  return {
271
285
  pmRoot: params.pmRoot,
@@ -276,11 +290,14 @@ async function buildCloseManyPlanContext(params) {
276
290
  force,
277
291
  listed,
278
292
  matched,
293
+ unmatchedIds: requestedIds.filter((id) => !matchedIds.has(id)),
279
294
  planRows: planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force),
280
295
  };
281
296
  }
282
297
  function buildCloseManyDryRunResult(context) {
283
298
  return {
299
+ outcome: "effect",
300
+ exit_code: EXIT_CODE.SUCCESS,
284
301
  mode: "dry_run",
285
302
  matched_count: context.matched.length,
286
303
  dry_run: true,
@@ -291,6 +308,12 @@ function buildCloseManyDryRunResult(context) {
291
308
  : {}),
292
309
  item_plans: context.planRows,
293
310
  ids: [],
311
+ ...(context.unmatchedIds.length > 0
312
+ ? {
313
+ unmatched_ids: context.unmatchedIds,
314
+ unmatched_count: context.unmatchedIds.length,
315
+ }
316
+ : {}),
294
317
  };
295
318
  }
296
319
  async function resolveCloseManyCheckpointInfo(params) {
@@ -362,7 +385,16 @@ export async function runCloseMany(options, global) {
362
385
  closeOptions,
363
386
  global,
364
387
  });
388
+ const closedCount = rows.filter((row) => row.status === "closed").length;
389
+ const skippedCount = rows.filter((row) => row.status === "skipped").length;
390
+ const failedCount = rows.filter((row) => row.status === "failed").length;
365
391
  return {
392
+ ...derivePmBulkMutationEffect({
393
+ applied: closedCount,
394
+ skipped: skippedCount,
395
+ failed: failedCount,
396
+ unmatched: context.unmatchedIds.length,
397
+ }),
366
398
  mode: "apply",
367
399
  matched_count: context.matched.length,
368
400
  dry_run: false,
@@ -372,11 +404,17 @@ export async function runCloseMany(options, global) {
372
404
  ? { validate_close: context.validateCloseMode }
373
405
  : {}),
374
406
  ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),
375
- closed_count: rows.filter((row) => row.status === "closed").length,
376
- skipped_count: rows.filter((row) => row.status === "skipped").length,
377
- failed_count: rows.filter((row) => row.status === "failed").length,
407
+ closed_count: closedCount,
408
+ skipped_count: skippedCount,
409
+ failed_count: failedCount,
378
410
  rows,
379
411
  ids: closedIds,
412
+ ...(context.unmatchedIds.length > 0
413
+ ? {
414
+ unmatched_ids: context.unmatchedIds,
415
+ unmatched_count: context.unmatchedIds.length,
416
+ }
417
+ : {}),
380
418
  };
381
419
  }
382
420
  /** Public contract for test only, shared by SDK and presentation-layer consumers. */
@@ -390,4 +428,4 @@ export const _testOnly = {
390
428
  resolveReason,
391
429
  };
392
430
  //# sourceMappingURL=close-many.js.map
393
- //# debugId=1be4d7c4-3ede-59cc-8d70-df966a66e67e
431
+ //# debugId=4da07a98-855e-59cf-a6a4-2f59a8b3c0bd
@@ -8,6 +8,7 @@ import type { ItemStatus, PmSettings } from "../../types/index.js";
8
8
  import { hasListFilters } from "../query/list-filter-shared.js";
9
9
  import { type ListOptions, type ListedItem } from "../query/list.js";
10
10
  import { type UpdateCommandOptions } from "./update.js";
11
+ import { type PmCommandEffectReceipt } from "../cli-contracts/command-exit-contracts.js";
11
12
  /** Documents the update many command options payload exchanged by command, SDK, and package integrations. */
12
13
  export interface UpdateManyCommandOptions {
13
14
  /** Lifecycle state reported for status. */
@@ -50,7 +51,7 @@ interface UpdateManyRollbackResultRow {
50
51
  error?: string;
51
52
  }
52
53
  /** Documents the update many result payload exchanged by command, SDK, and package integrations. */
53
- export interface UpdateManyResult {
54
+ export interface UpdateManyResult extends PmCommandEffectReceipt {
54
55
  /** Value that configures or reports mode for this contract. */
55
56
  mode: "dry_run" | "apply" | "rollback";
56
57
  /** Number of matched entries represented by this result. */
@@ -4,13 +4,14 @@
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]="61fe3a97-39e6-53de-8663-8e70d931a2d4")}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]="67f8958d-60d5-5657-93ce-9803859acd9e")}catch(e){}}();
8
8
  import { pathExists, 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, getSettingsPath, resolvePmRoot, readSettings, resolveAuthor, } from "../runtime-primitives.js";
9
9
  import { parseStatusFilterCsv } from "../../core/item/status-filter.js";
10
10
  import { hasListFilters } from "../query/list-filter-shared.js";
11
11
  import { runList, } from "../query/list.js";
12
12
  import { runRestore } from "./restore.js";
13
13
  import { runUpdate } from "./update.js";
14
+ import { derivePmBulkMutationEffect, } from "../cli-contracts/command-exit-contracts.js";
14
15
  const UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
15
16
  const UPDATE_MANY_CHECKPOINT_SUBDIR = "update-many";
16
17
  const NON_MUTATION_UPDATE_OPTION_KEYS = new Set([
@@ -519,6 +520,12 @@ const runUpdateManyRollback = async (params) => {
519
520
  force: params.options.update?.force ?? true,
520
521
  }, params.global));
521
522
  return {
523
+ ...derivePmBulkMutationEffect({
524
+ applied: rollback.restored_ids.length,
525
+ skipped: 0,
526
+ failed: rollback.failed_count,
527
+ unmatched: 0,
528
+ }),
522
529
  mode: "rollback",
523
530
  matched_count: checkpoint.items.length,
524
531
  dry_run: false,
@@ -642,6 +649,8 @@ const buildUpdateManyPlan = async (params) => {
642
649
  };
643
650
  /** Builds the non-mutating preview response for a prepared update-many plan. */
644
651
  const buildUpdateManyDryRunResult = (plan) => ({
652
+ outcome: "effect",
653
+ exit_code: EXIT_CODE.SUCCESS,
645
654
  mode: "dry_run",
646
655
  matched_count: plan.listed.items.length,
647
656
  dry_run: true,
@@ -653,6 +662,12 @@ const buildUpdateManyDryRunResult = (plan) => ({
653
662
  });
654
663
  /** Builds the apply response for a plan whose rows are all already current. */
655
664
  const buildUpdateManyNoopResult = (plan) => ({
665
+ ...derivePmBulkMutationEffect({
666
+ applied: 0,
667
+ skipped: plan.listed.items.length,
668
+ failed: 0,
669
+ unmatched: plan.unmatchedIds?.length ?? 0,
670
+ }),
656
671
  mode: "apply",
657
672
  matched_count: plan.listed.items.length,
658
673
  dry_run: false,
@@ -742,16 +757,25 @@ const applyUpdateManyPlan = async (params) => {
742
757
  });
743
758
  /** Counts apply rows with one terminal status. */
744
759
  const countStatus = (status) => applied.rows.filter((row) => row.status === status).length;
760
+ const updatedCount = countStatus("updated");
761
+ const skippedCount = countStatus("skipped");
762
+ const failedCount = countStatus("failed");
745
763
  return {
764
+ ...derivePmBulkMutationEffect({
765
+ applied: updatedCount,
766
+ skipped: skippedCount,
767
+ failed: failedCount,
768
+ unmatched: params.plan.unmatchedIds?.length ?? 0,
769
+ }),
746
770
  mode: "apply",
747
771
  matched_count: params.plan.listed.items.length,
748
772
  dry_run: false,
749
773
  filters: params.plan.listed.filters,
750
774
  planned_update_options: params.plan.updateSummary,
751
775
  ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),
752
- updated_count: countStatus("updated"),
753
- skipped_count: countStatus("skipped"),
754
- failed_count: countStatus("failed"),
776
+ updated_count: updatedCount,
777
+ skipped_count: skippedCount,
778
+ failed_count: failedCount,
755
779
  rows: applied.rows,
756
780
  ids: applied.updatedIds,
757
781
  ...buildUnmatchedIdFields(params.plan),
@@ -804,4 +828,4 @@ export const _testOnlyUpdateManyCommand = {
804
828
  toComparablePreviewValue,
805
829
  };
806
830
  //# sourceMappingURL=update-many.js.map
807
- //# debugId=61fe3a97-39e6-53de-8663-8e70d931a2d4
831
+ //# debugId=67f8958d-60d5-5657-93ce-9803859acd9e
@@ -9,5 +9,5 @@
9
9
  export { ITEM_LATEST_TIMESTAMP_FIELDS, ITEM_UNION_COLLECTION_FIELDS, mergeHistoryStreams, mergeItemDocuments, mergeJsonDocuments, mergeRelationshipEventStreams, type HistoryMergeResult, type HistoryMergeStrategy, type ItemDocumentMergeResult, type JsonDocumentMergeResult, type ItemMergeConflictDecision, type MergePreferredSide, type RelationshipStreamMergeResult, } from "./three-way.js";
10
10
  export { listMergeReceipts, markMergeReceiptReconciled, runMergeReceiptReport, summarizeMergeReceipt, type MergeDecisionReceipt, type MergeDecisionReceiptSummary, type MergeReceiptReport, } from "./receipts.js";
11
11
  export { MERGE_DRIVER_ARTIFACT_VALUES, runMergeDriver, type MergeDriverArtifact, type MergeDriverOptions, type MergeDriverResult, } from "./driver.js";
12
- export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, runMergeInstall, type MergeFenceAuditResult, type MergeDriverConfigurationAuditResult, type MergeFenceRefreshOutcome, type MergeInstallOptions, type MergeInstallResult, } from "./install.js";
12
+ export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, runMergeInstall, type MergeFenceAuditResult, type MergeDriverConfigurationAuditResult, type MergeFenceRefreshOutcome, type MergeInstallOptions, type MergeInstallContextResolution, type MergeInstallResult, } from "./install.js";
13
13
  export { runMergeReconcile, type MergeReconcileOptions, type MergeReconcileResult, } from "./reconcile.js";
@@ -7,11 +7,11 @@
7
7
  * this module so packages and hosts can reuse the same merge behavior.
8
8
  */
9
9
 
10
- !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]="27725b9d-2a1d-54ae-8191-12ebace6ef6a")}catch(e){}}();
10
+ !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]="a8072065-092c-564b-a84f-cf687f795a92")}catch(e){}}();
11
11
  export { ITEM_LATEST_TIMESTAMP_FIELDS, ITEM_UNION_COLLECTION_FIELDS, mergeHistoryStreams, mergeItemDocuments, mergeJsonDocuments, mergeRelationshipEventStreams, } from "./three-way.js";
12
12
  export { listMergeReceipts, markMergeReceiptReconciled, runMergeReceiptReport, summarizeMergeReceipt, } from "./receipts.js";
13
13
  export { MERGE_DRIVER_ARTIFACT_VALUES, runMergeDriver, } from "./driver.js";
14
- export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, runMergeInstall, } from "./install.js";
14
+ export { auditMergeAttributeFence, auditMergeDriverConfiguration, buildMergeAttributePatterns, findGitWorkspaceRoot, PM_GITATTRIBUTES_END, PM_GITATTRIBUTES_START, refreshMergeAttributeFenceIfInstalled, resolveMergeInstallContext, runMergeInstall, } from "./install.js";
15
15
  export { runMergeReconcile, } from "./reconcile.js";
16
16
  //# sourceMappingURL=index.js.map
17
- //# debugId=27725b9d-2a1d-54ae-8191-12ebace6ef6a
17
+ //# debugId=a8072065-092c-564b-a84f-cf687f795a92
@@ -1,5 +1,6 @@
1
1
  import type { GlobalOptions } from "../../core/shared/command-types.js";
2
2
  import { readSettings } from "../../core/store/settings.js";
3
+ import { resolveSourceContextWritePolicy } from "../environment/source-context.js";
3
4
  /** Opening marker for the pm-owned merge-driver `.gitattributes` block. */
4
5
  export declare const PM_GITATTRIBUTES_START = "# pm-cli:merge-drivers:start";
5
6
  /** Closing marker for the pm-owned merge-driver `.gitattributes` block. */
@@ -37,6 +38,26 @@ export interface MergeInstallResult {
37
38
  /** ISO 8601 timestamp recording when generated occurred. */
38
39
  generated_at: string;
39
40
  }
41
+ /** Resolved tracker and workspace selection for one merge-install invocation. */
42
+ export interface MergeInstallContextResolution {
43
+ /** Tracker root selected without performing filesystem writes. */
44
+ pm_root: string;
45
+ /** Starting path used to discover the enclosing Git workspace. */
46
+ workspace_start: string;
47
+ /** Whether complete inherited source coordinates were present. */
48
+ source_coordinates_available: boolean;
49
+ /** Whether inherited source coordinates were selected. */
50
+ source_context_selected: boolean;
51
+ /** Source-coordinate write policy active for the invocation. */
52
+ source_policy: ReturnType<typeof resolveSourceContextWritePolicy>;
53
+ }
54
+ /** Resolve explicit, inherited-source, and current-workspace precedence without I/O. */
55
+ export declare function resolveMergeInstallContext(options: {
56
+ cwd: string;
57
+ explicitPath?: string;
58
+ dryRun: boolean;
59
+ environment: Readonly<Record<string, string | undefined>>;
60
+ }): MergeInstallContextResolution;
40
61
  /** Result of auditing clone-local driver definitions behind a committed fence. */
41
62
  export interface MergeDriverConfigurationAuditResult {
42
63
  /** Whether every required driver definition exactly matches this installation. */