@unbrained/pm-cli 2026.9.7 → 2026.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (718) hide show
  1. package/.agents/skills/pm-developer/SKILL.md +12 -4
  2. package/.agents/skills/pm-developer/references/MULTI_AGENT_MERGE.md +19 -10
  3. package/.agents/skills/pm-extensions/SKILL.md +6 -0
  4. package/.agents/skills/pm-sdk/SKILL.md +11 -2
  5. package/.agents/skills/pm-user/SKILL.md +5 -0
  6. package/.agents/skills/pm-user/references/ECOSYSTEM_PLANNING.md +95 -0
  7. package/.claude-plugin/marketplace.json +2 -2
  8. package/CHANGELOG.md +211 -181
  9. package/dist/cli/after-command-context-usage.js +1 -48
  10. package/dist/cli/argv-utils.js +1 -40
  11. package/dist/cli/bootstrap-args.js +1 -9
  12. package/dist/cli/bundle-integrity.js +2 -110
  13. package/dist/cli/commander-usage.js +11 -771
  14. package/dist/cli/commands/activity.js +1 -9
  15. package/dist/cli/commands/aggregate.js +1 -5
  16. package/dist/cli/commands/append.js +1 -5
  17. package/dist/cli/commands/claim.js +1 -5
  18. package/dist/cli/commands/close-many.js +1 -5
  19. package/dist/cli/commands/close.js +1 -9
  20. package/dist/cli/commands/comments.js +1 -5
  21. package/dist/cli/commands/config.js +1 -9
  22. package/dist/cli/commands/context.js +1 -9
  23. package/dist/cli/commands/contracts.js +1 -5
  24. package/dist/cli/commands/copy.js +1 -9
  25. package/dist/cli/commands/create.js +1 -9
  26. package/dist/cli/commands/delete.js +1 -9
  27. package/dist/cli/commands/deps.js +1 -9
  28. package/dist/cli/commands/docs.js +1 -9
  29. package/dist/cli/commands/duplicates.js +1 -9
  30. package/dist/cli/commands/eval.js +1 -9
  31. package/dist/cli/commands/extension/describe.js +1 -5
  32. package/dist/cli/commands/extension/scaffold.js +1 -5
  33. package/dist/cli/commands/extension/shared.js +1 -5
  34. package/dist/cli/commands/extension.js +1 -9
  35. package/dist/cli/commands/files.js +1 -9
  36. package/dist/cli/commands/focus.js +1 -9
  37. package/dist/cli/commands/gc.js +1 -9
  38. package/dist/cli/commands/get.js +1 -9
  39. package/dist/cli/commands/graph.js +1 -10
  40. package/dist/cli/commands/health.js +1 -9
  41. package/dist/cli/commands/history-compact.js +1 -10
  42. package/dist/cli/commands/history-redact.js +1 -11
  43. package/dist/cli/commands/history-repair.js +1 -10
  44. package/dist/cli/commands/history.js +1 -5
  45. package/dist/cli/commands/index.js +1 -58
  46. package/dist/cli/commands/init-agent-guidance.js +1 -9
  47. package/dist/cli/commands/init.js +1 -9
  48. package/dist/cli/commands/learnings.js +1 -5
  49. package/dist/cli/commands/lifecycle-transitions.js +1 -5
  50. package/dist/cli/commands/list.js +1 -9
  51. package/dist/cli/commands/merge.js +1 -11
  52. package/dist/cli/commands/next.js +1 -9
  53. package/dist/cli/commands/notes.js +1 -5
  54. package/dist/cli/commands/plan.js +1 -9
  55. package/dist/cli/commands/profile.js +1 -9
  56. package/dist/cli/commands/restore.js +1 -9
  57. package/dist/cli/commands/scheduling-shortcuts.js +1 -9
  58. package/dist/cli/commands/schema.js +1 -10
  59. package/dist/cli/commands/search.js +1 -9
  60. package/dist/cli/commands/stats.js +1 -9
  61. package/dist/cli/commands/telemetry.js +1 -9
  62. package/dist/cli/commands/test-all.js +1 -9
  63. package/dist/cli/commands/test-runs.js +1 -9
  64. package/dist/cli/commands/test.js +1 -9
  65. package/dist/cli/commands/update-many.js +1 -5
  66. package/dist/cli/commands/update.js +1 -9
  67. package/dist/cli/commands/upgrade.js +1 -5
  68. package/dist/cli/commands/validate.js +1 -15
  69. package/dist/cli/context-intent-invocation.js +1 -20
  70. package/dist/cli/description-stdin.js +1 -17
  71. package/dist/cli/error-guidance.js +1 -1353
  72. package/dist/cli/extension-command-help.js +5 -636
  73. package/dist/cli/extension-command-options.js +1 -427
  74. package/dist/cli/extension-recovery.js +1 -126
  75. package/dist/cli/help-content.js +2 -1001
  76. package/dist/cli/help-json-payload.js +4 -570
  77. package/dist/cli/main.d.ts +4 -0
  78. package/dist/cli/main.js +5 -2573
  79. package/dist/cli/migration-gates.js +1 -289
  80. package/dist/cli/public.js +1 -20
  81. package/dist/cli/register-annotations.js +1 -270
  82. package/dist/cli/register-assurance.js +1 -62
  83. package/dist/cli/register-files-lookup.js +1 -56
  84. package/dist/cli/register-history-activity.d.ts +8 -0
  85. package/dist/cli/register-history-activity.js +2 -0
  86. package/dist/cli/register-history-author.js +1 -38
  87. package/dist/cli/register-history-maintenance.d.ts +9 -0
  88. package/dist/cli/register-history-maintenance.js +2 -0
  89. package/dist/cli/register-list-query.js +10 -943
  90. package/dist/cli/register-mutation-options.js +1 -9
  91. package/dist/cli/register-mutation.js +19 -1893
  92. package/dist/cli/register-operations.js +1 -920
  93. package/dist/cli/register-setup.js +1 -716
  94. package/dist/cli/register-structured-mutation.js +1 -196
  95. package/dist/cli/registration-helpers.js +1 -5
  96. package/dist/cli/runtime-compatibility-boundary.js +4 -42
  97. package/dist/cli/schema-registration-helpers.js +1 -73
  98. package/dist/cli/search-refresh.js +1 -13
  99. package/dist/cli/stats-analytics-json.js +1 -68
  100. package/dist/cli/telemetry-flush.js +1 -10
  101. package/dist/cli-bundle/bundle-manifest.json +164 -156
  102. package/dist/cli-bundle/chunks/chunk-3BZZA6A3.js +5 -0
  103. package/dist/cli-bundle/chunks/chunk-AMRDVX36.js +235 -0
  104. package/dist/cli-bundle/chunks/chunk-DAM4CBBR.js +2202 -0
  105. package/dist/cli-bundle/chunks/{chunk-WYRZZ5ZE.js → chunk-DEZPZOQ7.js} +2 -2
  106. package/dist/cli-bundle/chunks/chunk-FLDWYEND.js +77 -0
  107. package/dist/cli-bundle/chunks/{chunk-NPN5I67J.js → chunk-G5ADGQ2D.js} +3 -3
  108. package/dist/cli-bundle/chunks/chunk-JAAEYHUA.js +2 -0
  109. package/dist/cli-bundle/chunks/{chunk-JX4DH4WC.js → chunk-KR3RP4FH.js} +3 -3
  110. package/dist/cli-bundle/chunks/chunk-LEZOUXG6.js +2 -0
  111. package/dist/cli-bundle/chunks/chunk-NSAPNEYH.js +2 -0
  112. package/dist/cli-bundle/chunks/chunk-QOEKOECV.js +29 -0
  113. package/dist/cli-bundle/chunks/chunk-RHSFOMHU.js +2 -0
  114. package/dist/cli-bundle/chunks/chunk-XOD2PCB6.js +20 -0
  115. package/dist/cli-bundle/chunks/{chunk-JT6XF6GE.js → chunk-YVEQ2AMO.js} +4 -4
  116. package/dist/cli-bundle/chunks/register-list-query-KSK3R63M.js +11 -0
  117. package/dist/cli-bundle/chunks/register-mutation-IQ5C7U6O.js +20 -0
  118. package/dist/cli-bundle/chunks/{register-operations-I5W3KMGB.js → register-operations-DWVHR2NC.js} +2 -2
  119. package/dist/cli-bundle/chunks/register-setup-BQ5SVD4B.js +2 -0
  120. package/dist/cli-bundle/focused-chunks/chunk-3WRPWLA7.js +3 -0
  121. package/dist/cli-bundle/focused-chunks/chunk-7MBUII7U.js +2 -0
  122. package/dist/cli-bundle/focused-chunks/chunk-COPBO5HW.js +8 -0
  123. package/dist/cli-bundle/focused-chunks/chunk-DUN4IXYN.js +20 -0
  124. package/dist/cli-bundle/focused-chunks/{chunk-LIJIA4TY.js → chunk-EE5QSM4Z.js} +3 -3
  125. package/dist/cli-bundle/focused-chunks/chunk-HJVARYM3.js +6 -0
  126. package/dist/cli-bundle/focused-chunks/chunk-IAUOUGVR.js +177 -0
  127. package/dist/cli-bundle/focused-chunks/chunk-KOOMJ54F.js +2 -0
  128. package/dist/cli-bundle/focused-chunks/chunk-MZDXX7JY.js +56 -0
  129. package/dist/cli-bundle/focused-chunks/{chunk-M6PBRFSH.js → chunk-OPFHFGDD.js} +2 -2
  130. package/dist/cli-bundle/focused-chunks/chunk-QHNETP77.js +9 -0
  131. package/dist/cli-bundle/focused-chunks/{chunk-3BZEOXLT.js → chunk-RMWES4M6.js} +2 -2
  132. package/dist/cli-bundle/focused-chunks/chunk-RXT4P5QH.js +10 -0
  133. package/dist/cli-bundle/focused-chunks/chunk-SDOL6FM2.js +12 -0
  134. package/dist/cli-bundle/focused-chunks/chunk-SQV4AAUC.js +2 -0
  135. package/dist/cli-bundle/focused-chunks/{chunk-PEFABF7E.js → chunk-WE3IUNIW.js} +3 -3
  136. package/dist/cli-bundle/focused-chunks/chunk-YALOUBWJ.js +2 -0
  137. package/dist/cli-bundle/main.js +20 -20
  138. package/dist/cli-bundle/sdk-authoring.js +1 -1
  139. package/dist/cli-bundle/sdk-contracts.js +2 -2
  140. package/dist/cli-bundle/sdk-core.js +29 -29
  141. package/dist/cli-bundle/sdk-governance.js +1 -1
  142. package/dist/cli-bundle/sdk-graph.js +1 -1
  143. package/dist/cli-bundle/sdk-merge.js +42 -42
  144. package/dist/cli-bundle/sdk-query.js +1 -1
  145. package/dist/cli-bundle/sdk-runtime.js +1 -1
  146. package/dist/cli-bundle/sdk-testing.js +1 -1
  147. package/dist/cli-bundle/sdk.js +11 -11
  148. package/dist/cli.js +1 -104
  149. package/dist/core/checkpoint/checkpoint-gc.js +1 -169
  150. package/dist/core/checkpoint/mutation-checkpoint.js +2 -133
  151. package/dist/core/config/nested-settings.js +1 -534
  152. package/dist/core/config/positional-value.js +1 -109
  153. package/dist/core/diagnostics/remediation.js +1 -506
  154. package/dist/core/extensions/activation-summary-markdown.js +2 -145
  155. package/dist/core/extensions/activation-summary.js +1 -92
  156. package/dist/core/extensions/activation-transaction.js +1 -46
  157. package/dist/core/extensions/capability-usage.js +1 -173
  158. package/dist/core/extensions/command-hook-context.js +1 -13
  159. package/dist/core/extensions/command-metadata-contract.js +1 -22
  160. package/dist/core/extensions/command-visibility-tier.js +1 -29
  161. package/dist/core/extensions/contribution-inventory.js +1 -173
  162. package/dist/core/extensions/exporter-output-contract.js +1 -66
  163. package/dist/core/extensions/extension-candidate.js +1 -18
  164. package/dist/core/extensions/extension-capability-aliases.js +1 -158
  165. package/dist/core/extensions/extension-hook-runtime.js +1 -699
  166. package/dist/core/extensions/extension-policy.js +1 -599
  167. package/dist/core/extensions/extension-registries.js +1 -62
  168. package/dist/core/extensions/extension-runtime-helpers.js +1 -33
  169. package/dist/core/extensions/extension-types.js +1 -102
  170. package/dist/core/extensions/flag-definition-validation.js +1 -52
  171. package/dist/core/extensions/flag-value-types.js +1 -64
  172. package/dist/core/extensions/index.js +1 -526
  173. package/dist/core/extensions/item-field-types.js +1 -39
  174. package/dist/core/extensions/item-fields.js +1 -261
  175. package/dist/core/extensions/loader.js +1 -2223
  176. package/dist/core/extensions/manifest-schema.js +1 -69
  177. package/dist/core/extensions/module-graph-snapshot.js +1 -33
  178. package/dist/core/extensions/preflight-ownership.js +1 -41
  179. package/dist/core/extensions/registration-validation.js +1 -82
  180. package/dist/core/extensions/registration-values.js +1 -209
  181. package/dist/core/extensions/reserved-host-flags.js +1 -36
  182. package/dist/core/extensions/runtime-registrations.js +1 -67
  183. package/dist/core/extensions/service-ownership.js +1 -19
  184. package/dist/core/extensions/version-compat.js +1 -216
  185. package/dist/core/fs/fs-utils.js +2 -158
  186. package/dist/core/fs/host-environment-errors.js +1 -141
  187. package/dist/core/fs/index.js +1 -9
  188. package/dist/core/fs/path-utils.js +1 -17
  189. package/dist/core/governance/content-fields.js +1 -160
  190. package/dist/core/governance/issue-codes.js +1 -151
  191. package/dist/core/governance/metadata-coverage.js +1 -358
  192. package/dist/core/history/drift-cache.js +3 -72
  193. package/dist/core/history/drift-scan.js +1 -342
  194. package/dist/core/history/event-classification.js +1 -109
  195. package/dist/core/history/event-index.js +8 -784
  196. package/dist/core/history/history-compact-bulk.js +1 -104
  197. package/dist/core/history/history-diff.js +1 -158
  198. package/dist/core/history/history-rewrite.d.ts +6 -1
  199. package/dist/core/history/history-rewrite.js +1 -107
  200. package/dist/core/history/history-storage-stats.js +1 -102
  201. package/dist/core/history/history-stream-policy.js +1 -62
  202. package/dist/core/history/history.js +2 -617
  203. package/dist/core/history/identity.js +1 -30
  204. package/dist/core/history/index.js +1 -9
  205. package/dist/core/history/projection.js +1 -196
  206. package/dist/core/history/read.d.ts +9 -0
  207. package/dist/core/history/read.js +1 -57
  208. package/dist/core/history/replay.js +2 -439
  209. package/dist/core/history/version-address.js +1 -32
  210. package/dist/core/history/workspace-history.js +2 -433
  211. package/dist/core/io/body-file.js +1 -62
  212. package/dist/core/io/bulk-ids-input.js +1 -112
  213. package/dist/core/item/actionability.js +1 -327
  214. package/dist/core/item/dependency-reference.js +1 -20
  215. package/dist/core/item/id.js +1 -112
  216. package/dist/core/item/index.js +1 -12
  217. package/dist/core/item/item-format-version.js +1 -78
  218. package/dist/core/item/item-format.js +5 -1473
  219. package/dist/core/item/item-record.js +1 -23
  220. package/dist/core/item/item-type-definition.js +1 -133
  221. package/dist/core/item/parent-reference-policy.js +1 -57
  222. package/dist/core/item/parse.js +2 -603
  223. package/dist/core/item/plan-lifecycle.js +1 -19
  224. package/dist/core/item/priority.js +1 -61
  225. package/dist/core/item/sprint-release-format.js +1 -38
  226. package/dist/core/item/status-filter.js +1 -115
  227. package/dist/core/item/status.js +1 -43
  228. package/dist/core/item/toon-decode.js +1 -29
  229. package/dist/core/item/type-registry.js +1 -715
  230. package/dist/core/item/type-synonyms.js +1 -38
  231. package/dist/core/lock/index.js +1 -9
  232. package/dist/core/lock/lock-gc.js +1 -240
  233. package/dist/core/lock/lock.js +3 -590
  234. package/dist/core/output/mutation-projection.js +1 -217
  235. package/dist/core/output/output-control.js +1 -25
  236. package/dist/core/output/output.js +11 -494
  237. package/dist/core/output/query-summary.js +1 -58
  238. package/dist/core/output/tabular.js +1 -77
  239. package/dist/core/packages/manifest.js +1 -244
  240. package/dist/core/packages/root.js +1 -84
  241. package/dist/core/profile/profile-describe.js +1 -83
  242. package/dist/core/profile/profile-lint.js +1 -415
  243. package/dist/core/profile/profile-plan.js +0 -0
  244. package/dist/core/profile/profile-presets.js +1 -370
  245. package/dist/core/reproducibility/context.js +1 -82
  246. package/dist/core/schema/fields-file.js +2 -288
  247. package/dist/core/schema/item-types-file.js +2 -296
  248. package/dist/core/schema/runtime-field-filters.js +1 -49
  249. package/dist/core/schema/runtime-field-values.js +1 -313
  250. package/dist/core/schema/runtime-schema.js +2 -826
  251. package/dist/core/schema/status-defs-file.js +2 -227
  252. package/dist/core/schema/status-token.js +1 -31
  253. package/dist/core/schema/type-inference.js +1 -95
  254. package/dist/core/schema/type-presets.js +1 -87
  255. package/dist/core/schema/type-workflows.js +1 -104
  256. package/dist/core/search/background-refresh.js +2 -286
  257. package/dist/core/search/bm25.js +1 -146
  258. package/dist/core/search/cache.js +2 -534
  259. package/dist/core/search/corpus.js +1 -311
  260. package/dist/core/search/embedding-batches.js +1 -163
  261. package/dist/core/search/eval.js +1 -225
  262. package/dist/core/search/http-client.js +1 -75
  263. package/dist/core/search/providers.js +1 -242
  264. package/dist/core/search/relevance.js +1 -244
  265. package/dist/core/search/semantic-defaults.js +1 -199
  266. package/dist/core/search/staleness.js +1 -30
  267. package/dist/core/search/vector-stores.js +2 -664
  268. package/dist/core/search/vectorization-metadata.js +1 -81
  269. package/dist/core/sentry/helpers.js +1 -272
  270. package/dist/core/sentry/instrument.js +1 -387
  271. package/dist/core/session/session-state.js +1 -260
  272. package/dist/core/shared/agent-session-context.js +1 -133
  273. package/dist/core/shared/author.js +1 -1172
  274. package/dist/core/shared/command-types.js +1 -4
  275. package/dist/core/shared/conflict-markers.js +1 -31
  276. package/dist/core/shared/constants.js +1 -405
  277. package/dist/core/shared/errors.js +1 -20
  278. package/dist/core/shared/html-entity-decode.js +1 -131
  279. package/dist/core/shared/index.js +1 -12
  280. package/dist/core/shared/item-metadata-contract.js +1 -89
  281. package/dist/core/shared/lazy-module.js +1 -16
  282. package/dist/core/shared/levenshtein.js +1 -61
  283. package/dist/core/shared/memo.js +1 -19
  284. package/dist/core/shared/numeric-parsers.js +1 -20
  285. package/dist/core/shared/option-alias-visibility.js +1 -67
  286. package/dist/core/shared/primitives.js +1 -127
  287. package/dist/core/shared/serial-queue.js +1 -79
  288. package/dist/core/shared/serialization.js +1 -210
  289. package/dist/core/shared/split-comma-list.js +1 -30
  290. package/dist/core/shared/text-normalization.js +1 -38
  291. package/dist/core/shared/time.js +1 -306
  292. package/dist/core/store/index.js +1 -12
  293. package/dist/core/store/item-format-migration.js +1 -125
  294. package/dist/core/store/item-metadata-cache.js +1 -1116
  295. package/dist/core/store/item-metadata-query-index.js +9 -394
  296. package/dist/core/store/item-metadata-read-work.js +1 -43
  297. package/dist/core/store/item-store.js +1 -693
  298. package/dist/core/store/paths.d.ts +1 -1
  299. package/dist/core/store/paths.js +1 -214
  300. package/dist/core/store/settings-read-cache.js +1 -85
  301. package/dist/core/store/settings-validator.js +1 -421
  302. package/dist/core/store/settings.js +3 -1309
  303. package/dist/core/store/tracker-preflight.js +1 -141
  304. package/dist/core/telemetry/consent.js +5 -108
  305. package/dist/core/telemetry/observability.js +1 -246
  306. package/dist/core/telemetry/runtime.js +4 -1988
  307. package/dist/core/test/background-runs.js +4 -945
  308. package/dist/core/test/item-test-run-tracking.js +1 -63
  309. package/dist/core/test/run-selectors.js +1 -120
  310. package/dist/core/validate/estimate-defaults.js +1 -89
  311. package/dist/core/validate/fix-planning.js +1 -189
  312. package/dist/core/validate/linked-artifact-reference.js +1 -36
  313. package/dist/core/validate/missing-by-type.js +1 -34
  314. package/dist/core/validate/missing-link-owners.js +1 -95
  315. package/dist/core/validate/stale-file-classification.js +1 -82
  316. package/dist/mcp/http-server.js +5 -448
  317. package/dist/mcp/legacy-adapter.js +1 -77
  318. package/dist/mcp/runtime-capabilities.js +1 -200
  319. package/dist/mcp/server.js +4 -1233
  320. package/dist/mcp/tool-definitions.js +1 -804
  321. package/dist/sdk/actionability.js +1 -13
  322. package/dist/sdk/agent/closed-domain-contracts.js +1 -161
  323. package/dist/sdk/agent/command-recovery.js +1 -59
  324. package/dist/sdk/agent/command-suggestions.js +1 -66
  325. package/dist/sdk/agent/create-option-policy.js +1 -31
  326. package/dist/sdk/agent/identity-config.js +1 -106
  327. package/dist/sdk/agent/item-addressing.js +1 -207
  328. package/dist/sdk/agent/refusal-closure-census.js +1 -151
  329. package/dist/sdk/agent/refusal-closure.js +1 -133
  330. package/dist/sdk/agent/refusal-corpus-contracts.js +1 -193
  331. package/dist/sdk/agent/refusal-reachability.js +1 -593
  332. package/dist/sdk/agent/subcommand-recovery.js +1 -83
  333. package/dist/sdk/agent/task-transcript-contracts.js +1 -197
  334. package/dist/sdk/agent/tracker-preflight-contracts.js +1 -126
  335. package/dist/sdk/agent-capability-contracts.js +1 -428
  336. package/dist/sdk/agent-session-context.js +1 -9
  337. package/dist/sdk/annotations.js +1 -448
  338. package/dist/sdk/author-attribution.js +1 -468
  339. package/dist/sdk/authoring.js +1 -20
  340. package/dist/sdk/cli-bootstrap.js +1 -838
  341. package/dist/sdk/cli-contracts/agent-output-contracts.d.ts +1 -1
  342. package/dist/sdk/cli-contracts/agent-output-contracts.js +4 -476
  343. package/dist/sdk/cli-contracts/bootstrap-command-scanner.js +1 -79
  344. package/dist/sdk/cli-contracts/command-aliases.d.ts +4 -0
  345. package/dist/sdk/cli-contracts/command-aliases.js +1 -107
  346. package/dist/sdk/cli-contracts/command-exit-contracts.js +1 -151
  347. package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1081
  348. package/dist/sdk/cli-contracts/commander-types.js +1 -159
  349. package/dist/sdk/cli-contracts/completeness.js +1 -393
  350. package/dist/sdk/cli-contracts/enum-contracts.js +1 -222
  351. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1947
  352. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -347
  353. package/dist/sdk/cli-contracts/grammar-contracts.js +1 -986
  354. package/dist/sdk/cli-contracts/registration-helpers.js +7 -990
  355. package/dist/sdk/cli-contracts/runtime-contracts.d.ts +5 -0
  356. package/dist/sdk/cli-contracts/runtime-contracts.js +1 -2090
  357. package/dist/sdk/cli-contracts/schemas/assurance-definition.js +1 -324
  358. package/dist/sdk/cli-contracts/string-lists.js +1 -16
  359. package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -461
  360. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -2167
  361. package/dist/sdk/cli-contracts/tool-schema.d.ts +3 -1
  362. package/dist/sdk/cli-contracts/tool-schema.js +1 -1664
  363. package/dist/sdk/cli-contracts/typed-action-inputs.js +1 -4
  364. package/dist/sdk/cli-contracts.d.ts +1 -1
  365. package/dist/sdk/cli-contracts.js +1 -17
  366. package/dist/sdk/cli-program.js +1 -49
  367. package/dist/sdk/command-line.d.ts +2 -5
  368. package/dist/sdk/command-line.js +1 -78
  369. package/dist/sdk/comments.js +1 -133
  370. package/dist/sdk/compile-cache.js +1 -73
  371. package/dist/sdk/completion.js +157 -837
  372. package/dist/sdk/compose.js +1 -1090
  373. package/dist/sdk/config.js +1 -1204
  374. package/dist/sdk/context/recency.js +1 -33
  375. package/dist/sdk/context/semantic-session-attribution.js +1 -82
  376. package/dist/sdk/context/usage-egress.js +1 -29
  377. package/dist/sdk/context/usage-ledger.js +3 -185
  378. package/dist/sdk/context-intent-contracts.js +1 -709
  379. package/dist/sdk/context-intent-runtime.js +1 -115
  380. package/dist/sdk/context-packing.js +1 -218
  381. package/dist/sdk/context-relevance.js +1 -503
  382. package/dist/sdk/context-signal-store.js +2 -426
  383. package/dist/sdk/context-usage.js +1 -367
  384. package/dist/sdk/contracts.js +1 -23
  385. package/dist/sdk/core-governance.js +1 -14
  386. package/dist/sdk/core.js +1 -14
  387. package/dist/sdk/corpus-shape.js +1 -401
  388. package/dist/sdk/define.js +1 -220
  389. package/dist/sdk/dependencies.js +1 -718
  390. package/dist/sdk/dependency-flag-validation.js +1 -156
  391. package/dist/sdk/dependency-provenance.js +1 -135
  392. package/dist/sdk/docs.js +1 -14
  393. package/dist/sdk/duplicates.js +1 -40
  394. package/dist/sdk/environment/agent-environment.js +1 -466
  395. package/dist/sdk/environment/host-environment-errors.js +1 -8
  396. package/dist/sdk/environment/project-runtime-compatibility.js +1 -481
  397. package/dist/sdk/environment/source-context.js +1 -28
  398. package/dist/sdk/environment/tracker-preflight.js +1 -9
  399. package/dist/sdk/error-code-catalog.js +1 -153
  400. package/dist/sdk/error-runtime.js +1 -58
  401. package/dist/sdk/errors.js +1 -58
  402. package/dist/sdk/eval.js +1 -190
  403. package/dist/sdk/extension/author-manifest.js +1 -92
  404. package/dist/sdk/extension/bundled-catalog.js +1 -332
  405. package/dist/sdk/extension/concurrency.js +1 -25
  406. package/dist/sdk/extension/copy-scope.d.ts +2 -0
  407. package/dist/sdk/extension/copy-scope.js +2 -0
  408. package/dist/sdk/extension/custom-field-collisions.js +1 -30
  409. package/dist/sdk/extension/describe.js +3 -189
  410. package/dist/sdk/extension/doctor.js +1 -606
  411. package/dist/sdk/extension/install-plan.d.ts +69 -0
  412. package/dist/sdk/extension/install-plan.js +2 -0
  413. package/dist/sdk/extension/install-receipts.d.ts +7 -0
  414. package/dist/sdk/extension/install-receipts.js +2 -0
  415. package/dist/sdk/extension/install-runtime.js +3 -313
  416. package/dist/sdk/extension/install-snapshot.js +1 -66
  417. package/dist/sdk/extension/install-sources.js +5 -1057
  418. package/dist/sdk/extension/managed-state.js +2 -252
  419. package/dist/sdk/extension/migrations.js +2 -174
  420. package/dist/sdk/extension/output-ownership.js +1 -25
  421. package/dist/sdk/extension/runtime-summary.js +1 -18
  422. package/dist/sdk/extension/scaffold.js +4 -2308
  423. package/dist/sdk/extension/shared.js +1 -147
  424. package/dist/sdk/extension/source-resolution.js +1 -65
  425. package/dist/sdk/extension/update-check.js +1 -67
  426. package/dist/sdk/extension-command-context.js +1 -44
  427. package/dist/sdk/extension-contracts.js +1 -73
  428. package/dist/sdk/extension.d.ts +7 -2
  429. package/dist/sdk/extension.js +1 -2196
  430. package/dist/sdk/files.js +1 -535
  431. package/dist/sdk/flag-invocation-contracts.d.ts +0 -5
  432. package/dist/sdk/flag-invocation-contracts.js +1 -344
  433. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -2224
  434. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -2236
  435. package/dist/sdk/generated-error-code-catalog.js +1 -16
  436. package/dist/sdk/governance/assurance-action-contracts.js +1 -4
  437. package/dist/sdk/governance/assurance-action.js +1 -411
  438. package/dist/sdk/governance/assurance-limits.js +1 -10
  439. package/dist/sdk/governance/assurance-mutation-error.js +1 -81
  440. package/dist/sdk/governance/assurance-presets.js +1 -135
  441. package/dist/sdk/governance/assurance-runtime.js +1 -238
  442. package/dist/sdk/governance/assurance.js +4 -1182
  443. package/dist/sdk/governance/boundary-fixtures.js +1 -200
  444. package/dist/sdk/governance/coverage-assurance.js +1 -60
  445. package/dist/sdk/governance/defect-recurrence-coverage.js +1 -188
  446. package/dist/sdk/governance/defect-recurrence-graph.js +1 -120
  447. package/dist/sdk/governance/defect-recurrence-signals.js +1 -24
  448. package/dist/sdk/governance/defect-recurrence.js +1 -623
  449. package/dist/sdk/governance/extension-host-version.js +1 -115
  450. package/dist/sdk/governance/gc.js +1 -368
  451. package/dist/sdk/governance/health.js +1 -2367
  452. package/dist/sdk/governance/hierarchy-validation.js +1 -108
  453. package/dist/sdk/governance/linked-file-report.js +1 -71
  454. package/dist/sdk/governance/merge-receipt-history.js +1 -206
  455. package/dist/sdk/governance/provenance-health.js +1 -282
  456. package/dist/sdk/governance/reindex.js +4 -761
  457. package/dist/sdk/governance/stale-work.js +1 -82
  458. package/dist/sdk/governance/status-role-diagnostics.js +1 -35
  459. package/dist/sdk/governance/storage-integrity.js +1 -280
  460. package/dist/sdk/governance/tracked-runtime-cache.js +1 -106
  461. package/dist/sdk/governance/upgrade.js +2 -327
  462. package/dist/sdk/governance/validate-history-drift.js +1 -81
  463. package/dist/sdk/governance/validate-item-reader.js +1 -17
  464. package/dist/sdk/governance/validate-normalization.js +1 -36
  465. package/dist/sdk/governance/validate.js +1 -2261
  466. package/dist/sdk/governance/workspace-position.js +1 -163
  467. package/dist/sdk/governance.d.ts +1 -0
  468. package/dist/sdk/governance.js +1 -31
  469. package/dist/sdk/graph/adapter.js +1 -181
  470. package/dist/sdk/graph/analytics.js +1 -474
  471. package/dist/sdk/graph/assembly.js +1 -377
  472. package/dist/sdk/graph/cache.js +1 -160
  473. package/dist/sdk/graph/centrality.js +1 -258
  474. package/dist/sdk/graph/conformance.js +1 -130
  475. package/dist/sdk/graph/deadline-scheduling.d.ts +90 -0
  476. package/dist/sdk/graph/deadline-scheduling.js +2 -0
  477. package/dist/sdk/graph/durable-cache.d.ts +1 -1
  478. package/dist/sdk/graph/durable-cache.js +1 -361
  479. package/dist/sdk/graph/governance-contracts.js +1 -34
  480. package/dist/sdk/graph/governance.d.ts +13 -1
  481. package/dist/sdk/graph/governance.js +1 -735
  482. package/dist/sdk/graph/hierarchy-integrity.js +1 -310
  483. package/dist/sdk/graph/index.d.ts +3 -2
  484. package/dist/sdk/graph/index.js +1 -26
  485. package/dist/sdk/graph/lifecycle-coverage.d.ts +32 -0
  486. package/dist/sdk/graph/lifecycle-coverage.js +2 -0
  487. package/dist/sdk/graph/mutation-advisory.js +1 -176
  488. package/dist/sdk/graph/remediation.js +1 -197
  489. package/dist/sdk/graph/run.d.ts +15 -1
  490. package/dist/sdk/graph/run.js +1 -768
  491. package/dist/sdk/graph/scheduling.js +1 -124
  492. package/dist/sdk/graph/traversal.js +1 -284
  493. package/dist/sdk/graph/workspace-relationship-kind-registry.js +1 -27
  494. package/dist/sdk/graph.js +1 -15
  495. package/dist/sdk/guide-topics.js +1 -707
  496. package/dist/sdk/guide.js +1 -279
  497. package/dist/sdk/history/maintenance.d.ts +71 -0
  498. package/dist/sdk/history/maintenance.js +2 -0
  499. package/dist/sdk/history/salvage.js +2 -247
  500. package/dist/sdk/history/subject.d.ts +19 -0
  501. package/dist/sdk/history/subject.js +2 -0
  502. package/dist/sdk/history-analytics.js +1 -282
  503. package/dist/sdk/history-compact.js +1 -527
  504. package/dist/sdk/history-mcp.js +1 -68
  505. package/dist/sdk/history-provenance.js +1 -182
  506. package/dist/sdk/history-read.js +1 -96
  507. package/dist/sdk/history-redact.d.ts +1 -14
  508. package/dist/sdk/history-redact.js +1 -643
  509. package/dist/sdk/history-repair.d.ts +5 -0
  510. package/dist/sdk/history-repair.js +1 -657
  511. package/dist/sdk/improvement-ledger-validation.js +1 -62
  512. package/dist/sdk/improvement-ledger.js +2 -257
  513. package/dist/sdk/index.d.ts +4 -0
  514. package/dist/sdk/index.js +1 -183
  515. package/dist/sdk/init-agent-guidance.js +2 -496
  516. package/dist/sdk/init.js +2 -820
  517. package/dist/sdk/invocation-author.js +1 -39
  518. package/dist/sdk/item-children.js +1 -90
  519. package/dist/sdk/item-metadata-index.js +1 -15
  520. package/dist/sdk/item-schedule.js +1 -27
  521. package/dist/sdk/item-transaction.js +1 -396
  522. package/dist/sdk/learnings.js +1 -29
  523. package/dist/sdk/lifecycle/append.js +2 -53
  524. package/dist/sdk/lifecycle/claim.d.ts +2 -0
  525. package/dist/sdk/lifecycle/claim.js +1 -242
  526. package/dist/sdk/lifecycle/close-many.js +1 -438
  527. package/dist/sdk/lifecycle/close.js +1 -468
  528. package/dist/sdk/lifecycle/copy.js +1 -212
  529. package/dist/sdk/lifecycle/create.js +1 -1949
  530. package/dist/sdk/lifecycle/delete.js +1 -45
  531. package/dist/sdk/lifecycle/event-validation-messages.js +1 -91
  532. package/dist/sdk/lifecycle/focus.js +1 -91
  533. package/dist/sdk/lifecycle/hierarchy-mutation-lock.js +1 -24
  534. package/dist/sdk/lifecycle/legacy-none-tokens.js +1 -149
  535. package/dist/sdk/lifecycle/lifecycle-transitions.js +1 -40
  536. package/dist/sdk/lifecycle/mcp-actions.d.ts +2 -0
  537. package/dist/sdk/lifecycle/mcp-actions.js +1 -51
  538. package/dist/sdk/lifecycle/metadata-normalizers.js +1 -46
  539. package/dist/sdk/lifecycle/mutation-command-options.js +1 -9
  540. package/dist/sdk/lifecycle/plan.js +1 -1606
  541. package/dist/sdk/lifecycle/recurrence-parsers.js +1 -147
  542. package/dist/sdk/lifecycle/reopen.js +1 -68
  543. package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +1 -143
  544. package/dist/sdk/lifecycle/restore.d.ts +1 -0
  545. package/dist/sdk/lifecycle/restore.js +1 -330
  546. package/dist/sdk/lifecycle/shared-unset-fields.js +1 -295
  547. package/dist/sdk/lifecycle/update-many.js +1 -861
  548. package/dist/sdk/lifecycle/update.js +1 -2136
  549. package/dist/sdk/lifecycle-completion.js +1 -92
  550. package/dist/sdk/lifecycle-policy.js +1 -120
  551. package/dist/sdk/linked-artifacts.js +1 -530
  552. package/dist/sdk/mcp/apps.js +4 -133
  553. package/dist/sdk/mcp/authorization.js +1 -404
  554. package/dist/sdk/mcp/discovery.js +1 -494
  555. package/dist/sdk/mcp/interactions.js +1 -336
  556. package/dist/sdk/mcp/protocol.d.ts +7 -0
  557. package/dist/sdk/mcp/protocol.js +1 -184
  558. package/dist/sdk/mcp/skills.js +1 -389
  559. package/dist/sdk/mcp/subscriptions.js +1 -211
  560. package/dist/sdk/mcp/tasks.js +2 -430
  561. package/dist/sdk/mcp/transport.js +1 -260
  562. package/dist/sdk/merge/abandoned-receipts.js +1 -46
  563. package/dist/sdk/merge/driver.js +1 -212
  564. package/dist/sdk/merge/index.js +1 -16
  565. package/dist/sdk/merge/install.js +3 -561
  566. package/dist/sdk/merge/receipt-file-boundary.js +1 -46
  567. package/dist/sdk/merge/receipt-operation.js +1 -96
  568. package/dist/sdk/merge/receipt-schema.js +1 -397
  569. package/dist/sdk/merge/receipts.js +4 -525
  570. package/dist/sdk/merge/reconcile.js +1 -352
  571. package/dist/sdk/merge/three-way.js +3 -775
  572. package/dist/sdk/merge.js +1 -10
  573. package/dist/sdk/mutation-events.js +1 -292
  574. package/dist/sdk/mutation-guard.js +1 -216
  575. package/dist/sdk/notes.js +1 -139
  576. package/dist/sdk/output-contracts.js +1 -172
  577. package/dist/sdk/output-projection.js +1 -430
  578. package/dist/sdk/output-token-accounting.js +1 -140
  579. package/dist/sdk/output.js +1 -64
  580. package/dist/sdk/ownership-source.js +1 -21
  581. package/dist/sdk/package-import-adapters.js +1 -442
  582. package/dist/sdk/package-migrations.js +1 -20
  583. package/dist/sdk/package-runtime-options.js +1 -80
  584. package/dist/sdk/pagination.js +1 -162
  585. package/dist/sdk/profile.js +1 -454
  586. package/dist/sdk/provenance.js +1 -258
  587. package/dist/sdk/public-surface.json +1 -1
  588. package/dist/sdk/query/activity.js +1 -401
  589. package/dist/sdk/query/aggregate.d.ts +16 -0
  590. package/dist/sdk/query/aggregate.js +1 -390
  591. package/dist/sdk/query/calendar.js +1 -964
  592. package/dist/sdk/query/complete-list.js +1 -215
  593. package/dist/sdk/query/context.js +1 -1702
  594. package/dist/sdk/query/duplicate-candidates.js +1 -70
  595. package/dist/sdk/query/get.js +1 -450
  596. package/dist/sdk/query/history.js +1 -186
  597. package/dist/sdk/query/item-filter-options.js +1 -9
  598. package/dist/sdk/query/light-metadata.js +1 -18
  599. package/dist/sdk/query/list-filter-shared.js +1 -81
  600. package/dist/sdk/query/list.js +1 -1304
  601. package/dist/sdk/query/multi-value-filters.js +1 -78
  602. package/dist/sdk/query/next.js +1 -513
  603. package/dist/sdk/query/parsers.js +1 -44
  604. package/dist/sdk/query/projection-contracts.js +1 -184
  605. package/dist/sdk/query/search-contracts.js +1 -230
  606. package/dist/sdk/query/search-pagination.js +1 -35
  607. package/dist/sdk/query/search-rendering.js +1 -105
  608. package/dist/sdk/query/search.js +2 -1987
  609. package/dist/sdk/query.js +1 -35
  610. package/dist/sdk/read-output/continuation.js +1 -194
  611. package/dist/sdk/read-output-budget.js +1 -135
  612. package/dist/sdk/read-output-contracts.js +1 -1225
  613. package/dist/sdk/read-output-rows.js +1 -186
  614. package/dist/sdk/read-output-session.js +1 -208
  615. package/dist/sdk/relationship-analytics.js +1 -410
  616. package/dist/sdk/relationship-context.js +1 -284
  617. package/dist/sdk/relationship-history.js +4 -519
  618. package/dist/sdk/relationship-kinds/contract.js +1 -22
  619. package/dist/sdk/relationship-migration.js +1 -77
  620. package/dist/sdk/relationships.js +1 -579
  621. package/dist/sdk/reproducibility/process.js +1 -87
  622. package/dist/sdk/runtime-action-aliases.js +1 -59
  623. package/dist/sdk/runtime-extended-actions.js +1 -177
  624. package/dist/sdk/runtime-input.js +1 -614
  625. package/dist/sdk/runtime-primitives.js +1 -84
  626. package/dist/sdk/runtime-public-contracts.js +1 -4
  627. package/dist/sdk/runtime-stats-options.js +1 -38
  628. package/dist/sdk/runtime.js +1 -1928
  629. package/dist/sdk/scheduling-shortcuts.js +1 -63
  630. package/dist/sdk/schema-migration.js +3 -856
  631. package/dist/sdk/schema.js +1 -1376
  632. package/dist/sdk/search-refresh-worker.js +1 -18
  633. package/dist/sdk/similarity-scoring.js +1 -53
  634. package/dist/sdk/similarity.js +1 -326
  635. package/dist/sdk/start-task-status.js +1 -14
  636. package/dist/sdk/stats.js +1 -270
  637. package/dist/sdk/structured-mutations.js +1 -580
  638. package/dist/sdk/telemetry-flush.js +1 -13
  639. package/dist/sdk/telemetry.js +1 -405
  640. package/dist/sdk/templates.js +2 -292
  641. package/dist/sdk/test/batch.js +2 -509
  642. package/dist/sdk/test/entry.js +1 -70
  643. package/dist/sdk/test/execution.js +6 -2211
  644. package/dist/sdk/test/linked-command-detection.js +1 -546
  645. package/dist/sdk/test/measurements.js +1 -91
  646. package/dist/sdk/test/parsers.js +1 -545
  647. package/dist/sdk/test/runs.js +1 -193
  648. package/dist/sdk/test/trust.js +2 -206
  649. package/dist/sdk/testing.js +4 -1391
  650. package/dist/sdk/traceability/runtime-files-lookup.js +1 -32
  651. package/dist/sdk/traceability/source-traceability.js +1 -292
  652. package/dist/sdk/tracker-root-discovery.js +1 -9
  653. package/dist/sdk/workspace-contracts-cache.js +1 -28
  654. package/dist/sdk/workspace-contracts.js +1 -33
  655. package/dist/sdk/workspace-memory.js +2 -318
  656. package/dist/sdk/workspace-recipe.js +1 -71
  657. package/dist/sdk/workspace-snapshot.js +4 -613
  658. package/dist/sdk/workspace-transaction-gc.js +1 -149
  659. package/dist/sdk/workspace-transaction.js +2 -363
  660. package/dist/sdk/workspace.js +3 -127
  661. package/dist/types/index.js +1 -9
  662. package/dist/types.js +1 -245
  663. package/docs/AGENT_GUIDE.md +1 -1
  664. package/docs/CONTEXT_ALGORITHM_PORTFOLIO.md +167 -0
  665. package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +9 -3
  666. package/docs/EXTENSIONS.md +1 -0
  667. package/docs/HISTORY_MAINTENANCE.md +125 -0
  668. package/docs/MCP_2026_07_28_CONFORMANCE.md +20 -10
  669. package/docs/PACKAGE_EVIDENCE.md +92 -0
  670. package/docs/PLANNING_MEASUREMENTS.md +183 -0
  671. package/docs/README.md +3 -0
  672. package/docs/SCRIPTING.md +21 -0
  673. package/docs/TESTING.md +23 -0
  674. package/docs/generated/FLAG_LEXICON_BUDGETS.md +5 -5
  675. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +2 -2
  676. package/marketplace.json +2 -2
  677. package/package.json +1 -1
  678. package/packages/pm-beads/package.json +1 -1
  679. package/packages/pm-calendar/package.json +1 -1
  680. package/packages/pm-command-kit/package.json +1 -1
  681. package/packages/pm-digital-twin/package.json +1 -1
  682. package/packages/pm-governance-audit/package.json +1 -1
  683. package/packages/pm-guide-shell/package.json +1 -1
  684. package/packages/pm-kanban/package.json +1 -1
  685. package/packages/pm-lifecycle-hooks/package.json +1 -1
  686. package/packages/pm-linked-test-adapters/package.json +1 -1
  687. package/packages/pm-search-advanced/package.json +1 -1
  688. package/packages/pm-templates/package.json +1 -1
  689. package/packages/pm-todos/package.json +1 -1
  690. package/packages/pm-vcs/package.json +1 -1
  691. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  692. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  693. package/scripts/finalize-build.mjs +45 -3
  694. package/dist/cli-bundle/chunks/chunk-AZDFJGH6.js +0 -9
  695. package/dist/cli-bundle/chunks/chunk-BAX2BYUW.js +0 -2111
  696. package/dist/cli-bundle/chunks/chunk-CKOL5U7J.js +0 -77
  697. package/dist/cli-bundle/chunks/chunk-OF76PSDQ.js +0 -5
  698. package/dist/cli-bundle/chunks/chunk-QUWFABDM.js +0 -232
  699. package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +0 -2
  700. package/dist/cli-bundle/chunks/chunk-RWWBOWJ5.js +0 -2
  701. package/dist/cli-bundle/chunks/chunk-WGAOYSYH.js +0 -40
  702. package/dist/cli-bundle/chunks/chunk-WI2AYPA7.js +0 -2
  703. package/dist/cli-bundle/chunks/register-list-query-5JL52D33.js +0 -11
  704. package/dist/cli-bundle/chunks/register-mutation-ZPG7KMVP.js +0 -20
  705. package/dist/cli-bundle/chunks/register-setup-H4SVAVX7.js +0 -2
  706. package/dist/cli-bundle/focused-chunks/chunk-AL5ON6K6.js +0 -2
  707. package/dist/cli-bundle/focused-chunks/chunk-CHC2IDXA.js +0 -6
  708. package/dist/cli-bundle/focused-chunks/chunk-CK6QFAPZ.js +0 -20
  709. package/dist/cli-bundle/focused-chunks/chunk-EZR3GHFE.js +0 -2
  710. package/dist/cli-bundle/focused-chunks/chunk-H2WJWK7L.js +0 -56
  711. package/dist/cli-bundle/focused-chunks/chunk-NTPY5GSO.js +0 -3
  712. package/dist/cli-bundle/focused-chunks/chunk-P5O7MP5Y.js +0 -2
  713. package/dist/cli-bundle/focused-chunks/chunk-PDMW2E36.js +0 -177
  714. package/dist/cli-bundle/focused-chunks/chunk-QTVCLMSZ.js +0 -6
  715. package/dist/cli-bundle/focused-chunks/chunk-QTZRBUYA.js +0 -8
  716. package/dist/cli-bundle/focused-chunks/chunk-SGQST3PQ.js +0 -12
  717. package/dist/cli-bundle/focused-chunks/chunk-UKHASMMP.js +0 -10
  718. package/dist/cli-bundle/focused-chunks/chunk-ZPEKQHOC.js +0 -2
@@ -1,2 +0,0 @@
1
- import{$a as K,Ub as B,Vb as F,Xb as b,_b as J,ac as W,bc as V}from"./chunk-BAX2BYUW.js";import{b as z}from"./chunk-CKOL5U7J.js";import{C as c,E as d,He as D,Hk as j,Kk as P,Ub as N,ai as v,ca as $,ci as G,gm as x,mm as L,nd as C,pd as U,r as k}from"./chunk-QUWFABDM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5079995b-ef00-5fe3-b87d-0882ef976d10")}catch{}})();import ce from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3f348972-0c8f-52da-abeb-46690df967d8")}catch{}})();var R=["op","id","reason","options"],Y=[...R,"ref"],q=["schema_version","mutations"],ne="[a-z][a-z0-9._-]{0,63}",H=new RegExp(`^${ne}$`,"u"),re=new RegExp(`(^|,)id=@(${ne})(?=,|$)`,"gu"),X=e=>e.slice(2).replaceAll(/-([a-z])/gu,(t,n)=>n.toUpperCase()),E=["item","linked","schedule","claim_state","children","omission_receipt","row_contract","context_intent"],oe=new Set(["created_at","updated_at","closed_at","version","format_version","path","author","collection_counts","notes_count","tests_count"]),de=new Set([...oe,"completed_at","id"]),_=new Set(["id","title","description","type","status","priority","tags","body","deadline","estimated_minutes","acceptance_criteria","definition_of_ready","order","rank","assignee",...k,"affected_version","fixed_version","component","regression","customer_impact","close_reason","completed_at","dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"]),Z={create:j.map(e=>e.target),update:P.map(e=>e.target),close:x.map(e=>X(e.flag)).filter(e=>e!=="reason"),release:L.map(e=>X(e.flag))};function St(e){let t={},n=e.createCompensation;if(n!==void 0){if(n!=="close"&&n!=="delete")throw new d("createCompensation must be close or delete.",c.USAGE);t.createCompensation=n}for(let r of["lockTtlSeconds","lockWaitMs"]){let o=e[r];if(o===void 0)continue;let i=typeof o=="number"||typeof o=="string"&&o.trim().length>0?Number(o):Number.NaN;if(!Number.isSafeInteger(i)||i<=0)throw new d(`${r} must be a positive safe integer.`,c.USAGE);t[r]=i}return t}function p(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function g(e,t){let n=Math.max(1,Math.min(3,Math.floor(e.length/4)+1)),r;for(let o of t){let i=$(e,o,n);i!==null&&(r===void 0||i<r.distance)&&(r={key:o,distance:i})}return r?.key}function y(e,t,n){let r=g(t,n);return new d(r===void 0?`${e} does not recognize key "${t}". Allowed keys: ${n.join(", ")}.`:`${e} does not recognize key "${t}". Did you mean "${r}"?`,c.USAGE,{code:"stdin_json_unknown_key",required:`Use documented ${e} keys only.`,why:"Strict structured input prevents silent typos from creating incomplete or unintended mutations.",nextSteps:[r===void 0?`Remove or correct "${t}".`:`Replace "${t}" with "${r}".`]})}function I(e,t){try{return JSON.parse(e)}catch(n){let r=n instanceof Error?n.message:String(n);throw new d(`${t} must be valid JSON: ${r}`,c.USAGE,{code:"stdin_json_invalid",required:`Pipe one valid JSON ${t.toLowerCase()} into stdin.`,why:"Structured mutation input must parse deterministically before any tracker write begins."})}}function ue(e,t){if(!p(e))throw new d(`Mutation ${t+1} must be an object.`,c.USAGE);for(let n of Object.keys(e))if(!R.includes(n))throw y(`mutation ${t+1}`,n,R);return e}function pe(e,t,n){if(e!==void 0){if(!p(e))throw new d(`Mutation ${n+1} options must be an object.`,c.USAGE);for(let r of Object.keys(e))if(!Z[t].includes(r))throw y(`mutation ${n+1} ${t} options`,r,Z[t]);return e}}function fe(e,t){let n=ue(e,t),{op:r,id:o,reason:i}=n;if(r!=="create"&&r!=="update"&&r!=="close"&&r!=="release")throw new d(`Mutation ${t+1} op must be create, update, close, or release.`,c.USAGE);let s=pe(n.options,r,t);if(typeof o!="string"||o.trim().length===0)throw new d(`Mutation ${t+1} requires a non-empty id.`,c.USAGE);let a=o.trim();if(r==="close"){if(typeof i!="string"||i.trim().length===0)throw new d(`Mutation ${t+1} close requires a non-empty reason.`,c.USAGE);return{op:r,id:a,reason:i.trim(),...s===void 0?{}:{options:s}}}if(r==="release")return{op:r,id:a,...s===void 0?{}:{options:s}};if(!p(s))throw new d(`Mutation ${t+1} ${r} requires an options object.`,c.USAGE);return{op:r,id:a,options:s}}function ie(e){let t=I(e,"Mutation batch"),n=Array.isArray(t)?t:p(t)&&Array.isArray(t.mutations)?t.mutations:void 0;if(n===void 0||n.length===0)throw new d("Mutation batch must be a non-empty JSON array or an object with a non-empty mutations array.",c.USAGE);return n.map((r,o)=>{let i=fe(r,o);return i.options!==void 0&&C(i.options),i})}function le(e,t,n){let r=ce.createHash("sha256").update(e).update("\0").update(t).digest("hex"),o=BigInt(`0x${r.slice(0,16)}`).toString(36).padStart(13,"0").slice(-12);return`${v(n)}${o}`}function Q(e,t){if(typeof e!="string"||!e.startsWith("@"))return e;let n=e.slice(1),r=t[n];if(r===void 0)throw new d(`Unknown mutation reference "${e}".`,c.USAGE);return r}function ee(e,t){if(typeof e!="string")return e;let n=e.replace(re,(r,o,i)=>{let s=t[i];if(s===void 0)throw new d(`Unknown mutation reference "@${i}".`,c.USAGE);return`${o}id=${s}`});if(/(^|,)id=@/u.test(n))throw new d(`Malformed mutation reference in dependency "${e}".`,c.USAGE);return n}function me(e){return typeof e!="string"?[]:e.startsWith("@")?[e.slice(1)]:[...e.matchAll(re)].map(t=>t[1]).filter(t=>t!==void 0)}function ye(e){let t=new Map;for(let i of e){if(i.op!=="create"||typeof i.ref!="string")continue;let s=p(i.options)?i.options:{},a=Array.isArray(s.dep)?s.dep:s.dep===void 0?[]:[s.dep];t.set(i.ref,[s.parent,s.blockedBy,...a].flatMap(me))}let n=new Set,r=new Set,o=i=>{if(n.has(i))throw new d(`Mutation reference cycle includes "@${i}".`,c.USAGE);if(!r.has(i)){n.add(i);for(let s of t.get(i))t.has(s)&&o(s);n.delete(i),r.add(i)}};for(let i of t.keys())o(i)}function he(e){let t=I(e,"Mutation document"),n=Array.isArray(t)?{schema_version:1,mutations:t}:t;if(!p(n))throw new d("Mutation document must be a JSON array or object.",c.USAGE);for(let r of Object.keys(n))if(!q.includes(r))throw y("mutation document",r,q);if(n.schema_version!==void 0&&n.schema_version!==1)throw new d("Mutation document schema_version must be 1.",c.USAGE);if(!Array.isArray(n.mutations)||n.mutations.length===0)throw new d("Mutation document requires a non-empty mutations array.",c.USAGE);return n.mutations.map((r,o)=>{if(!p(r))throw new d(`Mutation ${o+1} must be an object.`,c.USAGE);for(let i of Object.keys(r))if(!Y.includes(i))throw y(`mutation ${o+1}`,i,Y);return{...r}})}function we(e,t){let n=Object.create(null);for(let[r,o]of e.entries())if(o.ref!==void 0){if(o.op!=="create")throw new d(`Mutation ${r+1} ref is only valid for create operations.`,c.USAGE);if(typeof o.ref!="string"||!H.test(o.ref))throw new d(`Mutation ${r+1} ref must match ${H.source}.`,c.USAGE);if(n[o.ref]!==void 0)throw new d(`Duplicate mutation ref "${o.ref}".`,c.USAGE);n[o.ref]=typeof o.id=="string"&&o.id.trim().length>0?G(o.id,t.idPrefix):le(t.transactionId,o.ref,t.idPrefix)}return n}function bt(e,t){let n=he(e),r=we(n,t);ye(n);let o=n.map(a=>{let u={...a},m=typeof u.ref=="string"?u.ref:void 0;if(delete u.ref,m!==void 0?u.id=r[m]:u.id=Q(u.id,r),p(u.options)){let f={...u.options};for(let w of["parent","blockedBy"])f[w]!==void 0&&(f[w]=Q(f[w],r));Array.isArray(f.dep)?f.dep=f.dep.map(w=>ee(w,r)):f.dep!==void 0&&(f.dep=ee(f.dep,r)),u.options=f}return u}),i=ie(JSON.stringify(o)),s=i.filter(a=>a.op==="create").map(a=>a.id);if(new Set(s).size!==s.length)throw new d("Duplicate resolved create id in mutation document.",c.USAGE);return{schema_version:1,mutations:i,references:r}}function se(e,t){return t.filter(n=>e[n]!==void 0&&e[n]!==null).map(n=>{let r=String(e[n]);return`${n}=${/[",\n\r\\]/u.test(r)?JSON.stringify(r):r}`}).join(",")}function _e(e,t,n){if(e!==void 0){if(!Array.isArray(e)||!e.every(p))throw new d(`${n} must be an array of objects.`,c.USAGE);return e.map(r=>se(r,t))}}function Ee(e,t){return e==="tags"&&Array.isArray(t)&&t.every(n=>typeof n=="string")?JSON.stringify(t):typeof t=="number"||typeof t=="boolean"?String(t):t}function te(e,t,n=!1){let r=[["dependencies","dep",["id","kind","created_at","author","source_kind"]],["comments","comment",["text","created_at","author"]],["notes","note",["text","created_at","author"]],["learnings","learning",["text","created_at","author"]],["files","file",["path","scope","note"]],["tests","test",["command","scope","timeout_seconds"]],["docs","doc",["path","scope","note"]],["reminders","reminder",["at","text","created_at"]],["events","event",["start_at","end_at","title","location"]],["type_options","typeOption",["key","value"]]];for(let[o,i,s]of r){let a=t[o],u=_e(n&&["comments","notes","learnings"].includes(o)&&Array.isArray(a)?a.filter(m=>!p(m)||m.created_at===void 0):a,s,o);u!==void 0&&u.length>0&&(e[i]=u)}}function ge(e,t){for(let n of Object.keys(e)){if(t){if(!E.includes(n))throw y("item envelope",n,E);continue}if(!_.has(n)&&g(n,[..._])===void 0&&g(n,E)==="item")throw y("item envelope",n,E)}}function Ae(e){let t=Object.hasOwn(e,"item");ge(e,t);let n=t?e.item:e;if(!p(n))throw new d("Item document item must be an object.",c.USAGE);return{item:n,...t&&p(e.linked)?{linked:e.linked}:{}}}function Te(e,t,n,r){if(!(r==="update"?de:oe).has(t)){if(!_.has(t)){if(g(t,[..._])!==void 0)throw y("item document",t,[..._]);let s=Array.isArray(e.field)?e.field:[];s.push(se({key:t,value:typeof n=="string"?n:JSON.stringify(n)},["key","value"])),e.field=s;return}["dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"].includes(t)||(e[t.replaceAll(/_([a-z])/gu,(i,s)=>s.toUpperCase())]=Ee(t,n))}}function Rt(e,t,n={}){let r=I(e,"Item document");if(!p(r))throw new d("Item document must be a JSON object.",c.USAGE);let{item:o,linked:i}=Ae(r),s={};for(let[a,u]of Object.entries(o))Te(s,a,u,t);return te(s,o,t==="update"),i!==void 0&&te(s,i),{...s,...Object.fromEntries(Object.entries(n).filter(([,a])=>a!==void 0)),stdinJson:void 0}}function It(e){return ie(JSON.stringify(e))}import Se from"node:crypto";import be from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ea10685a-3187-533c-9699-73c23d377705")}catch{}})();function A(e,t){let n={...e,...t};return e===void 0?n:U(e,n)}async function l(e,t){try{let r=(await K(t,{},{pmRoot:e})).item;return{id:r.id,closedAt:r.closed_at,updatedAt:r.updated_at,assignee:r.assignee,claimPrincipal:r.claim_principal}}catch(n){if(n instanceof d&&n.exitCode===c.NOT_FOUND)return;throw n}}function M(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_"),r=Se.createHash("sha256").update(N(e)).digest("hex").slice(0,12);return`${t+1}-${e.op}-${n}-${r}`}function Re(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_");return`${t+1}-${e.op}-${n}`}function h(e,t,n){return`bulk-item-transaction ${e} ${t} ${n}`}async function T(e,t,n,r){let o=await D(be.join(e,"history",`${t}.jsonl`),t),i=h(n,r,"apply"),s=h(n,r,"compensate");for(let a=o.length-1;a>=0;a-=1){let u=o[a].message;if(u===i)return!0;if(u===s)return!1}return!1}async function O(e,t){let n=await l(e,t.id);if(n?.updatedAt===void 0)throw new d(`Bulk ${t.op} target ${t.id} does not exist or has no restorable version`,c.NOT_FOUND);return{target_updated_at:n.updatedAt}}async function S(e,t,n,r){let o=r!==null&&typeof r=="object"&&!Array.isArray(r)?r.target_updated_at:void 0;typeof o=="string"&&await l(e.pmRoot,t)!==void 0&&await V(t,o,{force:!0,author:e.author,message:h(e.transactionId,n,"compensate")},{pmRoot:e.pmRoot})}function ae(e,t,n){return{id:n,async inspect(){let r=await l(e.pmRoot,t.id);return r===void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"create"}}},async apply(){let o=(await B(A(t.options,{author:e.author,id:t.id}),{pmRoot:e.pmRoot})).item;return{id:String(o.id),op:"create"}},async compensate(){let r=await l(e.pmRoot,t.id);if(r!==void 0){if(e.createCompensation==="delete"){await W(t.id,{force:!0,author:e.author,message:`Compensate interrupted bulk transaction ${e.transactionId}`},{pmRoot:e.pmRoot});return}r.closedAt===void 0&&await b(t.id,`Compensated: interrupted bulk transaction ${e.transactionId}`,{force:!0,author:e.author},{pmRoot:e.pmRoot})}}}}function Ie(e,t,n){return{id:n,async inspect(){let r=await l(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"update"}}:{state:"pending"}},async prepareCompensation(){return O(e.pmRoot,t)},async apply(){let o=(await F(t.id,A(t.options,{author:e.author,message:h(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(o.id),op:"update"}},async compensate(r){await S(e,t.id,n,r)}}}function Me(e,t,n){return{id:n,async inspect(){let r=await l(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"close"}}:r.closedAt===void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"close"}}},async prepareCompensation(){return O(e.pmRoot,t)},async apply(){let o=(await b(t.id,t.reason,A(t.options,{author:e.author,message:h(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(o.id),op:"close"}},async compensate(r){await S(e,t.id,n,r)}}}function Oe(e,t,n){return{id:n,async inspect(){let r=await l(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await T(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"release"}}:r.assignee!==void 0||r.claimPrincipal!==void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"release"}}},async prepareCompensation(){return O(e.pmRoot,t)},async apply(){let o=(await J(t.id,A(t.options,{author:e.author,message:h(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return{id:String(o.id),op:"release"}},async compensate(r){await S(e,t.id,n,r)}}}function ke(e,t,n){let r=M(t,n);switch(t.op){case"create":return ae(e,t,r);case"update":return Ie(e,t,r);case"close":return Me(e,t,r);case"release":return Oe(e,t,r)}}function $e(e,t){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`Bulk mutation ${t+1} must be an object`);if(!["create","update","close","release"].includes(e.op))throw new TypeError(`Bulk mutation ${t+1} op must be create, update, close, or release`);if(typeof e.id!="string"||e.id.trim().length===0)throw new TypeError(`Bulk mutation ${t+1} requires a non-empty id`);if(e.op==="close"&&(typeof e.reason!="string"||e.reason.trim().length===0))throw new TypeError(`Bulk close mutation ${t+1} requires a non-empty reason`)}async function Ne(e){let t=[...e.mutations];if(t.length===0)throw new TypeError("Bulk item transaction requires at least one mutation");for(let[s,a]of t.entries())$e(a,s);let n=e.createCompensation??"close";if(!["close","delete"].includes(n))throw new TypeError("Bulk item transaction createCompensation must be close or delete");let r={pmRoot:e.pmRoot,author:e.author,transactionId:e.transactionId,createCompensation:n},o=await z({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,steps:t.map((s,a)=>ke(r,s,a)),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}}),i={};for(let[s,a]of t.entries()){let u=M(a,s),m=o.results[u];i[Re(a,s)]=m}return{transactionId:o.transactionId,status:"committed",recovered:o.recovered,results:i}}function Ce(e){let t=[];return e.evidence!==void 0&&Object.keys(e.evidence).length>0&&t.push({op:"update",id:e.id,options:e.evidence}),t.push({op:"close",id:e.id,reason:e.reason,...e.closeOptions===void 0?{}:{options:e.closeOptions}},{op:"release",id:e.id,...e.releaseOptions===void 0?{}:{options:e.releaseOptions}}),t}function jt(e){return Ne({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,mutations:Ce(e),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}})}var Pt={buildCreateStep:ae,bulkHistoryMarker:h,compensateByRestore:S,deriveStepId:M,isUpdateMarkerApplied:T,readItemSnapshot:l};export{St as a,ie as b,bt as c,Rt as d,It as e,Ne as f,Ce as g,jt as h,Pt as i};
2
- //# sourceMappingURL=chunk-WI2AYPA7.js.map
@@ -1,11 +0,0 @@
1
- import{b as v,c as I,d as F}from"./chunk-NPN5I67J.js";import{C as oe,E as ie,b as V,d as te,j as A,l as ne}from"./chunk-OF76PSDQ.js";import{Cc as Z,D as T,Dc as ee,Fc as ae,Gc as re,Ha as q,Hc as se,eb as J,jc as W,rb as Q,vc as K,xc as X,zc as Y}from"./chunk-AZDFJGH6.js";import"./chunk-WYRZZ5ZE.js";import{Af as j,C as c,E as p,En as y,Hn as l,Ic as k,Jn as d,Mi as R,Rn as L,Sn as $,Tn as G,Un as M,Vn as U,Wn as B,Xn as N,Ya as D,Yg as S,Yn as z,Zn as P,_n as H,ch as g,fh as m,gh as f,pi as O,qi as C,zf as E}from"./chunk-QUWFABDM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6ed80dad-480c-584f-9977-f0058fcfe5a3")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bb98131e-c0d5-5055-8ad4-b0df3824cfbb")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72332f20-83db-5566-b130-ad4c21267fa9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="85050f31-1e96-5ae9-88a3-77ce4b042cca")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ac3636d0-67b6-58f6-9f0a-a478f20b0ac5")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d6123f68-21a1-5a33-ac06-4893ca6ba20d")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b1affe9d-1c93-5641-be3b-c46a68b93e09")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f76a3502-b942-530f-95f5-b37f4c365e3c")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="35fa89cf-806d-5d6a-ad6b-dad1dc3f1457")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="14619397-8d05-59fb-9744-f78532b98d26")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7b6e80ad-a85b-5539-8f47-02bfad799cdb")}catch{}})();function pe(e,t){return!t||t.size===0?!0:e==="context"?t.has("context")||t.has("ctx"):t.has(e)}function le(e){if(e===void 0)return;if(typeof e!="string")throw new p("List --format must be one of csv|table|json|ndjson|toon",c.USAGE);let t=e.trim().toLowerCase();if(t==="csv"||t==="table"||t==="json"||t==="ndjson"||t==="toon")return t;throw new p("List --format must be one of csv|table|json|ndjson|toon",c.USAGE)}function _(e,t,n,i=!1){if(t===void 0)return n;if(typeof t!="string")throw new p(`${e} --format must be one of ${i?"json|ndjson|toon":"json|toon"}`,c.USAGE);let a=t.trim().toLowerCase();if(a!=="json"&&(a!=="ndjson"||!i)&&a!=="toon")throw new p(`${e} --format must be one of ${i?"json|ndjson|toon":"json|toon"}`,c.USAGE);if(n.json===!0&&a==="toon")throw new p(`${e} cannot combine --json with --format toon`,c.USAGE);return{...n,json:a==="json"||a==="ndjson"}}function fe(e,t){J[t]==="brief"&&e.includeBody!==!0&&e.compact!==!0&&e.brief!==!0&&e.full!==!0&&e.fields===void 0&&(e.brief=!0)}function de(e){e.option("--has-notes","Show only items that have notes").option("--has-learnings","Show only items that have learnings").option("--has-files","Show only items that have linked files").option("--has-docs","Show only items that have linked docs").option("--has-tests","Show only items that have linked tests").option("--has-comments","Show only items that have comments").option("--has-deps","Show only items that have dependencies").option("--has-body","Show only items that have a non-empty body").option("--has-linked-command","Show only items whose linked tests carry a runnable command").option("--no-notes","Show only items that have no notes").option("--no-learnings","Show only items that have no learnings").option("--no-files","Show only items that have no linked files").option("--filter-files-missing","Alias for --no-files").option("--no-docs","Show only items that have no linked docs").option("--filter-docs-missing","Alias for --no-docs").option("--no-tests","Show only items that have no linked tests").option("--no-comments","Show only items that have no comments").option("--no-deps","Show only items that have no dependencies").option("--empty-body","Show only items with an empty body").option("--no-linked-command","Show only items whose linked tests carry no runnable command").option("--filter-reviewer-missing","Show only items missing reviewer").option("--filter-risk-missing","Show only items missing risk").option("--filter-confidence-missing","Show only items missing confidence").option("--filter-sprint-missing","Show only items missing sprint").option("--filter-release-missing","Show only items missing release")}var me={draft:{name:"list-draft",dependencyBlocked:!1},open:{name:"list-open",dependencyBlocked:!1},in_progress:{name:"list-in-progress",dependencyBlocked:!1},blocked:{name:"list-blocked",dependencyBlocked:!0},closed:{name:"list-closed",dependencyBlocked:!1},canceled:{name:"list-canceled",dependencyBlocked:!1}};function ye(e,t){let n=e.stream===!0,i=le(e.format),a=i==="csv"||i==="table",o=i==="json"||i==="ndjson"||i==="toon"?_("List",e.format,t,!0):t;if(n&&!o.json)throw new p("--stream requires --json output mode.",c.USAGE);if((a||i==="ndjson")&&n)throw new p("--format csv|table|ndjson cannot be combined with --stream.",c.USAGE);return{streamMode:n,listFormat:i,effectiveGlobal:o}}function he(e,t,n){if(n.listFormat==="csv"||n.listFormat==="table"){k(t);let i=t.items,a=n.listFormat==="csv"?O(i):C(i);!n.effectiveGlobal.quiet&&a.length>0&&g(`${a}
2
- `)}else if(n.listFormat==="ndjson"){k(t);let i=I(t.items);!n.effectiveGlobal.quiet&&i.length>0&&g(`${i}
3
- `)}else n.streamMode?G(e,t,n.effectiveGlobal):m(t,n.effectiveGlobal)}async function ge(e){let t=y(e.actionCommand),n=e.aliasContract?{...t,command:e.aliasContract.canonical}:t,i=Date.now();e.aliasContract?.lifecycle==="deprecated"&&await R(D(process.cwd(),n.path)).then(ue=>ue.ux.deprecation_hints)&&f(j(e.aliasContract));let a=S("list",e.options),o=L(a),r=ve(e,o),{effectiveName:s,effectiveStatus:h,effectiveDependencyBlocked:u,effectiveExcludeTerminal:w}=r;fe(o,s),Object.assign(o,{projectionCommand:s}),w&&(o.excludeTerminal=!0),o.dependencyBlocked=u;let x=ye(a,n),ce=await Q(u?void 0:h,o,n);he("list",ce,x),n.profile&&f(`profile:command=list took_ms=${Date.now()-i}`)}function ve(e,t){let n=e.name,i=e.status,a=e.dependencyBlocked===!0,o=e.excludeTerminal===!0,r=t.status?.trim().toLowerCase(),s=e.name==="list"&&r!==void 0?me[r]:void 0;return e.name==="list"&&(e.options.all===!0||r==="all"?(n="list-all",o=!1,t.status=void 0):r!==void 0&&s!==void 0&&(n=s.name,i=r,a=s.dependencyBlocked,o=!1,t.status=void 0)),(n==="list-open"||n==="list-in-progress")&&(t.lifecycleBucket=n==="list-open"?"open":"in_progress",i=void 0),{effectiveName:n,effectiveStatus:i,effectiveDependencyBlocked:a,effectiveExcludeTerminal:o}}function be(e,t){let{name:n,description:i,status:a,excludeTerminal:o,allowStatusFilter:r,dependencyBlocked:s,aliasContract:h}=t,u=e.command(n,{hidden:h?.hidden===!0}).description(i);r&&u.option("--status <value>","Filter by status (repeatable or comma-separated; matches any; all selects every status)",l),n==="list"&&u.option("--all","Include every lifecycle status"),u.option("--for <intent>",`Apply a declared context intent projection. ${v("list","--for")}`).option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--type <value>","Filter by item type (repeatable or comma-separated; matches any)",l).option("--tag <value>","Filter by tag (repeatable or comma-separated; matches any)",l).option("--priority <value>","Filter by priority (repeatable or comma-separated; matches any)",l).option("--deadline-before <value>","Filter by deadline upper bound (ISO/date string or relative)").option("--deadline-after <value>","Filter by deadline lower bound (ISO/date string or relative)").option("--today","Filter to items updated since local midnight today").option("--recent","Filter to items updated in the last 7 days").option("--updated-after <value>",'Filter by updated_at lower bound: ISO timestamp or signed relative (e.g. "-2h"/"-7d" for the past). "Changed since my last window" \u2192 --updated-after <ISO>').option("--updated-before <value>","Filter by updated_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-after <value>","Filter by created_at lower bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-before <value>","Filter by created_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--ids <value>","Filter by explicit item IDs (comma-separated or repeatable)").option("--assignee <value>","Filter by assignee",l).option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--parent <value>","Filter by parent item ID").option("--sprint <value>","Filter by sprint",l).option("--release <value>","Filter by release",l).option("--filter-ac-missing","Show only items missing acceptance_criteria").option("--filter-estimates-missing","Show only items missing estimated_minutes").option("--filter-resolution-missing","Show only terminal items missing resolution").option("--filter-metadata-missing","Show only items missing any tracked metadata (AC, estimate, or resolution)").option("--limit <n>","Limit returned item count").option("--offset <n>","Skip the first n matching rows before limit is applied").option("--after <cursor>","Continue after an opaque next_cursor from a previous list response").option("--no-truncate","Return every matched row after the explicit status and field filters").option("--include-body","Include item body in each returned list row").option("--strict-read","Fail closed if any item document or item directory cannot be read").option("--compact","Render compact list projection fields (mutually exclusive with --brief/--full/--fields)").option("--brief","Ultra-compact output: id, status, type, title only (agent-optimized, mutually exclusive with --compact/--full/--fields)").option("--full","Render full list projection fields (mutually exclusive with --compact/--brief/--fields)").option("--fields <value>",`Render custom comma-separated list fields (mutually exclusive with --compact/--brief/--full). ${v(n,"--fields")}`).option("--sort <value>","Sort field: priority|deadline|updated_at|created_at|title|parent (aliases: updated, created)").option("--order <value>","Sort order: asc|desc (requires --sort)").option("--tree","Render rows in parent/child tree order").option("--tree-depth <n>","Maximum recursion depth with --tree (0 keeps root rows only)").option("--format <value>","Output render mode: csv|table (human export) or json|ndjson|toon (machine output override)").option("--stream","Emit line-delimited JSON rows (requires --json)"),de(u),u.action(async(w,x)=>{await ge({name:n,status:a,excludeTerminal:o,dependencyBlocked:s,options:w,actionCommand:x,aliasContract:h})}),d(u,"--tags <value>","Alias for --tag"),d(u,"--assignee_filter <value>","Alias for --assignee-filter"),d(u,"--tree_depth <n>","Alias for --tree-depth"),d(u,"--token_budget <n>","Alias for --token-budget"),d(u,"--filter-estimate-missing","Alias for --filter-estimates-missing")}async function we(e,t){let n=y(t),i=Date.now(),a=await V($(e),n);m(a,n),n.profile&&f(`profile:command=aggregate took_ms=${Date.now()-i}`)}async function xe(e,t){let n=y(t),i=Date.now(),a=P(S("context",e)),o=await X(a,n),r=W(a,n);if(r==="markdown")n.quiet||g(`${K(o)}
4
- `);else if(r==="ndjson"){k(o);let s=I([...o.high_level,...o.low_level,...o.blocked_fallback]);!n.quiet&&s.length>0&&g(`${s}
5
- `)}else m(o,{...n,json:r==="json"});n.profile&&f(`profile:command=context took_ms=${Date.now()-i}`)}async function ke(e,t){let n=y(t),i=Date.now(),a=H(S("next",e)),o=await Z(a,n),r=Y(a,n);r==="markdown"?n.quiet||g(`${ee(o)}
6
- `):m(o,{...n,json:r==="json"}),n.profile&&f(`profile:command=next took_ms=${Date.now()-i}`)}async function Se(e,t,n){let i=y(n),a=Date.now(),o=B(e),r=S("search",t,[o]),s=U(r),h=await oe(o,{...s,mode:typeof s.mode=="string"&&s.mode.trim().length>0?s.mode:"keyword"},i),u=typeof r.format=="string"?r.format.trim().toLowerCase():void 0,w=_("Search",r.format,i,!0);if(u==="ndjson"){k(h);let x=I(h.items);!w.quiet&&x.length>0&&g(`${x}
7
- `)}else m(h,w);i.profile&&f(`profile:command=search took_ms=${Date.now()-a}`)}async function _e(e,t){let n=y(t),i=Date.now(),a=await ie({mode:typeof e.mode=="string"?e.mode:void 0,k:typeof e.k=="string"?e.k:void 0,failUnder:typeof e.failUnder=="string"?e.failUnder:void 0,queries:typeof e.queries=="string"?e.queries:void 0,format:typeof e.format=="string"?e.format:void 0},n);if(m(a,_("Eval",e.format,n)),n.profile&&f(`profile:command=eval took_ms=${Date.now()-i}`),!a.passed)throw new p(`Eval gate failed: aggregate nDCG@${a.k} ${a.aggregate.ndcg} is below --fail-under ${a.fail_under}`,c.GENERIC_FAILURE)}async function Ie(e,t,n){let i=y(n),a=Date.now(),o=S("get",t,[e]),r=await A(e,i,{depth:typeof o.depth=="string"?o.depth:void 0,fields:typeof o.fields=="string"?o.fields:void 0,full:!!o.full,tree:o.tree===!0,treeDepth:typeof o.treeDepth=="string"?o.treeDepth:typeof o.tree_depth=="string"?o.tree_depth:void 0,at:typeof o.at=="string"?o.at:void 0});m(r,_("Get",o.format,i)),i.profile&&f(`profile:command=get took_ms=${Date.now()-a}`)}async function Ae(e,t,n){let i=y(n),a=Date.now();if([t.compact,t.raw,t.full,t.provenance].filter(h=>h===!0).length>1)throw new p("History projection options are mutually exclusive. Use --compact, --provenance, or --full.",c.USAGE);let o=typeof t.field=="string"?t.field:void 0,r=!!t.strictExit||!!t.failOnWarn;if(r&&!t.verify)throw new p("--strict-exit requires --verify (it gates on the verification result).",c.USAGE);let s=await te(e,{limit:typeof t.limit=="string"?t.limit:void 0,compact:!(t.full===!0||t.provenance===!0),provenance:t.provenance===!0,provenanceSummary:t.provenanceSummary===!0,harness:b(t,"harness"),agentInstance:b(t,"agentInstance"),provenanceFilter:b(t,"provenanceFilter"),diff:!!t.diff||o!==void 0,field:o,verify:!!t.verify},i);m(s,_("History",t.format,i)),r&&s.verification&&!s.verification.ok&&(process.exitCode=c.GENERIC_FAILURE),i.profile&&f(`profile:command=history took_ms=${Date.now()-a}`)}function b(e,t){let n=e[t];return Array.isArray(n)?n:void 0}function Fe(e,t){let n=b(e,"harness"),i=b(e,"agentInstance"),a=b(e,"provenanceFilter"),o=typeof e.cursorMode=="string"?e.cursorMode:void 0;if(o!==void 0&&o!=="batch"&&o!=="row")throw new p("Events --cursor-mode must be batch or row.",c.USAGE,{code:"invalid_event_cursor_mode"});let r=o;return{pmRoot:t,since:typeof e.since=="string"?e.since:void 0,type:b(e,"type"),author:b(e,"author"),item:b(e,"item"),limit:typeof e.limit=="string"?Number(e.limit):void 0,full:e.full===!0,...e.provenance===!0?{provenance:!0}:{},...e.provenanceSummary===!0?{provenanceSummary:!0}:{},...n===void 0?{}:{harness:n},...i===void 0?{}:{agentInstance:i},...a===void 0?{}:{provenanceFilter:a},cursorMode:r}}async function De(e,t,n){if(t.provenanceSummary===!0)throw new p("Events --provenance-summary is bounded to one page and cannot be combined with --follow.",c.USAGE);let i=typeof t.intervalMs=="string"?Number(t.intervalMs):void 0;if(e.cursorMode==="row"){for await(let a of se({...e,intervalMs:i}))n||g(`${JSON.stringify(a)}
8
- `);return}for await(let a of re({...e,intervalMs:i}))n||g(`${F(a.events,{count:a.count,has_more:a.has_more,next_cursor:a.next_cursor??null,source:a.source,heartbeat:a.count===0})}
9
- `)}function Ee(e){return e.cursor_mode==="row"?I(e.events):F(e.events,{count:e.count,has_more:e.has_more,next_cursor:e.next_cursor??null,source:e.source,...e.provenance_summary===void 0?{}:{provenance_summary:e.provenance_summary}})}async function je(e,t){let n=y(t),i=Date.now(),a=Fe(e,n.path);if(e.follow===!0){await De(a,e,n.quiet===!0);return}let o=await ae(a);if(k(o),n.json){m(o,n),n.profile&&f(`profile:command=events took_ms=${Date.now()-i}`);return}let r=Ee(o);!n.quiet&&r.length>0&&g(`${r}
10
- `),n.profile&&f(`profile:command=events took_ms=${Date.now()-i}`)}async function Oe(e,t){let n=y(t),i=Date.now();if([e.raw,e.compact,e.full,e.provenance].filter(s=>s===!0).length>1)throw new p("Activity projection options are mutually exclusive. Use --raw, --compact, --provenance, or --full.",c.USAGE);let a=z(e.stream);if(a&&!n.json)throw new p("--stream requires --json output mode.",c.USAGE);let o=N(e),r=await T(a&&e.full!==!0&&e.provenance!==!0?{...o,raw:!0,compact:!0}:o,n);a?M(r,o,n):m(r,n),n.profile&&f(`profile:command=activity took_ms=${Date.now()-i}`)}async function Ce(e,t,n,i,a){let o=y(a),r=Date.now(),s=await q(e,t,n,{...Array.isArray(i.kind)?{kind:i.kind}:{},maxDepth:typeof i.maxDepth=="string"?i.maxDepth:void 0,limit:typeof i.limit=="string"?i.limit:void 0,after:typeof i.after=="string"?i.after:void 0,direction:typeof i.direction=="string"?i.direction:void 0,maxPaths:typeof i.maxPaths=="string"?i.maxPaths:void 0,sample:typeof i.sample=="string"?i.sample:void 0,...Array.isArray(i.exemptIsolate)?{exemptIsolate:i.exemptIsolate}:{},...Array.isArray(i.exemptIsolateType)?{exemptIsolateType:i.exemptIsolateType}:{},saveBaseline:i.saveBaseline===!0,rebuild:i.rebuild===!0,clear:i.clear===!0,summary:i.summary===!0,full:i.full===!0},o);m(s,o),o.profile&&f(`profile:command=graph took_ms=${Date.now()-r}`)}function wt(e,t){let n=t?.commandFilter,i=o=>pe(o,n),a=[{name:"list",description:"List active items with optional lifecycle-status and project filters.",excludeTerminal:!0,allowStatusFilter:!0},{name:"list-all",description:"List all items with optional filters.",excludeTerminal:!1,allowStatusFilter:!0},{name:"list-draft",description:"List draft items with optional filters.",status:"draft"},{name:"list-open",description:"List open items with optional filters.",status:"open",excludeTerminal:!1,allowStatusFilter:!1},{name:"list-in-progress",description:"List in-progress items with optional filters.",status:"in_progress",excludeTerminal:!1,allowStatusFilter:!1},{name:"list-blocked",description:"List blocked items (blocked status or open blocked_by dependencies, matching pm next) with optional filters.",dependencyBlocked:!0,excludeTerminal:!1,allowStatusFilter:!1},{name:"list-closed",description:"List closed items with optional filters.",status:"closed"},{name:"list-canceled",description:"List canceled items with optional filters.",status:"canceled"}];for(let o of a)if(i(o.name)){let r=E(o.name);be(e,{...o,...r?.registration==="commander"?{aliasContract:r}:{}})}if(i("aggregate")){let o=e.command("aggregate").description("Aggregate grouped item counts for governance queries.").option("--group-by <value>","Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)").option("--count","Return grouped counts (default behavior)").option("--completion","Add open/in_progress/closed/other counts and completion_pct per group").option("--sum <field>","Sum a numeric field per group").option("--avg <field>","Average a numeric field per group").option("--include-unparented","Include unparented rows when grouping by parent").option("--status <value>","Filter by item status").option("--type <value>","Filter by item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--deadline-before <value>","Filter by deadline upper bound (ISO/date string or relative)").option("--deadline-after <value>","Filter by deadline lower bound (ISO/date string or relative)").option("--assignee <value>","Filter by assignee").option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--parent <value>","Filter by parent item ID").option("--sprint <value>","Filter by sprint").option("--release <value>","Filter by release");d(o,"--include_unparented","Alias for --include-unparented"),d(o,"--assignee_filter <value>","Alias for --assignee-filter"),o.action(we)}if(i("context")){let o=e.command("context").alias("ctx").description("Show a token-efficient project context snapshot for next-work decisions.").option("--for <intent>",`Apply a declared context intent projection. ${v("context","--for")}`).option("--date <value>","Anchor date/time for agenda window calculations (ISO/date string or relative)").option("--from <value>","Agenda lower bound (ISO/date string or relative)").option("--to <value>","Agenda upper bound (ISO/date string or relative)").option("--past","Include past agenda entries in bounded windows").option("--type <value>","Filter by item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--assignee <value>","Filter by assignee").option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--sprint <value>","Filter by sprint").option("--release <value>","Filter by release").option("--parent <id>","Scope the snapshot to one item's subtree (the item plus all descendants)").option("--limit <n>","Limit focus and agenda rows per section").option("--after <cursor>","Continue ranked focus after a next_cursor from a previous context response").option("--format <value>","Context output format override: markdown|toon|json|ndjson").option("--depth <value>","Context depth: brief|standard|deep|full (full = every section, no per-section cap)").option("--section <value...>","Include specific sections (repeatable; overrides --depth)").option("--fields <value>","Project focus rows to a comma-separated field subset (e.g. id,title,priority)").option("--activity-limit <n>","Limit recent activity entries (default: settings or 10)").option("--stale-threshold <value>","Staleness cutoff in days (e.g. 7 or 7d; default: settings or 7)").option("--explain-ranking","Include the scorer model, per-signal contributions, and ranked candidate ids").option("--token-budget <n>","Maximum estimated tokens spent on ranked focus rows").option("--no-extension-health","Omit the installed extension health summary").option("--no-tags","Omit tag arrays from context focus rows");d(o,"--assignee_filter <value>","Alias for --assignee-filter"),d(o,"--max-items <n>","Alias for --limit"),d(o,"--explain_ranking","Alias for --explain-ranking"),d(o,"--token_budget <n>","Alias for --token-budget"),o.action(xe)}if(i("next")){let o=e.command("next").description("Recommend the next actionable (unblocked, ready) work item with rationale + blocked companion.").option("--for <intent>",`Apply a declared context intent projection. ${v("next","--for")}`).option("--type <value>","Filter candidate items by type").option("--tag <value>","Filter candidate items by tag").option("--priority <value>","Filter candidate items by priority").option("--assignee <value>","Filter candidate items by assignee").option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--sprint <value>","Filter candidate items by sprint").option("--release <value>","Filter candidate items by release").option("--parent <id>","Scope to one item's subtree (the item plus all descendants)").option("--limit <n>","Limit ready rows (default: 5; non-positive falls back to default)").option("--blocked-limit <n>","Limit blocked rows (default: same as --limit)").option("--ready-only","Omit the blocked companion list").option("--include-decisions","Include human-gated Decision items in the claimable ready queue").option("--include-gates","Include outcome gates in the ready queue").option("--include-containers","Include containers with unfinished descendants in the ready queue").option("--format <value>","Next output format override: markdown|toon|json").option("--explain-ranking","Include the scorer model, per-signal contributions, and ranked ready ids").option("--token-budget <n>","Maximum estimated tokens spent on the ranked ready queue");d(o,"--assignee_filter <value>","Alias for --assignee-filter"),d(o,"--blocked_limit <n>","Alias for --blocked-limit"),d(o,"--ready_only","Alias for --ready-only"),d(o,"--explain_ranking","Alias for --explain-ranking"),d(o,"--token_budget <n>","Alias for --token-budget"),o.action(ke)}if(i("search")){let o=e.command("search").argument("<keywords...>","Keyword query tokens").description("Search items with keyword, semantic, or hybrid retrieval. Inline field:value tokens (tag:/status:/type:/priority:) in the query are parsed as filters, e.g. 'auth tag:area:search status:open'.").option("--for <intent>",`Apply a declared context intent projection. ${v("search","--for")}`).option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--mode <value>","Search mode: keyword|semantic|hybrid (default: keyword)").option("--semantic","Shorthand for --mode semantic").option("--hybrid","Shorthand for --mode hybrid").option("--match-mode <value>","Token match mode: and|or|exact (default: or with all-terms ranking bonus; and = hard-require every token; exact = exact phrase)").option("--min-score <value>","Per-query minimum score threshold (finite number >= 0); overrides settings search.score_threshold for this query only").option("--count","Return only the count of matching items (post-filter/threshold, pre-limit); skips hit rows").option("--semantic-weight <value>","Override hybrid semantic weight for this query (0..1); invalid values fall back to settings").option("--include-linked","Include linked files, docs, and tests in the searchable corpus").option("--title-exact","Require exact normalized title match for the full query string").option("--phrase-exact","Require exact normalized phrase match in searchable text").option("--highlight","Emit per-field matched-text snippets (wrapped in \xAB\u2026\xBB) on each hit; off by default").option("--status <value>","Filter by status before query (all, open/closed/canceled aliases, or configured status id; CSV)").option("--type <value>","Filter by item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--deadline-before <value>","Filter by deadline upper bound (ISO/date string or relative)").option("--deadline-after <value>","Filter by deadline lower bound (ISO/date string or relative)").option("--updated-after <value>",'Filter by updated_at lower bound: ISO timestamp or signed relative (e.g. "-2h"/"-7d" for the past)').option("--updated-before <value>","Filter by updated_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-after <value>","Filter by created_at lower bound: ISO timestamp or signed relative (-2h/+1d)").option("--created-before <value>","Filter by created_at upper bound: ISO timestamp or signed relative (-2h/+1d)").option("--assignee <value>","Filter by assignee").option("--sprint <value>","Filter by sprint").option("--release <value>","Filter by release").option("--parent <value>","Filter by parent item ID").option("--compact","Render compact search hits (default; mutually exclusive with --full/--fields)").option("--full","Render full search hits with nested item payloads (mutually exclusive with --compact/--fields)").option("--fields <value>",`Render custom comma-separated search hit fields (mutually exclusive with --compact/--full). ${v("search","--fields")}`).option("--format <value>","Search output format override: json|ndjson|toon").option("--limit <n>","Limit returned item count").option("--after <cursor>","Continue after an opaque next_cursor from a previous search response");de(o),o.action(Se),d(o,"--tags <value>","Alias for --tag"),d(o,"--token_budget <n>","Alias for --token-budget")}if(i("eval")&&e.command("eval").description("Evaluate search relevance against a curated golden-query set: reports nDCG@k, MRR@k, precision@k, and recall@k per query plus the macro average. Use --fail-under as a CI gate.").option("--mode <value>","Default retrieval mode for queries without their own: keyword|semantic|hybrid (default: keyword)").option("--k <n>","Metric cutoff @k (positive integer; default: 10)").option("--fail-under <value>","Exit non-zero when aggregate nDCG@k falls below this threshold (0..1); CI gate").option("--queries <path>",`Query JSON (${ne}); default: search/eval-queries.json; errors show an example`).option("--format <value>","Eval output format override: json|toon").action(_e),i("get")){let o=e.command("get").argument("<id>","Item id").option("--for <intent>",`Apply a declared context intent projection. ${v("get","--for")}`).option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--depth <value>","Detail depth: brief|standard|deep|full (full aliases deep; default: standard)").option("--full","Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)").option("--fields <value>",`Render custom comma-separated item metadata fields. ${v("get","--fields")}`).option("--tree","Include descendants rooted at the requested item").option("--tree-depth <n>","Maximum subtree depth for --tree descendants").option("--at <version-or-timestamp>","Reconstruct a verified historical item state without mutating it").option("--format <value>","Get output format override: json|toon").description("Show item details by ID.").action(Ie);d(o,"--tree_depth <n>","Alias for --tree-depth"),d(o,"--token_budget <n>","Alias for --token-budget")}i("history")&&e.command("history").argument("<id>","Item id").option("--limit <n>","Return only the latest n history entries").option("--compact","Condensed output: show entry index, timestamp, op, author, patch count, and changed fields").option("--full","Show full history entries with JSON Patch payloads").option("--provenance","Show patch-free author, harness, instance, and extensible provenance").option("--provenance-summary","Include bounded provenance completeness counts").option("--harness <value>","Filter by recorded or vocabulary-resolved harness (repeatable)",l).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",l).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",l).option("--diff","Include per-entry field-level before/after value diffs computed by replaying the history chain").option("--field <name>","With --diff, show only entries that changed this field (implies --diff)").option("--verify","Verify hash chain and replay integrity for the full history stream").option("--strict-exit","With --verify, exit nonzero when verification fails (merge-safety gate parity with pm validate)").option("--fail-on-warn","Alias for --strict-exit").option("--format <value>","History output format override: json|toon").description("Show item history entries.").action(Ae),i("events")&&e.command("events").option("--since <cursor-or-timestamp>","Resume strictly after a durable cursor, or include events from an ISO timestamp").option("--type <value>","Filter by mutation operation (repeatable or comma-separated)",l).option("--author <value>","Filter by mutation author (repeatable or comma-separated)",l).option("--item <value>","Filter by item or workspace stream id (repeatable or comma-separated)",l).option("--limit <n>","Return at most 1,000 events (default: 100)").option("--cursor-mode <mode>","Cursor framing: batch emits one terminal trailer (default); row preserves one cursor per event").option("--full","Include each complete authoritative history entry").option("--provenance","Include patch-free author, harness, instance, and extensible provenance").option("--provenance-summary","Include bounded provenance completeness counts").option("--harness <value>","Filter by recorded or vocabulary-resolved harness (repeatable)",l).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",l).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",l).option("--follow","Continue emitting committed events as newline-delimited JSON").option("--interval-ms <n>","Empty-read delay while following (minimum: 10ms; default: 250ms)").description("Emit cursor-resumable committed mutation facts as newline-delimited JSON.").action(je),i("activity")&&e.command("activity").option("--id <value>","Filter by item ID").option("--op <value>","Filter by history operation").option("--author <value>","Filter by history author").option("--from <value>","Lower timestamp bound (ISO/date string or relative)").option("--to <value>","Upper timestamp bound (ISO/date string or relative)").option("--limit <n>","Return only the latest n activity entries").option("--unbounded","Explicitly return every matching activity entry (disables the default bound)").option("--compact","Condensed output: show only id, op, ts, author, msg per entry").option("--raw","Show the legacy compact per-event stream instead of the item digest").option("--full","Show full activity entries with JSON Patch payloads").option("--provenance","Show patch-free author, harness, instance, and extensible provenance").option("--provenance-summary","Include bounded provenance completeness counts").option("--harness <value>","Filter by recorded or vocabulary-resolved harness (repeatable)",l).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",l).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",l).option("--stream [mode]","Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl").description("Show recent activity across items.").action(Oe),i("graph")&&e.command("graph").argument("<subcommand>","Graph query (ancestors, descendants, predecessors, successors, paths, impact, analyze, audit, communities, redundancy, dominators, slack, centrality, articulation, plan, index)").argument("[id]","Root item id (traversals, paths, impact, and dominators)").argument("[target]","Target item id (paths only)").option("--kind <value>","Restrict traversal to registered relationship kinds (repeatable or comma-separated)",l).option("--max-depth <value>","Maximum traversal depth (non-negative integer)").option("--limit <value>","Maximum returned rows per bounded collection").option("--after <value>","Resume a traversal after this previously returned node id").option("--direction <value>","Edge orientation for paths/impact (outgoing, incoming, or both)").option("--max-paths <value>","Maximum enumerated paths (paths only)").option("--sample <value>","Maximum evidence sample entries per audit finding (audit only)").option("--exempt-isolate <value>","Item ids treated as explicitly valid isolates by the audit (repeatable or comma-separated)",l).option("--exempt-isolate-type <value>","Item types whose active isolates are policy-valid for the audit (repeatable or comma-separated)",l).option("--save-baseline","Persist the audit census as the change-since-baseline comparison point (audit only)").option("--rebuild","Rebuild and warm the durable graph index (index only)").option("--clear","Delete the durable graph index (index only)").option("--summary","Return counts-first envelopes without row collections").option("--full","Return the complete graph row projection").description("Bounded workspace relationship-graph queries, analytics, and governance audit.").action(Ce)}var xt={resolveReadCommandOutputFormat:_,parseListFormat:le};export{xt as _testOnlyRegisterListQuery,wt as registerListQueryCommands};
11
- //# sourceMappingURL=register-list-query-5JL52D33.js.map
@@ -1,20 +0,0 @@
1
- import{a as me,c as Xe,d as ye,f as Ye,g as Ze,h as Qe}from"./chunk-WI2AYPA7.js";import{B as He,C as ne,D as Be,E as Ue,F as Ge,G as qe,H as ze,I as Je,L as Ke,M as ae,N as re,O as se,P as le,Q as de,R as ue,ga as Vt,ha as zt,ia as Jt,ja as Kt,ka as Wt,la as Xt,ma as Yt,na as Zt,oa as Qt,pa as ce,ra as pe,sa as fe,ta as We}from"./chunk-BAX2BYUW.js";import"./chunk-JX4DH4WC.js";import"./chunk-OF76PSDQ.js";import"./chunk-QWRRFYK3.js";import{Ea as ee,Kc as je,Na as te,Oa as oe,Oc as Ve,Pa as ie,cc as Le,ha as Oe,kb as Fe,lb as Me,nb as Pe,ob as $e,pb as Ne}from"./chunk-WGAOYSYH.js";import{$ as Ot,I as ft,J as mt,K as yt,L as gt,M as ht,N as vt,O as bt,P as wt,Q as kt,R as At,S as St,T as _t,U as xt,V as Ct,W as Dt,X as Rt,Y as It,Z as Tt,_ as Et,aa as Ft,ba as Mt,ca as Pt,da as $t,ea as Nt,fa as Ht,ga as Lt,ha as Bt,ia as Ut,ja as Gt,ka as qt,la as jt,w as Q}from"./chunk-CKOL5U7J.js";import{ba as Te,k as W}from"./chunk-AZDFJGH6.js";import"./chunk-WYRZZ5ZE.js";import{$h as V,$n as w,An as F,Bi as pt,C as c,E as m,En as y,Fe as G,Ha as xe,Hk as K,Hn as u,In as s,Jf as j,Jn as A,Kk as Re,Kn as M,Mi as z,Nn as X,On as Y,Pn as Z,Qn as Ee,Te as q,Ya as O,a as Se,ch as k,ea as E,fh as f,gh as v,lk as J,ma as _e,mk as De,nd as U,od as Ce,qn as Ie,ud as D,zd as H}from"./chunk-QUWFABDM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0ac2cdcd-45da-5420-ba98-a49ecf54f75c")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d79c73c8-07a5-5a39-aca5-4058264684d6")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f439176a-7297-5235-b96a-3e393af8602b")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="51b91e68-4bd6-521d-926e-e3b03f4b4956")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e8b566c3-db93-54d7-a917-38bf317cb575")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d9bb2d77-9ea1-51f9-a186-a2c222a6fbb3")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="41658a2a-e730-5c0c-9783-70b30ee9b2fc")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="890d56e2-d85f-5d29-90b3-1d832210ea09")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2fa91bad-9a89-5c42-8b0f-dbcd2728c563")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="13a390ed-dac6-51bc-aeee-17f601e73282")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c916e9b2-d840-585e-b7e2-120b677c7498")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f3dbfd7a-f028-5927-b62d-2f078389f06d")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="49eb11f2-6d0e-59e6-9b7d-3a1515229879")}catch{}})();var P={};Se(P,{PROFILE_SUBCOMMANDS:()=>Vt,formatProfileApplyHuman:()=>Qt,formatProfileLintHuman:()=>Zt,formatProfileListHuman:()=>Xt,formatProfileShowHuman:()=>Yt,runProfileApply:()=>Wt,runProfileLint:()=>Kt,runProfileList:()=>zt,runProfileShow:()=>Jt});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="faf8a076-fe77-5017-b570-a49e7031ee0d")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bb095de1-0784-5659-9d73-91fd0a033c7d")}catch{}})();var $={};Se($,{SCHEMA_SUBCOMMANDS:()=>gt,_testOnlySchemaCommand:()=>jt,buildInvalidTypeHint:()=>pt,ensureTypeFolderScaffold:()=>bt,formatSchemaAddFieldHuman:()=>Ht,formatSchemaAddStatusHuman:()=>Ft,formatSchemaAddTypeHuman:()=>Et,formatSchemaApplyPresetHuman:()=>Gt,formatSchemaEvolutionMigrationHuman:()=>yt,formatSchemaInferTypesHuman:()=>qt,formatSchemaListFieldsHuman:()=>Bt,formatSchemaListHuman:()=>Pt,formatSchemaRemoveFieldHuman:()=>Lt,formatSchemaRemoveStatusHuman:()=>Mt,formatSchemaRemoveTypeHuman:()=>Ot,formatSchemaShowFieldHuman:()=>Ut,formatSchemaShowHuman:()=>$t,formatSchemaShowStatusHuman:()=>Nt,planSchemaEvolutionMigration:()=>ft,runSchemaAddField:()=>xt,runSchemaAddStatus:()=>wt,runSchemaAddType:()=>ht,runSchemaApplyPreset:()=>It,runSchemaEvolutionMigration:()=>mt,runSchemaInferTypes:()=>Tt,runSchemaList:()=>At,runSchemaListFields:()=>Dt,runSchemaRemoveField:()=>Ct,runSchemaRemoveStatus:()=>kt,runSchemaRemoveType:()=>vt,runSchemaShow:()=>St,runSchemaShowField:()=>Rt,runSchemaShowStatus:()=>_t});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="926afd8a-6d7c-503f-a82f-0ef1f4d66c85")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8052e529-7849-58b1-8ff2-94be44af3ca9")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c55461f3-15d7-51f4-9e41-f71ce693b7b8")}catch{}})();async function ge(e){typeof e.description=="string"&&e.description.trim()==="-"&&(e.description=await D().resolveValue(e.description,"--description")??"")}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3b23ded4-a821-5ff0-8783-927875d0457b")}catch{}})();async function eo(e,t,o,i){let n=y(i),r=await We(e,t,{status:typeof o.status=="string"?o.status:void 0,author:typeof o.author=="string"?o.author:n.author,message:typeof o.message=="string"?o.message:void 0,force:o.force===!0},n);await w(n,r),f(r,n)}async function to(e,t){let o=y(t),i=await D().resolveValue("-","--stdin-json");if(i===void 0||i.trim().length===0)throw new m("pm item mutate requires a non-empty JSON batch on stdin.",c.USAGE);let n=typeof e.transactionId=="string"?e.transactionId.trim():"";if(n.length===0)throw new m("pm item mutate requires --transaction-id <value>.",c.USAGE);let r=O(process.cwd(),o.path),a=await z(r),l=Xe(i,{transactionId:n,idPrefix:a.id_prefix}),{mutations:d,references:p}=l,h=me(e);if(e.dryRun===!0){f({transaction_id:n,dry_run:!0,mutation_count:d.length,mutations:d,references:p},o);return}let b=await Ye({pmRoot:r,transactionId:n,author:G(typeof e.author=="string"?e.author:o.author,a.author_default),mutations:d,...h});f({...b,mutation_count:d.length,references:p},o)}function oo(e,t){return typeof e=="string"&&e.trim().length>0?e.trim():typeof t=="string"?t.trim():""}async function io(e,t,o,i){let n=y(i),r=typeof o.transactionId=="string"?o.transactionId.trim():"";if(r.length===0)throw new m("pm item complete requires --transaction-id <value>.",c.USAGE);let a=oo(t,o.reason);if(a.length===0)throw new m("pm item complete requires a close reason.",c.USAGE);let d=Object.fromEntries(["file","doc","test","comment","note","learning"].filter(_=>o[_]!==void 0).map(_=>[_,o[_]])),p=o.force===!0,{lockTtlSeconds:h,lockWaitMs:b}=me(o),g={...typeof o.resolution=="string"?{resolution:o.resolution}:{},...typeof o.expectedResult=="string"?{expectedResult:o.expectedResult}:{},...typeof o.actualResult=="string"?{actualResult:o.actualResult}:{},...typeof o.completedAt=="string"?{completedAt:o.completedAt}:{},...typeof o.validateClose=="string"?{validateClose:o.validateClose}:{},...p?{force:!0}:{}},R={id:e,reason:a,...Object.keys(d).length===0?{}:{evidence:d},...Object.keys(g).length===0?{}:{closeOptions:g},...p?{releaseOptions:{force:!0}}:{}};if(o.dryRun===!0){let _=Ze(R);f({transaction_id:r,dry_run:!0,mutation_count:_.length,mutations:_},n);return}let S=O(process.cwd(),n.path),I=await Qe({pmRoot:S,transactionId:r,author:G(typeof o.author=="string"?o.author:n.author,(await z(S)).author_default),...R,lockTtlSeconds:h,lockWaitMs:b});f({...I,mutation_count:Object.keys(I.results).length},n)}function et(e){let t=e.commands.find(o=>o.name()==="item")??e.command("item").description("Run item lifecycle operations.");t.command("reopen <id> <reason>").option("--status <value>","Active target status: open or in_progress").option("--message <value>","Human-readable recurrence history message").option("--force","Override ownership or stale-lock conflicts").option("--author <value>","Mutation author").description("Reopen terminal work with recurrence evidence.").action(eo),t.command("mutate").requiredOption("--transaction-id <value>","Stable idempotency key used to resume an interrupted batch").option("--stdin-json","Read the JSON mutation array from stdin",!0).option("--dry-run","Validate and preview the batch without writing").option("--create-compensation <mode>","Created-item compensation policy: close or delete","close").option("--lock-ttl-seconds <n>","Workspace transaction lock lifetime in seconds").option("--lock-wait-ms <n>","Maximum time to wait for the workspace transaction lock").option("--author <value>","Mutation author").description("Apply SDK-backed mutations atomically.").action(to),t.command("complete <id> [reason]").requiredOption("--transaction-id <value>","Stable idempotency key for the composed completion").option("--reason <value>","Close reason when omitted positionally").option("--file <value>","Linked file evidence",u).option("--doc <value>","Linked documentation evidence",u).option("--test <value>","Linked test evidence",u).option("--comment <value>","Evidence comment",u).option("--note <value>","Completion note",u).option("--learning <value>","Durable completion learning",u).option("--resolution <value>","Structured resolution evidence").option("--expected-result <value>","Expected result evidence").option("--actual-result <value>","Actual result evidence").option("--completed-at <value>","Actual completion time").option("--validate-close <mode>","Close validation: off, warn, or strict").option("--lock-ttl-seconds <n>","Workspace transaction lock lifetime in seconds").option("--lock-wait-ms <n>","Maximum time to wait for the workspace transaction lock").option("--dry-run","Validate and preview completion without writing").option("--force","Override lifecycle and ownership conflicts").option("--author <value>","Completion author").description("Close with evidence and release the claim.").action(io)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2745d577-4f6c-5b9e-b54a-e1451e022d63")}catch{}})();async function no(e,t){let o=y(t),i=Array.isArray(e.event)?e.event:[],n=await Oe(O(process.cwd(),o.path),{historyEvent:i,allActionable:e.allActionable===!0,dryRun:e.dryRun===!0,planFingerprint:s(e,"planFingerprint"),limit:e.limit,attributedAuthor:s(e,"attributedAuthor"),reviewer:s(e,"reviewer"),reason:s(e,"reason")});f(n,o)}function tt(e){e.command("history-author-acknowledge").option("--event <item-id:line>","Unknown-author event coordinate (repeatable)",u).option("--all-actionable","Select all actionable events").option("--dry-run","Preview a deterministic source-bound plan").option("--plan-fingerprint <sha256>","Apply the exact fingerprint returned by --dry-run").option("--limit <n>","Maximum coordinate rows returned in the plan").option("--attributed-author <value>","Reviewed principal attribution").option("--reviewer <value>","Disposition reviewer").option("--reason <value>","Review evidence").description("Append audited dispositions for immutable unknown-author events.").action(no)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d436d524-7827-5ca7-8542-dd579813fae1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2d8a7e66-16e7-552f-b6d8-4cfbfb519a30")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6bbab815-17b8-5f27-8842-41d6132488b2")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8166a37c-7673-5ad4-a042-28ca34d65aa4")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="775518a4-ff3e-5a54-8fbd-b2c4863e23db")}catch{}})();function he(e,t,o,i){if(t.trim().toLowerCase()!=="add"||!o?.trim())return;let n=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),a=[e,o.trim()];n!==void 0?a.push("--add",n):i.stdin===!0?a.push("--stdin"):r!==void 0?a.push("--file",r):a.push("--add","-");let l=q(a),d=q([e,o.trim(),"--add","-"]);throw new m(`The positional token "add" was parsed as the item id, while "${o.trim()}" was parsed as annotation text. ${e} does not use an add subcommand.`,c.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${e}, then use --add for annotation text.`,examples:[...new Set([l,d])],recovery:{attempted_command:`pm ${e} add ${o.trim()}`,normalized_args:[e,"add",o.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:o.trim()}],suggested_retry:l}})}function ot(e,t,o){let i=o.flatMap(r=>{let a=s(t,r);return a===void 0?[]:[{alias:r,value:a}]});if([...new Set(i.map(({value:r})=>r))].length>1)throw new m(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:r})=>`--${r}`).join(", ")}`,c.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function ao(e,t){let o=typeof t.edit=="number"?t.edit:void 0,i=typeof t.delete=="number"?t.delete:void 0,n=ot("comment",t,["add","text","body","comment"]),r=typeof e=="string"?e:void 0,a=t.stdin===!0,l=s(t,"file");if(+(n!==void 0)+ +(r!==void 0)+Number(a)+ +(l!==void 0)>1)throw n!==void 0&&r!==void 0&&!a&&l===void 0?new m("Specify comment text either as positional [text] or with --add, not both",c.USAGE):new m("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",c.USAGE);let p=n??r;return{add:p,readFromStdin:a,readFromFile:l,editIndex:o,deleteIndex:i,isMutation:typeof p=="string"||a||l!==void 0||o!==void 0||i!==void 0}}function it(e,t,o){let i=ot(e,o,e==="note"?["add","text","note"]:["add","text"]),n=typeof t=="string"?t:void 0;if(i!==void 0&&n!==void 0)throw new m(`Specify ${e} text either as positional [text] or with --add, not both`,c.USAGE);let r=i??n,a=e==="note"?s(o,"addJson"):void 0,l=o.stdin===!0,d=s(o,"file"),p=typeof o.edit=="number"?o.edit:void 0,h=typeof o.delete=="number"?o.delete:void 0;return{add:r,addJson:a,readFromStdin:l,readFromFile:d,editIndex:p,deleteIndex:h,isMutation:typeof r=="string"||a!==void 0||l||d!==void 0||p!==void 0||h!==void 0}}async function ro(e,t,o,i){let n=y(i),r=Date.now();he("comments",e,t,o);let a=ao(t,o),l=await Ue(e,{add:a.add,stdin:a.readFromStdin,file:a.readFromFile,edit:a.editIndex,delete:a.deleteIndex,limit:s(o,"limit"),fullHistory:o.fullHistory===!0,ifAbsent:o.ifAbsent===!0,author:s(o,"author"),message:s(o,"message"),ownershipAppendBypass:o.ownershipAppendBypass===!0,force:!!o.force},n);a.isMutation&&l.changed!==!1&&await w(n,l),ve("comments",l,n,r)}async function so(e,t,o,i){let n=y(i),r=Date.now();he("notes",e,t,o);let a=it("note",t,o),l=await qe(e,{add:a.add,addJson:a.addJson,stdin:a.readFromStdin,file:a.readFromFile,edit:a.editIndex,delete:a.deleteIndex,limit:s(o,"limit"),since:s(o,"since"),eventType:s(o,"eventType"),includeMeta:o.includeMeta===!0,fullHistory:o.fullHistory===!0,ifAbsent:o.ifAbsent===!0,author:s(o,"author"),message:s(o,"message"),ownershipAppendBypass:o.ownershipAppendBypass===!0,force:!!o.force},n);a.isMutation&&l.changed!==!1&&await w(n,l),ve("notes",l,n,r)}async function lo(e,t,o,i){let n=y(i),r=Date.now();he("learnings",e,t,o);let a=it("learning",t,o),l=await Ge(e,{add:a.add,stdin:a.readFromStdin,file:a.readFromFile,edit:a.editIndex,delete:a.deleteIndex,limit:s(o,"limit"),fullHistory:o.fullHistory===!0,ifAbsent:o.ifAbsent===!0,author:s(o,"author"),message:s(o,"message"),ownershipAppendBypass:o.ownershipAppendBypass===!0,force:!!o.force},n);a.isMutation&&l.changed!==!1&&await w(n,l),ve("learnings",l,n,r)}function ve(e,t,o,i){f(t,o),o.profile&&v(`profile:command=${e} took_ms=${Date.now()-i}`)}function nt(e,t){let o=e.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",t("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",t("--delete")).option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(ro);A(o,"--body <text>","Alias for --add",!1),A(o,"--text <text>","Alias for --add",!1),A(o,"--comment <text>","Alias for --add",!1);let i=e.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",t("--edit")).option("--delete <index>","Delete the note at 1-based <index>",t("--delete")).option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(so);A(i,"--text <text>","Alias for --add",!1);let n=e.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",t("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",t("--delete")).option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(lo);A(n,"--text <text>","Alias for --add",!1)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="452f6689-f5bd-5398-915b-52ce7e2fd55e")}catch{}})();function be(e,t){return o=>{let i=Number(o);if(!Number.isInteger(i)||i<t)throw new m(`${e} must be an integer greater than or equal to ${t}.`,c.USAGE);return i}}async function uo(e,t,o){let i=y(o);if(t.scope!==void 0&&t.scope!=="project"&&t.scope!=="global")throw new m("--scope must be either project or global.",c.USAGE);let n=await $e({paths:e,scope:t.scope,limit:typeof t.limit=="number"?t.limit:void 0,offset:typeof t.offset=="number"?t.offset:void 0,noTruncate:t.noTruncate===!0,strictRead:t.strictRead===!0,explain:t.explain===!0,lineRange:typeof t.lines=="string"?Me(t.lines):void 0,decisionDepth:typeof t.decisionDepth=="number"?t.decisionDepth:void 0},i);f(n,i)}function at(e){e.command("lookup").argument("<paths...>","Project-relative or absolute source paths").option("--scope <scope>","Restrict links to project or global scope").option("--limit <n>","Maximum referencing items to return",be("--limit",1)).option("--offset <n>","Number of referencing items to skip",be("--offset",0)).option("--no-truncate","Return every referencing item").option("--strict-read","Fail when any authoritative item cannot be read").option("--explain","Include ranked source-to-work rationale").option("--lines <start:end>","Attribute an inclusive source line range").option("--decision-depth <n>","Maximum governing-decision relationship depth",be("--decision-depth",1)).description("Find and explain pm items that govern requested source paths.").action(uo)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2e6b30ea-5891-578a-9e6c-a612aa26361f")}catch{}})();var co=["add-","apply-","list-","remove-","show-"],po=new Set(["field","fields","help","status","statuses","type","types"]);function we(e){let t=e.trim(),o=t.toLowerCase();return o.length===0?!1:t[0]===o[0]||po.has(o)||co.some(i=>o.startsWith(i))}function L(e){if(e!=null){if(typeof e=="number"){if(!Number.isInteger(e))throw new m("--order must be a finite integer.",c.USAGE);return e}if(typeof e=="string"){if(e.trim().length===0)return;let t=Number(e);if(!Number.isInteger(t))throw new m("--order must be a finite integer.",c.USAGE);return t}throw new m("--order must be a finite integer.",c.USAGE)}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c9d736d1-58bf-5088-aaae-0b89ad61d41f")}catch{}})();var fo=new Set(_e.map(e=>e.toLowerCase())),mo=new Set(Ie.map(e=>e==="estimate"?"estimatedMinutes":e));function yo(e,t){let o=t.normalizedSubcommand;return o!=="rename-type"&&o!=="rename-field"&&o!=="remap-status"?null:e.runSchemaEvolutionMigration({kind:o,from:t.typeName,to:s(t.options,"to"),...o==="rename-field"&&typeof t.options.type=="string"?{type:t.options.type}:{}},{migrationId:s(t.options,"migrationId")??s(t.options,"migration_id"),dryRun:t.options.dryRun===!0,author:t.author,force:t.force},t.globalOptions)}function go(e,t){let{normalizedSubcommand:o,typeName:i,globalOptions:n,author:r,force:a}=t;switch(o){case"list":return e.runSchemaList(n);case"show":return e.runSchemaShow(i,n);case"show-status":return e.runSchemaShowStatus(i,n);case"list-fields":return e.runSchemaListFields(n);case"show-field":return e.runSchemaShowField(i,n);case"remove-type":return e.runSchemaRemoveType(i,{author:r,force:a},n);case"remove-field":return e.runSchemaRemoveField(i,{author:r,force:a},n);case"remove-status":return e.runSchemaRemoveStatus(i,{author:r,force:a},n);case"apply-preset":return e.runSchemaApplyPreset(i,{author:r,force:a},n);default:return null}}async function ho(e,t){let{normalizedSubcommand:o,typeName:i,options:n,globalOptions:r}=t,{author:a,force:l,description:d}=t,p=yo(e,t);if(p)return p;let h=go(e,t);if(h)return h;switch(o){case"add-field":return e.runSchemaAddField(i,{type:typeof n.type=="string"?n.type:void 0,commands:t.commands,description:d,cliFlag:typeof n.cliFlag=="string"?n.cliFlag:void 0,alias:t.aliases,required:!!n.required,requiredOnCreate:!!n.requiredOnCreate,allowUnset:n.allowUnset!==!1,requiredTypes:t.requiredTypes,author:a,force:l},r);case"add-status":return e.runSchemaAddStatus(i,{role:t.roles,alias:t.aliases,description:d,order:t.order,author:a,force:l},r);default:return n.infer===!0?e.runSchemaInferTypes({minCount:t.minCount,apply:!!n.apply,author:a,force:l},r):e.runSchemaAddType(i,{description:d,defaultStatus:t.defaultStatus,folder:typeof n.folder=="string"?n.folder:void 0,alias:t.aliases,author:a,force:l},r)}}function vo(e,t){if("migration_id"in t){k(`${e.formatSchemaEvolutionMigrationHuman(t)}
2
- `);return}switch(t.action){case"list":k(`${e.formatSchemaListHuman(t)}
3
- `);return;case"show":k(`${e.formatSchemaShowHuman(t)}
4
- `);return;case"show-status":k(`${e.formatSchemaShowStatusHuman(t)}
5
- `);return;case"list-fields":k(`${e.formatSchemaListFieldsHuman(t)}
6
- `);return;case"show-field":k(`${e.formatSchemaShowFieldHuman(t)}
7
- `);return;case"remove-type":k(`${e.formatSchemaRemoveTypeHuman(t)}
8
- `);break;case"remove-field":k(`${e.formatSchemaRemoveFieldHuman(t)}
9
- `);break;case"apply-preset":k(`${e.formatSchemaApplyPresetHuman(t)}
10
- `);break;case"infer-types":k(`${e.formatSchemaInferTypesHuman(t)}
11
- `);break;case"add-field":k(`${e.formatSchemaAddFieldHuman(t)}
12
- `);break;case"add-status":k(`${e.formatSchemaAddStatusHuman(t)}
13
- `);break;case"remove-status":k(`${e.formatSchemaRemoveStatusHuman(t)}
14
- `);break;default:k(`${e.formatSchemaAddTypeHuman(t)}
15
- `);break}t.warnings.length>0&&v(`schema ${t.action} warnings: ${X(t.warnings)}`)}async function bo(e,t,o,i,n){switch(t){case"list":return e.runProfileList();case"show":return e.runProfileShow(o);case"lint":return e.runProfileLint(o);default:return e.runProfileApply(o,{dryRun:i.dryRun===!0,author:typeof i.author=="string"?i.author:void 0,force:i.force===!0},n)}}function wo(e,t){switch(t.action){case"list":k(`${e.formatProfileListHuman(t)}
16
- `);return;case"show":k(`${e.formatProfileShowHuman(t)}
17
- `);return;case"lint":k(`${e.formatProfileLintHuman(t)}
18
- `);return;default:k(`${e.formatProfileApplyHuman(t)}
19
- `),t.warnings.length>0&&v(`profile apply warnings: ${X(t.warnings)}`);break}}function ko(e){return t=>{let o=Number(t);if(!Number.isInteger(o)||o<1)throw new m(`${e} must be a positive integer (1-based index).`,c.USAGE);return o}}function rt(e,t){e.option("--filter-has-notes",`Select only items that have notes before ${t}`).option("--filter-no-notes",`Select only items that have no notes before ${t}`).option("--filter-has-learnings",`Select only items that have learnings before ${t}`).option("--filter-no-learnings",`Select only items that have no learnings before ${t}`).option("--filter-has-files",`Select only items that have linked files before ${t}`).option("--filter-no-files",`Select only items that have no linked files before ${t}`).option("--filter-has-docs",`Select only items that have linked docs before ${t}`).option("--filter-no-docs",`Select only items that have no linked docs before ${t}`).option("--filter-has-tests",`Select only items that have linked tests before ${t}`).option("--filter-no-tests",`Select only items that have no linked tests before ${t}`).option("--filter-has-comments",`Select only items that have comments before ${t}`).option("--filter-no-comments",`Select only items that have no comments before ${t}`).option("--filter-has-deps",`Select only items that have dependencies before ${t}`).option("--filter-no-deps",`Select only items that have no dependencies before ${t}`).option("--filter-has-body",`Select only items that have a non-empty body before ${t}`).option("--filter-empty-body",`Select only items with an empty body before ${t}`).option("--filter-has-linked-command",`Select only items whose linked tests carry a runnable command before ${t}`).option("--filter-no-linked-command",`Select only items whose linked tests carry no runnable command before ${t}`).option("--filter-reviewer-missing",`Select only items missing reviewer before ${t}`).option("--filter-risk-missing",`Select only items missing risk before ${t}`).option("--filter-confidence-missing",`Select only items missing confidence before ${t}`).option("--filter-sprint-missing",`Select only items missing sprint before ${t}`).option("--filter-release-missing",`Select only items missing release before ${t}`)}var Ao=[["filterHasNotes","filterNoNotes","--filter-has-notes","--filter-no-notes"],["filterHasLearnings","filterNoLearnings","--filter-has-learnings","--filter-no-learnings"],["filterHasFiles","filterNoFiles","--filter-has-files","--filter-no-files"],["filterHasDocs","filterNoDocs","--filter-has-docs","--filter-no-docs"],["filterHasTests","filterNoTests","--filter-has-tests","--filter-no-tests"],["filterHasComments","filterNoComments","--filter-has-comments","--filter-no-comments"],["filterHasDeps","filterNoDeps","--filter-has-deps","--filter-no-deps"],["filterHasBody","filterEmptyBody","--filter-has-body","--filter-empty-body"],["filterHasLinkedCommand","filterNoLinkedCommand","--filter-has-linked-command","--filter-no-linked-command"]];function dt(e){let t=o=>e[o]===!0?!0:void 0;for(let[o,i,n,r]of Ao)if(e[o]===!0&&e[i]===!0)throw new m(`Cannot combine ${n} with ${r} for the same field.`,c.USAGE);return{filterReviewerMissing:t("filterReviewerMissing"),filterRiskMissing:t("filterRiskMissing"),filterConfidenceMissing:t("filterConfidenceMissing"),filterSprintMissing:t("filterSprintMissing"),filterReleaseMissing:t("filterReleaseMissing"),hasNotes:t("filterHasNotes"),hasLearnings:t("filterHasLearnings"),hasFiles:t("filterHasFiles"),hasDocs:t("filterHasDocs"),hasTests:t("filterHasTests"),hasComments:t("filterHasComments"),hasDeps:t("filterHasDeps"),hasBody:t("filterHasBody"),hasLinkedCommand:t("filterHasLinkedCommand"),noNotes:t("filterNoNotes"),noLearnings:t("filterNoLearnings"),noFiles:t("filterNoFiles"),noDocs:t("filterNoDocs"),noTests:t("filterNoTests"),noComments:t("filterNoComments"),noDeps:t("filterNoDeps"),emptyBody:t("filterEmptyBody"),noLinkedCommand:t("filterNoLinkedCommand")}}function ke(e,t){for(let o of t){let i=[],n=e.args,r=a=>(e.args!==n&&(i.length=0,n=e.args),i.push(a),i);o.required?e.requiredOption(o.option,o.description):o.repeatable?e.option(o.option,o.description,r):e.option(o.option,o.description);for(let a of o.aliasOptions??[])J(o.option,a.option)?A(e,a.option,a.description,o.repeatable===!0,o.repeatable?r:void 0):o.repeatable?e.option(a.option,a.description,r):e.option(a.option,a.description)}}function So(e){let t=o=>typeof e[o]=="string"?e[o]:void 0;return{type:t("filterType"),tag:t("filterTag"),priority:t("filterPriority"),deadlineBefore:t("filterDeadlineBefore"),deadlineAfter:t("filterDeadlineAfter"),updatedAfter:t("filterUpdatedAfter"),updatedBefore:t("filterUpdatedBefore"),createdAfter:t("filterCreatedAfter"),createdBefore:t("filterCreatedBefore"),ids:t("ids"),assignee:t("filterAssignee"),assigneeFilter:t("filterAssigneeFilter")??t("filterAssignee_filter"),parent:t("filterParent"),sprint:t("filterSprint"),release:t("filterRelease"),filterAcMissing:e.filterAcMissing===!0?!0:void 0,filterEstimatesMissing:e.filterEstimatesMissing===!0||e.filterEstimateMissing===!0?!0:void 0,filterResolutionMissing:e.filterResolutionMissing===!0?!0:void 0,filterMetadataMissing:e.filterMetadataMissing===!0?!0:void 0,...dt(e),limit:t("limit"),offset:t("offset"),includeBody:!0}}function T(...e){for(let t of e)if(typeof t=="string")return t}function Ae(e){if(Array.isArray(e))return e;if(typeof e=="string")return[e]}function _o(e,t,o){return typeof t=="string"&&t.length>0?{positionalType:e,positionalTitle:t}:typeof e!="string"||e.length===0?{positionalType:void 0,positionalTitle:void 0}:typeof o.title=="string"&&o.title.trim().length>0&&o.type===void 0?{positionalType:e,positionalTitle:void 0}:{positionalType:void 0,positionalTitle:e}}function xo(e,t,o){if(e!==void 0||typeof t!="string"||t.length===0||o.title!==void 0||o.type!==void 0||!fo.has(t.trim().toLowerCase()))return;let i=t.trim();throw new m(`pm create needs a title \u2014 "${i}" looks like an item type, not a title. Use either: pm create ${i} "<title>" or pm create "<title>" --type ${i}.`,c.USAGE,{code:"create_positional_type_without_title",why:'Without this guard the single positional is used as the title and the type defaults to Task \u2014 so the command would silently create a Task literally titled "'+i+'".',examples:[`pm create ${i} "Wire up SSO for the agent harness"`,`pm create "Wire up SSO for the agent harness" --type ${i}`],nextSteps:[`Re-run with both type and title: pm create ${i} "<title>"`]})}var Co=["body","bodyFile","description","dep","depRemove","comment","note","learning","file","test","doc","reminder","event","typeOption","field","ids"];function B(e){let t=Co.flatMap(o=>{let i=e[o],n=typeof i=="string"&&i.trim()==="-"?1:Array.isArray(i)?i.filter(a=>typeof a=="string"&&a.trim()==="-").length:0,r=`--${o.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`)}`;return Array.from({length:n},()=>r)});if(e.stdinJson===!0&&t.unshift("--stdin-json"),t.length>1)throw new m(`Only one option may consume stdin per command invocation. Found: ${t.join(", ")}.`,c.USAGE)}function ut(e,t,o){let i=[];t&&i.push("body"),o&&i.push("description"),Ce(e,i)}function ct(e,t){return!t&&typeof e.description=="string"&&e.description.trim()==="-"}async function Do(e,t,o,i){let n=y(i),r=Date.now();B(o);let a=o.stdinJson===!0;if(a){let g=await D().resolveValue("-","--stdin-json");o=ye(g??"","create",o)}let l=_o(e,t,o);xo(l.positionalType,l.positionalTitle,o),typeof l.positionalType=="string"&&l.positionalType.length>0&&o.type===void 0&&(o.type=l.positionalType),typeof l.positionalTitle=="string"&&l.positionalTitle.length>0&&o.title===void 0&&(o.title=l.positionalTitle);let d=ct(o,a);a||await ge(o);let p=typeof o.bodyFile=="string";p&&(o.body=await V(String(o.bodyFile),o.body!==void 0?String(o.body):void 0),delete o.bodyFile);let h=Y(o,{requireType:!1});ut(h,p,d),a&&U(h);let b=await je(h,n);await w(n,b),f(b,n),n.profile&&v(`profile:command=create took_ms=${Date.now()-r}`)}function Ro(e){return{type:s(e,"filterType"),tag:s(e,"filterTag"),priority:s(e,"filterPriority"),deadlineBefore:s(e,"filterDeadlineBefore"),deadlineAfter:s(e,"filterDeadlineAfter"),updatedAfter:s(e,"filterUpdatedAfter"),updatedBefore:s(e,"filterUpdatedBefore"),createdAfter:s(e,"filterCreatedAfter"),createdBefore:s(e,"filterCreatedBefore"),ids:s(e,"ids"),assignee:s(e,"filterAssignee"),assigneeFilter:T(e.filterAssigneeFilter,e.filterAssignee_filter),parent:s(e,"filterParent"),sprint:s(e,"filterSprint"),release:s(e,"filterRelease"),...dt(e),limit:s(e,"limit"),offset:s(e,"offset")}}async function Io(e,t){let o=y(t),i=Date.now();B(e),e.ids=await H(s(e,"ids"));let n=await Be({status:s(e,"filterStatus"),list:Ro(e),reason:s(e,"reason"),completedAt:s(e,"completedAt"),resolution:s(e,"resolution"),expectedResult:T(e.expectedResult,e.expected_result,e.expected),actualResult:T(e.actualResult,e.actual_result,e.actual),validateClose:e.validateClose===!0?"warn":s(e,"validateClose"),author:s(e,"author"),message:s(e,"message"),force:!!e.force,dryRun:e.dryRun===!0?!0:void 0,rollback:s(e,"rollback"),checkpoint:e.checkpoint===!1?!1:void 0},o);await w(o,n),f(n,o),o.profile&&v(`profile:command=close-many took_ms=${Date.now()-i}`)}async function To(e,t){let o=y(t),i=Date.now();B(e),e.ids=await H(s(e,"ids"));let n=await ze({status:s(e,"filterStatus"),list:So(e),update:Z(Ee(e)),dryRun:e.dryRun===!0?!0:void 0,rollback:s(e,"rollback"),checkpoint:e.checkpoint===!1?!1:void 0},o);await w(o,n),f(await F("update-many",[],e,o,n),o),o.profile&&v(`profile:command=update-many took_ms=${Date.now()-i}`)}async function Eo(e,t,o,i){let n=y(i),r=Date.now(),a=typeof o.reason=="string"&&o.reason.trim().length>0&&o.reason||typeof o.closeReason=="string"&&o.closeReason.trim().length>0&&o.closeReason||void 0,l=typeof t=="string"&&t.length>0?t:a,d=await Le(e,l,{author:s(o,"author"),message:s(o,"message"),validateClose:o.validateClose===!0?"warn":s(o,"validateClose"),force:!!o.force,duplicateOf:s(o,"duplicateOf"),completedAt:s(o,"completedAt"),resolution:s(o,"resolution"),expectedResult:T(o.expectedResult,o.expected_result,o.expected),actualResult:T(o.actualResult,o.actual_result,o.actual)},n);await w(n,d),f(d,n),n.profile&&v(`profile:command=close took_ms=${Date.now()-r}`)}function Oo(e){let t={...e},o=[["blocked_by","blockedBy"],["resume_context","resumeContext"],["from_search","fromSearch"],["step_title","stepTitle"],["step_body","stepBody"],["step_owner","stepOwner"],["step_status","stepStatus"],["step_evidence","stepEvidence"],["step_blocked_reason","stepBlockedReason"],["step_replacement","stepReplacement"],["depends_on","dependsOn"],["link_kind","linkKind"],["link_note","linkNote"],["promote_to_item_dep","promoteToItemDep"],["allow_multiple_active","allowMultipleActive"],["decision_text","decisionText"],["decision_rationale","decisionRationale"],["decision_evidence","decisionEvidence"],["discovery_text","discoveryText"],["validation_text","validationText"],["validation_command","validationCommand"],["validation_expected","validationExpected"],["materialize_type","materializeType"],["materialize_parent","materializeParent"],["materialize_tags","materializeTags"]];for(let[n,r]of o)t[n]!==void 0&&t[r]===void 0&&(t[r]=t[n]);let i=Y(t,{requireType:!1});return i.blockedBy=t.blockedBy,i}function Fo(e,t){if(!e)throw new m(`pm plan requires a subcommand. Allowed: ${t.join(", ")}`,c.USAGE,{code:"missing_required_argument",examples:['pm plan create --title "Refactor lock retry"',"pm plan show pm-a1b2 --depth standard",'pm plan add-step pm-a1b2 --step-title "Read lock.ts"']});if(t.includes(e))return;throw E({command_path:"plan",token:e,allowed:t,examples:e==="list"||e==="ls"?["pm list --type Plan","pm list-all --type Plan"]:void 0,retry_command:e==="list"||e==="ls"?"pm list --type Plan":void 0})}function Mo(e,t){if(e!=="reorder-step"||typeof t!="string")return;let o=Number.parseInt(t,10);if(!Number.isFinite(o))throw new m(`reorder-step requires an integer new order, got "${t}"`,c.USAGE);return o}async function Po(e,t,o,i,n,r){let a=y(r),l=Date.now(),d=(e??"").trim().toLowerCase();Fo(d,Je);let p=Oo(n),h=Mo(d,i),b=d==="create"&&typeof t=="string"&&t.length>0&&p.title===void 0?void 0:t;b===void 0&&typeof t=="string"&&t.length>0&&(p.title=t);let g=await Ke({subcommand:d,id:b,stepRef:o,reorderTo:h,options:p,global:a});await w(a,g),f(g,a),a.profile&&v(`profile:command=plan took_ms=${Date.now()-l}`)}function st(e,t){if(typeof e=="string"){if(!/^\d+$/.test(e.trim()))throw new m(`history-compact ${t} must be a non-negative integer.`,c.USAGE);return Number.parseInt(e,10)}}async function $o(e,t,o){if(e!==void 0)throw new m("merge reconcile takes no positional arguments.",c.USAGE);let i=await ue({dryRun:t.dryRun===!0,force:t.force===!0,message:typeof t.message=="string"?t.message:void 0,author:o.author},o);f(i,o),i.ok||(process.exitCode=c.GENERIC_FAILURE)}async function No(e,t,o,i,n,r){if(e===void 0||t===void 0||o===void 0||i===void 0)throw new m("merge driver requires <artifact> <base> <ours> <theirs> (git supplies %O %A %B). Example: pm merge driver history %O %A %B",c.USAGE);let a=await de({artifact:e,basePath:t,oursPath:o,theirsPath:i,outputPath:typeof n.output=="string"?n.output:void 0,itemPath:typeof n.itemPath=="string"?n.itemPath:void 0,prefer:typeof n.prefer=="string"?n.prefer:void 0},r);f(a,r),a.ok||(process.exitCode=c.GENERIC_FAILURE)}async function Ho(e,t,o,i,n,r,a){let l=y(a),d=Date.now();switch(e.trim().toLowerCase()){case"install":{if(t!==void 0)throw new m("merge install takes no positional arguments.",c.USAGE);let h=await Q({dryRun:r.dryRun===!0},l);f(h,l);break}case"reconcile":await $o(t,r,l);break;case"report":{if(t!==void 0)throw new m("merge report takes no positional arguments.",c.USAGE);let h=await ee({includeReconciled:r.includeReconciled===!0});f(h,l),h.ok||(process.exitCode=c.GENERIC_FAILURE);break}case"driver":await No(t,o,i,n,r,l);break;default:throw E({command_path:"merge",token:e,allowed:j,display_name:"merge"})}l.profile&&v(`profile:command=merge took_ms=${Date.now()-d}`)}async function Lo(e,t,o){let i=y(o),n=Date.now(),r=await H(s(t,"ids")),a=r===void 0?void 0:De(r),l=st(t.allOver,"--all-over"),d=st(t.minEntries,"--min-entries");if(t.closed===!0&&t.allStreams===!0)throw new m("history-compact: --closed and --all-streams are mutually exclusive; pick one lifecycle scope.",c.USAGE);let p=t.closed===!0?"closed":t.allStreams===!0?"all-streams":void 0;if((a!==void 0||l!==void 0||p!==void 0)&&typeof t.before=="string")throw new m("history-compact: --before applies only in single-id mode (bulk mode always compacts full streams).",c.USAGE);if(pe(e,{ids:a,allOver:l,scope:p}),e===void 0){let b=await fe({ids:a,scope:p,allOver:l,minEntries:d,dryRun:t.dryRun===!0,author:s(t,"author"),message:s(t,"message"),force:!!t.force},i);f(b,i),b.totals.items_errored>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let b=await ce(e,{before:s(t,"before"),dryRun:t.dryRun===!0,author:s(t,"author"),message:s(t,"message"),force:!!t.force},i);f(b,i)}i.profile&&v(`profile:command=history-compact took_ms=${Date.now()-n}`)}function lt(e){if(Array.isArray(e))return e.flatMap(t=>t.split(",")).map(t=>t.trim()).filter(t=>t.length>0)}async function Bo(e,t,o,i){let n=y(i),r=Date.now(),{SCHEMA_SUBCOMMANDS:a}=$,l=(e??"").trim().toLowerCase(),d=t;if(Uo(l,a),!a.includes(l)&&d===void 0&&!we(e)&&(d=e,l="add-type"),!a.includes(l))throw E({command_path:"schema",token:l,allowed:a});let p=await ho($,{normalizedSubcommand:l,typeName:d,options:o,aliases:Ae(o.alias),roles:Ae(o.role),commands:lt(o.commands),requiredTypes:lt(o.requiredTypes),defaultStatus:T(o.defaultStatus,o.default_status),order:L(o.order),minCount:L(o.minCount),author:s(o,"author"),force:!!o.force,description:s(o,"description"),globalOptions:n});n.json===!0||n.defaultOutputFormat==="json"?f(p,n):n.quiet||vo($,p),n.profile&&v(`profile:command=schema took_ms=${Date.now()-r}`)}function Uo(e,t){if(!e)throw new m(`pm schema requires a subcommand. Allowed: ${t.join(", ")}`,c.USAGE,{code:"missing_required_argument",examples:["pm schema list","pm schema show Task","pm schema show-status open",'pm schema add-type Spike --description "Time-boxed investigation" --default-status open',"pm schema remove-type Spike","pm schema add-status review --role active --alias in_review","pm schema remove-status review","pm schema add-field severity_level --type string --commands create,update","pm schema list-fields","pm schema apply-preset agile","pm schema add-type --infer --min-count 10","pm schema rename-type Spike --to Experiment --migration-id spike-v2 --dry-run","pm schema rename-field severity --to impact --migration-id severity-v2","pm schema remap-status review --to verifying --migration-id review-v2"]})}async function Go(e,t,o){let i=y(o),n=Date.now(),r=await ae(e,{title:s(t,"title"),author:s(t,"author"),message:s(t,"message"),allowDuplicate:t.allowDuplicate===!0},i);await w(i,r),f(r,i),i.profile&&v(`profile:command=copy took_ms=${Date.now()-n}`)}async function qo(e,t,o){let i=y(o),n=Date.now(),r=await se(e,{clear:t.clear===!0},i);f(r,i),i.profile&&v(`profile:command=focus took_ms=${Date.now()-n}`)}async function jo(e,t,o){let i=y(o),n=Date.now();B(t);let r=t.stdinJson===!0;if(r){let h=await D().resolveValue("-","--stdin-json");t=ye(h??"","update",t)}let a=ct(t,r);r||await ge(t);let l=typeof t.bodyFile=="string";l&&(t.body=await V(String(t.bodyFile),t.body!==void 0?String(t.body):void 0),delete t.bodyFile);let d=Z(t);ut(d,l,a),r&&U(d);let p=await Ve(e,d,i);await w(i,p),f(await F("update",[e],t,i,p),i),i.profile&&v(`profile:command=update took_ms=${Date.now()-n}`)}async function Vo(e,t,o){let i=y(o),n=Date.now(),r=await re(e,{author:s(t,"author"),message:s(t,"message"),force:!!t.force,dryRun:t.dryRun===!0},i);r.dry_run!==!0&&await w(i,r),f(r,i),i.profile&&v(`profile:command=delete took_ms=${Date.now()-n}`)}function zo(e,t){let o=s(t,"body"),i=s(t,"text"),n=typeof e=="string"?e:void 0;if([o,i,n].filter(l=>l!==void 0).length>1)throw new m("Specify append text with exactly one source: positional [text], --body, or --text",c.USAGE);let a=o??i??n;if(a===void 0)throw new m("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).",c.USAGE);return a}async function Jo(e,t,o,i){let n=y(i),r=Date.now(),a=await He(e,{body:zo(t,o),author:s(o,"author"),message:s(o,"message"),force:!!o.force},n);await w(n,a),f(a,n),n.profile&&v(`profile:command=append took_ms=${Date.now()-r}`)}async function Ko(e,t,o,i){let n=y(i),r=Date.now(),a=await ne(e,t,{author:s(o,"author"),message:s(o,"message"),force:!!o.force},n);await w(n,a),f(a,n),n.profile&&v(`profile:command=restore took_ms=${Date.now()-r}`)}async function Wo(e,t,o,i){let n=y(i),r=Date.now(),{PROFILE_SUBCOMMANDS:a}=P,l=(e??"").trim().toLowerCase();if(!l)throw new m(`pm profile requires a subcommand. Allowed: ${a.join(", ")}`,c.USAGE,{code:"missing_required_argument",examples:["pm profile list","pm profile show agile","pm profile apply agile --dry-run","pm profile lint agile"]});if(!a.includes(l))throw E({command_path:"profile",token:l,allowed:a});let d=await bo(P,l,t,o,n);n.json===!0||n.defaultOutputFormat==="json"?f(d,n):n.quiet||wo(P,d),d.action==="lint"&&!d.ok&&(process.exitCode=c.GENERIC_FAILURE),n.profile&&v(`profile:command=profile took_ms=${Date.now()-r}`)}function C(e,t){return Ae(e[t])??[]}async function Xo(e,t,o){let i=y(o),n=Date.now(),r=C(t,"add"),a=C(t,"addGlob"),l=C(t,"remove"),d=C(t,"migrate"),p=await Pe(e,{add:r,addGlob:a,remove:l,migrate:d,note:s(t,"note"),list:!!t.list,appendStable:!!t.appendStable,validatePaths:!!t.validatePaths,author:s(t,"author"),message:s(t,"message"),force:!!t.force},i);(r.length>0||a.length>0||l.length>0||d.length>0)&&await w(i,p),f(await F("files",[e],t,i,p),i),i.profile&&v(`profile:command=files took_ms=${Date.now()-n}`)}async function Yo(e,t,o){let i=y(o),n=Date.now(),r={...o.optsWithGlobals(),...t},a=await Ne(e,{apply:!!r.apply,note:s(r,"note"),appendStable:!!r.appendStable,author:s(r,"author"),message:s(r,"message"),force:!!r.force},i);a.changed&&await w(i,a),f(a,i),i.profile&&v(`profile:command=files.discover took_ms=${Date.now()-n}`)}async function Zo(e,t,o){let i=y(o),n=Date.now(),r=C(t,"add"),a=C(t,"addGlob"),l=C(t,"remove"),d=C(t,"migrate"),p=await Fe(e,{add:r,addGlob:a,remove:l,migrate:d,note:s(t,"note"),list:!!t.list,validatePaths:!!t.validatePaths,author:s(t,"author"),message:s(t,"message"),force:!!t.force},i);(r.length>0||a.length>0||l.length>0||d.length>0)&&await w(i,p),f(await F("docs",[e],t,i,p),i),i.profile&&v(`profile:command=docs took_ms=${Date.now()-n}`)}async function Qo(e,t,o){let i=y(o),n=Date.now(),r=await Te(e,{format:t.format,maxDepth:s(t,"maxDepth"),collapse:t.collapse,summary:t.summary===!0,full:t.full===!0,nodeLimit:s(t,"nodeLimit"),edgeLimit:s(t,"edgeLimit"),tokenBudget:s(t,"tokenBudget"),cursor:s(t,"cursor"),direction:s(t,"direction"),...Array.isArray(t.kind)?{kind:t.kind}:{}},i);f(r,i),i.profile&&v(`profile:command=deps took_ms=${Date.now()-n}`)}function Xn(e,t={}){let o=e.command("create").argument("[type-or-title]",'Item title, or item type when a title follows (e.g. `pm create task "Fix bug"`)').argument("[title]","Item title when the first argument is an item type").description("Create a new project management item.");if(ke(o,K),o.option("--stdin-json","Read a full item JSON document from stdin; explicit flags override document values").option("--body-file <path>","Load body from a file or stdin (-); conflicts with --body").option("--clear-deps","Clear dependency entries").option("--clear-comments","Clear comments").option("--clear-notes","Clear notes").option("--clear-learnings","Clear learnings").option("--clear-files","Clear linked files").option("--clear-tests","Clear linked tests").option("--clear-docs","Clear linked docs").option("--clear-reminders","Clear reminders").option("--clear-events","Clear events").option("--clear-type-options","Clear type options").option("--allow-duplicate","Explicitly create even when strict similarity governance finds likely duplicates").action(Do),t.targetCommandName==="create")return;e.command("copy").argument("<id>","Source item id").option("--title <value>","Optional title override for the copied item").option("--author <value>","Mutation author").option("--message <value>","History message").option("--allow-duplicate","Explicitly copy even when strict similarity governance finds likely duplicates").description("Copy an item into a new item id while resetting lifecycle fields.").action(Go),e.command("focus").argument("[id]","Item id to focus (omit to show current focus)").option("--clear","Clear the focused item").description("Set/clear/show the session focused item that new items default --parent to.").action(qo);let i=e.command("update").argument("<id>","Item id").description("Update item fields and metadata.");ke(i,Re),i.option("--stdin-json","Read a full item JSON document from stdin; explicit flags override document values").option("--body-file <path>","Load body from a file or stdin (-); conflicts with --body").option("--replace-deps","Atomically replace dependency entries with the provided --dep values").option("--replace-tests","Atomically replace linked test entries with the provided --test values").option("--replace-files","Atomically replace linked file entries with the provided --file values").option("--replace-docs","Atomically replace linked doc entries with the provided --doc values").option("--clear-deps","Clear dependency entries").option("--clear-comments","Clear comments").option("--clear-notes","Clear notes").option("--clear-learnings","Clear learnings").option("--clear-files","Clear linked files").option("--clear-tests","Clear linked tests").option("--clear-docs","Clear linked docs").option("--clear-reminders","Clear reminders").option("--clear-events","Clear events").option("--clear-type-options","Clear type options").option("--force","Force ownership override"),i.action(jo),et(e);let n=e.command("update-many").description("Bulk-update matched items with dry-run plans and rollback checkpoints.").option("--filter-status <value>","Filter by status before applying updates").option("--filter-type <value>","Filter by item type before applying updates").option("--filter-tag <value>","Filter by tag before applying updates").option("--filter-priority <value>","Filter by priority before applying updates").option("--filter-deadline-before <value>","Filter by deadline upper bound before applying updates").option("--filter-deadline-after <value>","Filter by deadline lower bound before applying updates").option("--filter-updated-after <value>","Filter by updated_at lower bound before applying updates (ISO/relative)").option("--filter-updated-before <value>","Filter by updated_at upper bound before applying updates (ISO/relative)").option("--filter-created-after <value>","Filter by created_at lower bound before applying updates (ISO/relative)").option("--filter-created-before <value>","Filter by created_at upper bound before applying updates (ISO/relative)").option("--filter-assignee <value>","Filter by assignee before applying updates").option("--filter-assignee-filter <value>","Filter assignee presence: assigned|unassigned before applying updates").option("--filter-parent <value>","Filter by parent item ID before applying updates").option("--filter-sprint <value>","Filter by sprint before applying updates").option("--filter-release <value>","Filter by release before applying updates").option("--filter-ac-missing","Select only items missing acceptance_criteria (bulk backfill)").option("--filter-estimates-missing","Select only items missing estimated_minutes (bulk backfill)").option("--filter-resolution-missing","Select only terminal items missing resolution (bulk backfill)").option("--filter-metadata-missing","Select only items missing any tracked metadata (AC, estimate, or resolution)");rt(n,"applying updates"),n.option("--ids <value>","Explicit ID allowlist: comma/newline text, - stdin, or @path file").option("--limit <n>","Limit matched item count before apply/preview").option("--offset <n>","Skip first n matched rows before apply/preview").option("--dry-run","Preview per-item diffs and checkpoint intent without mutating").option("--rollback <value>","Rollback a prior update-many checkpoint ID").option("--no-checkpoint","Disable checkpoint creation during apply mode").option("--title, -t <value>","Set title").option("--description, -d <value>","Set description").option("--body, -b <value>","Set body (allow empty string)").option("--status, -s <value>","Set status (use close command for closed)").option("--priority, -p <value>","Set priority").option("--type <value>","Set type").option("--tags <value>","Set comma-separated tags (replaces existing). Use --add-tags / --remove-tags to mutate additively.").option("--add-tags <value>","Add tags additively without replacing existing (repeatable; CSV accepted)",u).option("--remove-tags <value>","Remove tags from the existing list (repeatable; CSV accepted)",u).option("--deadline <value>","Set deadline (ISO/date string or relative)").option("--estimate, --estimated-minutes <value>","Set estimated minutes").option("--acceptance-criteria <value>","Set acceptance criteria").option("--ac <value>","Alias for --acceptance-criteria").option("--add-ac <value>","Add one semicolon-free acceptance criterion without replacing the existing list (repeatable)",u).option("--remove-ac <value>","Remove one semicolon-free acceptance criterion by exact text match (repeatable)",u).option("--definition-of-ready <value>","Set definition of ready").option("--order <value>","Set planning order/rank integer").option("--rank <value>","Alias for --order").option("--goal <value>","Set goal identifier").option("--objective <value>","Set objective identifier").option("--value <value>","Set business value summary").option("--impact <value>","Set business impact summary").option("--outcome <value>","Set expected outcome summary").option("--why-now <value>","Set why-now rationale").option("--assignee <value>","Set assignee").option("--parent <value>","Set parent item ID").option("--reviewer <value>","Set reviewer").option("--risk <value>","Set risk level").option("--confidence <value>","Set confidence level").option("--sprint <value>","Set sprint identifier").option("--release <value>","Set release identifier").option("--blocked-by <value>","Set blocked-by item ID or reason").option("--blocked-reason <value>","Set blocked reason").option("--unblock-note <value>","Set unblock rationale note").option("--reporter <value>","Set issue reporter").option("--severity <value>","Set issue severity").option("--environment <value>","Set issue environment context").option("--repro-steps <value>","Set issue reproduction steps").option("--resolution <value>","Set issue resolution summary").option("--expected-result <value>","Set issue expected behavior").option("--expected <value>","Short alias for --expected-result").option("--actual-result <value>","Set issue observed behavior").option("--actual <value>","Short alias for --actual-result").option("--affected-version <value>","Set affected version identifier").option("--fixed-version <value>","Set fixed version identifier").option("--component <value>","Set issue component ownership").option("--regression [value]","Set regression marker; bare flag means true, or pass true|false|1|0").option("--customer-impact <value>","Set customer impact summary").option("--dep <value>","Add dependency entry id=<id>,kind=<kind>,author=<author>,created_at=<timestamp>",u).option("--dep-remove <value>","Remove dependency entries by id/kind/author/timestamp signature",u).option("--replace-deps","Atomically replace dependency entries with provided --dep values").option("--replace-tests","Atomically replace linked tests with provided --test values").option("--replace-files","Atomically replace linked files with provided --file values").option("--replace-docs","Atomically replace linked docs with provided --doc values").option("--comment <value>","Add comment seed author=<value>,created_at=<iso|now>,text=<value>",u).option("--note <value>","Add note seed author=<value>,created_at=<iso|now>,text=<value>",u).option("--learning <value>","Add learning seed author=<value>,created_at=<iso|now>,text=<value>",u).option("--file <value>","Add linked file path=<value>,scope=<project|global>,note=<text>",u).option("--test <value>","Add linked test command=<value>,path=<value>,scope=<project|global>",u).option("--doc <value>","Add linked doc path=<value>,scope=<project|global>,note=<text>",u).option("--reminder <value>","Add reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>",u).option("--event <value>","Add event entry start=<iso|relative>,end=<iso|relative>,recur_*",u).option("--type-option <value>","Set type options key=value (repeatable)",u).option("--unset <field>","Clear scalar metadata field by name (repeatable)",u).option("--clear-deps","Clear dependency entries").option("--clear-comments","Clear comments").option("--clear-notes","Clear notes").option("--clear-learnings","Clear learnings").option("--clear-files","Clear linked files").option("--clear-tests","Clear linked tests").option("--clear-docs","Clear linked docs").option("--clear-reminders","Clear reminders").option("--clear-events","Clear events").option("--clear-type-options","Clear type options").option("--author <value>","Mutation author").option("--message <value>","Mutation message").option("--force","Force ownership override"),M(n,[["--filter-assignee_filter <value>","Alias for --filter-assignee-filter"],["--estimated_minutes <value>","Alias for --estimated-minutes"],["--acceptance_criteria <value>","Alias for --acceptance-criteria"],["--definition_of_ready <value>","Alias for --definition-of-ready"],["--why_now <value>","Alias for --why-now"],["--blocked_by <value>","Alias for --blocked-by"],["--blocked_reason <value>","Alias for --blocked-reason"],["--unblock_note <value>","Alias for --unblock-note"],["--repro_steps <value>","Alias for --repro-steps"],["--expected_result <value>","Alias for --expected-result"],["--actual_result <value>","Alias for --actual-result"],["--affected_version <value>","Alias for --affected-version"],["--fixed_version <value>","Alias for --fixed-version"],["--customer_impact <value>","Alias for --customer-impact"],["--filter-estimate-missing","Alias for --filter-estimates-missing"]],!1),M(n,[["--dep_remove <value>","Alias for --dep-remove"],["--type_option <value>","Alias for --type-option"],["--add_tags <value>","Alias for --add-tags"],["--remove_tags <value>","Alias for --remove-tags"],["--add_ac <value>","Alias for --add-ac"],["--remove_ac <value>","Alias for --remove-ac"]],!0),n.action(To);let r=e.command("close").argument("<id>","Item id").argument("[text]","Close reason text (alias: --reason)").option("-r, --reason <value>","Close reason text (alias for positional <text>)").option("--close-reason <value>","Close reason text (alias for positional <text>)").option("--completed-at <value>","Actual completion timestamp (ISO or relative), distinct from tracker close time").option("-d, --duplicate-of <id>","Close as a duplicate of the canonical item id and auto-fill duplicate closure metadata").option("--author <value>","Mutation author").option("-m, --message <value>","History message").option("--validate-close [mode]",'Validate closure metadata before close: "off", "warn", or "strict" (default: settings governance preset)').option("--resolution <value>","Set the closure resolution summary inline (same field --validate-close strict checks; previously required a prior pm update)").option("--expected-result <value>","Set the expected-result note inline (closure validation field)").option("--expected <value>","Short alias for --expected-result").option("--actual-result <value>","Set the actual-result note inline (closure validation field)").option("--actual <value>","Short alias for --actual-result").option("--force","Force ownership override").description("Close an item. Close reason requirement follows governance.require_close_reason.");A(r,"--expected_result <value>","Alias for --expected-result",!1),A(r,"--actual_result <value>","Alias for --actual-result",!1),r.action(Eo);let a=e.command("close-many").description("Bulk-close matched items with a shared reason and full runClose semantics (dry-run + rollback checkpoint).").option("--filter-status <value>","Filter by status before closing").option("--filter-type <value>","Filter by item type before closing").option("--filter-tag <value>","Filter by tag before closing").option("--filter-priority <value>","Filter by priority before closing").option("--filter-deadline-before <value>","Filter by deadline upper bound before closing").option("--filter-deadline-after <value>","Filter by deadline lower bound before closing").option("--filter-updated-after <value>","Filter by updated_at lower bound before closing (ISO/relative)").option("--filter-updated-before <value>","Filter by updated_at upper bound before closing (ISO/relative)").option("--filter-created-after <value>","Filter by created_at lower bound before closing (ISO/relative)").option("--filter-created-before <value>","Filter by created_at upper bound before closing (ISO/relative)").option("--filter-assignee <value>","Filter by assignee before closing").option("--filter-assignee-filter <value>","Filter assignee presence: assigned|unassigned before closing").option("--filter-parent <value>","Filter by parent item ID before closing").option("--filter-sprint <value>","Filter by sprint before closing").option("--filter-release <value>","Filter by release before closing");rt(a,"closing"),a.option("--ids <value>","Explicit ID allowlist: comma/newline text, - stdin, or @path file").option("--limit <n>","Limit matched item count before apply/preview").option("--offset <n>","Skip first n matched rows before apply/preview").option("--reason <value>","Shared close reason applied to matched items (required when governance.require_close_reason is enabled)").option("--completed-at <value>","Actual completion timestamp (ISO or relative) applied to every matched item").option("--resolution <value>","Shared closure resolution applied to every matched item (closure-validation field)").option("--expected-result <value>","Shared expected-result note (closure-validation field)").option("--expected <value>","Short alias for --expected-result").option("--actual-result <value>","Shared actual-result note (closure-validation field)").option("--actual <value>","Short alias for --actual-result").option("--validate-close [mode]",'Validate closure metadata per item: "off", "warn", or "strict" (default: settings governance preset)').option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Re-close already-terminal matches and override ownership").option("--dry-run","Preview matched items + per-item skip/active-child plan without mutating").option("--rollback <value>","Rollback a prior close-many checkpoint ID").option("--no-checkpoint","Disable checkpoint creation during apply mode"),A(a,"--filter-assignee_filter <value>","Alias for --filter-assignee-filter",!1),A(a,"--expected_result <value>","Alias for --expected-result",!1),A(a,"--actual_result <value>","Alias for --actual-result",!1),a.action(Io),e.command("delete").argument("<id>","Item id").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override").option("--dry-run","Preview the item file that would be deleted without mutating").description("Delete an item and record the change in history.").action(Vo),e.command("append").argument("<id>","Item id").argument("[text]","Body text; same as --body (- reads stdin)").option("--body <value>","Text to append to body (or - for stdin)").option("--text <value>","Alias for --body").option("--author <value>","Mutation author").option("--message <value>","Mutation message").option("--force","Force ownership override").description("Append text to an item's body. For concurrent writes, use pm notes.").action(Jo),e.command("restore").argument("<id>","Item id").argument("<target>","Restore target timestamp or version number").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership/lock override").description("Restore an item to an earlier timestamp or version.").action(Ko);let l=e.command("plan").description("Agent-optimized Plan item workflow: create, manage steps, link dependencies, approve, and materialize.").argument("[subcommand]","Required; Plan subcommand: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize").argument("[id]","Plan id (required for non-create subcommands); for create this may be the positional title").argument("[step]","Step reference: stable id (plan-step-001) or order integer").argument("[new-order]","New order integer for reorder-step").option("--title <value>","Plan title").option("--description <value>","Plan description").option("--scope <value>","Short scope statement of the target change or investigation").option("--parent <value>","Parent pm item id").option("--related <value>","Related pm item ids (repeatable, csv-friendly)",u).option("--blocks <value>","Pm item ids this plan blocks (repeatable, csv-friendly)",u).option("--blocked-by <value>","Pm item ids that block this plan (repeatable, csv-friendly)",u).option("--harness <value>","Plan harness provenance: codex|claude-code|cursor|generic").option("--mode <value>","Plan mode: draft|research|review|approved|executing|paused|completed|superseded").option("--resume-context <value>","Compact context summary for a future stateless agent").option("--tags <value>","Comma-separated tags").option("--priority <value>","Priority 0-4").option("--body <value>","Plan item body").option("--claim","Claim the plan on create for the author").option("--from-search <value>","Record the search query that led to plan creation").option("--template <value>","Seed plan steps from a built-in template: bug-investigation|feature-implementation|refactoring-sprint").option("--step-title <value>","Step title for add-step / update-step").option("--step <value>","Step title (repeatable on create: each --step appends an ordered step; elsewhere a single value aliases --step-title)",u).option("--step-body <value>","Step body text").option("--step-owner <value>","Step owner").option("--step-status <value>","Step status: pending|in_progress|completed|blocked|skipped|superseded").option("--step-evidence <value>","Step evidence text (used by update-step/complete-step)").option("--step-blocked-reason <value>","Step blocked reason (required when blocking)").option("--step-replacement <value>","Replacement reference for a superseded step").option("--depends-on <value>","Pm item ids the step depends on (repeatable, csv-friendly)",u).option("--link <value>","Pm item id to link (repeatable, csv-friendly)",u).option("--link-kind <value>",`Link kind: ${xe.join("|")}`).option("--link-note <value>","Optional note for the link").option("--promote-to-item-dep","Also add the linked id as a top-level item dependency when linking").option("--allow-multiple-active","Allow multiple steps to be in_progress at once").option("--file <value>","Step linked file path=<value>[,scope=project|global,note=<text>] (repeatable)",u).option("--test <value>","Step linked test command=<value>[,path=<value>,note=<text>] (repeatable)",u).option("--doc <value>","Step linked doc path=<value>[,scope=project|global,note=<text>] (repeatable)",u).option("--decision-text <value>","Decision log entry text").option("--decision <value>","Alias for --decision-text").option("--decision-rationale <value>","Decision log entry rationale").option("--decision-evidence <value>","Decision log entry evidence").option("--discovery-text <value>","Discovery log entry text").option("--discovery <value>","Alias for --discovery-text").option("--validation-text <value>","Validation log entry text").option("--validation <value>","Alias for --validation-text").option("--validation-command <value>","Validation log entry command").option("--validation-expected <value>","Validation log entry expected outcome").option("--depth <value>","Show depth: brief|standard|deep (default: brief)").option("--fields <value>","Comma-separated field projection for show output").option("--steps <value>","Comma-separated step ids/orders for materialize").option("--materialize-type <value>","Item type for materialized steps (default: Task)").option("--materialize-parent <value>","Parent item id for materialized children (default: the plan)").option("--materialize-tags <value>","Comma-separated tags for materialized children").option("--field <name=value>","Custom field value forwarded to every materialized child (repeatable)",u).option("--author <value>","Mutation author").option("--message <value>","Mutation message").option("--force","Force ownership override");ke(l,K.filter(b=>mo.has(b.target))),M(l,[["--resume_context <value>","Alias for --resume-context"],["--from_search <value>","Alias for --from-search"],["--step_title <value>","Alias for --step-title"],["--step_body <value>","Alias for --step-body"],["--step_owner <value>","Alias for --step-owner"],["--step_status <value>","Alias for --step-status"],["--step_evidence <value>","Alias for --step-evidence"],["--step_blocked_reason <value>","Alias for --step-blocked-reason"],["--step_replacement <value>","Alias for --step-replacement"],["--link_kind <value>","Alias for --link-kind"],["--link_note <value>","Alias for --link-note"],["--promote_to_item_dep","Alias for --promote-to-item-dep"],["--allow_multiple_active","Alias for --allow-multiple-active"],["--decision_text <value>","Alias for --decision-text"],["--decision_rationale <value>","Alias for --decision-rationale"],["--decision_evidence <value>","Alias for --decision-evidence"],["--discovery_text <value>","Alias for --discovery-text"],["--validation_text <value>","Alias for --validation-text"],["--validation_command <value>","Alias for --validation-command"],["--validation_expected <value>","Alias for --validation-expected"],["--materialize_type <value>","Alias for --materialize-type"],["--materialize_parent <value>","Alias for --materialize-parent"],["--materialize_tags <value>","Alias for --materialize-tags"]],!1),M(l,[["--blocked_by <value>","Alias for --blocked-by"],["--depends_on <value>","Alias for --depends-on"]],!0),l.action(Po),e.command("history-redact").argument("<id>","Item id").option("--literal <value>","Literal string to redact (repeatable)",u).option("--regex <value>","Regex pattern to redact (repeatable; accepts /pattern/flags or raw pattern)",u).option("--replacement <value>",'Replacement string (default: "[redacted]")').option("--dry-run","Preview redaction impact without writing item/history files").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the redaction marker entry").option("--force","Force ownership/lock override").description("Redact sensitive literals/patterns from an item history stream and recompute hashes.").action(async(b,g,R)=>{let S=y(R),I=Date.now(),_=Array.isArray(g.literal)?g.literal:void 0,N=Array.isArray(g.regex)?g.regex:void 0,x=await W(b,{literal:_,regex:N,replacement:typeof g.replacement=="string"?g.replacement:void 0,dryRun:g.dryRun===!0,author:typeof g.author=="string"?g.author:void 0,message:typeof g.message=="string"?g.message:void 0,force:!!g.force},S);x.changed&&!x.dry_run&&await w(S,x),f(x,S),S.profile&&v(`profile:command=history-redact took_ms=${Date.now()-I}`)}),e.command("history-repair").argument("[id]","Item id (omit with --all)").option("--salvage-tail","Recover invalid tail; requires verified prefix").option("--all","Scan every stream for drift and repair each drifted stream in one audited pass").option("--dry-run","Preview the re-anchor impact without writing the history file").option("--normalize-provenance","Remove invalid provenance; return aggregate-only evidence").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the repair marker entry").option("--force","Force ownership/lock override").description("Re-anchor a drifted item history chain (recompute hashes, reconcile with the on-disk item) and record an audit marker. Use --all to repair every drifted stream.").action(async(b,g,R)=>{let S=y(R),I=Date.now(),_=g.all===!0;oe(b,_);let N={dryRun:g.dryRun===!0,author:typeof g.author=="string"?g.author:void 0,message:typeof g.message=="string"?g.message:void 0,force:!!g.force,normalizeProvenance:g.normalizeProvenance===!0,salvageTail:g.salvageTail===!0};if(_){let x=await ie(N,S);f(x,S),x.totals.failed>0&&(process.exitCode=c.GENERIC_FAILURE)}else{let x=await te(b,N,S);f(x,S)}S.profile&&v(`profile:command=history-repair took_ms=${Date.now()-I}`)}),tt(e),e.command("history-compact").argument("[id]","Item id (omit when using a bulk selector)").option("--before <value>","Compact entries strictly before this version number or ISO timestamp (single-id mode only)").option("--ids <value>","Bulk IDs: comma/newline text, - stdin, or @path file").option("--all-over <n>","Bulk: compact every stream with more than N entries").option("--closed","Bulk: compact only closed (terminal) items' streams").option("--all-streams","Bulk: compact every history stream regardless of lifecycle state").option("--min-entries <n>","Bulk: skip streams with at most N entries (already compact; default 3)").option("--dry-run","Preview compaction impact without writing the history file").option("--author <value>","Mutation author").option("--message <value>","Audit history message for the compaction marker entry").option("--force","Force ownership/lock override").description("Compact item history streams into a synthetic baseline plus retained tail entries. Pass an item id for one stream, or a bulk selector (--ids/--all-over/--closed/--all-streams) to compact many.").action(Lo),e.command("merge").argument("<subcommand>",`Merge subcommand: ${j.join(", ")}`).argument("[artifact]",`driver only: artifact class to merge (${le.join(", ")})`).argument("[base]","driver only: common-ancestor file path (git %O)").argument("[ours]","driver only: current-branch file path (git %A)").argument("[theirs]","driver only: other-branch file path (git %B)").option("--dry-run","install/reconcile: preview changes without writing").option("--message <text>","reconcile only: audit message recorded on repaired history streams").option("--force","reconcile only: permit the underlying audited history ownership override").option("--include-reconciled","report only: include clone-local receipts already recorded in history").option("--output <path>","driver only: write the merged content to this path instead of the ours path").option("--item-path <path>","driver only: original repository-relative path supplied by git as %P").option("--prefer <side>","driver only: side that wins unresolvable conflicts (ours|theirs; default ours)").description("Install merge drivers, reconcile or report post-merge history, or run a field-aware driver.").action(Ho);let d=e.command("schema").argument("[subcommand]","Required; Schema subcommand: list, show, show-status, add/remove type/status/field, rename-type, rename-field, remap-status, or a custom item type name shorthand").argument("[name]","Definition name, or source name for rename/remap migrations").option("--description <text>","Human description for the custom item type, status, or field").option("--default-status <status>","Default status hint recorded for the custom item type").option("--folder <dir>","Storage folder for items of this custom type").option("--alias <name>","Alias for the custom type, status, or field flag (repeatable, csv-friendly)",u).option("--role <value>","Lifecycle role for a custom status (repeatable): draft, active, blocked, terminal, terminal_done, terminal_canceled, default_open, default_close, default_cancel",u).option("--order <n>","Display/sort order for a custom status").option("--type <type>","Value type for a custom field (add-field): string, number, boolean, string_array, array, object").option("--commands <list>","Commands a custom field is wired onto (add-field; repeatable, comma-friendly): create, update, update_many, list, search, calendar, context",u).option("--cli-flag <flag>","Override the auto-derived CLI flag for a custom field (add-field)").option("--required","Mark a custom field as always required (add-field)").option("--required-on-create","Mark a custom field as required at create time (add-field)").option("--no-allow-unset","Disallow clearing a custom field via --unset (add-field)").option("--required-types <list>","Restrict a custom field's requirement to specific item types (add-field; repeatable, comma-friendly)",u).option("--infer","Infer custom item types from title-prefix conventions (add-type; preview unless --apply)").option("--min-count <n>","Minimum items sharing a prefix for add-type --infer (default 10)").option("--apply","Register inferred types (add-type --infer); without it the command previews only").option("--to <name>","Target definition name for rename/remap migrations").option("--migration-id <id>","Stable idempotency key for a resumable schema migration").option("--dry-run","Plan a schema migration without writing schema, items, or history").option("--author <value>","Mutation author").option("--force","Force ownership/lock override").description("Inspect and manage config-driven runtime schema (types, statuses, fields, presets).");A(d,"--default_status <status>","Alias for --default-status",!1),A(d,"--migration_id <id>","Alias for --migration-id",!1),d.action(Bo),e.command("profile").argument("[subcommand]","Required; Profile subcommand: list, show, apply, or lint").argument("[name]","Profile name for show/apply/lint: agile, ops, or research").option("--dry-run","Preview the apply diff without writing any files (apply)").option("--author <value>","Mutation author").option("--force","Force ownership/lock override").description("List, show, apply, and lint project profiles \u2014 archetype bundles of item types, statuses, fields, workflows, config, templates, and recommended packages.").action(Wo),nt(e,ko);let h=e.command("files").description("Manage files linked to an item.");h.argument("<id>","Item id").option("--add <value>","Add linked file entry (CSV/markdown pairs or - for stdin)",u).option("--add-glob <value>","Add linked file entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)",u).option("--remove <value>","Remove linked file by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message",u).option("--migrate <value>","Migrate linked file paths in-place (from=<prefix>,to=<prefix>; repeatable)",u).option("--note <value>","Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list","List linked files without mutating").option("--append-stable","Preserve existing linked-file order and append new links without full-array resorting").option("--validate-paths","Validate linked file paths for existence and file shape").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override").action(Xo),h.command("discover").argument("<id>","Item id").option("--apply","Add discovered missing files to the item").option("--note <value>","Note to attach to discovered file links").option("--append-stable","Preserve existing linked-file order and append discovered links without full-array resorting").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override").description("Discover existing file paths referenced in item text and optionally link missing files.").action(Yo),at(h),e.command("docs").argument("<id>","Item id").option("--add <value>","Add linked doc entry (CSV/markdown pairs or - for stdin)",u).option("--add-glob <value>","Add linked doc entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)",u).option("--remove <value>","Remove linked doc by path only (path=<value>, path:<value>, plain path, or - for stdin); does not accept note=/scope= \u2014 record removal context with --message",u).option("--migrate <value>","Migrate linked doc paths in-place (from=<prefix>,to=<prefix>; repeatable)",u).option("--note <value>","Note attached to every link added by --add/--add-glob in this invocation (embedded note= wins)").option("--list","List linked docs without mutating").option("--validate-paths","Validate linked doc paths for existence and file shape").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override").description("Manage docs linked to an item.").action(Zo),e.command("deps").argument("<id>","Item id").option("--format <value>","Output format (tree, graph, or context)","tree").option("--max-depth <value>","Maximum dependency traversal depth (0 keeps only the root)").option("--collapse <value>","Collapse mode (none or repeated)","none").option("--summary","Return counts only without full tree/graph payload").option("--full","Return the complete dependency row projection").option("--node-limit <value>","Maximum nodes in context output").option("--edge-limit <value>","Maximum edges and missing-reference rows in context output").option("--token-budget <value>","Maximum estimated tokens in context output").option("--cursor <value>","Continue an equivalent context query").option("--direction <value>","Context traversal direction (outgoing, incoming, or both)").option("--kind <value>","Restrict context traversal to registered relationship kinds (repeatable or comma-separated)",u).description("Show dependency relationships for an item.").action(Qo)}export{we as looksLikeSchemaSubcommandTypo,ko as parsePositiveIntOption,L as parseSchemaOrderOption,ke as registerCommanderOptionContracts,Xn as registerMutationCommands};
20
- //# sourceMappingURL=register-mutation-ZPG7KMVP.js.map
@@ -1,2 +0,0 @@
1
- import{a as L,h as T}from"./chunk-JX4DH4WC.js";import{Ia as I,Na as j,Pa as P,ta as O,wa as R}from"./chunk-CKOL5U7J.js";import"./chunk-WYRZZ5ZE.js";import{Af as D,C as d,E as m,En as b,Hn as x,Mi as U,Ya as $,ch as S,fh as w,gh as h,zf as G}from"./chunk-QUWFABDM.js";import C from"node:fs/promises";import W from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="054789eb-fabe-5042-8166-19961f30ebf1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3e4ba524-10cf-58e7-81ea-f48f30ca1250")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="defd826a-ac9b-54e4-b2a3-00d022090a10")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4344c493-be53-584f-b25d-4b41bfee5079")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="08f5b31f-c756-577c-94e8-7b4268ba12ab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="59c52ff5-9763-5244-bed3-146a547c3551")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="feb682f9-344c-569e-bbab-861fe20f08f1")}catch{}})();var H={extension:"extension",package:void 0};async function v(e,t){if(!e)return;let o=G(e),n=b(t);await U($(process.cwd(),n.path)).then(i=>i.ux.deprecation_hints)&&h(D(o))}var V={init:"init",install:"install",uninstall:"uninstall",explore:"explore",manage:"manage",describe:"describe",reload:"reload",doctor:"doctor",catalog:"catalog",adopt:"adopt","adopt-all":"adoptAll",activate:"activate",deactivate:"deactivate",migrate:"migrate"};function X(e){let t=e.capability,o=typeof t=="string"?[t]:Array.isArray(t)?t.filter(a=>typeof a=="string"):[],n=[...new Set(o.map(a=>a.trim().toLowerCase()).filter(a=>a.length>0))];if(n.length>1)throw new m(`Multiple scaffold capabilities cannot be combined yet: ${n.join(", ")}. Choose one capability per scaffold.`,d.USAGE);return n[0]}function A(e,t,o="extension"){let n={...e};t!==void 0&&(n[V[t]]=!0);let a=(...c)=>c.some(s=>n[s]===!0),i=(...c)=>{for(let s of c)if(typeof n[s]=="string")return n[s]};return{init:a("init"),scaffold:a("scaffold"),install:a("install"),uninstall:a("uninstall"),explore:a("explore","list"),manage:a("manage"),describe:a("describe"),markdown:a("markdown"),reload:a("reload"),doctor:a("doctor"),catalog:a("catalog"),adopt:a("adopt"),adoptAll:a("adoptAll","adopt_all","adopt-all"),activate:a("activate"),deactivate:a("deactivate"),migrate:a("migrate"),project:a("project"),local:a("local"),global:a("global"),gh:i("gh"),github:i("github"),ref:i("ref"),capability:X(e),declarative:a("declarative"),fields:i("fields"),detail:i("detail"),output:i("output"),trace:a("trace"),watch:a("watch"),runtimeProbe:a("runtimeProbe","runtime_probe","runtime-probe"),fixManagedState:a("fixManagedState","fix_managed_state","fix-managed-state"),isolated:a("isolated"),ignoreGlobal:a("ignoreGlobal","ignore_global","ignore-global"),strictExit:a("strictExit","strict_exit","strict-exit"),failOnWarn:a("failOnWarn","fail_on_warn","fail-on-warn"),dryRun:a("dryRun","dry_run","dry-run"),vocabulary:o}}async function Y(e){let t=(await C.readdir(process.cwd())).filter(n=>!n.startsWith(".")).sort((n,a)=>n.localeCompare(a)),o=[...e].sort((n,a)=>n.localeCompare(a));return t.length===o.length&&t.every((n,a)=>n===o[a])}async function J(e){let t=(e??[]).map(o=>o.trim()).filter(o=>o.length>0);return t.length<=1?t.length===0?void 0:t:await Y(t)?["*"]:t}function M(e,t,o){let n=e.markdown===!0;if(o!==void 0&&o==="")throw new m("--output requires a non-empty file path.",d.USAGE);if(o!==void 0&&!n)throw new m("--output is only supported with --markdown describe output.",d.USAGE);if(n){if(t.json)throw new m("Cannot combine --json with --markdown.",d.USAGE);if(e.describe!==!0)throw new m("--markdown is only supported by the describe action.",d.USAGE)}}async function Q(e){let t=R(e.result.details,e.vocabulary);if(e.outputPath!==void 0){let o=W.resolve(e.outputPath);await C.mkdir(W.dirname(o),{recursive:!0}),await C.writeFile(o,t,"utf8")}if(!e.globalOptions.quiet){for(let o of e.result.warnings)h(`warning: ${o}`);e.outputPath===void 0&&S(t)}}function Z(e,t){let o=!!t.strictExit||!!t.failOnWarn;if(e.action!=="doctor"||!o)return;let n=e.details!==null&&typeof e.details=="object"?e.details:{},a=n.summary!==null&&typeof n.summary=="object"?n.summary:null,i=a&&typeof a.status=="string"?a.status:void 0;(e.warnings.length>0||i!==void 0&&i!=="ok")&&(process.exitCode=d.GENERIC_FAILURE)}async function p(e,t,o,n,a="extension"){let i=b(o),c=Date.now(),s=a==="extension"?"package":a;await v(H[a],o);let r=A(t,n,s),u=(typeof r.output=="string"?r.output:void 0)?.trim();M(r,i,u);let g=await I(e,r,i);r.markdown===!0?await Q({result:g,vocabulary:s,outputPath:u,globalOptions:i}):w(g,i),Z(g,r),g.ok===!1&&(process.exitCode=d.GENERIC_FAILURE),i.profile&&h(`profile:command=extension took_ms=${Date.now()-c}`)}function ee(e){return e.details!==null&&typeof e.details=="object"?e.details:{}}function te(e){return e instanceof m?{message:e.message,exit_code:e.exitCode,...e.context}:{message:e instanceof Error?e.message:String(e),exit_code:d.GENERIC_FAILURE}}async function oe(e,t,o){let n=[],a=[],i=d.GENERIC_FAILURE;for(let c of e)try{let s=await I(c,t,o),r=ee(s),l=Array.isArray(s.warnings)?s.warnings:[];a.push(...l);let u=s.ok===!0;n.push({target:c,ok:u,extension:r.extension,source:r.source,destination_path:r.destination_path,activated:r.activated,settings_changed:r.settings_changed,command_paths:r.command_paths,action_paths:r.action_paths,runtime_activation_status:r.runtime_activation_status,activation_diagnostics:r.activation_diagnostics,command_discovery:r.command_discovery,verification:r.verification,warnings:l,...u?{}:{error:{message:"Extension install returned ok=false without throwing an error.",exit_code:d.GENERIC_FAILURE,code:"extension_install_soft_failed"}}})}catch(s){let r=te(s),l=r.exit_code;typeof l=="number"&&i===d.GENERIC_FAILURE&&l!==d.GENERIC_FAILURE&&(i=l),n.push({target:c,ok:!1,error:r})}return{rows:n,warnings:a,failureExitCode:i}}async function z(e,t,o,n){let a=n==="extension"?"package":n;await v(H[n],o);let i=await J(e);if(i===void 0||i.length<=1){await p(i?.[0],t,o,"install",a);return}let c=b(o),s=Date.now(),r=A(t,"install",a);if(M(r,c,void 0),[r.gh,r.github].some(y=>typeof y=="string"&&y.trim().length>0))throw new m("Multiple install targets cannot be combined with --gh/--github. Install one GitHub source per command, or pass multiple explicit local, bundled, or npm: targets.",d.USAGE,{code:"multi_target_github_install_ambiguous",required:"Use exactly one positional target with --gh/--github, or omit --gh/--github when installing multiple targets.",examples:["pm install --gh owner/repo","pm install npm:pm-guide-shell pm-todos"]});let{rows:u,warnings:g,failureExitCode:E}=await oe(i,r,c),k=u.filter(y=>y.ok!==!0).length,K={ok:k===0,action:"install",scope:r.global===!0?"global":"project",installed_count:u.length-k,failed_count:k,targets:u,warnings:[...new Set(g)].sort((y,B)=>y.localeCompare(B))};w(K,c),k>0&&(process.exitCode=E),c.profile&&h(`profile:command=extension took_ms=${Date.now()-s}`)}function ne(e){return e.option("--project","Use project extension scope (default)").option("--local","Alias for --project").option("--global","Use global extension scope")}function _(e){return e.option("--project","Use project package scope (default)").option("--local","Alias for --project").option("--global","Use global package scope")}function f(e,t){return t==="package"?_(e):ne(e)}function N(e){return e.option("--dry-run","Plan CLI/package upgrades without running npm or reinstalling packages").option("--cli-only","Upgrade only the pm CLI/SDK npm package").option("--packages-only","Upgrade only managed pm packages").option("--repair","Force npm global reinstall when upgrading the pm CLI/SDK").option("--tag <value>","npm dist-tag/version for CLI and registry package upgrades").option("--package-name <value>","Override the CLI package name for self-upgrade testing")}async function q(e,t,o){let n=b(t),a=Date.now();o&&await v("upgrade",t);let i=await L(e,t.opts(),n);w(i,n),i.ok||(process.exitCode=d.GENERIC_FAILURE),n.profile&&h(`profile:command=package-upgrade took_ms=${Date.now()-a}`)}function F(e,t){let o=t==="package"?"package":"extension",n=t==="package"?"packages":"extensions",a=t,i=e.command(a,{hidden:t==="extension"}).argument("[target]",`${o[0].toUpperCase()}${o.slice(1)} source, name, or scaffold path`).option("--init",`Generate a starter ${o} scaffold at target path`).option("--scaffold","Alias for --init").option("--capability <kind>","Starter capability for --init (default: commands)",x).option("--install",`Install a ${o} source`).option("--uninstall",`Uninstall an installed ${o}`).option("--explore",`List discovered ${n} in selected scope`).option("--list","Alias for --explore").option("--manage",`List managed ${n} with update-check metadata`).option("--describe",`Map every surface a loaded ${o} registers (optionally one by name)`).option("--markdown","Render describe output as a Markdown reference document (describe only)").option("--output <path>","Write describe Markdown to a file (requires --markdown)").option("--reload",`Reload ${n} with cache-busted module imports`).option("--watch","Use watch mode with --reload").option("--doctor",`Run consolidated ${o} diagnostics (summary/deep modes)`).option("--catalog",`List bundled first-party ${o} catalog metadata`).option("--adopt",`Adopt an existing unmanaged ${o} into managed metadata`).option("--adopt-all",`Adopt all unmanaged ${n} into managed metadata`).option("--activate",`Activate a ${o} in selected scope settings`).option("--deactivate",`Deactivate a ${o} in selected scope settings`).option("--project",`Use project ${o} scope (default)`).option("--local","Alias for --project").option("--global",`Use global ${o} scope`).option("--gh <github-source>","Install from GitHub shorthand source (owner/repo[/path])").option("--github <github-source>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub install sources").option("--detail <mode>",`${o[0].toUpperCase()}${o.slice(1)} diagnostics detail mode (summary|deep)`).option("--trace","Include actionable registration traces in doctor deep diagnostics").option("--runtime-probe","Opt-in runtime activation probe for manage output parity").option("--fix-managed-state",`Adopt unmanaged ${n} before diagnostics/update checks`).option("--isolated",`Run doctor against project-scope ${n} only, ignoring global registrations`).option("--ignore-global","Alias for --isolated").option("--strict-exit","Return non-zero exit when doctor warnings are present (ok=false)").option("--fail-on-warn","Alias for --strict-exit (doctor)").description(t==="package"?"Manage package lifecycle in project or global scope.":"Manage extension lifecycle in project or global scope.").action(async(s,r,l)=>{await p(s,l.optsWithGlobals(),l,void 0,t)});t==="package"&&(i.alias("packages"),i.option("--declarative","Scaffold the composeExtension blueprint starter (any capability)"));let c=i.command("init").alias("scaffold").argument("<target>","Scaffold target directory path").option("--capability <kind>",`Capability the starter targets (${O.join("|")}; default commands)`,x).description(t==="package"?"Generate a starter package scaffold with package metadata, manifest, and entrypoint.":"Generate a starter extension scaffold with manifest and entrypoint.");t==="package"&&c.option("--declarative","Scaffold the composeExtension blueprint starter (any capability)"),f(c,t).action(async(s,r,l)=>{await p(s,l.optsWithGlobals(),l,"init",t)}),f(i.command("install").argument("[targets...]",`${o[0].toUpperCase()}${o.slice(1)} source (local path, bundled alias, npm: source, wildcard, or GitHub source)`).option("--gh <github-source>","Install from GitHub shorthand source (owner/repo[/path])").option("--github <github-source>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub install sources").description(`Install ${o} from local path, bundled alias, npm: source, wildcard, or GitHub source.`),t).action(async(s,r,l)=>{await z(s,l.optsWithGlobals(),l,t)}),f(i.command("uninstall").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).description(`Uninstall an installed ${o}.`),t).action(async(s,r,l)=>{await p(s,l.optsWithGlobals(),l,"uninstall",t)}),f(i.command("explore").description(`List discovered ${n} in selected scope.`),t).action(async(s,r)=>{await p(void 0,r.optsWithGlobals(),r,"explore",t)}),f(i.command("manage").option("--runtime-probe","Opt-in runtime activation probe for manage output parity").option("--fix-managed-state",`Adopt unmanaged ${n} before diagnostics/update checks`).description(`List managed ${n} with update-check metadata.`),t).action(async(s,r)=>{await p(void 0,r.optsWithGlobals(),r,"manage",t)}),f(i.command("describe").argument("[target]",`${o[0].toUpperCase()}${o.slice(1)} name to describe (omit for every loaded ${o})`).option("--markdown","Render the surface map as a Markdown reference document instead of toon/json").option("--output <path>","Write Markdown output to a file (requires --markdown)").description(`Map every surface a loaded ${o} registers (commands, hooks, item types, providers, overrides, ...).`),t).action(async(s,r,l)=>{await p(s,l.optsWithGlobals(),l,"describe",t)}),f(i.command("reload").option("--watch","Use watch mode for repeated reload checks").description(`Reload ${n} with cache-busted module imports.`),t).action(async(s,r)=>{await p(void 0,r.optsWithGlobals(),r,"reload",t)}),f(i.command("doctor").option("--detail <mode>",`Detail mode for ${o} diagnostics (summary|deep)`).option("--trace","Include actionable registration traces in doctor deep diagnostics").option("--fix-managed-state",`Adopt unmanaged ${n} before diagnostics/update checks`).option("--isolated",`Run doctor against project-scope ${n} only, ignoring global registrations`).option("--ignore-global","Alias for --isolated").option("--strict-exit","Return non-zero exit when doctor warnings are present (ok=false)").option("--fail-on-warn","Alias for --strict-exit (doctor)").description(`Run consolidated ${o} diagnostics (summary/deep modes).`),t).action(async(s,r)=>{await p(void 0,r.optsWithGlobals(),r,"doctor",t)}),f(i.command("catalog").alias("list").option("--fields <value>","Render compact comma-separated catalog fields, for example: alias,installed,install_command").description(`List bundled first-party ${o} catalog metadata.`),t).action(async(s,r)=>{await p(void 0,r.optsWithGlobals(),r,"catalog",t)}),f(i.command("adopt").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).option("--gh <owner/repo[/path]>",`GitHub provenance shorthand for adopted ${o}`).option("--github <owner/repo[/path]>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub shorthand source").description(`Adopt an existing unmanaged ${o} into managed metadata.`),t).action(async(s,r,l)=>{await p(s,l.optsWithGlobals(),l,"adopt",t)}),f(i.command("adopt-all").description(`Adopt all unmanaged ${n} into managed metadata.`),t).action(async(s,r)=>{await p(void 0,r.optsWithGlobals(),r,"adopt-all",t)}),f(i.command("migrate").option("--dry-run","Plan active migrations without invoking extension code").description(`Plan or apply active ${o} migrations with durable receipts.`),t).action(async(s,r)=>{await p(void 0,r.optsWithGlobals(),r,"migrate",t)}),f(i.command("activate").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).description(`Activate a ${o} in selected scope settings.`),t).action(async(s,r,l)=>{await p(s,l.optsWithGlobals(),l,"activate",t)}),f(i.command("deactivate").argument("<target>",`${o[0].toUpperCase()}${o.slice(1)} name`).description(`Deactivate a ${o} in selected scope settings.`),t).action(async(s,r,l)=>{await p(s,l.optsWithGlobals(),l,"deactivate",t)}),t==="package"&&N(_(i.command("upgrade").argument("[target]","Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages").description("Upgrade the pm CLI/SDK and refresh managed installable pm packages."))).action(async(s,r,l)=>{await q(s,l,!1)})}async function ae(e,t,o){let n=b(o),a=Date.now(),i=await P(e,n,{idPrefix:typeof t.idPrefix=="string"?t.idPrefix:void 0,preset:typeof t.preset=="string"?t.preset:void 0,defaults:t.defaults===!0||t.yes===!0,author:typeof t.author=="string"?t.author:void 0,agentGuidance:typeof t.agentGuidance=="string"?t.agentGuidance:void 0,typePreset:typeof t.typePreset=="string"?t.typePreset:void 0,withPackages:t.withPackages===!0,mergeFence:t.mergeFence!==!1,force:t.force===!0,workspace:typeof t.workspace=="string"?t.workspace:void 0}),s=t.verbose===!0||n.json===!0;w(s?i:j(i),n),n.profile&&h(`profile:command=init took_ms=${Date.now()-a}`)}function ie(e,t,o,n){let i=e!==void 0&&new Set(["get","set","list","export"]).has(e);return{resolvedScope:i?"project":e??"project",resolvedAction:i?e:t??"list",resolvedKey:i?t:o,resolvedValue:i?o:n}}function re(e){return{criterion:Array.isArray(e.criterion)?e.criterion:[],format:typeof e.format=="string"?e.format:void 0,policy:typeof e.policy=="string"?e.policy:void 0,value:typeof e.value=="string"?e.value:void 0,clearCriteria:e.clearCriteria===!0,defaultDepth:typeof e.defaultDepth=="string"?e.defaultDepth:void 0,activityLimit:typeof e.activityLimit=="string"?e.activityLimit:void 0,staleThresholdDays:typeof e.staleThresholdDays=="string"?e.staleThresholdDays:void 0,sectionHierarchy:typeof e.sectionHierarchy=="string"?e.sectionHierarchy:void 0,sectionActivity:typeof e.sectionActivity=="string"?e.sectionActivity:void 0,sectionProgress:typeof e.sectionProgress=="string"?e.sectionProgress:void 0,sectionBlockers:typeof e.sectionBlockers=="string"?e.sectionBlockers:void 0,sectionFiles:typeof e.sectionFiles=="string"?e.sectionFiles:void 0,sectionWorkload:typeof e.sectionWorkload=="string"?e.sectionWorkload:void 0,sectionStaleness:typeof e.sectionStaleness=="string"?e.sectionStaleness:void 0,sectionTests:typeof e.sectionTests=="string"?e.sectionTests:void 0}}async function se(e,t,o,n,a,i){let c=b(i),s=Date.now(),{resolvedScope:r,resolvedAction:l,resolvedKey:u,resolvedValue:g}=ie(e,t,o,n),E=await T(r,l,u,re(a),c,typeof g=="string"?g:void 0);w(E,c),c.profile&&h(`profile:command=config took_ms=${Date.now()-s}`)}var Se={normalizeExtensionOptions:A};function Ue(e){e.command("init").argument("[prefix-or-path]","Optional id prefix, or path-like tracker target such as ./pm-sandbox").option("--prefix, --id-prefix <value>","Set the item ID prefix (alias for the positional prefix)").option("--preset <value>","Governance preset for new setups: minimal|default|strict").option("--defaults","Use non-interactive setup defaults without opening the wizard").option("-y, --yes","Alias for --defaults (non-interactive setup)").option("--author <value>","Set the default mutation author for this project").option("--agent-guidance <mode>","Agent guidance mode: ask|add|skip|status").option("--type-preset <name>","Register domain item types during init: agile|ops|research").option("--with-packages","Install all bundled first-party packages during initialization").option("--no-merge-fence","Skip automatic merge-driver installation for a fresh Git-backed tracker").option("--workspace <dir>","Initialize repository-local tracker storage at <dir>/.agents/pm").option("--force","Allow initializing tracker files directly in a directory that looks like a workspace root").option("--verbose","Include the full resolved settings tree in the output (default output is a concise summary)").description("Initialize pm storage and defaults for the current workspace or a path-like tracker target.").action(async(t,o,n)=>{await ae(t,o,n)}),e.command("config").argument("[scope]","Config scope: project|global, or action shorthand list|export|get|set for project scope").argument("[action]","Config action: get|set|list|export").argument("[key]","Config key for get|set; use `pm config project list` for the complete typed inventory, including mutation-guard-* policies").argument("[value]",'Optional value for set: routed to the right typed flag by key (e.g. config set telemetry-tracking off, config set item-format toon, config set definition-of-done "Tests pass"). Equivalent to --policy/--format/--criterion. context keys still require --default-depth/--section-* flags.').option("--criterion <text>","Criteria value for definition-of-done, metadata-required-fields, or lifecycle pattern keys (repeatable for set)",x).option("--clear-criteria","Clear criteria-list keys for config set operations").option("--format <value>","Item format for item-format key: toon").option("--policy <value>","Policy key values: history-missing-stream-policy=auto_create|strict_error; sprint-release-format-policy=warn|strict_error; parent-reference-policy=warn|strict_error; governance-preset=minimal|default|strict|custom; governance-ownership-enforcement=none|warn|strict; governance-create-mode-default=progressive|strict; governance-close-validation-default=off|warn|strict; governance-require-close-reason=enabled|disabled; governance-parent-reference-policy=warn|strict_error; governance-metadata-validation-profile=core|strict|custom; governance-force-required-for-stale-lock=enabled|disabled; governance-duplicate-detection-mode=off|advisory|strict; test-result-tracking=enabled|disabled; untrusted-linked-test-execution=enabled|disabled; telemetry-tracking=enabled|disabled").option("--value <value>","Typed nested setting value. Mutation guards: require-attributed-author=true|false, secret-guard=off|advise|block, stale-in-progress-hours=integer>=1. Kebab-case is preferred; underscore aliases remain accepted.").option("--default-depth <value>","Context default depth: brief|standard|deep").option("--activity-limit <n>","Context default activity limit").option("--stale-threshold-days <n>","Context staleness cutoff in days").option("--section-hierarchy <value>","Enable/disable context hierarchy section (true|false)").option("--section-activity <value>","Enable/disable context activity section (true|false)").option("--section-progress <value>","Enable/disable context progress section (true|false)").option("--section-blockers <value>","Enable/disable context blockers section (true|false)").option("--section-files <value>","Enable/disable context files section (true|false)").option("--section-workload <value>","Enable/disable context workload section (true|false)").option("--section-staleness <value>","Enable/disable context staleness section (true|false)").option("--section-tests <value>","Enable/disable context tests section (true|false)").description("Read or update pm settings for the current workspace or global profile.").action(async(t,o,n,a,i,c)=>{await se(t,o,n,a,i,c)}),F(e,"extension"),F(e,"package"),_(e.command("install",{hidden:!0}).argument("[targets...]","Package source (local path, bundled alias, npm: source, wildcard, or GitHub source)").option("--gh <github-source>","Install from GitHub shorthand source (owner/repo[/path])").option("--github <github-source>","Alias for --gh").option("--ref <ref>","Git ref/branch/tag for GitHub install sources").description("Install a pm package into the project package scope by default.")).action(async(t,o,n)=>{await v("install",n),await z(t,n.optsWithGlobals(),n,"package")}),N(_(e.command("upgrade",{hidden:!0}).argument("[target]","Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages").description("Upgrade the pm CLI/SDK and refresh managed installable pm packages."))).action(async(t,o,n)=>{await q(t,n,!0)})}export{Se as _testOnlyRegisterSetup,Ue as registerSetupCommands};
2
- //# sourceMappingURL=register-setup-H4SVAVX7.js.map