@unbrained/pm-cli 2026.5.30 → 2026.5.31

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 (228) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cli/commands/calendar.js +81 -9
  3. package/dist/cli/commands/calendar.js.map +1 -1
  4. package/dist/cli/commands/create.js +34 -4
  5. package/dist/cli/commands/create.js.map +1 -1
  6. package/dist/cli/commands/extension/install-sources.d.ts +2 -0
  7. package/dist/cli/commands/extension/install-sources.js +11 -4
  8. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  9. package/dist/cli/commands/reindex.js +3 -3
  10. package/dist/cli/commands/reindex.js.map +1 -1
  11. package/dist/cli/commands/search.d.ts +17 -0
  12. package/dist/cli/commands/search.js +40 -10
  13. package/dist/cli/commands/search.js.map +1 -1
  14. package/dist/cli/register-list-query.js +9 -11
  15. package/dist/cli/register-list-query.js.map +1 -1
  16. package/dist/cli/register-mutation.js +20 -22
  17. package/dist/cli/register-mutation.js.map +1 -1
  18. package/dist/cli/register-operations.js +32 -25
  19. package/dist/cli/register-operations.js.map +1 -1
  20. package/dist/cli/register-setup.js +6 -8
  21. package/dist/cli/register-setup.js.map +1 -1
  22. package/dist/cli/registration-helpers.js +6 -3
  23. package/dist/cli/registration-helpers.js.map +1 -1
  24. package/dist/cli/search-refresh.d.ts +2 -0
  25. package/dist/cli/search-refresh.js +13 -0
  26. package/dist/cli/search-refresh.js.map +1 -0
  27. package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +17 -0
  28. package/dist/cli-bundle/chunks/activity-OWYSUZOY.js.map +7 -0
  29. package/dist/cli-bundle/chunks/aggregate-ADUOSFRO.js +209 -0
  30. package/dist/cli-bundle/chunks/aggregate-ADUOSFRO.js.map +7 -0
  31. package/dist/cli-bundle/chunks/append-JD2DETU7.js +73 -0
  32. package/dist/cli-bundle/chunks/append-JD2DETU7.js.map +7 -0
  33. package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js +27 -0
  34. package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js.map +7 -0
  35. package/dist/cli-bundle/chunks/chunk-3M73P3G6.js +1636 -0
  36. package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +7 -0
  37. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +189 -0
  38. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +7 -0
  39. package/dist/cli-bundle/chunks/chunk-5HSEP75M.js +330 -0
  40. package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +7 -0
  41. package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js +1770 -0
  42. package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +7 -0
  43. package/dist/cli-bundle/chunks/chunk-6YCV7WSL.js +552 -0
  44. package/dist/cli-bundle/chunks/chunk-6YCV7WSL.js.map +7 -0
  45. package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js +202 -0
  46. package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +7 -0
  47. package/dist/cli-bundle/chunks/chunk-A7E7PUVX.js +157 -0
  48. package/dist/cli-bundle/chunks/chunk-A7E7PUVX.js.map +7 -0
  49. package/dist/cli-bundle/chunks/chunk-AKOOMO3T.js +90 -0
  50. package/dist/cli-bundle/chunks/chunk-AKOOMO3T.js.map +7 -0
  51. package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js +950 -0
  52. package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +7 -0
  53. package/dist/cli-bundle/chunks/chunk-CEFIVZPG.js +79 -0
  54. package/dist/cli-bundle/chunks/chunk-CEFIVZPG.js.map +7 -0
  55. package/dist/cli-bundle/chunks/chunk-D7AOMPRH.js +349 -0
  56. package/dist/cli-bundle/chunks/chunk-D7AOMPRH.js.map +7 -0
  57. package/dist/cli-bundle/chunks/chunk-EAOG77HM.js +56 -0
  58. package/dist/cli-bundle/chunks/chunk-EAOG77HM.js.map +7 -0
  59. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +47 -0
  60. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +7 -0
  61. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +56 -0
  62. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +7 -0
  63. package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js +435 -0
  64. package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +7 -0
  65. package/dist/cli-bundle/chunks/chunk-G57E5D7T.js +185 -0
  66. package/dist/cli-bundle/chunks/chunk-G57E5D7T.js.map +7 -0
  67. package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js +3621 -0
  68. package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +7 -0
  69. package/dist/cli-bundle/chunks/chunk-JFWUHHS2.js +233 -0
  70. package/dist/cli-bundle/chunks/chunk-JFWUHHS2.js.map +7 -0
  71. package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js +1861 -0
  72. package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +7 -0
  73. package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js +648 -0
  74. package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +7 -0
  75. package/dist/cli-bundle/chunks/{chunk-PB2YU2E3.js → chunk-KBQY3YG5.js} +28 -70
  76. package/dist/cli-bundle/chunks/chunk-KBQY3YG5.js.map +7 -0
  77. package/dist/cli-bundle/chunks/chunk-L2FXEKDB.js +185 -0
  78. package/dist/cli-bundle/chunks/chunk-L2FXEKDB.js.map +7 -0
  79. package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js +189 -0
  80. package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js.map +7 -0
  81. package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js +5153 -0
  82. package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +7 -0
  83. package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js +1345 -0
  84. package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +7 -0
  85. package/dist/cli-bundle/chunks/chunk-NGN7UV5K.js +341 -0
  86. package/dist/cli-bundle/chunks/chunk-NGN7UV5K.js.map +7 -0
  87. package/dist/cli-bundle/chunks/chunk-O7IWB35H.js +18 -0
  88. package/dist/cli-bundle/chunks/chunk-O7IWB35H.js.map +7 -0
  89. package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js +2929 -0
  90. package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +7 -0
  91. package/dist/cli-bundle/chunks/{chunk-RJONRNXN.js → chunk-P53TN6IA.js} +22 -30
  92. package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +7 -0
  93. package/dist/cli-bundle/chunks/chunk-PVNQLCIS.js +176 -0
  94. package/dist/cli-bundle/chunks/chunk-PVNQLCIS.js.map +7 -0
  95. package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js +1680 -0
  96. package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +7 -0
  97. package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js +20 -0
  98. package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js.map +7 -0
  99. package/dist/cli-bundle/chunks/chunk-SEXQN4KL.js +60 -0
  100. package/dist/cli-bundle/chunks/chunk-SEXQN4KL.js.map +7 -0
  101. package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js +362 -0
  102. package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +7 -0
  103. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +141 -0
  104. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +7 -0
  105. package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js +632 -0
  106. package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +7 -0
  107. package/dist/cli-bundle/chunks/chunk-WJ2NAC37.js +252 -0
  108. package/dist/cli-bundle/chunks/chunk-WJ2NAC37.js.map +7 -0
  109. package/dist/cli-bundle/chunks/claim-EE4TKKCV.js +133 -0
  110. package/dist/cli-bundle/chunks/claim-EE4TKKCV.js.map +7 -0
  111. package/dist/cli-bundle/chunks/close-XY4CSAYF.js +14 -0
  112. package/dist/cli-bundle/chunks/close-XY4CSAYF.js.map +7 -0
  113. package/dist/cli-bundle/chunks/comments-AAKJQ6LW.js +104 -0
  114. package/dist/cli-bundle/chunks/comments-AAKJQ6LW.js.map +7 -0
  115. package/dist/cli-bundle/chunks/config-V3FZOKLI.js +1577 -0
  116. package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +7 -0
  117. package/dist/cli-bundle/chunks/context-RZ5QPNJB.js +1458 -0
  118. package/dist/cli-bundle/chunks/context-RZ5QPNJB.js.map +7 -0
  119. package/dist/cli-bundle/chunks/contracts-YLMH33VU.js +1245 -0
  120. package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +7 -0
  121. package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +28 -0
  122. package/dist/cli-bundle/chunks/create-PZVHRIZQ.js.map +7 -0
  123. package/dist/cli-bundle/chunks/delete-RHCTEORS.js +59 -0
  124. package/dist/cli-bundle/chunks/delete-RHCTEORS.js.map +7 -0
  125. package/dist/cli-bundle/chunks/deps-MZYCMLAO.js +229 -0
  126. package/dist/cli-bundle/chunks/deps-MZYCMLAO.js.map +7 -0
  127. package/dist/cli-bundle/chunks/docs-FXXUCZYU.js +35 -0
  128. package/dist/cli-bundle/chunks/docs-FXXUCZYU.js.map +7 -0
  129. package/dist/cli-bundle/chunks/extension-B4WL7BQU.js +25 -0
  130. package/dist/cli-bundle/chunks/extension-B4WL7BQU.js.map +7 -0
  131. package/dist/cli-bundle/chunks/files-WVOX67PE.js +286 -0
  132. package/dist/cli-bundle/chunks/files-WVOX67PE.js.map +7 -0
  133. package/dist/cli-bundle/chunks/gc-JWNF66EC.js +181 -0
  134. package/dist/cli-bundle/chunks/gc-JWNF66EC.js.map +7 -0
  135. package/dist/cli-bundle/chunks/get-LTK3HOCQ.js +198 -0
  136. package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +7 -0
  137. package/dist/cli-bundle/chunks/health-TCWL55KM.js +1233 -0
  138. package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +7 -0
  139. package/dist/cli-bundle/chunks/history-A2JUDXUE.js +21 -0
  140. package/dist/cli-bundle/chunks/history-A2JUDXUE.js.map +7 -0
  141. package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +20 -0
  142. package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js.map +7 -0
  143. package/dist/cli-bundle/chunks/history-repair-ZWSTDRH2.js +198 -0
  144. package/dist/cli-bundle/chunks/history-repair-ZWSTDRH2.js.map +7 -0
  145. package/dist/cli-bundle/chunks/init-M2WUB4YH.js +16 -0
  146. package/dist/cli-bundle/chunks/init-M2WUB4YH.js.map +7 -0
  147. package/dist/cli-bundle/chunks/learnings-NXTWE3FR.js +48 -0
  148. package/dist/cli-bundle/chunks/learnings-NXTWE3FR.js.map +7 -0
  149. package/dist/cli-bundle/chunks/list-OGWQPC26.js +20 -0
  150. package/dist/cli-bundle/chunks/list-OGWQPC26.js.map +7 -0
  151. package/dist/cli-bundle/chunks/notes-DFS5ZGOO.js +48 -0
  152. package/dist/cli-bundle/chunks/notes-DFS5ZGOO.js.map +7 -0
  153. package/dist/cli-bundle/chunks/plan-67AB2PLM.js +1175 -0
  154. package/dist/cli-bundle/chunks/plan-67AB2PLM.js.map +7 -0
  155. package/dist/cli-bundle/chunks/{register-list-query-EIVQ5FMR.js → register-list-query-UP3VRUFS.js} +24 -15
  156. package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +7 -0
  157. package/dist/cli-bundle/chunks/{register-mutation-RSZNPSGI.js → register-mutation-YWSBF545.js} +38 -28
  158. package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +7 -0
  159. package/dist/cli-bundle/chunks/{register-operations-APUSYDMR.js → register-operations-3BDTGSDH.js} +49 -30
  160. package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +7 -0
  161. package/dist/cli-bundle/chunks/{register-setup-OZOKSMPJ.js → register-setup-V56GDRUS.js} +21 -12
  162. package/dist/cli-bundle/chunks/register-setup-V56GDRUS.js.map +7 -0
  163. package/dist/cli-bundle/chunks/restore-MB2ISME7.js +18 -0
  164. package/dist/cli-bundle/chunks/restore-MB2ISME7.js.map +7 -0
  165. package/dist/cli-bundle/chunks/schema-Q622KC46.js +119 -0
  166. package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +7 -0
  167. package/dist/cli-bundle/chunks/search-HENBL456.js +1135 -0
  168. package/dist/cli-bundle/chunks/search-HENBL456.js.map +7 -0
  169. package/dist/cli-bundle/chunks/stats-N6H3YP2F.js +124 -0
  170. package/dist/cli-bundle/chunks/stats-N6H3YP2F.js.map +7 -0
  171. package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +32 -0
  172. package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js.map +7 -0
  173. package/dist/cli-bundle/chunks/test-all-G2AZOHXI.js +332 -0
  174. package/dist/cli-bundle/chunks/test-all-G2AZOHXI.js.map +7 -0
  175. package/dist/cli-bundle/chunks/test-runs-GX5HTPSF.js +939 -0
  176. package/dist/cli-bundle/chunks/test-runs-GX5HTPSF.js.map +7 -0
  177. package/dist/cli-bundle/chunks/update-H6SCWNMA.js +22 -0
  178. package/dist/cli-bundle/chunks/update-H6SCWNMA.js.map +7 -0
  179. package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js +676 -0
  180. package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +7 -0
  181. package/dist/cli-bundle/chunks/upgrade-H5HHM5UV.js +271 -0
  182. package/dist/cli-bundle/chunks/upgrade-H5HHM5UV.js.map +7 -0
  183. package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js +1110 -0
  184. package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +7 -0
  185. package/dist/cli-bundle/main.js +146 -90
  186. package/dist/cli-bundle/main.js.map +4 -4
  187. package/dist/core/item/item-type-definition.js +6 -2
  188. package/dist/core/item/item-type-definition.js.map +1 -1
  189. package/dist/core/item/type-registry.d.ts +4 -0
  190. package/dist/core/item/type-registry.js +10 -2
  191. package/dist/core/item/type-registry.js.map +1 -1
  192. package/dist/core/search/background-refresh.d.ts +53 -0
  193. package/dist/core/search/background-refresh.js +286 -0
  194. package/dist/core/search/background-refresh.js.map +1 -0
  195. package/dist/core/search/cache.d.ts +20 -1
  196. package/dist/core/search/cache.js +33 -4
  197. package/dist/core/search/cache.js.map +1 -1
  198. package/dist/core/search/vector-stores.js +7 -3
  199. package/dist/core/search/vector-stores.js.map +1 -1
  200. package/dist/core/shared/constants.d.ts +2 -2
  201. package/dist/core/shared/constants.js +2 -3
  202. package/dist/core/shared/constants.js.map +1 -1
  203. package/dist/core/store/item-format-migration.js +25 -15
  204. package/dist/core/store/item-format-migration.js.map +1 -1
  205. package/dist/core/store/settings-validator.js +6 -2
  206. package/dist/core/store/settings-validator.js.map +1 -1
  207. package/dist/core/telemetry/runtime.d.ts +10 -0
  208. package/dist/core/telemetry/runtime.js +86 -2
  209. package/dist/core/telemetry/runtime.js.map +1 -1
  210. package/dist/sdk/cli-contracts/tool-parameter-tables.js +4 -4
  211. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  212. package/dist/sdk/cli-contracts.js +26 -5
  213. package/dist/sdk/cli-contracts.js.map +1 -1
  214. package/dist/types.d.ts +7 -1
  215. package/dist/types.js +2 -2
  216. package/dist/types.js.map +1 -1
  217. package/docs/RELEASING.md +1 -1
  218. package/package.json +1 -2
  219. package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +0 -7
  220. package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +0 -7
  221. package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +0 -13864
  222. package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +0 -7
  223. package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +0 -24225
  224. package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +0 -7
  225. package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +0 -7
  226. package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +0 -7
  227. package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +0 -7
  228. package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +0 -7
@@ -1,25 +1,34 @@
1
1
  import {
2
2
  collect,
3
- createLazyModule,
4
3
  getGlobalOptions
5
- } from "./chunk-RJONRNXN.js";
4
+ } from "./chunk-P53TN6IA.js";
5
+ import "./chunk-GN7IJPCD.js";
6
+ import "./chunk-6HT2F4TK.js";
6
7
  import {
7
- EXIT_CODE,
8
- PmCliError,
9
8
  printError,
10
9
  printResult
11
- } from "./chunk-SW5BMMCU.js";
10
+ } from "./chunk-5HSEP75M.js";
11
+ import "./chunk-EGUGFSNX.js";
12
+ import "./chunk-BUPWJ3IJ.js";
13
+ import "./chunk-4AEZR5EJ.js";
14
+ import "./chunk-CEFIVZPG.js";
15
+ import "./chunk-MD7K4JYF.js";
16
+ import "./chunk-WDPXDQFG.js";
17
+ import "./chunk-PVNQLCIS.js";
18
+ import {
19
+ EXIT_CODE,
20
+ PmCliError
21
+ } from "./chunk-LSXGH6NE.js";
12
22
 
13
23
  // dist/cli/register-setup.js
14
24
  import fs from "node:fs/promises";
15
25
  !(function() {
16
26
  try {
17
27
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
18
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ce11edcb-136f-5f29-b871-3b775d9b7a74");
28
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "62ac0c21-3e7e-5b54-9f17-6eacfd9edbcd");
19
29
  } catch (e2) {
20
30
  }
21
31
  })();
22
- var loadSetupCommandsModule = createLazyModule(() => import("./commands-XJ4TJ5UN.js"));
23
32
  function normalizeExtensionOptions(options, forcedAction, vocabulary = "extension") {
24
33
  const isForcedAction = (action) => forcedAction === action;
25
34
  const readBoolean = (...keys) => keys.some((key) => options[key] === true);
@@ -84,7 +93,7 @@ async function executeExtensionCommand(target, options, command, forcedAction, v
84
93
  const globalOptions = getGlobalOptions(command);
85
94
  const startedAt = Date.now();
86
95
  const normalizedOptions = normalizeExtensionOptions(options, forcedAction, vocabulary);
87
- const { runExtension } = await loadSetupCommandsModule();
96
+ const { runExtension } = await import("./extension-B4WL7BQU.js");
88
97
  const result = await runExtension(target, normalizedOptions, globalOptions);
89
98
  printResult(result, globalOptions);
90
99
  const strictExit = Boolean(normalizedOptions.strictExit) || Boolean(normalizedOptions.failOnWarn);
@@ -162,7 +171,7 @@ function registerSetupCommands(program) {
162
171
  program.command("init").argument("[prefix]", "Optional id prefix").option("--preset <value>", "Governance preset for new setups: minimal|default|strict").option("--defaults", "Use non-interactive setup defaults without opening the wizard").option("-y, --yes", "Alias for --defaults (non-interactive setup)").option("--author <value>", "Set the default mutation author for this project").option("--agent-guidance <mode>", "Agent guidance mode: ask|add|skip|status").option("--with-packages", "Install all bundled first-party packages during initialization").option("--verbose", "Include the full resolved settings tree in the output (default output is a concise summary)").description("Initialize pm storage and defaults for the current workspace.").action(async (prefix, options, command) => {
163
172
  const globalOptions = getGlobalOptions(command);
164
173
  const startedAt = Date.now();
165
- const { runInit, summarizeInitResult } = await loadSetupCommandsModule();
174
+ const { runInit, summarizeInitResult } = await import("./init-M2WUB4YH.js");
166
175
  const result = await runInit(prefix, globalOptions, {
167
176
  preset: typeof options.preset === "string" ? options.preset : void 0,
168
177
  defaults: options.defaults === true || options.yes === true,
@@ -181,7 +190,7 @@ function registerSetupCommands(program) {
181
190
  const globalOptions = getGlobalOptions(command);
182
191
  const startedAt = Date.now();
183
192
  const criteria = Array.isArray(options.criterion) ? options.criterion : [];
184
- const { runConfig } = await loadSetupCommandsModule();
193
+ const { runConfig } = await import("./config-V3FZOKLI.js");
185
194
  const actionShorthands = /* @__PURE__ */ new Set(["get", "set", "list", "export"]);
186
195
  const scopeShorthand = scope !== void 0 && actionShorthands.has(scope);
187
196
  const resolvedScope = scopeShorthand ? "project" : scope ?? "project";
@@ -220,7 +229,7 @@ function registerSetupCommands(program) {
220
229
  addPackageScopeOptions(program.command("upgrade").argument("[target]", "Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages").option("--dry-run", "Plan CLI/package upgrades without running npm or reinstalling packages").option("--cli-only", "Upgrade only the pm CLI/SDK npm package").option("--packages-only", "Upgrade only managed pm packages").option("--repair", "Force npm global reinstall when upgrading the pm CLI/SDK").option("--tag <value>", "npm dist-tag/version for CLI and registry package upgrades").option("--package-name <value>", "Override the CLI package name for self-upgrade testing").description("Upgrade the pm CLI/SDK and refresh managed installable pm packages.")).action(async (target, _options, command) => {
221
230
  const globalOptions = getGlobalOptions(command);
222
231
  const startedAt = Date.now();
223
- const { runUpgrade } = await loadSetupCommandsModule();
232
+ const { runUpgrade } = await import("./upgrade-H5HHM5UV.js");
224
233
  const result = await runUpgrade(target, command.opts(), globalOptions);
225
234
  printResult(result, globalOptions);
226
235
  if (!result.ok) {
@@ -234,4 +243,4 @@ function registerSetupCommands(program) {
234
243
  export {
235
244
  registerSetupCommands
236
245
  };
237
- //# sourceMappingURL=register-setup-OZOKSMPJ.js.map
246
+ //# sourceMappingURL=register-setup-V56GDRUS.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../cli/register-setup.ts"],
4
+ "sourcesContent": ["import type { Command } from \"commander\";\nimport fs from \"node:fs/promises\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport {\n collect,\n getGlobalOptions,\n printError,\n printResult,\n} from \"./registration-helpers.js\";\n\n\n\ntype ExtensionSubcommandAction =\n | \"init\"\n | \"install\"\n | \"uninstall\"\n | \"explore\"\n | \"manage\"\n | \"reload\"\n | \"doctor\"\n | \"catalog\"\n | \"adopt\"\n | \"adopt-all\"\n | \"activate\"\n | \"deactivate\";\n\ntype LifecycleCommandVocabulary = \"extension\" | \"package\";\n\nfunction normalizeExtensionOptions(\n options: Record<string, unknown>,\n forcedAction?: ExtensionSubcommandAction,\n vocabulary: LifecycleCommandVocabulary = \"extension\",\n): Record<string, unknown> {\n const isForcedAction = (action: ExtensionSubcommandAction): boolean => forcedAction === action;\n const readBoolean = (...keys: string[]): boolean => keys.some((key) => options[key] === true);\n const readString = (...keys: string[]): string | undefined => {\n for (const key of keys) {\n if (typeof options[key] === \"string\") {\n return options[key] as string;\n }\n }\n return undefined;\n };\n return {\n init: isForcedAction(\"init\") || readBoolean(\"init\"),\n scaffold: readBoolean(\"scaffold\"),\n install: isForcedAction(\"install\") || readBoolean(\"install\"),\n uninstall: isForcedAction(\"uninstall\") || readBoolean(\"uninstall\"),\n explore: isForcedAction(\"explore\") || readBoolean(\"explore\", \"list\"),\n manage: isForcedAction(\"manage\") || readBoolean(\"manage\"),\n reload: isForcedAction(\"reload\") || readBoolean(\"reload\"),\n doctor: isForcedAction(\"doctor\") || readBoolean(\"doctor\"),\n catalog: isForcedAction(\"catalog\") || readBoolean(\"catalog\"),\n adopt: isForcedAction(\"adopt\") || readBoolean(\"adopt\"),\n adoptAll: isForcedAction(\"adopt-all\") || readBoolean(\"adoptAll\", \"adopt_all\", \"adopt-all\"),\n activate: isForcedAction(\"activate\") || readBoolean(\"activate\"),\n deactivate: isForcedAction(\"deactivate\") || readBoolean(\"deactivate\"),\n project: readBoolean(\"project\"),\n local: readBoolean(\"local\"),\n global: readBoolean(\"global\"),\n gh: readString(\"gh\"),\n github: readString(\"github\"),\n ref: readString(\"ref\"),\n fields: readString(\"fields\"),\n detail: readString(\"detail\"),\n trace: readBoolean(\"trace\"),\n watch: readBoolean(\"watch\"),\n runtimeProbe: readBoolean(\"runtimeProbe\", \"runtime_probe\", \"runtime-probe\"),\n fixManagedState: readBoolean(\"fixManagedState\", \"fix_managed_state\", \"fix-managed-state\"),\n strictExit: readBoolean(\"strictExit\", \"strict_exit\", \"strict-exit\"),\n failOnWarn: readBoolean(\"failOnWarn\", \"fail_on_warn\", \"fail-on-warn\"),\n vocabulary,\n };\n}\n\nasync function looksLikeShellExpandedWildcard(targets: string[]): Promise<boolean> {\n if (targets.length <= 1) {\n return false;\n }\n const visibleEntries = (await fs.readdir(process.cwd()))\n .filter((entry) => !entry.startsWith(\".\"))\n .sort((left, right) => left.localeCompare(right));\n const normalizedTargets = [...targets].sort((left, right) => left.localeCompare(right));\n return (\n visibleEntries.length === normalizedTargets.length &&\n visibleEntries.every((entry, index) => entry === normalizedTargets[index])\n );\n}\n\nasync function normalizeInstallTargets(targets: string[] | string | undefined): Promise<string | undefined> {\n const normalizedTargets = (Array.isArray(targets) ? targets : typeof targets === \"string\" ? [targets] : [])\n .map((target) => target.trim())\n .filter((target) => target.length > 0);\n if (normalizedTargets.length <= 1) {\n return normalizedTargets[0];\n }\n if (await looksLikeShellExpandedWildcard(normalizedTargets)) {\n return \"*\";\n }\n throw new PmCliError(\n `Install accepts one package source at a time. To install bundled first-party packages, quote the wildcard: pm install '*'`,\n EXIT_CODE.USAGE,\n );\n}\n\nasync function executeExtensionCommand(\n target: string | undefined,\n options: Record<string, unknown>,\n command: Command,\n forcedAction?: ExtensionSubcommandAction,\n vocabulary: LifecycleCommandVocabulary = \"extension\",\n): Promise<void> {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const normalizedOptions = normalizeExtensionOptions(options, forcedAction, vocabulary);\n const { runExtension } = await import(\"./commands/extension.js\");\n const result = await runExtension(target, normalizedOptions, globalOptions);\n printResult(result, globalOptions);\n const strictExit = Boolean(normalizedOptions.strictExit) || Boolean(normalizedOptions.failOnWarn);\n if (result.action === \"doctor\" && strictExit) {\n const detailsRecord = result.details as Record<string, unknown>;\n const summary = (detailsRecord.summary ?? null) as Record<string, unknown> | null;\n const summaryStatus = summary && typeof summary.status === \"string\" ? summary.status : undefined;\n const shouldFail = summaryStatus ? summaryStatus !== \"ok\" : result.warnings.length > 0;\n if (shouldFail) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n }\n if (globalOptions.profile) {\n printError(`profile:command=extension took_ms=${Date.now() - startedAt}`);\n }\n}\n\nfunction addExtensionScopeOptions<T extends Command>(command: T): T {\n return command\n .option(\"--project\", \"Use project extension scope (default)\")\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", \"Use global extension scope\");\n}\n\nfunction addPackageScopeOptions<T extends Command>(command: T): T {\n return command\n .option(\"--project\", \"Use project package scope (default)\")\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", \"Use global package scope\");\n}\n\nfunction addLifecycleScopeOptions<T extends Command>(command: T, vocabulary: LifecycleCommandVocabulary): T {\n return vocabulary === \"package\" ? addPackageScopeOptions(command) : addExtensionScopeOptions(command);\n}\n\nfunction registerLifecycleCommand(\n program: Command,\n vocabulary: LifecycleCommandVocabulary,\n): void {\n const noun = vocabulary === \"package\" ? \"package\" : \"extension\";\n const plural = vocabulary === \"package\" ? \"packages\" : \"extensions\";\n const commandName = vocabulary;\n const lifecycleCommand = program\n .command(commandName)\n .argument(\"[target]\", `${noun[0]!.toUpperCase()}${noun.slice(1)} source/name or scaffold target path (for --init/--scaffold)`)\n .option(\"--init\", `Generate a starter ${noun} scaffold at target path`)\n .option(\"--scaffold\", \"Alias for --init\")\n .option(\"--install\", `Install ${noun} from local path, bundled alias, npm: source, wildcard, or GitHub source`)\n .option(\"--uninstall\", `Uninstall an installed ${noun}`)\n .option(\"--explore\", `List discovered ${plural} in selected scope`)\n .option(\"--list\", \"Alias for --explore\")\n .option(\"--manage\", `List managed ${plural} with update-check metadata`)\n .option(\"--reload\", `Reload ${plural} with cache-busted module imports`)\n .option(\"--watch\", \"Use watch mode with --reload\")\n .option(\"--doctor\", `Run consolidated ${noun} diagnostics (summary/deep modes)`)\n .option(\"--catalog\", `List bundled first-party ${noun} catalog metadata`)\n .option(\"--adopt\", `Adopt an existing unmanaged ${noun} into managed metadata`)\n .option(\"--adopt-all\", `Adopt all unmanaged ${plural} into managed metadata`)\n .option(\"--activate\", `Activate a ${noun} in selected scope settings`)\n .option(\"--deactivate\", `Deactivate a ${noun} in selected scope settings`)\n .option(\"--project\", `Use project ${noun} scope (default)`)\n .option(\"--local\", \"Alias for --project\")\n .option(\"--global\", `Use global ${noun} scope`)\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .option(\"--detail <mode>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} diagnostics detail mode (summary|deep)`)\n .option(\"--trace\", \"Include actionable registration traces in doctor deep diagnostics\")\n .option(\"--runtime-probe\", \"Opt-in runtime activation probe for manage output parity\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .option(\"--strict-exit\", \"Return non-zero exit when doctor warnings are present (ok=false)\")\n .option(\"--fail-on-warn\", \"Alias for --strict-exit (doctor)\")\n .description(\n vocabulary === \"package\"\n ? \"Manage package lifecycle operations for project or global scope. Backward-compatible with extension packages.\"\n : \"Manage extension lifecycle operations for project or global scope.\",\n )\n .action(async (target: string | undefined, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, undefined, vocabulary);\n });\n\n if (vocabulary === \"package\") {\n lifecycleCommand.alias(\"packages\");\n }\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"init\")\n .alias(\"scaffold\")\n .argument(\"<target>\", `Scaffold target directory path`)\n .description(\n vocabulary === \"package\"\n ? \"Generate a starter package scaffold with package metadata, manifest, and entrypoint.\"\n : \"Generate a starter extension scaffold with manifest and entrypoint.\",\n ),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"init\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"install\")\n .argument(\"[targets...]\", `${noun[0]!.toUpperCase()}${noun.slice(1)} source (local path, bundled alias, npm: source, wildcard, or GitHub source)`)\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .description(`Install ${noun} from local path, bundled alias, npm: source, wildcard, or GitHub source.`),\n vocabulary,\n ).action(async (targets: string[] | undefined, _options: Record<string, unknown>, command) => {\n const target = await normalizeInstallTargets(targets);\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"install\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"uninstall\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Uninstall an installed ${noun}.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"uninstall\", vocabulary);\n });\n\n addLifecycleScopeOptions(lifecycleCommand.command(\"explore\").description(`List discovered ${plural} in selected scope.`), vocabulary).action(\n async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"explore\", vocabulary);\n },\n );\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"manage\")\n .option(\"--runtime-probe\", \"Opt-in runtime activation probe for manage output parity\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .description(`List managed ${plural} with update-check metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"manage\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"reload\")\n .option(\"--watch\", \"Use watch mode for repeated reload checks\")\n .description(`Reload ${plural} with cache-busted module imports.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"reload\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"doctor\")\n .option(\"--detail <mode>\", `Detail mode for ${noun} diagnostics (summary|deep)`)\n .option(\"--trace\", \"Include actionable registration traces in doctor deep diagnostics\")\n .option(\"--fix-managed-state\", `Adopt unmanaged ${plural} before diagnostics/update checks`)\n .option(\"--strict-exit\", \"Return non-zero exit when doctor warnings are present (ok=false)\")\n .option(\"--fail-on-warn\", \"Alias for --strict-exit (doctor)\")\n .description(`Run consolidated ${noun} diagnostics (summary/deep modes).`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"doctor\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"catalog\")\n .alias(\"list\")\n .option(\"--fields <value>\", \"Render compact comma-separated catalog fields, for example: alias,installed,install_command\")\n .description(`List bundled first-party ${noun} catalog metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"catalog\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand\n .command(\"adopt\")\n .argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`)\n .option(\"--gh <owner/repo[/path]>\", `GitHub provenance shorthand for adopted ${noun}`)\n .option(\"--github <owner/repo[/path]>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub shorthand source\")\n .description(`Adopt an existing unmanaged ${noun} into managed metadata.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"adopt\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"adopt-all\").description(`Adopt all unmanaged ${plural} into managed metadata.`),\n vocabulary,\n ).action(async (_options: Record<string, unknown>, command) => {\n await executeExtensionCommand(undefined, command.opts() as Record<string, unknown>, command, \"adopt-all\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"activate\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Activate a ${noun} in selected scope settings.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"activate\", vocabulary);\n });\n\n addLifecycleScopeOptions(\n lifecycleCommand.command(\"deactivate\").argument(\"<target>\", `${noun[0]!.toUpperCase()}${noun.slice(1)} name`).description(`Deactivate a ${noun} in selected scope settings.`),\n vocabulary,\n ).action(async (target: string, _options: Record<string, unknown>, command) => {\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"deactivate\", vocabulary);\n });\n}\n\nexport function registerSetupCommands(program: Command): void {\n program\n .command(\"init\")\n .argument(\"[prefix]\", \"Optional id prefix\")\n .option(\"--preset <value>\", \"Governance preset for new setups: minimal|default|strict\")\n .option(\"--defaults\", \"Use non-interactive setup defaults without opening the wizard\")\n .option(\"-y, --yes\", \"Alias for --defaults (non-interactive setup)\")\n .option(\"--author <value>\", \"Set the default mutation author for this project\")\n .option(\"--agent-guidance <mode>\", \"Agent guidance mode: ask|add|skip|status\")\n .option(\"--with-packages\", \"Install all bundled first-party packages during initialization\")\n .option(\"--verbose\", \"Include the full resolved settings tree in the output (default output is a concise summary)\")\n .description(\"Initialize pm storage and defaults for the current workspace.\")\n .action(async (prefix: string | undefined, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runInit, summarizeInitResult } = await import(\"./commands/init.js\");\n const result = await runInit(\n prefix,\n globalOptions,\n {\n preset: typeof options.preset === \"string\" ? options.preset : undefined,\n defaults: options.defaults === true || options.yes === true,\n author: typeof options.author === \"string\" ? options.author : undefined,\n agentGuidance: typeof options.agentGuidance === \"string\" ? options.agentGuidance : undefined,\n withPackages: options.withPackages === true,\n },\n );\n // Default (toon) output is a concise summary to minimize agent token cost.\n // --json consumers and --verbose both receive the full settings tree.\n const verbose = options.verbose === true;\n const emitFullTree = verbose || globalOptions.json === true;\n printResult(emitFullTree ? result : summarizeInitResult(result), globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=init took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"config\")\n .argument(\"[scope]\", \"Config scope: project|global, or action shorthand list|export|get|set for project scope\")\n .argument(\"[action]\", \"Config action: get|set|list|export\")\n .argument(\n \"[key]\",\n \"Config key for get|set: definition-of-done|item-format|history-missing-stream-policy|sprint-release-format-policy|parent-reference-policy|metadata-validation-profile|metadata-required-fields|lifecycle-stale-blocker-reason-patterns|lifecycle-closure-like-blocked-reason-patterns|lifecycle-closure-like-resolution-patterns|lifecycle-closure-like-actual-result-patterns|governance-preset|governance-ownership-enforcement|governance-create-mode-default|governance-close-validation-default|governance-parent-reference-policy|governance-metadata-validation-profile|governance-force-required-for-stale-lock|test-result-tracking|telemetry-tracking|context\",\n )\n .argument(\n \"[value]\",\n \"Optional value for set: routed to the right typed flag by key (e.g. config set telemetry-tracking off, config set item-format toon, config set definition-of-done \\\"Tests pass\\\"). Equivalent to --policy/--format/--criterion. context keys still require --default-depth/--section-* flags.\",\n )\n .option(\n \"--criterion <text>\",\n \"Criteria value for definition-of-done, metadata-required-fields, or lifecycle pattern keys (repeatable for set)\",\n collect,\n )\n .option(\"--clear-criteria\", \"Clear criteria-list keys for config set operations\")\n .option(\"--format <value>\", \"Item format for item-format key: toon\")\n .option(\n \"--policy <value>\",\n \"Policy key values: history-missing-stream-policy=auto_create|strict_error; sprint-release-format-policy=warn|strict_error; parent-reference-policy=warn|strict_error; governance-preset=minimal|default|strict|custom; governance-ownership-enforcement=none|warn|strict; governance-create-mode-default=progressive|strict; governance-close-validation-default=off|warn|strict; governance-parent-reference-policy=warn|strict_error; governance-metadata-validation-profile=core|strict|custom; governance-force-required-for-stale-lock=enabled|disabled; test-result-tracking=enabled|disabled; telemetry-tracking=enabled|disabled\",\n )\n .option(\n \"--value <value>\",\n \"Value for nested leaf settings keys (search_provider, search_mutation_refresh_policy, openai_base_url, ollama_model, vector_store_adapter, qdrant_url, lancedb_path, etc.). Equivalent to the positional value.\",\n )\n .option(\"--default-depth <value>\", \"Context default depth: brief|standard|deep\")\n .option(\"--activity-limit <n>\", \"Context default activity limit\")\n .option(\"--stale-threshold-days <n>\", \"Context staleness cutoff in days\")\n .option(\"--section-hierarchy <value>\", \"Enable/disable context hierarchy section (true|false)\")\n .option(\"--section-activity <value>\", \"Enable/disable context activity section (true|false)\")\n .option(\"--section-progress <value>\", \"Enable/disable context progress section (true|false)\")\n .option(\"--section-blockers <value>\", \"Enable/disable context blockers section (true|false)\")\n .option(\"--section-files <value>\", \"Enable/disable context files section (true|false)\")\n .option(\"--section-workload <value>\", \"Enable/disable context workload section (true|false)\")\n .option(\"--section-staleness <value>\", \"Enable/disable context staleness section (true|false)\")\n .option(\"--section-tests <value>\", \"Enable/disable context tests section (true|false)\")\n .description(\"Read or update pm settings for the current workspace or global profile.\")\n .action(async (scope: string | undefined, action: string | undefined, key: string | undefined, value: string | undefined, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const criteria = Array.isArray(options.criterion) ? (options.criterion as string[]) : [];\n const { runConfig } = await import(\"./commands/config.js\");\n const actionShorthands = new Set([\"get\", \"set\", \"list\", \"export\"]);\n const scopeShorthand = scope !== undefined && actionShorthands.has(scope);\n const resolvedScope = scopeShorthand ? \"project\" : (scope ?? \"project\");\n const resolvedAction = scopeShorthand ? scope : (action ?? \"list\");\n // When scope is an action shorthand, positionals shift left by one:\n // [set] [key] [value] -> action=set, key=key, value=value.\n const resolvedKey = scopeShorthand ? action : key;\n const resolvedValue = scopeShorthand ? key : value;\n const result = await runConfig(\n resolvedScope,\n resolvedAction,\n resolvedKey,\n {\n criterion: criteria,\n format: typeof options.format === \"string\" ? options.format : undefined,\n policy: typeof options.policy === \"string\" ? options.policy : undefined,\n value: typeof options.value === \"string\" ? options.value : undefined,\n clearCriteria: options.clearCriteria === true,\n defaultDepth: typeof options.defaultDepth === \"string\" ? options.defaultDepth : undefined,\n activityLimit: typeof options.activityLimit === \"string\" ? options.activityLimit : undefined,\n staleThresholdDays: typeof options.staleThresholdDays === \"string\" ? options.staleThresholdDays : undefined,\n sectionHierarchy: typeof options.sectionHierarchy === \"string\" ? options.sectionHierarchy : undefined,\n sectionActivity: typeof options.sectionActivity === \"string\" ? options.sectionActivity : undefined,\n sectionProgress: typeof options.sectionProgress === \"string\" ? options.sectionProgress : undefined,\n sectionBlockers: typeof options.sectionBlockers === \"string\" ? options.sectionBlockers : undefined,\n sectionFiles: typeof options.sectionFiles === \"string\" ? options.sectionFiles : undefined,\n sectionWorkload: typeof options.sectionWorkload === \"string\" ? options.sectionWorkload : undefined,\n sectionStaleness: typeof options.sectionStaleness === \"string\" ? options.sectionStaleness : undefined,\n sectionTests: typeof options.sectionTests === \"string\" ? options.sectionTests : undefined,\n },\n globalOptions,\n typeof resolvedValue === \"string\" ? resolvedValue : undefined,\n );\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=config took_ms=${Date.now() - startedAt}`);\n }\n });\n\n registerLifecycleCommand(program, \"extension\");\n registerLifecycleCommand(program, \"package\");\n\n addPackageScopeOptions(\n program\n .command(\"install\")\n .argument(\"[targets...]\", \"Package source (local path, bundled alias, npm: source, wildcard, or GitHub source)\")\n .option(\"--gh <github-source>\", \"Install from GitHub shorthand source (owner/repo[/path])\")\n .option(\"--github <github-source>\", \"Alias for --gh\")\n .option(\"--ref <ref>\", \"Git ref/branch/tag for GitHub install sources\")\n .description(\"Install a pm package into the project package scope by default.\"),\n ).action(async (targets: string[] | undefined, _options: Record<string, unknown>, command) => {\n const target = await normalizeInstallTargets(targets);\n await executeExtensionCommand(target, command.opts() as Record<string, unknown>, command, \"install\", \"package\");\n });\n\n addPackageScopeOptions(\n program\n .command(\"upgrade\")\n .argument(\"[target]\", \"Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages\")\n .option(\"--dry-run\", \"Plan CLI/package upgrades without running npm or reinstalling packages\")\n .option(\"--cli-only\", \"Upgrade only the pm CLI/SDK npm package\")\n .option(\"--packages-only\", \"Upgrade only managed pm packages\")\n .option(\"--repair\", \"Force npm global reinstall when upgrading the pm CLI/SDK\")\n .option(\"--tag <value>\", \"npm dist-tag/version for CLI and registry package upgrades\")\n .option(\"--package-name <value>\", \"Override the CLI package name for self-upgrade testing\")\n .description(\"Upgrade the pm CLI/SDK and refresh managed installable pm packages.\"),\n ).action(async (target: string | undefined, _options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runUpgrade } = await import(\"./commands/upgrade.js\");\n const result = await runUpgrade(target, command.opts() as Record<string, unknown>, globalOptions);\n printResult(result, globalOptions);\n if (!result.ok) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n if (globalOptions.profile) {\n printError(`profile:command=upgrade took_ms=${Date.now() - startedAt}`);\n }\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ;;;;;;;;AA6Bf,SAAS,0BACP,SACA,cACA,aAAyC,aAAW;AAEpD,QAAM,iBAAiB,CAAC,WAA+C,iBAAiB;AACxF,QAAM,cAAc,IAAI,SAA4B,KAAK,KAAK,CAAC,QAAQ,QAAQ,GAAG,MAAM,IAAI;AAC5F,QAAM,aAAa,IAAI,SAAsC;AAC3D,eAAW,OAAO,MAAM;AACtB,UAAI,OAAO,QAAQ,GAAG,MAAM,UAAU;AACpC,eAAO,QAAQ,GAAG;MACpB;IACF;AACA,WAAO;EACT;AACA,SAAO;IACL,MAAM,eAAe,MAAM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AAC3F,UAAM,SAAS,MAAM,wBAAwB,OAAO;AACpD,UAAM,wBAAwB,QAAQ,QAAQ,KAAI,GAA+B,SAAS,WAAW,SAAS;EAChH,CAAC;AAED,yBACE,QACG,QAAQ,SAAS,EACjB,SAAS,YAAY,kGAAkG,EACvH,OAAO,aAAa,wEAAwE,EAC5F,OAAO,cAAc,yCAAyC,EAC9D,OAAO,mBAAmB,kCAAkC,EAC5D,OAAO,YAAY,0DAA0D,EAC7E,OAAO,iBAAiB,4DAA4D,EACpF,OAAO,0BAA0B,wDAAwD,EACzF,YAAY,qEAAqE,CAAC,EACrF,OAAO,OAAO,QAA4B,UAAmC,YAAW;AACxF,UAAM,gBAAgB,iBAAiB,OAAO;AAC9C,UAAM,YAAY,KAAK,IAAG;AAC1B,UAAM,EAAE,WAAU,IAAK,MAAM,OAAO,uBAAuB;AAC3D,UAAM,SAAS,MAAM,WAAW,QAAQ,QAAQ,KAAI,GAA+B,aAAa;AAChG,gBAAY,QAAQ,aAAa;AACjC,QAAI,CAAC,OAAO,IAAI;AACd,cAAQ,WAAW,UAAU;IAC/B;AACA,QAAI,cAAc,SAAS;AACzB,iBAAW,mCAAmC,KAAK,IAAG,IAAK,SAAS,EAAE;IACxE;EACF,CAAC;AACH;",
6
+ "names": []
7
+ }
@@ -0,0 +1,18 @@
1
+ import {
2
+ runRestore
3
+ } from "./chunk-U7FMKRXH.js";
4
+ import "./chunk-O7IWB35H.js";
5
+ import "./chunk-LRBOHPUE.js";
6
+ import "./chunk-JFWUHHS2.js";
7
+ import "./chunk-SEXQN4KL.js";
8
+ import "./chunk-BUPWJ3IJ.js";
9
+ import "./chunk-4AEZR5EJ.js";
10
+ import "./chunk-CEFIVZPG.js";
11
+ import "./chunk-MD7K4JYF.js";
12
+ import "./chunk-WDPXDQFG.js";
13
+ import "./chunk-PVNQLCIS.js";
14
+ import "./chunk-LSXGH6NE.js";
15
+ export {
16
+ runRestore
17
+ };
18
+ //# sourceMappingURL=restore-MB2ISME7.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,119 @@
1
+ import {
2
+ assertAliasesAvailable,
3
+ buildInvalidTypeHint,
4
+ escapeForDoubleQuotes,
5
+ normalizeAddTypeInput,
6
+ parseItemTypesFile,
7
+ serializeItemTypesFile,
8
+ upsertItemType
9
+ } from "./chunk-7Y53ZJIQ.js";
10
+ import {
11
+ acquireLock
12
+ } from "./chunk-4AEZR5EJ.js";
13
+ import {
14
+ nowIso
15
+ } from "./chunk-PVNQLCIS.js";
16
+ import {
17
+ DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
18
+ EXIT_CODE,
19
+ PmCliError,
20
+ filePathForSchemaSection,
21
+ getSettingsPath,
22
+ normalizeRuntimeSchemaSettings,
23
+ pathExists,
24
+ readFileIfExists,
25
+ readSettings,
26
+ resolveGovernanceKnobs,
27
+ resolvePmRoot,
28
+ runActiveOnWriteHooks,
29
+ writeFileAtomic
30
+ } from "./chunk-LSXGH6NE.js";
31
+
32
+ // dist/cli/commands/schema.js
33
+ !(function() {
34
+ try {
35
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
36
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f8c7e792-8750-5f03-b702-a4987d787657");
37
+ } catch (e2) {
38
+ }
39
+ })();
40
+ var SCHEMA_SUBCOMMANDS = ["add-type"];
41
+ var SCHEMA_TYPES_LOCK_ID = "schema-types";
42
+ function toAuthor(candidate, defaultAuthor) {
43
+ const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;
44
+ const trimmed = resolved.trim();
45
+ return trimmed.length > 0 ? trimmed : "unknown";
46
+ }
47
+ async function runSchemaAddType(name, options, global2) {
48
+ const pmRoot = resolvePmRoot(process.cwd(), global2.path);
49
+ if (!await pathExists(getSettingsPath(pmRoot))) {
50
+ throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
51
+ }
52
+ let normalized;
53
+ try {
54
+ normalized = normalizeAddTypeInput({
55
+ name,
56
+ description: options.description,
57
+ defaultStatus: options.defaultStatus,
58
+ folder: options.folder,
59
+ aliases: options.alias
60
+ });
61
+ } catch (error) {
62
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
63
+ }
64
+ const settings = await readSettings(pmRoot);
65
+ const schema = normalizeRuntimeSchemaSettings(settings.schema);
66
+ const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
67
+ const warnings = [];
68
+ const author = toAuthor(options.author, settings.author_default);
69
+ const governance = resolveGovernanceKnobs(settings);
70
+ const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
71
+ let upsert;
72
+ try {
73
+ const previousRaw = await readFileIfExists(typesPath);
74
+ let parsed;
75
+ try {
76
+ parsed = parseItemTypesFile(previousRaw);
77
+ } catch (error) {
78
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
79
+ }
80
+ try {
81
+ assertAliasesAvailable(normalized, parsed);
82
+ } catch (error) {
83
+ throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
84
+ }
85
+ upsert = upsertItemType(parsed, normalized);
86
+ await writeFileAtomic(typesPath, serializeItemTypesFile(upsert.file));
87
+ warnings.push(...await runActiveOnWriteHooks({
88
+ path: typesPath,
89
+ scope: "project",
90
+ op: "schema:add-type"
91
+ }));
92
+ } finally {
93
+ await releaseLock();
94
+ }
95
+ return {
96
+ action: "add-type",
97
+ registered: true,
98
+ replaced: upsert.replaced,
99
+ type: upsert.definition,
100
+ file: {
101
+ path: typesPath,
102
+ definitions: upsert.file.definitions.length
103
+ },
104
+ warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
105
+ generated_at: nowIso()
106
+ };
107
+ }
108
+ function formatSchemaAddTypeHuman(result) {
109
+ const verb = result.replaced ? "Updated" : "Registered";
110
+ const aliasSuffix = result.type.aliases && result.type.aliases.length > 0 ? ` (aliases: ${result.type.aliases.join(", ")})` : "";
111
+ return `${verb} custom item type "${result.type.name}"${aliasSuffix} in ${result.file.path}. Run: pm create "${escapeForDoubleQuotes(result.type.name)}" "<title>"`;
112
+ }
113
+ export {
114
+ SCHEMA_SUBCOMMANDS,
115
+ buildInvalidTypeHint,
116
+ formatSchemaAddTypeHuman,
117
+ runSchemaAddType
118
+ };
119
+ //# sourceMappingURL=schema-Q622KC46.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../cli/commands/schema.ts"],
4
+ "sourcesContent": ["import { pathExists, readFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { acquireLock } from \"../../core/lock/lock.js\";\nimport {\n assertAliasesAvailable,\n buildInvalidTypeHint,\n escapeForDoubleQuotes,\n normalizeAddTypeInput,\n parseItemTypesFile,\n serializeItemTypesFile,\n upsertItemType,\n type ItemTypeDefinition,\n} from \"../../core/schema/item-types-file.js\";\nimport {\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,\n filePathForSchemaSection,\n normalizeRuntimeSchemaSettings,\n} from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings, resolveGovernanceKnobs } from \"../../core/store/settings.js\";\n\nexport const SCHEMA_SUBCOMMANDS = [\"add-type\"] as const;\nexport type SchemaSubcommand = (typeof SCHEMA_SUBCOMMANDS)[number];\n\nconst SCHEMA_TYPES_LOCK_ID = \"schema-types\";\n\nexport interface SchemaAddTypeCommandOptions {\n description?: string;\n defaultStatus?: string;\n folder?: string;\n alias?: string[];\n author?: string;\n force?: boolean;\n}\n\nexport interface SchemaAddTypeResult {\n action: \"add-type\";\n registered: boolean;\n replaced: boolean;\n type: ItemTypeDefinition;\n file: {\n path: string;\n definitions: number;\n };\n warnings: string[];\n generated_at: string;\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed.length > 0 ? trimmed : \"unknown\";\n}\n\nexport async function runSchemaAddType(\n name: string | undefined,\n options: SchemaAddTypeCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaAddTypeResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n let normalized;\n try {\n normalized = normalizeAddTypeInput({\n name,\n description: options.description,\n defaultStatus: options.defaultStatus,\n folder: options.folder,\n aliases: options.alias,\n });\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_TYPES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n );\n let upsert;\n try {\n const previousRaw = await readFileIfExists(typesPath);\n let parsed;\n try {\n parsed = parseItemTypesFile(previousRaw);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);\n }\n try {\n assertAliasesAvailable(normalized, parsed);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n upsert = upsertItemType(parsed, normalized);\n // writeFileAtomic writes to a temp file then renames, so a failure leaves the\n // existing types.json untouched; no manual rollback is needed.\n await writeFileAtomic(typesPath, serializeItemTypesFile(upsert.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"schema:add-type\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"add-type\",\n registered: true,\n replaced: upsert.replaced,\n type: upsert.definition,\n file: {\n path: typesPath,\n definitions: upsert.file.definitions.length,\n },\n warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),\n generated_at: nowIso(),\n };\n}\n\nexport function formatSchemaAddTypeHuman(result: SchemaAddTypeResult): string {\n const verb = result.replaced ? \"Updated\" : \"Registered\";\n const aliasSuffix =\n result.type.aliases && result.type.aliases.length > 0 ? ` (aliases: ${result.type.aliases.join(\", \")})` : \"\";\n return `${verb} custom item type \"${result.type.name}\"${aliasSuffix} in ${result.file.path}. Run: pm create \"${escapeForDoubleQuotes(result.type.name)}\" \"<title>\"`;\n}\n\n/**\n * Re-export so register-mutation can surface the hint in usage examples\n * without importing the core module directly.\n */\nexport { buildInvalidTypeHint };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBO,IAAM,qBAAqB,CAAC,UAAU;AAG7C,IAAM,uBAAuB;AAwB7B,SAAS,SAAS,WAA+B,eAAqB;AACpE,QAAM,WAAW,aAAa,QAAQ,IAAI,aAAa;AACvD,QAAM,UAAU,SAAS,KAAI;AAC7B,SAAO,QAAQ,SAAS,IAAI,UAAU;AACxC;AAE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