@unbrained/pm-cli 2026.11.20 → 2026.11.22

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 (265) hide show
  1. package/.agents/skills/pm-developer/SKILL.md +1 -1
  2. package/.agents/skills/pm-sdk/SKILL.md +1 -1
  3. package/.agents/skills/pm-test-audit/SKILL.md +1 -1
  4. package/.claude-plugin/marketplace.json +1 -1
  5. package/CONTRIBUTING.md +2 -1
  6. package/dist/cli/error-guidance.js +2 -2
  7. package/dist/cli/register-history-maintenance.js +2 -2
  8. package/dist/cli/register-list-query.js +2 -2
  9. package/dist/cli/runtime/refusal-credential-redaction.js +1 -1
  10. package/dist/cli-bundle/bundle-manifest.json +1 -1
  11. package/dist/cli-bundle/chunks/chunk-3W47ZZ5T.js +9 -0
  12. package/dist/cli-bundle/chunks/chunk-4TB5D6HL.js +125 -0
  13. package/dist/cli-bundle/chunks/{chunk-4TZW4NLM.js → chunk-5ZMVLWE3.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-6BBDEIKC.js +33 -0
  15. package/dist/cli-bundle/chunks/{chunk-GXGW6KHB.js → chunk-AR4NP5HI.js} +2 -2
  16. package/dist/cli-bundle/chunks/{chunk-6X2AGUOT.js → chunk-B4PPFOPY.js} +3 -3
  17. package/dist/cli-bundle/chunks/{chunk-XK25TAJZ.js → chunk-B76TFRO2.js} +47 -45
  18. package/dist/cli-bundle/chunks/chunk-CAR2L5NW.js +8 -0
  19. package/dist/cli-bundle/chunks/{chunk-KDDIHGAO.js → chunk-EIGUKEV6.js} +2 -2
  20. package/dist/cli-bundle/chunks/{chunk-ZAO7VGX3.js → chunk-GTPCAJMZ.js} +2 -2
  21. package/dist/cli-bundle/chunks/chunk-GYP24M7W.js +2 -0
  22. package/dist/cli-bundle/chunks/{chunk-KQSPKWFH.js → chunk-HC2OPETM.js} +2 -2
  23. package/dist/cli-bundle/chunks/{chunk-5LF5QZT3.js → chunk-HKUV74K3.js} +2 -2
  24. package/dist/cli-bundle/chunks/chunk-HXHYDO2R.js +115 -0
  25. package/dist/cli-bundle/chunks/{chunk-FF4TXJDH.js → chunk-J2LABXBL.js} +2 -2
  26. package/dist/cli-bundle/chunks/{chunk-3BOR22MC.js → chunk-J52BEBSS.js} +2 -2
  27. package/dist/cli-bundle/chunks/chunk-KQIZ34SF.js +3 -0
  28. package/dist/cli-bundle/chunks/chunk-LQBWLNZJ.js +3 -0
  29. package/dist/cli-bundle/chunks/chunk-OJTMGDON.js +31 -0
  30. package/dist/cli-bundle/chunks/{chunk-DG2EOOFX.js → chunk-TC6XLIYO.js} +2 -2
  31. package/dist/cli-bundle/chunks/{chunk-MGYAJONE.js → chunk-U7EL3AYA.js} +2 -2
  32. package/dist/cli-bundle/chunks/chunk-VQFWW4EF.js +6 -0
  33. package/dist/cli-bundle/chunks/{chunk-ZVEHACE6.js → chunk-X6MIWTTT.js} +2 -2
  34. package/dist/cli-bundle/chunks/chunk-XC5Q2ZV7.js +2 -0
  35. package/dist/cli-bundle/chunks/{chunk-KEBLUTC3.js → chunk-XFHPKXAE.js} +2 -2
  36. package/dist/cli-bundle/chunks/{chunk-OXG5XPC7.js → chunk-YHVLVSEZ.js} +2 -2
  37. package/dist/cli-bundle/chunks/{chunk-Y4LXVPA5.js → chunk-YMUSRWV4.js} +2 -2
  38. package/dist/cli-bundle/chunks/{chunk-HQYIKAC6.js → chunk-YR2KEBHP.js} +2 -2
  39. package/dist/cli-bundle/chunks/{indexed-receipt-blobs-ELEMA7IW.js → indexed-receipt-blobs-ITTXIN4K.js} +2 -2
  40. package/dist/cli-bundle/chunks/{item-revision-GE2CQECR.js → item-revision-4QBMZXKX.js} +2 -2
  41. package/dist/cli-bundle/chunks/item-transaction-QY3PUHEI.js +2 -0
  42. package/dist/cli-bundle/chunks/{mutation-actor-5GYX7LP3.js → mutation-actor-FWLYWJ37.js} +2 -2
  43. package/dist/cli-bundle/chunks/{mutation-admission-72TYKPGU.js → mutation-admission-7ZDCK3G2.js} +2 -2
  44. package/dist/cli-bundle/chunks/{register-list-query-OQZZEWEB.js → register-list-query-RR5KACJ3.js} +10 -10
  45. package/dist/cli-bundle/chunks/{register-mutation-YZEUZ6XT.js → register-mutation-57AJQWFV.js} +2 -2
  46. package/dist/cli-bundle/chunks/{register-operations-JNVCF7EW.js → register-operations-RKWST7CU.js} +2 -2
  47. package/dist/cli-bundle/chunks/{register-setup-LDKULZSD.js → register-setup-CMI23PC5.js} +2 -2
  48. package/dist/cli-bundle/chunks/{settlement-hook-E5LHZ4RD.js → settlement-hook-BXN5LEQD.js} +2 -2
  49. package/dist/cli-bundle/chunks/{stage-Q2QZ2IBG.js → stage-4KDVXC5Z.js} +2 -2
  50. package/dist/cli-bundle/focused-chunks/{chunk-JUYJ7NXL.js → chunk-2ZD7275J.js} +2 -2
  51. package/dist/cli-bundle/focused-chunks/{chunk-7SB6VKEI.js → chunk-324AHXJO.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-IXYBN6D2.js → chunk-3IRCYJI5.js} +3 -3
  53. package/dist/cli-bundle/focused-chunks/{chunk-DH4DHL6V.js → chunk-3V53UBHN.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/chunk-3XSWH6QC.js +91 -0
  55. package/dist/cli-bundle/focused-chunks/{chunk-V55XZFOP.js → chunk-4JZITIJB.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/chunk-4KTFKSS3.js +2 -0
  57. package/dist/cli-bundle/focused-chunks/chunk-5C5TK3ET.js +78 -0
  58. package/dist/cli-bundle/focused-chunks/chunk-AKJYOZZP.js +2 -0
  59. package/dist/cli-bundle/focused-chunks/{chunk-BZCLW5V7.js → chunk-BRZV7BFV.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/chunk-CR7CGEB2.js +3 -0
  61. package/dist/cli-bundle/focused-chunks/{chunk-PKMDWIP3.js → chunk-HDEKFSOK.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{chunk-O25KFLLA.js → chunk-IWOXAUDU.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/{chunk-UATP3RK3.js → chunk-ML3JHCC6.js} +2 -2
  64. package/dist/cli-bundle/focused-chunks/{chunk-ZKGGGU2K.js → chunk-OPGOOP25.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{chunk-PRFEOCNZ.js → chunk-RE7ZWT7D.js} +3 -3
  66. package/dist/cli-bundle/focused-chunks/chunk-RKQNVYGF.js +3 -0
  67. package/dist/cli-bundle/focused-chunks/chunk-RQ252B6V.js +8 -0
  68. package/dist/cli-bundle/focused-chunks/{chunk-KQJNJZKP.js → chunk-URGHTTT3.js} +2 -2
  69. package/dist/cli-bundle/focused-chunks/chunk-USPYKWQG.js +13 -0
  70. package/dist/cli-bundle/focused-chunks/chunk-UWS3FC4D.js +102 -0
  71. package/dist/cli-bundle/focused-chunks/chunk-UXQGFGAT.js +44 -0
  72. package/dist/cli-bundle/focused-chunks/{chunk-PQXTZLK3.js → chunk-WZWXGDYY.js} +2 -2
  73. package/dist/cli-bundle/focused-chunks/{chunk-5VSXKA35.js → chunk-YKSLZPLT.js} +2 -2
  74. package/dist/cli-bundle/focused-chunks/chunk-ZWJTY4ID.js +2 -0
  75. package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-ZTRFCPH7.js → indexed-receipt-blobs-AF4U3F3D.js} +2 -2
  76. package/dist/cli-bundle/focused-chunks/{item-revision-OXDZHMJ7.js → item-revision-2O6MLPEX.js} +2 -2
  77. package/dist/cli-bundle/focused-chunks/item-transaction-GLACUTPL.js +2 -0
  78. package/dist/cli-bundle/focused-chunks/{mutation-actor-6DYIF6NH.js → mutation-actor-TCYDPUGG.js} +2 -2
  79. package/dist/cli-bundle/focused-chunks/{mutation-admission-2BYXANVJ.js → mutation-admission-LY73EJWM.js} +2 -2
  80. package/dist/cli-bundle/focused-chunks/{settlement-hook-OUBUN45C.js → settlement-hook-ARYCZQY4.js} +2 -2
  81. package/dist/cli-bundle/focused-chunks/{stage-FGHSB3QX.js → stage-DQ7RQQ52.js} +2 -2
  82. package/dist/cli-bundle/main.js +25 -25
  83. package/dist/cli-bundle/sdk-authoring.js +1 -1
  84. package/dist/cli-bundle/sdk-contracts.js +2 -2
  85. package/dist/cli-bundle/sdk-core.js +1 -1
  86. package/dist/cli-bundle/sdk-governance.js +1 -1
  87. package/dist/cli-bundle/sdk-graph.js +1 -1
  88. package/dist/cli-bundle/sdk-merge.js +70 -57
  89. package/dist/cli-bundle/sdk-query.js +1 -1
  90. package/dist/cli-bundle/sdk-runtime.js +1 -1
  91. package/dist/cli-bundle/sdk-testing.js +1 -1
  92. package/dist/cli-bundle/sdk.js +11 -11
  93. package/dist/core/diagnostics/remediation.js +1 -1
  94. package/dist/core/extensions/index.d.ts +2 -0
  95. package/dist/core/extensions/index.js +1 -1
  96. package/dist/core/fs/atomic-create.js +1 -1
  97. package/dist/core/fs/file-glob.js +1 -1
  98. package/dist/core/fs/fs-utils.d.ts +3 -1
  99. package/dist/core/fs/fs-utils.js +1 -1
  100. package/dist/core/history/bridge.js +2 -0
  101. package/dist/core/history/drift-scan.js +1 -1
  102. package/dist/core/history/history-rewrite.js +1 -1
  103. package/dist/core/history/history-stream-policy.js +1 -1
  104. package/dist/core/history/history.d.ts +12 -0
  105. package/dist/core/history/history.js +2 -2
  106. package/dist/core/history/projection.js +1 -1
  107. package/dist/core/history/read.d.ts +20 -1
  108. package/dist/core/history/read.js +1 -1
  109. package/dist/core/history/replay.d.ts +46 -5
  110. package/dist/core/history/replay.js +2 -2
  111. package/dist/core/history/stream-summary.d.ts +129 -0
  112. package/dist/core/history/stream-summary.js +3 -0
  113. package/dist/core/shared/errors.d.ts +8 -0
  114. package/dist/core/shared/errors.js +1 -1
  115. package/dist/core/shared/url-credentials.js +1 -1
  116. package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
  117. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
  118. package/dist/sdk/cli-contracts/registration-helpers.js +2 -2
  119. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
  120. package/dist/sdk/cli-contracts/tool-schema.js +1 -1
  121. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +2 -2
  122. package/dist/sdk/completion/fish.js +3 -2
  123. package/dist/sdk/completion/zsh.js +3 -2
  124. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  125. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  126. package/dist/sdk/governance/gc.js +1 -1
  127. package/dist/sdk/governance/health/history-drift-remedies.js +2 -0
  128. package/dist/sdk/governance/health-merge-evidence.js +1 -1
  129. package/dist/sdk/governance/health.js +2 -2
  130. package/dist/sdk/governance/validate.js +1 -1
  131. package/dist/sdk/governance/workspace-position.js +1 -1
  132. package/dist/sdk/history/append-only-repair.d.ts +30 -0
  133. package/dist/sdk/history/append-only-repair.js +6 -0
  134. package/dist/sdk/history/maintenance.d.ts +8 -2
  135. package/dist/sdk/history/maintenance.js +1 -1
  136. package/dist/sdk/history/reanchor-refusal.js +2 -0
  137. package/dist/sdk/history/reseed.d.ts +15 -0
  138. package/dist/sdk/history/reseed.js +2 -0
  139. package/dist/sdk/history/salvage.d.ts +19 -8
  140. package/dist/sdk/history/salvage.js +5 -3
  141. package/dist/sdk/history-compact.js +1 -1
  142. package/dist/sdk/history-provenance.js +1 -1
  143. package/dist/sdk/history-redact.js +1 -1
  144. package/dist/sdk/history-repair.d.ts +8 -2
  145. package/dist/sdk/history-repair.js +1 -1
  146. package/dist/sdk/index.d.ts +1 -1
  147. package/dist/sdk/item-transaction.d.ts +33 -1
  148. package/dist/sdk/item-transaction.js +1 -1
  149. package/dist/sdk/lifecycle/restore.js +1 -1
  150. package/dist/sdk/merge/index.d.ts +1 -1
  151. package/dist/sdk/merge/index.js +1 -1
  152. package/dist/sdk/merge/install.d.ts +20 -6
  153. package/dist/sdk/merge/install.js +3 -3
  154. package/dist/sdk/merge/three-way.d.ts +22 -3
  155. package/dist/sdk/merge/three-way.js +8 -2
  156. package/dist/sdk/merge/worktree-config.js +2 -1
  157. package/dist/sdk/public-surface.json +1 -1
  158. package/dist/sdk/query/activity.d.ts +67 -5
  159. package/dist/sdk/query/activity.js +1 -1
  160. package/dist/sdk/query/context.d.ts +13 -3
  161. package/dist/sdk/query/context.js +2 -2
  162. package/dist/sdk/query.d.ts +1 -1
  163. package/dist/sdk/runtime/actions.js +1 -1
  164. package/dist/sdk/runtime-input.d.ts +6 -2
  165. package/dist/sdk/runtime-input.js +1 -1
  166. package/dist/sdk/runtime-primitives.d.ts +1 -1
  167. package/dist/sdk/runtime-primitives.js +1 -1
  168. package/dist/sdk/runtime.d.ts +7 -0
  169. package/dist/sdk/runtime.js +1 -1
  170. package/dist/sdk/structured-mutations.d.ts +5 -5
  171. package/dist/sdk/structured-mutations.js +1 -1
  172. package/dist/sdk/transactions/item-finalization.js +2 -0
  173. package/dist/types.d.ts +20 -0
  174. package/dist/types.js +1 -1
  175. package/docs/AGENT_GUIDE.md +1 -1
  176. package/docs/AGENT_RUNTIME_PRIMITIVES.md +1 -1
  177. package/docs/COMMANDS.md +62 -4
  178. package/docs/HISTORY_RECOVERY.md +229 -5
  179. package/docs/MERGE_SAFETY.md +8 -0
  180. package/docs/MUTATION_INTEGRITY.md +3 -1
  181. package/docs/README.md +8 -6
  182. package/docs/SDK.md +128 -5
  183. package/docs/SDK_CONTEXT_COORDINATION.md +3 -2
  184. package/docs/TESTING.md +8 -697
  185. package/docs/WORKSPACE_POSITION_AND_LIFECYCLE.md +1 -1
  186. package/marketplace.json +1 -1
  187. package/node_modules/tar/package.json +2 -3
  188. package/package.json +35 -3
  189. package/packages/pm-beads/package.json +1 -1
  190. package/packages/pm-calendar/package.json +1 -1
  191. package/packages/pm-command-kit/package.json +1 -1
  192. package/packages/pm-digital-twin/package.json +1 -1
  193. package/packages/pm-governance-audit/package.json +1 -1
  194. package/packages/pm-guide-shell/package.json +1 -1
  195. package/packages/pm-kanban/package.json +1 -1
  196. package/packages/pm-lifecycle-hooks/package.json +1 -1
  197. package/packages/pm-linked-test-adapters/package.json +1 -1
  198. package/packages/pm-search-advanced/package.json +1 -1
  199. package/packages/pm-templates/package.json +1 -1
  200. package/packages/pm-todos/package.json +1 -1
  201. package/packages/pm-vcs/package.json +1 -1
  202. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  203. package/plugins/pm-claude/package.json +1 -1
  204. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  205. package/plugins/pm-codex/package.json +1 -1
  206. package/plugins/pm-codex/plugin.json +1 -1
  207. package/runtime-dependencies.json +1 -1
  208. package/dist/cli-bundle/chunks/chunk-2IZGNOGT.js +0 -6
  209. package/dist/cli-bundle/chunks/chunk-4QQPM3IY.js +0 -2
  210. package/dist/cli-bundle/chunks/chunk-5OFMWP3Q.js +0 -3
  211. package/dist/cli-bundle/chunks/chunk-6HRPGEBF.js +0 -2
  212. package/dist/cli-bundle/chunks/chunk-7ESF676D.js +0 -125
  213. package/dist/cli-bundle/chunks/chunk-7EZZ4W7O.js +0 -20
  214. package/dist/cli-bundle/chunks/chunk-FOYRE23V.js +0 -115
  215. package/dist/cli-bundle/chunks/chunk-HJQ3XPS3.js +0 -31
  216. package/dist/cli-bundle/chunks/chunk-M5D3CEMY.js +0 -9
  217. package/dist/cli-bundle/chunks/chunk-VS565KBX.js +0 -2
  218. package/dist/cli-bundle/chunks/chunk-W4TLA5H3.js +0 -8
  219. package/dist/cli-bundle/chunks/item-transaction-YSAWJRA2.js +0 -2
  220. package/dist/cli-bundle/focused-chunks/chunk-3LRSQXCN.js +0 -2
  221. package/dist/cli-bundle/focused-chunks/chunk-FOA7XKWP.js +0 -2
  222. package/dist/cli-bundle/focused-chunks/chunk-FPKVHC3Q.js +0 -2
  223. package/dist/cli-bundle/focused-chunks/chunk-I7XBR2RM.js +0 -91
  224. package/dist/cli-bundle/focused-chunks/chunk-MJP3TFVW.js +0 -2
  225. package/dist/cli-bundle/focused-chunks/chunk-PZSTRYTA.js +0 -102
  226. package/dist/cli-bundle/focused-chunks/chunk-QNJQPJWO.js +0 -44
  227. package/dist/cli-bundle/focused-chunks/chunk-SIPDQBJI.js +0 -8
  228. package/dist/cli-bundle/focused-chunks/chunk-SJE3PYPI.js +0 -3
  229. package/dist/cli-bundle/focused-chunks/chunk-TNKI6WKG.js +0 -66
  230. package/dist/cli-bundle/focused-chunks/chunk-TRCXANRR.js +0 -12
  231. package/dist/cli-bundle/focused-chunks/item-transaction-54VSTT6L.js +0 -2
  232. package/dist/sdk/agent/refusal-closure.js +0 -2
  233. package/dist/sdk/agent/refusal-reachability.js +0 -4
  234. package/dist/sdk/agent/task-transcript-contracts.js +0 -2
  235. package/dist/sdk/agent/tracker-preflight-contracts.js +0 -2
  236. package/dist/sdk/authoring.js +0 -2
  237. package/dist/sdk/compose.js +0 -2
  238. package/dist/sdk/contracts.js +0 -2
  239. package/dist/sdk/core-governance.js +0 -2
  240. package/dist/sdk/core.js +0 -2
  241. package/dist/sdk/corpus-shape.js +0 -2
  242. package/dist/sdk/define.js +0 -2
  243. package/dist/sdk/environment/agent-environment.js +0 -2
  244. package/dist/sdk/governance/artifact-ledgers.js +0 -2
  245. package/dist/sdk/governance/coverage-assurance.js +0 -2
  246. package/dist/sdk/governance/reliability.js +0 -2
  247. package/dist/sdk/governance.js +0 -2
  248. package/dist/sdk/graph/adapter.js +0 -2
  249. package/dist/sdk/graph/conformance.js +0 -2
  250. package/dist/sdk/graph/index.js +0 -2
  251. package/dist/sdk/graph.js +0 -2
  252. package/dist/sdk/index.js +0 -2
  253. package/dist/sdk/query.js +0 -2
  254. package/dist/sdk/relationship-migration.js +0 -2
  255. package/dist/sdk/testing.js +0 -8
  256. package/dist/sdk/workspace-recipe.js +0 -2
  257. package/docs/AGENT_PROVENANCE_ADR.md +0 -206
  258. package/docs/DEFECT_RECURRENCE.md +0 -257
  259. package/docs/MCP_2026_07_28_CONFORMANCE.md +0 -41
  260. package/docs/PERFORMANCE.md +0 -189
  261. package/docs/QUALITY_EVIDENCE.md +0 -130
  262. package/docs/generated/FLAG_LEXICON_BUDGETS.md +0 -117
  263. package/docs/performance/cli-transport-overhead.md +0 -51
  264. package/docs/performance/runner-qualification.md +0 -36
  265. package/docs/performance/sdk-entrypoint-import-costs.md +0 -32
@@ -1,2 +1,2 @@
1
- import{l as T,m as F,n as O}from"./chunk-XK25TAJZ.js";import{m as S,n as I}from"./chunk-HJQ3XPS3.js";import{Cc as p,Gc as s,Hc as u,Xc as y}from"./chunk-M5D3CEMY.js";import{$g as A,ah as _,lb as c}from"./chunk-FOYRE23V.js";import{A as f,C as m}from"./chunk-5OFMWP3Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e2514244-d31d-5ee4-b037-b9101f9a24e1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10a4ed4d-39d3-5b7b-87b1-4a6f95f0f2ab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="796e71dc-4693-50da-bbb8-57b19ff0af95")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9aa4d7a-f8f4-5c1a-a372-83ccb55c5668")}catch{}})();function g(e,n,t,i){if(n.trim().toLowerCase()!=="add"||!t?.trim())return;let o=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),d=[e,t.trim()];o!==void 0?d.push("--add",o):i.stdin===!0?d.push("--stdin"):r!==void 0?d.push("--file",r):d.push("--add","-");let a=c(d),l=c([e,t.trim(),"--add","-"]);throw new m(`The positional token "add" was parsed as the item id, while "${t.trim()}" was parsed as annotation text. ${e} does not use an add subcommand.`,f.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${e}, then use --add for annotation text.`,examples:[...new Set([a,l])],recovery:{attempted_command:`pm ${e} add ${t.trim()}`,normalized_args:[e,"add",t.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:t.trim()}],suggested_retry:a}})}var D={comments:["add","text","body","comment"],notes:["add","text","note"],learnings:["add","text"]};function N(e,n,t,i,o){let r=D[e].some(a=>`--${a}`!==n&&s(o,a)!==void 0),d=o.delete!==void 0||o.edit!==void 0&&o.ifAbsent===!0;if(!(r||d||o.stdin===!0||s(o,"file")!==void 0||s(o,"addJson")!==void 0)){if(t==="--file")return i===void 0?void 0:["--file",i];if(t==="--stdin"||t.startsWith("--file="))return i===void 0?[t]:void 0}}function h(e,n,t,i){let o=D[e].map(a=>({flag:`--${a}`,value:s(i,a)?.trim()})).find(a=>a.value!==void 0&&S(a.value));if(o===void 0)return;let r=[e,n,...typeof i.edit=="number"?["--edit",String(i.edit)]:[]],d=N(e,o.flag,o.value,t,i);throw I({collectionKey:e,textFlag:o.flag,value:o.value,commandPrefix:c(r),...d===void 0?{}:{retryArgs:[...r,...d]},...d===void 0&&t!==void 0&&o.value!=="--file"?{conflictingOperand:t}:{}})}function R(e,n,t){let i=t.flatMap(o=>{let r=s(n,o);return r===void 0?[]:[{alias:o,value:r}]});if([...new Set(i.map(({value:o})=>o))].length>1)throw new m(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:o})=>`--${o}`).join(", ")}`,f.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function C(e,n){let t=typeof n.edit=="number"?n.edit:void 0,i=typeof n.delete=="number"?n.delete:void 0,o=R("comment",n,["add","text","body","comment"]),r=typeof e=="string"?e:void 0,d=n.stdin===!0,a=s(n,"file");if(+(o!==void 0)+ +(r!==void 0)+Number(d)+ +(a!==void 0)>1)throw o!==void 0&&r!==void 0&&!d&&a===void 0?new m("Specify comment text either as positional [text] or with --add, not both",f.USAGE):new m("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",f.USAGE);let l=o??r;return{add:l,readFromStdin:d,readFromFile:a,editIndex:t,deleteIndex:i,isMutation:typeof l=="string"||d||a!==void 0||t!==void 0||i!==void 0}}function E(e,n,t){let i=R(e,t,e==="note"?["add","text","note"]:["add","text"]),o=typeof n=="string"?n:void 0;if(i!==void 0&&o!==void 0)throw new m(`Specify ${e} text either as positional [text] or with --add, not both`,f.USAGE);let r=i??o,d=e==="note"?s(t,"addJson"):void 0,a=t.stdin===!0,l=s(t,"file"),x=typeof t.edit=="number"?t.edit:void 0,w=typeof t.delete=="number"?t.delete:void 0;return{add:r,addJson:d,readFromStdin:a,readFromFile:l,editIndex:x,deleteIndex:w,isMutation:typeof r=="string"||d!==void 0||a||l!==void 0||x!==void 0||w!==void 0}}var $=new Set(["comments","notes","learnings"]);function Y(e,n){let t=n[1];return $.has(e)&&typeof t=="string"?{add:t}:{}}function b(e){return{fullHistory:e.fullHistory===!0,ifAbsent:e.ifAbsent===!0,expectAt:s(e,"expectAt"),author:s(e,"author"),message:s(e,"message"),ownershipAppendBypass:e.ownershipAppendBypass===!0,force:!!e.force}}async function k(e,n,t,i){let o=p(i),r=Date.now();g("comments",e,n,t),h("comments",e,n,t);let d=C(n,t),a=await T(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("comments",a,o,r)}async function H(e,n,t,i){let o=p(i),r=Date.now();g("notes",e,n,t),h("notes",e,n,t);let d=E("note",n,t),a=await O(e,{add:d.add,addJson:d.addJson,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),since:s(t,"since"),eventType:s(t,"eventType"),includeMeta:t.includeMeta===!0,...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("notes",a,o,r)}async function J(e,n,t,i){let o=p(i),r=Date.now();g("learnings",e,n,t),h("learnings",e,n,t);let d=E("learning",n,t),a=await F(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("learnings",a,o,r)}function v(e,n,t,i){A(n,t),t.profile&&_(`profile:command=${e} took_ms=${Date.now()-i}`)}function Z(e,n){let t=e.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(k);u(t,"--body <text>","Alias for --add",!1),u(t,"--text <text>","Alias for --add",!1),u(t,"--comment <text>","Alias for --add",!1);let i=e.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",n("--edit")).option("--delete <index>","Delete the note at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(H);u(i,"--text <text>","Alias for --add",!1);let o=e.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(J);u(o,"--text <text>","Alias for --add",!1)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="be983589-7a52-5022-b7b8-62d31572c012")}catch{}})();var M=[];function te(e){M=e.flatMap(n=>n.reason==="bare_key_value"&&typeof n.from=="string"&&Array.isArray(n.to)&&typeof n.to[0]=="string"?[{from:n.from,flag:n.to[0].split("=")[0]}]:[])}function ne(){return M}export{Y as a,Z as b,te as c,ne as d};
2
- //# sourceMappingURL=chunk-FF4TXJDH.js.map
1
+ import{l as T,m as F,n as O}from"./chunk-B76TFRO2.js";import{m as S,n as I}from"./chunk-OJTMGDON.js";import{Cc as p,Gc as s,Hc as u,Xc as y}from"./chunk-3W47ZZ5T.js";import{lb as c,lh as A,mh as _}from"./chunk-HXHYDO2R.js";import{A as f,C as m}from"./chunk-KQIZ34SF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e2514244-d31d-5ee4-b037-b9101f9a24e1")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="10a4ed4d-39d3-5b7b-87b1-4a6f95f0f2ab")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="796e71dc-4693-50da-bbb8-57b19ff0af95")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9aa4d7a-f8f4-5c1a-a372-83ccb55c5668")}catch{}})();function g(e,n,t,i){if(n.trim().toLowerCase()!=="add"||!t?.trim())return;let o=s(i,"add")??s(i,"text")??s(i,"note")??s(i,"body")??s(i,"comment"),r=s(i,"file"),d=[e,t.trim()];o!==void 0?d.push("--add",o):i.stdin===!0?d.push("--stdin"):r!==void 0?d.push("--file",r):d.push("--add","-");let a=c(d),l=c([e,t.trim(),"--add","-"]);throw new m(`The positional token "add" was parsed as the item id, while "${t.trim()}" was parsed as annotation text. ${e} does not use an add subcommand.`,f.USAGE,{code:"annotation_transposed_subcommand",reason:"noun_verb_object_transposition",required:`Place the item id immediately after ${e}, then use --add for annotation text.`,examples:[...new Set([a,l])],recovery:{attempted_command:`pm ${e} add ${t.trim()}`,normalized_args:[e,"add",t.trim()],parsed_positionals:[{role:"transposed_subcommand",value:"add"},{role:"item_id",value:t.trim()}],suggested_retry:a}})}var D={comments:["add","text","body","comment"],notes:["add","text","note"],learnings:["add","text"]};function N(e,n,t,i,o){let r=D[e].some(a=>`--${a}`!==n&&s(o,a)!==void 0),d=o.delete!==void 0||o.edit!==void 0&&o.ifAbsent===!0;if(!(r||d||o.stdin===!0||s(o,"file")!==void 0||s(o,"addJson")!==void 0)){if(t==="--file")return i===void 0?void 0:["--file",i];if(t==="--stdin"||t.startsWith("--file="))return i===void 0?[t]:void 0}}function h(e,n,t,i){let o=D[e].map(a=>({flag:`--${a}`,value:s(i,a)?.trim()})).find(a=>a.value!==void 0&&S(a.value));if(o===void 0)return;let r=[e,n,...typeof i.edit=="number"?["--edit",String(i.edit)]:[]],d=N(e,o.flag,o.value,t,i);throw I({collectionKey:e,textFlag:o.flag,value:o.value,commandPrefix:c(r),...d===void 0?{}:{retryArgs:[...r,...d]},...d===void 0&&t!==void 0&&o.value!=="--file"?{conflictingOperand:t}:{}})}function R(e,n,t){let i=t.flatMap(o=>{let r=s(n,o);return r===void 0?[]:[{alias:o,value:r}]});if([...new Set(i.map(({value:o})=>o))].length>1)throw new m(`Specify ${e} text with one alias or the same value across aliases: ${i.map(({alias:o})=>`--${o}`).join(", ")}`,f.USAGE,{code:"annotation_alias_conflict"});return i[0]?.value}function C(e,n){let t=typeof n.edit=="number"?n.edit:void 0,i=typeof n.delete=="number"?n.delete:void 0,o=R("comment",n,["add","text","body","comment"]),r=typeof e=="string"?e:void 0,d=n.stdin===!0,a=s(n,"file");if(+(o!==void 0)+ +(r!==void 0)+Number(d)+ +(a!==void 0)>1)throw o!==void 0&&r!==void 0&&!d&&a===void 0?new m("Specify comment text either as positional [text] or with --add, not both",f.USAGE):new m("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file",f.USAGE);let l=o??r;return{add:l,readFromStdin:d,readFromFile:a,editIndex:t,deleteIndex:i,isMutation:typeof l=="string"||d||a!==void 0||t!==void 0||i!==void 0}}function E(e,n,t){let i=R(e,t,e==="note"?["add","text","note"]:["add","text"]),o=typeof n=="string"?n:void 0;if(i!==void 0&&o!==void 0)throw new m(`Specify ${e} text either as positional [text] or with --add, not both`,f.USAGE);let r=i??o,d=e==="note"?s(t,"addJson"):void 0,a=t.stdin===!0,l=s(t,"file"),x=typeof t.edit=="number"?t.edit:void 0,w=typeof t.delete=="number"?t.delete:void 0;return{add:r,addJson:d,readFromStdin:a,readFromFile:l,editIndex:x,deleteIndex:w,isMutation:typeof r=="string"||d!==void 0||a||l!==void 0||x!==void 0||w!==void 0}}var $=new Set(["comments","notes","learnings"]);function Y(e,n){let t=n[1];return $.has(e)&&typeof t=="string"?{add:t}:{}}function b(e){return{fullHistory:e.fullHistory===!0,ifAbsent:e.ifAbsent===!0,expectAt:s(e,"expectAt"),author:s(e,"author"),message:s(e,"message"),ownershipAppendBypass:e.ownershipAppendBypass===!0,force:!!e.force}}async function k(e,n,t,i){let o=p(i),r=Date.now();g("comments",e,n,t),h("comments",e,n,t);let d=C(n,t),a=await T(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("comments",a,o,r)}async function H(e,n,t,i){let o=p(i),r=Date.now();g("notes",e,n,t),h("notes",e,n,t);let d=E("note",n,t),a=await O(e,{add:d.add,addJson:d.addJson,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),since:s(t,"since"),eventType:s(t,"eventType"),includeMeta:t.includeMeta===!0,...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("notes",a,o,r)}async function J(e,n,t,i){let o=p(i),r=Date.now();g("learnings",e,n,t),h("learnings",e,n,t);let d=E("learning",n,t),a=await F(e,{add:d.add,stdin:d.readFromStdin,file:d.readFromFile,edit:d.editIndex,delete:d.deleteIndex,limit:s(t,"limit"),...b(t)},o);d.isMutation&&a.changed!==!1&&await y(o,a),v("learnings",a,o,r)}function v(e,n,t,i){A(n,t),t.profile&&_(`profile:command=${e} took_ms=${Date.now()-i}`)}function Z(e,n){let t=e.command("comments").argument("<id>","Item id").argument("[text]","Optional comment text shorthand (equivalent to --add)").option("--add <text>","Append comment text; use text=<value> for structured input or - for stdin").option("--stdin","Read comment text from stdin (supports multiline markdown)").option("--file <path>","Read comment text from a file or stdin (-)").option("--edit <index>","Replace one comment using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the comment at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n comments").option("--full-history","Return complete comment history instead of a bounded mutation receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Comment author; defaults to PM_AUTHOR or settings").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete comments for an item.").action(k);u(t,"--body <text>","Alias for --add",!1),u(t,"--text <text>","Alias for --add",!1),u(t,"--comment <text>","Alias for --add",!1);let i=e.command("notes").argument("<id>","Item id").argument("[text]","Optional note text shorthand for --add").option("--add <text>","Add a text note (- reads stdin)").option("--note <text>","Alias for --add").option("--add-json <json>","Append a JSON event").option("--stdin","Read note text from stdin").option("--file <path>","Read note from file or stdin (-)").option("--edit <index>","Replace a 1-based note using the selected text input",n("--edit")).option("--delete <index>","Delete the note at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n notes").option("--since <timestamp>","Filter JSON events from this ISO time").option("--event-type <value>","Filter JSON events by top-level type").option("--include-meta","Include count and truncation metadata").option("--full-history","Return complete note history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Author; defaults to PM_AUTHOR/settings").option("--message <value>","History message").option("--force","Force ownership override").description("Manage merge-safe text notes and JSON context events.").action(H);u(i,"--text <text>","Alias for --add",!1);let o=e.command("learnings").argument("<id>","Item id").argument("[text]","Optional learning text shorthand for --add").option("--add <text>","Append learning text; use text=<value> or - for stdin").option("--stdin","Read learning text from stdin").option("--file <path>","Read learning text from a file or stdin (-)").option("--edit <index>","Replace one learning using positional text, --add, --stdin, or --file",n("--edit")).option("--delete <index>","Delete the learning at 1-based <index>",n("--delete")).option("--expect-at <ts>","Edit/delete only if the entry's created_at is <ts>").option("--limit <n>","Return only latest n learnings").option("--full-history","Return complete learning history instead of a bounded receipt").option("--if-absent","Append only when resolved author and text are absent").option("--author [value]","Learning author (optional; falls back to PM_AUTHOR/settings)").option("--message <value>","History message").option("--force","Force ownership override").description("List, add, edit, or delete learnings for an item.").action(J);u(o,"--text <text>","Alias for --add",!1)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="be983589-7a52-5022-b7b8-62d31572c012")}catch{}})();var M=[];function te(e){M=e.flatMap(n=>n.reason==="bare_key_value"&&typeof n.from=="string"&&Array.isArray(n.to)&&typeof n.to[0]=="string"?[{from:n.from,flag:n.to[0].split("=")[0]}]:[])}function ne(){return M}export{Y as a,Z as b,te as c,ne as d};
2
+ //# sourceMappingURL=chunk-J2LABXBL.js.map
@@ -1,2 +1,2 @@
1
- import{b as ve}from"./chunk-DG2EOOFX.js";import{Dd as g,Ed as b,Nc as Ie,oc as ge,pc as ye,qb as x,rb as k,xb as _e}from"./chunk-7ESF676D.js";import{v as pe}from"./chunk-OXG5XPC7.js";import{Cc as ne,Ch as ae,Dh as de,Ea as j,Eh as le,Fh as fe,Gh as ue,Hh as me,Ih as N,Ka as X,Ma as J,O as V,Sa as Q,Sh as p,X as Y,Ya as Z,Zc as v,_c as w,ce as ie,cj as he,mb as ee,nb as te,oh as oe,vh as T,wh as re,xh as B,yh as se,zh as ce}from"./chunk-FOYRE23V.js";import{A as u,C as l,z as W}from"./chunk-5OFMWP3Q.js";import{readdir as Ke}from"node:fs/promises";import H from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a319e7d9-e248-573b-bf1f-35217ce49fd0")}catch{}})();function D(e,t){return(t===void 0?void 0:J(e,t))?.execution_role??j[e.trim().toLowerCase()]??"agent"}var O="blocked_by",be="blocks",Le=Object.freeze([O,be]),A="no-active-blocker";function d(e){return e.trim().toLowerCase()}function E(e,t){return t?`external:${e}`:`local:${d(e)}`}function _(e){let t=new Map,n=typeof e.blocked_by=="string"?e.blocked_by.trim():"";if(n.length>0&&d(n)!==A){let i=g(n);t.set(E(n,i),i?n:d(n))}for(let i of e.dependencies??[]){let o=typeof i.id=="string"?i.id.trim():"";if(p(i.kind)===O&&o.length>0&&d(o)!==A){let r=g(o)||b(i.source_kind);t.set(E(o,r),r?o:d(o))}}return[...t.values()].sort((i,o)=>i.localeCompare(o))}function C(e){let t=new Map;for(let n of e){let i=d(n.id);i.length!==0&&t.set(i,new Set(_(n)))}for(let n of e){let i=d(n.id);if(i.length!==0)for(let o of n.dependencies??[]){let r=p(o.kind)===be&&typeof o.id=="string"?d(o.id):"";if(r.length===0||r===A)continue;let c=t.get(r)??new Set;c.add(i),t.set(r,c)}}return new Map([...t].map(([n,i])=>[n,[...i].sort((o,r)=>o.localeCompare(r))]))}function we(e,t){let n=d(e.id);return n.length>0?C(t).get(n)??_(e):_(e)}function L(e,t,n,i){let o=e,r=typeof o.id=="string"?i?.get(d(o.id))??we(o,[...t.values()]):_(e),c=new Set((e.dependencies??[]).filter(s=>p(s.kind)===O&&b(s.source_kind)&&typeof s.id=="string"&&s.id.trim().length>0).map(s=>E(s.id.trim(),!0)));return r.map(s=>{if(g(s)||c.has(E(s,!0)))return{id:s,title:null,status:null,resolved:!1,external:!0,...typeof e.updated_at=="string"?{blocked_since:e.updated_at}:{},resolver:null};let a=t.get(d(s));return a?{id:s,title:a.title,status:a.status,resolved:w(a.status,n)}:{id:s,title:null,status:null,resolved:!1}})}function M(e,t,n){return L(e,t,n)}function Me(e,t){let n=new Map(e.map(c=>[d(c.id),c])),i=C(e),o=new Set([...xe(t),...t.blocked_statuses]),r=new Set;for(let c of e){let s=v(c.status,t);o.has(s)&&(t.blocked_statuses.has(s)||L(c,n,t,i).some(a=>!a.resolved))&&r.add(d(c.id))}return r}function He(e,t,n={},i){let o=[...e.ready,...e.decisions,...e.gates];n.includeContainers===!0&&o.push(...e.containers.filter(c=>c.open_blockers.length===0&&!t.blocked_statuses.has(v(c.item.status,t))));let r={ready:[],decisions:[],gates:[]};for(let c of o){let s=D(c.item.type,i);s==="human"&&n.includeDecisions!==!0?r.decisions.push(c):s==="gate"&&n.includeGates!==!0?r.gates.push(c):r.ready.push(c)}return r}function xe(e){return e.active_statuses.size>0?e.active_statuses:new Set([e.open_status])}function Pe(e,t,n){let i=[d(e)],o=new Set;for(;i.length>0;){let r=i.pop();if(!o.has(r)){o.add(r);for(let c of t.get(r)??[]){if(!w(c.status,n))return!0;i.push(d(c.id))}}}return!1}function $e(e){let t=new Map,n=new Map,i=new Map,o=C(e);for(let r of e){t.set(d(r.id),r);let c=typeof r.parent=="string"?r.parent.trim():"";if(c.length>0){let s=d(c),a=n.get(s)??[];a.push(r),n.set(s,a)}for(let s of o.get(d(r.id))){let a=d(s),m=i.get(a)??[];m.push(r.id),i.set(a,m)}}return{itemsById:t,childrenByParent:n,blockedByReverse:i,blockerIdsByItem:o}}function Fe(e,t,n,i){let{itemsById:o,childrenByParent:r,blockedByReverse:c,blockerIdsByItem:s}=$e(t),a=new Set([...xe(n),...n.blocked_statuses]),m=new Set(t.filter(f=>!w(f.status,n)).map(f=>d(f.id))),F=[],K=[],S=[],U=[],G=[],q=0;for(let f of e){if(!a.has(v(f.status,n)))continue;q+=1;let z=L(f,o,n,s).filter(h=>!h.resolved),Ae=(c.get(d(f.id))??[]).filter(h=>m.has(d(h))).sort((h,Oe)=>h.localeCompare(Oe)),I={item:f,open_blockers:z,unblocks:Ae};if(Pe(f.id,r,n)){S.push(I);continue}let De=n.blocked_statuses.has(v(f.status,n));if(z.length===0&&!De){let h=D(f.type,i);h==="human"?U.push(I):h==="gate"?G.push(I):F.push(I)}else K.push(I)}return{ready:F,blocked:K,containers:S,decisions:U,gates:G,active_count:q,container_count:S.length}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ae1c56b3-148d-502d-9450-e807fdfab4da")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e9b7731d-e6f5-51a8-970b-462c0b728a9c")}catch{}})();function Ue(e,t){let n=new Map;for(let i of e){let o=i.external?i.id:t.get(i.id.toLowerCase())?.id??i.id;n.set(i.external?`external:${o}`:`local:${o.toLowerCase()}`,{...i,id:o})}return[...n.values()]}async function P(e,t){let n=H.basename(e),i=(await Ke(H.dirname(e)).catch(o=>{throw ge("Cannot verify the blocker's physical file identity",{exitCode:u.GENERIC_FAILURE,context:{code:"blocker_identity_read_failed",required:"Restore access to the blocker item directory, then retry the item read."},cause:o})})).filter(o=>o.toLowerCase()===n.toLowerCase()).sort((o,r)=>+(r===n)-+(o===n)||o.localeCompare(r)).map(o=>H.parse(o).name)[0];if(i===void 0)throw new l(`Blocker canonical file disappeared during identity verification: ${t}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker file and validate storage integrity before retrying the item read."});return i}async function ht(e){let t=_(e.metadata);if(t.length===0)return[];let n=new Map([e.metadata.blocked_by,...(e.metadata.dependencies??[]).filter(o=>p(o.kind)==="blocked_by").map(o=>o.id)].filter(o=>typeof o=="string").map(o=>[o.trim().toLowerCase(),o.trim()])),i=new Map;for(let o of t){if(g(o)||!/^(?!\.{1,2}$)[^/\\:\0]+$/u.test(o)||e.metadata.dependencies?.some(s=>s.id.trim()===o&&p(s.kind)==="blocked_by"&&b(s.source_kind)))continue;let r=await x(e.pmRoot,n.get(o),e.settings.id_prefix,e.settings.item_format,e.typeToFolder);if(r===null)continue;let c=await k(r,{schema:e.settings.schema});if(r.id=await P(r.itemPath,r.id),c.document.metadata.id!==r.id)throw new l(`Blocker identity differs from its canonical file: ${r.id}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker identity and validate storage integrity before retrying the item read."});i.set(o.toLowerCase(),c.document.metadata)}return Ue(M({blocked_by:e.metadata.blocked_by,dependencies:e.metadata.dependencies,updated_at:e.metadata.updated_at},i,ne(e.settings.schema)),i)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="222cbba7-e2df-5afb-8d75-14f9f99b3bd2")}catch{}})();var Ee="item_revision_conflict",Ge=10,Ce=/^[0-9a-f]{64}$/u;function y(e,t){return new l(`Invalid expected revision ${JSON.stringify(e)}: ${t}.`,u.USAGE,{code:"expect_hash_invalid",value:e,required:"Pass the 64-character item_hash from pm get <id> --json, optionally as <id>=<item_hash>.",examples:["--expect-hash <item_hash>","--expect-hash pm-a1b2=<item_hash>"]})}function Re(e){let t=typeof e=="string"?e.trim().toLowerCase():"";if(!Ce.test(t))throw y(String(e),"the revision is not a 64-character hexadecimal item_hash");return t}function qe(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw y(String(t),"expected a string");let n=t.split(",").map(o=>o.trim()).filter(o=>o.length>0);if(n.length===0)throw y(t,"the value is empty");let i=o=>te(t)===t?o:ee;return n.map(o=>{let r=o.lastIndexOf("="),c=r===-1?void 0:o.slice(0,r).trim();if(c!==void 0&&c.length===0)throw y(i(o),"the item id before = is empty");let s=r===-1?o:o.slice(r+1);if(!Ce.test(s.trim().toLowerCase()))throw y(i(s),"the revision is not a 64-character hexadecimal item_hash");let a=Re(s);return c===void 0?{itemHash:a}:{id:c,itemHash:a}})})}async function Se(e,t){let n=await pe(e),i=X(n,he()).type_to_folder,o=await x(e,t,n.id_prefix,n.item_format,i);if(o){let{document:r}=await k(o,{schema:n.schema});if(r.metadata.id!==await P(o.itemPath,o.id))throw new l(`Item file ${o.id} embeds the id ${r.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,u.CONFLICT,{code:"item_identity_conflict",item_id:o.id,required:`Repair ${o.id}'s identity first (pm validate reports it; pm restore ${o.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:r.metadata.id,document:r}}try{return{id:(await ve(e,t,n,i)).id,document:W}}catch{throw await _e(e,t,n.id_prefix,i)}}function $(e){return Q(e.cwd??process.cwd(),e.pmRoot)}async function Dt(e,t={}){let n=await Se($(t),e);return{id:n.id,item_hash:oe(n.document)}}async function Te(e,t,n){let i=[];for(let o of t){let r=o.id??n;if(r===void 0||r.trim().length===0)throw new l("A bare expected revision needs an item to bind to.",u.USAGE,{code:"expect_hash_target_required",required:"This command has no single item argument; name each target as --expect-hash <id>=<item_hash>.",examples:["--expect-hash pm-a1b2=<item_hash>"]});i.push({id:(await Se(e,r)).id,itemHash:o.itemHash})}return i}function ze(e){return[...new Set(e.patch.map(t=>{let n=t.path.split("/");return String(n[1]==="metadata"?n[2]:n[1])}))].sort()}async function We(e,t,n){let i;try{i=await ie(Z(e,t),t)}catch{return}let o=-1;for(let s=i.length-1;s>=0;s-=1){let a=i[s];if(a.after_hash===n){o=s+1;break}if(a.before_hash===n){o=s;break}}if(o===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let r=i.slice(o),c=r.slice(-Ge);return{expected_revision_recorded:!0,changes_since:c.map(s=>({ts:s.ts,op:s.op,author:s.author,fields:ze(s)})),changes_since_omitted:r.length-c.length}}async function Ot(e,t){if(!R(e))return{};let n=await Be(e,t);return{error_code:Ee,expected_revision:String(n.context.expected_revision),current_revision:String(n.context.current_revision),details:n.context.details}}function R(e){return ye(e)&&e.context.code===Ee}function Lt(e){let t=e.find(n=>R(n));if(t!==void 0)throw t}function Mt(){return new l("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",u.USAGE,{code:"expect_hash_invocation_rewritten",required:"Run the command without the rewriting extension (--no-extensions), or drop --expect-hash.",why:"An extension parser or preflight override changed this invocation's tracker or arguments, and final dispatch, the extension SDK client and the guard do not share one rewritten view."})}function Ve(e,t){if(t===void 0||!R(e)||typeof e.context.item_id!="string"||ue(e))return e;let n=e.context.reason===de;if(!n&&e.context.reason!==ae)return e;let i=me(N(e,new l(e.message,e.exitCode,{...e.context,...le(e.context.item_id,n,t)})));return i.stack=e.stack,i}async function Be(e,t,n){if(!fe(e,t))return e;let i=Ve(e,n);if(!R(i)||i.context.details!==void 0)return i;let o=i.context.item_id,r=i.context.expected_revision;if(typeof o!="string"||typeof r!="string")return i;let c;try{c=await We(t,o,r)}catch{return i}if(c===void 0)return i;let s={expected_revision_recorded:c.expected_revision_recorded,changes_since:c.changes_since.map(m=>({ts:m.ts,op:m.op,author:m.author,fields:[...m.fields]})),changes_since_omitted:c.changes_since_omitted},a=N(i,new l(i.message,i.exitCode,{...i.context,details:s}));return a.stack=i.stack,a}async function Ne(e,t,n){try{return{result:await re(e,t),...se(e)}}catch(i){throw e.pmRoot===void 0?i:await Be(i,e.pmRoot,n)}}function Ye(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",$(e)]}}async function Ht(e,t,n={}){return Ne(await je(e,n),t,Ye(n))}async function je(e,t={}){let n=$(t),i=e.map(({id:r,itemHash:c})=>({id:r,itemHash:Re(c)})),o=T();return B(o,n,await Te(n,i)),o}function Pt(e){let t=ce(e);return t===void 0||t.length>0}function Xe(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var ke=new Set(V);function Je(e,t={}){let n=e.trim().replace(/\s+/gu,"-"),i=ke.has(n)?n:e;if(ke.has(i)&&(!Ie(i)||i==="deps")&&!Y.has(i))throw Qe(i);if((i==="test"||i==="test-all")&&t.background===!0)throw new l(`--expect-hash cannot guard ${i} --background: the worker runs in another process.`,u.USAGE,{code:"expect_hash_background_unsupported",required:`Run ${i} in the foreground to guard its result recording, or drop --expect-hash for a background run.`})}function Qe(e){return new l(`--expect-hash guards item writes, and ${e} is not a mutation.`,u.USAGE,{code:"expect_hash_requires_mutation",required:"Use --expect-hash (MCP/SDK expectHash) only on a command or action that writes items."})}function Ze(e,t){if(t.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let n=e,i=Array.isArray(n.warnings)?n.warnings:[];return{...n,warnings:[...i,...t.map(Xe)]}}async function $t(e){let t=e.expectHash;if(t!==void 0&&typeof t!="string"&&!(Array.isArray(t)&&t.every(r=>typeof r=="string")))throw y(JSON.stringify(t)??String(t),"expected a string or an array of strings");let n=qe(t);if(n.length===0)return e.run();Je(e.action,{background:e.background===!0||e.options?.background===!0});let i=T();B(i,e.pmRoot,await Te(e.pmRoot,n,e.defaultId));let o=await Ne(i,e.run,e.invocation);return Ze(o.result,o.unchecked)}export{D as a,Le as b,_ as c,C as d,we as e,M as f,Me as g,He as h,Fe as i,ht as j,Ee as k,Ge as l,Re as m,qe as n,Dt as o,Te as p,We as q,Ot as r,R as s,Lt as t,Mt as u,Ve as v,Be as w,Ne as x,Ht as y,je as z,Pt as A,Xe as B,Je as C,Qe as D,$t as E};
2
- //# sourceMappingURL=chunk-3BOR22MC.js.map
1
+ import{b as ve}from"./chunk-TC6XLIYO.js";import{Dd as g,Ed as b,Nc as Ie,oc as ge,pc as ye,qb as x,rb as k,xb as _e}from"./chunk-4TB5D6HL.js";import{v as pe}from"./chunk-YHVLVSEZ.js";import{$c as w,Bh as oe,Dc as ne,Ea as j,Ih as T,Jh as re,Ka as X,Kh as B,Lh as se,Ma as J,Mh as ce,O as V,Ph as ae,Qh as de,Rh as le,Sa as Q,Sh as fe,Th as ue,Uh as me,Vh as N,X as Y,Ya as Z,_c as v,di as p,ge as ie,mb as ee,nb as te,pj as he}from"./chunk-HXHYDO2R.js";import{A as u,C as l,z as W}from"./chunk-KQIZ34SF.js";import{readdir as Ke}from"node:fs/promises";import H from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a319e7d9-e248-573b-bf1f-35217ce49fd0")}catch{}})();function D(e,t){return(t===void 0?void 0:J(e,t))?.execution_role??j[e.trim().toLowerCase()]??"agent"}var O="blocked_by",be="blocks",Le=Object.freeze([O,be]),A="no-active-blocker";function d(e){return e.trim().toLowerCase()}function E(e,t){return t?`external:${e}`:`local:${d(e)}`}function _(e){let t=new Map,n=typeof e.blocked_by=="string"?e.blocked_by.trim():"";if(n.length>0&&d(n)!==A){let i=g(n);t.set(E(n,i),i?n:d(n))}for(let i of e.dependencies??[]){let o=typeof i.id=="string"?i.id.trim():"";if(p(i.kind)===O&&o.length>0&&d(o)!==A){let r=g(o)||b(i.source_kind);t.set(E(o,r),r?o:d(o))}}return[...t.values()].sort((i,o)=>i.localeCompare(o))}function C(e){let t=new Map;for(let n of e){let i=d(n.id);i.length!==0&&t.set(i,new Set(_(n)))}for(let n of e){let i=d(n.id);if(i.length!==0)for(let o of n.dependencies??[]){let r=p(o.kind)===be&&typeof o.id=="string"?d(o.id):"";if(r.length===0||r===A)continue;let c=t.get(r)??new Set;c.add(i),t.set(r,c)}}return new Map([...t].map(([n,i])=>[n,[...i].sort((o,r)=>o.localeCompare(r))]))}function we(e,t){let n=d(e.id);return n.length>0?C(t).get(n)??_(e):_(e)}function L(e,t,n,i){let o=e,r=typeof o.id=="string"?i?.get(d(o.id))??we(o,[...t.values()]):_(e),c=new Set((e.dependencies??[]).filter(s=>p(s.kind)===O&&b(s.source_kind)&&typeof s.id=="string"&&s.id.trim().length>0).map(s=>E(s.id.trim(),!0)));return r.map(s=>{if(g(s)||c.has(E(s,!0)))return{id:s,title:null,status:null,resolved:!1,external:!0,...typeof e.updated_at=="string"?{blocked_since:e.updated_at}:{},resolver:null};let a=t.get(d(s));return a?{id:s,title:a.title,status:a.status,resolved:w(a.status,n)}:{id:s,title:null,status:null,resolved:!1}})}function M(e,t,n){return L(e,t,n)}function Me(e,t){let n=new Map(e.map(c=>[d(c.id),c])),i=C(e),o=new Set([...xe(t),...t.blocked_statuses]),r=new Set;for(let c of e){let s=v(c.status,t);o.has(s)&&(t.blocked_statuses.has(s)||L(c,n,t,i).some(a=>!a.resolved))&&r.add(d(c.id))}return r}function He(e,t,n={},i){let o=[...e.ready,...e.decisions,...e.gates];n.includeContainers===!0&&o.push(...e.containers.filter(c=>c.open_blockers.length===0&&!t.blocked_statuses.has(v(c.item.status,t))));let r={ready:[],decisions:[],gates:[]};for(let c of o){let s=D(c.item.type,i);s==="human"&&n.includeDecisions!==!0?r.decisions.push(c):s==="gate"&&n.includeGates!==!0?r.gates.push(c):r.ready.push(c)}return r}function xe(e){return e.active_statuses.size>0?e.active_statuses:new Set([e.open_status])}function Pe(e,t,n){let i=[d(e)],o=new Set;for(;i.length>0;){let r=i.pop();if(!o.has(r)){o.add(r);for(let c of t.get(r)??[]){if(!w(c.status,n))return!0;i.push(d(c.id))}}}return!1}function $e(e){let t=new Map,n=new Map,i=new Map,o=C(e);for(let r of e){t.set(d(r.id),r);let c=typeof r.parent=="string"?r.parent.trim():"";if(c.length>0){let s=d(c),a=n.get(s)??[];a.push(r),n.set(s,a)}for(let s of o.get(d(r.id))){let a=d(s),m=i.get(a)??[];m.push(r.id),i.set(a,m)}}return{itemsById:t,childrenByParent:n,blockedByReverse:i,blockerIdsByItem:o}}function Fe(e,t,n,i){let{itemsById:o,childrenByParent:r,blockedByReverse:c,blockerIdsByItem:s}=$e(t),a=new Set([...xe(n),...n.blocked_statuses]),m=new Set(t.filter(f=>!w(f.status,n)).map(f=>d(f.id))),F=[],K=[],S=[],U=[],G=[],q=0;for(let f of e){if(!a.has(v(f.status,n)))continue;q+=1;let z=L(f,o,n,s).filter(h=>!h.resolved),Ae=(c.get(d(f.id))??[]).filter(h=>m.has(d(h))).sort((h,Oe)=>h.localeCompare(Oe)),I={item:f,open_blockers:z,unblocks:Ae};if(Pe(f.id,r,n)){S.push(I);continue}let De=n.blocked_statuses.has(v(f.status,n));if(z.length===0&&!De){let h=D(f.type,i);h==="human"?U.push(I):h==="gate"?G.push(I):F.push(I)}else K.push(I)}return{ready:F,blocked:K,containers:S,decisions:U,gates:G,active_count:q,container_count:S.length}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ae1c56b3-148d-502d-9450-e807fdfab4da")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e9b7731d-e6f5-51a8-970b-462c0b728a9c")}catch{}})();function Ue(e,t){let n=new Map;for(let i of e){let o=i.external?i.id:t.get(i.id.toLowerCase())?.id??i.id;n.set(i.external?`external:${o}`:`local:${o.toLowerCase()}`,{...i,id:o})}return[...n.values()]}async function P(e,t){let n=H.basename(e),i=(await Ke(H.dirname(e)).catch(o=>{throw ge("Cannot verify the blocker's physical file identity",{exitCode:u.GENERIC_FAILURE,context:{code:"blocker_identity_read_failed",required:"Restore access to the blocker item directory, then retry the item read."},cause:o})})).filter(o=>o.toLowerCase()===n.toLowerCase()).sort((o,r)=>+(r===n)-+(o===n)||o.localeCompare(r)).map(o=>H.parse(o).name)[0];if(i===void 0)throw new l(`Blocker canonical file disappeared during identity verification: ${t}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker file and validate storage integrity before retrying the item read."});return i}async function ht(e){let t=_(e.metadata);if(t.length===0)return[];let n=new Map([e.metadata.blocked_by,...(e.metadata.dependencies??[]).filter(o=>p(o.kind)==="blocked_by").map(o=>o.id)].filter(o=>typeof o=="string").map(o=>[o.trim().toLowerCase(),o.trim()])),i=new Map;for(let o of t){if(g(o)||!/^(?!\.{1,2}$)[^/\\:\0]+$/u.test(o)||e.metadata.dependencies?.some(s=>s.id.trim()===o&&p(s.kind)==="blocked_by"&&b(s.source_kind)))continue;let r=await x(e.pmRoot,n.get(o),e.settings.id_prefix,e.settings.item_format,e.typeToFolder);if(r===null)continue;let c=await k(r,{schema:e.settings.schema});if(r.id=await P(r.itemPath,r.id),c.document.metadata.id!==r.id)throw new l(`Blocker identity differs from its canonical file: ${r.id}`,u.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker identity and validate storage integrity before retrying the item read."});i.set(o.toLowerCase(),c.document.metadata)}return Ue(M({blocked_by:e.metadata.blocked_by,dependencies:e.metadata.dependencies,updated_at:e.metadata.updated_at},i,ne(e.settings.schema)),i)}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="222cbba7-e2df-5afb-8d75-14f9f99b3bd2")}catch{}})();var Ee="item_revision_conflict",Ge=10,Ce=/^[0-9a-f]{64}$/u;function y(e,t){return new l(`Invalid expected revision ${JSON.stringify(e)}: ${t}.`,u.USAGE,{code:"expect_hash_invalid",value:e,required:"Pass the 64-character item_hash from pm get <id> --json, optionally as <id>=<item_hash>.",examples:["--expect-hash <item_hash>","--expect-hash pm-a1b2=<item_hash>"]})}function Re(e){let t=typeof e=="string"?e.trim().toLowerCase():"";if(!Ce.test(t))throw y(String(e),"the revision is not a 64-character hexadecimal item_hash");return t}function qe(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw y(String(t),"expected a string");let n=t.split(",").map(o=>o.trim()).filter(o=>o.length>0);if(n.length===0)throw y(t,"the value is empty");let i=o=>te(t)===t?o:ee;return n.map(o=>{let r=o.lastIndexOf("="),c=r===-1?void 0:o.slice(0,r).trim();if(c!==void 0&&c.length===0)throw y(i(o),"the item id before = is empty");let s=r===-1?o:o.slice(r+1);if(!Ce.test(s.trim().toLowerCase()))throw y(i(s),"the revision is not a 64-character hexadecimal item_hash");let a=Re(s);return c===void 0?{itemHash:a}:{id:c,itemHash:a}})})}async function Se(e,t){let n=await pe(e),i=X(n,he()).type_to_folder,o=await x(e,t,n.id_prefix,n.item_format,i);if(o){let{document:r}=await k(o,{schema:n.schema});if(r.metadata.id!==await P(o.itemPath,o.id))throw new l(`Item file ${o.id} embeds the id ${r.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,u.CONFLICT,{code:"item_identity_conflict",item_id:o.id,required:`Repair ${o.id}'s identity first (pm validate reports it; pm restore ${o.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:r.metadata.id,document:r}}try{return{id:(await ve(e,t,n,i)).id,document:W}}catch{throw await _e(e,t,n.id_prefix,i)}}function $(e){return Q(e.cwd??process.cwd(),e.pmRoot)}async function Dt(e,t={}){let n=await Se($(t),e);return{id:n.id,item_hash:oe(n.document)}}async function Te(e,t,n){let i=[];for(let o of t){let r=o.id??n;if(r===void 0||r.trim().length===0)throw new l("A bare expected revision needs an item to bind to.",u.USAGE,{code:"expect_hash_target_required",required:"This command has no single item argument; name each target as --expect-hash <id>=<item_hash>.",examples:["--expect-hash pm-a1b2=<item_hash>"]});i.push({id:(await Se(e,r)).id,itemHash:o.itemHash})}return i}function ze(e){return[...new Set(e.patch.map(t=>{let n=t.path.split("/");return String(n[1]==="metadata"?n[2]:n[1])}))].sort()}async function We(e,t,n){let i;try{i=await ie(Z(e,t),t)}catch{return}let o=-1;for(let s=i.length-1;s>=0;s-=1){let a=i[s];if(a.after_hash===n){o=s+1;break}if(a.before_hash===n){o=s;break}}if(o===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let r=i.slice(o),c=r.slice(-Ge);return{expected_revision_recorded:!0,changes_since:c.map(s=>({ts:s.ts,op:s.op,author:s.author,fields:ze(s)})),changes_since_omitted:r.length-c.length}}async function Ot(e,t){if(!R(e))return{};let n=await Be(e,t);return{error_code:Ee,expected_revision:String(n.context.expected_revision),current_revision:String(n.context.current_revision),details:n.context.details}}function R(e){return ye(e)&&e.context.code===Ee}function Lt(e){let t=e.find(n=>R(n));if(t!==void 0)throw t}function Mt(){return new l("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",u.USAGE,{code:"expect_hash_invocation_rewritten",required:"Run the command without the rewriting extension (--no-extensions), or drop --expect-hash.",why:"An extension parser or preflight override changed this invocation's tracker or arguments, and final dispatch, the extension SDK client and the guard do not share one rewritten view."})}function Ve(e,t){if(t===void 0||!R(e)||typeof e.context.item_id!="string"||ue(e))return e;let n=e.context.reason===de;if(!n&&e.context.reason!==ae)return e;let i=me(N(e,new l(e.message,e.exitCode,{...e.context,...le(e.context.item_id,n,t)})));return i.stack=e.stack,i}async function Be(e,t,n){if(!fe(e,t))return e;let i=Ve(e,n);if(!R(i)||i.context.details!==void 0)return i;let o=i.context.item_id,r=i.context.expected_revision;if(typeof o!="string"||typeof r!="string")return i;let c;try{c=await We(t,o,r)}catch{return i}if(c===void 0)return i;let s={expected_revision_recorded:c.expected_revision_recorded,changes_since:c.changes_since.map(m=>({ts:m.ts,op:m.op,author:m.author,fields:[...m.fields]})),changes_since_omitted:c.changes_since_omitted},a=N(i,new l(i.message,i.exitCode,{...i.context,details:s}));return a.stack=i.stack,a}async function Ne(e,t,n){try{return{result:await re(e,t),...se(e)}}catch(i){throw e.pmRoot===void 0?i:await Be(i,e.pmRoot,n)}}function Ye(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",$(e)]}}async function Ht(e,t,n={}){return Ne(await je(e,n),t,Ye(n))}async function je(e,t={}){let n=$(t),i=e.map(({id:r,itemHash:c})=>({id:r,itemHash:Re(c)})),o=T();return B(o,n,await Te(n,i)),o}function Pt(e){let t=ce(e);return t===void 0||t.length>0}function Xe(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var ke=new Set(V);function Je(e,t={}){let n=e.trim().replace(/\s+/gu,"-"),i=ke.has(n)?n:e;if(ke.has(i)&&(!Ie(i)||i==="deps")&&!Y.has(i))throw Qe(i);if((i==="test"||i==="test-all")&&t.background===!0)throw new l(`--expect-hash cannot guard ${i} --background: the worker runs in another process.`,u.USAGE,{code:"expect_hash_background_unsupported",required:`Run ${i} in the foreground to guard its result recording, or drop --expect-hash for a background run.`})}function Qe(e){return new l(`--expect-hash guards item writes, and ${e} is not a mutation.`,u.USAGE,{code:"expect_hash_requires_mutation",required:"Use --expect-hash (MCP/SDK expectHash) only on a command or action that writes items."})}function Ze(e,t){if(t.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let n=e,i=Array.isArray(n.warnings)?n.warnings:[];return{...n,warnings:[...i,...t.map(Xe)]}}async function $t(e){let t=e.expectHash;if(t!==void 0&&typeof t!="string"&&!(Array.isArray(t)&&t.every(r=>typeof r=="string")))throw y(JSON.stringify(t)??String(t),"expected a string or an array of strings");let n=qe(t);if(n.length===0)return e.run();Je(e.action,{background:e.background===!0||e.options?.background===!0});let i=T();B(i,e.pmRoot,await Te(e.pmRoot,n,e.defaultId));let o=await Ne(i,e.run,e.invocation);return Ze(o.result,o.unchecked)}export{D as a,Le as b,_ as c,C as d,we as e,M as f,Me as g,He as h,Fe as i,ht as j,Ee as k,Ge as l,Re as m,qe as n,Dt as o,Te as p,We as q,Ot as r,R as s,Lt as t,Mt as u,Ve as v,Be as w,Ne as x,Ht as y,je as z,Pt as A,Xe as B,Je as C,Qe as D,$t as E};
2
+ //# sourceMappingURL=chunk-J52BEBSS.js.map
@@ -0,0 +1,3 @@
1
+ (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1c260d1a-70ec-5133-b017-bb0399aea52e")}catch{}})();var v=["commands","renderers","hooks","schema","importers","search","parser","preflight","services"],M=2,T=Object.freeze({migration:"schema",validation:"schema"}),P=Object.freeze({version:2,capabilities:[...v],legacy_aliases:{...T}}),U=["off","warn","enforce"],Y=["off","warn","enforce"],q=["none","restricted","strict"],W=["block","warn"],X=["commands.override","commands.handler","hooks.beforecommand","hooks.beforemutation","hooks.aftercommand","hooks.onwrite","hooks.onread","hooks.onindex","schema.flags","schema.itemfields","schema.itemtypes","schema.relationshipkinds","schema.migrations","schema.profiles","parser.override","preflight.override","services.override","renderers.override","importers.importer","importers.exporter","search.provider","search.vectorstore","services.assuranceprovider"],K=["output_format","error_format","help_format","lock_acquire","lock_release","history_append","item_store_write","item_store_delete","context_relevance","command_result"];function E(){return{mode:"off",trust_mode:"off",require_provenance:!1,trusted_extensions:[],default_sandbox_profile:"none",allowed_extensions:[],blocked_extensions:[],allowed_capabilities:[],blocked_capabilities:[],allowed_surfaces:[],blocked_surfaces:[],allowed_commands:[],blocked_commands:[],allowed_actions:[],blocked_actions:[],allowed_services:[],blocked_services:[],extension_overrides:[]}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="58db2e8f-05e5-5ffc-a8dd-a73966142f47")}catch{}})();var h=["goal","objective","value","impact","outcome","why_now","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","unblock_note","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result"],k=["id","title","description","type","pm_format_version","source_type","type_options","status","priority","tags","created_at","updated_at","deadline","reminders","events","closed_at","completed_at","assignee","claim_principal","source_owner","author","estimated_minutes","acceptance_criteria","deferred_fields","design","external_ref","definition_of_ready","order",...h,"affected_version","fixed_version","component","regression","customer_impact","dependencies","comments","notes","learnings","files","tests","test_runs","docs","close_reason","duplicate_of","plan_mode","plan_scope","plan_harness","plan_resume_context","plan_validation","plan_decisions","plan_discoveries","plan_steps"],I=k;(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="426ae308-83c5-5c99-bb0d-c63e9c890570")}catch{}})();var O=Object.freeze([{id:"draft",roles:["draft"]},{id:"open",roles:["active","default_open"]},{id:"in_progress",aliases:["in-progress"],roles:["active"]},{id:"blocked",roles:["blocked"]},{id:"closed",roles:["terminal","terminal_done","default_close"]},{id:"canceled",aliases:["cancelled"],roles:["terminal","terminal_canceled","default_cancel"]}]),N=Object.freeze({draft_status:"draft",open_status:"open",in_progress_status:"in_progress",blocked_status:"blocked",close_status:"closed",canceled_status:"canceled"}),$=".agents/pm",V="settings.json",Q="Closed at creation via pm create",A=["","epics","features","tasks","chores","issues","schema","history","search","extensions","locks"],D=["decisions","events","reminders","milestones","meetings","plans"],J=[...A,...D],Z={Epic:"epics",Feature:"features",Task:"tasks",Chore:"chores",Issue:"issues",Decision:"decisions",Event:"events",Reminder:"reminders",Milestone:"milestones",Meeting:"meetings",Plan:"plans"},S={minimal:{ownership_enforcement:"none",create_mode_default:"progressive",close_validation_default:"off",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!1,duplicate_detection_mode:"off",duplicate_detection_threshold:.8,duplicate_detection_limit:3},default:{ownership_enforcement:"warn",create_mode_default:"progressive",close_validation_default:"warn",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"core",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3},strict:{ownership_enforcement:"strict",create_mode_default:"strict",close_validation_default:"strict",require_close_reason:!0,parent_reference:"strict_error",metadata_profile:"strict",force_required_for_stale_lock:!0,duplicate_detection_mode:"strict",duplicate_detection_threshold:.8,duplicate_detection_limit:3}},R=["no active blocker","ready for planned execution sequencing","work completed","work is closed"],p={blocked_reason:["no active blocker because work is closed","work is closed"],resolution:["closed with implementation evidence","closed with verification evidence","work completed and recorded","work is closed"],actual_result:["closed and recorded","work completed","work completed and recorded"]};function w(e){return e?[...e]:void 0}var H={version:1,id_prefix:"pm-",ids:{token_length:4},author_default:"",agent_identity:{probes_enabled:!0,identity_vocabulary:{version:1,aliases:{}},harness_signals:[]},mutation_guard:{require_attributed_author:!1,secret_guard:"advise",stale_in_progress_hours:72},item_format:"toon",locks:{ttl_seconds:1800,wait_ms:3e3},checkpoints:{retention_days:14},output:{default_format:"toon"},ux:{deprecation_hints:!0},history:{missing_stream:"auto_create",compact_policy:{enabled:!1,max_entries:500,trigger:"health_warn"}},validation:{sprint_release_format:"warn",parent_reference:"warn",metadata_profile:"core",metadata_required_fields:[],lifecycle_stale_blocker_reason_patterns:[...R],lifecycle_closure_like_blocked_reason_patterns:[...p.blocked_reason],lifecycle_closure_like_resolution_patterns:[...p.resolution],lifecycle_closure_like_actual_result_patterns:[...p.actual_result],estimate_defaults_by_type:{}},governance:{preset:"minimal",...S.minimal},workflow:{definition_of_done:[]},testing:{record_results_to_items:!1,allow_untrusted_linked_tests:!1},telemetry:{enabled:!0,first_run_prompt_completed:!1,capture_level:"redacted",endpoint:"https://pm-cli.unbrained.dev/v1/events",installation_id:"",retention_days:365},agent_guidance:{prompt_completed:!1,declined:!1,declined_at:"",template_version:1,last_checked_files:[]},item_types:{definitions:[]},schema:{version:1,files:{types:"schema/types.json",statuses:"schema/statuses.json",fields:"schema/fields.json",workflows:"schema/workflows.json"},statuses:O.map(e=>({...e,aliases:w(e.aliases),roles:w(e.roles)})),fields:[],workflow:{...N},unknown_field_policy:"allow"},extensions:{enabled:[],disabled:[],policy:E()},search:{score_threshold:0,hybrid_semantic_weight:.7,max_results:50,embedding_model:"",embedding_batch_size:32,embedding_timeout_ms:3e4,scanner_max_batch_retries:3,provider:"",default_mode:"auto",mutation_refresh_policy:"semantic_configured",query_expansion:{enabled:!1,provider:""},rerank:{enabled:!1,model:"",top_k:20}},providers:{openai:{base_url:"",api_key:"",model:""},ollama:{base_url:"",model:""}},context:{default_depth:"brief",activity_limit:10,stale_threshold_days:7,next_ranking_policy:"priority_floor",sections:{hierarchy:!0,activity:!0,progress:!0,recently_created:!0,unparented:!0,blockers:!0,files:!0,workload:!0,staleness:!0,tests:!0}},vector_store:{adapter:"",collection_name:"pm_items",qdrant:{url:"",api_key:""},lancedb:{path:""}}},ee={metadata:{},body:""},y={SUCCESS:0,GENERIC_FAILURE:1,USAGE:2,NOT_FOUND:3,CONFLICT:4,DEPENDENCY_FAILED:5,NO_EFFECT:6,PARTIAL_EFFECT:7},C=Object.freeze({unknown_command:"usage",unknown_option:"usage",missing_required_option:"usage",missing_required_argument:"usage",invalid_command_usage:"usage",linked_test_value_not_quoted:"usage",invalid_argument_value:"validation",health_findings:"validation",validation_findings:"validation",close_through_update:"validation",no_update_fields:"validation",unsupported_update_option:"validation",tracker_not_initialized:"validation",item_not_found:"validation",ownership_conflict:"conflict",lock_conflict:"conflict",terminal_state_conflict:"conflict",dependency_failed:"runtime",init_gitignore_unwritable:"runtime",merge_git_config_unwritable:"runtime",command_failed:"runtime",unknown_error:"runtime"});function te(e){let t=(e??"").trim().toLowerCase();if(t.length===0)return"unknown";let r=C[t];return typeof r=="string"?r:t.includes("conflict")||t.includes("locked")?"conflict":t.startsWith("unknown_")||t.startsWith("missing_required_")?"usage":t.startsWith("invalid_")||t.endsWith("_not_found")||t.includes("validation")?"validation":t.endsWith("_error")||t.endsWith("_failed")?"runtime":"unknown"}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="745f8a29-e1f9-574c-bf67-70f564b0415b")}catch{}})();var f=class extends Error{exitCode;code;context;constructor(t,r,i={}){super(t),this.name="PmCliError",this.exitCode=r,this.context=i,this.code=i.code}};import*as o from"node:fs/promises";import{constants as m}from"node:fs";import c from"node:path";import L from"node:crypto";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="af07b34f-9e45-561f-aa8c-2415ee4a46b9")}catch{}})();var x=[10,25,50,100];async function g(e){await o.mkdir(e,{recursive:!0})}async function ce(e){try{return await o.access(e),!0}catch{return!1}}function b(e){return F(e)||l(e,"ENOTDIR")}function F(e){return l(e,"ENOENT")}async function de(e){try{return await o.readFile(e,"utf8")}catch(t){if(b(t))return null;throw t}}async function _e(e,t){let r=await o.open(e,m.O_RDONLY|m.O_NOFOLLOW|m.O_NONBLOCK);try{if(!(await r.stat()).isFile())throw t;return await r.readFile("utf8")}finally{await r.close()}}function fe(e){let t=e?.replaceAll(c.sep,"/"),r=t!==void 0&&!c.posix.isAbsolute(t)&&!c.win32.isAbsolute(t)&&!t.split("/").includes(".."),i=r?t.split("/")[0]:void 0,n={"settings.json":"settings",runtime:"runtime",schema:"schema",history:"history",transactions:"transactions"},s=i===void 0?"tracker_storage":Object.hasOwn(n,i)?n[i]:"tracker_storage",d=r&&t.length>0&&t.length<=160&&t.split("/").every(a=>a!=="."&&/^[a-zA-Z0-9_.-]+$/u.test(a)),_=d?t:`${s} (entry name redacted)`;return new f(`Transaction preview requires regular files and directories. Inspect ${_} relative to the selected tracker root.`,y.USAGE,{code:"transaction_preview_non_regular_file",preview_storage:{storage_area:s,...d?{relative_entry:t}:{},entry_redacted:!d},required:"regular files and directories within the configured tracker storage",why:"Preview does not follow linked entries or read special files.",nextSteps:[`Inspect ${_} within the selected tracker for links, directories used as files, or special files; do not follow link targets.`,"Restore the intended regular files and directories, then retry the original dry-run command."]})}async function u(e){try{await o.unlink(e)}catch{}}async function ue(e,t,r={}){let i=c.dirname(e);r.createParentDirectories!==!1&&await g(i);let n=c.join(i,`.${c.basename(e)}.${process.pid}.${Date.now()}.${L.randomBytes(4).toString("hex")}.tmp`);try{await o.writeFile(n,t,r.mode===void 0?"utf8":{encoding:"utf8",mode:r.mode})}catch(s){throw await u(n),s}try{await o.rename(n,e)}catch(s){if(process.platform==="win32"&&(l(s,"EPERM")||l(s,"EBUSY"))){let d=s;for(let _ of x){await new Promise(a=>setTimeout(a,_));try{await o.rename(n,e);return}catch(a){if(d=a,!l(a,"EPERM")&&!l(a,"EBUSY"))break}}throw await u(n),d}if(l(s,"EXDEV")){try{await o.copyFile(n,e)}finally{await u(n)}return}throw await u(n),s}}async function pe(e,t){let r=c.dirname(e);await g(r);let i=await o.open(e,"a");try{await i.writeFile(`${t}
2
+ `,"utf8")}finally{await i.close()}}async function me(e){try{await o.unlink(e)}catch(t){if(!b(t))throw t}}function l(e,t){return typeof e=="object"&&e!==null&&"code"in e&&e.code===t}export{v as a,M as b,T as c,P as d,U as e,Y as f,q as g,W as h,X as i,K as j,E as k,h as l,I as m,O as n,N as o,$ as p,V as q,Q as r,A as s,J as t,Z as u,S as v,R as w,p as x,H as y,ee as z,y as A,te as B,f as C,g as D,ce as E,b as F,F as G,de as H,_e as I,fe as J,ue as K,pe as L,me as M};
3
+ //# sourceMappingURL=chunk-KQIZ34SF.js.map
@@ -0,0 +1,3 @@
1
+ import{execFile as u}from"node:child_process";import g from"node:path";import{promisify as w}from"node:util";import{setTimeout as I}from"node:timers/promises";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f2a4f406-8400-50ac-a90a-f8498ab9b773")}catch{}})();var s=w(u);async function f(e,t){let r=performance.now()+5e3,o=25;for(;;)try{await s("git",["config",...t],{cwd:e,env:{...l(),LC_ALL:"C"},timeout:1e4});return}catch(n){let i=r-performance.now();if(typeof n!="object"||n===null||!("stderr"in n)||typeof n.stderr!="string"||!/could not lock config file [^\r\n]+: File exists/u.test(n.stderr)||i<=0)throw n;await I(Math.min(o,i)),o=Math.min(o*2,200)}}function p(e,t=process.platform){let r=e.endsWith(`
2
+ `)?e.slice(0,-1):e;return t==="win32"&&r.endsWith("\r")?r.slice(0,-1):r}function l(){let e={...process.env};for(let t of["GIT_DIR","GIT_WORK_TREE","GIT_COMMON_DIR","GIT_INDEX_FILE","GIT_OBJECT_DIRECTORY","GIT_ALTERNATE_OBJECT_DIRECTORIES","GIT_NAMESPACE","GIT_CEILING_DIRECTORIES","GIT_DISCOVERY_ACROSS_FILESYSTEM"])delete e[t];return e}async function c(e,t){try{return(await s("git",["config","--local",...t==="core.bare"||t==="extensions.worktreeConfig"?["--type=bool"]:[],"--get",t],{cwd:e,env:l(),timeout:1e4})).stdout.trim()}catch(r){if(typeof r=="object"&&r!==null&&"code"in r&&r.code===1)return;throw r}}async function C(e){if(await c(e,"extensions.worktreeConfig")==="true")return"--worktree";let t=async i=>p((await s("git",["rev-parse","--path-format=absolute",i],{cwd:e,env:l(),timeout:1e4})).stdout),r=await t("--git-dir"),o=await t("--git-common-dir");if(r===o)return"--local";let n=g.join(o,"config.worktree");for(let i of["core.bare","core.worktree"]){let a=await c(e,i);a===void 0||i==="core.bare"&&a!=="true"||(await f(e,["--file",n,i,a]),await f(e,["--local","--unset-all",i]))}for(let i of["pm-item-toon","pm-item-markdown","pm-history","pm-relationship","pm-json"])for(let a of["name","driver"]){let m=`merge.${i}.${a}`,d=await c(e,m);d!==void 0&&await f(e,["--file",n,m,d])}return await f(e,["--local","extensions.worktreeConfig","true"]),"--worktree"}export{f as a,p as b,l as c,C as d};
3
+ //# sourceMappingURL=chunk-LQBWLNZJ.js.map