@unbrained/pm-cli 2026.10.4 → 2026.10.5

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 (732) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +11 -0
  3. package/dist/cli/after-command-context-usage.js +1 -1
  4. package/dist/cli/argv-utils.js +1 -1
  5. package/dist/cli/bootstrap-args.js +1 -1
  6. package/dist/cli/bundle-integrity.js +2 -2
  7. package/dist/cli/command-namespaces.js +1 -1
  8. package/dist/cli/commander-usage.d.ts +1 -1
  9. package/dist/cli/commander-usage.js +7 -4
  10. package/dist/cli/commands/annotations/comments.js +1 -1
  11. package/dist/cli/commands/annotations/docs.js +1 -1
  12. package/dist/cli/commands/annotations/files.js +1 -1
  13. package/dist/cli/commands/annotations/learnings.js +1 -1
  14. package/dist/cli/commands/annotations/notes.js +1 -1
  15. package/dist/cli/commands/extension/describe.js +1 -1
  16. package/dist/cli/commands/extension/extension.js +1 -1
  17. package/dist/cli/commands/extension/scaffold.js +1 -1
  18. package/dist/cli/commands/extension/shared.js +1 -1
  19. package/dist/cli/commands/governance/gc.js +1 -1
  20. package/dist/cli/commands/governance/health.js +1 -1
  21. package/dist/cli/commands/governance/telemetry.js +1 -1
  22. package/dist/cli/commands/governance/validate.js +1 -1
  23. package/dist/cli/commands/history/activity.js +1 -1
  24. package/dist/cli/commands/history/history-compact.js +1 -1
  25. package/dist/cli/commands/history/history-redact.js +1 -1
  26. package/dist/cli/commands/history/history-repair.js +1 -1
  27. package/dist/cli/commands/history/history.js +1 -1
  28. package/dist/cli/commands/history/restore.js +1 -1
  29. package/dist/cli/commands/lifecycle/append.js +1 -1
  30. package/dist/cli/commands/lifecycle/claim.js +1 -1
  31. package/dist/cli/commands/lifecycle/close-many.js +1 -1
  32. package/dist/cli/commands/lifecycle/close.js +1 -1
  33. package/dist/cli/commands/lifecycle/copy.js +1 -1
  34. package/dist/cli/commands/lifecycle/create.js +1 -1
  35. package/dist/cli/commands/lifecycle/delete.js +1 -1
  36. package/dist/cli/commands/lifecycle/focus.js +1 -1
  37. package/dist/cli/commands/lifecycle/plan.js +1 -1
  38. package/dist/cli/commands/lifecycle/update-many.js +1 -1
  39. package/dist/cli/commands/lifecycle/update.js +1 -1
  40. package/dist/cli/commands/query/aggregate.js +1 -1
  41. package/dist/cli/commands/query/context.js +1 -1
  42. package/dist/cli/commands/query/deps.js +1 -1
  43. package/dist/cli/commands/query/duplicates.js +1 -1
  44. package/dist/cli/commands/query/eval.js +1 -1
  45. package/dist/cli/commands/query/get.js +1 -1
  46. package/dist/cli/commands/query/graph.js +1 -1
  47. package/dist/cli/commands/query/list.js +1 -1
  48. package/dist/cli/commands/query/next.js +1 -1
  49. package/dist/cli/commands/query/search.js +1 -1
  50. package/dist/cli/commands/query/stats.js +1 -1
  51. package/dist/cli/commands/test/test-all.js +1 -1
  52. package/dist/cli/commands/test/test-runs.js +1 -1
  53. package/dist/cli/commands/test/test.js +1 -1
  54. package/dist/cli/commands/workspace/config.js +1 -1
  55. package/dist/cli/commands/workspace/contracts.js +1 -1
  56. package/dist/cli/commands/workspace/init.js +1 -1
  57. package/dist/cli/commands/workspace/merge.js +1 -1
  58. package/dist/cli/commands/workspace/profile.js +1 -1
  59. package/dist/cli/commands/workspace/schema.js +1 -1
  60. package/dist/cli/commands/workspace/upgrade.js +1 -1
  61. package/dist/cli/context-intent-invocation.js +1 -1
  62. package/dist/cli/description-stdin.js +1 -1
  63. package/dist/cli/error-guidance.js +3 -1
  64. package/dist/cli/extension-command-help.js +5 -3
  65. package/dist/cli/extension-command-options.js +1 -1
  66. package/dist/cli/extension-recovery.js +1 -1
  67. package/dist/cli/help-content.js +5 -2
  68. package/dist/cli/help-json-payload.js +6 -3
  69. package/dist/cli/invocation-profile.js +2 -2
  70. package/dist/cli/main.js +5 -5
  71. package/dist/cli/migration-gates.js +1 -1
  72. package/dist/cli/option-values.js +1 -1
  73. package/dist/cli/public.js +1 -1
  74. package/dist/cli/register-annotations.js +1 -1
  75. package/dist/cli/register-assurance.js +1 -1
  76. package/dist/cli/register-files-lookup.js +1 -1
  77. package/dist/cli/register-history-activity.js +1 -1
  78. package/dist/cli/register-history-author.js +1 -1
  79. package/dist/cli/register-history-maintenance.js +2 -2
  80. package/dist/cli/register-list-query.js +10 -10
  81. package/dist/cli/register-mutation-options.js +1 -1
  82. package/dist/cli/register-mutation.js +2 -2
  83. package/dist/cli/register-operations.js +1 -1
  84. package/dist/cli/register-setup.js +1 -1
  85. package/dist/cli/register-structured-mutation.js +1 -1
  86. package/dist/cli/registration-helpers.js +1 -1
  87. package/dist/cli/runtime/activation.js +1 -1
  88. package/dist/cli/runtime/invocation-options.js +1 -1
  89. package/dist/cli/runtime/projection-retry.js +1 -1
  90. package/dist/cli/runtime/selection.js +1 -1
  91. package/dist/cli/runtime/telemetry-outcome.js +1 -1
  92. package/dist/cli/runtime-compatibility-boundary.js +4 -4
  93. package/dist/cli/schema/registration.js +2 -2
  94. package/dist/cli/schema-registration-helpers.js +1 -1
  95. package/dist/cli/search-refresh.js +1 -1
  96. package/dist/cli/stats-analytics-json.js +1 -1
  97. package/dist/cli/telemetry-flush.js +1 -1
  98. package/dist/cli-bundle/bundle-manifest.json +163 -163
  99. package/dist/cli-bundle/chunks/chunk-3CYOBJUK.js +3 -0
  100. package/dist/cli-bundle/chunks/chunk-5MNOWZPN.js +3 -0
  101. package/dist/cli-bundle/chunks/chunk-AJ7H6XUF.js +20 -0
  102. package/dist/cli-bundle/chunks/chunk-D332RXZ7.js +80 -0
  103. package/dist/cli-bundle/chunks/chunk-HRJ6G6ZG.js +31 -0
  104. package/dist/cli-bundle/chunks/chunk-KRVI56QE.js +6 -0
  105. package/dist/cli-bundle/chunks/chunk-N4YGSG6F.js +238 -0
  106. package/dist/cli-bundle/chunks/{chunk-7CE2DJMA.js → chunk-OOLYASYJ.js} +2 -2
  107. package/dist/cli-bundle/chunks/chunk-R7CG2DB7.js +2 -0
  108. package/dist/cli-bundle/chunks/chunk-TGMONGWX.js +2 -0
  109. package/dist/cli-bundle/chunks/chunk-UZ7BIUCI.js +2 -0
  110. package/dist/cli-bundle/chunks/{chunk-GZMWISWW.js → chunk-VZ63DEVJ.js} +3 -3
  111. package/dist/cli-bundle/chunks/chunk-WFZ4UEOB.js +2 -0
  112. package/dist/cli-bundle/chunks/chunk-YVBRASXO.js +8 -0
  113. package/dist/cli-bundle/chunks/{chunk-SMKHR6BM.js → chunk-Z66DWDAU.js} +87 -87
  114. package/dist/cli-bundle/chunks/{register-list-query-QBGXO5JJ.js → register-list-query-75QXHIFH.js} +11 -11
  115. package/dist/cli-bundle/chunks/register-mutation-YS54SCHG.js +20 -0
  116. package/dist/cli-bundle/chunks/register-operations-6KHZQSYJ.js +2 -0
  117. package/dist/cli-bundle/chunks/register-setup-RTATEN2M.js +2 -0
  118. package/dist/cli-bundle/focused-chunks/{chunk-Q6DJ5DFQ.js → chunk-2CVX3KR3.js} +2 -2
  119. package/dist/cli-bundle/focused-chunks/chunk-5C3IDDW7.js +2 -0
  120. package/dist/cli-bundle/focused-chunks/{chunk-467EW5RL.js → chunk-ABV67XCC.js} +3 -3
  121. package/dist/cli-bundle/focused-chunks/chunk-B5RSLVE6.js +3 -0
  122. package/dist/cli-bundle/focused-chunks/chunk-C224METM.js +20 -0
  123. package/dist/cli-bundle/focused-chunks/chunk-CLDPTMQY.js +6 -0
  124. package/dist/cli-bundle/focused-chunks/chunk-DDRN42PB.js +8 -0
  125. package/dist/cli-bundle/focused-chunks/{chunk-7O4NUJVO.js → chunk-DOVTUKJQ.js} +2 -2
  126. package/dist/cli-bundle/focused-chunks/chunk-ECBOPEJE.js +75 -0
  127. package/dist/cli-bundle/focused-chunks/chunk-GITOYRUW.js +165 -0
  128. package/dist/cli-bundle/focused-chunks/chunk-GUIF3WVC.js +30 -0
  129. package/dist/cli-bundle/focused-chunks/chunk-LE4JUCRR.js +3 -0
  130. package/dist/cli-bundle/focused-chunks/{chunk-HFAW3FJQ.js → chunk-PSXFFQFT.js} +2 -2
  131. package/dist/cli-bundle/focused-chunks/chunk-RHIH6XIW.js +12 -0
  132. package/dist/cli-bundle/focused-chunks/chunk-UDYRVBOZ.js +2 -0
  133. package/dist/cli-bundle/focused-chunks/chunk-XV5RV4ZT.js +2 -0
  134. package/dist/cli-bundle/focused-chunks/{chunk-JCVMOSWQ.js → chunk-YMU42COG.js} +2 -2
  135. package/dist/cli-bundle/main.js +27 -27
  136. package/dist/cli-bundle/sdk-authoring.js +1 -1
  137. package/dist/cli-bundle/sdk-contracts.js +2 -2
  138. package/dist/cli-bundle/sdk-core.js +32 -32
  139. package/dist/cli-bundle/sdk-governance.js +1 -1
  140. package/dist/cli-bundle/sdk-graph.js +1 -1
  141. package/dist/cli-bundle/sdk-merge.js +55 -55
  142. package/dist/cli-bundle/sdk-query.js +1 -1
  143. package/dist/cli-bundle/sdk-runtime.js +1 -1
  144. package/dist/cli-bundle/sdk-testing.js +1 -1
  145. package/dist/cli-bundle/sdk.js +10 -10
  146. package/dist/cli.js +1 -1
  147. package/dist/core/checkpoint/checkpoint-gc.js +1 -1
  148. package/dist/core/checkpoint/mutation-checkpoint.js +2 -2
  149. package/dist/core/config/nested-settings.js +1 -1
  150. package/dist/core/config/positional-value.js +1 -1
  151. package/dist/core/diagnostics/remediation.js +1 -1
  152. package/dist/core/extensions/activation-summary-markdown.js +2 -1
  153. package/dist/core/extensions/activation-summary.js +1 -1
  154. package/dist/core/extensions/activation-transaction.js +1 -1
  155. package/dist/core/extensions/capability-usage.js +1 -1
  156. package/dist/core/extensions/command-hook-context.js +1 -1
  157. package/dist/core/extensions/command-metadata-contract.js +1 -1
  158. package/dist/core/extensions/command-visibility-tier.js +1 -1
  159. package/dist/core/extensions/contribution-inventory.js +1 -1
  160. package/dist/core/extensions/exporter-output-contract.js +1 -1
  161. package/dist/core/extensions/extension-candidate.js +1 -1
  162. package/dist/core/extensions/extension-capability-aliases.js +1 -1
  163. package/dist/core/extensions/extension-hook-runtime.js +1 -1
  164. package/dist/core/extensions/extension-policy.js +1 -1
  165. package/dist/core/extensions/extension-registries.js +1 -1
  166. package/dist/core/extensions/extension-runtime-helpers.js +1 -1
  167. package/dist/core/extensions/extension-types.js +1 -1
  168. package/dist/core/extensions/flag-definition-validation.js +1 -1
  169. package/dist/core/extensions/flag-value-types.js +1 -1
  170. package/dist/core/extensions/index.js +1 -1
  171. package/dist/core/extensions/item-field-types.js +1 -1
  172. package/dist/core/extensions/item-fields.js +1 -1
  173. package/dist/core/extensions/loader.js +1 -1
  174. package/dist/core/extensions/manifest-parser.js +1 -1
  175. package/dist/core/extensions/manifest-schema.js +1 -1
  176. package/dist/core/extensions/module-graph-snapshot.js +1 -1
  177. package/dist/core/extensions/preflight-ownership.js +1 -1
  178. package/dist/core/extensions/registration-contracts.js +1 -1
  179. package/dist/core/extensions/registration-validation.js +1 -1
  180. package/dist/core/extensions/registration-values.js +1 -1
  181. package/dist/core/extensions/reserved-host-flags.js +1 -1
  182. package/dist/core/extensions/runtime-registrations.js +1 -1
  183. package/dist/core/extensions/service-ownership.js +1 -1
  184. package/dist/core/extensions/version-compat.js +1 -1
  185. package/dist/core/fs/atomic-create.js +1 -1
  186. package/dist/core/fs/fs-utils.js +2 -2
  187. package/dist/core/fs/host-environment-errors.js +1 -1
  188. package/dist/core/fs/index.js +1 -1
  189. package/dist/core/fs/path-utils.js +1 -1
  190. package/dist/core/governance/content-fields.js +1 -1
  191. package/dist/core/governance/issue-codes.js +1 -1
  192. package/dist/core/governance/metadata-coverage.js +1 -1
  193. package/dist/core/history/digest.js +1 -1
  194. package/dist/core/history/drift-cache.js +3 -3
  195. package/dist/core/history/drift-scan.d.ts +4 -0
  196. package/dist/core/history/drift-scan.js +1 -1
  197. package/dist/core/history/event-classification.js +1 -1
  198. package/dist/core/history/event-index.js +8 -7
  199. package/dist/core/history/history-compact-bulk.js +1 -1
  200. package/dist/core/history/history-diff.js +1 -1
  201. package/dist/core/history/history-rewrite.js +1 -1
  202. package/dist/core/history/history-storage-stats.js +1 -1
  203. package/dist/core/history/history-stream-policy.js +1 -1
  204. package/dist/core/history/history.js +2 -2
  205. package/dist/core/history/identity.js +1 -1
  206. package/dist/core/history/index.js +1 -1
  207. package/dist/core/history/operation-contract.js +1 -1
  208. package/dist/core/history/projection.js +1 -1
  209. package/dist/core/history/read.js +1 -1
  210. package/dist/core/history/replay.js +2 -1
  211. package/dist/core/history/tombstone.js +1 -1
  212. package/dist/core/history/version-address.js +1 -1
  213. package/dist/core/history/workspace-history.js +2 -2
  214. package/dist/core/io/body-file.js +1 -1
  215. package/dist/core/io/bulk-ids-input.js +2 -1
  216. package/dist/core/item/actionability.js +1 -1
  217. package/dist/core/item/dependency-reference.js +1 -1
  218. package/dist/core/item/id.js +1 -1
  219. package/dist/core/item/index.js +1 -1
  220. package/dist/core/item/item-format-version.js +1 -1
  221. package/dist/core/item/item-format.js +6 -4
  222. package/dist/core/item/item-record.js +1 -1
  223. package/dist/core/item/item-type-definition.js +1 -1
  224. package/dist/core/item/parent-reference-policy.js +1 -1
  225. package/dist/core/item/parse.js +8 -2
  226. package/dist/core/item/plan-lifecycle.js +1 -1
  227. package/dist/core/item/priority.js +1 -1
  228. package/dist/core/item/sprint-release-format.js +1 -1
  229. package/dist/core/item/status-filter.js +1 -1
  230. package/dist/core/item/status.js +1 -1
  231. package/dist/core/item/toon-decode.js +1 -1
  232. package/dist/core/item/type-registry.js +1 -1
  233. package/dist/core/item/type-synonyms.js +1 -1
  234. package/dist/core/lock/index.js +1 -1
  235. package/dist/core/lock/lock-gc.js +1 -1
  236. package/dist/core/lock/lock.js +3 -3
  237. package/dist/core/output/mutation-projection.js +1 -1
  238. package/dist/core/output/output-control.js +1 -1
  239. package/dist/core/output/output.js +22 -10
  240. package/dist/core/output/query-summary.js +1 -1
  241. package/dist/core/output/tabular.js +3 -1
  242. package/dist/core/packages/manifest.js +1 -1
  243. package/dist/core/packages/root.js +1 -1
  244. package/dist/core/policy/workflow-policy-schema.js +1 -1
  245. package/dist/core/policy/workflow-policy-store.js +1 -1
  246. package/dist/core/policy/workflow-policy.js +1 -1
  247. package/dist/core/profile/profile-describe.js +1 -1
  248. package/dist/core/profile/profile-lint.js +1 -1
  249. package/dist/core/profile/profile-plan.js +1 -1
  250. package/dist/core/profile/profile-presets.js +25 -1
  251. package/dist/core/reproducibility/context.js +1 -1
  252. package/dist/core/schema/fields-file.js +2 -2
  253. package/dist/core/schema/item-types-file.js +2 -2
  254. package/dist/core/schema/runtime-field-filters.js +1 -1
  255. package/dist/core/schema/runtime-field-values.js +1 -1
  256. package/dist/core/schema/runtime-schema.js +2 -2
  257. package/dist/core/schema/status-defs-file.js +2 -2
  258. package/dist/core/schema/status-token.js +1 -1
  259. package/dist/core/schema/type-inference.js +1 -1
  260. package/dist/core/schema/type-presets.js +1 -1
  261. package/dist/core/schema/type-workflows.js +1 -1
  262. package/dist/core/search/background-refresh.js +2 -2
  263. package/dist/core/search/bm25.js +1 -1
  264. package/dist/core/search/cache.js +2 -2
  265. package/dist/core/search/corpus.js +1 -1
  266. package/dist/core/search/embedding-batches.js +1 -1
  267. package/dist/core/search/eval-thresholds.js +1 -1
  268. package/dist/core/search/eval.js +1 -1
  269. package/dist/core/search/http-client.js +1 -1
  270. package/dist/core/search/providers.js +1 -1
  271. package/dist/core/search/relevance.js +1 -1
  272. package/dist/core/search/semantic-defaults.js +1 -1
  273. package/dist/core/search/staleness.js +1 -1
  274. package/dist/core/search/vector-stores.js +2 -2
  275. package/dist/core/search/vectorization-metadata.js +1 -1
  276. package/dist/core/sentry/helpers.js +1 -1
  277. package/dist/core/sentry/instrument.js +1 -1
  278. package/dist/core/session/session-state.js +1 -1
  279. package/dist/core/shared/agent-session-context.js +1 -1
  280. package/dist/core/shared/author.js +5 -1
  281. package/dist/core/shared/command-line.js +1 -1
  282. package/dist/core/shared/command-types.js +1 -1
  283. package/dist/core/shared/conflict-markers.js +1 -1
  284. package/dist/core/shared/constants.js +1 -1
  285. package/dist/core/shared/errors.js +1 -1
  286. package/dist/core/shared/html-entity-decode.js +1 -1
  287. package/dist/core/shared/index.js +1 -1
  288. package/dist/core/shared/item-metadata-contract.js +1 -1
  289. package/dist/core/shared/lazy-module.js +1 -1
  290. package/dist/core/shared/levenshtein.js +1 -1
  291. package/dist/core/shared/memo.js +1 -1
  292. package/dist/core/shared/numeric-parsers.js +1 -1
  293. package/dist/core/shared/option-alias-visibility.js +1 -1
  294. package/dist/core/shared/primitives.js +1 -1
  295. package/dist/core/shared/secret-rules.js +1 -1
  296. package/dist/core/shared/serial-queue.js +1 -1
  297. package/dist/core/shared/serialization.js +1 -1
  298. package/dist/core/shared/split-comma-list.js +1 -1
  299. package/dist/core/shared/text-normalization.js +1 -1
  300. package/dist/core/shared/time.js +2 -1
  301. package/dist/core/store/index.js +1 -1
  302. package/dist/core/store/item-format-migration.js +1 -1
  303. package/dist/core/store/item-metadata-cache.js +1 -1
  304. package/dist/core/store/item-metadata-query-index.js +7 -7
  305. package/dist/core/store/item-metadata-read-work.js +1 -1
  306. package/dist/core/store/item-store.js +1 -1
  307. package/dist/core/store/paths.js +1 -1
  308. package/dist/core/store/settings-concurrency.js +1 -1
  309. package/dist/core/store/settings-read-cache.js +1 -1
  310. package/dist/core/store/settings-validator.js +1 -1
  311. package/dist/core/store/settings.js +3 -3
  312. package/dist/core/store/tracker-preflight.js +1 -1
  313. package/dist/core/telemetry/consent.js +2 -2
  314. package/dist/core/telemetry/observability.js +1 -1
  315. package/dist/core/telemetry/policy.js +1 -1
  316. package/dist/core/telemetry/read-sampling.js +2 -2
  317. package/dist/core/telemetry/runtime.js +9 -5
  318. package/dist/core/test/background-runs.js +3 -3
  319. package/dist/core/test/item-test-run-tracking.js +1 -1
  320. package/dist/core/test/run-selectors.js +1 -1
  321. package/dist/core/validate/estimate-defaults.js +1 -1
  322. package/dist/core/validate/fix-planning.js +1 -1
  323. package/dist/core/validate/linked-artifact-reference.js +1 -1
  324. package/dist/core/validate/missing-by-type.js +1 -1
  325. package/dist/core/validate/missing-link-owners.js +1 -1
  326. package/dist/core/validate/stale-file-classification.js +1 -1
  327. package/dist/mcp/http-server.js +6 -4
  328. package/dist/mcp/legacy-adapter.js +1 -1
  329. package/dist/mcp/runtime-capabilities.js +1 -1
  330. package/dist/mcp/server.js +4 -4
  331. package/dist/mcp/tool-definitions.js +1 -1
  332. package/dist/sdk/actionability.js +1 -1
  333. package/dist/sdk/agent/closed-domain-contracts.js +1 -1
  334. package/dist/sdk/agent/command-recovery.js +1 -1
  335. package/dist/sdk/agent/command-suggestions.js +1 -1
  336. package/dist/sdk/agent/create-option-policy.js +1 -1
  337. package/dist/sdk/agent/identity-config.js +1 -1
  338. package/dist/sdk/agent/item-addressing.js +1 -1
  339. package/dist/sdk/agent/refusal-closure-census.js +2 -1
  340. package/dist/sdk/agent/refusal-closure.js +1 -1
  341. package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
  342. package/dist/sdk/agent/refusal-reachability.js +3 -1
  343. package/dist/sdk/agent/subcommand-recovery.js +1 -1
  344. package/dist/sdk/agent/task-transcript-contracts.js +1 -1
  345. package/dist/sdk/agent/tracker-preflight-contracts.js +1 -1
  346. package/dist/sdk/agent-capability-contracts.js +3 -1
  347. package/dist/sdk/agent-session-context.js +1 -1
  348. package/dist/sdk/annotations.js +1 -1
  349. package/dist/sdk/author-attribution.js +1 -1
  350. package/dist/sdk/authoring.js +1 -1
  351. package/dist/sdk/cli-bootstrap.js +1 -1
  352. package/dist/sdk/cli-contracts/agent-output-contracts.js +5 -3
  353. package/dist/sdk/cli-contracts/bootstrap-command-scanner.js +1 -1
  354. package/dist/sdk/cli-contracts/command-aliases.js +1 -1
  355. package/dist/sdk/cli-contracts/command-exit-contracts.js +1 -1
  356. package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
  357. package/dist/sdk/cli-contracts/commander-types.js +1 -1
  358. package/dist/sdk/cli-contracts/completeness.js +1 -1
  359. package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
  360. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  361. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +2 -1
  362. package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
  363. package/dist/sdk/cli-contracts/registration-helpers.js +7 -7
  364. package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
  365. package/dist/sdk/cli-contracts/schemas/assurance-definition.js +1 -1
  366. package/dist/sdk/cli-contracts/string-lists.js +1 -1
  367. package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
  368. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
  369. package/dist/sdk/cli-contracts/tool-schema.js +1 -1
  370. package/dist/sdk/cli-contracts/typed-action-inputs.js +1 -1
  371. package/dist/sdk/cli-contracts.js +1 -1
  372. package/dist/sdk/cli-program.js +1 -1
  373. package/dist/sdk/command-line.js +1 -1
  374. package/dist/sdk/comments.js +1 -1
  375. package/dist/sdk/compile-cache.js +1 -1
  376. package/dist/sdk/completion/bash.js +2 -1
  377. package/dist/sdk/completion/fish.js +13 -7
  378. package/dist/sdk/completion/shared.js +1 -1
  379. package/dist/sdk/completion/zsh.js +14 -8
  380. package/dist/sdk/completion.js +1 -1
  381. package/dist/sdk/compose.js +1 -1
  382. package/dist/sdk/config.js +1 -1
  383. package/dist/sdk/context/recency.js +1 -1
  384. package/dist/sdk/context/semantic-session-attribution.js +1 -1
  385. package/dist/sdk/context/usage-egress.js +1 -1
  386. package/dist/sdk/context/usage-ledger.js +6 -3
  387. package/dist/sdk/context-intent-contracts.js +1 -1
  388. package/dist/sdk/context-intent-runtime.js +1 -1
  389. package/dist/sdk/context-packing.js +1 -1
  390. package/dist/sdk/context-relevance.js +1 -1
  391. package/dist/sdk/context-signal-store.js +2 -2
  392. package/dist/sdk/context-usage.js +1 -1
  393. package/dist/sdk/contracts.js +1 -1
  394. package/dist/sdk/core-governance.js +1 -1
  395. package/dist/sdk/core.js +1 -1
  396. package/dist/sdk/corpus-shape.js +1 -1
  397. package/dist/sdk/define.js +1 -1
  398. package/dist/sdk/dependencies.js +1 -1
  399. package/dist/sdk/dependency-flag-validation.js +1 -1
  400. package/dist/sdk/dependency-provenance.js +1 -1
  401. package/dist/sdk/docs.js +1 -1
  402. package/dist/sdk/duplicates.js +1 -1
  403. package/dist/sdk/environment/agent-environment.js +1 -1
  404. package/dist/sdk/environment/host-environment-errors.js +1 -1
  405. package/dist/sdk/environment/project-runtime-compatibility.js +2 -1
  406. package/dist/sdk/environment/source-context.js +1 -1
  407. package/dist/sdk/environment/tracker-preflight.js +1 -1
  408. package/dist/sdk/error-code-catalog.js +1 -1
  409. package/dist/sdk/error-runtime.js +1 -1
  410. package/dist/sdk/errors.js +1 -1
  411. package/dist/sdk/eval.js +1 -1
  412. package/dist/sdk/extension/author-manifest.js +1 -1
  413. package/dist/sdk/extension/bundled-catalog.js +1 -1
  414. package/dist/sdk/extension/concurrency.js +1 -1
  415. package/dist/sdk/extension/copy-scope.js +1 -1
  416. package/dist/sdk/extension/custom-field-collisions.js +1 -1
  417. package/dist/sdk/extension/describe.js +4 -2
  418. package/dist/sdk/extension/doctor.js +1 -1
  419. package/dist/sdk/extension/install-plan.js +1 -1
  420. package/dist/sdk/extension/install-receipts.js +1 -1
  421. package/dist/sdk/extension/install-runtime.js +3 -3
  422. package/dist/sdk/extension/install-snapshot.js +1 -1
  423. package/dist/sdk/extension/install-sources.js +5 -5
  424. package/dist/sdk/extension/managed-state.js +2 -2
  425. package/dist/sdk/extension/migrations.js +2 -2
  426. package/dist/sdk/extension/output-ownership.js +1 -1
  427. package/dist/sdk/extension/runtime-summary.js +1 -1
  428. package/dist/sdk/extension/scaffold.js +11 -4
  429. package/dist/sdk/extension/shared.js +1 -1
  430. package/dist/sdk/extension/source-resolution.js +1 -1
  431. package/dist/sdk/extension/static-inventory.js +1 -1
  432. package/dist/sdk/extension/update-check.js +1 -1
  433. package/dist/sdk/extension-command-context.js +1 -1
  434. package/dist/sdk/extension-contracts.js +1 -1
  435. package/dist/sdk/extension.js +1 -1
  436. package/dist/sdk/files.js +1 -1
  437. package/dist/sdk/flag-invocation-contracts.js +1 -1
  438. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  439. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  440. package/dist/sdk/generated-error-code-catalog.js +1 -1
  441. package/dist/sdk/governance/assurance-action-contracts.js +1 -1
  442. package/dist/sdk/governance/assurance-action.js +1 -1
  443. package/dist/sdk/governance/assurance-limits.js +1 -1
  444. package/dist/sdk/governance/assurance-mutation-error.js +1 -1
  445. package/dist/sdk/governance/assurance-presets.js +1 -1
  446. package/dist/sdk/governance/assurance-runtime.js +1 -1
  447. package/dist/sdk/governance/assurance.js +4 -4
  448. package/dist/sdk/governance/boundary-fixtures.js +1 -1
  449. package/dist/sdk/governance/closure-timestamps.js +1 -1
  450. package/dist/sdk/governance/coverage-assurance.js +1 -1
  451. package/dist/sdk/governance/defect-recurrence-coverage.js +1 -1
  452. package/dist/sdk/governance/defect-recurrence-graph.js +1 -1
  453. package/dist/sdk/governance/defect-recurrence-signals.js +1 -1
  454. package/dist/sdk/governance/defect-recurrence.js +1 -1
  455. package/dist/sdk/governance/extension-host-version.js +1 -1
  456. package/dist/sdk/governance/gc.js +1 -1
  457. package/dist/sdk/governance/health-merge-evidence.js +1 -1
  458. package/dist/sdk/governance/health.js +2 -1
  459. package/dist/sdk/governance/hierarchy-validation.js +1 -1
  460. package/dist/sdk/governance/linked-file-report.js +1 -1
  461. package/dist/sdk/governance/merge-receipt-history.js +1 -1
  462. package/dist/sdk/governance/provenance-health.js +4 -1
  463. package/dist/sdk/governance/reindex.js +5 -4
  464. package/dist/sdk/governance/stale-work.js +1 -1
  465. package/dist/sdk/governance/status-role-diagnostics.js +1 -1
  466. package/dist/sdk/governance/storage-integrity.js +1 -1
  467. package/dist/sdk/governance/tracked-runtime-cache.js +1 -1
  468. package/dist/sdk/governance/upgrade.js +2 -2
  469. package/dist/sdk/governance/validate-history-drift.js +1 -1
  470. package/dist/sdk/governance/validate-item-reader.js +1 -1
  471. package/dist/sdk/governance/validate-normalization.js +1 -1
  472. package/dist/sdk/governance/validate.js +1 -1
  473. package/dist/sdk/governance/workflow-completeness.js +1 -1
  474. package/dist/sdk/governance/workflow-policy.js +3 -3
  475. package/dist/sdk/governance/workspace-position.js +2 -1
  476. package/dist/sdk/governance.js +1 -1
  477. package/dist/sdk/graph/adapter.js +1 -1
  478. package/dist/sdk/graph/analytics.js +1 -1
  479. package/dist/sdk/graph/assembly.js +1 -1
  480. package/dist/sdk/graph/cache.js +1 -1
  481. package/dist/sdk/graph/centrality.js +1 -1
  482. package/dist/sdk/graph/conformance.js +1 -1
  483. package/dist/sdk/graph/deadline-scheduling.js +1 -1
  484. package/dist/sdk/graph/durable-cache.js +1 -1
  485. package/dist/sdk/graph/governance-contracts.js +1 -1
  486. package/dist/sdk/graph/governance.js +1 -1
  487. package/dist/sdk/graph/hierarchy-integrity.js +1 -1
  488. package/dist/sdk/graph/index.js +1 -1
  489. package/dist/sdk/graph/lifecycle-coverage.js +1 -1
  490. package/dist/sdk/graph/mutation-advisory.js +1 -1
  491. package/dist/sdk/graph/query-contracts.js +1 -1
  492. package/dist/sdk/graph/remediation.js +1 -1
  493. package/dist/sdk/graph/run.js +1 -1
  494. package/dist/sdk/graph/scheduling.js +1 -1
  495. package/dist/sdk/graph/traversal.js +1 -1
  496. package/dist/sdk/graph/workspace-relationship-kind-registry.js +1 -1
  497. package/dist/sdk/graph.js +1 -1
  498. package/dist/sdk/guide-topics.js +1 -1
  499. package/dist/sdk/guide.js +8 -1
  500. package/dist/sdk/history/attestation-command.js +1 -1
  501. package/dist/sdk/history/attestation-contract.js +1 -1
  502. package/dist/sdk/history/attestation-scan.js +1 -1
  503. package/dist/sdk/history/attestation.js +1 -1
  504. package/dist/sdk/history/maintenance.js +1 -1
  505. package/dist/sdk/history/salvage.js +3 -2
  506. package/dist/sdk/history/subject.js +1 -1
  507. package/dist/sdk/history-analytics.js +1 -1
  508. package/dist/sdk/history-compact.js +1 -1
  509. package/dist/sdk/history-mcp.js +1 -1
  510. package/dist/sdk/history-provenance.js +1 -1
  511. package/dist/sdk/history-read.js +1 -1
  512. package/dist/sdk/history-redact.js +1 -1
  513. package/dist/sdk/history-repair.js +1 -1
  514. package/dist/sdk/improvement-ledger-validation.js +1 -1
  515. package/dist/sdk/improvement-ledger.js +2 -2
  516. package/dist/sdk/index.js +1 -1
  517. package/dist/sdk/init-agent-guidance.js +16 -2
  518. package/dist/sdk/init.js +16 -2
  519. package/dist/sdk/invocation-author.js +1 -1
  520. package/dist/sdk/item-children.js +1 -1
  521. package/dist/sdk/item-metadata-index.js +1 -1
  522. package/dist/sdk/item-schedule.js +1 -1
  523. package/dist/sdk/item-transaction.js +1 -1
  524. package/dist/sdk/learnings.js +1 -1
  525. package/dist/sdk/lifecycle/append.js +4 -2
  526. package/dist/sdk/lifecycle/claim.js +1 -1
  527. package/dist/sdk/lifecycle/close-many.js +1 -1
  528. package/dist/sdk/lifecycle/close.js +1 -1
  529. package/dist/sdk/lifecycle/copy.js +1 -1
  530. package/dist/sdk/lifecycle/create.js +1 -1
  531. package/dist/sdk/lifecycle/delete.js +1 -1
  532. package/dist/sdk/lifecycle/event-validation-messages.js +1 -1
  533. package/dist/sdk/lifecycle/focus.js +1 -1
  534. package/dist/sdk/lifecycle/hierarchy-mutation-lock.js +1 -1
  535. package/dist/sdk/lifecycle/legacy-none-tokens.js +1 -1
  536. package/dist/sdk/lifecycle/lifecycle-transitions.js +1 -1
  537. package/dist/sdk/lifecycle/mcp-actions.js +1 -1
  538. package/dist/sdk/lifecycle/metadata-normalizers.js +1 -1
  539. package/dist/sdk/lifecycle/mutation-command-options.js +1 -1
  540. package/dist/sdk/lifecycle/plan-mutation-receipt.js +1 -1
  541. package/dist/sdk/lifecycle/plan.js +1 -1
  542. package/dist/sdk/lifecycle/recurrence-parsers.js +1 -1
  543. package/dist/sdk/lifecycle/reopen.js +1 -1
  544. package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +2 -1
  545. package/dist/sdk/lifecycle/restore.js +1 -1
  546. package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
  547. package/dist/sdk/lifecycle/task-composition.js +1 -1
  548. package/dist/sdk/lifecycle/update-many.js +1 -1
  549. package/dist/sdk/lifecycle/update.js +2 -1
  550. package/dist/sdk/lifecycle-completion.js +1 -1
  551. package/dist/sdk/lifecycle-policy.js +1 -1
  552. package/dist/sdk/linked-artifacts.js +2 -1
  553. package/dist/sdk/mcp/apps.js +1 -1
  554. package/dist/sdk/mcp/authorization.js +1 -1
  555. package/dist/sdk/mcp/discovery.js +1 -1
  556. package/dist/sdk/mcp/interactions.js +1 -1
  557. package/dist/sdk/mcp/protocol.js +1 -1
  558. package/dist/sdk/mcp/skills.js +3 -1
  559. package/dist/sdk/mcp/subscriptions.js +1 -1
  560. package/dist/sdk/mcp/tasks.js +2 -2
  561. package/dist/sdk/mcp/transport.js +1 -1
  562. package/dist/sdk/merge/abandoned-receipts.js +1 -1
  563. package/dist/sdk/merge/driver.js +1 -1
  564. package/dist/sdk/merge/index.js +1 -1
  565. package/dist/sdk/merge/install.js +4 -2
  566. package/dist/sdk/merge/receipt-file-boundary.js +1 -1
  567. package/dist/sdk/merge/receipt-operation.js +1 -1
  568. package/dist/sdk/merge/receipt-schema.js +1 -1
  569. package/dist/sdk/merge/receipts.js +4 -4
  570. package/dist/sdk/merge/reconcile.js +1 -1
  571. package/dist/sdk/merge/three-way.js +3 -2
  572. package/dist/sdk/merge/worktree-config.js +1 -1
  573. package/dist/sdk/merge.js +1 -1
  574. package/dist/sdk/mutation-events.js +1 -1
  575. package/dist/sdk/mutation-guard.js +1 -1
  576. package/dist/sdk/notes.js +1 -1
  577. package/dist/sdk/output-contracts.js +1 -1
  578. package/dist/sdk/output-projection.js +1 -1
  579. package/dist/sdk/output-token-accounting.js +1 -1
  580. package/dist/sdk/output.js +2 -1
  581. package/dist/sdk/ownership-source.js +1 -1
  582. package/dist/sdk/package-import-adapters.js +1 -1
  583. package/dist/sdk/package-migrations.js +1 -1
  584. package/dist/sdk/package-runtime-options.js +1 -1
  585. package/dist/sdk/pagination.js +1 -1
  586. package/dist/sdk/profile.js +5 -1
  587. package/dist/sdk/provenance.js +1 -1
  588. package/dist/sdk/public-surface.json +1 -1
  589. package/dist/sdk/query/activity.js +1 -1
  590. package/dist/sdk/query/aggregate.js +1 -1
  591. package/dist/sdk/query/calendar.js +4 -1
  592. package/dist/sdk/query/complete-list.js +1 -1
  593. package/dist/sdk/query/context.js +2 -1
  594. package/dist/sdk/query/duplicate-candidates.js +1 -1
  595. package/dist/sdk/query/get.d.ts +14 -2
  596. package/dist/sdk/query/get.js +1 -1
  597. package/dist/sdk/query/history.js +1 -1
  598. package/dist/sdk/query/item-filter-options.js +1 -1
  599. package/dist/sdk/query/light-metadata.js +1 -1
  600. package/dist/sdk/query/list-filter-shared.js +1 -1
  601. package/dist/sdk/query/list.js +1 -1
  602. package/dist/sdk/query/multi-value-filters.js +1 -1
  603. package/dist/sdk/query/next-ready-budget.js +1 -1
  604. package/dist/sdk/query/next.js +2 -1
  605. package/dist/sdk/query/parsers.js +1 -1
  606. package/dist/sdk/query/projection-contracts.js +1 -1
  607. package/dist/sdk/query/search/corpus.js +2 -1
  608. package/dist/sdk/query/search/filters.js +1 -1
  609. package/dist/sdk/query/search/input.js +1 -1
  610. package/dist/sdk/query/search/lexical.js +1 -1
  611. package/dist/sdk/query/search/response.js +1 -1
  612. package/dist/sdk/query/search/semantic.js +3 -2
  613. package/dist/sdk/query/search/types.js +1 -1
  614. package/dist/sdk/query/search-contracts.js +1 -1
  615. package/dist/sdk/query/search-pagination.js +1 -1
  616. package/dist/sdk/query/search-rendering.js +1 -1
  617. package/dist/sdk/query/search.js +1 -1
  618. package/dist/sdk/query/workspace-contracts.js +1 -1
  619. package/dist/sdk/query.js +1 -1
  620. package/dist/sdk/read-output/continuation.js +1 -1
  621. package/dist/sdk/read-output/options.js +1 -1
  622. package/dist/sdk/read-output/provenance.js +1 -1
  623. package/dist/sdk/read-output-budget.js +1 -1
  624. package/dist/sdk/read-output-contracts.js +1 -1
  625. package/dist/sdk/read-output-rows.js +1 -1
  626. package/dist/sdk/read-output-session.js +1 -1
  627. package/dist/sdk/relationship-analytics.js +1 -1
  628. package/dist/sdk/relationship-context.js +1 -1
  629. package/dist/sdk/relationship-history.js +7 -4
  630. package/dist/sdk/relationship-kinds/contract.js +1 -1
  631. package/dist/sdk/relationship-migration.js +1 -1
  632. package/dist/sdk/relationships.js +1 -1
  633. package/dist/sdk/reproducibility/process.js +1 -1
  634. package/dist/sdk/runtime/actions.js +1 -1
  635. package/dist/sdk/runtime/context.js +1 -1
  636. package/dist/sdk/runtime/schema-preview.js +1 -1
  637. package/dist/sdk/runtime/schema.js +1 -1
  638. package/dist/sdk/runtime-action-aliases.js +1 -1
  639. package/dist/sdk/runtime-extended-actions.js +1 -1
  640. package/dist/sdk/runtime-input.js +1 -1
  641. package/dist/sdk/runtime-primitives.js +1 -1
  642. package/dist/sdk/runtime-public-contracts.js +1 -1
  643. package/dist/sdk/runtime-stats-options.js +1 -1
  644. package/dist/sdk/runtime.js +1 -1
  645. package/dist/sdk/scheduling-shortcuts.js +1 -1
  646. package/dist/sdk/schema-migration.js +4 -3
  647. package/dist/sdk/schema.js +7 -1
  648. package/dist/sdk/search-refresh-worker.js +1 -1
  649. package/dist/sdk/similarity-scoring.js +1 -1
  650. package/dist/sdk/similarity.js +1 -1
  651. package/dist/sdk/start-task-status.js +1 -1
  652. package/dist/sdk/stats.js +1 -1
  653. package/dist/sdk/structured-mutations.js +1 -1
  654. package/dist/sdk/telemetry-flush.js +1 -1
  655. package/dist/sdk/telemetry.js +4 -3
  656. package/dist/sdk/templates.js +26 -2
  657. package/dist/sdk/test/batch.js +2 -2
  658. package/dist/sdk/test/entry.js +1 -1
  659. package/dist/sdk/test/execution.js +6 -5
  660. package/dist/sdk/test/json-path.js +1 -1
  661. package/dist/sdk/test/linked-command-detection.js +1 -1
  662. package/dist/sdk/test/measurements.js +1 -1
  663. package/dist/sdk/test/parsers.js +1 -1
  664. package/dist/sdk/test/runs.js +1 -1
  665. package/dist/sdk/test/trust.js +2 -2
  666. package/dist/sdk/test/workspace-snapshot.js +1 -1
  667. package/dist/sdk/testing.js +7 -4
  668. package/dist/sdk/traceability/runtime-files-lookup.js +1 -1
  669. package/dist/sdk/traceability/source-traceability.js +2 -1
  670. package/dist/sdk/tracker-root-discovery.js +1 -1
  671. package/dist/sdk/workspace-contracts-cache.js +1 -1
  672. package/dist/sdk/workspace-contracts.js +1 -1
  673. package/dist/sdk/workspace-memory.js +2 -2
  674. package/dist/sdk/workspace-recipe.js +1 -1
  675. package/dist/sdk/workspace-snapshot.js +5 -4
  676. package/dist/sdk/workspace-transaction-gc.js +1 -1
  677. package/dist/sdk/workspace-transaction.js +2 -2
  678. package/dist/sdk/workspace.js +3 -2
  679. package/dist/types/index.js +1 -1
  680. package/dist/types.js +1 -1
  681. package/docs/AGENT_EVIDENCE_CONSISTENCY.md +88 -0
  682. package/docs/GET_READ_EVIDENCE.md +68 -0
  683. package/docs/README.md +2 -0
  684. package/marketplace.json +2 -2
  685. package/package.json +1 -1
  686. package/packages/pm-beads/package.json +1 -1
  687. package/packages/pm-calendar/package.json +1 -1
  688. package/packages/pm-command-kit/package.json +1 -1
  689. package/packages/pm-digital-twin/package.json +1 -1
  690. package/packages/pm-governance-audit/package.json +1 -1
  691. package/packages/pm-guide-shell/package.json +1 -1
  692. package/packages/pm-kanban/package.json +1 -1
  693. package/packages/pm-lifecycle-hooks/package.json +1 -1
  694. package/packages/pm-linked-test-adapters/package.json +1 -1
  695. package/packages/pm-search-advanced/package.json +1 -1
  696. package/packages/pm-templates/package.json +1 -1
  697. package/packages/pm-todos/package.json +1 -1
  698. package/packages/pm-vcs/extensions/vcs/index.ts +4 -2
  699. package/packages/pm-vcs/package.json +1 -1
  700. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  701. package/plugins/pm-claude/package.json +2 -2
  702. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  703. package/plugins/pm-codex/package.json +2 -2
  704. package/plugins/pm-codex/plugin.json +1 -1
  705. package/scripts/finalize-build.mjs +3 -2
  706. package/dist/cli-bundle/chunks/chunk-7UVXKI7K.js +0 -2
  707. package/dist/cli-bundle/chunks/chunk-D7Z2ZMJL.js +0 -3
  708. package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
  709. package/dist/cli-bundle/chunks/chunk-J52QIRRZ.js +0 -80
  710. package/dist/cli-bundle/chunks/chunk-JDKD3WGG.js +0 -6
  711. package/dist/cli-bundle/chunks/chunk-JQ7DW663.js +0 -2
  712. package/dist/cli-bundle/chunks/chunk-QXIDOOWT.js +0 -20
  713. package/dist/cli-bundle/chunks/chunk-SGFQQXFD.js +0 -2
  714. package/dist/cli-bundle/chunks/chunk-V3U77H3V.js +0 -31
  715. package/dist/cli-bundle/chunks/chunk-XZDWAYJC.js +0 -3
  716. package/dist/cli-bundle/chunks/chunk-Y6VRBTP3.js +0 -238
  717. package/dist/cli-bundle/chunks/chunk-YAAFYFS4.js +0 -8
  718. package/dist/cli-bundle/chunks/register-mutation-53ZLT4RX.js +0 -20
  719. package/dist/cli-bundle/chunks/register-operations-OBK2FXUU.js +0 -2
  720. package/dist/cli-bundle/chunks/register-setup-HM3OCBH2.js +0 -2
  721. package/dist/cli-bundle/focused-chunks/chunk-2JFYR56O.js +0 -2
  722. package/dist/cli-bundle/focused-chunks/chunk-32EVUSS4.js +0 -8
  723. package/dist/cli-bundle/focused-chunks/chunk-5GUSO2P4.js +0 -20
  724. package/dist/cli-bundle/focused-chunks/chunk-6XBRADQQ.js +0 -3
  725. package/dist/cli-bundle/focused-chunks/chunk-CURTIIQT.js +0 -2
  726. package/dist/cli-bundle/focused-chunks/chunk-IJUWEEEB.js +0 -6
  727. package/dist/cli-bundle/focused-chunks/chunk-JMJK2L4Z.js +0 -3
  728. package/dist/cli-bundle/focused-chunks/chunk-KG3H4UZZ.js +0 -30
  729. package/dist/cli-bundle/focused-chunks/chunk-MHQ2XICU.js +0 -2
  730. package/dist/cli-bundle/focused-chunks/chunk-RJV6QVJE.js +0 -75
  731. package/dist/cli-bundle/focused-chunks/chunk-ZE2JZ7R6.js +0 -12
  732. package/dist/cli-bundle/focused-chunks/chunk-ZLEN4HZD.js +0 -165
@@ -1,11 +1,11 @@
1
- import{b as g,c as I,d as F}from"./chunk-GZMWISWW.js";import{a as de}from"./chunk-D7Z2ZMJL.js";import{L as ne,P as ie,U as ae,n as te,u as A,w as oe}from"./chunk-JDKD3WGG.js";import{$a as Q,Gc as K,Sc as W,Uc as X,Wc as Y,Yb as V,Zc as Z,_c as ee,aa as q,ad as re,bd as se,cd as le,na as L}from"./chunk-QXIDOOWT.js";import"./chunk-DEZPZOQ7.js";import{Df as S,Gc as k,Jf as v,Mf as f,Nf as m,Ro as y,Uo as s,Wo as d,ab as O,cp as G,dp as M,ep as $,fp as B,gp as U,hp as N,ip as z,jp as P,kp as H,l as E,lp as J,m as C,mm as R,na as c,nm as T,pa as u,qi as j}from"./chunk-Y6VRBTP3.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]="19d28e23-5337-5ec0-83e6-6e43b462ece7")}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]="10ce695f-65e7-5ea4-bdd8-472ad9527506")}catch{}})();async function fe(e,t){let o=y(t),i=Date.now();if([e.raw,e.compact,e.full,e.provenance].filter(l=>l===!0).length>1)throw new u("Activity projection options are mutually exclusive. Use --raw, --compact, --provenance, or --full.",c.USAGE);let a=P(e.stream);if(a&&!o.json)throw new u("--stream requires --json output mode.",c.USAGE);let n=z(e),r=await V(a&&e.full!==!0&&e.provenance!==!0?{...n,raw:!0,compact:!0}:n,o);a?B(r,n,o):f(r,o),o.profile&&m(`profile:command=activity took_ms=${Date.now()-i}`)}function D(e){e.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)",s).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",s).option("--stream [mode]","Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl").description("Show recent activity across items.").action(fe)}(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]="1a62fe05-4407-5e76-87fa-5109dcca5640")}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]="25c5349b-60d7-505b-98b0-3ed19e44b791")}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]="b40cde4c-ca5a-522d-a731-52503c7e4fe0")}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]="9212f45c-798d-5774-87ce-bb7d6ff5514a")}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]="deee1339-ac17-5ae9-8add-a9dd766d182e")}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]="de0fbee0-0bcf-5a46-9013-f7f883d3d0a3")}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]="b662e21b-a163-5834-8789-65243f4c7c9c")}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]="5cc1722c-b797-5b95-a493-3925003ba72e")}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]="35c679a2-9d47-51fa-8bd2-175a4ec48d6b")}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]="b87b0c47-74ba-5095-b6b5-a10061d6d45a")}catch{}})();function ye(e,t){return!t||t.size===0?!0:e==="context"?t.has("context")||t.has("ctx"):t.has(e)}function ce(e){if(e===void 0)return;if(typeof e!="string")throw new u("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 u("List --format must be one of csv|table|json|ndjson|toon",c.USAGE)}function _(e,t,o,i=!1){if(t===void 0)return o;if(typeof t!="string")throw new u(`${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 u(`${e} --format must be one of ${i?"json|ndjson|toon":"json|toon"}`,c.USAGE);if(o.json===!0&&a==="toon")throw new u(`${e} cannot combine --json with --format toon`,c.USAGE);return{...o,json:a==="json"||a==="ndjson"}}function he(e,t){q[t]==="brief"&&e.includeBody!==!0&&e.compact!==!0&&e.brief!==!0&&e.full!==!0&&e.fields===void 0&&(e.brief=!0)}function ue(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 ve={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 ge(e,t){let o=e.stream===!0,i=ce(e.format),a=i==="csv"||i==="table",n=i==="json"||i==="ndjson"||i==="toon"?_("List",e.format,t,!0):t;if(o&&!n.json)throw new u("--stream requires --json output mode.",c.USAGE);if((a||i==="ndjson")&&o)throw new u("--format csv|table|ndjson cannot be combined with --stream.",c.USAGE);return{streamMode:o,listFormat:i,effectiveGlobal:n}}function be(e,t,o){if(o.listFormat==="csv"||o.listFormat==="table"){k(t);let i=t.items,a=o.listFormat==="csv"?R(i):T(i);!o.effectiveGlobal.quiet&&a.length>0&&v(`${a}
2
- `)}else if(o.listFormat==="ndjson"){k(t);let i=I(t.items);!o.effectiveGlobal.quiet&&i.length>0&&v(`${i}
3
- `)}else o.streamMode?$(e,t,o.effectiveGlobal):f(t,o.effectiveGlobal)}async function we(e){let t=y(e.actionCommand),o=e.aliasContract?{...t,command:e.aliasContract.canonical}:t,i=Date.now();e.aliasContract?.lifecycle==="deprecated"&&await j(O(process.cwd(),o.path)).then(me=>me.ux.deprecation_hints)&&m(C(e.aliasContract));let a=S("list",e.options),n=G(a),r=xe(e,n),{effectiveName:l,effectiveStatus:h,effectiveDependencyBlocked:p,effectiveExcludeTerminal:w}=r;he(n,l),Object.assign(n,{projectionCommand:l}),w&&(n.excludeTerminal=!0),n.dependencyBlocked=p;let x=ge(a,o),pe=await L(p?void 0:h,n,o);be("list",pe,x),o.profile&&m(`profile:command=list took_ms=${Date.now()-i}`)}function xe(e,t){let o=e.name,i=e.status,a=e.dependencyBlocked===!0,n=e.excludeTerminal===!0,r=t.status?.trim().toLowerCase(),l=e.name==="list"&&r!==void 0?ve[r]:void 0;return e.name==="list"&&(e.options.all===!0||r==="all"?(o="list-all",n=!1,t.status=void 0):r!==void 0&&l!==void 0&&(o=l.name,i=r,a=l.dependencyBlocked,n=!1,t.status=void 0)),(o==="list-open"||o==="list-in-progress")&&(t.lifecycleBucket=o==="list-open"?"open":"in_progress",i=void 0),{effectiveName:o,effectiveStatus:i,effectiveDependencyBlocked:a,effectiveExcludeTerminal:n}}function ke(e,t){let{name:o,description:i,status:a,excludeTerminal:n,allowStatusFilter:r,dependencyBlocked:l,aliasContract:h}=t,p=e.command(o,{hidden:h?.hidden===!0}).description(i);r&&p.option("--status <value>","Filter by status (repeatable or comma-separated; matches any; all selects every status)",s),o==="list"&&p.option("--all","Include every lifecycle status"),p.option("--for <intent>",`Apply a declared context intent projection. ${g("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)",s).option("--tag <value>","Filter by tag (repeatable or comma-separated; matches any)",s).option("--priority <value>","Filter by priority (repeatable or comma-separated; matches any)",s).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>","Updated since ISO timestamp or signed relative (-2h/-7d for past); use last-window 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",s).option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--parent <value>","Filter by parent item ID").option("--sprint <value>","Filter by sprint",s).option("--release <value>","Filter by release",s).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>","Alias for --output-limit; --output-budget may cap rows").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). ${g(o,"--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)"),ue(p),p.action(async(w,x)=>{await we({name:o,status:a,excludeTerminal:n,dependencyBlocked:l,options:w,actionCommand:x,aliasContract:h})}),d(p,"--tags <value>","Alias for --tag"),d(p,"--assignee_filter <value>","Alias for --assignee-filter"),d(p,"--tree_depth <n>","Alias for --tree-depth"),d(p,"--token_budget <n>","Alias for --token-budget"),d(p,"--filter-estimate-missing","Alias for --filter-estimates-missing")}async function Se(e,t){let o=y(t),i=Date.now(),a=await te(M(e),o);f(a,o),o.profile&&m(`profile:command=aggregate took_ms=${Date.now()-i}`)}async function _e(e,t){let o=y(t),i=Date.now(),a=H(S("context",e)),n=await X(a,o),r=K(a,o);if(r==="markdown")o.quiet||v(`${W(n)}
4
- `);else if(r==="ndjson"){k(n);let l=I([...n.high_level,...n.low_level,...n.blocked_fallback]);!o.quiet&&l.length>0&&v(`${l}
5
- `)}else f(n,{...o,json:r==="json"});o.profile&&m(`profile:command=context took_ms=${Date.now()-i}`)}async function Ie(e,t){let o=y(t),i=Date.now(),a=J(S("next",e)),n=await Z(a,o),r=Y(a,o);r==="markdown"?o.quiet||v(`${ee(n)}
6
- `):f(n,{...o,json:r==="json"}),o.profile&&m(`profile:command=next took_ms=${Date.now()-i}`)}async function Ae(e,t,o){let i=y(o),a=Date.now(),n=N(e),r=S("search",t,[n]),l=U(r),h=await ne(n,l,i),p=typeof r.format=="string"?r.format.trim().toLowerCase():void 0,w=_("Search",r.format,i,!0);if(p==="ndjson"){k(h);let x=I(h.items);!w.quiet&&x.length>0&&v(`${x}
7
- `)}else f(h,w);i.profile&&m(`profile:command=search took_ms=${Date.now()-a}`)}async function Fe(e,t){let o=y(t),i=Date.now(),a=await ae({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},o);if(f(a,_("Eval",e.format,o)),o.profile&&m(`profile:command=eval took_ms=${Date.now()-i}`),!a.passed)throw new u("Eval gate failed: one or more aggregate or per-query thresholds were not met; inspect the metric report",c.GENERIC_FAILURE)}async function De(e,t,o){let i=y(o),a=Date.now(),n=S("get",t,[e]),r=await A(e,i,{depth:typeof n.depth=="string"?n.depth:void 0,fields:typeof n.fields=="string"?n.fields:void 0,full:!!n.full,tree:n.tree===!0,treeDepth:typeof n.treeDepth=="string"?n.treeDepth:typeof n.tree_depth=="string"?n.tree_depth:void 0,at:typeof n.at=="string"?n.at:void 0});f(r,_("Get",n.format,i)),i.profile&&m(`profile:command=get took_ms=${Date.now()-a}`)}async function Ee(e,t,o){let i=y(o),a=Date.now();if([t.compact,t.raw,t.full,t.provenance].filter(h=>h===!0).length>1)throw new u("History projection options are mutually exclusive. Use --compact, --provenance, or --full.",c.USAGE);let n=typeof t.field=="string"?t.field:void 0,r=!!t.strictExit||!!t.failOnWarn;if(r&&!t.verify)throw new u("--strict-exit requires --verify (it gates on the verification result).",c.USAGE);let l=await oe(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||n!==void 0,field:n,verify:!!t.verify},i);f(l,_("History",t.format,i)),r&&l.verification&&!l.verification.ok&&(process.exitCode=c.GENERIC_FAILURE),i.profile&&m(`profile:command=history took_ms=${Date.now()-a}`)}function b(e,t){let o=e[t];return Array.isArray(o)?o:void 0}function Ce(e,t){let o=b(e,"harness"),i=b(e,"agentInstance"),a=b(e,"provenanceFilter"),n=typeof e.cursorMode=="string"?e.cursorMode:void 0;if(n!==void 0&&n!=="batch"&&n!=="row")throw new u("Events --cursor-mode must be batch or row.",c.USAGE,{code:"invalid_event_cursor_mode"});let r=n;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}:{},...o===void 0?{}:{harness:o},...i===void 0?{}:{agentInstance:i},...a===void 0?{}:{provenanceFilter:a},cursorMode:r}}async function Oe(e,t,o){if(t.provenanceSummary===!0)throw new u("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 le({...e,intervalMs:i}))o||v(`${JSON.stringify(a)}
8
- `);return}for await(let a of se({...e,intervalMs:i}))o||v(`${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 je(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 Re(e,t){let o=y(t),i=Date.now(),a=Ce(e,o.path);if(e.follow===!0){await Oe(a,e,o.quiet===!0);return}let n=await re(a);if(k(n),o.json){f(n,o),o.profile&&m(`profile:command=events took_ms=${Date.now()-i}`);return}let r=je(n);!o.quiet&&r.length>0&&v(`${r}
10
- `),o.profile&&m(`profile:command=events took_ms=${Date.now()-i}`)}async function Te(e,t,o,i,a){let n=y(a),r=Date.now(),l=await Q(e,t,o,{...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},n);f(l,n),n.profile&&m(`profile:command=graph took_ms=${Date.now()-r}`)}function Ft(e,t){let o=t?.commandFilter,i=n=>ye(n,o),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 n of a)if(i(n.name)){let r=E(n.name);ke(e,{...n,...r?.registration==="commander"?{aliasContract:r}:{}})}if(i("aggregate")){let n=e.command("aggregate").description("Group item counts and numeric measures.").option("--set-mode <value>","Set grouping: element (default)|tuple").option("--limit <value>","Group page size (default: 50)").option("--after <value>","Continue with next_after cursor").option("--group-by <value>","Fields: parent,type,priority,status,assignee,tags,sprint,release (comma-separated)").option("--count","Counts (default)").option("--completion","Status counts and completion_pct").option("--sum <field>","Group numeric sum").option("--avg <field>","Group numeric average").option("--include-unparented","Keep unparented group").option("--status <value>","Item status").option("--type <value>","Item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--deadline-before <value>","Latest deadline (ISO/date or relative)").option("--deadline-after <value>","Earliest deadline (ISO/date or relative)").option("--assignee <value>","Filter by assignee").option("--assignee-filter <value>","Assignee presence: assigned|unassigned").option("--parent <value>","Parent ID").option("--sprint <value>","Filter by sprint").option("--release <value>","Filter by release");d(n,"--include_unparented","Alias for --include-unparented"),d(n,"--assignee_filter <value>","Alias for --assignee-filter"),n.action(Se)}if(i("context")){let n=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. ${g("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(n,"--assignee_filter <value>","Alias for --assignee-filter"),d(n,"--max-items <n>","Alias for --limit"),d(n,"--explain_ranking","Alias for --explain-ranking"),d(n,"--token_budget <n>","Alias for --token-budget"),n.action(_e)}if(i("next")){let n=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. ${g("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(n,"--assignee_filter <value>","Alias for --assignee-filter"),d(n,"--blocked_limit <n>","Alias for --blocked-limit"),d(n,"--ready_only","Alias for --ready-only"),d(n,"--explain_ranking","Alias for --explain-ranking"),d(n,"--token_budget <n>","Alias for --token-budget"),n.action(Ie)}if(i("search")){let n=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. ${g("search","--for")}`).option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--mode <value>","Search mode: keyword|semantic|hybrid (default: auto)").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). ${g("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");ue(n),n.action(Ae),d(n,"--tags <value>","Alias for --tag"),d(n,"--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 (${ie}); default: search/eval-queries.json; errors show an example`).option("--format <value>","Eval output format override: json|toon").action(Fe),i("get")){let n=e.command("get").argument("<id>","Item id").option("--for <intent>",`Apply a declared context intent projection. ${g("get","--for")}`).option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--depth <value>","brief|standard|deep|full (default: standard)").option("--full","Full details and children for any type; excludes --depth/--fields").option("--fields <value>",`Render custom comma-separated item metadata fields. ${g("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(De);d(n,"--tree_depth <n>","Alias for --tree-depth"),d(n,"--token_budget <n>","Alias for --token-budget")}if(i("history")){let n=e.command("history").enablePositionalOptions().argument("<id>","Item id").option("--limit <n>","Latest n entries").option("--compact","Index, time, op, author, patch count, fields").option("--full","Full entries with JSON Patches").option("--provenance","Authors and provenance; no patches").option("--provenance-summary","Count provenance completeness").option("--harness <value>","Recorded/resolved harness (repeatable)",s).option("--agent-instance <value>","Agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Exact provenance match (repeatable)",s).option("--diff","Before/after field diffs").option("--field <name>","Filter changed field; implies --diff").option("--verify","Verify full chain and replay").option("--strict-exit","With --verify, fail on integrity errors").option("--fail-on-warn","Alias for --strict-exit").option("--format <value>","Output: json|toon").description("Show item history entries.").action(Ee);de(n,!0),D(n.command("activity"))}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)",s).option("--author <value>","Filter by mutation author (repeatable or comma-separated)",s).option("--item <value>","Filter by item or workspace stream id (repeatable or comma-separated)",s).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)",s).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",s).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(Re),i("activity")&&D(e.command("activity",{hidden:!0})),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)",s).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)",s).option("--exempt-isolate-type <value>","Item types whose active isolates are policy-valid for the audit (repeatable or comma-separated)",s).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(Te)}var Dt={resolveReadCommandOutputFormat:_,parseListFormat:ce};export{Dt as _testOnlyRegisterListQuery,Ft as registerListQueryCommands};
11
- //# sourceMappingURL=register-list-query-QBGXO5JJ.js.map
1
+ import{b as g,c as I,d as F}from"./chunk-VZ63DEVJ.js";import{a as de}from"./chunk-3CYOBJUK.js";import{L as ie,P as ne,U as ae,n as te,u as A,w as oe}from"./chunk-KRVI56QE.js";import{$a as Q,$c as ee,Hc as K,Tc as W,Vc as X,Xc as Y,Zb as V,_c as Z,aa as q,bd as re,cd as se,dd as le,na as L}from"./chunk-AJ7H6XUF.js";import"./chunk-UZ7BIUCI.js";import{Df as S,Gc as k,Jf as v,Mf as f,Nf as m,Ro as y,Uo as s,Wo as d,ab as O,cp as G,dp as M,ep as $,fp as U,gp as N,hp as B,ip as z,jp as P,kp as H,l as E,lp as J,m as C,mm as R,na as c,nm as T,pa as u,qi as j}from"./chunk-N4YGSG6F.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]="19d28e23-5337-5ec0-83e6-6e43b462ece7")}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]="a51d6d75-0f11-5bdf-a384-2ca10ef064ef")}catch{}})();async function fe(e,t){let n=y(t),i=Date.now();if([e.raw,e.compact,e.full,e.provenance].filter(l=>l===!0).length>1)throw new u("Activity projection options are mutually exclusive. Use --raw, --compact, --provenance, or --full.",c.USAGE);let a=P(e.stream);if(a&&!n.json)throw new u("--stream requires --json output mode.",c.USAGE);let o=z(e),r=await V(a&&e.full!==!0&&e.provenance!==!0?{...o,raw:!0,compact:!0}:o,n);a?U(r,o,n):f(r,n),n.profile&&m(`profile:command=activity took_ms=${Date.now()-i}`)}function D(e){e.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)",s).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",s).option("--stream [mode]","Emit line-delimited JSON rows (requires --json). Optional mode: rows|ndjson|jsonl").description("Show recent activity across items.").action(fe)}(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]="1a62fe05-4407-5e76-87fa-5109dcca5640")}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]="25c5349b-60d7-505b-98b0-3ed19e44b791")}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]="b40cde4c-ca5a-522d-a731-52503c7e4fe0")}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]="9212f45c-798d-5774-87ce-bb7d6ff5514a")}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]="deee1339-ac17-5ae9-8add-a9dd766d182e")}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]="de0fbee0-0bcf-5a46-9013-f7f883d3d0a3")}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]="b662e21b-a163-5834-8789-65243f4c7c9c")}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]="5cc1722c-b797-5b95-a493-3925003ba72e")}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]="35c679a2-9d47-51fa-8bd2-175a4ec48d6b")}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]="292959c7-8371-5ea6-be0d-350444dca8ef")}catch{}})();function ye(e,t){return!t||t.size===0?!0:e==="context"?t.has("context")||t.has("ctx"):t.has(e)}function ce(e){if(e===void 0)return;if(typeof e!="string")throw new u("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 u("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 u(`${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 u(`${e} --format must be one of ${i?"json|ndjson|toon":"json|toon"}`,c.USAGE);if(n.json===!0&&a==="toon")throw new u(`${e} cannot combine --json with --format toon`,c.USAGE);return{...n,json:a==="json"||a==="ndjson"}}function he(e,t){q[t]==="brief"&&e.includeBody!==!0&&e.compact!==!0&&e.brief!==!0&&e.full!==!0&&e.fields===void 0&&(e.brief=!0)}function ue(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 ve={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 ge(e,t){let n=e.stream===!0,i=ce(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 u("--stream requires --json output mode.",c.USAGE);if((a||i==="ndjson")&&n)throw new u("--format csv|table|ndjson cannot be combined with --stream.",c.USAGE);return{streamMode:n,listFormat:i,effectiveGlobal:o}}function be(e,t,n){if(n.listFormat==="csv"||n.listFormat==="table"){k(t);let i=t.items,a=n.listFormat==="csv"?R(i):T(i);!n.effectiveGlobal.quiet&&a.length>0&&v(`${a}
2
+ `)}else if(n.listFormat==="ndjson"){k(t);let i=I(t.items);!n.effectiveGlobal.quiet&&i.length>0&&v(`${i}
3
+ `)}else n.streamMode?$(e,t,n.effectiveGlobal):f(t,n.effectiveGlobal)}async function we(e){let t=y(e.actionCommand),n=e.aliasContract?{...t,command:e.aliasContract.canonical}:t,i=Date.now();e.aliasContract?.lifecycle==="deprecated"&&await j(O(process.cwd(),n.path)).then(me=>me.ux.deprecation_hints)&&m(C(e.aliasContract));let a=S("list",e.options),o=G(a),r=xe(e,o),{effectiveName:l,effectiveStatus:h,effectiveDependencyBlocked:p,effectiveExcludeTerminal:w}=r;he(o,l),Object.assign(o,{projectionCommand:l}),w&&(o.excludeTerminal=!0),o.dependencyBlocked=p;let x=ge(a,n),pe=await L(p?void 0:h,o,n);be("list",pe,x),n.profile&&m(`profile:command=list took_ms=${Date.now()-i}`)}function xe(e,t){let n=e.name,i=e.status,a=e.dependencyBlocked===!0,o=e.excludeTerminal===!0,r=t.status?.trim().toLowerCase(),l=e.name==="list"&&r!==void 0?ve[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&&l!==void 0&&(n=l.name,i=r,a=l.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 ke(e,t){let{name:n,description:i,status:a,excludeTerminal:o,allowStatusFilter:r,dependencyBlocked:l,aliasContract:h}=t,p=e.command(n,{hidden:h?.hidden===!0}).description(i);r&&p.option("--status <value>","Filter by status (repeatable or comma-separated; matches any; all selects every status)",s),n==="list"&&p.option("--all","Include every lifecycle status"),p.option("--for <intent>",`Apply a declared context intent projection. ${g("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)",s).option("--tag <value>","Filter by tag (repeatable or comma-separated; matches any)",s).option("--priority <value>","Filter by priority (repeatable or comma-separated; matches any)",s).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>","Updated since ISO timestamp or signed relative (-2h/-7d for past); use last-window 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",s).option("--assignee-filter <value>","Filter assignee presence: assigned|unassigned").option("--parent <value>","Filter by parent item ID").option("--sprint <value>","Filter by sprint",s).option("--release <value>","Filter by release",s).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>","Alias for --output-limit; --output-budget may cap rows").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). ${g(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)"),ue(p),p.action(async(w,x)=>{await we({name:n,status:a,excludeTerminal:o,dependencyBlocked:l,options:w,actionCommand:x,aliasContract:h})}),d(p,"--tags <value>","Alias for --tag"),d(p,"--assignee_filter <value>","Alias for --assignee-filter"),d(p,"--tree_depth <n>","Alias for --tree-depth"),d(p,"--token_budget <n>","Alias for --token-budget"),d(p,"--filter-estimate-missing","Alias for --filter-estimates-missing")}async function Se(e,t){let n=y(t),i=Date.now(),a=await te(M(e),n);f(a,n),n.profile&&m(`profile:command=aggregate took_ms=${Date.now()-i}`)}async function _e(e,t){let n=y(t),i=Date.now(),a=H(S("context",e)),o=await X(a,n),r=K(a,n);if(r==="markdown")n.quiet||v(`${W(o)}
4
+ `);else if(r==="ndjson"){k(o);let l=I([...o.high_level,...o.low_level,...o.blocked_fallback]);!n.quiet&&l.length>0&&v(`${l}
5
+ `)}else f(o,{...n,json:r==="json"});n.profile&&m(`profile:command=context took_ms=${Date.now()-i}`)}async function Ie(e,t){let n=y(t),i=Date.now(),a=J(S("next",e)),o=await Z(a,n),r=Y(a,n);r==="markdown"?n.quiet||v(`${ee(o)}
6
+ `):f(o,{...n,json:r==="json"}),n.profile&&m(`profile:command=next took_ms=${Date.now()-i}`)}async function Ae(e,t,n){let i=y(n),a=Date.now(),o=B(e),r=S("search",t,[o]),l=N(r),h=await ie(o,l,i),p=typeof r.format=="string"?r.format.trim().toLowerCase():void 0,w=_("Search",r.format,i,!0);if(p==="ndjson"){k(h);let x=I(h.items);!w.quiet&&x.length>0&&v(`${x}
7
+ `)}else f(h,w);i.profile&&m(`profile:command=search took_ms=${Date.now()-a}`)}async function Fe(e,t){let n=y(t),i=Date.now(),a=await ae({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(f(a,_("Eval",e.format,n)),n.profile&&m(`profile:command=eval took_ms=${Date.now()-i}`),!a.passed)throw new u("Eval gate failed: one or more aggregate or per-query thresholds were not met; inspect the metric report",c.GENERIC_FAILURE)}async function De(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});f(r,_("Get",o.format,i)),i.profile&&m(`profile:command=get took_ms=${Date.now()-a}`)}async function Ee(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 u("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 u("--strict-exit requires --verify (it gates on the verification result).",c.USAGE);let l=await oe(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);f(l,_("History",t.format,i)),r&&l.verification&&!l.verification.ok&&(process.exitCode=c.GENERIC_FAILURE),i.profile&&m(`profile:command=history took_ms=${Date.now()-a}`)}function b(e,t){let n=e[t];return Array.isArray(n)?n:void 0}function Ce(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 u("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 Oe(e,t,n){if(t.provenanceSummary===!0)throw new u("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 le({...e,intervalMs:i}))n||v(`${JSON.stringify(a)}
8
+ `);return}for await(let a of se({...e,intervalMs:i}))n||v(`${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 je(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 Re(e,t){let n=y(t),i=Date.now(),a=Ce(e,n.path);if(e.follow===!0){await Oe(a,e,n.quiet===!0);return}let o=await re(a);if(k(o),n.json){f(o,n),n.profile&&m(`profile:command=events took_ms=${Date.now()-i}`);return}let r=je(o);!n.quiet&&r.length>0&&v(`${r}
10
+ `),n.profile&&m(`profile:command=events took_ms=${Date.now()-i}`)}async function Te(e,t,n,i,a){let o=y(a),r=Date.now(),l=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);f(l,o),o.profile&&m(`profile:command=graph took_ms=${Date.now()-r}`)}function At(e,t){let n=t?.commandFilter,i=o=>ye(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);ke(e,{...o,...r?.registration==="commander"?{aliasContract:r}:{}})}if(i("aggregate")){let o=e.command("aggregate").description("Group item counts and numeric measures.").option("--set-mode <value>","Set grouping: element (default)|tuple").option("--limit <value>","Group page size (default: 50)").option("--after <value>","Continue with next_after cursor").option("--group-by <value>","Fields: parent,type,priority,status,assignee,tags,sprint,release (comma-separated)").option("--count","Counts (default)").option("--completion","Status counts and completion_pct").option("--sum <field>","Group numeric sum").option("--avg <field>","Group numeric average").option("--include-unparented","Keep unparented group").option("--status <value>","Item status").option("--type <value>","Item type").option("--tag <value>","Filter by tag").option("--priority <value>","Filter by priority").option("--deadline-before <value>","Latest deadline (ISO/date or relative)").option("--deadline-after <value>","Earliest deadline (ISO/date or relative)").option("--assignee <value>","Filter by assignee").option("--assignee-filter <value>","Assignee presence: assigned|unassigned").option("--parent <value>","Parent 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(Se)}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. ${g("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(_e)}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. ${g("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(Ie)}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. ${g("search","--for")}`).option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--mode <value>","Search mode: keyword|semantic|hybrid (default: auto)").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). ${g("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");ue(o),o.action(Ae),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(Fe),i("get")){let o=e.command("get").argument("<id>","Item id").option("--for <intent>",`Apply a declared context intent projection. ${g("get","--for")}`).option("--token-budget <n>","Override the selected intent's maximum estimated output tokens").option("--depth <value>","brief|standard|deep|full (default: standard)").option("--full","Full details and children for any type; excludes --depth/--fields").option("--fields <value>",`Render custom comma-separated item metadata fields. ${g("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(De);d(o,"--tree_depth <n>","Alias for --tree-depth"),d(o,"--token_budget <n>","Alias for --token-budget")}if(i("history")){let o=e.command("history").enablePositionalOptions().argument("<id>","Item id").option("--limit <n>","Latest n entries").option("--compact","Index, time, op, author, patch count, fields").option("--full","Full entries with JSON Patches").option("--provenance","Authors and provenance; no patches").option("--provenance-summary","Count provenance completeness").option("--harness <value>","Recorded/resolved harness (repeatable)",s).option("--agent-instance <value>","Agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Exact provenance match (repeatable)",s).option("--diff","Before/after field diffs").option("--field <name>","Filter changed field; implies --diff").option("--verify","Verify full chain and replay").option("--strict-exit","With --verify, fail on integrity errors").option("--fail-on-warn","Alias for --strict-exit").option("--format <value>","Output: json|toon").description("Show item history entries.").action(Ee);de(o,!0),D(o.command("activity"))}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)",s).option("--author <value>","Filter by mutation author (repeatable or comma-separated)",s).option("--item <value>","Filter by item or workspace stream id (repeatable or comma-separated)",s).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)",s).option("--agent-instance <value>","Filter by privacy-safe agent instance (repeatable)",s).option("--provenance-filter <dimension=value>","Filter by an exact declared provenance value (repeatable)",s).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(Re),i("activity")&&D(e.command("activity",{hidden:!0})),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)",s).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)",s).option("--exempt-isolate-type <value>","Item types whose active isolates are policy-valid for the audit (repeatable or comma-separated)",s).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(Te)}var Ft={resolveReadCommandOutputFormat:_,parseListFormat:ce};export{Ft as _testOnlyRegisterListQuery,At as registerListQueryCommands};
11
+ //# sourceMappingURL=register-list-query-75QXHIFH.js.map
@@ -0,0 +1,20 @@
1
+ import{a as re,c as St,d as ne,f as le,g as At,h as kt,i as _t}from"./chunk-OOLYASYJ.js";import{$ as qt,A as gt,D as vt,E as ht,F as bt,W as Lt,X as Nt,Y as Ut,Z as Gt,_ as Bt,aa as jt,ba as Vt,ca as zt,da as oe,ea as ie,fa as ae,s as ot,t as dt,u as ct,v as pt,w as Q,x as ee,y as te,z as ft}from"./chunk-Z66DWDAU.js";import"./chunk-5MNOWZPN.js";import{a as wt}from"./chunk-3CYOBJUK.js";import"./chunk-KRVI56QE.js";import"./chunk-R7CG2DB7.js";import{Pc as ut,Uc as mt,Wa as tt,bd as yt,mb as at,ub as rt,vc as Z,wb as nt,xb as lt,yb as st}from"./chunk-HRJ6G6ZG.js";import{Aa as Ke,Ba as Xe,Ca as Ye,Da as Ze,Ea as Qe,K as W,Z as P,aa as _e,ba as xe,ca as Ce,da as De,ea as Ie,ga as Re,ha as Te,ia as Ee,ja as Oe,ka as Fe,la as Me,ma as Pe,na as $e,oa as He,pa as Le,qa as Ne,ra as Ue,sa as Ge,ta as Be,ua as qe,va as je,wa as Ve,xa as ze,ya as Je,za as We}from"./chunk-D332RXZ7.js";import{Ab as Y,ua as it}from"./chunk-AJ7H6XUF.js";import"./chunk-UZ7BIUCI.js";import{$o as K,Gn as z,Go as J,Jf as h,Jo as ke,La as he,Ld as be,Mf as m,Nf as g,Nl as q,No as R,Ol as Se,Ro as y,Ul as x,Uo as c,Vo as l,Wo as w,Xo as T,Zl as j,_o as $,a as ge,ab as I,am as V,ap as X,bp as et,cd as N,ce as U,ih as G,mp as b,na as p,pa as f,qa as ve,qi as B,sl as we,xo as Ae,yl as C}from"./chunk-N4YGSG6F.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]="48b9050b-3290-55d6-82cc-b9d14cc33186")}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]="f111051f-3880-5ff0-9138-5166cd8a93a9")}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]="e599b2e9-fc63-5982-b7cf-ae208c127f62")}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]="fd8685dd-856f-51b2-9bfa-f1df88acb070")}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]="e972ba26-a7b8-5e91-9e63-21416be686eb")}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]="a310e747-0cd7-5dff-b8a0-29d3c4ded9f3")}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]="f27f4c13-4b15-5536-bc5a-b1f263fab5db")}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]="529dd34d-5a81-504f-9641-28093d41d247")}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]="6e6bec6b-9415-5f41-87e8-2d1248fba748")}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]="fd91be06-efd5-5b43-895a-e47a1c144333")}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]="5760feb1-435b-5b0e-b4ed-c22f6a955bed")}catch{}})();var E={};ge(E,{PROFILE_SUBCOMMANDS:()=>Lt,formatProfileApplyHuman:()=>zt,formatProfileLintHuman:()=>Vt,formatProfileListHuman:()=>qt,formatProfileShowHuman:()=>jt,runProfileApply:()=>Bt,runProfileLint:()=>Gt,runProfileList:()=>Nt,runProfileShow:()=>Ut});(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]="2d367793-8aa5-5a00-8c8c-60512a27f62a")}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]="e8448334-e87d-5984-9e89-04e506e0a2a7")}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]="12792dbc-d8ac-50aa-8ebd-bc68a70fa195")}catch{}})();async function se(e){typeof e.description=="string"&&e.description.trim()==="-"&&(e.description=await x().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]="5e4ef16a-2514-5b22-b271-c98501736e55")}catch{}})();async function Jt(e,t,o,i){let a=y(i),n=await ft(e,t,{status:typeof o.status=="string"?o.status:void 0,author:typeof o.author=="string"?o.author:a.author,message:typeof o.message=="string"?o.message:void 0,force:o.force===!0},a);await b(a,n),m(n,a)}async function Wt(e,t){let o=y(t),i=await x().resolveValue("-","--stdin-json");if(i===void 0||i.trim().length===0)throw new f("pm item mutate requires a non-empty JSON batch on stdin.",p.USAGE);let a=typeof e.transactionId=="string"?e.transactionId.trim():"";if(a.length===0)throw new f("pm item mutate requires --transaction-id <value>.",p.USAGE);let n=I(process.cwd(),o.path),r=await B(n),s=St(i,{transactionId:a,idPrefix:r.id_prefix}),{mutations:d,references:u}=s,v=re(e),S=G(typeof e.author=="string"?e.author:o.author,r.author_default);if(e.dryRun===!0){let D=await le({pmRoot:n,transactionId:a,author:S,mutations:d});m({transaction_id:a,dry_run:!0,validation:D,mutation_count:d.length,mutations:d,references:u},o);return}let A=await At({pmRoot:n,transactionId:a,author:S,mutations:d,...v});m({...A,mutation_count:d.length,references:u},o)}function Kt(e,t){return typeof e=="string"&&e.trim().length>0?e.trim():typeof t=="string"?t.trim():""}async function Xt(e,t,o,i){let a=y(i),n=typeof o.transactionId=="string"?o.transactionId.trim():"";if(n.length===0)throw new f("pm item complete requires --transaction-id <value>.",p.USAGE);let r=Kt(t,o.reason);if(r.length===0)throw new f("pm item complete requires a close reason.",p.USAGE);let s=Object.fromEntries(["file","doc","test","comment","note","learning"].filter(k=>o[k]!==void 0).map(k=>[k,o[k]])),d=o.force===!0,{lockTtlSeconds:u,lockWaitMs:v}=re(o),S={...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}:{},...d?{force:!0}:{}},A={id:e,reason:r,...Object.keys(s).length===0?{}:{evidence:s},...Object.keys(S).length===0?{}:{closeOptions:S},...d?{releaseOptions:{force:!0}}:{}},D=I(process.cwd(),a.path),fe=G(typeof o.author=="string"?o.author:a.author,(await B(D)).author_default);if(o.dryRun===!0){let k=kt(A),Ht=await le({pmRoot:D,transactionId:n,author:fe,mutations:k});m({transaction_id:n,dry_run:!0,validation:Ht,mutation_count:k.length,mutations:k},a);return}let ye=await _t({pmRoot:D,transactionId:n,author:fe,...A,lockTtlSeconds:u,lockWaitMs:v});m({...ye,mutation_count:Object.keys(ye.results).length},a)}function xt(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(Jt),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(Wt),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",c).option("--doc <value>","Linked documentation evidence",c).option("--test <value>","Linked test evidence",c).option("--comment <value>","Evidence comment",c).option("--note <value>","Completion note",c).option("--learning <value>","Durable completion learning",c).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(Xt)}(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]="458845bd-2d07-59d5-b322-6ab634fcefa9")}catch{}})();async function Yt(e,t){let o=y(t),i=Array.isArray(e.event)?e.event:[],a=await tt(I(process.cwd(),o.path),{historyEvent:i,allActionable:e.allActionable===!0,dryRun:e.dryRun===!0,planFingerprint:l(e,"planFingerprint"),limit:e.limit,attributedAuthor:l(e,"attributedAuthor"),reviewer:l(e,"reviewer"),reason:l(e,"reason")});m(a,o)}function Ct(e){e.command("history-author-acknowledge").option("--event <item-id:line>","Unknown-author event coordinate (repeatable)",c).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(Yt)}(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]="53ca90df-8382-5cc2-8906-8491afe5101a")}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]="e2514244-d31d-5ee4-b037-b9101f9a24e1")}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]="10a4ed4d-39d3-5b7b-87b1-4a6f95f0f2ab")}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]="796e71dc-4693-50da-bbb8-57b19ff0af95")}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]="e464e0e0-01a2-56c9-a05d-9b1b9dd6a6ee")}catch{}})();function de(e,t,o,i){if(t.trim().toLowerCase()!=="add"||!o?.trim())return;let a=l(i,"add")??l(i,"text")??l(i,"note")??l(i,"body")??l(i,"comment"),n=l(i,"file"),r=[e,o.trim()];a!==void 0?r.push("--add",a):i.stdin===!0?r.push("--stdin"):n!==void 0?r.push("--file",n):r.push("--add","-");let s=N(r),d=N([e,o.trim(),"--add","-"]);throw new f(`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.`,p.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([s,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:s}})}function Dt(e,t,o){let i=o.flatMap(a=>{let n=l(t,a);return n===void 0?[]:[{alias:a,value:n}]});if([...new Set(i.map(({value:a})=>a))].length>1)throw new f(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:a})=>`--${a}`).join(", ")}`,p.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function Zt(e,t){let o=typeof t.edit=="number"?t.edit:void 0,i=typeof t.delete=="number"?t.delete:void 0,a=Dt("comment",t,["add","text","body","comment"]),n=typeof e=="string"?e:void 0,r=t.stdin===!0,s=l(t,"file");if(+(a!==void 0)+ +(n!==void 0)+Number(r)+ +(s!==void 0)>1)throw a!==void 0&&n!==void 0&&!r&&s===void 0?new f("Specify comment text either as positional [text] or with --add, not both",p.USAGE):new f("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",p.USAGE);let d=a??n;return{add:d,readFromStdin:r,readFromFile:s,editIndex:o,deleteIndex:i,isMutation:typeof d=="string"||r||s!==void 0||o!==void 0||i!==void 0}}function It(e,t,o){let i=Dt(e,o,e==="note"?["add","text","note"]:["add","text"]),a=typeof t=="string"?t:void 0;if(i!==void 0&&a!==void 0)throw new f(`Specify ${e} text either as positional [text] or with --add, not both`,p.USAGE);let n=i??a,r=e==="note"?l(o,"addJson"):void 0,s=o.stdin===!0,d=l(o,"file"),u=typeof o.edit=="number"?o.edit:void 0,v=typeof o.delete=="number"?o.delete:void 0;return{add:n,addJson:r,readFromStdin:s,readFromFile:d,editIndex:u,deleteIndex:v,isMutation:typeof n=="string"||r!==void 0||s||d!==void 0||u!==void 0||v!==void 0}}async function Qt(e,t,o,i){let a=y(i),n=Date.now();de("comments",e,t,o);let r=Zt(t,o),s=await ot(e,{add:r.add,stdin:r.readFromStdin,file:r.readFromFile,edit:r.editIndex,delete:r.deleteIndex,limit:l(o,"limit"),fullHistory:o.fullHistory===!0,ifAbsent:o.ifAbsent===!0,author:l(o,"author"),message:l(o,"message"),ownershipAppendBypass:o.ownershipAppendBypass===!0,force:!!o.force},a);r.isMutation&&s.changed!==!1&&await b(a,s),ce("comments",s,a,n)}async function eo(e,t,o,i){let a=y(i),n=Date.now();de("notes",e,t,o);let r=It("note",t,o),s=await bt(e,{add:r.add,addJson:r.addJson,stdin:r.readFromStdin,file:r.readFromFile,edit:r.editIndex,delete:r.deleteIndex,limit:l(o,"limit"),since:l(o,"since"),eventType:l(o,"eventType"),includeMeta:o.includeMeta===!0,fullHistory:o.fullHistory===!0,ifAbsent:o.ifAbsent===!0,author:l(o,"author"),message:l(o,"message"),ownershipAppendBypass:o.ownershipAppendBypass===!0,force:!!o.force},a);r.isMutation&&s.changed!==!1&&await b(a,s),ce("notes",s,a,n)}async function to(e,t,o,i){let a=y(i),n=Date.now();de("learnings",e,t,o);let r=It("learning",t,o),s=await dt(e,{add:r.add,stdin:r.readFromStdin,file:r.readFromFile,edit:r.editIndex,delete:r.deleteIndex,limit:l(o,"limit"),fullHistory:o.fullHistory===!0,ifAbsent:o.ifAbsent===!0,author:l(o,"author"),message:l(o,"message"),ownershipAppendBypass:o.ownershipAppendBypass===!0,force:!!o.force},a);r.isMutation&&s.changed!==!1&&await b(a,s),ce("learnings",s,a,n)}function ce(e,t,o,i){m(t,o),o.profile&&g(`profile:command=${e} took_ms=${Date.now()-i}`)}function Rt(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(Qt);w(o,"--body <text>","Alias for --add",!1),w(o,"--text <text>","Alias for --add",!1),w(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(eo);w(i,"--text <text>","Alias for --add",!1);let a=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(to);w(a,"--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]="d861c49e-6054-54af-a733-069cd9238f8a")}catch{}})();function pe(e,t){return o=>{let i=Number(o);if(!Number.isInteger(i)||i<t)throw new f(`${e} must be an integer greater than or equal to ${t}.`,p.USAGE);return i}}async function oo(e,t,o){let i=y(o);if(t.scope!==void 0&&t.scope!=="project"&&t.scope!=="global")throw new f("--scope must be either project or global.",p.USAGE);let a=await lt({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"?rt(t.lines):void 0,decisionDepth:typeof t.decisionDepth=="number"?t.decisionDepth:void 0},i);m(a,i)}function Tt(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",pe("--limit",1)).option("--offset <n>","Number of referencing items to skip",pe("--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",pe("--decision-depth",1)).description("Find and explain pm items that govern requested source paths.").action(oo)}(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]="016842ad-f6e8-56a4-9b9f-f4eaf4c1be71")}catch{}})();var io=["add-","apply-","list-","remove-","show-"],ao=new Set(["field","fields","help","status","statuses","type","types"]);function ue(e){let t=e.trim(),o=t.toLowerCase();return o.length===0?!1:t[0]===o[0]||ao.has(o)||io.some(i=>o.startsWith(i))}function H(e){if(e!=null){if(typeof e=="number"){if(!Number.isInteger(e))throw new f("--order must be a finite integer.",p.USAGE);return e}if(typeof e=="string"){if(e.trim().length===0)return;let t=Number(e);if(!Number.isInteger(t))throw new f("--order must be a finite integer.",p.USAGE);return t}throw new f("--order must be a finite integer.",p.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]="7f9ea812-e170-5c91-a646-88286797d97d")}catch{}})();function O(e){if(Array.isArray(e))return e;if(typeof e=="string")return[e]}var F={};ge(F,{SCHEMA_SUBCOMMANDS:()=>Ce,_testOnlySchemaCommand:()=>Qe,formatSchemaAddFieldHuman:()=>Je,formatSchemaAddStatusHuman:()=>Be,formatSchemaAddTypeHuman:()=>Ue,formatSchemaApplyPresetHuman:()=>Ye,formatSchemaEvolutionMigrationHuman:()=>xe,formatSchemaInferTypesHuman:()=>Ze,formatSchemaListFieldsHuman:()=>Ke,formatSchemaListHuman:()=>je,formatSchemaRemoveFieldHuman:()=>We,formatSchemaRemoveStatusHuman:()=>qe,formatSchemaRemoveTypeHuman:()=>Ge,formatSchemaShowFieldHuman:()=>Xe,formatSchemaShowHuman:()=>Ve,formatSchemaShowStatusHuman:()=>ze,runSchemaAddField:()=>Me,runSchemaAddStatus:()=>Re,runSchemaAddType:()=>De,runSchemaApplyPreset:()=>Le,runSchemaEvolutionMigration:()=>_e,runSchemaInferTypes:()=>Ne,runSchemaList:()=>Ee,runSchemaListFields:()=>$e,runSchemaRemoveField:()=>Pe,runSchemaRemoveStatus:()=>Te,runSchemaRemoveType:()=>Ie,runSchemaShow:()=>Oe,runSchemaShowField:()=>He,runSchemaShowStatus:()=>Fe,runWorkflowPolicyAction:()=>P});(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]="a4b4d693-ba4c-529a-a5d4-8f6c874830ad")}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]="f3dbaad8-f73e-5d14-aeaa-aaf077a944f6")}catch{}})();function ro(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:l(t.options,"to"),...o==="rename-field"&&typeof t.options.type=="string"?{type:t.options.type}:{}},{migrationId:l(t.options,"migrationId")??l(t.options,"migration_id"),dryRun:t.options.dryRun===!0,author:t.author,force:t.force},t.globalOptions)}function no(e,t){let{normalizedSubcommand:o,typeName:i,globalOptions:a,author:n,force:r}=t;switch(o){case"list":return e.runSchemaList(a);case"show":return e.runSchemaShow(i,a);case"show-status":return e.runSchemaShowStatus(i,a);case"list-fields":return e.runSchemaListFields(a);case"show-field":return e.runSchemaShowField(i,a);case"remove-type":return e.runSchemaRemoveType(i,{author:n,force:r},a);case"remove-field":return e.runSchemaRemoveField(i,{author:n,force:r},a);case"remove-status":return e.runSchemaRemoveStatus(i,{author:n,force:r},a);case"apply-preset":return e.runSchemaApplyPreset(i,{author:n,force:r},a);default:return null}}async function lo(e,t){let{normalizedSubcommand:o,typeName:i,options:a,globalOptions:n}=t,{author:r,force:s,description:d}=t,u=ro(e,t);if(u)return u;let v=no(e,t);if(v)return v;switch(o){case"add-field":return e.runSchemaAddField(i,{type:typeof a.type=="string"?a.type:void 0,commands:t.commands,description:d,cliFlag:typeof a.cliFlag=="string"?a.cliFlag:void 0,alias:t.aliases,required:!!a.required,requiredOnCreate:!!a.requiredOnCreate,allowUnset:a.allowUnset!==!1,requiredTypes:t.requiredTypes,author:r,force:s},n);case"add-status":return e.runSchemaAddStatus(i,{role:t.roles,alias:t.aliases,description:d,order:t.order,author:r,force:s},n);default:return a.infer===!0?e.runSchemaInferTypes({minCount:t.minCount,apply:!!a.apply,author:r,force:s},n):e.runSchemaAddType(i,{description:d,defaultStatus:t.defaultStatus,folder:typeof a.folder=="string"?a.folder:void 0,alias:t.aliases,author:r,force:s},n)}}function so(e,t){if("migration_id"in t){h(`${e.formatSchemaEvolutionMigrationHuman(t)}
2
+ `);return}switch(t.action){case"list":h(`${e.formatSchemaListHuman(t)}
3
+ `);return;case"show":h(`${e.formatSchemaShowHuman(t)}
4
+ `);return;case"show-status":h(`${e.formatSchemaShowStatusHuman(t)}
5
+ `);return;case"list-fields":h(`${e.formatSchemaListFieldsHuman(t)}
6
+ `);return;case"show-field":h(`${e.formatSchemaShowFieldHuman(t)}
7
+ `);return;case"remove-type":h(`${e.formatSchemaRemoveTypeHuman(t)}
8
+ `);break;case"remove-field":h(`${e.formatSchemaRemoveFieldHuman(t)}
9
+ `);break;case"apply-preset":h(`${e.formatSchemaApplyPresetHuman(t)}
10
+ `);break;case"infer-types":h(`${e.formatSchemaInferTypesHuman(t)}
11
+ `);break;case"add-field":h(`${e.formatSchemaAddFieldHuman(t)}
12
+ `);break;case"add-status":h(`${e.formatSchemaAddStatusHuman(t)}
13
+ `);break;case"remove-status":h(`${e.formatSchemaRemoveStatusHuman(t)}
14
+ `);break;default:h(`${e.formatSchemaAddTypeHuman(t)}
15
+ `);break}t.warnings.length>0&&g(`schema ${t.action} warnings: ${$(t.warnings)}`)}function Et(e){if(Array.isArray(e))return e.flatMap(t=>t.split(",")).map(t=>t.trim()).filter(t=>t.length>0)}async function co(e,t,o,i){let a=y(i),n=Date.now(),{SCHEMA_SUBCOMMANDS:r}=F,s=(e??"").trim().toLowerCase(),d=t;if(po(s,r),!r.includes(s)&&d===void 0&&!ue(e)&&(d=e,s="add-type"),!r.includes(s))throw C({command_path:"schema",token:s,allowed:r});let u=be.find(v=>v===s);if(we(s,o.dryRun===!0),u)m(await P(u,t,{definition:o.definition,policy:l(o,"policy"),message:l(o,"message"),author:l(o,"author"),dryRun:o.dryRun===!0},a),a);else{let v=await lo(F,{normalizedSubcommand:s,typeName:d,options:o,aliases:O(o.alias),roles:O(o.role),commands:Et(o.commands),requiredTypes:Et(o.requiredTypes),defaultStatus:l(o,"defaultStatus")??l(o,"default_status"),order:H(o.order),minCount:H(o.minCount),author:l(o,"author"),force:!!o.force,description:l(o,"description"),globalOptions:a});a.json===!0||a.defaultOutputFormat==="json"?m(v,a):a.quiet||so(F,v)}a.profile&&g(`profile:command=schema took_ms=${Date.now()-n}`)}function po(e,t){if(!e)throw new f(`pm schema requires a subcommand. Allowed: ${t.join(", ")}`,p.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"]})}function Ot(e){let t=e.command("schema").option("--definition <json>","Policy or proposed fields JSON").option("--policy <id>","Policy id for policy-approve").option("--message <text>","Audit rationale for a policy mutation").argument("[subcommand]","Required; schema verb (list/show, add/remove, rename/remap, policy-*), or custom type shorthand").argument("[name]","Definition/source name or item id; policy-mode: advise|refuse").option("--description <text>","Type, status, or field description").option("--default-status <status>","Default status for this 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)",c).option("--role <value>","Lifecycle role for a custom status (repeatable): draft, active, blocked, terminal, terminal_done, terminal_canceled, default_open, default_close, default_cancel",c).option("--order <n>","Display/sort order for a custom status").optionsGroup("Field options (add-field):").option("--type <type>","Value type for a custom field (add-field): string, number, boolean, string_array, array, object").option("--commands <list>","Field commands (repeatable/csv): create, update, update_many, list, search, calendar, context",c).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)",c).optionsGroup("Type inference and migration options:").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","Preview rename/remap migrations and workflow-policy actions without writes").option("--author <value>","Mutation author").option("--force","Force ownership/lock override").description("Manage types, statuses, fields, presets, and workflow policies.");w(t,"--default_status <status>","Alias for --default-status",!1),w(t,"--migration_id <id>","Alias for --migration-id",!1),t.action(co)}(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]="5434cb0e-0d0d-551a-8ef5-d60f94cf5bde")}catch{}})();var uo=new Set(ve.map(e=>e.toLowerCase())),mo=new Set(Ae.map(e=>e==="estimate"?"estimatedMinutes":e));async function fo(e,t,o,i,a){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},a)}}function yo(e,t){switch(t.action){case"list":h(`${e.formatProfileListHuman(t)}
16
+ `);return;case"show":h(`${e.formatProfileShowHuman(t)}
17
+ `);return;case"lint":h(`${e.formatProfileLintHuman(t)}
18
+ `);return;default:h(`${e.formatProfileApplyHuman(t)}
19
+ `),t.warnings.length>0&&g(`profile apply warnings: ${$(t.warnings)}`);break}}function go(e){return t=>{let o=Number(t);if(!Number.isInteger(o)||o<1)throw new f(`${e} must be a positive integer (1-based index).`,p.USAGE);return o}}function Ft(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 vo=[["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 Mt(e){let t=o=>e[o]===!0?!0:void 0;for(let[o,i,a,n]of vo)if(e[o]===!0&&e[i]===!0)throw new f(`Cannot combine ${a} with ${n} for the same field.`,p.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 me(e,t){for(let o of t){let i=[],a=e.args,n=r=>(e.args!==a&&(i.length=0,a=e.args),i.push(r),i);o.required?e.requiredOption(o.option,o.description):o.repeatable?e.option(o.option,o.description,n):e.option(o.option,o.description);for(let r of o.aliasOptions??[])z(o.option,r.option)?w(e,r.option,r.description,o.repeatable===!0,o.repeatable?n:void 0):o.repeatable?e.option(r.option,r.description,n):e.option(r.option,r.description)}}function ho(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,...Mt(e),limit:t("limit"),offset:t("offset"),includeBody:!0}}function M(...e){for(let t of e)if(typeof t=="string")return t}function bo(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 wo(e,t,o){if(e!==void 0||typeof t!="string"||t.length===0||o.title!==void 0||o.type!==void 0||!uo.has(t.trim().toLowerCase()))return;let i=t.trim();throw new f(`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}.`,p.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 So=["body","bodyFile","description","dep","depRemove","comment","note","learning","file","test","doc","reminder","event","typeOption","field","ids"];function L(e){let t=So.flatMap(o=>{let i=e[o],a=typeof i=="string"&&i.trim()==="-"?1:Array.isArray(i)?i.filter(r=>typeof r=="string"&&r.trim()==="-").length:0,n=`--${o.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)}`;return Array.from({length:a},()=>n)});if(e.stdinJson===!0&&t.unshift("--stdin-json"),t.length>1)throw new f(`Only one option may consume stdin per command invocation. Found: ${t.join(", ")}.`,p.USAGE)}function Pt(e,t,o){let i=[];t&&i.push("body"),o&&i.push("description"),Se(e,i)}function $t(e,t){return!t&&typeof e.description=="string"&&e.description.trim()==="-"}async function Ao(e,t,o,i){let a=y(i),n=Date.now();L(o);let r=o.stdinJson===!0;if(r){let A=await x().resolveValue("-","--stdin-json");o=ne(A??"","create",o)}let s=bo(e,t,o);wo(s.positionalType,s.positionalTitle,o),typeof s.positionalType=="string"&&s.positionalType.length>0&&o.type===void 0&&(o.type=s.positionalType),typeof s.positionalTitle=="string"&&s.positionalTitle.length>0&&o.title===void 0&&(o.title=s.positionalTitle);let d=$t(o,r);r||await se(o);let u=typeof o.bodyFile=="string";u&&(o.body=await V(String(o.bodyFile),o.body!==void 0?String(o.body):void 0),delete o.bodyFile);let v=K(o,{requireType:!1});Pt(v,u,d),r&&q(v);let S=await ut(v,a);await b(a,S),m(S,a),a.profile&&g(`profile:command=create took_ms=${Date.now()-n}`)}function ko(e){return{type:l(e,"filterType"),tag:l(e,"filterTag"),priority:l(e,"filterPriority"),deadlineBefore:l(e,"filterDeadlineBefore"),deadlineAfter:l(e,"filterDeadlineAfter"),updatedAfter:l(e,"filterUpdatedAfter"),updatedBefore:l(e,"filterUpdatedBefore"),createdAfter:l(e,"filterCreatedAfter"),createdBefore:l(e,"filterCreatedBefore"),ids:l(e,"ids"),assignee:l(e,"filterAssignee"),assigneeFilter:M(e.filterAssigneeFilter,e.filterAssignee_filter),parent:l(e,"filterParent"),sprint:l(e,"filterSprint"),release:l(e,"filterRelease"),...Mt(e),limit:l(e,"limit"),offset:l(e,"offset")}}async function _o(e,t){let o=y(t),i=Date.now();L(e),e.ids=await j(l(e,"ids"));let a=await pt({status:l(e,"filterStatus"),list:ko(e),reason:l(e,"reason"),completedAt:l(e,"completedAt"),resolution:l(e,"resolution"),expectedResult:M(e.expectedResult,e.expected_result,e.expected),actualResult:M(e.actualResult,e.actual_result,e.actual),validateClose:e.validateClose===!0?"warn":l(e,"validateClose"),author:l(e,"author"),message:l(e,"message"),force:!!e.force,dryRun:e.dryRun===!0?!0:void 0,rollback:l(e,"rollback"),checkpoint:e.checkpoint===!1?!1:void 0},o);await b(o,a),m(a,o),o.profile&&g(`profile:command=close-many took_ms=${Date.now()-i}`)}async function xo(e,t){let o=y(t),i=Date.now();L(e),e.ids=await j(l(e,"ids"));let a=await ht({status:l(e,"filterStatus"),list:ho(e),update:X(et(e)),dryRun:e.dryRun===!0?!0:void 0,rollback:l(e,"rollback"),checkpoint:e.checkpoint===!1?!1:void 0},o);await b(o,a),m(await R("update-many",[],e,o,a),o),o.profile&&g(`profile:command=update-many took_ms=${Date.now()-i}`)}async function Co(e,t,o,i){let a=y(i),n=Date.now(),r=typeof o.reason=="string"&&o.reason.trim().length>0&&o.reason||typeof o.closeReason=="string"&&o.closeReason.trim().length>0&&o.closeReason||void 0,s=typeof t=="string"&&t.length>0?t:r,d=await(o.releaseAssignment===!0?yt:Z)(e,s,{author:l(o,"author"),message:l(o,"message"),validateClose:o.validateClose===!0?"warn":l(o,"validateClose"),force:!!o.force,duplicateOf:l(o,"duplicateOf"),completedAt:l(o,"completedAt"),resolution:l(o,"resolution"),expectedResult:M(o.expectedResult,o.expected_result,o.expected),actualResult:M(o.actualResult,o.actual_result,o.actual)},a);await b(a,d),m(d,a),a.profile&&g(`profile:command=close took_ms=${Date.now()-n}`)}function Do(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[a,n]of o)t[a]!==void 0&&t[n]===void 0&&(t[n]=t[a]);let i=K(t,{requireType:!1});return i.blockedBy=t.blockedBy,i}function Io(e,t){if(!e)throw new f(`pm plan requires a subcommand. Allowed: ${t.join(", ")}`,p.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))throw C({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 Ro(e,t){if(e!=="reorder-step"||typeof t!="string")return;let o=Number.parseInt(t,10);if(!Number.isFinite(o))throw new f(`reorder-step requires an integer new order, got "${t}"`,p.USAGE);return o}async function To(e,t,o,i,a,n){let r=y(n),s=Date.now(),d=(e??"").trim().toLowerCase();Io(d,gt);let u=Do(a),v=Ro(d,i),S=d==="create"&&typeof t=="string"&&t.length>0&&u.title===void 0?void 0:t;S===void 0&&typeof t=="string"&&t.length>0&&(u.title=t);let A=await vt({subcommand:d,id:S,stepRef:o,reorderTo:v,options:u,global:r});await b(r,A),m(A,r),r.profile&&g(`profile:command=plan took_ms=${Date.now()-s}`)}async function Eo(e,t,o){if(e!==void 0)throw new f("merge reconcile takes no positional arguments.",p.USAGE);let i=await ae({dryRun:t.dryRun===!0,force:t.force===!0,message:typeof t.message=="string"?t.message:void 0,author:o.author},o);m(i,o),i.ok||(process.exitCode=p.GENERIC_FAILURE)}async function Oo(e,t,o,i,a,n){if(e===void 0||t===void 0||o===void 0||i===void 0)throw new f("merge driver requires <artifact> <base> <ours> <theirs> (git supplies %O %A %B). Example: pm merge driver history %O %A %B",p.USAGE);let r=await ie({artifact:e,basePath:t,oursPath:o,theirsPath:i,outputPath:typeof a.output=="string"?a.output:void 0,itemPath:typeof a.itemPath=="string"?a.itemPath:void 0,prefer:typeof a.prefer=="string"?a.prefer:void 0},n);m(r,n),r.ok||(process.exitCode=p.GENERIC_FAILURE)}async function Fo(e,t,o,i,a,n,r){let s=y(r),d=Date.now();switch(e.trim().toLowerCase()){case"install":{if(t!==void 0)throw new f("merge install takes no positional arguments.",p.USAGE);let u=await W({dryRun:n.dryRun===!0},s);m(u,s);break}case"reconcile":await Eo(t,n,s);break;case"report":{if(t!==void 0)throw new f("merge report takes no positional arguments.",p.USAGE);let u=await Y({includeReconciled:n.includeReconciled===!0});m(u,s),u.ok||(process.exitCode=p.GENERIC_FAILURE);break}case"driver":await Oo(t,o,i,a,n,s);break;default:throw C({command_path:"merge",token:e,allowed:U,display_name:"merge"})}s.profile&&g(`profile:command=merge took_ms=${Date.now()-d}`)}async function Mo(e,t,o){let i=y(o),a=Date.now(),n=await Q(e,{title:l(t,"title"),author:l(t,"author"),message:l(t,"message"),allowDuplicate:t.allowDuplicate===!0},i);await b(i,n),m(n,i),i.profile&&g(`profile:command=copy took_ms=${Date.now()-a}`)}async function Po(e,t,o){let i=y(o),a=Date.now(),n=await te(e,{clear:t.clear===!0},i);m(n,i),i.profile&&g(`profile:command=focus took_ms=${Date.now()-a}`)}async function $o(e,t,o){let i=y(o),a=Date.now();L(t);let n=t.stdinJson===!0;if(n){let v=await x().resolveValue("-","--stdin-json");t=ne(v??"","update",t)}let r=$t(t,n);n||await se(t);let s=typeof t.bodyFile=="string";s&&(t.body=await V(String(t.bodyFile),t.body!==void 0?String(t.body):void 0),delete t.bodyFile);let d=X(t);Pt(d,s,r),n&&q(d);let u=await mt(e,d,i);await b(i,u),m(await R("update",[e],t,i,u),i),i.profile&&g(`profile:command=update took_ms=${Date.now()-a}`)}async function Ho(e,t,o){let i=y(o),a=Date.now(),n=await ee(e,{author:l(t,"author"),message:l(t,"message"),force:!!t.force,dryRun:t.dryRun===!0},i);n.dry_run!==!0&&await b(i,n),m(n,i),i.profile&&g(`profile:command=delete took_ms=${Date.now()-a}`)}function Lo(e,t){let o=l(t,"body"),i=l(t,"text"),a=typeof e=="string"?e:void 0;if([o,i,a].filter(r=>r!==void 0).length>1)throw new f("Specify append text with exactly one source: positional [text], --body, or --text",p.USAGE);let n=o??i??a;if(n===void 0)throw new f("Missing append text. Provide it as positional [text], --body <value>, or --text <value> (use - for stdin).",p.USAGE);return n}async function No(e,t,o,i){let a=y(i),n=Date.now(),r=await ct(e,{body:Lo(t,o),author:l(o,"author"),message:l(o,"message"),force:!!o.force},a);await b(a,r),m(r,a),a.profile&&g(`profile:command=append took_ms=${Date.now()-n}`)}async function Uo(e,t,o,i){let a=y(i),n=Date.now(),{PROFILE_SUBCOMMANDS:r}=E,s=(e??"").trim().toLowerCase();if(!s)throw new f(`pm profile requires a subcommand. Allowed: ${r.join(", ")}`,p.USAGE,{code:"missing_required_argument",examples:["pm profile list","pm profile show agile","pm profile apply agile --dry-run","pm profile lint agile"]});if(!r.includes(s))throw C({command_path:"profile",token:s,allowed:r});let d=await fo(E,s,t,o,a);a.json===!0||a.defaultOutputFormat==="json"?m(d,a):a.quiet||yo(E,d),d.action==="lint"&&!d.ok&&(process.exitCode=p.GENERIC_FAILURE),a.profile&&g(`profile:command=profile took_ms=${Date.now()-n}`)}function _(e,t){return O(e[t])??[]}async function Go(e,t,o){let i=y(o),a=Date.now(),n=_(t,"add"),r=_(t,"addGlob"),s=_(t,"remove"),d=_(t,"migrate"),u=await nt(e,{add:n,addGlob:r,remove:s,migrate:d,note:l(t,"note"),list:!!t.list,appendStable:!!t.appendStable,validatePaths:!!t.validatePaths,author:l(t,"author"),message:l(t,"message"),force:!!t.force},i);(n.length>0||r.length>0||s.length>0||d.length>0)&&await b(i,u),m(await R("files",[e],t,i,u),i),i.profile&&g(`profile:command=files took_ms=${Date.now()-a}`)}async function Bo(e,t,o){let i=y(o),a=Date.now(),n={...o.optsWithGlobals(),...t},r=await st(e,{apply:!!n.apply,note:l(n,"note"),appendStable:!!n.appendStable,author:l(n,"author"),message:l(n,"message"),force:!!n.force},i);r.changed&&await b(i,r),m(r,i),i.profile&&g(`profile:command=files.discover took_ms=${Date.now()-a}`)}async function qo(e,t,o){let i=y(o),a=Date.now(),n=_(t,"add"),r=_(t,"addGlob"),s=_(t,"remove"),d=_(t,"migrate"),u=await at(e,{add:n,addGlob:r,remove:s,migrate:d,note:l(t,"note"),list:!!t.list,validatePaths:!!t.validatePaths,author:l(t,"author"),message:l(t,"message"),force:!!t.force},i);(n.length>0||r.length>0||s.length>0||d.length>0)&&await b(i,u),m(await R("docs",[e],t,i,u),i),i.profile&&g(`profile:command=docs took_ms=${Date.now()-a}`)}async function jo(e,t,o){let i=y(o),a=Date.now(),n=await it(e,{format:t.format,maxDepth:l(t,"maxDepth"),collapse:t.collapse,summary:t.summary===!0,full:t.full===!0,nodeLimit:l(t,"nodeLimit"),edgeLimit:l(t,"edgeLimit"),tokenBudget:l(t,"tokenBudget"),cursor:l(t,"cursor"),direction:l(t,"direction"),...Array.isArray(t.kind)?{kind:t.kind}:{}},i);m(n,i),i.profile&&g(`profile:command=deps took_ms=${Date.now()-a}`)}function $a(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(me(o,J),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(Ao),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(Mo),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(Po);let i=e.command("update").argument("<id>","Item id").description("Update item fields and metadata.");me(i,ke),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($o),xt(e);let a=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)");Ft(a,"applying updates"),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("--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)",c).option("--remove-tags <value>","Remove tags from the existing list (repeatable; CSV accepted)",c).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)",c).option("--remove-ac <value>","Remove one semicolon-free acceptance criterion by exact text match (repeatable)",c).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>",c).option("--dep-remove <value>","Remove dependency entries by id/kind/author/timestamp signature",c).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>",c).option("--note <value>","Add note seed author=<value>,created_at=<iso|now>,text=<value>",c).option("--learning <value>","Add learning seed author=<value>,created_at=<iso|now>,text=<value>",c).option("--file <value>","Add linked file path=<value>,scope=<project|global>,note=<text>",c).option("--test <value>","Add linked test command=<value>,path=<value>,scope=<project|global>",c).option("--doc <value>","Add linked doc path=<value>,scope=<project|global>,note=<text>",c).option("--reminder <value>","Add reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>",c).option("--event <value>","Add event entry start=<iso|relative>,end=<iso|relative>,recur_*",c).option("--type-option <value>","Set type options key=value (repeatable)",c).option("--unset <field>","Clear scalar metadata field by name (repeatable)",c).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"),T(a,[["--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),T(a,[["--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),a.action(xo);let n=e.command("close").option("--release-assignment","Release ownership after closure").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>","Closure resolution summary (checked by --validate-close strict)").option("--expected-result <value>","Expected outcome for closure validation").option("--expected <value>","Short alias for --expected-result").option("--actual-result <value>","Observed outcome for closure validation").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.");w(n,"--expected_result <value>","Alias for --expected-result",!1),w(n,"--actual_result <value>","Alias for --actual-result",!1),n.action(Co);let r=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");Ft(r,"closing"),r.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"),w(r,"--filter-assignee_filter <value>","Alias for --filter-assignee-filter",!1),w(r,"--expected_result <value>","Alias for --expected-result",!1),w(r,"--actual_result <value>","Alias for --actual-result",!1),r.action(_o),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(Ho),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(No);let s=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)",c).option("--blocks <value>","Pm item ids this plan blocks (repeatable, csv-friendly)",c).option("--blocked-by <value>","Pm item ids that block this plan (repeatable, csv-friendly)",c).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)",c).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)",c).option("--link <value>","Pm item id to link (repeatable, csv-friendly)",c).option("--link-kind <value>",`Link kind: ${he.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)",c).option("--test <value>","Step linked test command=<value>[,path=<value>,note=<text>] (repeatable)",c).option("--doc <value>","Step linked doc path=<value>[,scope=project|global,note=<text>] (repeatable)",c).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)",c).option("--author <value>","Mutation author").option("--message <value>","Mutation message").option("--force","Force ownership override");me(s,J.filter(u=>mo.has(u.target))),T(s,[["--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),T(s,[["--blocked_by <value>","Alias for --blocked-by"],["--depends_on <value>","Alias for --depends-on"]],!0),s.action(To),wt(e,!1),Ct(e),e.command("merge").argument("<subcommand>",`Merge subcommand: ${U.join(", ")}`).argument("[artifact]",`driver only: artifact class to merge (${oe.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(Fo),Ot(e),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(Uo),Rt(e,go);let d=e.command("files").description("Manage files linked to an item.");d.argument("<id>","Item id").option("--add <value>","Add linked file entry (CSV/markdown pairs or - for stdin)",c).option("--add-glob <value>","Add linked file entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)",c).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",c).option("--migrate <value>","Migrate linked file paths in-place (from=<prefix>,to=<prefix>; repeatable)",c).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(Go),d.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(Bo),Tt(d),e.command("docs").argument("<id>","Item id").option("--add <value>","Add linked doc entry (CSV/markdown pairs or - for stdin)",c).option("--add-glob <value>","Add linked doc entries from a glob (plain glob or pattern=<glob>,scope=<scope>,note=<text>; repeatable)",c).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",c).option("--migrate <value>","Migrate linked doc paths in-place (from=<prefix>,to=<prefix>; repeatable)",c).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(qo),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)",c).description("Show dependency relationships for an item.").action(jo)}export{ue as looksLikeSchemaSubcommandTypo,go as parsePositiveIntOption,H as parseSchemaOrderOption,me as registerCommanderOptionContracts,$a as registerMutationCommands};
20
+ //# sourceMappingURL=register-mutation-YS54SCHG.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-R7CG2DB7.js";import{$c as W,Gd as ee,Jd as te,Pb as F,Qd as ae,Rd as ne,Sd as I,Uc as q,Yc as $,Yd as oe,Zc as G,_c as H,ad as J,bd as j,dd as C,ed as B,fc as V,fd as z,ga as R,gd as Y,hd as K,id as X,kd as Q,lc as N,ld as Z,oc as U,tb as M}from"./chunk-HRJ6G6ZG.js";import"./chunk-D332RXZ7.js";import"./chunk-AJ7H6XUF.js";import"./chunk-UZ7BIUCI.js";import{Gc as x,Mf as l,Nf as u,No as O,Ro as c,Uo as f,Vo as i,Wo as g,Yo as P,Zo as L,ab as v,ih as E,l as S,m as T,mp as y,na as d,pa as m,qi as A,yl as _}from"./chunk-N4YGSG6F.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]="c3d9f24a-7089-5d60-ab12-93d03b86da80")}catch{}})();var re=new Map([["measurements","boolean"],["metric","string"],["measurementLimit","number"],["observe","string_array"],["direction","direction"],["measurementSource","string"],["measurementItem","string"],["measurementRevision","string"],["author","string"],["message","string"],["provenanceCoverage","boolean"],["fleetAttribution","boolean"],["since","string"],["eventLimit","number"],["minimumSample","number"]]),be=new Set(["higher","lower","target"]),we=[...re.keys()].sort((e,t)=>e.localeCompare(t)).join(", ");function ve(e,t){return e==="boolean"?typeof t=="boolean":e==="string"?typeof t=="string":e==="number"?typeof t=="number":e==="string_array"?Array.isArray(t)&&t.every(a=>typeof a=="string"):e==="direction"&&be.has(t)}function ie(e){if(e===void 0)return{};let t;try{t=JSON.parse(e)}catch(a){throw new m(`--analytics must be valid JSON: ${String(a)}`,d.USAGE)}if(t===null||typeof t!="object"||Array.isArray(t))throw new m("--analytics must be a JSON object.",d.USAGE);for(let[a,n]of Object.entries(t)){let o=re.get(a);if(!ve(o,n))throw new m(o===void 0?`Unknown --analytics field "${a}". Accepted fields: ${we}.`:`--analytics field "${a}" must be ${o.replace("_"," ")}.`,d.USAGE)}return 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]="dcd8c925-34ee-5faa-9132-1be43961c749")}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]="29db968f-30ad-5f3c-bf95-e33be18614c6")}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]="524ade8e-33d6-5353-b01d-c7baddc956e8")}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]="02e10fe1-c111-5c09-8dbe-a67f2b97f0d0")}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]="3d4a8db3-8a53-50b4-a96c-1affff2207a3")}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]="d008ca8f-41bf-54fb-9b56-bc1d4af9f226")}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]="de197522-9007-5e21-8f9c-06cbf63707d1")}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]="a5e0162a-bbf1-50fe-8912-a820de155e90")}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]="9ee008b9-3751-5794-8d01-1f6d3123d6cd")}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]="b6fa277d-ccf2-5413-95d5-0790283203d5")}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]="2d59e10e-c85b-542a-8859-b20a08e809fa")}catch{}})();var se=(e,t)=>V(e,t,{runUpdate:(a,n,o)=>q(a,n,o)});(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]="3952425a-adce-59dd-84b6-97ac571eaa73")}catch{}})();async function xe(e,t,a,n,o){let r=c(o),s=e==="run",p=e==="verdicts",b=e==="presets"||e==="apply",w=e==="promote",h=await N({action:e,...s||p||b||w?{}:{kind:t},id:s||p||w?a??t:a,preset:b?a??t:void 0,definition:i(n,"definition"),trigger:i(n,"trigger"),tree:i(n,"tree"),gate:i(n,"gate"),limit:i(n,"limit"),dry_run:n.dryRun===!0,fullChangedFields:r.fullChangedFields,idOnly:r.idOnly,author:i(n,"author"),message:i(n,"message"),owner:i(n,"owner"),apply:n.apply===!0,enforcement:i(n,"enforcement")},r);l(h,r),typeof h=="object"&&h!==null&&"exit_code"in h&&h.exit_code===1&&(process.exitCode=1)}function le(e){e.command("assurance").argument("<action>","Action; inspect `pm contracts --command assurance`").argument("[kind]","Declaration kind or run gate id").argument("[id]","Declaration/gate id").description("Manage SDK-owned assurance contracts.").option("--definition <json>","Put declaration JSON").option("--trigger <value>","Gate trigger").option("--tree <value>","Revision identity").option("--gate <id>","Verdict gate filter").option("--limit <number>","Verdict limit").option("--dry-run","Evaluate without recording").option("--author <value>","Mutation author").option("--message <value>","Mutation rationale").option("--owner <item-id>","Preset/derivation owner").option("--apply","Persist derived proposals").option("--enforcement <level>","Promote to warn or block").action(xe)}(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]="83eb6904-cf04-5c83-8281-0b8b8bb04d48")}catch{}})();function Ae(e,t){let a=e?.trim().toLowerCase(),n=t?.trim().toLowerCase();if(a===void 0||a.length===0)return n;if(a==="local-analytics")return n&&n.length>0?n:"status";if(n!==void 0&&n.length>0)throw _({command_path:"telemetry",token:`${e} ${t}`,allowed:["status","flush","stats","clear","local-analytics"],token_kind:"path",examples:["pm telemetry stats --limit 10","pm telemetry local-analytics status --json"]});return a}function _e(e){return{addValues:Array.isArray(e.add)?e.add:[],addJsonValues:Array.isArray(e.addJson)?e.addJson:[],removeValues:Array.isArray(e.remove)?e.remove:[],removeIndexValues:Array.isArray(e.removeIndex)?e.removeIndex:[]}}function ue(e,t){if(e.background===!0){if(e.run!==!0)throw new m("--background requires --run",d.USAGE);if(e.acknowledgeLinkedTests===!0)throw new m("--background cannot be combined with --acknowledge-linked-tests; acknowledgement is a non-executing foreground operation",d.USAGE);if(t.addValues.length>0||t.addJsonValues.length>0||t.removeValues.length>0||t.removeIndexValues.length>0)throw new m("--background does not support --add/--add-json/--remove/--remove-index; update linked tests first, then run in background",d.USAGE)}}async function Ce(e,t,a,n){let o=await I({kind:"test",commandArgs:P(e,{...t,add:n.addValues,addJson:n.addJsonValues,remove:n.removeValues,removeIndex:n.removeIndexValues}),targetId:e,author:typeof t.author=="string"?t.author:void 0,noExtensions:a.noExtensions===!0},a);l(o,a)}function me(e,t){return{add:t.addValues,addJson:t.addJsonValues,remove:t.removeValues,removeIndex:t.removeIndexValues,list:!!e.list,run:!!e.run,match:typeof e.match=="string"?e.match:void 0,onlyIndex:typeof e.onlyIndex=="string"||typeof e.onlyIndex=="number"?e.onlyIndex:void 0,onlyLast:!!e.onlyLast,timeout:typeof e.timeout=="string"?e.timeout:void 0,progress:!!e.progress,envSet:Array.isArray(e.envSet)?e.envSet:[],envClear:Array.isArray(e.envClear)?e.envClear:[],sharedHostSafe:!!e.sharedHostSafe,pmContext:typeof e.pmContext=="string"?e.pmContext:void 0,overrideLinkedPmContext:!!e.overrideLinkedPmContext,workspaceContext:typeof e.workspaceContext=="string"?e.workspaceContext:void 0,overrideLinkedWorkspaceContext:!!e.overrideLinkedWorkspaceContext,allowUntrustedLinkedTests:!!e.allowUntrustedLinkedTests,acknowledgeLinkedTests:!!e.acknowledgeLinkedTests,failOnContextMismatch:!!e.failOnContextMismatch,failOnSkipped:!!e.failOnSkipped,failOnEmptyTestRun:!!e.failOnEmptyTestRun,requireAssertionsForPm:!!e.requireAssertionsForPm,checkContext:!!e.checkContext,autoPmContext:!!e.autoPmContext,author:typeof e.author=="string"?e.author:void 0,message:typeof e.message=="string"?e.message:void 0,force:!!e.force,measure:Array.isArray(e.measure)?e.measure:[],metricBelow:typeof e.metricBelow=="string"?e.metricBelow:void 0,metricDiff:typeof e.metricDiff=="string"?e.metricDiff:void 0}}var Mt={buildRunTestOptions:me,buildRunTestAllOptions:fe,runWorkspacePositionAction:pe,validateBackgroundTestOptions:ue};async function Ie(e,t,a,n){let o=await ae(e,me(t,n),a);(n.addValues.length>0||n.addJsonValues.length>0||n.removeValues.length>0||t.run===!0||n.removeIndexValues.length>0)&&await y(a,o),l(o,a),(o.run_results.some(r=>r.status==="failed")||o.fail_on_skipped_triggered===!0)&&(process.exitCode=d.DEPENDENCY_FAILED)}async function De(e,t,a){let n=c(a),o=Date.now(),r=_e(t);ue(t,r),t.background===!0?await Ce(e,t,n,r):await Ie(e,t,n,r),n.profile&&u(`profile:command=test took_ms=${Date.now()-o}`)}function k(e){let t=i(e,"author"),a=i(e,"assignee");if(t!==void 0&&a!==void 0&&t!==a)throw new m("Lifecycle ownership received conflicting --author and --assignee values; use one actor value for both aliases.",d.USAGE,{code:"conflicting_lifecycle_owner",examples:["pm claim pm-123","pm claim pm-123 --start","pm release pm-123"]});return{author:t??a,message:i(e,"message")}}async function Se(e,t){let a=c(t),n=Date.now();if(e.background===!0){let r=await I({kind:"test-all",commandArgs:L(e),statusFilter:i(e,"status"),noExtensions:a.noExtensions===!0},a);l(r,a),a.profile&&u(`profile:command=test-all took_ms=${Date.now()-n}`);return}let o=await ne(fe(e),a);await y(a,{ids:o.results.map(r=>r.id)}),l(o,a),(o.failed>0||o.fail_on_skipped_triggered===!0)&&(process.exitCode=d.DEPENDENCY_FAILED),a.profile&&u(`profile:command=test-all took_ms=${Date.now()-n}`)}function fe(e){return{status:i(e,"status"),limit:i(e,"limit"),offset:i(e,"offset"),timeout:i(e,"timeout"),progress:!!e.progress,envSet:Array.isArray(e.envSet)?e.envSet:[],envClear:Array.isArray(e.envClear)?e.envClear:[],sharedHostSafe:!!e.sharedHostSafe,pmContext:i(e,"pmContext"),overrideLinkedPmContext:!!e.overrideLinkedPmContext,workspaceContext:i(e,"workspaceContext"),overrideLinkedWorkspaceContext:!!e.overrideLinkedWorkspaceContext,allowUntrustedLinkedTests:!!e.allowUntrustedLinkedTests,failOnContextMismatch:!!e.failOnContextMismatch,failOnSkipped:!!e.failOnSkipped,failOnEmptyTestRun:!!e.failOnEmptyTestRun,requireAssertionsForPm:!!e.requireAssertionsForPm,checkContext:!!e.checkContext,autoPmContext:!!e.autoPmContext}}async function Te(e,t,a,n){let o=c(n),r=Date.now(),s=await te({subcommand:Ae(e,t),limit:i(a,"limit")},o);l(s,o),o.profile&&u(`profile:command=telemetry took_ms=${Date.now()-r}`)}async function Ee(e,t){let a=c(t),n=Date.now(),o=ie(i(e,"analytics")),r=await ee(a,{includeEmpty:e.includeEmpty===!0,storage:e.storage===!0,metadataCoverage:e.metadataCoverage===!0,byAssignee:e.byAssignee===!0,byTag:e.byTag===!0,byPriority:e.byPriority===!0,tagPrefix:i(e,"tagPrefix"),fieldUtilization:e.fieldUtilization===!0,...o});r.recorded_observations?.some(s=>s.changed)===!0&&await y(a,{ids:r.recorded_observations?.flatMap(s=>s.observation.item_id?[s.observation.item_id]:[])}),l(r,a),a.profile&&u(`profile:command=stats took_ms=${Date.now()-n}`)}async function Re(e,t){let a=c(t),n=Date.now(),o=i(e,"threshold"),r=i(e,"limit"),s=await M(a,{...e.exhaustive===!0?{exhaustive:!0}:{},status:Array.isArray(e.status)&&e.status.length>0?e.status:void 0,since:i(e,"since"),...o===void 0?{}:{threshold:Number(o)},...r===void 0?{}:{limit:Number(r)}});l(s,a),a.profile&&u(`profile:command=duplicates took_ms=${Date.now()-n}`)}async function Oe(e,t){let a=c(t),n=Date.now(),o=!!e.strictExit||!!e.failOnWarn,r=await F(a,{strictExit:o,strictDirectories:!!e.strictDirectories,requireMergeDrivers:!!e.requireMergeDrivers,checkOnly:!!e.checkOnly,checkTelemetry:!!e.checkTelemetry,noRefresh:!!e.noRefresh,refreshVectors:!!e.refreshVectors,verboseStaleItems:!!e.verboseStaleItems,verboseAuthorEvents:!!e.verboseAuthorEvents,brief:!!e.brief,summary:!!e.summary||o,skipVectors:!!e.skipVectors,skipIntegrity:!!e.skipIntegrity,skipDrift:!!e.skipDrift,full:!!e.full});l(r,a),o&&!r.ok&&(x({...r,exit_code:d.GENERIC_FAILURE,error_code:"health_findings",error_category:"validation",command_resolution:"health_findings",resolution_stage:"execute"}),process.exitCode=d.GENERIC_FAILURE),a.profile&&u(`profile:command=health took_ms=${Date.now()-n}`)}async function Pe(e,t){let a=c(t),n=Date.now(),o=await se({checkMetadata:!!e.checkMetadata,metadataProfile:i(e,"metadataProfile"),checkResolution:!!e.checkResolution,checkCompleteness:!!e.checkCompleteness,checkLifecycle:!!e.checkLifecycle,checkStaleBlockers:!!e.checkStaleBlockers,dependencyCycleSeverity:i(e,"dependencyCycleSeverity"),parentCycleSeverity:i(e,"parentCycleSeverity"),checkFiles:!!e.checkFiles,checkCommandReferences:!!e.checkCommandReferences,scanMode:i(e,"scanMode"),includePmInternals:!!e.includePmInternals,verboseFileLists:!!e.verboseFileLists,verboseDiagnostics:!!e.verboseDiagnostics,allAffectedIds:!!e.allAffectedIds,checkHistoryDrift:!!e.checkHistoryDrift,checkStorageIntegrity:!!e.checkStorageIntegrity,fixHints:!!e.fixHints,autoFix:!!e.autoFix,dryRun:!!e.dryRun,fixScope:Array.isArray(e.fixScope)?e.fixScope:void 0,pruneMissing:!!e.pruneMissing,counts:!!e.counts,full:!!e.full},a);l(o,a),(e.strictExit||e.failOnWarn)&&(o.has_warnings||!o.ok)&&(x({...o,exit_code:d.GENERIC_FAILURE,error_code:"validation_findings",error_category:"validation",command_resolution:"validation_findings",resolution_stage:"execute"}),process.exitCode=d.GENERIC_FAILURE),a.profile&&u(`profile:command=validate took_ms=${Date.now()-n}`)}async function Le(e,t){let a=c(t),n=Date.now(),o=await U(a,{dryRun:e.dryRun===!0,scope:Array.isArray(e.scope)?e.scope:[]});l(o,a),a.profile&&u(`profile:command=gc took_ms=${Date.now()-n}`)}async function Me(e,t,a,n){let o=c(n),r=v(process.cwd(),o.path),s=e.trim().toLowerCase();if(!C.some(p=>p===s))throw _({command_path:"workspace snapshot",token:e,allowed:C,display_name:"workspace snapshot",token_kind:"action",examples:["pm workspace snapshot create before-migration","pm workspace snapshot restore before-migration"]});if(s==="list"){l(await Y(r),o);return}if(s==="create"){l(await B(r,t===void 0?{}:{name:t}),o);return}if(t===void 0)throw new m(`pm workspace snapshot ${s} requires a snapshot name or fingerprint`,d.USAGE);if(s==="inspect"){l(await z(r,t),o);return}if(s==="restore"){if(a.dryRun===!0){l(await K(r,t),o);return}let p=await A(r);l(await X(r,t,{force:a.force===!0,author:E(i(a,"author"),p.author_default),message:i(a,"message"),lockTtlSeconds:p.locks.ttl_seconds,lockWaitMs:p.locks.wait_ms}),o);return}l(await Q(r,t),o)}async function pe(e,t){let a=c(t);l(await Z(a),a)}async function Fe(e,t){let a=c(t),n=Date.now(),o=await R({action:i(e,"action"),command:i(e,"command"),summary:!!e.summary,schemaOnly:!!e.schemaOnly,flagsOnly:!!e.flagsOnly,availabilityOnly:!!e.availabilityOnly,runtimeOnly:!!e.runtimeOnly||!!e.activeOnly,full:!!e.full},a);l(o,a),a.profile&&u(`profile:command=contracts took_ms=${Date.now()-n}`)}async function Ve(e,t,a){if(t.start===!0){ce(e,!1),await ye(e,t,a);return}let n=c(a),o=Date.now(),r={...k(t),ifAvailable:t.ifAvailable===!0,maxAttempts:t.maxAttempts};ce(e,t.next===!0);let s=t.next===!0?await G(!!t.force,n,r,{type:typeof t.type=="string"?t.type:void 0,tag:typeof t.tag=="string"?t.tag:void 0,priority:t.priority,assigneeFilter:typeof t.assigneeFilter=="string"?t.assigneeFilter:void 0,parent:typeof t.parent=="string"?t.parent:void 0,sprint:typeof t.sprint=="string"?t.sprint:void 0,release:typeof t.release=="string"?t.release:void 0,includeDecisions:t.includeDecisions===!0,includeGates:t.includeGates===!0,includeContainers:t.includeContainers===!0,tokenBudget:t.tokenBudget??t.token_budget,explainRanking:t.explainRanking===!0||t.explain_ranking===!0}):await $(e,!!t.force,n,r);await y(n,s),l(s,n),n.profile&&u(`profile:command=claim took_ms=${Date.now()-o}`)}function ce(e,t){if(!t&&!e)throw new m("Specify an item id or pass --next",d.USAGE);if(t&&e)throw new m("Specify either an item id or --next, not both",d.USAGE)}async function Ne(e,t,a){if(t.pause===!0){await ge(e,t,a);return}let n=c(a),o=Date.now(),r=await H(e,!!t.force,n,{...k(t),ownershipReleaseBypass:t.ownershipReleaseBypass===!0});await y(n,r),l(await O("release",[e],t,n,r),n),n.profile&&u(`profile:command=release took_ms=${Date.now()-o}`)}async function D(e){let t=c(e),a=S(e.name());!a||t.json||t.quiet||(await A(v(process.cwd(),t.path))).ux?.deprecation_hints&&u(T(a))}async function ye(e,t,a){await D(a);let n=c(a),o=Date.now(),r=await W(e,{...k(t),force:!!t.force,next:t.next===!0,ifAvailable:t.ifAvailable===!0},n);await y(n,r.update),l(r,n),n.profile&&u(`profile:command=start-task took_ms=${Date.now()-o}`)}async function ge(e,t,a){await D(a);let n=c(a),o=Date.now(),r=await J(e,{...k(t),force:!!t.force},n);await y(n,r.release),l(r,n),n.profile&&u(`profile:command=pause-task took_ms=${Date.now()-o}`)}async function Ue(e,t,a,n){await D(n);let o=c(n),r=Date.now(),s=await j(e,t,{...k(a),validateClose:i(a,"validateClose"),force:!!a.force},o);await y(o,s.release),l(s,o),o.profile&&u(`profile:command=close-task took_ms=${Date.now()-r}`)}function de(e){return e.option("--background","Run linked tests in managed background mode").option("--timeout <seconds>","Default run timeout in seconds").option("--progress","Emit linked-test progress to stderr (always shown in TTY, opt-in for non-TTY)").option("--env-set <value>","Set environment variable(s) for linked-test runs (KEY=VALUE, repeatable)",f).option("--env-clear <value>","Clear environment variable(s) for linked-test runs (NAME, repeatable)",f).option("--shared-host-safe","Apply additive shared-host-safe runtime defaults for linked-test runs").option("--pm-context <mode>","PM test context: schema|tracker|auto|none (default: schema)").option("--override-linked-pm-context","Force run-level --pm-context to override per-linked-test pm_context_mode metadata").option("--workspace-context <mode>","Source-workspace mode: source|isolated|snapshot (default: source)").option("--override-linked-workspace-context","Force run-level --workspace-context over per-linked-test metadata").option("--allow-untrusted-linked-tests","Execute untrusted linked commands when project policy also permits it").option("--fail-on-context-mismatch","Fail linked PM commands when context item counts differ").option("--fail-on-skipped","Treat skipped linked tests as dependency failures").option("--fail-on-empty-test-run","Treat successful linked-test commands that report zero executed tests as failures").option("--require-assertions-for-pm","Require assertion metadata for linked PM command tests").option("--check-context","Preflight linked PM command context diagnostics before executing commands").option("--auto-pm-context","Auto-remediate PM tracker-read context mismatches by routing those linked commands through tracker context")}function Ft(e){le(e);let t=e.command("test").argument("<id>","Item id").option("--add <value>","Add verified isolated test (CSV/markdown or stdin)",f).option("--add-json <value>","Add verified isolated test (JSON object/array or stdin)",f).option("--remove <value>","Remove linked test entry by exact command/path (command=<value> and path=<value> preserve commas and equals signs; or - for stdin)",f).option("--remove-index <n>","Remove the 1-based linked-test index from --list order (repeatable)",f).option("--list","List linked tests without mutating").option("--run","Run linked test commands").option("--match <value>","Run only linked tests whose command/path contains this substring").option("--only-index <n>","Run only the 1-based linked-test index from --list order").option("--only-last","Run only the most recently added linked test");t.option("--acknowledge-linked-tests","Trust the item's current linked commands in this clone without executing them"),de(t).option("--measure <value>","Record name=value[,unit=...][,threshold=...] evidence; repeatable",f).option("--metric-below <value>","Return evidence below name=value").option("--metric-diff <name>","Diff the latest two values").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override").description("Manage tests linked to an item and optionally run them.").action(De);let a=e.command("test-all").description("Run linked tests across matching items.").option("--status <value>","Filter items by status before running tests").option("--limit <n>","Limit matching items before running linked tests").option("--offset <n>","Skip matching items before running linked tests");de(a).action(Se),e.command("test-runs-worker",{hidden:!0}).argument("<runId>","Background run id").description("Internal background worker command.").action(async(w,h,he)=>{let ke=c(he);await oe(w,ke)}),e.command("telemetry").argument("[namespace-or-subcommand]","Telemetry subcommand: status, flush, stats, clear (default: status)").argument("[subcommand]","Compatibility alias target for local-analytics: status, flush, stats, clear").option("--limit <n>","Maximum command groups returned by telemetry stats").description("Inspect and manage local telemetry queue/runtime state.").action(Te),e.command("duplicates").description("Find duplicate clusters across all statuses.").option("--status <value>","Statuses (repeatable or comma-separated)",f,[]).option("--since <value>","Created at or after this time").option("--threshold <value>","Minimum similarity (0-1)").option("--limit <n>","Maximum clusters").option("--exhaustive","Score all pairs within the safety bound").action(Re),e.command("stats").description("Show project tracker statistics.").option("--include-empty","Restore zero-count registered item-type and lifecycle-status buckets").option("--storage","Include aggregate history-stream storage metrics (total streams/lines/bytes, largest + deepest streams, oldest/newest entries)").option("--metadata-coverage","Include metadata coverage % (acceptance_criteria, estimated_minutes, resolution, tags, parent) overall and by type").option("--by-assignee","Include a lifecycle-bucketed item breakdown grouped by assignee").option("--by-tag","Include a lifecycle-bucketed item breakdown grouped by tag").option("--by-priority","Include a lifecycle-bucketed item breakdown grouped by priority").option("--tag-prefix <value>","With --by-tag: only count tags starting with this prefix (e.g. domain:)").option("--field-utilization","Report content-field utilization rates (notes/learnings/files/docs/tests/comments/deps/body) for governance analysis").option("--analytics <json>","Improvement ledger/history analytics JSON").action(Ee),e.command("health").description("Show project tracker health checks.").option("--strict-directories","Treat optional item-type directories as required failures").option("--require-merge-drivers","Treat absent clone-local merge drivers as a required health failure").option("--check-only","Run read-only health diagnostics without refreshing vectors").option("--check-telemetry","Probe telemetry endpoint health and include network diagnostics").option("--no-refresh","Disable automatic vector refresh attempts during health checks").option("--refresh-vectors","Explicitly enable vector refresh attempts during health checks").option("--verbose-stale-items","Include full stale vectorization ID lists in health output").option("--verbose-author-events","Include every actionable unknown-author event coordinate for review or disposition").option("--brief","Emit compact health details for low-token agent checks").option("--summary","Emit one-line-style health status with check names and warning count").option("--skip-vectors","Skip vectorization check for a faster run").option("--skip-integrity","Skip item/history file integrity check for a faster run").option("--skip-drift","Skip history drift hash check for a faster run").option("--full","Run all checks including slow integrity, drift, and vectorization checks").option("--strict-exit","Return non-zero exit when health is not ok and default to actionable summary output; use --full for complete details").option("--fail-on-warn","Alias for --strict-exit").action(Oe),e.command("validate").description("Validate metadata, lifecycle policies, files, command references, and history.").option("--check-metadata","Run metadata completeness checks").option("--metadata-profile <value>","Metadata profile (core|strict|custom)").option("--check-resolution","Run closed-item resolution metadata checks").option("--check-completeness","Check declarative lifecycle field requirements").option("--check-lifecycle","Run active-item lifecycle governance drift checks").option("--check-stale-blockers","Include stale blocker-pattern diagnostics in lifecycle checks").option("--dependency-cycle-severity <value>","Set dependency-cycle warning policy for lifecycle checks (off|warn|error)").option("--parent-cycle-severity <value>","Set parent-hierarchy cycle warning policy for lifecycle checks (off|warn|error)").option("--check-files","Run linked-file and orphaned-file checks").option("--check-command-references","Run linked-command PM-ID reference checks").option("--scan-mode <value>","Select file candidate scan mode for --check-files (default|tracked-all|tracked-all-strict)").option("--include-pm-internals","Include PM storage internals in tracked-all candidate scans").option("--verbose-file-lists","Include full file-path lists for validate --check-files details").option("--verbose-diagnostics","Include full diagnostic ID lists").option("--all-affected-ids","Emit complete missing_* affected-ID lists with no truncation (implied by --json)").option("--strict-exit","Return non-zero exit when validation warnings are present").option("--fail-on-warn","Alias for --strict-exit").option("--fix-hints","Add a machine-executable fix_hints[] of pm commands to each failing check's details").option("--auto-fix","Apply safe, deterministic field backfills").option("--dry-run","Preview planned --auto-fix/--prune-missing fixes without applying them").option("--fix-scope <scope>","Grant --auto-fix scopes (metadata, resolution, estimates, timestamps, lifecycle; comma-separated or repeatable). Default: metadata, resolution; other scopes require explicit opt-in",f).option("--prune-missing","Remove deleted-path file/doc links; preserves real files").option("--check-history-drift","Run item/history hash drift checks").option("--check-storage-integrity","Run the post-merge storage-integrity check (unreadable items, history conflict markers, resurrected deletes, unparseable config/schema)").option("--counts","Keep validation counts and totals while omitting per-item diagnostic arrays").option("--full","Return the complete validation diagnostic projection").action(Pe),e.command("gc").option("--dry-run","Preview cleanup targets without deleting files; without this flag, pm gc deletes matched artifacts").option("--scope <value>","Limit cleanup to one or more scopes (comma-separated or repeatable): index, embeddings, runtime, locks, checkpoints, transactions",f).description("Delete optional cache artifacts by default (including expired lock debris) and show a summary.").action(Le);let n=e.command("workspace").description("Inspect workspace state and snapshots.");n.command("position").description("Show merge and history readiness.").action(pe),n.command("snapshot").argument("<action>","Action: create, list, inspect, restore, delete").argument("[target]","Optional name for create; name or fingerprint otherwise").description("Manage content-addressed tracker snapshots.").option("--dry-run","Preview restore file, item, stream, and history-entry impact without mutating state").option("--force","Explicitly confirm a whole-workspace snapshot restore").option("--author <value>","Actor recorded on the restore audit event").option("--message <value>","Human-readable restore rationale").action(Me),e.command("contracts").description("Show machine-readable command and schema contracts for agents.").option("--action <value>","Filter tool schema branches to a specific action").option("--command <value>","Scope contracts output to one CLI command (narrow-by-default)").option("--summary","Return one command+intent row per top-level command for cheap agent bootstrap").option("--schema-only","Return schema-focused output only").option("--flags-only","Return command flag contracts only").option("--availability-only","Return action availability surface only").option("--runtime-only","Include only actions invocable in the current runtime").option("--active-only","Alias for --runtime-only").option("--full","Include full schema and command-flag surfaces (large; default brief output omits heavy sections for unfiltered queries)").action(Fe);let o=e.command("claim").option("--start","Claim and start an explicit item").argument("[id]","Item id (omit with --next)").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force claim override").option("--if-available","Skip another author's claim (skipped=true)").option("--next","Atomically claim the next caller-available actionable item").option("--type <value>","Filter --next candidates by type").option("--tag <value>","Filter --next candidates by tag").option("--priority <value>","Filter --next candidates by priority").option("--assignee-filter <value>","Filter --next candidates: assigned|unassigned").option("--parent <id>","Scope --next candidates to a subtree").option("--sprint <value>","Filter --next candidates by sprint").option("--release <value>","Filter --next candidates by release").option("--max-attempts <n>","Bound the --next candidate walk (default 10; maximum 100)").option("--include-decisions","Allow --next to claim human-gated Decision items").option("--include-gates","Allow --next to claim outcome gates").option("--include-containers","Allow --next to claim containers with unfinished descendants").option("--token-budget <n>","Bound the estimated tokens used to rank --next candidates").option("--explain-ranking","Include ranking provenance for --next selection").description("Claim an item for active work.").action(Ve);g(o,"--assignee <value>","Alias for --author on lifecycle ownership commands"),g(o,"--token_budget <n>","Alias for --token-budget"),g(o,"--explain_ranking","Alias for --explain-ranking");let r=e.command("release").option("--pause","Use open status").argument("<id>","Item id").option("--author <value>","Author").option("--message <value>","Message").option("--force","Override ownership").description("Release ownership.").action(Ne);g(r,"--assignee <value>","Alias for --author on lifecycle ownership commands");let s=e.command("start-task",{hidden:!0}).argument("<id>","Item id").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership or terminal override when required").description("Lifecycle alias: claim an item and move it to in_progress.").action(ye);g(s,"--assignee <value>","Alias for --author on lifecycle ownership commands");let p=e.command("pause-task",{hidden:!0}).argument("<id>","Item id").option("--author <value>","Mutation author").option("--message <value>","History message").option("--force","Force ownership override when required").description("Lifecycle alias: move an item to open and release its claim.").action(ge);g(p,"--assignee <value>","Alias for --author on lifecycle ownership commands");let b=e.command("close-task",{hidden:!0}).argument("<id>","Item id").argument("[reason]","Close reason text").option("--author <value>","Mutation author").option("--message <value>","History message").option("--validate-close <value>","Close-time validation mode: off|warn|strict").option("--force","Force ownership or terminal override when required").description("Lifecycle alias: close an item and release assignment metadata.").action(Ue);g(b,"--assignee <value>","Alias for --author on lifecycle ownership commands")}export{Mt as _testOnlyRegisterOperations,Ft as registerOperationCommands,ce as requireClaimTarget};
2
+ //# sourceMappingURL=register-operations-6KHZQSYJ.js.map