@unbrained/pm-cli 2026.5.18 → 2026.5.27

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 (369) hide show
  1. package/CHANGELOG.md +953 -472
  2. package/README.md +4 -11
  3. package/dist/cli/bootstrap-args.d.ts +18 -1
  4. package/dist/cli/bootstrap-args.js +143 -3
  5. package/dist/cli/bootstrap-args.js.map +1 -1
  6. package/dist/cli/commander-usage.js +147 -10
  7. package/dist/cli/commander-usage.js.map +1 -1
  8. package/dist/cli/commands/annotation-command.d.ts +49 -0
  9. package/dist/cli/commands/annotation-command.js +135 -0
  10. package/dist/cli/commands/annotation-command.js.map +1 -0
  11. package/dist/cli/commands/append.js +5 -8
  12. package/dist/cli/commands/append.js.map +1 -1
  13. package/dist/cli/commands/calendar.js +3 -6
  14. package/dist/cli/commands/calendar.js.map +1 -1
  15. package/dist/cli/commands/claim.js +15 -24
  16. package/dist/cli/commands/claim.js.map +1 -1
  17. package/dist/cli/commands/close.js +63 -10
  18. package/dist/cli/commands/close.js.map +1 -1
  19. package/dist/cli/commands/comments.d.ts +5 -0
  20. package/dist/cli/commands/comments.js +27 -117
  21. package/dist/cli/commands/comments.js.map +1 -1
  22. package/dist/cli/commands/completion.d.ts +2 -2
  23. package/dist/cli/commands/completion.js +203 -63
  24. package/dist/cli/commands/completion.js.map +1 -1
  25. package/dist/cli/commands/config.d.ts +1 -1
  26. package/dist/cli/commands/config.js +82 -4
  27. package/dist/cli/commands/config.js.map +1 -1
  28. package/dist/cli/commands/context.js +4 -10
  29. package/dist/cli/commands/context.js.map +1 -1
  30. package/dist/cli/commands/contracts.js +168 -36
  31. package/dist/cli/commands/contracts.js.map +1 -1
  32. package/dist/cli/commands/create.js +53 -313
  33. package/dist/cli/commands/create.js.map +1 -1
  34. package/dist/cli/commands/dedupe-audit.js +7 -4
  35. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  36. package/dist/cli/commands/delete.d.ts +3 -0
  37. package/dist/cli/commands/delete.js +11 -9
  38. package/dist/cli/commands/delete.js.map +1 -1
  39. package/dist/cli/commands/docs.d.ts +2 -12
  40. package/dist/cli/commands/docs.js +8 -316
  41. package/dist/cli/commands/docs.js.map +1 -1
  42. package/dist/cli/commands/event-validation-messages.d.ts +3 -0
  43. package/dist/cli/commands/event-validation-messages.js +44 -0
  44. package/dist/cli/commands/event-validation-messages.js.map +1 -0
  45. package/dist/cli/commands/extension/bundled-catalog.d.ts +14 -0
  46. package/dist/cli/commands/extension/bundled-catalog.js +268 -0
  47. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -0
  48. package/dist/cli/commands/extension/doctor.d.ts +31 -0
  49. package/dist/cli/commands/extension/doctor.js +345 -0
  50. package/dist/cli/commands/extension/doctor.js.map +1 -0
  51. package/dist/cli/commands/extension/install-sources.d.ts +37 -0
  52. package/dist/cli/commands/extension/install-sources.js +384 -0
  53. package/dist/cli/commands/extension/install-sources.js.map +1 -0
  54. package/dist/cli/commands/extension/managed-state.d.ts +48 -0
  55. package/dist/cli/commands/extension/managed-state.js +172 -0
  56. package/dist/cli/commands/extension/managed-state.js.map +1 -0
  57. package/dist/cli/commands/extension/scaffold.d.ts +14 -0
  58. package/dist/cli/commands/extension/scaffold.js +169 -0
  59. package/dist/cli/commands/extension/scaffold.js.map +1 -0
  60. package/dist/cli/commands/extension/shared.d.ts +14 -0
  61. package/dist/cli/commands/extension/shared.js +106 -0
  62. package/dist/cli/commands/extension/shared.js.map +1 -0
  63. package/dist/cli/commands/extension.d.ts +37 -68
  64. package/dist/cli/commands/extension.js +157 -1319
  65. package/dist/cli/commands/extension.js.map +1 -1
  66. package/dist/cli/commands/files.d.ts +1 -12
  67. package/dist/cli/commands/files.js +14 -318
  68. package/dist/cli/commands/files.js.map +1 -1
  69. package/dist/cli/commands/gc.js +17 -4
  70. package/dist/cli/commands/gc.js.map +1 -1
  71. package/dist/cli/commands/get.d.ts +3 -2
  72. package/dist/cli/commands/get.js +52 -9
  73. package/dist/cli/commands/get.js.map +1 -1
  74. package/dist/cli/commands/health.d.ts +10 -0
  75. package/dist/cli/commands/health.js +269 -76
  76. package/dist/cli/commands/health.js.map +1 -1
  77. package/dist/cli/commands/history-redact.d.ts +8 -0
  78. package/dist/cli/commands/history-redact.js +35 -113
  79. package/dist/cli/commands/history-redact.js.map +1 -1
  80. package/dist/cli/commands/history-repair.d.ts +33 -0
  81. package/dist/cli/commands/history-repair.js +172 -0
  82. package/dist/cli/commands/history-repair.js.map +1 -0
  83. package/dist/cli/commands/history.d.ts +4 -4
  84. package/dist/cli/commands/history.js +10 -88
  85. package/dist/cli/commands/history.js.map +1 -1
  86. package/dist/cli/commands/index.d.ts +3 -1
  87. package/dist/cli/commands/index.js +5 -3
  88. package/dist/cli/commands/index.js.map +1 -1
  89. package/dist/cli/commands/init.d.ts +28 -0
  90. package/dist/cli/commands/init.js +23 -2
  91. package/dist/cli/commands/init.js.map +1 -1
  92. package/dist/cli/commands/learnings.js +20 -119
  93. package/dist/cli/commands/learnings.js.map +1 -1
  94. package/dist/cli/commands/legacy-none-tokens.d.ts +3 -0
  95. package/dist/cli/commands/legacy-none-tokens.js +39 -0
  96. package/dist/cli/commands/legacy-none-tokens.js.map +1 -0
  97. package/dist/cli/commands/linked-artifacts.d.ts +96 -0
  98. package/dist/cli/commands/linked-artifacts.js +335 -0
  99. package/dist/cli/commands/linked-artifacts.js.map +1 -0
  100. package/dist/cli/commands/linked-test-entry.d.ts +3 -0
  101. package/dist/cli/commands/linked-test-entry.js +62 -0
  102. package/dist/cli/commands/linked-test-entry.js.map +1 -0
  103. package/dist/cli/commands/linked-test-parsers.d.ts +28 -0
  104. package/dist/cli/commands/linked-test-parsers.js +192 -0
  105. package/dist/cli/commands/linked-test-parsers.js.map +1 -0
  106. package/dist/cli/commands/list.js +49 -24
  107. package/dist/cli/commands/list.js.map +1 -1
  108. package/dist/cli/commands/normalize.js +4 -3
  109. package/dist/cli/commands/normalize.js.map +1 -1
  110. package/dist/cli/commands/notes.js +20 -119
  111. package/dist/cli/commands/notes.js.map +1 -1
  112. package/dist/cli/commands/plan.d.ts +3 -0
  113. package/dist/cli/commands/plan.js +184 -22
  114. package/dist/cli/commands/plan.js.map +1 -1
  115. package/dist/cli/commands/recurrence-parsers.d.ts +26 -0
  116. package/dist/cli/commands/recurrence-parsers.js +98 -0
  117. package/dist/cli/commands/recurrence-parsers.js.map +1 -0
  118. package/dist/cli/commands/restore.js +24 -56
  119. package/dist/cli/commands/restore.js.map +1 -1
  120. package/dist/cli/commands/schema.d.ts +31 -0
  121. package/dist/cli/commands/schema.js +98 -0
  122. package/dist/cli/commands/schema.js.map +1 -0
  123. package/dist/cli/commands/search.js +154 -42
  124. package/dist/cli/commands/search.js.map +1 -1
  125. package/dist/cli/commands/templates.d.ts +4 -0
  126. package/dist/cli/commands/templates.js +89 -17
  127. package/dist/cli/commands/templates.js.map +1 -1
  128. package/dist/cli/commands/test/linked-command-detection.d.ts +37 -0
  129. package/dist/cli/commands/test/linked-command-detection.js +200 -0
  130. package/dist/cli/commands/test/linked-command-detection.js.map +1 -0
  131. package/dist/cli/commands/test-all.js +4 -8
  132. package/dist/cli/commands/test-all.js.map +1 -1
  133. package/dist/cli/commands/test.d.ts +2 -2
  134. package/dist/cli/commands/test.js +12 -357
  135. package/dist/cli/commands/test.js.map +1 -1
  136. package/dist/cli/commands/update-many.js +6 -9
  137. package/dist/cli/commands/update-many.js.map +1 -1
  138. package/dist/cli/commands/update.js +167 -401
  139. package/dist/cli/commands/update.js.map +1 -1
  140. package/dist/cli/commands/validate.d.ts +3 -1
  141. package/dist/cli/commands/validate.js +23 -71
  142. package/dist/cli/commands/validate.js.map +1 -1
  143. package/dist/cli/error-guidance.d.ts +1 -0
  144. package/dist/cli/error-guidance.js +100 -6
  145. package/dist/cli/error-guidance.js.map +1 -1
  146. package/dist/cli/extension-command-help.d.ts +0 -1
  147. package/dist/cli/extension-command-help.js +2 -13
  148. package/dist/cli/extension-command-help.js.map +1 -1
  149. package/dist/cli/extension-command-options.d.ts +1 -0
  150. package/dist/cli/extension-command-options.js +106 -7
  151. package/dist/cli/extension-command-options.js.map +1 -1
  152. package/dist/cli/help-content.d.ts +0 -1
  153. package/dist/cli/help-content.js +13 -9
  154. package/dist/cli/help-content.js.map +1 -1
  155. package/dist/cli/help-json-payload.d.ts +1 -0
  156. package/dist/cli/help-json-payload.js +33 -3
  157. package/dist/cli/help-json-payload.js.map +1 -1
  158. package/dist/cli/main.d.ts +11 -0
  159. package/dist/cli/main.js +109 -55
  160. package/dist/cli/main.js.map +1 -1
  161. package/dist/cli/register-list-query.d.ts +5 -2
  162. package/dist/cli/register-list-query.js +254 -192
  163. package/dist/cli/register-list-query.js.map +1 -1
  164. package/dist/cli/register-mutation.d.ts +1 -1
  165. package/dist/cli/register-mutation.js +247 -64
  166. package/dist/cli/register-mutation.js.map +1 -1
  167. package/dist/cli/register-operations.js +17 -12
  168. package/dist/cli/register-operations.js.map +1 -1
  169. package/dist/cli/register-setup.js +33 -16
  170. package/dist/cli/register-setup.js.map +1 -1
  171. package/dist/cli/registration-helpers.d.ts +0 -2
  172. package/dist/cli/registration-helpers.js +14 -40
  173. package/dist/cli/registration-helpers.js.map +1 -1
  174. package/dist/cli.js +25 -4
  175. package/dist/cli.js.map +1 -1
  176. package/dist/core/config/positional-value.d.ts +44 -0
  177. package/dist/core/config/positional-value.js +109 -0
  178. package/dist/core/config/positional-value.js.map +1 -0
  179. package/dist/core/extensions/extension-capability-aliases.d.ts +14 -0
  180. package/dist/core/extensions/extension-capability-aliases.js +159 -0
  181. package/dist/core/extensions/extension-capability-aliases.js.map +1 -0
  182. package/dist/core/extensions/extension-hook-runtime.d.ts +13 -0
  183. package/dist/core/extensions/extension-hook-runtime.js +414 -0
  184. package/dist/core/extensions/extension-hook-runtime.js.map +1 -0
  185. package/dist/core/extensions/extension-policy.d.ts +69 -0
  186. package/dist/core/extensions/extension-policy.js +481 -0
  187. package/dist/core/extensions/extension-policy.js.map +1 -0
  188. package/dist/core/extensions/extension-registries.d.ts +8 -0
  189. package/dist/core/extensions/extension-registries.js +52 -0
  190. package/dist/core/extensions/extension-registries.js.map +1 -0
  191. package/dist/core/extensions/extension-runtime-helpers.d.ts +6 -0
  192. package/dist/core/extensions/extension-runtime-helpers.js +29 -0
  193. package/dist/core/extensions/extension-runtime-helpers.js.map +1 -0
  194. package/dist/core/extensions/extension-types.d.ts +13 -39
  195. package/dist/core/extensions/extension-types.js +34 -2
  196. package/dist/core/extensions/extension-types.js.map +1 -1
  197. package/dist/core/extensions/index.d.ts +7 -1
  198. package/dist/core/extensions/index.js +11 -14
  199. package/dist/core/extensions/index.js.map +1 -1
  200. package/dist/core/extensions/loader.d.ts +4 -22
  201. package/dist/core/extensions/loader.js +23 -1146
  202. package/dist/core/extensions/loader.js.map +1 -1
  203. package/dist/core/fs/path-utils.d.ts +1 -0
  204. package/dist/core/fs/path-utils.js +12 -0
  205. package/dist/core/fs/path-utils.js.map +1 -0
  206. package/dist/core/history/drift-scan.d.ts +22 -0
  207. package/dist/core/history/drift-scan.js +149 -0
  208. package/dist/core/history/drift-scan.js.map +1 -0
  209. package/dist/core/history/history-rewrite.d.ts +43 -0
  210. package/dist/core/history/history-rewrite.js +48 -0
  211. package/dist/core/history/history-rewrite.js.map +1 -0
  212. package/dist/core/history/history.js +5 -4
  213. package/dist/core/history/history.js.map +1 -1
  214. package/dist/core/history/replay.d.ts +82 -0
  215. package/dist/core/history/replay.js +250 -0
  216. package/dist/core/history/replay.js.map +1 -0
  217. package/dist/core/item/item-format.js +11 -8
  218. package/dist/core/item/item-format.js.map +1 -1
  219. package/dist/core/item/item-record.d.ts +19 -0
  220. package/dist/core/item/item-record.js +24 -0
  221. package/dist/core/item/item-record.js.map +1 -0
  222. package/dist/core/item/item-type-definition.d.ts +52 -0
  223. package/dist/core/item/item-type-definition.js +123 -0
  224. package/dist/core/item/item-type-definition.js.map +1 -0
  225. package/dist/core/item/parse.js +3 -2
  226. package/dist/core/item/parse.js.map +1 -1
  227. package/dist/core/item/priority.d.ts +23 -0
  228. package/dist/core/item/priority.js +55 -0
  229. package/dist/core/item/priority.js.map +1 -0
  230. package/dist/core/item/status.d.ts +14 -1
  231. package/dist/core/item/status.js +22 -2
  232. package/dist/core/item/status.js.map +1 -1
  233. package/dist/core/item/toon-decode.d.ts +19 -0
  234. package/dist/core/item/toon-decode.js +69 -0
  235. package/dist/core/item/toon-decode.js.map +1 -0
  236. package/dist/core/item/type-registry.js +13 -84
  237. package/dist/core/item/type-registry.js.map +1 -1
  238. package/dist/core/output/mutation-projection.d.ts +31 -0
  239. package/dist/core/output/mutation-projection.js +103 -0
  240. package/dist/core/output/mutation-projection.js.map +1 -0
  241. package/dist/core/output/output.d.ts +2 -0
  242. package/dist/core/output/output.js +5 -3
  243. package/dist/core/output/output.js.map +1 -1
  244. package/dist/core/packages/manifest.js +3 -9
  245. package/dist/core/packages/manifest.js.map +1 -1
  246. package/dist/core/schema/item-types-file.d.ts +85 -0
  247. package/dist/core/schema/item-types-file.js +243 -0
  248. package/dist/core/schema/item-types-file.js.map +1 -0
  249. package/dist/core/schema/runtime-schema.d.ts +2 -1
  250. package/dist/core/schema/runtime-schema.js +17 -45
  251. package/dist/core/schema/runtime-schema.js.map +1 -1
  252. package/dist/core/search/semantic-defaults.js +3 -3
  253. package/dist/core/search/semantic-defaults.js.map +1 -1
  254. package/dist/core/search/vector-stores.js +46 -9
  255. package/dist/core/search/vector-stores.js.map +1 -1
  256. package/dist/core/sentry/helpers.d.ts +1 -1
  257. package/dist/core/sentry/helpers.js +20 -3
  258. package/dist/core/sentry/helpers.js.map +1 -1
  259. package/dist/core/shared/author.d.ts +1 -0
  260. package/dist/core/shared/author.js +9 -0
  261. package/dist/core/shared/author.js.map +1 -0
  262. package/dist/core/shared/command-types.d.ts +1 -0
  263. package/dist/core/shared/command-types.js +2 -2
  264. package/dist/core/shared/command-types.js.map +1 -1
  265. package/dist/core/shared/constants.d.ts +10 -1
  266. package/dist/core/shared/constants.js +56 -58
  267. package/dist/core/shared/constants.js.map +1 -1
  268. package/dist/core/shared/lazy-module.d.ts +1 -0
  269. package/dist/core/shared/lazy-module.js +11 -0
  270. package/dist/core/shared/lazy-module.js.map +1 -0
  271. package/dist/core/shared/option-alias-visibility.d.ts +44 -0
  272. package/dist/core/shared/option-alias-visibility.js +76 -0
  273. package/dist/core/shared/option-alias-visibility.js.map +1 -0
  274. package/dist/core/shared/primitives.d.ts +23 -0
  275. package/dist/core/shared/primitives.js +39 -2
  276. package/dist/core/shared/primitives.js.map +1 -1
  277. package/dist/core/shared/text-normalization.d.ts +0 -1
  278. package/dist/core/shared/text-normalization.js +2 -5
  279. package/dist/core/shared/text-normalization.js.map +1 -1
  280. package/dist/core/store/front-matter-cache.d.ts +16 -2
  281. package/dist/core/store/front-matter-cache.js +99 -33
  282. package/dist/core/store/front-matter-cache.js.map +1 -1
  283. package/dist/core/store/item-store.d.ts +2 -0
  284. package/dist/core/store/item-store.js +76 -110
  285. package/dist/core/store/item-store.js.map +1 -1
  286. package/dist/core/store/settings-validator.d.ts +106 -0
  287. package/dist/core/store/settings-validator.js +279 -0
  288. package/dist/core/store/settings-validator.js.map +1 -0
  289. package/dist/core/store/settings.js +6 -343
  290. package/dist/core/store/settings.js.map +1 -1
  291. package/dist/core/telemetry/runtime.js +5 -3
  292. package/dist/core/telemetry/runtime.js.map +1 -1
  293. package/dist/mcp/server.js +138 -39
  294. package/dist/mcp/server.js.map +1 -1
  295. package/dist/sdk/cli-contracts/enum-contracts.d.ts +20 -0
  296. package/dist/sdk/cli-contracts/enum-contracts.js +156 -0
  297. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -0
  298. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +14 -0
  299. package/dist/sdk/cli-contracts/tool-option-contracts.js +243 -0
  300. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -0
  301. package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +11 -0
  302. package/dist/sdk/cli-contracts/tool-parameter-tables.js +901 -0
  303. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -0
  304. package/dist/sdk/cli-contracts.d.ts +18 -33
  305. package/dist/sdk/cli-contracts.js +96 -1238
  306. package/dist/sdk/cli-contracts.js.map +1 -1
  307. package/dist/sdk/package-import-adapters.d.ts +74 -0
  308. package/dist/sdk/package-import-adapters.js +186 -0
  309. package/dist/sdk/package-import-adapters.js.map +1 -0
  310. package/dist/sdk/package-runtime-options.d.ts +26 -0
  311. package/dist/sdk/package-runtime-options.js +71 -0
  312. package/dist/sdk/package-runtime-options.js.map +1 -0
  313. package/dist/sdk/runtime.d.ts +27 -1
  314. package/dist/sdk/runtime.js +48 -3
  315. package/dist/sdk/runtime.js.map +1 -1
  316. package/dist/types.d.ts +6 -0
  317. package/dist/types.js +10 -2
  318. package/dist/types.js.map +1 -1
  319. package/docs/AGENT_GUIDE.md +13 -11
  320. package/docs/ARCHITECTURE.md +1 -1
  321. package/docs/CLAUDE_CODE_PLUGIN.md +5 -28
  322. package/docs/CODEX_PLUGIN.md +5 -5
  323. package/docs/COMMANDS.md +58 -9
  324. package/docs/CONFIGURATION.md +16 -1
  325. package/docs/EXTENSIONS.md +4 -63
  326. package/docs/RELEASING.md +12 -8
  327. package/docs/SDK.md +11 -2
  328. package/marketplace.json +7 -3
  329. package/package.json +18 -14
  330. package/packages/pm-beads/extensions/beads/index.js +2 -49
  331. package/packages/pm-beads/extensions/beads/index.ts +2 -54
  332. package/packages/pm-beads/extensions/beads/runtime-loader.js +86 -0
  333. package/packages/pm-beads/extensions/beads/runtime-loader.ts +88 -0
  334. package/packages/pm-beads/extensions/beads/runtime.js +26 -115
  335. package/packages/pm-beads/extensions/beads/runtime.ts +33 -132
  336. package/packages/pm-calendar/README.md +3 -1
  337. package/packages/pm-calendar/extensions/calendar/index.js +66 -2
  338. package/packages/pm-calendar/extensions/calendar/index.ts +71 -2
  339. package/packages/pm-calendar/extensions/calendar/runtime.js +1 -0
  340. package/packages/pm-calendar/extensions/calendar/runtime.ts +1 -0
  341. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +14 -41
  342. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +25 -41
  343. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +10 -50
  344. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +17 -50
  345. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +8 -40
  346. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +10 -40
  347. package/packages/pm-search-advanced/README.md +8 -0
  348. package/packages/pm-search-advanced/extensions/search-advanced/index.js +75 -1
  349. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +74 -0
  350. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +58 -33
  351. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +60 -33
  352. package/packages/pm-templates/extensions/templates/runtime.js +11 -202
  353. package/packages/pm-templates/extensions/templates/runtime.ts +38 -230
  354. package/packages/pm-todos/extensions/todos/index.js +3 -50
  355. package/packages/pm-todos/extensions/todos/index.ts +3 -55
  356. package/packages/pm-todos/extensions/todos/runtime-loader.js +86 -0
  357. package/packages/pm-todos/extensions/todos/runtime-loader.ts +88 -0
  358. package/packages/pm-todos/extensions/todos/runtime.js +24 -117
  359. package/packages/pm-todos/extensions/todos/runtime.ts +32 -129
  360. package/plugins/pm-claude/README.md +2 -2
  361. package/plugins/pm-claude/commands/pm-planner.md +1 -15
  362. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +5 -2
  363. package/plugins/pm-claude/skills/pm-planner/SKILL.md +3 -21
  364. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +15 -6
  365. package/plugins/pm-codex/skills/pm-native/SKILL.md +1 -13
  366. package/PRD.md +0 -1734
  367. package/dist/core/output/command-aware.d.ts +0 -1
  368. package/dist/core/output/command-aware.js +0 -397
  369. package/dist/core/output/command-aware.js.map +0 -1
@@ -39,7 +39,10 @@ async function loadRuntimeBundle() {
39
39
  typeof sdkLoaded.resolveRuntimeStatusRegistry === "function" &&
40
40
  typeof sdkLoaded.resolveRuntimeFieldRegistry === "function" &&
41
41
  typeof sdkLoaded.listAllFrontMatter === "function" &&
42
- typeof sdkLoaded.getActiveExtensionRegistrations === "function"
42
+ typeof sdkLoaded.getActiveExtensionRegistrations === "function" &&
43
+ typeof sdkLoaded.readStringOption === "function" &&
44
+ typeof sdkLoaded.readBooleanOption === "function" &&
45
+ typeof sdkLoaded.readCsvListOption === "function"
43
46
  ) {
44
47
  return {
45
48
  sdk: sdkLoaded,
@@ -53,52 +56,8 @@ async function loadRuntimeBundle() {
53
56
  );
54
57
  }
55
58
 
56
- function readStringOption(options, key, aliases = []) {
57
- const keys = [key, ...aliases];
58
- for (const candidate of keys) {
59
- const value = options[candidate];
60
- if (typeof value === "string" && value.trim().length > 0) {
61
- return value;
62
- }
63
- }
64
- return undefined;
65
- }
66
-
67
- function readBooleanOption(options, key, aliases = []) {
68
- const keys = [key, ...aliases];
69
- for (const candidate of keys) {
70
- const value = options[candidate];
71
- if (value === undefined) {
72
- continue;
73
- }
74
- if (typeof value === "boolean") {
75
- return value;
76
- }
77
- if (typeof value === "string") {
78
- const normalized = value.trim().toLowerCase();
79
- if (normalized === "true" || normalized === "1" || normalized === "yes" || normalized === "on") {
80
- return true;
81
- }
82
- if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "off") {
83
- return false;
84
- }
85
- }
86
- }
87
- return undefined;
88
- }
89
-
90
- function readCsvListOption(options, key, aliases = []) {
91
- const value = readStringOption(options, key, aliases);
92
- if (!value) {
93
- return [];
94
- }
95
- return value
96
- .split(",")
97
- .map((entry) => entry.trim())
98
- .filter((entry) => entry.length > 0);
99
- }
100
-
101
- function normalizeGuideOptions(args, options) {
59
+ function normalizeGuideOptions(bundle, args, options) {
60
+ const { readStringOption, readBooleanOption } = bundle.sdk;
102
61
  const topicFromArgs = args[0];
103
62
  return {
104
63
  topic: readStringOption(options, "topic") ?? (typeof topicFromArgs === "string" && topicFromArgs.trim().length > 0 ? topicFromArgs : undefined),
@@ -108,7 +67,8 @@ function normalizeGuideOptions(args, options) {
108
67
  };
109
68
  }
110
69
 
111
- function normalizeCompletionOptions(args, options) {
70
+ function normalizeCompletionOptions(bundle, args, options) {
71
+ const { readStringOption, readBooleanOption, readCsvListOption } = bundle.sdk;
112
72
  const shellFromOptions = readStringOption(options, "shell");
113
73
  const shellFromArgs = typeof args[0] === "string" && args[0].trim().length > 0 ? args[0].trim() : undefined;
114
74
  return {
@@ -185,12 +145,12 @@ function collectTagsFromItems(items) {
185
145
 
186
146
  export async function runGuidePackage(args, options, global) {
187
147
  const bundle = await ensureRuntimeBundle();
188
- return bundle.sdk.runGuide(normalizeGuideOptions(args, options), global);
148
+ return bundle.sdk.runGuide(normalizeGuideOptions(bundle, args, options), global);
189
149
  }
190
150
 
191
151
  export async function runCompletionPackage(args, options, global) {
192
152
  const bundle = await ensureRuntimeBundle();
193
- const normalized = normalizeCompletionOptions(args, options);
153
+ const normalized = normalizeCompletionOptions(bundle, args, options);
194
154
  const runtimeConfig = await buildCompletionRuntimeConfig(bundle, global);
195
155
  return bundle.sdk.runCompletion(
196
156
  normalized.shell,
@@ -39,6 +39,9 @@ interface RuntimeSdkModule {
39
39
  schema?: unknown,
40
40
  ) => Promise<Array<{ metadata: { tags?: string[] } }>>;
41
41
  getActiveExtensionRegistrations: () => unknown;
42
+ readStringOption: (options: Record<string, unknown>, key: string, aliases?: string[]) => string | undefined;
43
+ readBooleanOption: (options: Record<string, unknown>, key: string, aliases?: string[]) => boolean | undefined;
44
+ readCsvListOption: (options: Record<string, unknown>, key: string, aliases?: string[]) => string[];
42
45
  }
43
46
 
44
47
  interface RuntimeBundle {
@@ -82,7 +85,10 @@ async function loadRuntimeBundle(): Promise<RuntimeBundle> {
82
85
  typeof sdkLoaded.resolveRuntimeStatusRegistry === "function" &&
83
86
  typeof sdkLoaded.resolveRuntimeFieldRegistry === "function" &&
84
87
  typeof sdkLoaded.listAllFrontMatter === "function" &&
85
- typeof sdkLoaded.getActiveExtensionRegistrations === "function"
88
+ typeof sdkLoaded.getActiveExtensionRegistrations === "function" &&
89
+ typeof sdkLoaded.readStringOption === "function" &&
90
+ typeof sdkLoaded.readBooleanOption === "function" &&
91
+ typeof sdkLoaded.readCsvListOption === "function"
86
92
  ) {
87
93
  return {
88
94
  sdk: sdkLoaded as RuntimeSdkModule,
@@ -96,52 +102,12 @@ async function loadRuntimeBundle(): Promise<RuntimeBundle> {
96
102
  );
97
103
  }
98
104
 
99
- function readStringOption(options: Record<string, unknown>, key: string, aliases: string[] = []): string | undefined {
100
- const keys = [key, ...aliases];
101
- for (const candidate of keys) {
102
- const value = options[candidate];
103
- if (typeof value === "string" && value.trim().length > 0) {
104
- return value;
105
- }
106
- }
107
- return undefined;
108
- }
109
-
110
- function readBooleanOption(options: Record<string, unknown>, key: string, aliases: string[] = []): boolean | undefined {
111
- const keys = [key, ...aliases];
112
- for (const candidate of keys) {
113
- const value = options[candidate];
114
- if (value === undefined) {
115
- continue;
116
- }
117
- if (typeof value === "boolean") {
118
- return value;
119
- }
120
- if (typeof value === "string") {
121
- const normalized = value.trim().toLowerCase();
122
- if (normalized === "true" || normalized === "1" || normalized === "yes" || normalized === "on") {
123
- return true;
124
- }
125
- if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "off") {
126
- return false;
127
- }
128
- }
129
- }
130
- return undefined;
131
- }
132
-
133
- function readCsvListOption(options: Record<string, unknown>, key: string, aliases: string[] = []): string[] {
134
- const value = readStringOption(options, key, aliases);
135
- if (!value) {
136
- return [];
137
- }
138
- return value
139
- .split(",")
140
- .map((entry) => entry.trim())
141
- .filter((entry) => entry.length > 0);
142
- }
143
-
144
- function normalizeGuideOptions(args: string[], options: Record<string, unknown>): Record<string, unknown> {
105
+ function normalizeGuideOptions(
106
+ bundle: RuntimeBundle,
107
+ args: string[],
108
+ options: Record<string, unknown>,
109
+ ): Record<string, unknown> {
110
+ const { readStringOption, readBooleanOption } = bundle.sdk;
145
111
  const topicFromArgs = args[0];
146
112
  return {
147
113
  topic: readStringOption(options, "topic") ?? (typeof topicFromArgs === "string" && topicFromArgs.trim().length > 0 ? topicFromArgs : undefined),
@@ -151,12 +117,13 @@ function normalizeGuideOptions(args: string[], options: Record<string, unknown>)
151
117
  };
152
118
  }
153
119
 
154
- function normalizeCompletionOptions(args: string[], options: Record<string, unknown>): {
120
+ function normalizeCompletionOptions(bundle: RuntimeBundle, args: string[], options: Record<string, unknown>): {
155
121
  shell: string;
156
122
  itemTypes: string[];
157
123
  tags: string[];
158
124
  eagerTags: boolean;
159
125
  } {
126
+ const { readStringOption, readBooleanOption, readCsvListOption } = bundle.sdk;
160
127
  const shellFromOptions = readStringOption(options, "shell");
161
128
  const shellFromArgs = typeof args[0] === "string" && args[0].trim().length > 0 ? args[0].trim() : undefined;
162
129
  return {
@@ -243,7 +210,7 @@ export async function runGuidePackage(
243
210
  global: GlobalOptions,
244
211
  ): Promise<unknown> {
245
212
  const bundle = await ensureRuntimeBundle();
246
- return bundle.sdk.runGuide(normalizeGuideOptions(args, options), global);
213
+ return bundle.sdk.runGuide(normalizeGuideOptions(bundle, args, options), global);
247
214
  }
248
215
 
249
216
  export async function runCompletionPackage(
@@ -252,7 +219,7 @@ export async function runCompletionPackage(
252
219
  global: GlobalOptions,
253
220
  ): Promise<unknown> {
254
221
  const bundle = await ensureRuntimeBundle();
255
- const normalized = normalizeCompletionOptions(args, options);
222
+ const normalized = normalizeCompletionOptions(bundle, args, options);
256
223
  const runtimeConfig = await buildCompletionRuntimeConfig(bundle, global);
257
224
  return bundle.sdk.runCompletion(
258
225
  normalized.shell,
@@ -33,6 +33,8 @@ async function loadRuntimeBundle() {
33
33
  typeof sdkLoaded.runTestRunsStop === "function" &&
34
34
  typeof sdkLoaded.runTestRunsResume === "function" &&
35
35
  typeof sdkLoaded.PmCliError === "function" &&
36
+ typeof sdkLoaded.readStringOption === "function" &&
37
+ typeof sdkLoaded.readBooleanOption === "function" &&
36
38
  typeof sdkLoaded.EXIT_CODE === "object" &&
37
39
  sdkLoaded.EXIT_CODE !== null
38
40
  ) {
@@ -48,40 +50,6 @@ async function loadRuntimeBundle() {
48
50
  );
49
51
  }
50
52
 
51
- function readStringOption(options, key, aliases = []) {
52
- const keys = [key, ...aliases];
53
- for (const candidate of keys) {
54
- const value = options[candidate];
55
- if (typeof value === "string" && value.trim().length > 0) {
56
- return value;
57
- }
58
- }
59
- return undefined;
60
- }
61
-
62
- function readBooleanOption(options, key, aliases = []) {
63
- const keys = [key, ...aliases];
64
- for (const candidate of keys) {
65
- const value = options[candidate];
66
- if (value === undefined) {
67
- continue;
68
- }
69
- if (typeof value === "boolean") {
70
- return value;
71
- }
72
- if (typeof value === "string") {
73
- const normalized = value.trim().toLowerCase();
74
- if (normalized === "true" || normalized === "1" || normalized === "yes" || normalized === "on") {
75
- return true;
76
- }
77
- if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "off") {
78
- return false;
79
- }
80
- }
81
- }
82
- return undefined;
83
- }
84
-
85
53
  function requireRunId(bundle, commandName, args) {
86
54
  const runId = args[0];
87
55
  if (typeof runId === "string" && runId.trim().length > 0) {
@@ -94,8 +62,8 @@ export async function runTestRunsListPackage(options, global) {
94
62
  const bundle = await ensureRuntimeBundle();
95
63
  return bundle.sdk.runTestRunsList(
96
64
  {
97
- status: readStringOption(options, "status"),
98
- limit: readStringOption(options, "limit"),
65
+ status: bundle.sdk.readStringOption(options, "status"),
66
+ limit: bundle.sdk.readStringOption(options, "limit"),
99
67
  },
100
68
  global,
101
69
  );
@@ -111,8 +79,8 @@ export async function runTestRunsLogsPackage(args, options, global) {
111
79
  return bundle.sdk.runTestRunsLogs(
112
80
  requireRunId(bundle, "test-runs logs", args),
113
81
  {
114
- stream: readStringOption(options, "stream"),
115
- tail: readStringOption(options, "tail"),
82
+ stream: bundle.sdk.readStringOption(options, "stream"),
83
+ tail: bundle.sdk.readStringOption(options, "tail"),
116
84
  },
117
85
  global,
118
86
  );
@@ -123,7 +91,7 @@ export async function runTestRunsStopPackage(args, options, global) {
123
91
  return bundle.sdk.runTestRunsStop(
124
92
  requireRunId(bundle, "test-runs stop", args),
125
93
  {
126
- force: readBooleanOption(options, "force") === true,
94
+ force: bundle.sdk.readBooleanOption(options, "force") === true,
127
95
  },
128
96
  global,
129
97
  );
@@ -134,7 +102,7 @@ export async function runTestRunsResumePackage(args, options, global) {
134
102
  return bundle.sdk.runTestRunsResume(
135
103
  requireRunId(bundle, "test-runs resume", args),
136
104
  {
137
- author: readStringOption(options, "author"),
105
+ author: bundle.sdk.readStringOption(options, "author"),
138
106
  noExtensions: global.noExtensions === true,
139
107
  },
140
108
  global,
@@ -12,6 +12,8 @@ interface RuntimeSdkModule {
12
12
  runTestRunsLogs: (runId: string, options: Record<string, unknown>, global: GlobalOptions) => Promise<unknown>;
13
13
  runTestRunsStop: (runId: string, options: Record<string, unknown>, global: GlobalOptions) => Promise<unknown>;
14
14
  runTestRunsResume: (runId: string, options: Record<string, unknown>, global: GlobalOptions) => Promise<unknown>;
15
+ readStringOption: (options: Record<string, unknown>, key: string, aliases?: string[]) => string | undefined;
16
+ readBooleanOption: (options: Record<string, unknown>, key: string, aliases?: string[]) => boolean | undefined;
15
17
  }
16
18
 
17
19
  interface RuntimeBundle {
@@ -49,6 +51,8 @@ async function loadRuntimeBundle(): Promise<RuntimeBundle> {
49
51
  typeof sdkLoaded.runTestRunsStop === "function" &&
50
52
  typeof sdkLoaded.runTestRunsResume === "function" &&
51
53
  typeof sdkLoaded.PmCliError === "function" &&
54
+ typeof sdkLoaded.readStringOption === "function" &&
55
+ typeof sdkLoaded.readBooleanOption === "function" &&
52
56
  typeof sdkLoaded.EXIT_CODE === "object" &&
53
57
  sdkLoaded.EXIT_CODE !== null
54
58
  ) {
@@ -64,40 +68,6 @@ async function loadRuntimeBundle(): Promise<RuntimeBundle> {
64
68
  );
65
69
  }
66
70
 
67
- function readStringOption(options: Record<string, unknown>, key: string, aliases: string[] = []): string | undefined {
68
- const keys = [key, ...aliases];
69
- for (const candidate of keys) {
70
- const value = options[candidate];
71
- if (typeof value === "string" && value.trim().length > 0) {
72
- return value;
73
- }
74
- }
75
- return undefined;
76
- }
77
-
78
- function readBooleanOption(options: Record<string, unknown>, key: string, aliases: string[] = []): boolean | undefined {
79
- const keys = [key, ...aliases];
80
- for (const candidate of keys) {
81
- const value = options[candidate];
82
- if (value === undefined) {
83
- continue;
84
- }
85
- if (typeof value === "boolean") {
86
- return value;
87
- }
88
- if (typeof value === "string") {
89
- const normalized = value.trim().toLowerCase();
90
- if (normalized === "true" || normalized === "1" || normalized === "yes" || normalized === "on") {
91
- return true;
92
- }
93
- if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "off") {
94
- return false;
95
- }
96
- }
97
- }
98
- return undefined;
99
- }
100
-
101
71
  function requireRunId(bundle: RuntimeBundle, commandName: string, args: string[]): string {
102
72
  const runId = args[0];
103
73
  if (typeof runId === "string" && runId.trim().length > 0) {
@@ -113,8 +83,8 @@ export async function runTestRunsListPackage(
113
83
  const bundle = await ensureRuntimeBundle();
114
84
  return bundle.sdk.runTestRunsList(
115
85
  {
116
- status: readStringOption(options, "status"),
117
- limit: readStringOption(options, "limit"),
86
+ status: bundle.sdk.readStringOption(options, "status"),
87
+ limit: bundle.sdk.readStringOption(options, "limit"),
118
88
  },
119
89
  global,
120
90
  );
@@ -134,8 +104,8 @@ export async function runTestRunsLogsPackage(
134
104
  return bundle.sdk.runTestRunsLogs(
135
105
  requireRunId(bundle, "test-runs logs", args),
136
106
  {
137
- stream: readStringOption(options, "stream"),
138
- tail: readStringOption(options, "tail"),
107
+ stream: bundle.sdk.readStringOption(options, "stream"),
108
+ tail: bundle.sdk.readStringOption(options, "tail"),
139
109
  },
140
110
  global,
141
111
  );
@@ -150,7 +120,7 @@ export async function runTestRunsStopPackage(
150
120
  return bundle.sdk.runTestRunsStop(
151
121
  requireRunId(bundle, "test-runs stop", args),
152
122
  {
153
- force: readBooleanOption(options, "force") === true,
123
+ force: bundle.sdk.readBooleanOption(options, "force") === true,
154
124
  },
155
125
  global,
156
126
  );
@@ -165,7 +135,7 @@ export async function runTestRunsResumePackage(
165
135
  return bundle.sdk.runTestRunsResume(
166
136
  requireRunId(bundle, "test-runs resume", args),
167
137
  {
168
- author: readStringOption(options, "author"),
138
+ author: bundle.sdk.readStringOption(options, "author"),
169
139
  noExtensions: global.noExtensions === true,
170
140
  },
171
141
  global,
@@ -6,9 +6,13 @@ First-party package that restores optional advanced search surfaces in bare-core
6
6
 
7
7
  - Adds `pm search-advanced` with:
8
8
  - `--mode keyword|semantic|hybrid`
9
+ - `--semantic`, `--hybrid`
9
10
  - `--include-linked`
10
11
  - `--title-exact`
11
12
  - `--phrase-exact`
13
+ - `--type`, `--tag`, `--priority`
14
+ - `--deadline-before`, `--deadline-after`
15
+ - `--limit`, `--fields`, `--compact`, `--full`
12
16
  - Adds `pm reindex` with:
13
17
  - `--mode keyword|semantic|hybrid`
14
18
  - `--progress`
@@ -23,5 +27,9 @@ pm install search-advanced --project
23
27
 
24
28
  ```bash
25
29
  pm search-advanced "vector cache" --mode hybrid --limit 5 --json
30
+ pm search-advanced --hybrid "vector cache" --limit 5 --json
31
+ pm search-advanced "calendar package" --mode keyword --fields id,title,score --compact --json
26
32
  pm reindex --mode hybrid --progress --json
27
33
  ```
34
+
35
+ Without `--mode`, `--semantic`, or `--hybrid`, `search-advanced` stays keyword-first for fast agent reads.
@@ -5,7 +5,7 @@ export const manifest = {
5
5
  version: "0.1.0",
6
6
  entry: "./index.js",
7
7
  priority: 0,
8
- capabilities: ["commands"],
8
+ capabilities: ["commands", "schema"],
9
9
  };
10
10
 
11
11
  const searchAdvancedFlags = [
@@ -15,6 +15,16 @@ const searchAdvancedFlags = [
15
15
  value_type: "string",
16
16
  description: "Search mode override: keyword|semantic|hybrid.",
17
17
  },
18
+ {
19
+ long: "--semantic",
20
+ value_type: "boolean",
21
+ description: "Alias for --mode semantic.",
22
+ },
23
+ {
24
+ long: "--hybrid",
25
+ value_type: "boolean",
26
+ description: "Alias for --mode hybrid.",
27
+ },
18
28
  {
19
29
  long: "--include-linked",
20
30
  value_type: "boolean",
@@ -45,6 +55,70 @@ const searchAdvancedFlags = [
45
55
  value_type: "boolean",
46
56
  description: "Alias for --phrase-exact.",
47
57
  },
58
+ {
59
+ long: "--type",
60
+ value_name: "value",
61
+ value_type: "string",
62
+ description: "Filter by item type.",
63
+ },
64
+ {
65
+ long: "--tag",
66
+ value_name: "value",
67
+ value_type: "string",
68
+ description: "Filter by tag.",
69
+ },
70
+ {
71
+ long: "--priority",
72
+ value_name: "value",
73
+ value_type: "string",
74
+ description: "Filter by priority.",
75
+ },
76
+ {
77
+ long: "--deadline-before",
78
+ value_name: "date",
79
+ value_type: "string",
80
+ description: "Filter to items with deadlines before a date.",
81
+ },
82
+ {
83
+ long: "--deadline_before",
84
+ value_name: "date",
85
+ value_type: "string",
86
+ description: "Alias for --deadline-before.",
87
+ },
88
+ {
89
+ long: "--deadline-after",
90
+ value_name: "date",
91
+ value_type: "string",
92
+ description: "Filter to items with deadlines after a date.",
93
+ },
94
+ {
95
+ long: "--deadline_after",
96
+ value_name: "date",
97
+ value_type: "string",
98
+ description: "Alias for --deadline-after.",
99
+ },
100
+ {
101
+ long: "--limit",
102
+ value_name: "count",
103
+ value_type: "string",
104
+ description: "Limit the number of search results.",
105
+ },
106
+ {
107
+ long: "--fields",
108
+ value_name: "list",
109
+ value_type: "string",
110
+ description: "Return only selected result fields.",
111
+ },
112
+ {
113
+ long: "--compact",
114
+ value_type: "boolean",
115
+ description: "Return compact token-efficient search results.",
116
+ },
117
+ {
118
+ long: "--full",
119
+ value_type: "boolean",
120
+ description: "Return full search results.",
121
+ },
48
122
  ];
49
123
 
50
124
  const reindexFlags = [
@@ -16,6 +16,16 @@ const searchAdvancedFlags = [
16
16
  value_type: "string",
17
17
  description: "Search mode override: keyword|semantic|hybrid.",
18
18
  },
19
+ {
20
+ long: "--semantic",
21
+ value_type: "boolean",
22
+ description: "Alias for --mode semantic.",
23
+ },
24
+ {
25
+ long: "--hybrid",
26
+ value_type: "boolean",
27
+ description: "Alias for --mode hybrid.",
28
+ },
19
29
  {
20
30
  long: "--include-linked",
21
31
  value_type: "boolean",
@@ -46,6 +56,70 @@ const searchAdvancedFlags = [
46
56
  value_type: "boolean",
47
57
  description: "Alias for --phrase-exact.",
48
58
  },
59
+ {
60
+ long: "--type",
61
+ value_name: "value",
62
+ value_type: "string",
63
+ description: "Filter by item type.",
64
+ },
65
+ {
66
+ long: "--tag",
67
+ value_name: "value",
68
+ value_type: "string",
69
+ description: "Filter by tag.",
70
+ },
71
+ {
72
+ long: "--priority",
73
+ value_name: "value",
74
+ value_type: "string",
75
+ description: "Filter by priority.",
76
+ },
77
+ {
78
+ long: "--deadline-before",
79
+ value_name: "date",
80
+ value_type: "string",
81
+ description: "Filter to items with deadlines before a date.",
82
+ },
83
+ {
84
+ long: "--deadline_before",
85
+ value_name: "date",
86
+ value_type: "string",
87
+ description: "Alias for --deadline-before.",
88
+ },
89
+ {
90
+ long: "--deadline-after",
91
+ value_name: "date",
92
+ value_type: "string",
93
+ description: "Filter to items with deadlines after a date.",
94
+ },
95
+ {
96
+ long: "--deadline_after",
97
+ value_name: "date",
98
+ value_type: "string",
99
+ description: "Alias for --deadline-after.",
100
+ },
101
+ {
102
+ long: "--limit",
103
+ value_name: "count",
104
+ value_type: "string",
105
+ description: "Limit the number of search results.",
106
+ },
107
+ {
108
+ long: "--fields",
109
+ value_name: "list",
110
+ value_type: "string",
111
+ description: "Return only selected result fields.",
112
+ },
113
+ {
114
+ long: "--compact",
115
+ value_type: "boolean",
116
+ description: "Return compact token-efficient search results.",
117
+ },
118
+ {
119
+ long: "--full",
120
+ value_type: "boolean",
121
+ description: "Return full search results.",
122
+ },
49
123
  ] as const;
50
124
 
51
125
  const reindexFlags = [