@unbrained/pm-cli 2026.5.12 → 2026.5.18

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 (407) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/AGENTS.md +78 -457
  3. package/CHANGELOG.md +22 -0
  4. package/CONTRIBUTING.md +1 -0
  5. package/PRD.md +7 -28
  6. package/README.md +8 -14
  7. package/dist/cli/argv-utils.js +4 -1
  8. package/dist/cli/argv-utils.js.map +1 -1
  9. package/dist/cli/bootstrap-args.js +4 -1
  10. package/dist/cli/bootstrap-args.js.map +1 -1
  11. package/dist/cli/commander-usage.js +32 -1
  12. package/dist/cli/commander-usage.js.map +1 -1
  13. package/dist/cli/commands/activity.js +23 -5
  14. package/dist/cli/commands/activity.js.map +1 -1
  15. package/dist/cli/commands/aggregate.js +5 -2
  16. package/dist/cli/commands/aggregate.js.map +1 -1
  17. package/dist/cli/commands/append.js +4 -1
  18. package/dist/cli/commands/append.js.map +1 -1
  19. package/dist/cli/commands/calendar.js +9 -3
  20. package/dist/cli/commands/calendar.js.map +1 -1
  21. package/dist/cli/commands/claim.d.ts +3 -0
  22. package/dist/cli/commands/claim.js +19 -3
  23. package/dist/cli/commands/claim.js.map +1 -1
  24. package/dist/cli/commands/close.js +4 -1
  25. package/dist/cli/commands/close.js.map +1 -1
  26. package/dist/cli/commands/comments-audit.js +4 -1
  27. package/dist/cli/commands/comments-audit.js.map +1 -1
  28. package/dist/cli/commands/comments.js +4 -1
  29. package/dist/cli/commands/comments.js.map +1 -1
  30. package/dist/cli/commands/completion.js +98 -2
  31. package/dist/cli/commands/completion.js.map +1 -1
  32. package/dist/cli/commands/config.js +4 -1
  33. package/dist/cli/commands/config.js.map +1 -1
  34. package/dist/cli/commands/context.js +19 -5
  35. package/dist/cli/commands/context.js.map +1 -1
  36. package/dist/cli/commands/contracts.d.ts +9 -0
  37. package/dist/cli/commands/contracts.js +205 -49
  38. package/dist/cli/commands/contracts.js.map +1 -1
  39. package/dist/cli/commands/create.js +88 -9
  40. package/dist/cli/commands/create.js.map +1 -1
  41. package/dist/cli/commands/dedupe-audit.js +4 -1
  42. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  43. package/dist/cli/commands/delete.js +4 -1
  44. package/dist/cli/commands/delete.js.map +1 -1
  45. package/dist/cli/commands/deps.js +4 -1
  46. package/dist/cli/commands/deps.js.map +1 -1
  47. package/dist/cli/commands/docs.js +4 -1
  48. package/dist/cli/commands/docs.js.map +1 -1
  49. package/dist/cli/commands/extension.d.ts +7 -2
  50. package/dist/cli/commands/extension.js +360 -64
  51. package/dist/cli/commands/extension.js.map +1 -1
  52. package/dist/cli/commands/files.js +4 -1
  53. package/dist/cli/commands/files.js.map +1 -1
  54. package/dist/cli/commands/gc.js +4 -1
  55. package/dist/cli/commands/gc.js.map +1 -1
  56. package/dist/cli/commands/get.d.ts +7 -3
  57. package/dist/cli/commands/get.js +91 -18
  58. package/dist/cli/commands/get.js.map +1 -1
  59. package/dist/cli/commands/guide.js +6 -8
  60. package/dist/cli/commands/guide.js.map +1 -1
  61. package/dist/cli/commands/health.d.ts +4 -0
  62. package/dist/cli/commands/health.js +31 -8
  63. package/dist/cli/commands/health.js.map +1 -1
  64. package/dist/cli/commands/history-redact.d.ts +42 -0
  65. package/dist/cli/commands/history-redact.js +559 -0
  66. package/dist/cli/commands/history-redact.js.map +1 -0
  67. package/dist/cli/commands/history.d.ts +4 -0
  68. package/dist/cli/commands/history.js +14 -3
  69. package/dist/cli/commands/history.js.map +1 -1
  70. package/dist/cli/commands/index.d.ts +2 -8
  71. package/dist/cli/commands/index.js +6 -9
  72. package/dist/cli/commands/index.js.map +1 -1
  73. package/dist/cli/commands/init-agent-guidance.d.ts +31 -0
  74. package/dist/cli/commands/init-agent-guidance.js +336 -0
  75. package/dist/cli/commands/init-agent-guidance.js.map +1 -0
  76. package/dist/cli/commands/init.d.ts +14 -0
  77. package/dist/cli/commands/init.js +75 -1
  78. package/dist/cli/commands/init.js.map +1 -1
  79. package/dist/cli/commands/learnings.js +4 -1
  80. package/dist/cli/commands/learnings.js.map +1 -1
  81. package/dist/cli/commands/list.d.ts +1 -0
  82. package/dist/cli/commands/list.js +42 -18
  83. package/dist/cli/commands/list.js.map +1 -1
  84. package/dist/cli/commands/metadata-normalizers.js +4 -1
  85. package/dist/cli/commands/metadata-normalizers.js.map +1 -1
  86. package/dist/cli/commands/normalize.js +4 -1
  87. package/dist/cli/commands/normalize.js.map +1 -1
  88. package/dist/cli/commands/notes.js +4 -1
  89. package/dist/cli/commands/notes.js.map +1 -1
  90. package/dist/cli/commands/plan.d.ts +118 -0
  91. package/dist/cli/commands/plan.js +975 -0
  92. package/dist/cli/commands/plan.js.map +1 -0
  93. package/dist/cli/commands/reindex.d.ts +8 -0
  94. package/dist/cli/commands/reindex.js +100 -24
  95. package/dist/cli/commands/reindex.js.map +1 -1
  96. package/dist/cli/commands/restore.js +4 -1
  97. package/dist/cli/commands/restore.js.map +1 -1
  98. package/dist/cli/commands/search.js +58 -27
  99. package/dist/cli/commands/search.js.map +1 -1
  100. package/dist/cli/commands/stats.js +4 -1
  101. package/dist/cli/commands/stats.js.map +1 -1
  102. package/dist/cli/commands/templates.js +4 -1
  103. package/dist/cli/commands/templates.js.map +1 -1
  104. package/dist/cli/commands/test-all.js +4 -1
  105. package/dist/cli/commands/test-all.js.map +1 -1
  106. package/dist/cli/commands/test-runs.js +4 -1
  107. package/dist/cli/commands/test-runs.js.map +1 -1
  108. package/dist/cli/commands/test.js +4 -1
  109. package/dist/cli/commands/test.js.map +1 -1
  110. package/dist/cli/commands/update-many.js +4 -1
  111. package/dist/cli/commands/update-many.js.map +1 -1
  112. package/dist/cli/commands/update.js +114 -71
  113. package/dist/cli/commands/update.js.map +1 -1
  114. package/dist/cli/commands/upgrade.js +6 -3
  115. package/dist/cli/commands/upgrade.js.map +1 -1
  116. package/dist/cli/commands/validate.js +32 -4
  117. package/dist/cli/commands/validate.js.map +1 -1
  118. package/dist/cli/error-guidance.js +5 -2
  119. package/dist/cli/error-guidance.js.map +1 -1
  120. package/dist/cli/extension-command-help.js +4 -1
  121. package/dist/cli/extension-command-help.js.map +1 -1
  122. package/dist/cli/extension-command-options.js +4 -1
  123. package/dist/cli/extension-command-options.js.map +1 -1
  124. package/dist/cli/guide-topics.js +4 -1
  125. package/dist/cli/guide-topics.js.map +1 -1
  126. package/dist/cli/help-content.js +52 -33
  127. package/dist/cli/help-content.js.map +1 -1
  128. package/dist/cli/help-json-payload.js +4 -1
  129. package/dist/cli/help-json-payload.js.map +1 -1
  130. package/dist/cli/main.js +276 -32
  131. package/dist/cli/main.js.map +1 -1
  132. package/dist/cli/migration-gates.js +4 -1
  133. package/dist/cli/migration-gates.js.map +1 -1
  134. package/dist/cli/register-list-query.js +55 -150
  135. package/dist/cli/register-list-query.js.map +1 -1
  136. package/dist/cli/register-mutation.js +277 -261
  137. package/dist/cli/register-mutation.js.map +1 -1
  138. package/dist/cli/register-operations.js +62 -199
  139. package/dist/cli/register-operations.js.map +1 -1
  140. package/dist/cli/register-setup.js +55 -146
  141. package/dist/cli/register-setup.js.map +1 -1
  142. package/dist/cli/registration-helpers.d.ts +2 -2
  143. package/dist/cli/registration-helpers.js +11 -21
  144. package/dist/cli/registration-helpers.js.map +1 -1
  145. package/dist/cli/shared-parsers.js +4 -1
  146. package/dist/cli/shared-parsers.js.map +1 -1
  147. package/dist/cli/telemetry-flush.js +4 -1
  148. package/dist/cli/telemetry-flush.js.map +1 -1
  149. package/dist/cli.js +45 -3
  150. package/dist/cli.js.map +1 -1
  151. package/dist/core/extensions/extension-types.js +4 -1
  152. package/dist/core/extensions/extension-types.js.map +1 -1
  153. package/dist/core/extensions/index.js +4 -1
  154. package/dist/core/extensions/index.js.map +1 -1
  155. package/dist/core/extensions/item-fields.js +4 -1
  156. package/dist/core/extensions/item-fields.js.map +1 -1
  157. package/dist/core/extensions/loader.js +84 -54
  158. package/dist/core/extensions/loader.js.map +1 -1
  159. package/dist/core/extensions/runtime-registrations.js +4 -1
  160. package/dist/core/extensions/runtime-registrations.js.map +1 -1
  161. package/dist/core/fs/fs-utils.js +4 -1
  162. package/dist/core/fs/fs-utils.js.map +1 -1
  163. package/dist/core/fs/index.js +4 -1
  164. package/dist/core/fs/index.js.map +1 -1
  165. package/dist/core/history/history-stream-policy.js +4 -1
  166. package/dist/core/history/history-stream-policy.js.map +1 -1
  167. package/dist/core/history/history.js +4 -1
  168. package/dist/core/history/history.js.map +1 -1
  169. package/dist/core/history/index.js +4 -1
  170. package/dist/core/history/index.js.map +1 -1
  171. package/dist/core/item/id.js +4 -1
  172. package/dist/core/item/id.js.map +1 -1
  173. package/dist/core/item/index.js +4 -1
  174. package/dist/core/item/index.js.map +1 -1
  175. package/dist/core/item/item-format.js +241 -2
  176. package/dist/core/item/item-format.js.map +1 -1
  177. package/dist/core/item/parent-reference-policy.js +4 -1
  178. package/dist/core/item/parent-reference-policy.js.map +1 -1
  179. package/dist/core/item/parse.js +33 -3
  180. package/dist/core/item/parse.js.map +1 -1
  181. package/dist/core/item/sprint-release-format.js +4 -1
  182. package/dist/core/item/sprint-release-format.js.map +1 -1
  183. package/dist/core/item/status.js +4 -1
  184. package/dist/core/item/status.js.map +1 -1
  185. package/dist/core/item/type-registry.js +4 -1
  186. package/dist/core/item/type-registry.js.map +1 -1
  187. package/dist/core/lock/index.js +4 -1
  188. package/dist/core/lock/index.js.map +1 -1
  189. package/dist/core/lock/lock.js +4 -1
  190. package/dist/core/lock/lock.js.map +1 -1
  191. package/dist/core/output/command-aware.js +4 -1
  192. package/dist/core/output/command-aware.js.map +1 -1
  193. package/dist/core/output/output.d.ts +4 -0
  194. package/dist/core/output/output.js +47 -6
  195. package/dist/core/output/output.js.map +1 -1
  196. package/dist/core/packages/manifest.d.ts +27 -1
  197. package/dist/core/packages/manifest.js +87 -1
  198. package/dist/core/packages/manifest.js.map +1 -1
  199. package/dist/core/packages/root.d.ts +3 -0
  200. package/dist/core/packages/root.js +51 -0
  201. package/dist/core/packages/root.js.map +1 -0
  202. package/dist/core/schema/runtime-field-filters.js +4 -1
  203. package/dist/core/schema/runtime-field-filters.js.map +1 -1
  204. package/dist/core/schema/runtime-field-values.js +4 -1
  205. package/dist/core/schema/runtime-field-values.js.map +1 -1
  206. package/dist/core/schema/runtime-schema.js +4 -1
  207. package/dist/core/schema/runtime-schema.js.map +1 -1
  208. package/dist/core/search/cache.js +7 -2
  209. package/dist/core/search/cache.js.map +1 -1
  210. package/dist/core/search/corpus.d.ts +2 -0
  211. package/dist/core/search/corpus.js +77 -2
  212. package/dist/core/search/corpus.js.map +1 -1
  213. package/dist/core/search/embedding-batches.d.ts +13 -1
  214. package/dist/core/search/embedding-batches.js +40 -8
  215. package/dist/core/search/embedding-batches.js.map +1 -1
  216. package/dist/core/search/http-client.js +4 -1
  217. package/dist/core/search/http-client.js.map +1 -1
  218. package/dist/core/search/providers.js +4 -1
  219. package/dist/core/search/providers.js.map +1 -1
  220. package/dist/core/search/semantic-defaults.js +11 -2
  221. package/dist/core/search/semantic-defaults.js.map +1 -1
  222. package/dist/core/search/vector-stores.js +4 -1
  223. package/dist/core/search/vector-stores.js.map +1 -1
  224. package/dist/core/sentry/helpers.js +4 -1
  225. package/dist/core/sentry/helpers.js.map +1 -1
  226. package/dist/core/sentry/instrument.js +10 -13
  227. package/dist/core/sentry/instrument.js.map +1 -1
  228. package/dist/core/shared/command-types.js +4 -1
  229. package/dist/core/shared/command-types.js.map +1 -1
  230. package/dist/core/shared/conflict-markers.js +4 -1
  231. package/dist/core/shared/conflict-markers.js.map +1 -1
  232. package/dist/core/shared/constants.d.ts +2 -2
  233. package/dist/core/shared/constants.js +24 -1
  234. package/dist/core/shared/constants.js.map +1 -1
  235. package/dist/core/shared/errors.js +4 -1
  236. package/dist/core/shared/errors.js.map +1 -1
  237. package/dist/core/shared/index.js +4 -1
  238. package/dist/core/shared/index.js.map +1 -1
  239. package/dist/core/shared/levenshtein.js +4 -1
  240. package/dist/core/shared/levenshtein.js.map +1 -1
  241. package/dist/core/shared/primitives.js +4 -1
  242. package/dist/core/shared/primitives.js.map +1 -1
  243. package/dist/core/shared/serialization.js +4 -1
  244. package/dist/core/shared/serialization.js.map +1 -1
  245. package/dist/core/shared/text-normalization.js +4 -1
  246. package/dist/core/shared/text-normalization.js.map +1 -1
  247. package/dist/core/shared/time.js +4 -1
  248. package/dist/core/shared/time.js.map +1 -1
  249. package/dist/core/store/front-matter-cache.d.ts +8 -1
  250. package/dist/core/store/front-matter-cache.js +28 -14
  251. package/dist/core/store/front-matter-cache.js.map +1 -1
  252. package/dist/core/store/index.js +4 -1
  253. package/dist/core/store/index.js.map +1 -1
  254. package/dist/core/store/item-format-migration.js +4 -1
  255. package/dist/core/store/item-format-migration.js.map +1 -1
  256. package/dist/core/store/item-store.d.ts +2 -0
  257. package/dist/core/store/item-store.js +66 -3
  258. package/dist/core/store/item-store.js.map +1 -1
  259. package/dist/core/store/paths.js +4 -1
  260. package/dist/core/store/paths.js.map +1 -1
  261. package/dist/core/store/settings.js +39 -1
  262. package/dist/core/store/settings.js.map +1 -1
  263. package/dist/core/telemetry/consent.js +4 -1
  264. package/dist/core/telemetry/consent.js.map +1 -1
  265. package/dist/core/telemetry/observability.d.ts +1 -1
  266. package/dist/core/telemetry/observability.js +11 -2
  267. package/dist/core/telemetry/observability.js.map +1 -1
  268. package/dist/core/telemetry/runtime.js +31 -5
  269. package/dist/core/telemetry/runtime.js.map +1 -1
  270. package/dist/core/test/background-runs.js +4 -1
  271. package/dist/core/test/background-runs.js.map +1 -1
  272. package/dist/core/test/item-test-run-tracking.js +4 -1
  273. package/dist/core/test/item-test-run-tracking.js.map +1 -1
  274. package/dist/mcp/server.d.ts +8 -0
  275. package/dist/mcp/server.js +212 -53
  276. package/dist/mcp/server.js.map +1 -1
  277. package/dist/sdk/cli-contracts/commander-mutation-options.d.ts +7 -0
  278. package/dist/sdk/cli-contracts/commander-mutation-options.js +484 -0
  279. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -0
  280. package/dist/sdk/cli-contracts/commander-types.d.ts +21 -0
  281. package/dist/sdk/cli-contracts/commander-types.js +95 -0
  282. package/dist/sdk/cli-contracts/commander-types.js.map +1 -0
  283. package/dist/sdk/cli-contracts.d.ts +10 -17
  284. package/dist/sdk/cli-contracts.js +232 -282
  285. package/dist/sdk/cli-contracts.js.map +1 -1
  286. package/dist/sdk/index.d.ts +2 -1
  287. package/dist/sdk/index.js +5 -1
  288. package/dist/sdk/index.js.map +1 -1
  289. package/dist/sdk/runtime.d.ts +29 -0
  290. package/dist/sdk/runtime.js +31 -0
  291. package/dist/sdk/runtime.js.map +1 -0
  292. package/dist/types/index.js +4 -1
  293. package/dist/types/index.js.map +1 -1
  294. package/dist/types.d.ts +86 -2
  295. package/dist/types.js +34 -1
  296. package/dist/types.js.map +1 -1
  297. package/docs/AGENT_GUIDE.md +16 -6
  298. package/docs/CLAUDE_CODE_PLUGIN.md +10 -10
  299. package/docs/CODEX_PLUGIN.md +2 -2
  300. package/docs/COMMANDS.md +83 -8
  301. package/docs/CONFIGURATION.md +4 -1
  302. package/docs/EXTENSIONS.md +176 -807
  303. package/docs/QUICKSTART.md +12 -5
  304. package/docs/README.md +7 -6
  305. package/docs/RELEASING.md +6 -4
  306. package/docs/SDK.md +78 -441
  307. package/docs/TESTING.md +2 -2
  308. package/marketplace.json +3 -3
  309. package/package.json +7 -4
  310. package/packages/pm-beads/extensions/beads/index.js +90 -101
  311. package/packages/pm-beads/extensions/beads/index.ts +2 -2
  312. package/packages/pm-beads/extensions/beads/runtime.js +2 -17
  313. package/packages/pm-beads/extensions/beads/runtime.ts +41 -18
  314. package/packages/pm-beads/package.json +34 -1
  315. package/packages/pm-calendar/README.md +13 -0
  316. package/packages/pm-calendar/extensions/calendar/index.js +56 -0
  317. package/packages/pm-calendar/extensions/calendar/index.ts +62 -0
  318. package/packages/pm-calendar/extensions/calendar/manifest.json +7 -0
  319. package/packages/pm-calendar/extensions/calendar/runtime.js +114 -0
  320. package/packages/pm-calendar/extensions/calendar/runtime.ts +123 -0
  321. package/packages/pm-calendar/package.json +51 -0
  322. package/packages/pm-governance-audit/README.md +23 -0
  323. package/packages/pm-governance-audit/extensions/governance-audit/index.js +117 -0
  324. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +118 -0
  325. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +7 -0
  326. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +159 -0
  327. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +176 -0
  328. package/packages/pm-governance-audit/package.json +52 -0
  329. package/packages/pm-guide-shell/README.md +23 -0
  330. package/packages/pm-guide-shell/extensions/guide-shell/index.js +76 -0
  331. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +81 -0
  332. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +7 -0
  333. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +263 -0
  334. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +327 -0
  335. package/packages/pm-guide-shell/package.json +52 -0
  336. package/packages/pm-linked-test-adapters/README.md +24 -0
  337. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +101 -0
  338. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +102 -0
  339. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +7 -0
  340. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +142 -0
  341. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +173 -0
  342. package/packages/pm-linked-test-adapters/package.json +53 -0
  343. package/packages/pm-search-advanced/README.md +27 -0
  344. package/packages/pm-search-advanced/extensions/search-advanced/index.js +93 -0
  345. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +94 -0
  346. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +7 -0
  347. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +120 -0
  348. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +144 -0
  349. package/packages/pm-search-advanced/package.json +54 -0
  350. package/packages/pm-templates/README.md +20 -0
  351. package/packages/pm-templates/extensions/templates/index.js +101 -0
  352. package/packages/pm-templates/extensions/templates/index.ts +109 -0
  353. package/packages/pm-templates/extensions/templates/manifest.json +7 -0
  354. package/packages/pm-templates/extensions/templates/runtime.js +226 -0
  355. package/packages/pm-templates/extensions/templates/runtime.ts +283 -0
  356. package/packages/pm-templates/package.json +50 -0
  357. package/packages/pm-todos/extensions/todos/index.js +105 -116
  358. package/packages/pm-todos/extensions/todos/index.ts +3 -2
  359. package/packages/pm-todos/extensions/todos/runtime.js +2 -17
  360. package/packages/pm-todos/extensions/todos/runtime.ts +40 -18
  361. package/packages/pm-todos/package.json +35 -1
  362. package/plugins/{pm-cli-claude → pm-claude}/.claude-plugin/plugin.json +2 -2
  363. package/plugins/{pm-cli-claude → pm-claude}/.mcp.json +1 -1
  364. package/plugins/{pm-cli-claude → pm-claude}/README.md +4 -4
  365. package/plugins/{pm-cli-claude → pm-claude}/agents/pm-coordinator.md +1 -1
  366. package/plugins/{pm-cli-claude → pm-claude}/commands/pm-init.md +10 -1
  367. package/plugins/{pm-cli-claude → pm-claude}/commands/pm-planner.md +18 -0
  368. package/plugins/{pm-cli-claude → pm-claude}/scripts/pm-mcp-server.mjs +4 -2
  369. package/plugins/{pm-cli-claude → pm-claude}/skills/pm-planner/SKILL.md +46 -1
  370. package/plugins/{pm-cli-codex → pm-codex}/.codex-plugin/plugin.json +3 -3
  371. package/plugins/{pm-cli-codex → pm-codex}/.mcp.json +1 -1
  372. package/plugins/{pm-cli-codex → pm-codex}/README.md +7 -4
  373. package/plugins/{pm-cli-codex → pm-codex}/scripts/pm-mcp-server.mjs +4 -2
  374. package/plugins/pm-codex/skills/pm-native/SKILL.md +81 -0
  375. package/scripts/finalize-build.mjs +28 -0
  376. package/scripts/prepare-build-cache.mjs +37 -0
  377. package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +0 -57
  378. /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-delivery-chain.md +0 -0
  379. /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-triage-agent.md +0 -0
  380. /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-verification-agent.md +0 -0
  381. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-audit.md +0 -0
  382. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-calendar.md +0 -0
  383. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-close-task.md +0 -0
  384. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-developer.md +0 -0
  385. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-list.md +0 -0
  386. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-new.md +0 -0
  387. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-release.md +0 -0
  388. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-search.md +0 -0
  389. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-start-task.md +0 -0
  390. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-status.md +0 -0
  391. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-triage.md +0 -0
  392. /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-workflow.md +0 -0
  393. /package/plugins/{pm-cli-claude → pm-claude}/hooks/hooks.json +0 -0
  394. /package/plugins/{pm-cli-claude → pm-claude}/hooks/session-start.mjs +0 -0
  395. /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-audit/SKILL.md +0 -0
  396. /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-developer/SKILL.md +0 -0
  397. /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-release/SKILL.md +0 -0
  398. /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-workflow/SKILL.md +0 -0
  399. /package/plugins/{pm-cli-codex → pm-codex}/assets/pm-cli-small.svg +0 -0
  400. /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-audit.md +0 -0
  401. /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-close-task.md +0 -0
  402. /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-start-task.md +0 -0
  403. /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-auditor/SKILL.md +0 -0
  404. /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-auditor/agents/openai.yaml +0 -0
  405. /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-native/agents/openai.yaml +0 -0
  406. /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-release/SKILL.md +0 -0
  407. /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-release/agents/openai.yaml +0 -0
@@ -1,15 +1,18 @@
1
- import { pathExists } from "../core/fs/fs-utils.js";
2
- import { resolveItemTypeRegistry } from "../core/item/type-registry.js";
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ff7fe568-0a90-519b-8099-b034273a3752")}catch(e){}}();
3
3
  import { normalizeStatusInput } from "../core/item/status.js";
4
- import { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry } from "../core/schema/runtime-schema.js";
4
+ import { resolveRuntimeStatusRegistry } from "../core/schema/runtime-schema.js";
5
+ import { setActiveCommandResult } from "../core/extensions/index.js";
5
6
  import { EXIT_CODE } from "../core/shared/constants.js";
6
7
  import { PmCliError } from "../core/shared/errors.js";
7
- import { listAllFrontMatter } from "../core/store/item-store.js";
8
- import { getSettingsPath, resolvePmRoot } from "../core/store/paths.js";
8
+ import { resolvePmRoot } from "../core/store/paths.js";
9
9
  import { readSettings } from "../core/store/settings.js";
10
- import { getActiveExtensionRegistrations } from "../core/extensions/index.js";
11
- import { runClaim, runClose, runCompletion, runContracts, runGc, runHealth, runRelease, runStartBackgroundRun, runStats, runTest, runTestAll, runTestRunsList, runTestRunsLogs, runTestRunsResume, runTestRunsStatus, runTestRunsStop, runTestRunsWorker, runUpdate, runValidate, } from "./commands/index.js";
12
- import { buildBackgroundTestAllCommandArgs, buildBackgroundTestCommandArgs, collect, getGlobalOptions, invalidateSearchCachesForMutation, printError, printResult, writeStdout, } from "./registration-helpers.js";
10
+ import { buildBackgroundTestAllCommandArgs, buildBackgroundTestCommandArgs, collect, getGlobalOptions, invalidateSearchCachesForMutation, printError, printResult, } from "./registration-helpers.js";
11
+ let operationCommandsModulePromise = null;
12
+ async function loadOperationCommandsModule() {
13
+ operationCommandsModulePromise ??= import("./commands/index.js");
14
+ return operationCommandsModulePromise;
15
+ }
13
16
  export function registerOperationCommands(program) {
14
17
  program
15
18
  .command("test")
@@ -48,6 +51,7 @@ export function registerOperationCommands(program) {
48
51
  throw new PmCliError("--background does not support --add/--remove; update linked tests first, then run in background", EXIT_CODE.USAGE);
49
52
  }
50
53
  if (runInBackground) {
54
+ const { runStartBackgroundRun } = await loadOperationCommandsModule();
51
55
  const result = await runStartBackgroundRun({
52
56
  kind: "test",
53
57
  commandArgs: buildBackgroundTestCommandArgs(id, { ...options, add: addValues, remove: removeValues }),
@@ -61,6 +65,7 @@ export function registerOperationCommands(program) {
61
65
  }
62
66
  return;
63
67
  }
68
+ const { runTest } = await loadOperationCommandsModule();
64
69
  const result = await runTest(id, {
65
70
  add: addValues,
66
71
  remove: removeValues,
@@ -118,6 +123,7 @@ export function registerOperationCommands(program) {
118
123
  const startedAt = Date.now();
119
124
  const runInBackground = options.background === true;
120
125
  if (runInBackground) {
126
+ const { runStartBackgroundRun } = await loadOperationCommandsModule();
121
127
  const result = await runStartBackgroundRun({
122
128
  kind: "test-all",
123
129
  commandArgs: buildBackgroundTestAllCommandArgs(options),
@@ -130,6 +136,7 @@ export function registerOperationCommands(program) {
130
136
  }
131
137
  return;
132
138
  }
139
+ const { runTestAll } = await loadOperationCommandsModule();
133
140
  const result = await runTestAll({
134
141
  status: typeof options.status === "string" ? options.status : undefined,
135
142
  limit: typeof options.limit === "string" ? options.limit : undefined,
@@ -157,103 +164,13 @@ export function registerOperationCommands(program) {
157
164
  printError(`profile:command=test-all took_ms=${Date.now() - startedAt}`);
158
165
  }
159
166
  });
160
- const testRunsCommand = program
161
- .command("test-runs")
162
- .description("Manage background linked-test runs.")
163
- .action(async (_options, command) => {
164
- const globalOptions = getGlobalOptions(command);
165
- const startedAt = Date.now();
166
- const result = await runTestRunsList({}, globalOptions);
167
- printResult(result, globalOptions);
168
- if (globalOptions.profile) {
169
- printError(`profile:command=test-runs took_ms=${Date.now() - startedAt}`);
170
- }
171
- });
172
- testRunsCommand
173
- .command("list")
174
- .option("--status <value>", "Filter by background run status")
175
- .option("--limit <value>", "Limit number of runs returned")
176
- .description("List background test runs.")
177
- .action(async (options, command) => {
178
- const globalOptions = getGlobalOptions(command);
179
- const startedAt = Date.now();
180
- const result = await runTestRunsList({
181
- status: typeof options.status === "string" ? options.status : undefined,
182
- limit: typeof options.limit === "string" ? options.limit : undefined,
183
- }, globalOptions);
184
- printResult(result, globalOptions);
185
- if (globalOptions.profile) {
186
- printError(`profile:command=test-runs list took_ms=${Date.now() - startedAt}`);
187
- }
188
- });
189
- testRunsCommand
190
- .command("status")
191
- .argument("<runId>", "Background run id")
192
- .description("Show status, health, and resource snapshot for a background run.")
193
- .action(async (runId, _options, command) => {
194
- const globalOptions = getGlobalOptions(command);
195
- const startedAt = Date.now();
196
- const result = await runTestRunsStatus(runId, globalOptions);
197
- printResult(result, globalOptions);
198
- if (globalOptions.profile) {
199
- printError(`profile:command=test-runs status took_ms=${Date.now() - startedAt}`);
200
- }
201
- });
202
- testRunsCommand
203
- .command("logs")
204
- .argument("<runId>", "Background run id")
205
- .option("--stream <value>", "Log stream selector: stdout|stderr|both")
206
- .option("--tail <value>", "Tail number of lines per selected stream")
207
- .description("Show tailed logs for a background run.")
208
- .action(async (runId, options, command) => {
209
- const globalOptions = getGlobalOptions(command);
210
- const startedAt = Date.now();
211
- const result = await runTestRunsLogs(runId, {
212
- stream: typeof options.stream === "string" ? options.stream : undefined,
213
- tail: typeof options.tail === "string" ? options.tail : undefined,
214
- }, globalOptions);
215
- printResult(result, globalOptions);
216
- if (globalOptions.profile) {
217
- printError(`profile:command=test-runs logs took_ms=${Date.now() - startedAt}`);
218
- }
219
- });
220
- testRunsCommand
221
- .command("stop")
222
- .argument("<runId>", "Background run id")
223
- .option("--force", "Force-stop via SIGKILL")
224
- .description("Stop a running background test run.")
225
- .action(async (runId, options, command) => {
226
- const globalOptions = getGlobalOptions(command);
227
- const startedAt = Date.now();
228
- const result = await runTestRunsStop(runId, { force: options.force === true }, globalOptions);
229
- printResult(result, globalOptions);
230
- if (globalOptions.profile) {
231
- printError(`profile:command=test-runs stop took_ms=${Date.now() - startedAt}`);
232
- }
233
- });
234
- testRunsCommand
235
- .command("resume")
236
- .argument("<runId>", "Background run id")
237
- .option("--author <value>", "Resume author (falls back to PM_AUTHOR/settings)")
238
- .description("Resume a previously terminal background test run by starting a new attempt.")
239
- .action(async (runId, options, command) => {
240
- const globalOptions = getGlobalOptions(command);
241
- const startedAt = Date.now();
242
- const result = await runTestRunsResume(runId, {
243
- author: typeof options.author === "string" ? options.author : undefined,
244
- noExtensions: globalOptions.noExtensions === true,
245
- }, globalOptions);
246
- printResult(result, globalOptions);
247
- if (globalOptions.profile) {
248
- printError(`profile:command=test-runs resume took_ms=${Date.now() - startedAt}`);
249
- }
250
- });
251
167
  program
252
168
  .command("test-runs-worker", { hidden: true })
253
169
  .argument("<runId>", "Background run id")
254
170
  .description("Internal background worker command.")
255
171
  .action(async (runId, _options, command) => {
256
172
  const globalOptions = getGlobalOptions(command);
173
+ const { runTestRunsWorker } = await loadOperationCommandsModule();
257
174
  await runTestRunsWorker(runId, globalOptions);
258
175
  });
259
176
  program
@@ -262,6 +179,7 @@ export function registerOperationCommands(program) {
262
179
  .action(async (_options, command) => {
263
180
  const globalOptions = getGlobalOptions(command);
264
181
  const startedAt = Date.now();
182
+ const { runStats } = await loadOperationCommandsModule();
265
183
  const result = await runStats(globalOptions);
266
184
  printResult(result, globalOptions);
267
185
  if (globalOptions.profile) {
@@ -277,11 +195,16 @@ export function registerOperationCommands(program) {
277
195
  .option("--no-refresh", "Disable automatic vector refresh attempts during health checks")
278
196
  .option("--refresh-vectors", "Explicitly enable vector refresh attempts during health checks")
279
197
  .option("--verbose-stale-items", "Include full stale vectorization ID lists in health output")
198
+ .option("--skip-vectors", "Skip vectorization check for a faster run")
199
+ .option("--skip-integrity", "Skip item/history file integrity check for a faster run")
200
+ .option("--skip-drift", "Skip history drift hash check for a faster run")
201
+ .option("--full", "Run all checks including slow integrity, drift, and vectorization checks")
280
202
  .option("--strict-exit", "Return non-zero exit when health warnings are present (ok=false)")
281
203
  .option("--fail-on-warn", "Alias for --strict-exit")
282
204
  .action(async (options, command) => {
283
205
  const globalOptions = getGlobalOptions(command);
284
206
  const startedAt = Date.now();
207
+ const { runHealth } = await loadOperationCommandsModule();
285
208
  const result = await runHealth(globalOptions, {
286
209
  strictDirectories: Boolean(options.strictDirectories),
287
210
  checkOnly: Boolean(options.checkOnly),
@@ -289,10 +212,22 @@ export function registerOperationCommands(program) {
289
212
  noRefresh: Boolean(options.noRefresh),
290
213
  refreshVectors: Boolean(options.refreshVectors),
291
214
  verboseStaleItems: Boolean(options.verboseStaleItems),
215
+ skipVectors: Boolean(options.skipVectors),
216
+ skipIntegrity: Boolean(options.skipIntegrity),
217
+ skipDrift: Boolean(options.skipDrift),
218
+ full: Boolean(options.full),
292
219
  });
293
220
  printResult(result, globalOptions);
294
221
  const strictExit = Boolean(options.strictExit) || Boolean(options.failOnWarn);
295
222
  if (strictExit && !result.ok) {
223
+ setActiveCommandResult({
224
+ ...result,
225
+ exit_code: EXIT_CODE.GENERIC_FAILURE,
226
+ error_code: "health_findings",
227
+ error_category: "validation",
228
+ command_resolution: "health_findings",
229
+ resolution_stage: "execute",
230
+ });
296
231
  process.exitCode = EXIT_CODE.GENERIC_FAILURE;
297
232
  }
298
233
  if (globalOptions.profile) {
@@ -319,6 +254,7 @@ export function registerOperationCommands(program) {
319
254
  .action(async (options, command) => {
320
255
  const globalOptions = getGlobalOptions(command);
321
256
  const startedAt = Date.now();
257
+ const { runValidate } = await loadOperationCommandsModule();
322
258
  const result = await runValidate({
323
259
  checkMetadata: Boolean(options.checkMetadata),
324
260
  metadataProfile: typeof options.metadataProfile === "string" ? options.metadataProfile : undefined,
@@ -336,6 +272,14 @@ export function registerOperationCommands(program) {
336
272
  printResult(result, globalOptions);
337
273
  const strictExit = Boolean(options.strictExit) || Boolean(options.failOnWarn);
338
274
  if (strictExit && !result.ok) {
275
+ setActiveCommandResult({
276
+ ...result,
277
+ exit_code: EXIT_CODE.GENERIC_FAILURE,
278
+ error_code: "validation_findings",
279
+ error_category: "validation",
280
+ command_resolution: "validation_findings",
281
+ resolution_stage: "execute",
282
+ });
339
283
  process.exitCode = EXIT_CODE.GENERIC_FAILURE;
340
284
  }
341
285
  if (globalOptions.profile) {
@@ -350,6 +294,7 @@ export function registerOperationCommands(program) {
350
294
  .action(async (options, command) => {
351
295
  const globalOptions = getGlobalOptions(command);
352
296
  const startedAt = Date.now();
297
+ const { runGc } = await loadOperationCommandsModule();
353
298
  const result = await runGc(globalOptions, {
354
299
  dryRun: options.dryRun === true,
355
300
  scope: Array.isArray(options.scope) ? options.scope : [],
@@ -369,9 +314,11 @@ export function registerOperationCommands(program) {
369
314
  .option("--availability-only", "Return action availability surface only")
370
315
  .option("--runtime-only", "Include only actions invocable in the current runtime")
371
316
  .option("--active-only", "Alias for --runtime-only")
317
+ .option("--full", "Include full schema and command-flag surfaces (large; default brief output omits heavy sections for unfiltered queries)")
372
318
  .action(async (options, command) => {
373
319
  const globalOptions = getGlobalOptions(command);
374
320
  const startedAt = Date.now();
321
+ const { runContracts } = await loadOperationCommandsModule();
375
322
  const result = await runContracts({
376
323
  action: typeof options.action === "string" ? options.action : undefined,
377
324
  command: typeof options.command === "string" ? options.command : undefined,
@@ -379,6 +326,7 @@ export function registerOperationCommands(program) {
379
326
  flagsOnly: Boolean(options.flagsOnly),
380
327
  availabilityOnly: Boolean(options.availabilityOnly),
381
328
  runtimeOnly: Boolean(options.runtimeOnly) || Boolean(options.activeOnly),
329
+ full: Boolean(options.full),
382
330
  }, globalOptions);
383
331
  printResult(result, globalOptions);
384
332
  if (globalOptions.profile) {
@@ -391,13 +339,16 @@ export function registerOperationCommands(program) {
391
339
  .option("--author <value>", "Mutation author")
392
340
  .option("--message <value>", "History message")
393
341
  .option("--force", "Force claim override")
342
+ .option("--if-available", "Skip silently when the item is already claimed by another author (returns skipped=true)")
394
343
  .description("Claim an item for active work.")
395
344
  .action(async (id, options, command) => {
396
345
  const globalOptions = getGlobalOptions(command);
397
346
  const startedAt = Date.now();
347
+ const { runClaim } = await loadOperationCommandsModule();
398
348
  const result = await runClaim(id, Boolean(options.force), globalOptions, {
399
349
  author: typeof options.author === "string" ? options.author : undefined,
400
350
  message: typeof options.message === "string" ? options.message : undefined,
351
+ ifAvailable: options.ifAvailable === true,
401
352
  });
402
353
  await invalidateSearchCachesForMutation(globalOptions, result);
403
354
  printResult(result, globalOptions);
@@ -416,6 +367,7 @@ export function registerOperationCommands(program) {
416
367
  .action(async (id, options, command) => {
417
368
  const globalOptions = getGlobalOptions(command);
418
369
  const startedAt = Date.now();
370
+ const { runRelease } = await loadOperationCommandsModule();
419
371
  const result = await runRelease(id, Boolean(options.force), globalOptions, {
420
372
  author: typeof options.author === "string" ? options.author : undefined,
421
373
  message: typeof options.message === "string" ? options.message : undefined,
@@ -446,9 +398,10 @@ export function registerOperationCommands(program) {
446
398
  author: typeof options.author === "string" ? options.author : undefined,
447
399
  message: typeof options.message === "string" ? options.message : undefined,
448
400
  };
449
- const claimResult = await runClaim(id, force, globalOptions, mutationOptions);
401
+ const commands = await loadOperationCommandsModule();
402
+ const claimResult = await commands.runClaim(id, force, globalOptions, mutationOptions);
450
403
  await invalidateSearchCachesForMutation(globalOptions, claimResult);
451
- const updateResult = await runUpdate(id, { ...mutationOptions, status: inProgressStatus, force }, globalOptions);
404
+ const updateResult = await commands.runUpdate(id, { ...mutationOptions, status: inProgressStatus, force }, globalOptions);
452
405
  await invalidateSearchCachesForMutation(globalOptions, updateResult);
453
406
  printResult({ id, action: "start_task", claim: claimResult, update: updateResult }, globalOptions);
454
407
  if (globalOptions.profile) {
@@ -474,9 +427,10 @@ export function registerOperationCommands(program) {
474
427
  author: typeof options.author === "string" ? options.author : undefined,
475
428
  message: typeof options.message === "string" ? options.message : undefined,
476
429
  };
477
- const updateResult = await runUpdate(id, { ...mutationOptions, status: openStatus, force }, globalOptions);
430
+ const commands = await loadOperationCommandsModule();
431
+ const updateResult = await commands.runUpdate(id, { ...mutationOptions, status: openStatus, force }, globalOptions);
478
432
  await invalidateSearchCachesForMutation(globalOptions, updateResult);
479
- const releaseResult = await runRelease(id, force, globalOptions, mutationOptions);
433
+ const releaseResult = await commands.runRelease(id, force, globalOptions, mutationOptions);
480
434
  await invalidateSearchCachesForMutation(globalOptions, releaseResult);
481
435
  printResult({ id, action: "pause_task", update: updateResult, release: releaseResult }, globalOptions);
482
436
  if (globalOptions.profile) {
@@ -500,111 +454,20 @@ export function registerOperationCommands(program) {
500
454
  author: typeof options.author === "string" ? options.author : undefined,
501
455
  message: typeof options.message === "string" ? options.message : undefined,
502
456
  };
503
- const closeResult = await runClose(id, reason, {
457
+ const commands = await loadOperationCommandsModule();
458
+ const closeResult = await commands.runClose(id, reason, {
504
459
  ...mutationOptions,
505
460
  validateClose: typeof options.validateClose === "string" ? options.validateClose : undefined,
506
461
  force,
507
462
  }, globalOptions);
508
463
  await invalidateSearchCachesForMutation(globalOptions, closeResult);
509
- const releaseResult = await runRelease(id, force, globalOptions, mutationOptions);
464
+ const releaseResult = await commands.runRelease(id, force, globalOptions, mutationOptions);
510
465
  await invalidateSearchCachesForMutation(globalOptions, releaseResult);
511
466
  printResult({ id, action: "close_task", close: closeResult, release: releaseResult }, globalOptions);
512
467
  if (globalOptions.profile) {
513
468
  printError(`profile:command=close-task took_ms=${Date.now() - startedAt}`);
514
469
  }
515
470
  });
516
- program
517
- .command("completion")
518
- .argument("<shell>", "Shell type: bash, zsh, or fish")
519
- .option("--eager-tags", "Embed current tracker tags directly in generated scripts (legacy eager mode)")
520
- .description("Generate shell completion for pm.")
521
- .action(async (shell, options, command) => {
522
- const globalOptions = getGlobalOptions(command);
523
- const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
524
- let completionTypes;
525
- let completionTags;
526
- let completionStatuses;
527
- const completionCommandFlags = {};
528
- const eagerTags = Boolean(options.eagerTags);
529
- if (await pathExists(getSettingsPath(pmRoot))) {
530
- const settings = await readSettings(pmRoot);
531
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
532
- const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
533
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
534
- completionTypes = typeRegistry.types;
535
- completionStatuses = statusRegistry.definitions.map((definition) => definition.id);
536
- for (const [commandKey, definitions] of runtimeFieldRegistry.command_to_fields.entries()) {
537
- if (commandKey !== "list" &&
538
- commandKey !== "create" &&
539
- commandKey !== "update" &&
540
- commandKey !== "search" &&
541
- commandKey !== "calendar" &&
542
- commandKey !== "context") {
543
- continue;
544
- }
545
- const runtimeFlags = new Set();
546
- for (const definition of definitions) {
547
- runtimeFlags.add(`--${definition.cli_flag}`);
548
- for (const alias of definition.cli_aliases) {
549
- if (alias.startsWith("--") || (alias.startsWith("-") && !alias.startsWith("--"))) {
550
- runtimeFlags.add(alias);
551
- }
552
- else {
553
- runtimeFlags.add(`--${alias}`);
554
- }
555
- }
556
- }
557
- completionCommandFlags[commandKey] = [...runtimeFlags].sort((left, right) => left.localeCompare(right));
558
- }
559
- if (completionCommandFlags.update) {
560
- completionCommandFlags["update-many"] = [...completionCommandFlags.update];
561
- }
562
- if (eagerTags) {
563
- const items = await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
564
- completionTags = [...new Set(items.flatMap((item) => item.tags ?? []).map((tag) => tag.trim()).filter((tag) => tag.length > 0))]
565
- .sort((left, right) => left.localeCompare(right));
566
- }
567
- }
568
- const result = runCompletion(shell, completionTypes, completionTags ?? [], eagerTags, {
569
- statuses: completionStatuses,
570
- command_flags: completionCommandFlags,
571
- });
572
- if (globalOptions.json) {
573
- printResult(result, globalOptions);
574
- }
575
- else if (!globalOptions.quiet) {
576
- writeStdout(`${result.script}\n`);
577
- }
578
- if (globalOptions.profile) {
579
- printError(`profile:command=completion took_ms=0`);
580
- }
581
- });
582
- program
583
- .command("completion-tags", { hidden: true })
584
- .description("Internal dynamic completion tag source.")
585
- .action(async (_options, command) => {
586
- const globalOptions = getGlobalOptions(command);
587
- const startedAt = Date.now();
588
- const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
589
- let tags = [];
590
- if (await pathExists(getSettingsPath(pmRoot))) {
591
- const settings = await readSettings(pmRoot);
592
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
593
- const items = await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
594
- tags = [...new Set(items.flatMap((item) => item.tags ?? []).map((tag) => tag.trim()).filter((tag) => tag.length > 0))].sort((left, right) => left.localeCompare(right));
595
- }
596
- if (globalOptions.json) {
597
- printResult({ tags, count: tags.length }, globalOptions);
598
- }
599
- else if (!globalOptions.quiet) {
600
- writeStdout(tags.join("\n"));
601
- if (tags.length > 0) {
602
- writeStdout("\n");
603
- }
604
- }
605
- if (globalOptions.profile) {
606
- printError(`profile:command=completion-tags took_ms=${Date.now() - startedAt}`);
607
- }
608
- });
609
471
  }
610
- //# sourceMappingURL=register-operations.js.map
472
+ //# sourceMappingURL=register-operations.js.map
473
+ //# debugId=ff7fe568-0a90-519b-8099-b034273a3752