@unbrained/pm-cli 2026.11.8 → 2026.11.10

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 (619) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +31 -0
  3. package/dist/cli/error-guidance.js +4 -4
  4. package/dist/cli/main.js +1 -1
  5. package/dist/cli/public.d.ts +1 -1
  6. package/dist/cli/register-history-maintenance.js +2 -2
  7. package/dist/cli/register-setup.js +1 -1
  8. package/dist/cli/runtime/projection-retry.js +1 -1
  9. package/dist/cli/runtime/read-output-mutation-retry.js +2 -0
  10. package/dist/cli-bundle/bundle-manifest.json +1 -1
  11. package/dist/cli-bundle/chunks/{chunk-NKO42JMT.js → chunk-4AASUCHO.js} +2 -2
  12. package/dist/cli-bundle/chunks/{chunk-7GC6WIDR.js → chunk-4FLAKTZW.js} +2 -2
  13. package/dist/cli-bundle/chunks/chunk-5CAMQHEW.js +3 -0
  14. package/dist/cli-bundle/chunks/{chunk-NH7QX2M2.js → chunk-7NAAW5EX.js} +2 -2
  15. package/dist/cli-bundle/chunks/chunk-BSJSGDA3.js +3 -0
  16. package/dist/cli-bundle/chunks/{chunk-DOHZKPPC.js → chunk-CZETQYKO.js} +2 -2
  17. package/dist/cli-bundle/chunks/{chunk-YUTFMHSG.js → chunk-D727C4RO.js} +33 -33
  18. package/dist/cli-bundle/chunks/{chunk-XBUZENP4.js → chunk-EHDGHFMJ.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-L5BU5FYN.js → chunk-F6FBGLR7.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-MKW5LGVQ.js → chunk-F7P2NZEG.js} +6 -6
  21. package/dist/cli-bundle/chunks/{chunk-7V6I6X4G.js → chunk-FYD6LSJA.js} +2 -2
  22. package/dist/cli-bundle/chunks/chunk-L4WWG2H6.js +6 -0
  23. package/dist/cli-bundle/chunks/{chunk-S4IZIMAO.js → chunk-NNE63MSM.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-HESIRIVX.js → chunk-NZAFLDSH.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-Z3LWNF7C.js → chunk-OJ2KEDUX.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-4BMPGUTG.js → chunk-T2MNRM3S.js} +2 -2
  27. package/dist/cli-bundle/chunks/{chunk-YGUUJHSR.js → chunk-TBBWPEF5.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-C4MQFWCM.js → chunk-U7LILCUN.js} +2 -2
  29. package/dist/cli-bundle/chunks/chunk-UFPLZ6LZ.js +2 -0
  30. package/dist/cli-bundle/chunks/{chunk-CP43BHX3.js → chunk-UL64P6MR.js} +29 -29
  31. package/dist/cli-bundle/chunks/chunk-WNEUWDUE.js +116 -0
  32. package/dist/cli-bundle/chunks/{chunk-RC6SSFOF.js → chunk-X7NM5HVQ.js} +2 -2
  33. package/dist/cli-bundle/chunks/{chunk-LI2HP5OX.js → chunk-YSWD2NXB.js} +2 -2
  34. package/dist/cli-bundle/chunks/item-revision-M7KXLQXF.js +2 -0
  35. package/dist/cli-bundle/chunks/item-transaction-4N5P34GO.js +2 -0
  36. package/dist/cli-bundle/chunks/{mutation-admission-FJ3D66PV.js → mutation-admission-374UR7NI.js} +2 -2
  37. package/dist/cli-bundle/chunks/{register-list-query-GXP77CX7.js → register-list-query-GSB7PP5P.js} +2 -2
  38. package/dist/cli-bundle/chunks/{register-mutation-XJ2DROUM.js → register-mutation-ZBF6ITYK.js} +2 -2
  39. package/dist/cli-bundle/chunks/{register-operations-O5LERXM7.js → register-operations-PWF6GOHE.js} +2 -2
  40. package/dist/cli-bundle/chunks/{register-setup-4VOTYLL2.js → register-setup-QDZ2Y3CI.js} +2 -2
  41. package/dist/cli-bundle/chunks/{stage-ZDJL3FGL.js → stage-67WGPKPH.js} +2 -2
  42. package/dist/cli-bundle/focused-chunks/{chunk-Z2QWZRSL.js → chunk-2SQUWQP3.js} +18 -18
  43. package/dist/cli-bundle/focused-chunks/{chunk-P4EHEH4C.js → chunk-2Y4H4LIX.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/{chunk-WPXMPGTY.js → chunk-3DWNH72D.js} +2 -2
  45. package/dist/cli-bundle/focused-chunks/chunk-3K2MYE7R.js +26 -0
  46. package/dist/cli-bundle/focused-chunks/{chunk-LTPT5TE7.js → chunk-56MIAFEN.js} +20 -20
  47. package/dist/cli-bundle/focused-chunks/{chunk-3HFENALW.js → chunk-67M7E2Z3.js} +2 -2
  48. package/dist/cli-bundle/focused-chunks/{chunk-6U5HP6L3.js → chunk-ALLOWZSH.js} +2 -2
  49. package/dist/cli-bundle/focused-chunks/{chunk-I4YUZW3J.js → chunk-BE2GK2G7.js} +2 -2
  50. package/dist/cli-bundle/focused-chunks/{chunk-KNF2QTEZ.js → chunk-HTMQDNVC.js} +2 -2
  51. package/dist/cli-bundle/focused-chunks/{chunk-UUVRYIKA.js → chunk-LWMPQRJT.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-O7K3X4LH.js → chunk-LY3JXL25.js} +2 -2
  53. package/dist/cli-bundle/focused-chunks/{chunk-DIEBSC76.js → chunk-NZQYHPUN.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-5YPX3QKU.js → chunk-PAGW6A2X.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/chunk-QCHCEFTO.js +12 -0
  56. package/dist/cli-bundle/focused-chunks/{chunk-4UOXVFJZ.js → chunk-QHGGO7SY.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/chunk-QK7FX4O5.js +44 -0
  58. package/dist/cli-bundle/focused-chunks/{chunk-SZ2BKK3M.js → chunk-RFMKS7VD.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/chunk-U7HWWEJ2.js +2 -0
  60. package/dist/cli-bundle/focused-chunks/chunk-UIZVD36C.js +2 -0
  61. package/dist/cli-bundle/focused-chunks/{chunk-ULTSMJYF.js → chunk-WJHDUON5.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{chunk-TSHRBPTI.js → chunk-WK773UVA.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/chunk-ZBOCYFBE.js +82 -0
  64. package/dist/cli-bundle/focused-chunks/item-revision-XC4ZJ7MY.js +2 -0
  65. package/dist/cli-bundle/focused-chunks/{item-transaction-Q2Z7DDCR.js → item-transaction-CVGK4RJP.js} +2 -2
  66. package/dist/cli-bundle/focused-chunks/{mutation-admission-QWC6MLTZ.js → mutation-admission-N27D5H64.js} +2 -2
  67. package/dist/cli-bundle/focused-chunks/{stage-NKH5SKSZ.js → stage-KPK2UHVO.js} +2 -2
  68. package/dist/cli-bundle/main.js +26 -26
  69. package/dist/cli-bundle/sdk-authoring.js +1 -1
  70. package/dist/cli-bundle/sdk-contracts.js +4 -4
  71. package/dist/cli-bundle/sdk-core.js +1 -1
  72. package/dist/cli-bundle/sdk-governance.js +1 -1
  73. package/dist/cli-bundle/sdk-graph.js +1 -1
  74. package/dist/cli-bundle/sdk-merge.js +57 -57
  75. package/dist/cli-bundle/sdk-query.js +1 -1
  76. package/dist/cli-bundle/sdk-runtime.js +1 -1
  77. package/dist/cli-bundle/sdk-testing.js +1 -1
  78. package/dist/cli-bundle/sdk.js +9 -9
  79. package/dist/core/checkpoint/mutation-checkpoint.d.ts +12 -20
  80. package/dist/core/config/nested-settings.d.ts +14 -45
  81. package/dist/core/config/nested-settings.js +1 -1
  82. package/dist/core/config/positional-value.d.ts +11 -14
  83. package/dist/core/config/positional-value.js +1 -1
  84. package/dist/core/extensions/activation-summary-markdown.d.ts +4 -5
  85. package/dist/core/extensions/activation-summary.d.ts +7 -15
  86. package/dist/core/extensions/capability-usage.d.ts +7 -23
  87. package/dist/core/extensions/command-hook-context.d.ts +4 -7
  88. package/dist/core/extensions/command-metadata-contract.d.ts +2 -2
  89. package/dist/core/extensions/contribution-inventory.d.ts +3 -25
  90. package/dist/core/extensions/extension-capability-aliases.d.ts +7 -10
  91. package/dist/core/extensions/extension-hook-runtime.d.ts +2 -2
  92. package/dist/core/extensions/extension-policy.d.ts +12 -47
  93. package/dist/core/extensions/extension-registries.d.ts +2 -2
  94. package/dist/core/extensions/extension-types.d.ts +332 -545
  95. package/dist/core/extensions/flag-definition-validation.d.ts +11 -13
  96. package/dist/core/extensions/flag-value-types.d.ts +11 -13
  97. package/dist/core/extensions/index.d.ts +15 -20
  98. package/dist/core/extensions/item-field-types.d.ts +5 -5
  99. package/dist/core/extensions/item-fields.d.ts +4 -7
  100. package/dist/core/extensions/loader.d.ts +5 -69
  101. package/dist/core/extensions/manifest-parser.d.ts +3 -3
  102. package/dist/core/extensions/manifest-schema.d.ts +10 -13
  103. package/dist/core/extensions/registration-contracts.d.ts +2 -4
  104. package/dist/core/extensions/registration-validation.d.ts +1 -1
  105. package/dist/core/extensions/registration-values.d.ts +5 -7
  106. package/dist/core/extensions/runtime-registrations.d.ts +6 -6
  107. package/dist/core/extensions/version-compat.d.ts +9 -10
  108. package/dist/core/fs/fs-utils.d.ts +4 -6
  109. package/dist/core/fs/host-environment-errors.d.ts +8 -10
  110. package/dist/core/governance/content-fields.d.ts +10 -14
  111. package/dist/core/governance/issue-codes.d.ts +12 -18
  112. package/dist/core/governance/metadata-coverage.d.ts +24 -34
  113. package/dist/core/history/digest.d.ts +3 -3
  114. package/dist/core/history/event-classification.d.ts +5 -5
  115. package/dist/core/history/event-index.d.ts +14 -35
  116. package/dist/core/history/history-compact-bulk.d.ts +10 -13
  117. package/dist/core/history/history-diff.d.ts +6 -11
  118. package/dist/core/history/history-rewrite.d.ts +24 -40
  119. package/dist/core/history/history-storage-stats.d.ts +9 -17
  120. package/dist/core/history/history-stream-policy.d.ts +8 -11
  121. package/dist/core/history/history.d.ts +10 -44
  122. package/dist/core/history/identity.d.ts +4 -5
  123. package/dist/core/history/operation-contract.d.ts +5 -15
  124. package/dist/core/history/projection.d.ts +10 -14
  125. package/dist/core/history/read.d.ts +6 -7
  126. package/dist/core/history/replay.d.ts +16 -37
  127. package/dist/core/history/workspace-history.d.ts +27 -60
  128. package/dist/core/io/body-file.d.ts +2 -2
  129. package/dist/core/io/bulk-ids-input.d.ts +7 -8
  130. package/dist/core/item/actionability.d.ts +16 -22
  131. package/dist/core/item/dependency-reference.d.ts +2 -2
  132. package/dist/core/item/id.d.ts +5 -9
  133. package/dist/core/item/item-format-version.d.ts +11 -13
  134. package/dist/core/item/item-format.d.ts +20 -60
  135. package/dist/core/item/item-format.js +1 -1
  136. package/dist/core/item/item-record.d.ts +2 -2
  137. package/dist/core/item/literal-mutation-input.d.ts +2 -2
  138. package/dist/core/item/parent-reference-policy.d.ts +4 -7
  139. package/dist/core/item/parse.d.ts +10 -26
  140. package/dist/core/item/plan-lifecycle.d.ts +3 -3
  141. package/dist/core/item/priority.d.ts +2 -2
  142. package/dist/core/item/sprint-release-format.d.ts +3 -7
  143. package/dist/core/item/status-filter.d.ts +5 -7
  144. package/dist/core/item/status.d.ts +3 -4
  145. package/dist/core/item/type-registry.d.ts +17 -24
  146. package/dist/core/item/type-synonyms.d.ts +1 -1
  147. package/dist/core/lock/lock-owner.d.ts +8 -10
  148. package/dist/core/lock/lock.d.ts +19 -67
  149. package/dist/core/output/output-control.d.ts +5 -6
  150. package/dist/core/output/output.d.ts +18 -20
  151. package/dist/core/output/output.js +4 -4
  152. package/dist/core/output/tabular.d.ts +2 -2
  153. package/dist/core/packages/manifest.d.ts +13 -17
  154. package/dist/core/packages/root.d.ts +3 -3
  155. package/dist/core/policy/workflow-policy-schema.d.ts +2 -310
  156. package/dist/core/policy/workflow-policy-store.d.ts +5 -14
  157. package/dist/core/policy/workflow-policy.d.ts +25 -52
  158. package/dist/core/profile/profile-describe.d.ts +8 -11
  159. package/dist/core/profile/profile-lint.d.ts +11 -13
  160. package/dist/core/profile/profile-plan.d.ts +30 -49
  161. package/dist/core/profile/profile-presets.d.ts +25 -36
  162. package/dist/core/reproducibility/context.d.ts +6 -7
  163. package/dist/core/schema/fields-file.d.ts +14 -21
  164. package/dist/core/schema/item-types-file.d.ts +16 -22
  165. package/dist/core/schema/runtime-field-filters.d.ts +2 -2
  166. package/dist/core/schema/runtime-field-values.d.ts +6 -13
  167. package/dist/core/schema/runtime-schema.d.ts +19 -31
  168. package/dist/core/schema/status-defs-file.d.ts +15 -25
  169. package/dist/core/schema/status-token.d.ts +1 -1
  170. package/dist/core/schema/type-inference.d.ts +6 -8
  171. package/dist/core/schema/type-presets.d.ts +5 -5
  172. package/dist/core/schema/type-workflows.d.ts +11 -16
  173. package/dist/core/search/background-refresh.d.ts +6 -12
  174. package/dist/core/search/bm25.d.ts +11 -19
  175. package/dist/core/search/cache.d.ts +19 -41
  176. package/dist/core/search/corpus.d.ts +16 -19
  177. package/dist/core/search/corpus.js +1 -1
  178. package/dist/core/search/embedding-batches.d.ts +12 -17
  179. package/dist/core/search/eval-thresholds.d.ts +3 -3
  180. package/dist/core/search/eval.d.ts +16 -34
  181. package/dist/core/search/http-client.d.ts +14 -18
  182. package/dist/core/search/providers.d.ts +22 -39
  183. package/dist/core/search/relevance.d.ts +14 -19
  184. package/dist/core/search/semantic-defaults.d.ts +4 -5
  185. package/dist/core/search/vector-stores.d.ts +35 -57
  186. package/dist/core/search/vectorization-metadata.d.ts +9 -11
  187. package/dist/core/sentry/helpers.d.ts +6 -31
  188. package/dist/core/sentry/instrument.d.ts +6 -59
  189. package/dist/core/session/session-state.d.ts +12 -32
  190. package/dist/core/shared/agent-session-context.d.ts +10 -17
  191. package/dist/core/shared/author.d.ts +48 -69
  192. package/dist/core/shared/command-line.d.ts +3 -3
  193. package/dist/core/shared/command-types.d.ts +3 -4
  194. package/dist/core/shared/constants.d.ts +14 -32
  195. package/dist/core/shared/error-details.d.ts +5 -18
  196. package/dist/core/shared/errors.d.ts +42 -83
  197. package/dist/core/shared/html-entity-decode.d.ts +1 -1
  198. package/dist/core/shared/item-metadata-contract.d.ts +2 -2
  199. package/dist/core/shared/lazy-module.d.ts +1 -1
  200. package/dist/core/shared/levenshtein.d.ts +1 -1
  201. package/dist/core/shared/numeric-parsers.d.ts +1 -1
  202. package/dist/core/shared/option-alias-visibility.d.ts +2 -2
  203. package/dist/core/shared/output-unicode.d.ts +1 -1
  204. package/dist/core/shared/primitives.d.ts +10 -10
  205. package/dist/core/shared/secret-rules.d.ts +7 -93
  206. package/dist/core/shared/serial-queue.d.ts +7 -9
  207. package/dist/core/shared/serialization.d.ts +1 -1
  208. package/dist/core/shared/split-comma-list.d.ts +4 -5
  209. package/dist/core/shared/text-normalization.d.ts +1 -1
  210. package/dist/core/shared/time.d.ts +6 -20
  211. package/dist/core/store/item-format-migration.d.ts +4 -5
  212. package/dist/core/store/item-metadata-cache.d.ts +22 -27
  213. package/dist/core/store/item-metadata-query-index.d.ts +20 -61
  214. package/dist/core/store/item-metadata-read-work.d.ts +3 -7
  215. package/dist/core/store/item-mutation-precondition.d.ts +19 -35
  216. package/dist/core/store/item-store.d.ts +18 -141
  217. package/dist/core/store/paths.d.ts +5 -10
  218. package/dist/core/store/settings-read-cache.d.ts +7 -9
  219. package/dist/core/store/settings-sections.d.ts +15 -19
  220. package/dist/core/store/settings-validator.d.ts +27 -143
  221. package/dist/core/store/settings-validator.js +1 -1
  222. package/dist/core/store/settings.d.ts +19 -94
  223. package/dist/core/store/sqlite-runtime.d.ts +3 -3
  224. package/dist/core/store/tracker-preflight.d.ts +2 -2
  225. package/dist/core/telemetry/consent.d.ts +2 -2
  226. package/dist/core/telemetry/observability.d.ts +8 -19
  227. package/dist/core/telemetry/policy.d.ts +8 -23
  228. package/dist/core/telemetry/runtime.d.ts +44 -254
  229. package/dist/core/test/background-runs.d.ts +35 -79
  230. package/dist/core/test/run-selectors.d.ts +10 -12
  231. package/dist/core/validate/fix-planning.d.ts +19 -28
  232. package/dist/core/validate/missing-by-type.d.ts +3 -4
  233. package/dist/core/validate/missing-link-owners.d.ts +12 -16
  234. package/dist/core/validate/stale-file-classification.d.ts +5 -6
  235. package/dist/mcp/tool-definitions.d.ts +7 -30
  236. package/dist/mcp/tool-definitions.js +1 -1
  237. package/dist/sdk/actionability.d.ts +1 -1
  238. package/dist/sdk/agent/closed-domain-contracts.d.ts +4 -5
  239. package/dist/sdk/agent/command-recovery.d.ts +9 -13
  240. package/dist/sdk/agent/command-suggestions.d.ts +2 -2
  241. package/dist/sdk/agent/create-option-policy.d.ts +2 -2
  242. package/dist/sdk/agent/identity-config.d.ts +13 -18
  243. package/dist/sdk/agent/item-addressing.d.ts +4 -5
  244. package/dist/sdk/agent/linked-resource-recovery.d.ts +3 -4
  245. package/dist/sdk/agent/refusal-closure-census.d.ts +13 -25
  246. package/dist/sdk/agent/refusal-closure.d.ts +8 -11
  247. package/dist/sdk/agent/refusal-corpus-contracts.d.ts +15 -21
  248. package/dist/sdk/agent/refusal-reachability.d.ts +38 -52
  249. package/dist/sdk/agent/subcommand-recovery.d.ts +7 -15
  250. package/dist/sdk/agent/task-transcript-contracts.d.ts +12 -15
  251. package/dist/sdk/agent/tracker-preflight-contracts.d.ts +13 -17
  252. package/dist/sdk/agent-capability-contracts.d.ts +19 -32
  253. package/dist/sdk/agent-session-context.d.ts +1 -1
  254. package/dist/sdk/annotations.d.ts +32 -68
  255. package/dist/sdk/annotations.js +1 -1
  256. package/dist/sdk/author-attribution.d.ts +22 -33
  257. package/dist/sdk/authoring.d.ts +1 -19
  258. package/dist/sdk/cli-bootstrap.d.ts +22 -59
  259. package/dist/sdk/cli-contracts/agent-output-contracts.d.ts +31 -57
  260. package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -8
  261. package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +19 -65
  262. package/dist/sdk/cli-contracts/commander-mutation-options.d.ts +2 -2
  263. package/dist/sdk/cli-contracts/commander-types.d.ts +6 -11
  264. package/dist/sdk/cli-contracts/completeness.d.ts +11 -15
  265. package/dist/sdk/cli-contracts/enum-contracts.d.ts +25 -37
  266. package/dist/sdk/cli-contracts/flag-contracts.d.ts +16 -20
  267. package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +14 -19
  268. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +29 -47
  269. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +44 -265
  270. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +11 -564
  271. package/dist/sdk/cli-contracts/tool-schema.d.ts +18 -51
  272. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +18 -37
  273. package/dist/sdk/cli-contracts.d.ts +1 -16
  274. package/dist/sdk/cli-program.d.ts +2 -2
  275. package/dist/sdk/command-line.d.ts +3 -4
  276. package/dist/sdk/comments.d.ts +6 -10
  277. package/dist/sdk/compile-cache.d.ts +4 -5
  278. package/dist/sdk/completion/bash.d.ts +2 -2
  279. package/dist/sdk/completion/fish.d.ts +2 -2
  280. package/dist/sdk/completion/shared.d.ts +10 -77
  281. package/dist/sdk/completion/shared.js +1 -1
  282. package/dist/sdk/completion/zsh.d.ts +2 -2
  283. package/dist/sdk/completion.d.ts +2 -6
  284. package/dist/sdk/compose.d.ts +49 -74
  285. package/dist/sdk/config.d.ts +18 -94
  286. package/dist/sdk/config.js +1 -1
  287. package/dist/sdk/context/recency.d.ts +2 -2
  288. package/dist/sdk/context/semantic-session-attribution.d.ts +6 -25
  289. package/dist/sdk/context/usage-ledger.d.ts +9 -21
  290. package/dist/sdk/context-intent-contracts.d.ts +24 -35
  291. package/dist/sdk/context-intent-runtime.d.ts +7 -9
  292. package/dist/sdk/context-packing.d.ts +16 -34
  293. package/dist/sdk/context-relevance.d.ts +58 -93
  294. package/dist/sdk/context-signal-store.d.ts +29 -60
  295. package/dist/sdk/context-usage.d.ts +22 -69
  296. package/dist/sdk/contracts.d.ts +1 -24
  297. package/dist/sdk/core-governance.d.ts +1 -5
  298. package/dist/sdk/core.d.ts +1 -27
  299. package/dist/sdk/corpus-shape.d.ts +16 -28
  300. package/dist/sdk/define.d.ts +10 -14
  301. package/dist/sdk/dependencies.d.ts +32 -50
  302. package/dist/sdk/dependency-provenance.d.ts +19 -23
  303. package/dist/sdk/docs.d.ts +6 -10
  304. package/dist/sdk/duplicates.d.ts +8 -15
  305. package/dist/sdk/environment/agent-environment.d.ts +60 -101
  306. package/dist/sdk/environment/host-environment-errors.d.ts +1 -1
  307. package/dist/sdk/environment/project-runtime-compatibility.d.ts +15 -29
  308. package/dist/sdk/environment/source-context.d.ts +6 -7
  309. package/dist/sdk/environment/tracker-preflight.d.ts +1 -1
  310. package/dist/sdk/error-code-catalog.d.ts +9 -26
  311. package/dist/sdk/error-runtime.d.ts +6 -8
  312. package/dist/sdk/errors.d.ts +10 -17
  313. package/dist/sdk/eval.d.ts +11 -21
  314. package/dist/sdk/extension/command-options.d.ts +14 -26
  315. package/dist/sdk/extension/describe.d.ts +14 -19
  316. package/dist/sdk/extension/doctor.d.ts +8 -48
  317. package/dist/sdk/extension/install-plan.d.ts +12 -26
  318. package/dist/sdk/extension/install-runtime.d.ts +10 -11
  319. package/dist/sdk/extension/install-sources.d.ts +22 -104
  320. package/dist/sdk/extension/managed-state.d.ts +13 -18
  321. package/dist/sdk/extension/migrations.d.ts +22 -37
  322. package/dist/sdk/extension/output-ownership.d.ts +3 -30
  323. package/dist/sdk/extension/shared.d.ts +9 -15
  324. package/dist/sdk/extension/source-resolution.d.ts +13 -18
  325. package/dist/sdk/extension/static-inventory.d.ts +17 -21
  326. package/dist/sdk/extension/update-check.d.ts +7 -11
  327. package/dist/sdk/extension-command-context.d.ts +2 -3
  328. package/dist/sdk/extension-contracts.d.ts +11 -14
  329. package/dist/sdk/extension.d.ts +31 -192
  330. package/dist/sdk/files.d.ts +27 -68
  331. package/dist/sdk/flag-invocation-contracts.d.ts +13 -17
  332. package/dist/sdk/generated/error-code-catalog-rows.js +1 -1
  333. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  334. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  335. package/dist/sdk/generated-error-code-catalog.d.ts +1 -1
  336. package/dist/sdk/governance/artifact-ledgers.d.ts +9 -16
  337. package/dist/sdk/governance/assurance-action-contracts.d.ts +1 -1
  338. package/dist/sdk/governance/assurance-action.d.ts +13 -45
  339. package/dist/sdk/governance/assurance-mutation-error.d.ts +12 -17
  340. package/dist/sdk/governance/assurance-presets.d.ts +10 -21
  341. package/dist/sdk/governance/assurance-runtime.d.ts +5 -6
  342. package/dist/sdk/governance/assurance.d.ts +97 -154
  343. package/dist/sdk/governance/boundary-fixtures.d.ts +17 -23
  344. package/dist/sdk/governance/closure-timestamps.d.ts +5 -15
  345. package/dist/sdk/governance/coverage-assurance.d.ts +5 -6
  346. package/dist/sdk/governance/defect-recurrence-coverage.d.ts +13 -23
  347. package/dist/sdk/governance/defect-recurrence-graph.d.ts +9 -13
  348. package/dist/sdk/governance/defect-recurrence.d.ts +43 -67
  349. package/dist/sdk/governance/extension-host-version.d.ts +8 -10
  350. package/dist/sdk/governance/gc.d.ts +12 -20
  351. package/dist/sdk/governance/health/projection.d.ts +8 -23
  352. package/dist/sdk/governance/health.d.ts +23 -167
  353. package/dist/sdk/governance/hierarchy-validation.d.ts +2 -18
  354. package/dist/sdk/governance/linked-file-report.d.ts +6 -10
  355. package/dist/sdk/governance/merge-receipt-history.d.ts +12 -16
  356. package/dist/sdk/governance/provenance-health.d.ts +17 -23
  357. package/dist/sdk/governance/reindex.d.ts +13 -116
  358. package/dist/sdk/governance/reliability.d.ts +13 -17
  359. package/dist/sdk/governance/stale-work.d.ts +8 -11
  360. package/dist/sdk/governance/status-role-diagnostics.d.ts +4 -6
  361. package/dist/sdk/governance/storage-integrity.d.ts +16 -23
  362. package/dist/sdk/governance/upgrade.d.ts +17 -57
  363. package/dist/sdk/governance/validate-item-reader.d.ts +3 -11
  364. package/dist/sdk/governance/validate-normalization.d.ts +2 -2
  365. package/dist/sdk/governance/validate.d.ts +29 -175
  366. package/dist/sdk/governance/workflow-completeness.d.ts +5 -17
  367. package/dist/sdk/governance/workflow-policy.d.ts +8 -16
  368. package/dist/sdk/governance/workspace-position.d.ts +12 -43
  369. package/dist/sdk/governance.d.ts +1 -39
  370. package/dist/sdk/graph/adapter.d.ts +23 -41
  371. package/dist/sdk/graph/analytics.d.ts +20 -31
  372. package/dist/sdk/graph/assembly.d.ts +24 -35
  373. package/dist/sdk/graph/cache.d.ts +13 -25
  374. package/dist/sdk/graph/cardinality-integrity.d.ts +4 -6
  375. package/dist/sdk/graph/centrality.d.ts +14 -20
  376. package/dist/sdk/graph/conformance.d.ts +12 -19
  377. package/dist/sdk/graph/deadline-scheduling.d.ts +14 -20
  378. package/dist/sdk/graph/durable-cache.d.ts +11 -14
  379. package/dist/sdk/graph/governance-contracts.d.ts +2 -2
  380. package/dist/sdk/graph/governance.d.ts +22 -36
  381. package/dist/sdk/graph/hierarchy-integrity.d.ts +18 -26
  382. package/dist/sdk/graph/index.d.ts +1 -17
  383. package/dist/sdk/graph/lifecycle-coverage.d.ts +8 -12
  384. package/dist/sdk/graph/mutation-advisory.d.ts +5 -16
  385. package/dist/sdk/graph/query-contracts.d.ts +1 -2
  386. package/dist/sdk/graph/remediation.d.ts +11 -18
  387. package/dist/sdk/graph/run.d.ts +73 -115
  388. package/dist/sdk/graph/scheduling.d.ts +8 -15
  389. package/dist/sdk/graph/traversal.d.ts +9 -15
  390. package/dist/sdk/graph/workspace-relationship-kind-registry.d.ts +2 -2
  391. package/dist/sdk/graph.d.ts +1 -12
  392. package/dist/sdk/guide-topics.d.ts +7 -10
  393. package/dist/sdk/guide.d.ts +21 -43
  394. package/dist/sdk/history/attestation-command.d.ts +7 -10
  395. package/dist/sdk/history/attestation-contract.d.ts +19 -34
  396. package/dist/sdk/history/attestation.d.ts +2 -3
  397. package/dist/sdk/history/maintenance.d.ts +17 -27
  398. package/dist/sdk/history/salvage.d.ts +5 -22
  399. package/dist/sdk/history/subject.d.ts +5 -11
  400. package/dist/sdk/history-analytics.d.ts +28 -59
  401. package/dist/sdk/history-compact.d.ts +25 -66
  402. package/dist/sdk/history-provenance.d.ts +16 -33
  403. package/dist/sdk/history-read.d.ts +9 -16
  404. package/dist/sdk/history-redact.d.ts +19 -74
  405. package/dist/sdk/history-redact.js +1 -1
  406. package/dist/sdk/history-repair.d.ts +26 -71
  407. package/dist/sdk/improvement-ledger-validation.d.ts +2 -2
  408. package/dist/sdk/improvement-ledger.d.ts +20 -39
  409. package/dist/sdk/index.d.ts +1 -268
  410. package/dist/sdk/init-agent-guidance.d.ts +13 -68
  411. package/dist/sdk/init.d.ts +24 -94
  412. package/dist/sdk/invocation-author.d.ts +1 -1
  413. package/dist/sdk/item-children.d.ts +10 -13
  414. package/dist/sdk/item-metadata-index.d.ts +1 -2
  415. package/dist/sdk/item-schedule.d.ts +8 -9
  416. package/dist/sdk/item-transaction.d.ts +46 -90
  417. package/dist/sdk/learnings.d.ts +6 -10
  418. package/dist/sdk/lifecycle/append.d.ts +7 -9
  419. package/dist/sdk/lifecycle/claim.d.ts +26 -42
  420. package/dist/sdk/lifecycle/cli-input.d.ts +1 -1
  421. package/dist/sdk/lifecycle/close-many.d.ts +14 -65
  422. package/dist/sdk/lifecycle/close.d.ts +10 -26
  423. package/dist/sdk/lifecycle/copy.d.ts +6 -10
  424. package/dist/sdk/lifecycle/create.d.ts +15 -83
  425. package/dist/sdk/lifecycle/delete.d.ts +7 -9
  426. package/dist/sdk/lifecycle/focus.d.ts +9 -11
  427. package/dist/sdk/lifecycle/item-revision.d.ts +31 -45
  428. package/dist/sdk/lifecycle/item-revision.js +1 -1
  429. package/dist/sdk/lifecycle/lifecycle-transitions.d.ts +4 -5
  430. package/dist/sdk/lifecycle/mutation-command-options.d.ts +6 -9
  431. package/dist/sdk/lifecycle/plan-mutation-receipt.d.ts +5 -13
  432. package/dist/sdk/lifecycle/plan.d.ts +34 -74
  433. package/dist/sdk/lifecycle/reopen.d.ts +8 -14
  434. package/dist/sdk/lifecycle/restore.d.ts +9 -38
  435. package/dist/sdk/lifecycle/shared-unset-fields.d.ts +23 -614
  436. package/dist/sdk/lifecycle/start-blockers.d.ts +7 -27
  437. package/dist/sdk/lifecycle/structured-mutation-plan.d.ts +8 -16
  438. package/dist/sdk/lifecycle/task-composition.d.ts +6 -14
  439. package/dist/sdk/lifecycle/update-many.d.ts +15 -65
  440. package/dist/sdk/lifecycle/update.d.ts +21 -104
  441. package/dist/sdk/lifecycle/workflow-transition.d.ts +2 -11
  442. package/dist/sdk/lifecycle-completion.d.ts +11 -14
  443. package/dist/sdk/lifecycle-policy.d.ts +23 -32
  444. package/dist/sdk/linked-artifacts.d.ts +31 -41
  445. package/dist/sdk/mcp/apps.d.ts +12 -27
  446. package/dist/sdk/mcp/authorization.d.ts +30 -63
  447. package/dist/sdk/mcp/discovery.d.ts +23 -52
  448. package/dist/sdk/mcp/executable.d.ts +3 -10
  449. package/dist/sdk/mcp/interactions.d.ts +25 -47
  450. package/dist/sdk/mcp/protocol.d.ts +32 -64
  451. package/dist/sdk/mcp/skills.d.ts +21 -71
  452. package/dist/sdk/mcp/subscriptions.d.ts +14 -28
  453. package/dist/sdk/mcp/tasks.d.ts +21 -55
  454. package/dist/sdk/mcp/transport.d.ts +7 -15
  455. package/dist/sdk/merge/driver.d.ts +13 -37
  456. package/dist/sdk/merge/index.d.ts +1 -6
  457. package/dist/sdk/merge/install.d.ts +27 -55
  458. package/dist/sdk/merge/receipt-operation.d.ts +5 -6
  459. package/dist/sdk/merge/receipt-schema.d.ts +6 -9
  460. package/dist/sdk/merge/receipts.d.ts +29 -79
  461. package/dist/sdk/merge/reconcile.d.ts +9 -18
  462. package/dist/sdk/merge/three-way.d.ts +21 -30
  463. package/dist/sdk/merge.d.ts +1 -5
  464. package/dist/sdk/mutation-events.d.ts +21 -53
  465. package/dist/sdk/mutation-guard.d.ts +15 -135
  466. package/dist/sdk/notes.d.ts +6 -10
  467. package/dist/sdk/output/fit-envelope.d.ts +21 -28
  468. package/dist/sdk/output/list-envelope.d.ts +1 -1
  469. package/dist/sdk/output/table-rows.d.ts +8 -12
  470. package/dist/sdk/output-contracts.d.ts +11 -14
  471. package/dist/sdk/output-projection.d.ts +18 -130
  472. package/dist/sdk/output-token-accounting.d.ts +8 -15
  473. package/dist/sdk/output.d.ts +10 -15
  474. package/dist/sdk/ownership-source.d.ts +4 -5
  475. package/dist/sdk/package-import-adapters.d.ts +27 -37
  476. package/dist/sdk/package-migrations.d.ts +2 -2
  477. package/dist/sdk/package-runtime-options.d.ts +3 -3
  478. package/dist/sdk/pagination.d.ts +12 -24
  479. package/dist/sdk/profile.d.ts +25 -42
  480. package/dist/sdk/provenance.d.ts +21 -32
  481. package/dist/sdk/public-surface.json +1 -1
  482. package/dist/sdk/query/activity.d.ts +24 -77
  483. package/dist/sdk/query/aggregate.d.ts +20 -95
  484. package/dist/sdk/query/calendar.d.ts +26 -74
  485. package/dist/sdk/query/complete-list.d.ts +19 -35
  486. package/dist/sdk/query/context.d.ts +69 -240
  487. package/dist/sdk/query/declared-blockers.d.ts +2 -9
  488. package/dist/sdk/query/duplicate-candidates.d.ts +3 -5
  489. package/dist/sdk/query/get-facet-roots.js +2 -0
  490. package/dist/sdk/query/get.d.ts +13 -55
  491. package/dist/sdk/query/get.js +1 -1
  492. package/dist/sdk/query/history.d.ts +18 -29
  493. package/dist/sdk/query/item-filter-options.d.ts +7 -12
  494. package/dist/sdk/query/list-filter-shared.d.ts +4 -8
  495. package/dist/sdk/query/list.d.ts +44 -168
  496. package/dist/sdk/query/multi-value-filters.d.ts +7 -9
  497. package/dist/sdk/query/next-ranking-policy.d.ts +4 -10
  498. package/dist/sdk/query/next-ready-budget.d.ts +4 -5
  499. package/dist/sdk/query/next.d.ts +27 -86
  500. package/dist/sdk/query/parsers.d.ts +4 -6
  501. package/dist/sdk/query/projection-contracts.d.ts +12 -21
  502. package/dist/sdk/query/search/corpus.d.ts +5 -20
  503. package/dist/sdk/query/search/filters.d.ts +5 -17
  504. package/dist/sdk/query/search/input.d.ts +4 -9
  505. package/dist/sdk/query/search/lexical.d.ts +5 -9
  506. package/dist/sdk/query/search/response.d.ts +5 -22
  507. package/dist/sdk/query/search/semantic.d.ts +24 -170
  508. package/dist/sdk/query/search/types.d.ts +19 -73
  509. package/dist/sdk/query/search-contracts.d.ts +24 -34
  510. package/dist/sdk/query/search-pagination.d.ts +5 -24
  511. package/dist/sdk/query/search-rendering.d.ts +8 -32
  512. package/dist/sdk/query/search.d.ts +3 -63
  513. package/dist/sdk/query/workspace-contracts.d.ts +2 -2
  514. package/dist/sdk/query.d.ts +1 -43
  515. package/dist/sdk/read-output/continuation.d.ts +5 -6
  516. package/dist/sdk/read-output/options.d.ts +3 -8
  517. package/dist/sdk/read-output/positional-rows.js +2 -0
  518. package/dist/sdk/read-output/session-result.d.ts +2 -33
  519. package/dist/sdk/read-output/tail-retention.d.ts +6 -8
  520. package/dist/sdk/read-output-budget.d.ts +14 -16
  521. package/dist/sdk/read-output-contracts.d.ts +62 -102
  522. package/dist/sdk/read-output-contracts.js +1 -1
  523. package/dist/sdk/read-output-rows.d.ts +5 -9
  524. package/dist/sdk/read-output-session.d.ts +11 -14
  525. package/dist/sdk/relationship-analytics.d.ts +17 -37
  526. package/dist/sdk/relationship-context.d.ts +15 -33
  527. package/dist/sdk/relationship-history.d.ts +29 -50
  528. package/dist/sdk/relationship-kinds/contract.d.ts +11 -12
  529. package/dist/sdk/relationship-migration.d.ts +6 -10
  530. package/dist/sdk/relationships.d.ts +22 -34
  531. package/dist/sdk/reproducibility/process.d.ts +7 -11
  532. package/dist/sdk/runtime/actions.js +1 -1
  533. package/dist/sdk/runtime/context.d.ts +6 -22
  534. package/dist/sdk/runtime/schema-preview.d.ts +1 -1
  535. package/dist/sdk/runtime-input.d.ts +9 -20
  536. package/dist/sdk/runtime-primitives.d.ts +3 -82
  537. package/dist/sdk/runtime-public-contracts.d.ts +30 -50
  538. package/dist/sdk/runtime.d.ts +77 -302
  539. package/dist/sdk/scheduling-shortcuts.d.ts +8 -12
  540. package/dist/sdk/schema-migration.d.ts +18 -80
  541. package/dist/sdk/schema.d.ts +89 -192
  542. package/dist/sdk/search-refresh-worker.d.ts +1 -1
  543. package/dist/sdk/similarity-scoring.d.ts +6 -8
  544. package/dist/sdk/similarity.d.ts +33 -64
  545. package/dist/sdk/start-task-status.d.ts +2 -2
  546. package/dist/sdk/stats.d.ts +13 -48
  547. package/dist/sdk/structured-mutations.d.ts +18 -26
  548. package/dist/sdk/telemetry-flush.d.ts +1 -1
  549. package/dist/sdk/telemetry.d.ts +14 -20
  550. package/dist/sdk/templates.d.ts +14 -35
  551. package/dist/sdk/test/batch.d.ts +10 -25
  552. package/dist/sdk/test/execution.d.ts +44 -209
  553. package/dist/sdk/test/json-path.d.ts +2 -5
  554. package/dist/sdk/test/linked-command-detection.d.ts +10 -25
  555. package/dist/sdk/test/measurements.d.ts +10 -13
  556. package/dist/sdk/test/parsers.d.ts +16 -20
  557. package/dist/sdk/test/prerequisites.d.ts +2 -3
  558. package/dist/sdk/test/runs.d.ts +19 -52
  559. package/dist/sdk/test/trust.d.ts +8 -12
  560. package/dist/sdk/test/update.d.ts +9 -25
  561. package/dist/sdk/testing.d.ts +97 -206
  562. package/dist/sdk/traceability/source-traceability.d.ts +25 -56
  563. package/dist/sdk/tracker-root-discovery.d.ts +1 -1
  564. package/dist/sdk/workspace-contracts-cache.d.ts +2 -2
  565. package/dist/sdk/workspace-contracts.d.ts +8 -14
  566. package/dist/sdk/workspace-memory.d.ts +24 -42
  567. package/dist/sdk/workspace-recipe.d.ts +10 -14
  568. package/dist/sdk/workspace-snapshot.d.ts +26 -53
  569. package/dist/sdk/workspace-transaction-gc.d.ts +12 -16
  570. package/dist/sdk/workspace-transaction.d.ts +26 -40
  571. package/dist/sdk/workspace.d.ts +8 -10
  572. package/dist/types/index.d.ts +1 -1
  573. package/dist/types.d.ts +210 -353
  574. package/docs/AGENT_OUTPUT_ENCODINGS.md +16 -0
  575. package/docs/COMMANDS.md +8 -0
  576. package/docs/CONFIGURATION.md +17 -0
  577. package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +28 -9
  578. package/docs/README.md +1 -1
  579. package/docs/READ_OUTPUT_CONTRACTS.md +21 -0
  580. package/docs/RELEASING.md +52 -5
  581. package/docs/SDK.md +17 -2
  582. package/docs/TESTING.md +11 -0
  583. package/marketplace.json +1 -1
  584. package/package.json +2 -1
  585. package/packages/pm-beads/package.json +1 -1
  586. package/packages/pm-calendar/package.json +1 -1
  587. package/packages/pm-command-kit/package.json +1 -1
  588. package/packages/pm-digital-twin/package.json +1 -1
  589. package/packages/pm-governance-audit/package.json +1 -1
  590. package/packages/pm-guide-shell/package.json +1 -1
  591. package/packages/pm-kanban/package.json +1 -1
  592. package/packages/pm-lifecycle-hooks/package.json +1 -1
  593. package/packages/pm-linked-test-adapters/package.json +1 -1
  594. package/packages/pm-search-advanced/package.json +1 -1
  595. package/packages/pm-templates/package.json +1 -1
  596. package/packages/pm-todos/package.json +1 -1
  597. package/packages/pm-vcs/package.json +1 -1
  598. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  599. package/plugins/pm-claude/package.json +1 -1
  600. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  601. package/plugins/pm-codex/package.json +1 -1
  602. package/plugins/pm-codex/plugin.json +1 -1
  603. package/runtime-dependencies.json +1 -1
  604. package/scripts/finalize-build.mjs +41 -4
  605. package/dist/cli-bundle/chunks/chunk-3A5DJZCC.js +0 -116
  606. package/dist/cli-bundle/chunks/chunk-AFZS6WFV.js +0 -3
  607. package/dist/cli-bundle/chunks/chunk-JAE5MWLX.js +0 -2
  608. package/dist/cli-bundle/chunks/chunk-LLTRUVKK.js +0 -6
  609. package/dist/cli-bundle/chunks/chunk-PE6CZ3PE.js +0 -3
  610. package/dist/cli-bundle/chunks/item-revision-TUGZYYXX.js +0 -2
  611. package/dist/cli-bundle/chunks/item-transaction-2RRBAQN3.js +0 -2
  612. package/dist/cli-bundle/focused-chunks/chunk-2A3QZELL.js +0 -26
  613. package/dist/cli-bundle/focused-chunks/chunk-KBRSA4OK.js +0 -44
  614. package/dist/cli-bundle/focused-chunks/chunk-P6TG33FV.js +0 -82
  615. package/dist/cli-bundle/focused-chunks/chunk-PL6EO4GJ.js +0 -2
  616. package/dist/cli-bundle/focused-chunks/chunk-PSLDGAEY.js +0 -12
  617. package/dist/cli-bundle/focused-chunks/chunk-UNNLBJRI.js +0 -2
  618. package/dist/cli-bundle/focused-chunks/item-revision-XNSRDTFB.js +0 -2
  619. package/docs/ECOSYSTEM_PLANNING_REVIEW.md +0 -274
@@ -1,4 +1,4 @@
1
- import type { LinkedTest } from "../../types.js";
1
+ import type{LinkedTest}from "../../types.js";
2
2
  /**
3
3
  * Pure selection logic for `pm test --run` selectors (pm-p86h / GitHub #194).
4
4
  *
@@ -7,22 +7,21 @@ import type { LinkedTest } from "../../types.js";
7
7
  * - `--only-index <n>`: 1-based index into the `--list` order.
8
8
  * - `--only-last`: most recently added entry (last in `--list` order).
9
9
  */
10
- export type LinkedTestSelectorKind = "match" | "only-index" | "only-last";
10
+ export type LinkedTestSelectorKind="match"|"only-index"|"only-last";
11
11
  /** Documents the linked test run selector payload exchanged by command, SDK, and package integrations. */
12
- export interface LinkedTestRunSelector {
12
+ export interface LinkedTestRunSelector{
13
13
  /** Value that configures or reports match for this contract. */
14
14
  match?:string;
15
15
  /** Value that configures or reports only index for this contract. */
16
16
  onlyIndex?:number;
17
17
  /** Value that configures or reports only last for this contract. */
18
- onlyLast?:boolean;
19
- }
18
+ onlyLast?:boolean;}
20
19
  /** Documents the linked test run selection payload exchanged by command, SDK, and package integrations. */
21
- export interface LinkedTestRunSelection {
20
+ export interface LinkedTestRunSelection{
22
21
  /** Value that configures or reports selector for this contract. */
23
- selector:LinkedTestSelectorKind | null;
22
+ selector:LinkedTestSelectorKind|null;
24
23
  /** Value that configures or reports requested for this contract. */
25
- requested:string | null;
24
+ requested:string|null;
26
25
  /** Value that configures or reports selected for this contract. */
27
26
  selected:LinkedTest[];
28
27
  /** 1-based positions of selected entries in the original `--list` order. */
@@ -30,11 +29,10 @@ selected_indexes:number[];
30
29
  /** Number of selected entries represented by this result. */
31
30
  selected_count:number;
32
31
  /** Number of skipped entries represented by this result. */
33
- skipped_count:number;
34
- }
32
+ skipped_count:number;}
35
33
  /** Implements parse only index value for the public runtime surface of this module. */
36
- export declare function parseOnlyIndexValue(raw:string | number,optionName?:string):number;
34
+ export declare function parseOnlyIndexValue(raw:string|number,optionName?:string):number;
37
35
  /** Implements describe linked test entries for the public runtime surface of this module. */
38
36
  export declare function describeLinkedTestEntries(tests:LinkedTest[]):string;
39
37
  /** Implements resolve linked test run selection for the public runtime surface of this module. */
40
- export declare function resolveLinkedTestRunSelection(tests:LinkedTest[],selector:LinkedTestRunSelector):LinkedTestRunSelection;
38
+ export declare function resolveLinkedTestRunSelection(tests:LinkedTest[],selector:LinkedTestRunSelector):LinkedTestRunSelection;
@@ -16,17 +16,17 @@
16
16
  * explicitly granted.
17
17
  */
18
18
  /** Restricts validate fix check values accepted by command, SDK, and storage contracts. */
19
- export type ValidateFixCheck = "metadata" | "resolution" | "lifecycle" | "files";
19
+ export type ValidateFixCheck="metadata"|"resolution"|"lifecycle"|"files";
20
20
  /** Restricts validate fix kind values accepted by command, SDK, and storage contracts. */
21
- export type ValidateFixKind = "set_resolution" | "set_close_reason" | "set_estimate" | "set_closed_at" | "reparent" | "unset_parent" | "prune_file_link" | "prune_doc_link";
21
+ export type ValidateFixKind="set_resolution"|"set_close_reason"|"set_estimate"|"set_closed_at"|"reparent"|"unset_parent"|"prune_file_link"|"prune_doc_link";
22
22
  /** Restricts validate fix scope values accepted by command, SDK, and storage contracts. */
23
- export type ValidateFixScope = "metadata" | "resolution" | "estimates" | "timestamps" | "lifecycle";
23
+ export type ValidateFixScope="metadata"|"resolution"|"estimates"|"timestamps"|"lifecycle";
24
24
  /** Scopes auto-applied without an explicit `--fix-scope` (safe field backfills). */
25
25
  export declare const DEFAULT_GRANTED_FIX_SCOPES:readonly ValidateFixScope[];
26
26
  /** Scopes accepted by `--fix-scope`. Estimates are heuristic, timestamps require verified historical replay, and lifecycle changes are structural; all three require explicit opt-in. */
27
27
  export declare const SUPPORTED_FIX_SCOPES:readonly ValidateFixScope[];
28
28
  /** Documents the validate fix record payload exchanged by command, SDK, and package integrations. */
29
- export interface ValidateFixRecord {
29
+ export interface ValidateFixRecord{
30
30
  /** Item the fix targets. */
31
31
  item_id:string;
32
32
  /** Validate check the finding came from. */
@@ -44,39 +44,35 @@ path?:string;
44
44
  /** Target parent id for reparent fixes. */
45
45
  parent_id?:string;
46
46
  /** Fix scope the `--fix-scope` allowlist must grant for the fix to be applied. Every `--auto-fix` record carries one (the granted default is metadata+resolution; lifecycle must be named explicitly). Absent only on `--prune-missing` records, which are governed by their own flag. */
47
- gate?:ValidateFixScope;
48
- }
47
+ gate?:ValidateFixScope;}
49
48
  /** Documents the resolution backfill row payload exchanged by command, SDK, and package integrations. */
50
- export interface ResolutionBackfillRow {
49
+ export interface ResolutionBackfillRow{
51
50
  /** Stable identifier used to reference this record across commands and storage. */
52
51
  id:string;
53
52
  /** Resolution-check missing field keys for this closed item. */
54
53
  missing_fields:readonly string[];
55
54
  /** The item's close_reason, when present (preferred derivation source). */
56
- close_reason?:string;
57
- }
55
+ close_reason?:string;}
58
56
  /** Plan resolution backfills for closed items flagged by the resolution check. Only the `resolution` field is mechanical enough to auto-fix: it derives from the item's own `close_reason` when present and falls back to the `"completed"` default. `expected_result` / `actual_result` stay hint-only — no deterministic source text exists for them. */
59
57
  export declare function planResolutionBackfillFixes(rows:readonly ResolutionBackfillRow[]):ValidateFixRecord[];
60
58
  /** Documents the close reason backfill row payload exchanged by command, SDK, and package integrations. */
61
- export interface CloseReasonBackfillRow {
59
+ export interface CloseReasonBackfillRow{
62
60
  /** Stable identifier used to reference this record across commands and storage. */
63
61
  id:string;
64
62
  /** The item's resolution, when present (the only derivation source). */
65
- resolution?:string;
66
- }
63
+ resolution?:string;}
67
64
  /** Plan close_reason backfills for closed items flagged by the metadata check. Only derivable when the item already carries a resolution; items missing both stay hint-only (any synthesized reason would be fabricated, not derived). */
68
65
  export declare function planCloseReasonBackfillFixes(rows:readonly CloseReasonBackfillRow[]):ValidateFixRecord[];
69
66
  /** Documents the estimate backfill row payload exchanged by command, SDK, and package integrations. */
70
- export interface EstimateBackfillRow {
67
+ export interface EstimateBackfillRow{
71
68
  /** Stable identifier used to reference this record across commands and storage. */
72
69
  id:string;
73
70
  /** Item type, used to resolve the per-type default estimate. */
74
- type?:string;
75
- }
71
+ type?:string;}
76
72
  /** Plan estimate backfills for items flagged by the metadata check as missing `estimated_minutes` (GH-212). The value is a config-driven per-type default (overrides > built-in map > fallback), never a derived fact — so these fixes carry `gate: "estimates"`, an opt-in scope that is NOT granted by default. `overrides` is the already-normalized `validation.estimate_defaults_by_type` map; pass `undefined`/`{}` to use the built-in defaults. */
77
73
  export declare function planEstimateBackfillFixes(rows:readonly EstimateBackfillRow[],overrides?:Readonly<Record<string,number>>):ValidateFixRecord[];
78
74
  /** Documents the terminal parent fix row payload exchanged by command, SDK, and package integrations. */
79
- export interface TerminalParentFixRow {
75
+ export interface TerminalParentFixRow{
80
76
  /** Stable identifier used to reference this record across commands and storage. */
81
77
  id:string;
82
78
  /** Value that configures or reports parent id for this contract. */
@@ -84,29 +80,24 @@ parent_id:string;
84
80
  /** The terminal parent's own parent, when one exists. */
85
81
  grandparent_id?:string;
86
82
  /** True when the grandparent exists and is NOT terminal (safe reparent target). */
87
- grandparent_active?:boolean;
88
- }
83
+ grandparent_active?:boolean;}
89
84
  /** Plan lifecycle fixes for active items whose parent is terminal (pm-8jss / GH-168). When the terminal parent has an active grandparent, the child is reparented one level up (it stays inside the same hierarchy); otherwise the parent link is cleared so the item surfaces as unparented active work. Either way the item itself is never closed or mutated beyond `parent` — and every fix carries `gate: "lifecycle"` so it is only applied under an explicit `--fix-scope lifecycle`. */
90
85
  export declare function planTerminalParentFixes(rows:readonly TerminalParentFixRow[]):ValidateFixRecord[];
91
86
  /** Documents the stale link prune row payload exchanged by command, SDK, and package integrations. */
92
- export interface StaleLinkPruneRow {
87
+ export interface StaleLinkPruneRow{
93
88
  /** Value that configures or reports item id for this contract. */
94
89
  item_id:string;
95
90
  /** Filesystem path used for path resolution. */
96
91
  path:string;
97
92
  /** Value that configures or reports link kind for this contract. */
98
- link_kind:"files" | "docs";
93
+ link_kind:"files"|"docs";
99
94
  /** Value that configures or reports classification for this contract. */
100
- classification:"moved" | "deleted" | "malformed";
101
- }
95
+ classification:"moved"|"deleted"|"malformed";}
102
96
  /** Plan link prunes for `--prune-missing` (pm-0v2m / GH-184). Only links whose stale path classified as `deleted` are pruned; `moved` links keep their relink candidates in the files-check details instead of being dropped, so recoverable link information is never destroyed. Link removal only — real files are never touched. */
103
97
  export declare function planStaleLinkPruneFixes(rows:readonly StaleLinkPruneRow[]):ValidateFixRecord[];
104
98
  /** Resolve the granted `--fix-scope` set (repeatable and/or comma-separated). With no explicit scopes the safe field-backfill scopes (metadata, resolution) are granted; lifecycle must always be named explicitly. Unknown values fail fast with the supported list. */
105
- export declare function resolveGrantedFixScopes(rawScopes:readonly string[] | undefined):Set<ValidateFixScope>;
99
+ export declare function resolveGrantedFixScopes(rawScopes:readonly string[]|undefined):Set<ValidateFixScope>;
106
100
  /** Split a fix plan into the records that may be applied under the granted scopes and the gated records that were withheld. `--fix-scope` is an exact allowlist: every `--auto-fix` record requires its gate scope in `granted`. Ungated records (`--prune-missing` link prunes, governed by their own flag) are always applicable. */
107
- export declare function partitionFixesByGrant(fixes:readonly ValidateFixRecord[],granted:ReadonlySet<ValidateFixScope>):{
108
- applicable:ValidateFixRecord[];
109
- gated:ValidateFixRecord[];
110
- };
101
+ export declare function partitionFixesByGrant(fixes:readonly ValidateFixRecord[],granted:ReadonlySet<ValidateFixScope>):{applicable:ValidateFixRecord[];gated:ValidateFixRecord[];};
111
102
  /** Compact serialization of a fix for planned/applied output rows. */
112
- export declare function toFixOutputRow(fix:ValidateFixRecord):Record<string,unknown>;
103
+ export declare function toFixOutputRow(fix:ValidateFixRecord):Record<string,unknown>;
@@ -8,11 +8,10 @@
8
8
  * `{ Task: { close_reason: 3, reviewer: 1 } }`.
9
9
  */
10
10
  /** One missing required metadata field observed on an item of a specific type. */
11
- export interface MissingFieldOccurrence {
11
+ export interface MissingFieldOccurrence{
12
12
  /** Item type name as stored in item metadata (e.g. "Task"). */
13
13
  item_type:string;
14
14
  /** Required metadata field that is missing on the item. */
15
- field:string;
16
- }
15
+ field:string;}
17
16
  /** Aggregate missing-field occurrences into `{ type: { field: count } }` with both levels sorted lexicographically for stable, diff-friendly output. Zero counts never appear (only observed occurrences are aggregated). */
18
- export declare function buildMissingByTypeCounts(occurrences:Iterable<MissingFieldOccurrence>):Record<string,Record<string,number>>;
17
+ export declare function buildMissingByTypeCounts(occurrences:Iterable<MissingFieldOccurrence>):Record<string,Record<string,number>>;
@@ -13,20 +13,19 @@
13
13
  * the already-collected stale-link rows plus a metadata `lookup` closure.
14
14
  */
15
15
  /** Classification assigned to a stale linked path during files validation. */
16
- export type StaleLinkClassification = "moved" | "deleted" | "malformed";
16
+ export type StaleLinkClassification="moved"|"deleted"|"malformed";
17
17
  /** Documents the stale link owner input payload exchanged by command, SDK, and package integrations. */
18
- export interface StaleLinkOwnerInput {
18
+ export interface StaleLinkOwnerInput{
19
19
  /** Value that configures or reports item id for this contract. */
20
20
  item_id:string;
21
21
  /** Normalized workspace-relative path that no longer resolves. */
22
22
  path:string;
23
23
  /** Which link list of the owning item the path lives in. */
24
- link_kind:"files" | "docs";
24
+ link_kind:"files"|"docs";
25
25
  /** Value that configures or reports classification for this contract. */
26
- classification:StaleLinkClassification;
27
- }
26
+ classification:StaleLinkClassification;}
28
27
  /** Documents the missing linked path owner payload exchanged by command, SDK, and package integrations. */
29
- export interface MissingLinkedPathOwner {
28
+ export interface MissingLinkedPathOwner{
30
29
  /** Stable identifier used to reference this record across commands and storage. */
31
30
  id:string;
32
31
  /** Owning item type, `"Unknown"` if metadata is absent. */
@@ -36,26 +35,23 @@ title:string;
36
35
  /** Owning item status, `""` if absent. */
37
36
  status:string;
38
37
  /** The link list the path lives in (= the input `link_kind`). */
39
- field:"files" | "docs";
40
- }
38
+ field:"files"|"docs";}
41
39
  /** Documents the missing linked path row payload exchanged by command, SDK, and package integrations. */
42
- export interface MissingLinkedPathRow {
40
+ export interface MissingLinkedPathRow{
43
41
  /** Filesystem path used for path resolution. */
44
42
  path:string;
45
43
  /** Value that configures or reports classification for this contract. */
46
44
  classification:StaleLinkClassification;
47
45
  /** Value that configures or reports items for this contract. */
48
- items:MissingLinkedPathOwner[];
49
- }
46
+ items:MissingLinkedPathOwner[];}
50
47
  /** Documents the owner item metadata payload exchanged by command, SDK, and package integrations. */
51
- export interface OwnerItemMetadata {
48
+ export interface OwnerItemMetadata{
52
49
  /** Schema type that determines the shape and validation rules for this value. */
53
50
  type?:string;
54
51
  /** Value that configures or reports title for this contract. */
55
52
  title?:string;
56
53
  /** Lifecycle state reported for status. */
57
- status?:string;
58
- }
54
+ status?:string;}
59
55
  /**
60
56
  * Group stale-link owner inputs by linked path and attach owning-item metadata.
61
57
  *
@@ -65,7 +61,7 @@ status?:string;
65
61
  * - `classification` per path follows {@link preferClassification} (moved wins).
66
62
  * - Missing metadata falls back: type `"Unknown"`, title `""`, status `""`.
67
63
  */
68
- export declare function buildMissingLinkedPathRows(rows:readonly StaleLinkOwnerInput[],lookup:(itemId:string) => OwnerItemMetadata | undefined):MissingLinkedPathRow[];
64
+ export declare function buildMissingLinkedPathRows(rows:readonly StaleLinkOwnerInput[],lookup:(itemId:string)=> OwnerItemMetadata|undefined):MissingLinkedPathRow[];
69
65
  /**
70
66
  * Token-efficient one-line-per-owner serialization for the files-check details
71
67
  * (compact text counterpart to the full {@link MissingLinkedPathRow} objects).
@@ -75,4 +71,4 @@ export declare function buildMissingLinkedPathRows(rows:readonly StaleLinkOwnerI
75
71
  * render (`status=` and `title=""`). Order follows
76
72
  * {@link buildMissingLinkedPathRows} output order.
77
73
  */
78
- export declare function summarizeMissingLinkedPathRows(rows:readonly MissingLinkedPathRow[]):string[];
74
+ export declare function summarizeMissingLinkedPathRows(rows:readonly MissingLinkedPathRow[]):string[];
@@ -14,9 +14,9 @@
14
14
  * already-collected candidate file list from the files check scan.
15
15
  */
16
16
  /** Classification labels for linked paths that no longer exist on disk. */
17
- export type StaleLinkedPathClassification = "moved" | "deleted" | "malformed";
17
+ export type StaleLinkedPathClassification="moved"|"deleted"|"malformed";
18
18
  /** Documents the classified stale linked path payload exchanged by command, SDK, and package integrations. */
19
- export interface ClassifiedStaleLinkedPath {
19
+ export interface ClassifiedStaleLinkedPath{
20
20
  /** Normalized workspace-relative stale linked path. */
21
21
  path:string;
22
22
  /** Value that configures or reports classification for this contract. */
@@ -24,11 +24,10 @@ classification:StaleLinkedPathClassification;
24
24
  /** Candidate new locations (same basename, different path), sorted and capped at `candidateLimit`. Empty for `deleted` and `malformed`. */
25
25
  candidates:string[];
26
26
  /** True when more candidates existed than `candidateLimit` allowed. */
27
- candidates_truncated:boolean;
28
- }
27
+ candidates_truncated:boolean;}
29
28
  /** Fallback stale path candidate limit used when callers do not provide an override. */
30
- export declare const DEFAULT_STALE_PATH_CANDIDATE_LIMIT = 3;
29
+ export declare const DEFAULT_STALE_PATH_CANDIDATE_LIMIT=3;
31
30
  /** Classify each stale (missing) linked path as `moved`, `deleted`, or `malformed` by matching its basename against the candidate file list. Output preserves the input order of `stalePaths` (callers pass an already-sorted unique list). A candidate equal to the stale path itself never matches (the path is known missing; an identical candidate would be self-referential noise). */
32
31
  export declare function classifyStaleLinkedPaths(stalePaths:readonly string[],candidateFiles:readonly string[],candidateLimit?:number):ClassifiedStaleLinkedPath[];
33
32
  /** Render compact `<path>:moved:<top-candidate>` / `<path>:deleted` rows for the files check details (token-efficient counterpart to the full classification objects). */
34
- export declare function summarizeStaleLinkedPathClassifications(classified:readonly ClassifiedStaleLinkedPath[]):string[];
33
+ export declare function summarizeStaleLinkedPathClassifications(classified:readonly ClassifiedStaleLinkedPath[]):string[];
@@ -1,4 +1,4 @@
1
- import type { PmToolAction } from "../sdk/cli-contracts/enum-contracts.js";
1
+ import type{PmToolAction}from "../sdk/cli-contracts/enum-contracts.js";
2
2
  /**
3
3
  * Static MCP tool surface for the pm MCP server.
4
4
  *
@@ -7,7 +7,7 @@ import type { PmToolAction } from "../sdk/cli-contracts/enum-contracts.js";
7
7
  * golden file (pm-4os2) without importing the full MCP server runtime, and so
8
8
  * the server itself stays the single consumer of the dispatch handlers.
9
9
  */
10
- export interface ToolDefinition {
10
+ export interface ToolDefinition{
11
11
  /** Value that configures or reports name for this contract. */
12
12
  name:string;
13
13
  /** Value that configures or reports description for this contract. */
@@ -15,31 +15,9 @@ description:string;
15
15
  /** Value that configures or reports input schema for this contract. */
16
16
  inputSchema:Record<string,unknown>;
17
17
  /** Optional negotiated extension metadata projected during tools/list. */
18
- _meta?:Record<string,unknown>;
19
- }
18
+ _meta?:Record<string,unknown>;}
20
19
  /** MCP transport parameters layered over every canonical action schema. */
21
- export declare const TOOL_SCHEMA_BASE:{
22
- readonly type:"object";
23
- readonly properties:{
24
- readonly cwd:{
25
- readonly type:"string";
26
- readonly description:"Workspace directory to run the native pm operation in. Defaults to the MCP server process cwd.";
27
- };
28
- readonly path:{
29
- readonly type:"string";
30
- readonly description:"Optional pm data root, equivalent to PM_PATH/global --path. Leave unset for real repository tracking.";
31
- };
32
- readonly author:{
33
- readonly type:"string";
34
- readonly description:"Optional mutation author override. Otherwise pm uses PM_AUTHOR, project settings, or detected harness identity.";
35
- };
36
- readonly tokenAccounting:{
37
- readonly type:"boolean";
38
- readonly description:"Attach the same bounded per-section token-cost receipt emitted by CLI --token-accounting.";
39
- };
40
- };
41
- readonly additionalProperties:true;
42
- };
20
+ export declare const TOOL_SCHEMA_BASE:{readonly type:"object";readonly properties:{readonly cwd:{readonly type:"string";readonly description:"Workspace directory to run the native pm operation in. Defaults to the MCP server process cwd.";};readonly path:{readonly type:"string";readonly description:"Optional pm data root, equivalent to PM_PATH/global --path. Leave unset for real repository tracking.";};readonly author:{readonly type:"string";readonly description:"Optional mutation author override. Otherwise pm uses PM_AUTHOR, project settings, or detected harness identity.";};readonly tokenAccounting:{readonly type:"boolean";readonly description:"Attach the same bounded per-section token-cost receipt emitted by CLI --token-accounting.";};};readonly additionalProperties:true;};
43
21
  /** Canonical SDK action backing each dedicated MCP tool schema. */
44
22
  export declare const NARROW_TOOL_ACTIONS:Readonly<Record<string,PmToolAction>>;
45
23
  /**
@@ -49,7 +27,7 @@ export declare const NARROW_TOOL_ACTIONS:Readonly<Record<string,PmToolAction>>;
49
27
  */
50
28
  export declare const TOOLS:ToolDefinition[];
51
29
  /** Stable projection of one MCP tool definition for the contract golden file (pm-4os2): tool name, description, required top-level fields, and the full inputSchema shape. Any drift (typo'd property, dropped required field, changed TOOL_SCHEMA_BASE) shows up in `pnpm contracts:check`. */
52
- export interface McpToolContract {
30
+ export interface McpToolContract{
53
31
  /** Value that configures or reports name for this contract. */
54
32
  name:string;
55
33
  /** Value that configures or reports description for this contract. */
@@ -57,7 +35,6 @@ description:string;
57
35
  /** Value that configures or reports required for this contract. */
58
36
  required:string[];
59
37
  /** Value that configures or reports input schema for this contract. */
60
- input_schema:Record<string,unknown>;
61
- }
38
+ input_schema:Record<string,unknown>;}
62
39
  /** Implements build mcp tool contracts for the public runtime surface of this module. */
63
- export declare function buildMcpToolContracts():McpToolContract[];
40
+ export declare function buildMcpToolContracts():McpToolContract[];
@@ -1,2 +1,2 @@
1
- (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fa6c2d48-6285-56f1-adf7-0da4f5f1edcc")}catch{}})();import{WORKFLOW_POLICY_ACTIONS,GRAPH_SUBCOMMAND_VALUES,PM_DISCOVERABLE_TOOL_ACTIONS}from"../sdk/cli-contracts/enum-contracts.js";import{buildPmActionToolInputSchema}from"../sdk/cli-contracts/tool-schema.js";import{RUNTIME_STATUS_ROLE_VALUES}from"../types.js";const CANONICAL_OUTPUT_SESSION_TOOL_PROPERTY=buildPmActionToolInputSchema("list").properties.outputSession,READ_OUTPUT_TOOL_PROPERTIES={outputInclude:{type:"string",minLength:1,description:"Comma-separated fields or sections retained by any built-in read action."},outputLimit:{anyOf:[{type:"integer",minimum:1},{const:"unbounded"}],description:"Universal read row ceiling, or unbounded to disable the shared ceiling."},outputBudget:{anyOf:[{type:"integer",minimum:1},{const:"unbounded"}],description:"Universal estimated-token ceiling, or unbounded to return the complete read result."},outputFormat:{type:"string",enum:["json","toon"],description:"Universal read-result encoding selector."},outputSession:{...CANONICAL_OUTPUT_SESSION_TOOL_PROPERTY},outputCursor:{type:"string",minLength:1,description:"Opaque continuation cursor returned after budget compaction of a declared row collection."}},workflowPolicyOptionProperties={definition:{anyOf:[{type:"object"},{type:"string"}],description:"Policy declaration for policy-put, or proposed metadata for policy-check; structured JSON or JSON text."},policy:{type:"string",description:"Approval policy id for policy-approve."},message:{type:"string",description:"History explanation for policy mutations and approvals."},dryRun:{type:"boolean",description:"Preview registry changes without writing; policy-approve rejects previews."}},TOOL_SCHEMA_BASE={type:"object",properties:{cwd:{type:"string",description:"Workspace directory to run the native pm operation in. Defaults to the MCP server process cwd."},path:{type:"string",description:"Optional pm data root, equivalent to PM_PATH/global --path. Leave unset for real repository tracking."},author:{type:"string",description:"Optional mutation author override. Otherwise pm uses PM_AUTHOR, project settings, or detected harness identity."},tokenAccounting:{type:"boolean",description:"Attach the same bounded per-section token-cost receipt emitted by CLI --token-accounting."}},additionalProperties:!0},idSchema={type:"string",description:"pm item id, for example pm-abc1."},PM_RUN_ACTION_DESCRIPTION=`Operation name (one of): ${PM_DISCOVERABLE_TOOL_ACTIONS.join(", ")}. Package-owned actions are available dynamically when their provider package is installed.`,LIST_TOP_LEVEL_OPTION_PROPERTIES={status:{type:"string",description:"Alias for options.status."},type:{type:"string",description:"Alias for options.type."},tag:{type:"string",description:"Alias for options.tag."},priority:{type:"string",description:"Alias for options.priority."},limit:{type:["string","number"],description:"Alias for options.limit."},offset:{type:["string","number"],description:"Alias for options.offset."}},SEARCH_TOP_LEVEL_OPTION_PROPERTIES={mode:{type:"string",description:"Alias for options.mode."},status:{type:"string",description:"Alias for options.status."},type:{type:"string",description:"Alias for options.type."},tag:{type:"string",description:"Alias for options.tag."},priority:{type:"string",description:"Alias for options.priority."},limit:{type:["string","number"],description:"Alias for options.limit."}};function objectSchema(properties,required=[]){return{...TOOL_SCHEMA_BASE,properties:{...TOOL_SCHEMA_BASE.properties,...properties},required}}const RAW_TOOLS=[{name:"pm_run",description:"Run any supported pm operation natively through the pm library. Use this for commands not covered by narrower pm_* tools.",inputSchema:objectSchema({action:{type:"string",enum:[...PM_DISCOVERABLE_TOOL_ACTIONS],description:PM_RUN_ACTION_DESCRIPTION},id:idSchema,query:{type:"string",description:"Search query for action=search."},reason:{type:"string",description:"Close reason for action=close."},force:{type:"boolean",description:"Force ownership/terminal-state override when supported."},subcommand:{type:"string",description:"Subcommand selector for actions that take one (for example telemetry, or schema \u2014 prefer the dedicated pm_schema tool for schema operations)."},options:{type:"object",description:"Underlying pm command options using camelCase keys."},fullChangedFields:{type:"boolean",description:"For mutation actions, return the full changed_fields array instead of the default changed_field_count."},idOnly:{type:"boolean",description:"For single-item mutation actions, return only id and status."},...READ_OUTPUT_TOOL_PROPERTIES},["action"])},{name:"pm_discover",description:"Discover the smallest relevant authorized pm tool catalog under an explicit token budget. Ranking is deterministic and returns public lexical, semantic, graph, permission, freshness, and usage signal explanations. Continue with next_cursor; set includeSchema=true only when complete input schemas are needed.",inputSchema:objectSchema({query:{type:"string",maxLength:4096,description:"Free-text capability intent. Empty text lists by stable policy order."},family:{type:"string",enum:["workspace","intake","context","lifecycle","evidence","graph","quality","automation","extensions","internal"],description:"Optional stable capability-family filter."},tier:{type:"string",enum:["core","standard","full"],description:"Maximum command visibility tier included in results."},limit:{type:"integer",minimum:1,maximum:100,description:"Maximum result rows; defaults to 10."},cursor:{type:"string",minLength:1,maxLength:4096,description:"Opaque next_cursor from an equivalent discovery request."},includeSchema:{type:"boolean",description:"Include complete tool input schemas; false by default."},outputBudget:{anyOf:[{type:"integer",minimum:128},{const:"unbounded"}],description:"Estimated-token ceiling; defaults to 1200."}})},{name:"pm_context",description:"Return the agent-oriented project context snapshot. Pass options.depth=brief|standard|deep|full (full = every section with no per-section row cap), options.parent='<id>' to scope the snapshot to one item's subtree (the item plus all descendants), options.fields='id,title,priority' to project focus rows to a field subset for low-token reads, or options.section=['hierarchy','progress',...] to pick sections.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_next",description:"Recommend the next actionable work item: the single highest-priority READY item (active status, no open blockers, no open children; completed containers surface only when no concrete leaf work is ready) plus the ranked ready and blocked queues. The recommended item carries a rationale and each blocked item lists the open blockers gating it. Pass options.parent='<id>' to scope to one subtree, options.limit=N to cap ready rows, options.readyOnly=true to omit the blocked list, or filters (options.type/tag/priority/assignee/sprint/release). The most token-efficient 'what should I do now?' read for agents.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_search",description:"Search pm items with keyword, semantic, or hybrid search. Defaults to a compact projection for token efficiency. Pass options.mode=keyword|semantic|hybrid (default follows search.default_mode: auto runs hybrid when semantic search is configured and runnable, else keyword; the result reports mode_source), options.limit=N to cap hits, options.status='all' for no lifecycle restriction, options.fields='id,title,score' for a custom projection, or options.full=true for full item bodies (can be large). The result echoes the applied filters and projection mode in query_summary.",inputSchema:objectSchema({query:{type:"string"},options:{type:"object"},...SEARCH_TOP_LEVEL_OPTION_PROPERTIES},["query"])},{name:"pm_list",description:"List pm items with status/type/tag/priority filters. Defaults to compact projection for token efficiency. options.status accepts CSV (all,open,in_progress). Pass options.compact=false or options.includeBody=true for full bodies/comments. Pass options.brief=true for ultra-terse (id/status/type/title only). Pass options.fields='id,title,priority' for custom projection. Pass options.limit=N to cap row count. The result echoes the applied filters and projection mode in query_summary.",inputSchema:objectSchema({options:{type:"object"},...LIST_TOP_LEVEL_OPTION_PROPERTIES})},{name:"pm_get",description:"Read one pm item with shared SDK projections. Pass options.depth='brief' or options.fields='id,title,status' for low-token inspection, options.fields='id,schedule.start_at' for schedule context, or options.at='7' / an ISO timestamp for a verified mutation-free historical read. Parent results include bounded child counts, samples, and continuation metadata.",inputSchema:objectSchema({id:idSchema,options:{type:"object",description:"Get options such as depth=brief|standard|deep|full, fields=id,title,status, or at=<version|ISO timestamp>."}},["id"])},{name:"pm_events",description:"Read a bounded, cursor-resumable page of committed mutation events across item history streams. Batch cursors are the token-efficient default; pass cursorMode=row for per-event checkpoints.",inputSchema:objectSchema({verify:{type:"boolean",description:"Verify complete selected authoritative history chains."},since:{type:"string",description:"Durable event cursor or ISO timestamp lower bound."},type:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},author:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},item:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},limit:{type:"integer",minimum:0,maximum:1e3},full:{type:"boolean"},cursorMode:{type:"string",enum:["batch","row"],description:"Cursor framing: batch returns one terminal next_cursor (default); row also adds a cursor to every event."}})},{name:"pm_create",description:"Create a pm item natively and write pm history. Output is compact by default (changed_fields replaced with changed_field_count for token efficiency); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},allowMissingParent:{type:"boolean",description:"Allow unresolved parent references and emit a validation warning."},allowDuplicate:{type:"boolean",description:"Explicitly create when strict similarity governance finds likely duplicates."},options:{type:"object",description:"Create options. title and description are required."}},["options"])},{name:"pm_mutate",description:"Apply an ordered create/update/close/release batch atomically through the public pm SDK. Create rows may declare ref and omit id; @ref forward references resolve deterministically from the stable transactionId, which is derived from the batch when omitted. Bulk creation: rows shaped as {item:{title,type,...}} are create documents using pm create field names; upsertKey updates the existing item whose field matches instead of creating a duplicate. Set dryRun=true to validate and preview without writes.",inputSchema:objectSchema({transactionId:{type:"string",description:"Stable idempotency key for this atomic mutation batch; derived from the batch content when omitted."},mutations:{type:"array",minItems:1,description:"Ordered rows shaped as {op:create|update|close|release,id?,ref?,options?,reason?} or create documents {ref?,item:{...}}.",items:{type:"object",properties:{op:{type:"string",enum:["create","update","close","release"],description:"Operation; omitted rows carrying item are creates."},id:idSchema,ref:{type:"string",description:"Batch-local create alias; its deterministic id can be referenced as @alias by any row."},reason:{type:"string"},options:{type:"object"},item:{type:"object",description:"Create document using pm create field names (title, type, description, body, tags, parent, custom fields)."},unique:{type:"object",description:"Create-only guard {key,value} re-checked under the writer lock; keyed upsert sets it on rows that matched nothing at planning time."},match:{type:"object",description:"Update-only guard {key,value} re-read under the writer lock; keyed upsert sets it on rows it converted into updates of a matched item."}},additionalProperties:!1}},upsertKey:{type:"string",description:"Item field whose value identifies an existing item to update instead of creating a duplicate."},dryRun:{type:"boolean",description:"Validate and preview without writing."},createCompensation:{type:"string",enum:["close","delete"],description:"How a failed batch compensates created items; defaults to close."},lockTtlSeconds:{type:"number"},lockWaitMs:{type:"number"}},["mutations"])},{name:"pm_copy",description:"Copy an existing pm item into a new id while resetting lifecycle fields. Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({id:idSchema,fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},idOnly:{type:"boolean",description:"Return only id and status."},options:{type:"object",description:"Copy options such as title override, author, and message."}},["id"])},{name:"pm_focus",description:"Set, clear, or show the session focused item. When focused, pm_create defaults its parent to the focused item (an explicit parent still overrides). Pass id to focus an item, options.clear=true to clear, or neither to show current focus.",inputSchema:objectSchema({id:idSchema,clear:{type:"boolean",description:"Clear the focused item (cannot be combined with id)."},options:{type:"object",description:"Focus options such as clear (boolean)."}},[])},{name:"pm_update",description:"Update pm item metadata/body/dependencies/log seeds natively. Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields delta.",inputSchema:objectSchema({id:idSchema,fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},options:{type:"object"}},["id","options"])},{name:"pm_append",description:"Append markdown text to a pm item body and write pm history. Useful for seeding evidence/log entries before close. Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({id:idSchema,body:{type:"string",description:"Markdown text to append to the item body. Required here or as options.body."},fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},options:{type:"object",description:"Append options such as body, author, and message."}},["id"])},{name:"pm_claim",description:"Claim a pm item.",inputSchema:objectSchema({id:idSchema,force:{type:"boolean"},options:{type:"object"}},["id"])},{name:"pm_release",description:"Release a pm item claim.",inputSchema:objectSchema({id:idSchema,force:{type:"boolean"},options:{type:"object"}},["id"])},{name:"pm_close",description:"Close a pm item with optional close reason and optional close validation (reason requirement follows governance settings). Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({id:idSchema,reason:{type:"string",description:"Close reason text when provided or required by governance settings."},duplicateOf:{type:"string",description:"Canonical item id when closing this item as a duplicate."},fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},idOnly:{type:"boolean",description:"Return only id and status."},options:{type:"object"}},["id"])},{name:"pm_comments",description:"List, add, edit, or delete comments on a pm item. Use options.add to append, options.edit=<1-based index> with replacement text to fix a comment, or options.delete=<1-based index> to remove one. options.ifAbsent applies only to options.add for retry-safe author-and-text deduplication and cannot combine with options.edit or options.delete. List calls default to the most recent 20 comments with total_count/has_more metadata for token efficiency. Pass options.limit=N to choose a page size, options.limit=0 for summary-only metadata, or options.full=true for full history. Rows carry their absolute index; pair edit/delete with options.expectAt to refuse a different entry.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_files",description:"List, add, remove, or validate linked files for a pm item.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_docs",description:"List, add, or remove linked docs for a pm item.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_notes",description:"List, add, edit, or delete structured notes on a pm item. options.ifAbsent applies only to options.add for retry-safe author-and-text deduplication and cannot combine with options.edit or options.delete. Omit mutation options to list existing notes; rows carry their absolute index, and options.expectAt guards edit/delete.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_learnings",description:"List, add, edit, or delete learnings on a pm item. options.ifAbsent applies only to options.add for retry-safe author-and-text deduplication and cannot combine with options.edit or options.delete. Omit mutation options to list existing learnings; rows carry their absolute index, and options.expectAt guards edit/delete.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_deps",description:"Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with direction, kind, depth, node, edge, token, and cursor bounds; context returns a counts-first summary, per-node roles/reasons, root evidence pointers, and enumerated missing references.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_graph",description:"Run bounded workspace relationship-graph queries: ancestors/descendants (hierarchy), predecessors/successors (ordering), paths, impact (blast radius), analyze (execution + knowledge analytics), audit (governance findings with change-since-baseline deltas), communities (label-propagation clusters), redundancy (transitively implied edges), dominators (structural bottlenecks), slack (critical-path method float per task), centrality (betweenness/closeness/degree with directed fan-in/out), articulation (cut points and bridges \u2014 single points of failure), plan (dry-run remediation proposals derived from the audit), and index (durable cross-process graph index status/rebuild/clear). Traversals, paths, impact, and dominators require id; paths also requires target. Options support kind, maxDepth, limit, after, direction, maxPaths, sample, exemptIsolate, exemptIsolateType, saveBaseline (audit), rebuild/clear (index), and counts-first summary.",inputSchema:objectSchema({subcommand:{type:"string",enum:[...GRAPH_SUBCOMMAND_VALUES]},id:idSchema,target:idSchema,options:{type:"object"}},["subcommand"])},{name:"pm_test",description:"List, add, remove, or run linked tests for a pm item.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_validate",description:"Run pm validation checks.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_health",description:"Run pm health diagnostics. Pass options.brief=true for compact low-token details, options.skipIntegrity=true, options.skipDrift=true, options.skipVectors=true for a fast status-only check, or options.full=true for the complete deep check.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_contracts",description:"Inspect pm command, flag, schema, and availability contracts.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_schema",description:"Inspect or modify the workspace item-type/status/field schema (pm schema). subcommand selects the operation; name carries the item type name (show/add-type/remove-type), status id (show-status/add-status/remove-status), or field key (show-field/add-field/remove-field). apply-preset adopts a domain type preset; add-type with infer=true derives types from title-prefix conventions. Policy verbs author declarations, preview changes, set enforcement, and record content-bound approvals. Registry mutations write workspace history; approvals write item history.",inputSchema:objectSchema({...workflowPolicyOptionProperties,subcommand:{type:"string",enum:["list","show","show-status","add-type","remove-type","add-status","remove-status","add-field","remove-field","list-fields","show-field","apply-preset",...WORKFLOW_POLICY_ACTIONS],description:"Schema subcommand to run."},name:{type:"string",description:"Item type name, status id, field key, policy id, or item id for the selected schema verb; policy-mode requires advise|refuse."},description:{type:"string",description:"Custom item type, status, or field description for add-type/add-status/add-field."},defaultStatus:{type:"string",description:"Default status for add-type."},folder:{type:"string",description:"Storage folder for add-type."},alias:{type:"array",items:{type:"string"},description:"Aliases for add-type/add-status, or extra CLI flag aliases for add-field."},role:{type:"array",items:{type:"string",enum:[...RUNTIME_STATUS_ROLE_VALUES]},description:`Lifecycle roles for add-status: ${RUNTIME_STATUS_ROLE_VALUES.join(", ")}.`},order:{type:"number",description:"Display/sort order for add-status."},fieldType:{type:"string",enum:["string","number","boolean","string_array"],description:"Value type for a custom field (add-field)."},commands:{type:"array",items:{type:"string"},description:"Commands a custom field is wired onto (add-field): create, update, update_many, list, search, calendar, context."},cliFlag:{type:"string",description:"Override the auto-derived CLI flag for a custom field (add-field)."},required:{type:"boolean",description:"Mark a custom field as always required (add-field)."},requiredOnCreate:{type:"boolean",description:"Mark a custom field as required at create time (add-field)."},allowUnset:{type:"boolean",description:"Whether a custom field may be cleared via --unset (add-field); defaults to true."},requiredTypes:{type:"array",items:{type:"string"},description:"Restrict a custom field's requirement to specific item types (add-field)."},typePreset:{type:"string",enum:["agile","ops","research"],description:"Domain type preset to adopt (apply-preset)."},infer:{type:"boolean",description:"Infer item types from title-prefix conventions (add-type); previews unless apply is true."},minCount:{type:"number",description:"Minimum items sharing a prefix for add-type inference (default 10)."},apply:{type:"boolean",description:"Register inferred types (add-type infer); without it the call previews only."},force:{type:"boolean",description:"Override removal guardrails for destructive schema changes when supported."},options:{type:"object",description:"Additional schema options using camelCase keys.",properties:workflowPolicyOptionProperties}},["subcommand"])},{name:"pm_profile",description:"List, show, apply, or lint project profiles (pm profile) \u2014 archetype bundles that stage item types, statuses, fields, per-type workflows, config knobs, create templates, and recommended packages. subcommand selects the operation; name carries the profile name (agile, ops, research) for show/apply/lint. apply stages every dimension idempotently; dryRun previews the diff without writing; lint reports author-time consistency findings (graded error/warning) without touching the tracker. Profile staging writes workspace config/schema files, not item history.",inputSchema:objectSchema({subcommand:{type:"string",enum:["list","show","apply","lint"],description:"Profile subcommand to run."},name:{type:"string",description:"Profile name for show/apply/lint. Required for those subcommands. Built-ins are agile, ops, and research; an active extension can contribute additional archetype names that resolve here too."},dryRun:{type:"boolean",description:"Preview the apply diff without writing any files (apply)."},author:{type:"string",description:"Mutation author for apply."},force:{type:"boolean",description:"Force ownership/lock override for apply."},options:{type:"object",description:"Additional profile options using camelCase keys."}},["subcommand"])},{name:"pm_config",description:"Read or write pm workspace configuration (pm config). configAction selects get/set/list/export; key/value address a single setting for get/set. scope chooses the project (default) or global settings file.",inputSchema:objectSchema({configAction:{type:"string",enum:["get","set","list","export"],description:"Config operation to perform. get/set require key; list/export dump the resolved settings surface."},key:{type:"string",description:"Settings key for get/set, for example governance-require-close-reason, telemetry-tracking, or a nested leaf such as search_provider (dash and underscore variants accepted; configAction=get without a key lists supported keys in the error)."},value:{type:"string",description:"New value for configAction=set."},scope:{type:"string",enum:["project","global"],description:"Settings scope to read or write. Defaults to project."},options:{type:"object",description:"Additional config options such as criterion, clearCriteria, format, or policy."}},["configAction"])},{name:"pm_plan",description:"Run agent-optimized Plan workflows. options.subcommand selects: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize. Provide id for all non-create subcommands; provide stepRef for step lifecycle subcommands. Plans store agent-readable steps with dependencies, decisions, discoveries, validation, and resume context.",inputSchema:objectSchema({id:{type:"string",description:"Plan id (required for all subcommands except create)."},stepRef:{type:"string",description:"Step id or order for step lifecycle subcommands."},options:{type:"object",description:"Plan options including subcommand, stepRef, stepStatus, link, depth, etc."}})}],NARROW_TOOL_ACTIONS={pm_append:"append",pm_claim:"claim",pm_close:"close",pm_comments:"comments",pm_config:"config",pm_context:"context",pm_contracts:"contracts",pm_copy:"copy",pm_create:"create",pm_deps:"deps",pm_docs:"docs",pm_events:"events",pm_files:"files",pm_focus:"focus",pm_get:"get",pm_graph:"graph",pm_health:"health",pm_learnings:"learnings",pm_list:"list",pm_next:"next",pm_notes:"notes",pm_plan:"plan",pm_profile:"profile",pm_release:"release",pm_schema:"schema",pm_search:"search",pm_test:"test",pm_update:"update",pm_validate:"validate"},TOOLS=RAW_TOOLS.map(tool=>{const action=NARROW_TOOL_ACTIONS[tool.name];if(!action)return tool;const properties=tool.inputSchema.properties,required=tool.inputSchema.required.map(String);return{...tool,inputSchema:buildPmActionToolInputSchema(action,{properties,required})}});function buildMcpToolContracts(){return TOOLS.map(tool=>{const schemaRequired=tool.inputSchema.required,required=Array.isArray(schemaRequired)?schemaRequired.map(entry=>String(entry)).sort((left,right)=>left.localeCompare(right)):[];return{name:tool.name,description:tool.description,required,input_schema:tool.inputSchema}}).sort((left,right)=>left.name.localeCompare(right.name))}export{NARROW_TOOL_ACTIONS,TOOLS,TOOL_SCHEMA_BASE,buildMcpToolContracts};
1
+ (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="78b20f7a-4ae7-5811-9ab7-049a07d844e5")}catch{}})();import{WORKFLOW_POLICY_ACTIONS,GRAPH_SUBCOMMAND_VALUES,PM_DISCOVERABLE_TOOL_ACTIONS}from"../sdk/cli-contracts/enum-contracts.js";import{buildPmActionToolInputSchema}from"../sdk/cli-contracts/tool-schema.js";import{RUNTIME_STATUS_ROLE_VALUES}from"../types.js";const CANONICAL_OUTPUT_SESSION_TOOL_PROPERTY=buildPmActionToolInputSchema("list").properties.outputSession,READ_OUTPUT_TOOL_PROPERTIES={outputInclude:{type:"string",minLength:1,description:"Comma-separated fields or sections retained by any built-in read action."},outputLimit:{anyOf:[{type:"integer",minimum:1},{const:"unbounded"}],description:"Universal read row ceiling, or unbounded to disable the shared ceiling."},outputBudget:{anyOf:[{type:"integer",minimum:1},{const:"unbounded"}],description:"Universal estimated-token ceiling, or unbounded to return the complete read result."},outputFormat:{type:"string",enum:["json","toon"],description:"Universal read-result encoding selector."},outputSession:{...CANONICAL_OUTPUT_SESSION_TOOL_PROPERTY},outputCursor:{type:"string",minLength:1,description:"Opaque continuation cursor returned after budget compaction of a declared row collection."}},workflowPolicyOptionProperties={definition:{anyOf:[{type:"object"},{type:"string"}],description:"Policy declaration for policy-put, or proposed metadata for policy-check; structured JSON or JSON text."},policy:{type:"string",description:"Approval policy id for policy-approve."},message:{type:"string",description:"History explanation for policy mutations and approvals."},dryRun:{type:"boolean",description:"Preview registry changes without writing; policy-approve rejects previews."}},TOOL_SCHEMA_BASE={type:"object",properties:{cwd:{type:"string",description:"Workspace directory to run the native pm operation in. Defaults to the MCP server process cwd."},path:{type:"string",description:"Optional pm data root, equivalent to PM_PATH/global --path. Leave unset for real repository tracking."},author:{type:"string",description:"Optional mutation author override. Otherwise pm uses PM_AUTHOR, project settings, or detected harness identity."},tokenAccounting:{type:"boolean",description:"Attach the same bounded per-section token-cost receipt emitted by CLI --token-accounting."}},additionalProperties:!0},idSchema={type:"string",description:"pm item id, for example pm-abc1."},PM_RUN_ACTION_DESCRIPTION=`Operation name (one of): ${PM_DISCOVERABLE_TOOL_ACTIONS.join(", ")}. Package-owned actions are available dynamically when their provider package is installed.`,LIST_TOP_LEVEL_OPTION_PROPERTIES={status:{type:"string",description:"Alias for options.status."},type:{type:"string",description:"Alias for options.type."},tag:{type:"string",description:"Alias for options.tag."},priority:{type:"string",description:"Alias for options.priority."},limit:{type:["string","number"],description:"Alias for options.limit."},offset:{type:["string","number"],description:"Alias for options.offset."}},SEARCH_TOP_LEVEL_OPTION_PROPERTIES={mode:{type:"string",description:"Alias for options.mode."},status:{type:"string",description:"Alias for options.status."},type:{type:"string",description:"Alias for options.type."},tag:{type:"string",description:"Alias for options.tag."},priority:{type:"string",description:"Alias for options.priority."},limit:{type:["string","number"],description:"Alias for options.limit."}};function objectSchema(properties,required=[]){return{...TOOL_SCHEMA_BASE,properties:{...TOOL_SCHEMA_BASE.properties,...properties},required}}const RAW_TOOLS=[{name:"pm_run",description:"Run any supported pm operation natively through the pm library. Use this for commands not covered by narrower pm_* tools.",inputSchema:objectSchema({action:{type:"string",enum:[...PM_DISCOVERABLE_TOOL_ACTIONS],description:PM_RUN_ACTION_DESCRIPTION},id:idSchema,query:{type:"string",description:"Search query for action=search."},reason:{type:"string",description:"Close reason for action=close."},force:{type:"boolean",description:"Force ownership/terminal-state override when supported."},subcommand:{type:"string",description:"Subcommand selector for actions that take one (for example telemetry, or schema \u2014 prefer the dedicated pm_schema tool for schema operations)."},options:{type:"object",description:"Underlying pm command options using camelCase keys."},fullChangedFields:{type:"boolean",description:"For mutation actions, return the full changed_fields array instead of the default changed_field_count."},idOnly:{type:"boolean",description:"For single-item mutation actions, return only id and status."},...READ_OUTPUT_TOOL_PROPERTIES},["action"])},{name:"pm_discover",description:"Discover the smallest relevant authorized pm tool catalog under an explicit token budget. Ranking is deterministic and returns public lexical, semantic, graph, permission, freshness, and usage signal explanations. Continue with next_cursor; set includeSchema=true only when complete input schemas are needed.",inputSchema:objectSchema({query:{type:"string",maxLength:4096,description:"Free-text capability intent. Empty text lists by stable policy order."},family:{type:"string",enum:["workspace","intake","context","lifecycle","evidence","graph","quality","automation","extensions","internal"],description:"Optional stable capability-family filter."},tier:{type:"string",enum:["core","standard","full"],description:"Maximum command visibility tier included in results."},limit:{type:"integer",minimum:1,maximum:100,description:"Maximum result rows; defaults to 10."},cursor:{type:"string",minLength:1,maxLength:4096,description:"Opaque next_cursor from an equivalent discovery request."},includeSchema:{type:"boolean",description:"Include complete tool input schemas; false by default."},outputBudget:{anyOf:[{type:"integer",minimum:128},{const:"unbounded"}],description:"Estimated-token ceiling; defaults to 1200."}})},{name:"pm_context",description:"Return the agent-oriented project context snapshot. Pass options.depth=brief|standard|deep|full (full = every section with no per-section row cap), options.parent='<id>' to scope the snapshot to one item's subtree (the item plus all descendants), options.fields='id,title,priority' to project focus rows to a field subset for low-token reads, or options.section=['hierarchy','progress',...] to pick sections.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_next",description:"Recommend the next actionable work item: the single highest-priority READY item (active status, no open blockers, no open children; completed containers surface only when no concrete leaf work is ready) plus the ranked ready and blocked queues. The recommended item carries a rationale and each blocked item lists the open blockers gating it. Pass options.parent='<id>' to scope to one subtree, options.limit=N to cap ready rows, options.readyOnly=true to omit the blocked list, or filters (options.type/tag/priority/assignee/sprint/release). The most token-efficient 'what should I do now?' read for agents.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_search",description:"Search pm items with keyword, semantic, or hybrid search. Defaults to a compact projection for token efficiency. Pass options.mode=keyword|semantic|hybrid (default follows search.default_mode: auto runs hybrid when semantic search is configured and runnable, else keyword; the result reports mode_source), options.limit=N to cap hits, options.status='all' for no lifecycle restriction, options.fields='id,title,score' for a custom projection, or options.full=true for full item bodies (can be large). The result echoes the applied filters and projection mode in query_summary.",inputSchema:objectSchema({query:{type:"string"},options:{type:"object"},...SEARCH_TOP_LEVEL_OPTION_PROPERTIES},["query"])},{name:"pm_list",description:"List pm items with status/type/tag/priority filters. Defaults to compact projection for token efficiency. options.status accepts CSV (all,open,in_progress). Pass options.compact=false or options.includeBody=true for full bodies/comments. Pass options.brief=true for ultra-terse (id/status/type/title only). Pass options.fields='id,title,priority' for custom projection. Pass options.limit=N to cap row count. The result echoes the applied filters and projection mode in query_summary.",inputSchema:objectSchema({options:{type:"object"},...LIST_TOP_LEVEL_OPTION_PROPERTIES})},{name:"pm_get",description:"Read one pm item with shared SDK projections. Pass options.depth='brief' or options.fields='id,title,status' for low-token inspection, options.fields='id,schedule.start_at' for schedule context, or options.at='7' / an ISO timestamp for a verified mutation-free historical read. Parent results include bounded child counts, samples, and continuation metadata.",inputSchema:objectSchema({id:idSchema,options:{type:"object",description:"Get options such as depth=brief|standard|deep|full, fields=id,title,status, or at=<version|ISO timestamp>."}},["id"])},{name:"pm_events",description:"Read a bounded, cursor-resumable page of committed mutation events across item history streams. Batch cursors are the token-efficient default; pass cursorMode=row for per-event checkpoints.",inputSchema:objectSchema({verify:{type:"boolean",description:"Verify complete selected authoritative history chains."},since:{type:"string",description:"Durable event cursor or ISO timestamp lower bound."},type:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},author:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},item:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},limit:{type:"integer",minimum:0,maximum:1e3},full:{type:"boolean"},cursorMode:{type:"string",enum:["batch","row"],description:"Cursor framing: batch returns one terminal next_cursor (default); row also adds a cursor to every event."}})},{name:"pm_create",description:"Create a pm item natively and write pm history. Output is compact by default (changed_fields replaced with changed_field_count for token efficiency); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},allowMissingParent:{type:"boolean",description:"Allow unresolved parent references and emit a validation warning."},allowDuplicate:{type:"boolean",description:"Explicitly create when strict similarity governance finds likely duplicates."},options:{type:"object",description:"Create options. title and description are required."}},["options"])},{name:"pm_mutate",description:"Apply an ordered create/update/close/release batch atomically through the public pm SDK. Create rows may declare ref and omit id; @ref forward references resolve deterministically from the stable transactionId, which is derived from the batch when omitted. Bulk creation: rows shaped as {item:{title,type,...}} are create documents using pm create field names; upsertKey updates the existing item whose field matches instead of creating a duplicate. Set dryRun=true to validate and preview without writes.",inputSchema:objectSchema({transactionId:{type:"string",description:"Stable idempotency key for this atomic mutation batch; derived from the batch content when omitted."},mutations:{type:"array",minItems:1,description:"Ordered rows shaped as {op:create|update|close|release,id?,ref?,options?,reason?} or create documents {ref?,item:{...}}.",items:{type:"object",properties:{op:{type:"string",enum:["create","update","close","release"],description:"Operation; omitted rows carrying item are creates."},id:idSchema,ref:{type:"string",description:"Batch-local create alias; its deterministic id can be referenced as @alias by any row."},reason:{type:"string"},options:{type:"object"},item:{type:"object",description:"Create document using pm create field names (title, type, description, body, tags, parent, custom fields)."},unique:{type:"object",description:"Create-only guard {key,value} re-checked under the writer lock; keyed upsert sets it on rows that matched nothing at planning time."},match:{type:"object",description:"Update-only guard {key,value} re-read under the writer lock; keyed upsert sets it on rows it converted into updates of a matched item."}},additionalProperties:!1}},upsertKey:{type:"string",description:"Item field whose value identifies an existing item to update instead of creating a duplicate."},dryRun:{type:"boolean",description:"Validate and preview without writing."},createCompensation:{type:"string",enum:["close","delete"],description:"How a failed batch compensates created items; defaults to close."},lockTtlSeconds:{type:"number"},lockWaitMs:{type:"number"}},["mutations"])},{name:"pm_copy",description:"Copy an existing pm item into a new id while resetting lifecycle fields. Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({id:idSchema,fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},idOnly:{type:"boolean",description:"Return only id and status."},options:{type:"object",description:"Copy options such as title override, author, and message."}},["id"])},{name:"pm_focus",description:"Set, clear, or show the session focused item. When focused, pm_create defaults its parent to the focused item (an explicit parent still overrides). Pass id to focus an item, options.clear=true to clear, or neither to show current focus.",inputSchema:objectSchema({id:idSchema,clear:{type:"boolean",description:"Clear the focused item (cannot be combined with id)."},options:{type:"object",description:"Focus options such as clear (boolean)."}},[])},{name:"pm_update",description:"Update pm item metadata/body/dependencies/log seeds natively. Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields delta.",inputSchema:objectSchema({id:idSchema,fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},options:{type:"object"}},["id","options"])},{name:"pm_append",description:"Append markdown text to a pm item body and write pm history. Useful for seeding evidence/log entries before close. Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({id:idSchema,body:{type:"string",description:"Markdown text to append to the item body. Required here or as options.body."},fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},options:{type:"object",description:"Append options such as body, author, and message."}},["id"])},{name:"pm_claim",description:"Claim a pm item.",inputSchema:objectSchema({id:idSchema,force:{type:"boolean"},options:{type:"object"}},["id"])},{name:"pm_release",description:"Release a pm item claim.",inputSchema:objectSchema({id:idSchema,force:{type:"boolean"},options:{type:"object"}},["id"])},{name:"pm_close",description:"Close a pm item with optional close reason and optional close validation (reason requirement follows governance settings). Output is compact by default (changed_fields replaced with changed_field_count); pass fullChangedFields=true for the full changed_fields array.",inputSchema:objectSchema({id:idSchema,reason:{type:"string",description:"Close reason text when provided or required by governance settings."},duplicateOf:{type:"string",description:"Canonical item id when closing this item as a duplicate."},fullChangedFields:{type:"boolean",description:"Return full changed_fields instead of changed_field_count."},idOnly:{type:"boolean",description:"Return only id and status."},options:{type:"object"}},["id"])},{name:"pm_comments",description:'List, add, edit, or delete comments on a pm item. Use options.add to append, options.edit=<1-based index> with replacement text to fix a comment, or options.delete=<1-based index> to remove one. options.ifAbsent applies only to options.add for retry-safe author-and-text deduplication and cannot combine with options.edit or options.delete. List calls return the newest comments that fit the output budget, with total_count/has_more metadata and a next_cursor that pages back to older comments through outputCursor; without options.limit or outputLimit, outputBudget "unbounded" returns the complete listing at once. Pass options.limit=N for only the newest N comments (next_cursor pages within that window when the budget trims it; has_more reports older comments beyond it without a cursor) or options.limit=0 for summary-only metadata; options.full=true returns the complete history after a write. Rows carry their absolute index; pair edit/delete with options.expectAt to refuse a different entry.',inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_files",description:"List, add, remove, or validate linked files for a pm item.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_docs",description:"List, add, or remove linked docs for a pm item.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_notes",description:"List, add, edit, or delete structured notes on a pm item. options.ifAbsent applies only to options.add for retry-safe author-and-text deduplication and cannot combine with options.edit or options.delete. Omit mutation options to list existing notes; rows carry their absolute index, and options.expectAt guards edit/delete.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_learnings",description:"List, add, edit, or delete learnings on a pm item. options.ifAbsent applies only to options.add for retry-safe author-and-text deduplication and cannot combine with options.edit or options.delete. Omit mutation options to list existing learnings; rows carry their absolute index, and options.expectAt guards edit/delete.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_deps",description:"Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with direction, kind, depth, node, edge, token, and cursor bounds; context returns a counts-first summary, per-node roles/reasons, root evidence pointers, and enumerated missing references.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_graph",description:"Run bounded workspace relationship-graph queries: ancestors/descendants (hierarchy), predecessors/successors (ordering), paths, impact (blast radius), analyze (execution + knowledge analytics), audit (governance findings with change-since-baseline deltas), communities (label-propagation clusters), redundancy (transitively implied edges), dominators (structural bottlenecks), slack (critical-path method float per task), centrality (betweenness/closeness/degree with directed fan-in/out), articulation (cut points and bridges \u2014 single points of failure), plan (dry-run remediation proposals derived from the audit), and index (durable cross-process graph index status/rebuild/clear). Traversals, paths, impact, and dominators require id; paths also requires target. Options support kind, maxDepth, limit, after, direction, maxPaths, sample, exemptIsolate, exemptIsolateType, saveBaseline (audit), rebuild/clear (index), and counts-first summary.",inputSchema:objectSchema({subcommand:{type:"string",enum:[...GRAPH_SUBCOMMAND_VALUES]},id:idSchema,target:idSchema,options:{type:"object"}},["subcommand"])},{name:"pm_test",description:"List, add, remove, or run linked tests for a pm item.",inputSchema:objectSchema({id:idSchema,options:{type:"object"}},["id"])},{name:"pm_validate",description:"Run pm validation checks.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_health",description:"Run pm health diagnostics. Pass options.brief=true for compact low-token details, options.skipIntegrity=true, options.skipDrift=true, options.skipVectors=true for a fast status-only check, or options.full=true for the complete deep check.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_contracts",description:"Inspect pm command, flag, schema, and availability contracts.",inputSchema:objectSchema({options:{type:"object"}})},{name:"pm_schema",description:"Inspect or modify the workspace item-type/status/field schema (pm schema). subcommand selects the operation; name carries the item type name (show/add-type/remove-type), status id (show-status/add-status/remove-status), or field key (show-field/add-field/remove-field). apply-preset adopts a domain type preset; add-type with infer=true derives types from title-prefix conventions. Policy verbs author declarations, preview changes, set enforcement, and record content-bound approvals. Registry mutations write workspace history; approvals write item history.",inputSchema:objectSchema({...workflowPolicyOptionProperties,subcommand:{type:"string",enum:["list","show","show-status","add-type","remove-type","add-status","remove-status","add-field","remove-field","list-fields","show-field","apply-preset",...WORKFLOW_POLICY_ACTIONS],description:"Schema subcommand to run."},name:{type:"string",description:"Item type name, status id, field key, policy id, or item id for the selected schema verb; policy-mode requires advise|refuse."},description:{type:"string",description:"Custom item type, status, or field description for add-type/add-status/add-field."},defaultStatus:{type:"string",description:"Default status for add-type."},folder:{type:"string",description:"Storage folder for add-type."},alias:{type:"array",items:{type:"string"},description:"Aliases for add-type/add-status, or extra CLI flag aliases for add-field."},role:{type:"array",items:{type:"string",enum:[...RUNTIME_STATUS_ROLE_VALUES]},description:`Lifecycle roles for add-status: ${RUNTIME_STATUS_ROLE_VALUES.join(", ")}.`},order:{type:"number",description:"Display/sort order for add-status."},fieldType:{type:"string",enum:["string","number","boolean","string_array"],description:"Value type for a custom field (add-field)."},commands:{type:"array",items:{type:"string"},description:"Commands a custom field is wired onto (add-field): create, update, update_many, list, search, calendar, context."},cliFlag:{type:"string",description:"Override the auto-derived CLI flag for a custom field (add-field)."},required:{type:"boolean",description:"Mark a custom field as always required (add-field)."},requiredOnCreate:{type:"boolean",description:"Mark a custom field as required at create time (add-field)."},allowUnset:{type:"boolean",description:"Whether a custom field may be cleared via --unset (add-field); defaults to true."},requiredTypes:{type:"array",items:{type:"string"},description:"Restrict a custom field's requirement to specific item types (add-field)."},typePreset:{type:"string",enum:["agile","ops","research"],description:"Domain type preset to adopt (apply-preset)."},infer:{type:"boolean",description:"Infer item types from title-prefix conventions (add-type); previews unless apply is true."},minCount:{type:"number",description:"Minimum items sharing a prefix for add-type inference (default 10)."},apply:{type:"boolean",description:"Register inferred types (add-type infer); without it the call previews only."},force:{type:"boolean",description:"Override removal guardrails for destructive schema changes when supported."},options:{type:"object",description:"Additional schema options using camelCase keys.",properties:workflowPolicyOptionProperties}},["subcommand"])},{name:"pm_profile",description:"List, show, apply, or lint project profiles (pm profile) \u2014 archetype bundles that stage item types, statuses, fields, per-type workflows, config knobs, create templates, and recommended packages. subcommand selects the operation; name carries the profile name (agile, ops, research) for show/apply/lint. apply stages every dimension idempotently; dryRun previews the diff without writing; lint reports author-time consistency findings (graded error/warning) without touching the tracker. Profile staging writes workspace config/schema files, not item history.",inputSchema:objectSchema({subcommand:{type:"string",enum:["list","show","apply","lint"],description:"Profile subcommand to run."},name:{type:"string",description:"Profile name for show/apply/lint. Required for those subcommands. Built-ins are agile, ops, and research; an active extension can contribute additional archetype names that resolve here too."},dryRun:{type:"boolean",description:"Preview the apply diff without writing any files (apply)."},author:{type:"string",description:"Mutation author for apply."},force:{type:"boolean",description:"Force ownership/lock override for apply."},options:{type:"object",description:"Additional profile options using camelCase keys."}},["subcommand"])},{name:"pm_config",description:"Read or write pm workspace configuration (pm config). configAction selects get/set/list/export; key/value address a single setting for get/set. scope chooses the project (default) or global settings file.",inputSchema:objectSchema({configAction:{type:"string",enum:["get","set","list","export"],description:"Config operation to perform. get/set require key; list/export dump the resolved settings surface."},key:{type:"string",description:"Settings key for get/set, for example governance-require-close-reason, telemetry-tracking, or a nested leaf such as search_provider (dash and underscore variants accepted; configAction=get without a key lists supported keys in the error)."},value:{type:"string",description:"New value for configAction=set."},scope:{type:"string",enum:["project","global"],description:"Settings scope to read or write. Defaults to project."},options:{type:"object",description:"Additional config options such as criterion, clearCriteria, format, or policy."}},["configAction"])},{name:"pm_plan",description:"Run agent-optimized Plan workflows. options.subcommand selects: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize. Provide id for all non-create subcommands; provide stepRef for step lifecycle subcommands. Plans store agent-readable steps with dependencies, decisions, discoveries, validation, and resume context.",inputSchema:objectSchema({id:{type:"string",description:"Plan id (required for all subcommands except create)."},stepRef:{type:"string",description:"Step id or order for step lifecycle subcommands."},options:{type:"object",description:"Plan options including subcommand, stepRef, stepStatus, link, depth, etc."}})}],NARROW_TOOL_ACTIONS={pm_append:"append",pm_claim:"claim",pm_close:"close",pm_comments:"comments",pm_config:"config",pm_context:"context",pm_contracts:"contracts",pm_copy:"copy",pm_create:"create",pm_deps:"deps",pm_docs:"docs",pm_events:"events",pm_files:"files",pm_focus:"focus",pm_get:"get",pm_graph:"graph",pm_health:"health",pm_learnings:"learnings",pm_list:"list",pm_next:"next",pm_notes:"notes",pm_plan:"plan",pm_profile:"profile",pm_release:"release",pm_schema:"schema",pm_search:"search",pm_test:"test",pm_update:"update",pm_validate:"validate"},TOOLS=RAW_TOOLS.map(tool=>{const action=NARROW_TOOL_ACTIONS[tool.name];if(!action)return tool;const properties=tool.inputSchema.properties,required=tool.inputSchema.required.map(String);return{...tool,inputSchema:buildPmActionToolInputSchema(action,{properties,required})}});function buildMcpToolContracts(){return TOOLS.map(tool=>{const schemaRequired=tool.inputSchema.required,required=Array.isArray(schemaRequired)?schemaRequired.map(entry=>String(entry)).sort((left,right)=>left.localeCompare(right)):[];return{name:tool.name,description:tool.description,required,input_schema:tool.inputSchema}}).sort((left,right)=>left.name.localeCompare(right.name))}export{NARROW_TOOL_ACTIONS,TOOLS,TOOL_SCHEMA_BASE,buildMcpToolContracts};
2
2
  //# sourceMappingURL=tool-definitions.js.map
@@ -7,4 +7,4 @@
7
7
  * blocker or ready-work classifications without storage or rendering side
8
8
  * effects.
9
9
  */
10
- export { ACTIONABILITY_ORDERING_KINDS,collectBlockedByIds,collectBlockedByIdsFromCorpus,collectDependencyBlockedIds,computeActionabilityReport,indexBlockedByIds,resolveItemBlockers,resolveItemExecutionRole,selectActionableEntries,type ActionabilitySelectionOptions,type ActionabilityReport,type ActionableEntry,type ResolvedBlocker,} from "../core/item/actionability.js";
10
+ export{ACTIONABILITY_ORDERING_KINDS,collectBlockedByIds,collectBlockedByIdsFromCorpus,collectDependencyBlockedIds,computeActionabilityReport,indexBlockedByIds,resolveItemBlockers,resolveItemExecutionRole,selectActionableEntries,type ActionabilitySelectionOptions,type ActionabilityReport,type ActionableEntry,type ResolvedBlocker,}from "../core/item/actionability.js";
@@ -1,5 +1,5 @@
1
1
  /** A closed-domain refusal that can be executed and recovered automatically. */
2
- export interface PmClosedDomainContract {
2
+ export interface PmClosedDomainContract{
3
3
  /** Stable assurance identity. */
4
4
  probe_id:string;
5
5
  /** Public command accepting the constrained flag. */
@@ -15,11 +15,10 @@ allowed_values:readonly string[];
15
15
  /** Exact argv expected in the refusal's executable recovery. */
16
16
  suggested_retry_args:readonly string[];
17
17
  /** Stable machine-readable error code that owns the refusal. */
18
- error_code:"package_upgrade_modes_mutually_exclusive" | "projection_options_mutually_exclusive" | "unknown_context_intent" | "unknown_field_projection";
18
+ error_code:"package_upgrade_modes_mutually_exclusive"|"projection_options_mutually_exclusive"|"unknown_context_intent"|"unknown_field_projection";
19
19
  /** Whether a complete accepted-value domain is required in the refusal. */
20
- allowed_values_required?:boolean;
21
- }
20
+ allowed_values_required?:boolean;}
22
21
  /** Return the complete stable core refusal corpus shared by every public surface. */
23
22
  export declare function listCoreClosedDomainContracts():PmClosedDomainContract[];
24
23
  /** Render a compact but complete core-domain description for command help. */
25
- export declare function renderPmClosedDomainHelp(command:string,flag:"--fields" | "--for"):string;
24
+ export declare function renderPmClosedDomainHelp(command:string,flag:"--fields"|"--for"):string;
@@ -1,11 +1,8 @@
1
- export { resolveLinkedResourcePositionalRecovery } from "./linked-resource-recovery.js";
1
+ export{resolveLinkedResourcePositionalRecovery}from "./linked-resource-recovery.js";
2
2
  /** Explain unsupported lifecycle verbs using declared mutation flags, without authorizing or executing a guessed mutation. */
3
- export declare function resolveLifecycleVerbRecovery(verb:string,availablePaths:readonly string[]):{
4
- examples:string[][];
5
- nextSteps:string[];
6
- } | undefined;
3
+ export declare function resolveLifecycleVerbRecovery(verb:string,availablePaths:readonly string[]):{examples:string[][];nextSteps:string[];}|undefined;
7
4
  /** Completeness controls one read command declares, derived from its read-output surface and flag contracts. */
8
- export interface ReadCompletenessControls {
5
+ export interface ReadCompletenessControls{
9
6
  /** Canonical read-output surface. */
10
7
  command:string;
11
8
  /** Projection modes the command spells as boolean `--<mode>` flags. */
@@ -13,21 +10,20 @@ modes:string[];
13
10
  /** Closed `--depth` value domain, empty when the command declares no detail depth. */
14
11
  depth_values:string[];
15
12
  /** Every declared flag spelling, used to refuse corrections for options the command already accepts. */
16
- declared_flags:string[];
17
- }
13
+ declared_flags:string[];}
18
14
  /** Resolve the completeness spellings a read command accepts, so recovery never guesses from another command's vocabulary. */
19
- export declare function resolveReadCompletenessControls(commandName:string):ReadCompletenessControls | undefined;
15
+ export declare function resolveReadCompletenessControls(commandName:string):ReadCompletenessControls|undefined;
20
16
  /** Render one command's completeness controls as the flags an agent can type on that same command. */
21
17
  export declare function describeReadCompletenessControls(controls:ReadCompletenessControls):string;
22
18
  /** Derive a same-command read retry for known completeness and encoding mistakes without discarding intent. */
23
- export declare function resolveReadOptionRetryArgs(commandName:string,invocationArgv:readonly string[],unknownOption:string):string[] | undefined;
19
+ export declare function resolveReadOptionRetryArgs(commandName:string,invocationArgv:readonly string[],unknownOption:string):string[]|undefined;
24
20
  /** Identify presentation intent that must not be silently dropped from an unknown-option retry. */
25
21
  export declare function isReadProjectionRecoveryFlag(flag:string):boolean;
26
22
  /** Keep lexical corrections within read projection or mutation receipt semantics. */
27
23
  export declare function isCompatibleRecoveryFlag(requested:string,candidate:string):boolean;
28
24
  /** Resolve a recovery command without interpreting global option values as command tokens. */
29
- export declare function resolveRecoveryCommandName(invocationArgv:string[] | undefined):string | undefined;
25
+ export declare function resolveRecoveryCommandName(invocationArgv:string[]|undefined):string|undefined;
30
26
  /** Resolve the truthful placeholder for a missing flag from its contract. */
31
- export declare function resolveMissingOptionPlaceholder(commandName:string,missingLabel:string):string | null | undefined;
27
+ export declare function resolveMissingOptionPlaceholder(commandName:string,missingLabel:string):string|null|undefined;
32
28
  /** Preserve an attempted argv vector and insert each missing option before `--`. */
33
- export declare function renderMissingOptionRetry(invocationArgv:string[],commandName:string,missingLabels:string[]):string | undefined;
29
+ export declare function renderMissingOptionRetry(invocationArgv:string[],commandName:string,missingLabels:string[]):string|undefined;
@@ -1,5 +1,5 @@
1
1
  /** Resolve the longest exact misplaced suffix under registered namespaces only when one canonical command owns it. */
2
- export declare function resolveMisnestedCommandPath(unknownPath:string,availablePaths:readonly string[]):string | undefined;
2
+ export declare function resolveMisnestedCommandPath(unknownPath:string,availablePaths:readonly string[]):string|undefined;
3
3
  /** Score one command path for a guessed command token; lower is better. */
4
4
  export declare function scoreCommandPathMatch(commandPath:string,queryToken:string):number;
5
5
  /** Rank available command paths for one guessed token. */
@@ -9,4 +9,4 @@ export declare function rankCommandPaths(commandPaths:string[],queryToken:string
9
9
  * A query token prefers known semantic matches over weaker spelling guesses after
10
10
  * unavailable replacements have been removed.
11
11
  */
12
- export declare function canonicalizeCommandSuggestions(candidates:readonly string[],availablePaths:readonly string[],queryToken?:string):string[];
12
+ export declare function canonicalizeCommandSuggestions(candidates:readonly string[],availablePaths:readonly string[],queryToken?:string):string[];
@@ -7,6 +7,6 @@
7
7
  * truthful answer that the collection is intentionally empty.
8
8
  */
9
9
  /** Return the explicit-empty flag for a repeatable create option. */
10
- export declare function resolveCreateExplicitEmptyFlag(optionKey:string):string | undefined;
10
+ export declare function resolveCreateExplicitEmptyFlag(optionKey:string):string|undefined;
11
11
  /** Return whether a create option can be satisfied by an explicit empty set. */
12
- export declare function supportsCreateExplicitEmpty(optionKey:string):boolean;
12
+ export declare function supportsCreateExplicitEmpty(optionKey:string):boolean;