@unbrained/pm-cli 2026.11.3 → 2026.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/.agents/skills/HARNESS_COMPATIBILITY.md +1 -1
  2. package/.agents/skills/README.md +14 -14
  3. package/.agents/skills/pm-developer/SKILL.md +16 -16
  4. package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +14 -14
  5. package/.agents/skills/pm-developer/references/SCRIPTING_COMPOSITION.md +10 -10
  6. package/.agents/skills/pm-extensions/SKILL.md +13 -13
  7. package/.agents/skills/pm-extensions/references/AUTHORING.md +12 -12
  8. package/.agents/skills/pm-sdk/SKILL.md +27 -27
  9. package/.agents/skills/pm-sdk/references/SURFACE_MAP.md +32 -32
  10. package/.agents/skills/pm-test-audit/references/AUDIT.md +1 -1
  11. package/.agents/skills/pm-user/SKILL.md +35 -35
  12. package/.claude-plugin/marketplace.json +1 -1
  13. package/AGENTS.md +9 -9
  14. package/CHANGELOG.md +19 -0
  15. package/README.md +13 -13
  16. package/dist/cli/error-guidance.d.ts +14 -35
  17. package/dist/cli/error-guidance.js +2 -2
  18. package/dist/cli/expected-revisions.d.ts +55 -0
  19. package/dist/cli/expected-revisions.js +2 -0
  20. package/dist/cli/main.js +2 -2
  21. package/dist/cli/register-setup.js +1 -1
  22. package/dist/cli/runtime/invocation-options.js +1 -1
  23. package/dist/cli-bundle/bundle-manifest.json +1 -1
  24. package/dist/cli-bundle/chunks/chunk-2RPORE7M.js +31 -0
  25. package/dist/cli-bundle/chunks/{chunk-Y7H55PCY.js → chunk-335BZ75D.js} +2 -2
  26. package/dist/cli-bundle/chunks/chunk-5GWEY4P6.js +122 -0
  27. package/dist/cli-bundle/chunks/chunk-6VRX2CM7.js +2 -0
  28. package/dist/cli-bundle/chunks/{chunk-5JZMF4M5.js → chunk-7DEKAXVA.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-32BCU6HN.js → chunk-7ZRCYESH.js} +47 -46
  30. package/dist/cli-bundle/chunks/chunk-AUEKTX7V.js +6 -0
  31. package/dist/cli-bundle/chunks/chunk-D7KYPRK4.js +2 -0
  32. package/dist/cli-bundle/chunks/{chunk-2CBHQXYJ.js → chunk-DAX3AOFI.js} +2 -2
  33. package/dist/cli-bundle/chunks/{chunk-JPKIUWLG.js → chunk-F6NDMKZ4.js} +2 -2
  34. package/dist/cli-bundle/chunks/chunk-FRNMQM45.js +2 -0
  35. package/dist/cli-bundle/chunks/chunk-HNGLDMSZ.js +9 -0
  36. package/dist/cli-bundle/chunks/{chunk-DEJHTFEF.js → chunk-HRCMORE7.js} +2 -2
  37. package/dist/cli-bundle/chunks/chunk-HRFGFIYU.js +2 -0
  38. package/dist/cli-bundle/chunks/{chunk-5IPXDZKU.js → chunk-JI2GDE4I.js} +66 -66
  39. package/dist/cli-bundle/chunks/{chunk-MQJXZX3Q.js → chunk-LS3GI3H4.js} +53 -53
  40. package/dist/cli-bundle/chunks/chunk-OH6WQ7VT.js +3 -0
  41. package/dist/cli-bundle/chunks/{chunk-TZ3D3DPQ.js → chunk-OJDMJT7Y.js} +2 -2
  42. package/dist/cli-bundle/chunks/chunk-S4LPZ4TN.js +20 -0
  43. package/dist/cli-bundle/chunks/chunk-UEGXWXUZ.js +2 -0
  44. package/dist/cli-bundle/chunks/chunk-XLSHFYXZ.js +2 -0
  45. package/dist/cli-bundle/chunks/{chunk-UYNMKUGA.js → chunk-YKXATU2G.js} +2 -2
  46. package/dist/cli-bundle/chunks/item-revision-OJJVPQY7.js +2 -0
  47. package/dist/cli-bundle/chunks/item-transaction-QEPBUCMY.js +2 -0
  48. package/dist/cli-bundle/chunks/mutation-admission-INMM3HHG.js +2 -0
  49. package/dist/cli-bundle/chunks/{register-list-query-I6AZA3IX.js → register-list-query-5Y5JKWU5.js} +2 -2
  50. package/dist/cli-bundle/chunks/{register-mutation-3DAXCLXR.js → register-mutation-WC7OSQID.js} +2 -2
  51. package/dist/cli-bundle/chunks/register-operations-PO63DBZH.js +2 -0
  52. package/dist/cli-bundle/chunks/register-setup-RRFOS7IT.js +2 -0
  53. package/dist/cli-bundle/chunks/{stage-7H36OTDJ.js → stage-E3MMV4TV.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/chunk-5PMJOJCZ.js +44 -0
  55. package/dist/cli-bundle/focused-chunks/chunk-7KK66ISG.js +2 -0
  56. package/dist/cli-bundle/focused-chunks/{chunk-D4XQOMG4.js → chunk-AHWJPZSJ.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/chunk-C3O6JJPO.js +2 -0
  58. package/dist/cli-bundle/focused-chunks/{chunk-LKN2WGGB.js → chunk-C6P6HPCX.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/chunk-CPMSL4HS.js +2 -0
  60. package/dist/cli-bundle/focused-chunks/chunk-CZM75DE3.js +2 -0
  61. package/dist/cli-bundle/focused-chunks/{chunk-TYHDZUL4.js → chunk-D2TBEBNW.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/chunk-E56OXRYH.js +2 -0
  63. package/dist/cli-bundle/focused-chunks/{chunk-I5FODKYB.js → chunk-F62XGAAY.js} +2 -2
  64. package/dist/cli-bundle/focused-chunks/chunk-G4QP365K.js +2 -0
  65. package/dist/cli-bundle/focused-chunks/chunk-G5PJCR7R.js +2 -0
  66. package/dist/cli-bundle/focused-chunks/chunk-GS3JC5UU.js +23 -0
  67. package/dist/cli-bundle/focused-chunks/chunk-I5LGPUWH.js +2 -0
  68. package/dist/cli-bundle/focused-chunks/chunk-LW64TINU.js +3 -0
  69. package/dist/cli-bundle/focused-chunks/chunk-M6V7UMWL.js +26 -0
  70. package/dist/cli-bundle/focused-chunks/chunk-MC7IE7D7.js +8 -0
  71. package/dist/cli-bundle/focused-chunks/chunk-MG7C3JUY.js +2 -0
  72. package/dist/cli-bundle/focused-chunks/{chunk-F3X6UWMI.js → chunk-MK4HV4JO.js} +2 -2
  73. package/dist/cli-bundle/focused-chunks/{chunk-ZQRCVRGS.js → chunk-NQ7GYFOX.js} +54 -54
  74. package/dist/cli-bundle/focused-chunks/chunk-O7EI33NP.js +91 -0
  75. package/dist/cli-bundle/focused-chunks/{chunk-RY4QEMAE.js → chunk-RFTJZ5VB.js} +2 -2
  76. package/dist/cli-bundle/focused-chunks/chunk-SNOXXRSJ.js +2 -0
  77. package/dist/cli-bundle/focused-chunks/chunk-UPJUTP2V.js +12 -0
  78. package/dist/cli-bundle/focused-chunks/{chunk-HJ27QLZV.js → chunk-VWWTIX5L.js} +2 -2
  79. package/dist/cli-bundle/focused-chunks/{chunk-HOXIIZEO.js → chunk-XHOBYCVE.js} +2 -2
  80. package/dist/cli-bundle/focused-chunks/chunk-YMGB2O4E.js +81 -0
  81. package/dist/cli-bundle/focused-chunks/item-revision-CTDO4H3I.js +2 -0
  82. package/dist/cli-bundle/focused-chunks/item-transaction-AEAYVVHA.js +2 -0
  83. package/dist/cli-bundle/focused-chunks/mutation-admission-4WM7TNHZ.js +2 -0
  84. package/dist/cli-bundle/focused-chunks/{stage-4SQHVI3O.js → stage-WV7QXR4C.js} +2 -2
  85. package/dist/cli-bundle/main.js +25 -25
  86. package/dist/cli-bundle/sdk-authoring.js +1 -1
  87. package/dist/cli-bundle/sdk-contracts.js +5 -5
  88. package/dist/cli-bundle/sdk-core.js +1 -1
  89. package/dist/cli-bundle/sdk-governance.js +1 -1
  90. package/dist/cli-bundle/sdk-graph.js +1 -1
  91. package/dist/cli-bundle/sdk-merge.js +57 -57
  92. package/dist/cli-bundle/sdk-query.js +1 -1
  93. package/dist/cli-bundle/sdk-runtime.js +1 -1
  94. package/dist/cli-bundle/sdk-testing.js +1 -1
  95. package/dist/cli-bundle/sdk.js +11 -11
  96. package/dist/core/config/positional-value.d.ts +7 -1
  97. package/dist/core/config/positional-value.js +1 -1
  98. package/dist/core/extensions/reserved-host-flags.js +1 -1
  99. package/dist/core/history/history-rewrite.js +1 -1
  100. package/dist/core/item/literal-mutation-input.d.ts +17 -0
  101. package/dist/core/item/literal-mutation-input.js +1 -1
  102. package/dist/core/item/parent-reference-policy.d.ts +8 -4
  103. package/dist/core/item/parent-reference-policy.js +1 -1
  104. package/dist/core/item/sprint-release-format.d.ts +2 -1
  105. package/dist/core/item/sprint-release-format.js +1 -1
  106. package/dist/core/output/mutation-projection.js +1 -1
  107. package/dist/core/shared/command-types.d.ts +7 -0
  108. package/dist/core/store/item-mutation-precondition.d.ts +72 -6
  109. package/dist/core/store/item-mutation-precondition.js +1 -1
  110. package/dist/core/store/item-store.js +1 -1
  111. package/dist/core/store/settings-validator.js +1 -1
  112. package/dist/core/store/settings.d.ts +14 -0
  113. package/dist/core/store/settings.js +5 -4
  114. package/dist/core/telemetry/policy.d.ts +27 -1
  115. package/dist/core/telemetry/policy.js +1 -1
  116. package/dist/core/telemetry/runtime.d.ts +18 -7
  117. package/dist/core/telemetry/runtime.js +4 -4
  118. package/dist/sdk/cli-contracts/bootstrap-command-scanner.js +1 -1
  119. package/dist/sdk/cli-contracts/completeness.js +1 -1
  120. package/dist/sdk/cli-contracts/enum-contracts.d.ts +11 -0
  121. package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
  122. package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
  123. package/dist/sdk/cli-contracts/registration-helpers.js +1 -1
  124. package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
  125. package/dist/sdk/cli-contracts/tool-schema.js +1 -1
  126. package/dist/sdk/cli-contracts/typed-action-inputs.d.ts +8 -5
  127. package/dist/sdk/cli-contracts.d.ts +1 -1
  128. package/dist/sdk/cli-contracts.js +1 -1
  129. package/dist/sdk/cli-program.js +1 -1
  130. package/dist/sdk/config.d.ts +3 -3
  131. package/dist/sdk/config.js +1 -1
  132. package/dist/sdk/environment/project-runtime-compatibility.js +1 -1
  133. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
  134. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
  135. package/dist/sdk/governance/health.d.ts +2 -2
  136. package/dist/sdk/governance/health.js +2 -2
  137. package/dist/sdk/governance/validate.js +1 -1
  138. package/dist/sdk/history/salvage.js +3 -3
  139. package/dist/sdk/history-compact.d.ts +7 -1
  140. package/dist/sdk/history-compact.js +1 -1
  141. package/dist/sdk/history-repair.d.ts +2 -1
  142. package/dist/sdk/history-repair.js +1 -1
  143. package/dist/sdk/index.d.ts +6 -1
  144. package/dist/sdk/index.js +1 -1
  145. package/dist/sdk/init.d.ts +4 -4
  146. package/dist/sdk/init.js +8 -8
  147. package/dist/sdk/lifecycle/checkpoint-rollback.d.ts +10 -2
  148. package/dist/sdk/lifecycle/checkpoint-rollback.js +1 -1
  149. package/dist/sdk/lifecycle/claim.d.ts +4 -0
  150. package/dist/sdk/lifecycle/claim.js +1 -1
  151. package/dist/sdk/lifecycle/close-many.d.ts +11 -2
  152. package/dist/sdk/lifecycle/close-many.js +1 -1
  153. package/dist/sdk/lifecycle/close.d.ts +25 -0
  154. package/dist/sdk/lifecycle/close.js +1 -1
  155. package/dist/sdk/lifecycle/create.d.ts +7 -5
  156. package/dist/sdk/lifecycle/create.js +1 -1
  157. package/dist/sdk/lifecycle/item-revision.d.ts +162 -0
  158. package/dist/sdk/lifecycle/item-revision.js +2 -0
  159. package/dist/sdk/lifecycle/restore.js +1 -1
  160. package/dist/sdk/lifecycle/shared-unset-fields.d.ts +628 -4
  161. package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
  162. package/dist/sdk/lifecycle/start-blockers.d.ts +52 -0
  163. package/dist/sdk/lifecycle/start-blockers.js +2 -0
  164. package/dist/sdk/lifecycle/task-composition.d.ts +11 -0
  165. package/dist/sdk/lifecycle/task-composition.js +1 -1
  166. package/dist/sdk/lifecycle/update-many.d.ts +11 -2
  167. package/dist/sdk/lifecycle/update-many.js +1 -1
  168. package/dist/sdk/lifecycle/update.d.ts +5 -4
  169. package/dist/sdk/lifecycle/update.js +2 -2
  170. package/dist/sdk/public-surface.json +1 -1
  171. package/dist/sdk/query/declared-blockers.d.ts +16 -0
  172. package/dist/sdk/query/declared-blockers.js +2 -0
  173. package/dist/sdk/query/get.d.ts +7 -0
  174. package/dist/sdk/query/get.js +1 -1
  175. package/dist/sdk/query/projection-contracts.js +1 -1
  176. package/dist/sdk/runtime/actions.js +1 -1
  177. package/dist/sdk/runtime/mutation-value-validation.js +1 -1
  178. package/dist/sdk/runtime-input.d.ts +12 -0
  179. package/dist/sdk/runtime-input.js +1 -1
  180. package/dist/sdk/runtime-primitives.d.ts +1 -0
  181. package/dist/sdk/runtime-primitives.js +1 -1
  182. package/dist/sdk/runtime.d.ts +10 -0
  183. package/dist/sdk/runtime.js +1 -1
  184. package/dist/sdk/structured-mutations.js +1 -1
  185. package/dist/sdk/telemetry.d.ts +1 -1
  186. package/dist/sdk/telemetry.js +2 -2
  187. package/dist/sdk/test/batch.js +2 -2
  188. package/dist/sdk/test/execution.js +2 -2
  189. package/dist/sdk/test/linked-command-detection.js +1 -1
  190. package/dist/sdk/workspace-transaction.d.ts +17 -6
  191. package/dist/sdk/workspace-transaction.js +1 -1
  192. package/dist/types.d.ts +6 -0
  193. package/dist/types.js +1 -1
  194. package/docs/AGENT_GUIDE.md +48 -48
  195. package/docs/AGENT_OUTPUT_ENCODINGS.md +20 -20
  196. package/docs/ASSURANCE.md +10 -10
  197. package/docs/BOUNDED_CONTEXT_READS.md +3 -3
  198. package/docs/CLAUDE_CODE_PLUGIN.md +1 -1
  199. package/docs/CLI_GRAMMAR.md +2 -2
  200. package/docs/COMMANDS.md +144 -32
  201. package/docs/COMMAND_NAMESPACES.md +1 -1
  202. package/docs/CONFIGURATION.md +82 -70
  203. package/docs/CONTEXT_ALGORITHM_PORTFOLIO.md +2 -2
  204. package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +5 -5
  205. package/docs/CORPUS_SHAPES.md +1 -1
  206. package/docs/DEPENDENCY_KIND_CONTRACT.md +6 -6
  207. package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +5 -5
  208. package/docs/ECOSYSTEM_PLANNING_REVIEW.md +3 -3
  209. package/docs/EXTENSION_AUTHOR_CONTRACTS.md +4 -4
  210. package/docs/HISTORY_ATTESTATION.md +1 -1
  211. package/docs/HISTORY_MAINTENANCE.md +1 -1
  212. package/docs/LIFECYCLE_COMMANDS.md +1 -1
  213. package/docs/MCP_2026_07_28.md +16 -16
  214. package/docs/MCP_2026_07_28_CONFORMANCE.md +19 -19
  215. package/docs/MCP_REMOTE_TRANSPORT_SECURITY.md +22 -22
  216. package/docs/MCP_SKILLS_AND_APPS.md +1 -1
  217. package/docs/MERGE_SAFETY.md +6 -6
  218. package/docs/MUTATION_INTEGRITY.md +5 -5
  219. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +14 -14
  220. package/docs/PACKED_FIRST_RUN.md +1 -1
  221. package/docs/QUICKSTART.md +10 -10
  222. package/docs/README.md +21 -21
  223. package/docs/READ_OUTPUT_CONTRACTS.md +9 -9
  224. package/docs/RECURRENCE_RECOVERY_CONTRACTS.md +1 -1
  225. package/docs/RELEASING.md +19 -10
  226. package/docs/SCRIPTING.md +10 -10
  227. package/docs/SDK.md +183 -38
  228. package/docs/SDK_ARTIFACT_OUTPUT.md +1 -1
  229. package/docs/SDK_PRIMITIVE_INVENTORY.md +2 -2
  230. package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +7 -7
  231. package/docs/TESTING.md +1 -1
  232. package/docs/WORKFLOW_POLICIES.md +2 -2
  233. package/docs/WORKSPACE_POSITION_AND_LIFECYCLE.md +8 -8
  234. package/docs/agent-task-token-baseline.json +1 -1
  235. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
  236. package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -1
  237. package/docs/generated/FLAG_LEXICON_BUDGETS.md +112 -112
  238. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +13 -4
  239. package/docs/performance/cli-transport-overhead.md +7 -7
  240. package/marketplace.json +1 -1
  241. package/package.json +1 -1
  242. package/packages/pm-beads/package.json +1 -1
  243. package/packages/pm-calendar/package.json +1 -1
  244. package/packages/pm-command-kit/README.md +5 -5
  245. package/packages/pm-command-kit/package.json +1 -1
  246. package/packages/pm-digital-twin/GAP_REPORT.md +16 -16
  247. package/packages/pm-digital-twin/package.json +1 -1
  248. package/packages/pm-governance-audit/package.json +1 -1
  249. package/packages/pm-guide-shell/package.json +1 -1
  250. package/packages/pm-kanban/README.md +1 -1
  251. package/packages/pm-kanban/package.json +1 -1
  252. package/packages/pm-lifecycle-hooks/package.json +1 -1
  253. package/packages/pm-linked-test-adapters/package.json +1 -1
  254. package/packages/pm-search-advanced/package.json +1 -1
  255. package/packages/pm-templates/package.json +1 -1
  256. package/packages/pm-todos/package.json +1 -1
  257. package/packages/pm-vcs/GAP_REPORT.md +1 -1
  258. package/packages/pm-vcs/package.json +1 -1
  259. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  260. package/plugins/pm-claude/README.md +6 -6
  261. package/plugins/pm-claude/package.json +1 -1
  262. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  263. package/plugins/pm-codex/package.json +1 -1
  264. package/plugins/pm-codex/plugin.json +1 -1
  265. package/runtime-dependencies.json +1 -1
  266. package/dist/cli-bundle/chunks/chunk-7ZEFHFAU.js +0 -2
  267. package/dist/cli-bundle/chunks/chunk-B6UTLYLM.js +0 -3
  268. package/dist/cli-bundle/chunks/chunk-HBKD5HZB.js +0 -2
  269. package/dist/cli-bundle/chunks/chunk-L6LCLC37.js +0 -2
  270. package/dist/cli-bundle/chunks/chunk-NR4KABHC.js +0 -31
  271. package/dist/cli-bundle/chunks/chunk-PWD5RY2D.js +0 -2
  272. package/dist/cli-bundle/chunks/chunk-XRMYA4R7.js +0 -20
  273. package/dist/cli-bundle/chunks/chunk-YWS4XV4I.js +0 -6
  274. package/dist/cli-bundle/chunks/chunk-ZOAJNPBL.js +0 -129
  275. package/dist/cli-bundle/chunks/item-transaction-ZHLJTBD7.js +0 -2
  276. package/dist/cli-bundle/chunks/mutation-admission-ZQMRMGIB.js +0 -2
  277. package/dist/cli-bundle/chunks/register-operations-G3QGGQ5Z.js +0 -2
  278. package/dist/cli-bundle/chunks/register-setup-LDXHMNOT.js +0 -2
  279. package/dist/cli-bundle/focused-chunks/chunk-3XGKBVJ3.js +0 -2
  280. package/dist/cli-bundle/focused-chunks/chunk-4HY6EGPB.js +0 -2
  281. package/dist/cli-bundle/focused-chunks/chunk-AK2CI2GI.js +0 -2
  282. package/dist/cli-bundle/focused-chunks/chunk-HUXZCPWT.js +0 -26
  283. package/dist/cli-bundle/focused-chunks/chunk-IKXJ57XA.js +0 -8
  284. package/dist/cli-bundle/focused-chunks/chunk-MOY6KZGJ.js +0 -44
  285. package/dist/cli-bundle/focused-chunks/chunk-PWUTFKSI.js +0 -2
  286. package/dist/cli-bundle/focused-chunks/chunk-PZRB7IXH.js +0 -91
  287. package/dist/cli-bundle/focused-chunks/chunk-WSYPVBKS.js +0 -80
  288. package/dist/cli-bundle/focused-chunks/chunk-WXLG7HZ5.js +0 -3
  289. package/dist/cli-bundle/focused-chunks/chunk-WZDFCVLX.js +0 -12
  290. package/dist/cli-bundle/focused-chunks/chunk-YGO3FWA2.js +0 -2
  291. package/dist/cli-bundle/focused-chunks/chunk-YVLAP3BL.js +0 -23
  292. package/dist/cli-bundle/focused-chunks/chunk-ZYXQACPB.js +0 -2
  293. package/dist/cli-bundle/focused-chunks/item-transaction-PZ2FQ6B2.js +0 -2
  294. package/dist/cli-bundle/focused-chunks/mutation-admission-XOOK6XFH.js +0 -2
@@ -1,8 +1,8 @@
1
- import{a as Qh}from"./chunks/chunk-Y7H55PCY.js";import{a as bk,b as Tk,c as Ck,d as Sk}from"./chunks/chunk-UYNMKUGA.js";import{a as wk,b as Ek}from"./chunks/chunk-DEJHTFEF.js";import{b as q0,c as z0,d as H0,e as V0,f as K0,g as W0,h as Y0,i as X0,j as J0,k as Z0,l as Q0,m as ek,n as tk,o as rk,p as ok,q as nk,r as ik}from"./chunks/chunk-7ZEFHFAU.js";import{A as uk,B as mk,C as fk,D as _k,E as hk,F as gk,G as yk,a as Es,b as HO,c as VO,d as md,e as fd,f as _d,h as hd,i as gd,j as yd,k as bd,l as Td,m as Cd,n as Sd,o as wd,p as xd,q as Nd,r as Ld,s as Dd,t as $d,u as sk,v as ak,w as dk,x as ck,y as lk,z as pk}from"./chunks/chunk-HBKD5HZB.js";import{A as Jk,B as Zk,C as Qk,D as ex,E as tx,F as rx,G as ox,H as nx,I as ix,J as sx,K as ax,L as dx,M as cx,N as lx,O as px,P as ux,Q as mx,R as fx,S as _x,T as hx,U as gx,V as yx,W as bx,X as Tx,Y as Cx,Z as Sx,_ as wx,a as Ak,b as vk,c as Ok,d as Pk,e as Rk,f as Ik,g as Mk,h as kk,i as xk,j as Nk,k as Lk,l as Dk,m as $k,n as Fk,o as Gk,p as Uk,q as jk,r as Bk,s as qk,t as zk,u as Hk,v as Vk,w as Kk,x as Wk,y as Yk,z as Xk}from"./chunks/chunk-JPKIUWLG.js";import{$ as Lm,$a as P_,$b as Ph,A as bm,Aa as Xf,Ab as th,B as Tm,Ba as Jf,Bb as rh,C as Sm,Ca as Zf,Cb as oh,D as wm,Da as Qf,Db as nh,E as qt,Ea as e_,Eb as ih,F as zt,Fa as t_,Fb as sh,G as Ht,Ga as r_,Gb as ah,H as Vt,Ha as o_,Hb as dh,I as Kt,Ia as n_,Ib as ch,J as Wt,Ja as i_,Jb as lh,K as Yt,Ka as s_,Kb as ph,L as Xt,La as a_,Lb as uh,M as Jt,Ma as d_,Mb as mh,N as Zt,Na as c_,Nb as fh,O as Qt,Oa as l_,Ob as _h,P as Em,Pa as p_,Pb as hh,Q as Am,Qa as u_,Qb as gh,R as vm,Ra as m_,Rb as yh,S as Om,Sa as f_,Sb as bh,T as Pm,Ta as er,Tb as Th,U as Xe,Ua as ge,Ub as Ch,V as Rm,Va as S_,Vb as Sh,W as Im,Wa as w_,Wb as wh,X as Mm,Xa as E_,Xb as Eh,Y as km,Ya as A_,Yb as Ah,Z as xm,Za as v_,Zb as vh,_ as Nm,_a as O_,_b as Oh,a as lO,aa as Dm,ab as R_,ac as Rh,b as pO,ba as E0,bb as I_,bc as Ih,c as uO,ca as A0,cb as M_,cc as Mh,d as mO,da as v0,db as k_,dc as kh,e as fO,ea as Ym,eb as x_,ec as xh,f as _O,fa as Xm,fb as N_,fc as Nh,g as bO,ga as Jm,gb as L_,gc as Lh,h as TO,ha as Gf,hb as D_,hc as Dh,i as CO,ia as Uf,ib as $_,ic as $h,j as SO,ja as L0,jb as F_,jc as Fh,k as As,ka as D0,kb as G_,kc as Gh,l as LR,la as $0,lb as U_,lc as Uh,m as DR,ma as F0,mb as j_,mc as jh,n as $R,na as G0,nb as B_,nc as Bh,o as FR,oa as U0,ob as q_,oc as qh,p as GR,pa as j0,pb as z_,pc as zh,q as UR,qa as B0,qb as H_,qc as Hh,r as Ml,ra as jf,rb as V_,rc as Vh,s as au,sa as Bf,sb as K_,sc as Kh,t as du,ta as qf,tb as W_,tc as Wh,u as pu,ua as zf,ub as Y_,uc as Yh,v as uu,va as Hf,vb as X_,vc as Xh,w as Mu,wa as Vf,wb as J_,wc as Jh,x as Fu,xa as Kf,xb as Z_,xc as Zh,y as pM,ya as Wf,yb as Q_,z as Ye,za as Yf,zb as eh}from"./chunks/chunk-5IPXDZKU.js";import{e as qR,f as zR,g as kl,h as xl,i as Ut}from"./chunks/chunk-B6UTLYLM.js";import{A as m0,B as f0,C as _0,D as h0,E as g0,F as y0,G as b0,H as T0,I as C0,J as S0,K as w0,L as Gm,M as Um,N as jm,O as Bm,P as qm,Q as zm,R as Hm,S as Vm,T as Km,U as Wm,a as WI,b as YI,c as XI,d as JI,e as ZI,f as su,g as QI,h as eM,i as tM,j as rM,k as oM,m as Cm,n as $m,o as r0,p as o0,q as n0,r as i0,s as s0,t as a0,u as Fm,v as d0,w as c0,x as l0,y as p0,z as u0}from"./chunks/chunk-YWS4XV4I.js";import{$ as fR,$a as lp,$b as fu,$c as uf,A as qP,Aa as Gl,Ab as Yp,Ad as Ff,B as zP,Ba as Ul,Bb as Xp,Bc as ju,Bd as __,C as HP,Ca as jl,Cb as Jp,Cc as Bu,Cd as h_,D as VP,Da as Bl,Db as Zp,Dc as um,Dd as g_,E as KP,Ea as ql,Eb as Qp,Ec as mm,Ed as y_,F as We,Fa as zl,Fb as eu,Fd as b_,G as WP,Ga as Hl,Gb as tu,Gc as fm,Gd as T_,H as Nt,Ha as Vl,Hb as ru,Hc as _m,Hd as C_,I as YP,Ia as Kl,Ib as ou,Ic as hm,J as XP,Ja as Wl,Jb as nu,Jc as gm,K as JP,Ka as Yl,Kb as UI,Kc as ym,L as ZP,La as Xl,Lb as jI,Lc as Zm,M as QP,Ma as Jl,Mb as BI,Mc as Qm,N as eR,Na as Zl,Nb as qI,Nc as ef,O as tR,Oa as Ql,Ob as zI,Oc as tf,P as rR,Pa as ep,Pb as HI,Pc as rf,Q as oR,Qa as tp,Qb as VI,Qc as of,R as nR,Ra as rp,Rb as KI,Rc as nf,S as iR,Sa as KR,Sb as iu,Sc as sf,T as sR,Ta as op,Tb as nM,Tc as af,U as aR,Ua as np,Ub as iM,Uc as k0,V as dR,Va as ip,Vb as sM,Vc as x0,W as cR,Wa as sp,Wb as aM,Wc as N0,X as lR,Xa as WR,Xb as dM,Xc as df,Y as pR,Ya as ap,Yb as cu,Yc as cf,Z as uR,Za as dp,Zb as lu,Zc as lf,_ as mR,_a as cp,_b as mu,_c as pf,a as NP,aa as _R,ab as pp,ad as mf,b as Mt,ba as hR,bb as YR,bc as _u,bd as ff,c as LP,ca as gR,cb as XR,cc as hu,cd as _f,d as Ve,da as yR,db as JR,dc as gu,dd as hf,e as te,ea as bR,eb as ZR,ec as yu,ed as gf,f as kc,fa as TR,fb as QR,fc as bu,fd as yf,gb as eI,gc as Tu,gd as bf,ha as _l,hb as tI,hc as Cu,hd as Tf,i as Ke,ia as hl,ib as CI,ic as Su,id as Cf,j as xc,ja as gl,jb as SI,jc as wu,jd as Sf,k as Nc,ka as yl,kb as wI,kc as Eu,kd as wf,la as bl,lb as EI,lc as Au,ld as Ef,m as he,mb as AI,mc as vu,md as Af,n as Lc,na as Tl,nb as vI,nc as Ou,nd as vf,o as Dc,oa as Cl,ob as OI,oc as Pu,od as Of,p as $c,pa as Sl,pb as xI,pc as Ru,q as Fc,qa as wl,qb as NI,qd as Pf,r as DP,ra as jR,rb as Hp,rc as cM,rd as Rf,s as $P,sa as BR,sb as Vp,sc as lM,sd as If,t as FP,ta as El,tb as LI,tc as Iu,td as Mf,u as GP,ua as Al,ub as DI,uc as Gu,ud as kf,v as UP,va as vl,vb as $I,vd as xf,w as kt,wa as Ol,wb as FI,wd as Nf,x as jP,xa as Pl,xb as GI,xd as Lf,y as BP,ya as Rl,yb as Kp,yd as Df,z as xt,za as Il,zb as Wp,zc as Uu,zd as $f}from"./chunks/chunk-NR4KABHC.js";import{k as bc}from"./chunks/chunk-PWD5RY2D.js";import{A as NR,Aa as sl,B as Jc,C as Zc,Ca as al,D as Qc,Da as dl,E as el,Ea as cl,F as Lt,Fa as ll,Ga as pl,Ia as ul,Ja as ml,Ka as fl,a as OO,b as PO,c as RO,d as IO,e as MO,f as kO,g as vs,h as Os,i as Ps,j as Rs,k as Is,la as Dt,m as CR,ma as $t,na as Ft,oa as Gt,pa as tl,ra as rl,sa as ol,ta as nl,v as IR,w as MR,y as kR,z as xR,za as il}from"./chunks/chunk-MQJXZX3Q.js";import{$ as kP,$a as cI,$b as IM,Aa as Pp,Ab as Lu,Ac as Zu,Ba as Rp,Bb as Du,Bc as Qu,C as bP,Ca as Ip,Cb as $u,Cc as em,D as TP,Da as Mp,Db as uM,Dc as tm,E as CP,Ea as kp,Eb as qu,Ec as rm,F as SP,Fa as xp,Fb as zu,Fc as om,G as wP,Ga as Np,Gb as Hu,Gc as nm,H as EP,Ha as Lp,Hb as Vu,Hc as im,I as AP,Ia as Dp,Ib as mM,Ic as sm,J as vP,Ja as $p,Jb as fM,Jc as am,K as Tc,Ka as Fp,Kb as _M,Kc as dm,L as Cc,La as Gp,Lb as hM,Lc as cm,M as Sc,Ma as Up,Mb as gM,Mc as Bt,N as wc,Na as jp,Nb as yM,Nc as lm,O as Ec,Oa as Bp,Ob as bM,Oc as ZM,P as Ac,Pa as qp,Pc as QM,Q as vc,Qa as zp,Qb as Ku,Qc as e0,R as Oc,Rb as TM,Rc as pm,S as Pc,Sb as CM,Sc as t0,T as Rc,Tb as SM,Tc as O0,U as Ic,Ua as rI,Ub as wM,Uc as P0,V as He,Va as oI,Vb as EM,Vc as R0,W as OP,Wa as nI,Wb as AM,Wc as I0,X as PP,Xa as iI,Xb as vM,Xc as M0,Y as RP,Ya as sI,Yb as OM,Z as IP,Za as aI,Zb as PM,_ as MP,_a as dI,_b as RM,a as wO,aa as xP,ab as lI,ac as MM,b as EO,ba as Mc,bb as pI,bc as kM,c as AO,ca as Nl,cb as uI,cc as xM,d as vO,da as Ll,db as mI,dc as NM,e as oP,ea as Dl,eb as fI,ec as LM,f as nP,fa as $l,fc as DM,g as iP,ga as HR,gc as $M,h as sP,ha as VR,hc as FM,i as aP,ib as _I,ic as GM,j as dP,ja as Fl,jc as UM,k as cP,ka as up,kb as hI,kc as jM,l as lP,la as mp,lb as gI,lc as BM,m as pP,ma as fp,mc as qM,n as uP,na as _p,nc as zM,o as mP,oa as hp,ob as yI,oc as HM,p as fP,pa as gp,pb as bI,pc as VM,q as _P,qa as yp,qb as TI,qc as KM,r as hP,ra as bp,rc as WM,s as gP,sa as Tp,sb as PI,sc as YM,t as yP,ta as Cp,tb as RI,tc as XM,ua as Sp,ub as II,uc as JM,va as wp,vb as MI,vc as jt,wa as Ep,wb as kI,wc as Wu,xa as Ap,xb as ku,xc as Yu,ya as vp,yb as xu,yc as Xu,za as Op,zb as Nu,zc as Ju}from"./chunks/chunk-XRMYA4R7.js";import{b as hO,c as gO,d as yO}from"./chunks/chunk-L6LCLC37.js";import{$ as oA,$a as Ki,$b as rs,$c as Pt,$d as pa,$e as pd,$f as lc,Ac as ps,Ad as Gs,Ae as Fa,Af as Jd,Bb as hv,Bc as us,Bd as Us,Be as Ga,Bf as Zd,Cc as ms,Cd as js,Ce as Ua,Cf as Qd,Dc as fs,Dd as Bs,De as ja,Df as ec,Ec as _s,Ed as qs,Ee as Ba,Ef as tc,Fa as PA,Fb as gv,Fc as hs,Fd as zs,Fe as qa,Ff as rc,G as KT,Ga as RA,Gb as yv,Gc as gs,Gd as Hs,Ge as za,Gf as oc,Ha as IA,Hb as bv,Hc as ys,Hd as Vs,He as Ha,Hf as nc,I as rC,Ia as MA,Ib as es,Ic as bs,Id as Ks,Ie as Va,If as ic,J as oC,Ja as kA,Jb as Tv,Jc as Ts,Je as Ka,Jf as sc,K as nC,Ka as xA,Kc as Cs,Kd as Ws,Ke as Wa,Kf as ac,L as iC,La as GA,Lb as Cv,Lc as Ss,Ld as Ys,Le as Ya,M as pC,Ma as UA,Mb as Sv,Mc as ws,Md as Xs,Me as Xa,Mf as KO,N as uC,Na as jA,Nb as wv,Nc as Xv,Nd as Js,Ne as Ja,Nf as WO,O as At,Oa as vt,Ob as Ev,Oc as Jv,Od as Zs,Oe as Za,P as aS,Pb as Av,Pc as Zv,Pd as Qs,Pe as Qa,Q as dS,Qa as BA,Qb as vv,Qc as Qv,Qd as ea,Qe as ed,Qf as YO,R as cS,Ra as qA,Rb as Ov,Rc as eO,Rd as ta,Re as td,Rf as XO,Sa as zA,Sb as Pv,Sc as tO,Sd as ra,Se as rd,Sf as JO,T as lS,Ta as HA,Tb as Rv,Tc as rO,Td as oa,Te as od,Tf as ZO,U as pS,Ua as VA,Ub as Iv,Uc as oO,Ud as na,Ue as nd,Uf as QO,Vb as Ot,Vc as nO,Vd as ia,Ve as id,Vf as eP,W as uS,Wb as Mv,Wc as iO,Wd as sa,We as sd,Wf as tP,X as mS,Xa as KA,Xc as sO,Xd as aa,Xe as ad,Xf as rP,Y as fS,Yb as kv,Yd as da,Ye as dd,Z as tA,Zd as ca,Ze as cd,Zf as dc,_ as rA,_b as ts,_d as la,_e as ld,_f as cc,a as ST,aa as nA,ac as os,ad as aO,ae as ua,ag as pc,ba as fA,bc as ns,bd as dO,be as ma,bf as ze,bg as uc,cd as cO,ce as fa,cf as ee,cg as mc,da as qi,db as rv,dc as is,dd as xO,de as _a,df as ud,dg as fc,ea as zi,eb as ov,ec as ss,ed as NO,ee as ha,ef as Ed,eg as _c,f as nn,fa as Hi,fb as nv,fc as as,fd as LO,fe as ga,ff as Ad,fg as hc,g as wT,gb as iv,gc as ds,gd as Be,ge as ya,gf as vd,gg as gc,h as ET,ha as _A,hc as cs,hd as DO,he as ba,hf as Od,hg as yc,i as AT,ia as hA,ib as sv,ic as ls,id as $O,ie as Ta,if as Pd,ig as It,j as vT,ja as gA,jb as av,jc as xv,jd as FO,je as Ca,jf as Rd,k as OT,ka as yA,kb as dv,kc as Nv,kd as Rt,ke as Sa,kf as Id,l as PT,la as bA,lb as cv,lc as Lv,ld as qe,le as wa,lf as Md,ma as TA,mb as Ji,mc as Dv,md as GO,me as Ea,mf as kd,n as RT,na as CA,nb as Zi,nc as $v,nd as UO,ne as Aa,nf as Fd,oc as Fv,od as jO,oe as va,of as Gd,p as IT,pa as SA,pb as Qi,pc as Gv,pd as BO,pe as Oa,pf as Ud,q as MT,qb as lv,qc as Uv,qd as qO,qe as Pa,qf as jd,r as kT,ra as wA,rc as jv,rd as zO,re as Ra,rf as Bd,sa as EA,sb as pv,sc as Bv,sd as Ms,se as Ia,sf as qd,t as xT,ta as AA,tb as uv,tc as qv,td as ks,te as Ma,tf as zd,u as NT,ua as vA,ub as mv,uc as zv,ud as xs,ue as ka,uf as Hd,va as OA,vc as Hv,vd as Ns,ve as xa,vf as Vd,w as LT,wb as fv,wc as Vv,wd as Ls,we as Na,wf as Kd,x as DT,xc as Kv,xd as Ds,xe as La,xf as Wd,y as $T,yc as Wv,yd as $s,ye as Da,yf as Yd,zb as _v,zc as Yv,zd as Fs,ze as $a,zf as Xd}from"./chunks/chunk-ZOAJNPBL.js";import"./chunks/chunk-SPPHDVZE.js";import"./chunks/chunk-UJMQP2HP.js";import{a as SR,b as wR,c as ER,d as AR,e as vR,f as OR,g as PR,h as qc,i as zc,j as Hc,k as Vc,l as Kc,m as RR,n as Wc,o as Yc,p as Xc}from"./chunks/chunk-2CBHQXYJ.js";import"./chunks/chunk-IB7UB5TE.js";import{$ as Tt,$b as TC,$c as GC,$e as ti,$f as Ti,$g as Vw,$h as UE,$i as ev,A as Fo,Aa as GT,Ac as MC,Ad as Dn,Ae as xS,Ah as bE,Ai as aA,B as Go,Ba as UT,Bb as St,Be as NS,Bf as HS,Bh as TE,Bi as dA,C as Uo,Cd as rS,Ce as LS,Cf as VS,Cg as Cw,Ch as CE,Ci as cA,D as jo,Db as wt,Dd as oS,De as DS,Df as KS,Dg as Sw,Dh as SE,Di as lA,E as Bo,Ea as hn,Ed as nS,Ee as $S,Ef as WS,Eg as ww,Eh as wE,Ei as pA,F as qo,Fa as jT,Fb as vn,Fc as In,Fd as iS,Fe as FS,Ff as YS,Fg as Ew,Fh as EE,Fi as uA,G as zo,Ga as BT,Gb as On,Gc as kC,Gd as sS,Ge as Xn,Gf as XS,Gg as Aw,Gh as Ui,Gi as mA,H as De,Ha as qT,Hb as _e,Hd as _S,He as Jn,Hf as JS,Hg as vw,Hh as AE,I as $e,Ia as zT,Ic as xC,Id as hS,Ie as D,If as ZS,Ig as Ow,J as Ho,Jb as eC,Jd as gS,Je as Zn,Jf as QS,Jg as Pw,K as Vo,Ka as gn,Kd as yS,Kf as ew,Kg as Rw,Kh as vE,L as Ko,La as yn,Lb as tC,Ld as bS,Lf as tw,Lg as Iw,Lh as OE,Li as NA,M as Wo,Ma as Ge,Mb as sC,Md as TS,Mg as Mw,Mh as PE,N as Yo,Na as HT,Nb as aC,Ng as kw,Nh as RE,O as Xo,Oa as VT,Ob as dC,Of as rw,Og as xw,Oh as IE,Oi as LA,P as Jo,Pa as bn,Pb as cC,Pe as je,Pf as ow,Pg as Nw,Ph as ME,Pi as DA,Q as Zo,Qa as Tn,Qb as lC,Qe as Qn,Qf as nw,Qg as Lw,R as Qo,Rb as mC,Rf as iw,Rg as Dw,Rh as kE,S as en,Sa as Cn,Sb as Ue,Sd as CS,Sf as sw,Sg as $w,Sh as xE,Si as $A,T as tn,Tb as Et,Tf as aw,Tg as Fw,Ti as Vi,U as rn,Ub as fC,Uc as NC,Uf as dw,Ug as Gw,Ui as FA,V as on,Vb as _C,Vc as LC,Vd as $n,Vf as cw,Vg as Uw,Vh as NE,Vi as WA,Wb as hC,Wc as DC,Wd as SS,Wf as lw,Wg as jw,Wh as LE,Wi as YA,Xb as gC,Xd as Fn,Xe as GS,Xf as pw,Xg as Bw,Xh as DE,Xi as XA,Yb as z,Yc as $C,Ye as US,Yf as uw,Yg as qw,Yh as $E,Yi as JA,Zb as yC,Zc as FC,Zd as wS,Ze as jS,Zf as mw,Zg as zw,Zh as FE,Zi as ZA,_ as bt,_b as bC,_e as ei,_g as Hw,_h as GE,_i as QA,a as R,aa as cn,ac as CC,ad as Mn,af as ri,ag as Ci,ah as Kw,ai as jE,aj as tv,b as lT,ba as ln,bc as SC,bf as oi,bg as Si,bh as Ww,bi as BE,bj as Wi,c as yt,ca as pn,cc as wC,cd as kn,ce as ES,cf as ni,cg as wi,ch as Yw,ci as qE,cj as Yi,d as pT,db as Sn,dc as EC,dd as xn,df as ii,dg as Ei,dh as Xw,di as zE,dj as Xi,e as uT,eb as wn,ee as AS,ef as si,eg as Ai,eh as Jw,ei as HE,f as mT,fb as En,fe as vS,ff as ai,fg as vi,fh as Zw,fi as VE,g as fT,ga as un,gc as AC,gd as UC,ge as Gn,gf as di,gg as Oi,gh as Qw,h as _T,hb as An,hd as jC,he as Un,hf as ci,hg as Pi,hh as eE,hi as KE,i as hT,ia as mn,ic as Pn,id as BC,if as li,ig as Ri,ih as tE,ii as ji,j as gT,ja as fn,jc as Rn,jd as qC,je as jn,jf as pi,jg as Ii,jh as rE,ji as Bi,k as yT,ka as _n,kb as WT,kd as zC,ke as Bn,kf as ui,kg as Mi,kh as oE,l as bT,lb as YT,ld as HC,le as qn,lf as mi,lg as ki,lh as nE,m as TT,md as VC,me as zn,mf as fi,mg as xi,mh as iE,n as CT,nd as Nn,ne as Hn,nf as BS,ng as Ni,nh as sE,o as Ro,od as KC,oe as OS,of as qS,og as Li,oh as aE,oi as WE,p as Io,pd as WC,pe as PS,pf as _i,pg as Di,ph as dE,pi as YE,q as Mo,qb as XT,qf as zS,qg as $i,qh as cE,qi as XE,r as ko,rf as hi,rg as Fi,rh as lE,ri as JE,s as Ne,sd as YC,se as Vn,sf as gi,sg as Gi,sh as pE,t as xo,tb as JT,td as XC,te as Kn,tf as yi,tg as fw,th as uE,ti as ZE,u as L,uc as vC,ud as JC,ue as RS,uf as bi,ug as _w,uh as mE,ui as QE,v as Le,vd as ZC,ve as Wn,vg as hw,vh as fE,w as No,wb as ZT,wc as OC,wd as QC,we as Yn,wg as gw,wh as _E,wi as eA,x as Lo,xc as PC,xd as eS,xe as IS,xg as yw,xh as hE,y as Do,yc as RC,yd as Ln,ye as MS,yg as bw,yh as gE,yi as iA,z as $o,za as FT,zb as QT,zc as IC,zd as tS,ze as kS,zg as Tw,zh as yE,zi as sA}from"./chunks/chunk-32BCU6HN.js";import{a as Gc,b as Uc,e as jc,f as Bc}from"./chunks/chunk-RSAN2YUU.js";import"./chunks/chunk-VS565KBX.js";import{A as me,B as cT,C as b,E as sn,F as Ct,G as fe,H as an,K as Fe,M as dn,b as rT,c as oT,d as nT,m as iT,r as sT,u as aT,y as dT}from"./chunks/chunk-O4ZLEN4T.js";import"./chunks/chunk-XAWE4EAK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var H="2026-07-28",rr=["2025-11-25","2025-06-18"],re=[H],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},E={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},tr=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function eg(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:E.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:E.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function tg(e){if(e!==void 0){if(typeof e!="string"||!tr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:E.logLevel,allowed:[...tr]});return e}}function Je(e){let t=h(e)?e._meta:void 0;if(!h(t))throw new u("Missing required MCP request metadata",m.invalidParams,{required:[E.protocolVersion,E.clientCapabilities]});let r=t[E.protocolVersion];if(typeof r!="string"||!re.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...re],requested:typeof r=="string"?r:null});let o=t[E.clientCapabilities];if(!h(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:E.clientCapabilities,expected:"object"});let n=eg(t[E.clientInfo]),s=tg(t[E.logLevel]);return{protocolVersion:H,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function Ex(e,t){if(t!==e.protocolVersion)throw new u("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function Ax(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function vx(e,t){let r=e.clientCapabilities.extensions;return h(r)&&h(r[t])}function Ze(e,t){let r=h(e._meta)?e._meta:{};return{...e,_meta:{...r,[E.serverInfo]:{...t}}}}function rg(e,t){return Ze({...e,resultType:"complete"},t)}function Ox(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new u("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return rg({supportedVersions:[...re],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function Px(e,t){if(h(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new u("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}(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]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var og=new Set(["--help","-h","--version","-V"]);function ng(e,t){let r=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&r.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),r.push("",`MCP protocol: ${re.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${rr.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${t}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${t} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),r.join(`
2
- `)}function Mx(e,t,r){if(e.length===0)return{kind:"serve"};let o=e.find(n=>!og.has(n));if(o!==void 0){let n=t==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(o)}. Run ${n} --help.
3
- `}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?ng(t,r):`${r}
4
- `,stderr:""}}import{createHash as ir,createHmac as sr,timingSafeEqual as ig}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]="15b81dd0-ef1a-58be-b6ee-5975b6778993")}catch{}})();var sg=["elicitation/create","roots/list","sampling/createMessage"],or=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},ar=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,ye=32,et=64*1024,be=16*1024,Qe={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function ag(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function Te(e,t,r){let o;try{o=JSON.stringify(e)}catch{throw new u(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new u(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function tt(e,t){if(!h(e))throw new u("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>ye)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:ye,observed:r.length});let o={};for(let[n,s]of r){if(!ar.test(n)||!h(s))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let i=s.method;if(typeof i!="string"||!sg.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=ag(i);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!h(s.params))throw new u("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${n}.params`,expected:"object"});o[n]={method:i,params:structuredClone(s.params)}}return Te(o,et,"inputRequests"),o}function dr(e){if(!h(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>ye)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:ye,observed:t.length});let r={};for(let[o,n]of t){if(!ar.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return Te(r,et,"inputResponses"),r}function Lx(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>be)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:be});let r=e.inputRequests===void 0?void 0:tt(e.inputRequests,e.requestContext);if(r===void 0&&!t)throw new u("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[E.serverInfo]:{...e.serverInfo}}}}function cr(e){let t=Buffer.from(e);if(t.byteLength<32)throw new u("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function Dx(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new u("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>be/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:be/2});let o=r.toString("base64url"),n=sr("sha256",cr(t)).update(o).digest("base64url");return`${o}.${n}`}function dg(e){if(!h(e)||e.version!==1)throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}}function $x(e,t,r){let[o,n,s]=e.split(".");if(!o||!n||s!==void 0)throw new u("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let i=Buffer.from(n,"base64url"),a=sr("sha256",cr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!ig(i,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let d;try{d=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{d=null}let c=dg(d),{expiresAt:l,method:p,parameterDigest:f,principal:_}=c;if(l<(r.nowMs??Date.now()))throw new u("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(p!==r.method||f!==r.parameterDigest||_!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return c}function Fx(e){return Te(e,et,"request parameters"),ir("sha256").update(JSON.stringify(e)).digest("hex")}var nr=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new u("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=ir("sha256").update(t).digest("hex");if(this.#e.has(r))throw new u("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function cg(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new u("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function Gx(e,t){return{...e,...cg(t)}}function lg(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function pg(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(lg)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function ug(e){let t=e.maxBytes??Qe.maxBytes,r=e.maxDepth??Qe.maxDepth,o=e.maxNodes??Qe.maxNodes;if(!Number.isSafeInteger(t)||t<2)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function mg(e,t){let r=Array.isArray(e.value)?e.value:h(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function fg(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&pg(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function Ux(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=ug(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});Te(e,r,"JSON Schema");let s=[{value:e,depth:0}],i=0;for(;s.length>0;){let a=s.pop();if(i+=1,i>n||a.depth>o)throw new u("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});fg(e,a.value),mg(a,s)}return structuredClone(e)}import{randomUUID as _g}from"node:crypto";import{readFile as hg}from"node:fs/promises";import lr 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]="f3e94896-b2a0-561c-902b-71c28ddde2a1")}catch{}})();var Wx="io.modelcontextprotocol/tasks",gg=["working","input_required","completed","failed","cancelled"],yg=/^mcp-task-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu,bg=3600*1e3,Tg=1e3,Se=1024,Cg=30,Sg=2e3;function rt(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function Ce(e){let t=e.trim();if(!yg.test(t))throw rt("Unknown MCP task");return t}function pr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new u("Corrupt MCP task record",m.invalidParams,{field:t});return e}function ur(e){if(!h(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new u("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,Se),...h(e.data)?{data:structuredClone(e.data)}:{}}}function wg(e){if(!gg.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Eg(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function Ag(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function vg(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Og(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new u("Corrupt MCP task record",m.invalidParams);return e}}function Pg(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function Rg(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?Ce(e.taskId):"",r=wg(e.status),o=Eg(e.principal),n=Ag(e.workerPid),s=vg(e.ttlMs),i=Og(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:pr(e.createdAt,"createdAt"),lastUpdatedAt:pr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:Pg(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Se)}:{},...typeof i=="number"?{pollIntervalMs:i}:{}};if(h(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),h(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),h(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=ur(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new u("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function V(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function oe(e){return e==="completed"||e==="failed"||e==="cancelled"}function Ig(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var ot=class{#e;#t;#r;#o;#i;constructor(t){this.#e=lr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${_g()}`),this.#i=t.workerPid??process.pid}#s(t){return lr.join(this.#e,"runtime","mcp-tasks","records",`${Ce(t)}.json`)}async#d(t){try{return Rg(JSON.parse(await hg(this.#s(t),"utf8")))}catch(r){throw fe(r)||r instanceof SyntaxError?rt("Unknown MCP task"):r}}async#a(t){await Fe(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
5
- `)}async#n(t,r,o){let n=Ce(t),s=await je(this.#e,n,Cg,this.#t,!1,!1,Sg);try{let i=await this.#d(n);if(i.principal!==r)throw rt("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=Ce(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?bg:t.ttlMs,s=t.pollIntervalMs??Tg;if(o.length===0||n!==null&&(!Number.isSafeInteger(n)||n<0)||!Number.isSafeInteger(s)||s<0)throw new u("Invalid MCP task creation options",m.invalidParams);let i=this.#r().toISOString(),a={version:1,taskId:r,status:"working",createdAt:i,lastUpdatedAt:i,ttlMs:n,pollIntervalMs:s,principal:o,workerPid:this.#i,consumedInputKeys:[],...t.statusMessage?.trim()?{statusMessage:t.statusMessage.trim().slice(0,Se)}:{}};return await this.#a(a),{...V(a),resultType:"task"}}async get(t,r){return V(await this.#n(t,r,o=>{if(oe(o.status))return o;let n=this.#r().getTime(),s=o.ttlMs!==null&&Date.parse(o.createdAt)+o.ttlMs<=n,i=o.workerPid!==this.#i&&!Ig(o.workerPid);return!s&&!i?o:{...o,status:"failed",statusMessage:s?"Task retention expired before completion.":"Task worker ended before recording a terminal result.",lastUpdatedAt:this.#r().toISOString(),error:{code:-32603,message:s?"MCP task expired":"MCP task worker unavailable after restart",data:{recoverable:!1,createNewTask:!0}},inputRequests:void 0}}))}async requireInput(t){let r=tt(t.inputRequests,t.requestContext);return V(await this.#n(t.taskId,t.principal,o=>{if(oe(o.status))return o;let n=Object.keys(r).filter(s=>o.consumedInputKeys.includes(s));if(n.length>0)throw new u("MCP task input request keys must be unique for the task lifetime",m.invalidParams,{reused:n});return{...o,status:"input_required",statusMessage:t.statusMessage?.trim().slice(0,Se),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=dr(o),s=[],i=[];return await this.#n(t,r,a=>{if(a.status!=="input_required"||!a.inputRequests)return a;let d={...a.inputRequests},c=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(d,l)&&(c[l]=p,delete d[l],s.push(l));return i=Object.keys(d).sort(),s.length===0?a:{...a,status:i.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:i.length===0?void 0:d,inputResponses:c,consumedInputKeys:[...new Set([...a.consumedInputKeys,...s])].sort()}}),{acceptedKeys:s.sort(),remainingKeys:i}}async takeInputResponses(t,r){let o={};return await this.#n(t,r,n=>(o=structuredClone(n.inputResponses??{}),Object.keys(o).length===0?n:{...n,inputResponses:void 0})),o}async complete(t,r,o){return V(await this.#n(t,r,n=>oe(n.status)?n:{...n,status:"completed",statusMessage:"Task completed.",lastUpdatedAt:this.#r().toISOString(),result:structuredClone(o),inputRequests:void 0,error:void 0}))}async fail(t,r,o){let n=ur(o);return V(await this.#n(t,r,s=>oe(s.status)?s:{...s,status:"failed",statusMessage:n.message,lastUpdatedAt:this.#r().toISOString(),error:n,inputRequests:void 0,result:void 0}))}async cancel(t,r){return V(await this.#n(t,r,o=>oe(o.status)?o:{...o,status:"cancelled",statusMessage:"Task cancelled by the client.",lastUpdatedAt:this.#r().toISOString(),inputRequests:void 0,result:void 0,error:void 0}))}};function Yx(e){return new ot(e)}(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]="15cbe26a-5716-5e8c-8700-eb36a1a056d6")}catch{}})();var we="io.modelcontextprotocol/subscriptionId",mr=256,fr=2048,Mg=5e3;function kg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),Mg);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function nt(e,t){if(e!==void 0){if(typeof e!="boolean")throw new u("Invalid MCP subscription filter",m.invalidParams,{field:`notifications.${t}`,expected:"boolean"});return e||void 0}}function xg(e){if(!h(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=nt(e.toolsListChanged,"toolsListChanged"),r=nt(e.promptsListChanged,"promptsListChanged"),o=nt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>mr)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:mr});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>fr)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:fr});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function Ng(e,t){return{...e.toolsListChanged&&t.tools?.listChanged?{toolsListChanged:!0}:{},...e.promptsListChanged&&t.prompts?.listChanged?{promptsListChanged:!0}:{},...e.resourcesListChanged&&t.resources?.listChanged?{resourcesListChanged:!0}:{},...e.resourceSubscriptions&&t.resources?.subscribe?{resourceSubscriptions:[...e.resourceSubscriptions]}:{}}}var _r=class{#e;#t=new Map;#r;constructor(t){this.#e=structuredClone(t.capabilities),this.#r={...t.serverInfo}}get size(){return this.#t.size}async open(t){if(this.#t.has(t.id))throw new u("MCP subscription id is already active",m.invalidParams,{subscriptionId:t.id});let r=Ng(xg(t.notifications),this.#e),o={filter:r,sink:t.sink,writeQueue:Promise.resolve()};this.#t.set(t.id,o);try{await this.#o(t.id,o,{jsonrpc:"2.0",method:"notifications/subscriptions/acknowledged",params:{_meta:{[we]:t.id},notifications:structuredClone(r)}},!0)}catch(n){throw this.#t.delete(t.id),n}return structuredClone(r)}async emitListChanged(t){let r=`${t}ListChanged`,o=`notifications/${t}/list_changed`,n=[];for(let[s,i]of this.#t)i.filter[r]===!0&&n.push(this.#o(s,i,{jsonrpc:"2.0",method:o,params:{_meta:{[we]:s}}}));return(await Promise.all(n)).filter(Boolean).length}async emitResourceUpdated(t){let r=[];for(let[o,n]of this.#t)n.filter.resourceSubscriptions?.includes(t)&&r.push(this.#o(o,n,{jsonrpc:"2.0",method:"notifications/resources/updated",params:{_meta:{[we]:o},uri:t}}));return(await Promise.all(r)).filter(Boolean).length}async#o(t,r,o,n=!1){let s=r.writeQueue.then(async()=>{if(this.#t.get(t)!==r)return!1;try{return await kg(r.sink,o),!0}catch(i){if(this.#t.get(t)===r&&this.#t.delete(t),n)throw i;return!1}});return r.writeQueue=s.then(()=>{},()=>{}),s}close(t){if(this.#t.delete(t))return{...Ze({resultType:"complete",_meta:{[we]:t}},this.#r)}}closeAll(){let t=[];for(let r of this.#t.keys()){let o=this.close(r);t.push({id:r,result:o})}return t}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3681273a-e101-57a0-9446-982c450e7183")}catch{}})();var hr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,Lg=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,gr=/^[\t\x20-\x7E]*$/u,yr=new Set(["prompts/get","resources/read","tools/call"]);function Dg(e){let t=new Map;for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let n=typeof o=="string"?o:o.join(", ");t.set(r.toLowerCase(),n)}return t}function A(e,t){throw new u(e,m.headerMismatch,{header:t})}function br(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&gr.test(t)&&!hr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function Tr(e,t){let r=hr.exec(e);if(r){let o=r[1],n=Buffer.from(o,"base64");return n.toString("base64")!==o||n.length===0?A("Malformed MCP Base64 header value",t):n.toString("utf8")}return e.length===0||e.trim()!==e||!gr.test(e)?A("Malformed MCP header value",t):e}function Ee(e){return Array.isArray(e)?e.some(Ee):h(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(Ee):!1}function $g(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!Lg.test(o)||!["boolean","integer","string"].includes(String(n))||r.has(o.toLowerCase()))throw new u("Invalid MCP x-mcp-header annotation",m.invalidParams,{field:t.join("."),annotation:o});return r.add(o.toLowerCase()),{name:o,path:t,type:n}}function Cr(e){if(!h(e))throw new u("Invalid MCP tool schema",m.invalidParams,{field:"inputSchema",expected:"object"});let t=[],r=new Set,o=(n,s)=>{let i=n.properties;if(i!==void 0){if(!h(i))throw new u("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,d]of Object.entries(i)){if(!h(d))continue;let c=[...s,a],l=$g(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&Ee(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:c.join("."),keyword:p});o(d,c)}}};for(let[n,s]of Object.entries(e))if(n!=="properties"&&Ee(s))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function Sr(e,t){let r=e;for(let o of t){if(!h(r))return;r=r[o]}return r}function wr(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function Fg(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Cr(t)){let s=Sr(r,n.path);if(s!=null){if(!(n.type==="integer"&&typeof s=="number"&&Number.isSafeInteger(s)||n.type==="boolean"&&typeof s=="boolean"||n.type==="string"&&typeof s=="string"))throw new u("Invalid MCP custom header argument",m.invalidParams,{field:n.path.join("."),expected:n.type});o[`Mcp-Param-${n.name}`]=br(s)}}return o}function eN(e){let t=h(e.request.params)?e.request.params:void 0,r=Je(t),o=e.request.method;if(typeof o!="string"||o.length===0)return A("Missing MCP request method","Mcp-Method");let n={Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":r.protocolVersion,"Mcp-Method":o},s=wr(o,t);if(yr.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=br(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,Fg(t,e.toolSchema)),n}function Gg(e,t){let r=t.method;(typeof r!="string"||r.length===0)&&A("Missing MCP request method","Mcp-Method");let o=h(t.params)?t.params:void 0,n=Je(o).protocolVersion;if(e.get("mcp-protocol-version")!==n&&A("MCP protocol header does not match request metadata","MCP-Protocol-Version"),e.get("mcp-method")!==r&&A("MCP method header does not match request body","Mcp-Method"),yr.has(r)){let s=e.get("mcp-name"),i=wr(r,o);(s===void 0||i===void 0||Tr(s,"Mcp-Name")!==i)&&A("MCP name header does not match request body","Mcp-Name")}e.has("last-event-id")&&A("MCP SSE resumability is not supported","Last-Event-ID")}function Ug(e,t,r){return e.type==="integer"?typeof t=="number"&&Number.isSafeInteger(t)&&Number(r)===t:e.type==="boolean"?typeof t=="boolean"&&r===String(t):typeof t=="string"&&r===t}function jg(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Cr(e.toolSchema)){let o=Sr(t,r.path),n=`Mcp-Param-${r.name}`,s=e.headers.get(n.toLowerCase());if(o==null){s!==void 0&&A("Unexpected MCP parameter header",n);continue}s===void 0&&A("Missing MCP parameter header",n),Ug(r,o,Tr(s,n))||A("MCP parameter header does not match request body",n)}}function tN(e){let t=Dg(e.headers),r=typeof e.request.method=="string"?e.request.method:"";Gg(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&jg({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var rN=H;import{AsyncLocalStorage as Bg}from"node:async_hooks";import{createHash as Er,timingSafeEqual as qg}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]="a7c30d99-a0e4-552e-be61-0c54a455e211")}catch{}})();var y=class extends Error{httpStatus;challenge;constructor(t,r,o){super(t),this.name="PmMcpAuthorizationError",this.httpStatus=r,this.challenge=o}},zg=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,Hg=/^[a-z][a-z0-9_*/-]{0,255}$/u,Vg=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,Kg=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,vr=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,Or=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,Wg=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,Yg=/%(?![0-9A-Fa-f]{2})/u,Xg=512,Jg=32,Zg=180,Qg=8192,ey=8192,Pr=new Bg;function w(e,t,r=!1){if(new RegExp("\\p{Cc}","u").test(e))throw new y(`Invalid ${t}`,401);let o;try{o=new URL(e)}catch{throw new y(`Invalid ${t}`,401)}let n=o.hostname==="127.0.0.1"||o.hostname==="localhost";if(o.hash.length>0||o.protocol!=="https:"&&!(r&&n&&o.protocol==="http:"))throw new y(`Invalid ${t}`,401);return o}function ty(e,t){let r=t.toLowerCase();for(let[o,n]of Object.entries(e))if(!(o.toLowerCase()!==r||n===void 0))return typeof n=="string"?n:n.join(", ")}function aN(e){let t=w(e.resource,"protected resource URI",!0).href.replace(/\/$/u,"");if(e.authorizationServers.length===0)throw new y("Protected resource metadata requires an authorization server",401);let r=e.authorizationServers.map(n=>w(n,"authorization server issuer").href.replace(/\/$/u,"")),o=[...new Set(e.scopes??[])];if(o.some(n=>!vr.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function dN(e){let t=w(e,"authorization server issuer"),r=t.pathname.replace(/^\/+|\/+$/gu,""),o=t.origin;return r?[`${o}/.well-known/oauth-authorization-server/${r}`,`${o}/.well-known/openid-configuration/${r}`,`${o}/${r}/.well-known/openid-configuration`]:[`${o}/.well-known/oauth-authorization-server`,`${o}/.well-known/openid-configuration`]}function cN(e,t){if(!h(e)||typeof e.issuer!="string")throw new y("Invalid authorization server metadata",401);let r=w(t,"expected issuer").href.replace(/\/$/u,"");if(w(e.issuer,"metadata issuer").href.replace(/\/$/u,"")!==r)throw new y("Authorization server issuer mismatch",401);if(!Array.isArray(e.code_challenge_methods_supported)||!e.code_challenge_methods_supported.includes("S256"))throw new y("Authorization server does not support required S256 PKCE",401);let o=d=>{let c=e[d];if(typeof c!="string")throw new y(`Authorization server metadata requires ${d}`,401);return w(c,d).href},n=d=>{let c=e[d];return typeof c=="string"?w(c,d).href:void 0},s=o("authorization_endpoint"),i=o("token_endpoint"),a=n("registration_endpoint");return{issuer:r,authorization_endpoint:s,token_endpoint:i,code_challenge_methods_supported:[...new Set(e.code_challenge_methods_supported.filter(d=>typeof d=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function lN(e){return e.hasPreRegisteredClient?"pre_registered":e.metadata.client_id_metadata_document_supported?"client_id_metadata_document":e.metadata.registration_endpoint?"dynamic":"user_supplied"}function pN(e){if(e.responseIssuer===void 0){if(e.issuerParameterSupported)throw new y("Authorization response omitted the advertised issuer",401);return}if(e.responseIssuer!==e.expectedIssuer)throw new y("Authorization response issuer mismatch",401)}function uN(e,t){let r=w(t,"client metadata document URL");if(r.pathname==="/"||!h(e)||e.client_id!==r.href||typeof e.client_name!="string"||e.client_name.trim().length===0||!Array.isArray(e.redirect_uris)||e.redirect_uris.length===0)throw new y("Invalid Client ID Metadata Document",401);for(let o of e.redirect_uris){if(typeof o!="string")throw new y("Invalid client redirect URI",401);w(o,"client redirect URI",!0)}return structuredClone(e)}function mN(e){if(e.redirectUris.length===0||e.clientName.trim().length===0)throw new y("Invalid dynamic client registration metadata",401);let t=e.redirectUris.map(r=>w(r,"redirect URI",!0).href);return{application_type:e.applicationType,client_name:e.clientName.trim().slice(0,128),redirect_uris:t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"}}var Ar=class{#e=new Map;set(t,r){let o=w(t,"credential issuer").href;this.#e.set(o,structuredClone(r))}get(t){let r=w(t,"credential issuer").href,o=this.#e.get(r);return o?structuredClone(o):void 0}delete(t){let r=w(t,"credential issuer").href;return this.#e.delete(r)}};function ry(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?zg.exec(t):null;if(!o)throw new y("Invalid MCP traceparent",403);let n=o[1],s=o[2];if(/^0+$/u.test(n)||/^0+$/u.test(s))throw new y("Invalid MCP traceparent",403)}if(r!==void 0&&(typeof r!="string"||!ny(r)))throw new y("Invalid MCP tracestate",403);return{...typeof t=="string"?{traceparent:t}:{},...typeof r=="string"?{tracestate:r}:{}}}function $(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function oy(e){return Hg.test(e)||Vg.test(e)}function ny(e){if(Buffer.byteLength(e,"utf8")>Xg)return!1;let t=e.split(",");if(t.length>Jg)return!1;let r=new Set;for(let o of t){let n=$(o);if(n.length===0)continue;let s=n.indexOf("="),i=s>0?n.slice(0,s):"",a=s>0?n.slice(s+1):"";if(!oy(i)||!Kg.test(a)||r.has(i))return!1;r.add(i)}return!0}function Rr(e){return Wg.test(e)&&!Yg.test(e)}function iy(e){let t=$(e),r=t.indexOf("="),o=$(r>=0?t.slice(0,r):t),n=r>=0?$(t.slice(r+1)):void 0;return Or.test(o)&&(n===void 0||Rr(n))}function sy(e){let t=$(e),r=t.split(";"),o=r[0],n=r.slice(1),s=o.indexOf("="),i=$(s>0?o.slice(0,s):""),a=s>0?$(o.slice(s+1)):"";if(!(!Or.test(i)||!Rr(a)||!n.every(iy)))return{key:i,serialized:t}}function ay(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>Qg)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>Zg)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=sy(s);if(!i)throw new y("Invalid MCP baggage",403);r.has(i.key)&&n.push(i.serialized)}return n.length>0?n.join(","):void 0}function fN(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=ay(r.baggage,t.baggageAllowlist??[]);return{...ry(r),...o?{baggage:o}:{}}}function _N(e,t){return Pr.run(structuredClone(e),t)}function hN(){let e=Pr.getStore();return e?{...e}:void 0}async function gN(e){let t=w(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!vr.test(c)))throw new y("Invalid authorization scope",401);let o=`Bearer resource_metadata="${t}"`;if(new URL(e.requestUrl,e.policy.resource).searchParams.has("access_token"))throw new y("Access tokens must not appear in URI query parameters",401,o);let n=ty(e.headers,"authorization")?.match(/^Bearer ([^\s]+)$/iu);if(!n)throw new y("Missing or malformed bearer token",401,o);let s=n[1];if(Buffer.byteLength(s,"utf8")>ey)throw new y("Missing or malformed bearer token",401,o);let i;try{i=await e.policy.verifyAccessToken(s)}catch{throw new y("Invalid bearer token",401,o)}let a=Array.isArray(i.audience)?i.audience:[i.audience];if(i.issuer!==e.policy.issuer||!a.includes(e.policy.resource))throw new y("Bearer token issuer or audience mismatch",401,o);let d=r.filter(c=>!i.scopes.includes(c));if(d.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${d.join(" ")}"`);return{...i,audience:[...a],scopes:[...i.scopes]}}function yN(e){let t=Er("sha256").update(e.token).digest();return r=>{let o=Er("sha256").update(r).digest();if(!qg(t,o))throw new y("Invalid bearer token",401);return structuredClone(e.claims)}}(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]="46f5fe59-6b84-5c68-ad07-bb1329f4ea29")}catch{}})();var it="io.modelcontextprotocol/ui",Ae="2026-01-26",kr="text/html;profile=mcp-app",Ir=Object.freeze({specVersion:Ae,mimeTypes:[kr]});function CN(e){let t=e.clientCapabilities.extensions;if(!h(t))return!1;let r=t[it];if(r===void 0)return!1;if(!h(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:Ir}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(kr)||n!==void 0&&n!==Ae)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:Ir}}});return!0}var dy={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},xr=Object.freeze([{id:"context",name:"Context explorer",description:"Inspect bounded project context, provenance, omissions, and token accounting.",toolName:"pm_context",uri:"ui://pm/context.html"},{id:"graph",name:"Relationship graph",description:"Explore typed relationships, explaining paths, and graph-governance evidence.",toolName:"pm_graph",uri:"ui://pm/graph.html"},{id:"plan",name:"Plan and milestone view",description:"Review durable plan steps, dependencies, decisions, discoveries, and validation state.",toolName:"pm_plan",uri:"ui://pm/plan.html"},{id:"assurance",name:"Assurance dashboard",description:"Inspect validation verdicts, evidence, omissions, and actionable recovery paths.",toolName:"pm_validate",uri:"ui://pm/assurance.html"},{id:"operations",name:"Long-operation view",description:"Inspect durable test and operation results without creating a second task store.",toolName:"pm_test",uri:"ui://pm/operations.html"}].map(e=>({...e,toolMeta:{resourceUri:e.uri,visibility:["model","app"]},resourceMeta:dy})));function SN(e){return xr.find(t=>t.uri===e)}function wN(e){let t=new Map(xr.map(r=>[r.toolName,r]));return e.map(r=>{let o=t.get(r.name);return o?{...r,_meta:{...r._meta,ui:o.toolMeta}}:{...r}})}function Mr(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function EN(e){let t=Mr(e.name),r=Mr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Ae}),n=JSON.stringify(Ae);return`<!doctype html>
1
+ import{a as ug}from"./chunks/chunk-335BZ75D.js";import{a as Nk,b as Lk,c as Dk,d as $k}from"./chunks/chunk-YKXATU2G.js";import{a as Fk,b as Gk}from"./chunks/chunk-HRCMORE7.js";import{b as nk,c as ik,d as sk,e as ak,f as dk,g as ck,h as lk,i as pk,j as uk,k as mk,l as fk,m as _k,n as hk,o as gk,p as yk,q as bk,r as Tk}from"./chunks/chunk-XLSHFYXZ.js";import{A as Ok,B as Rk,C as Ik,D as Pk,E as Mk,F as kk,G as xk,a as xs,b as gR,c as yR,d as Ed,e as Sd,f as wd,h as Ad,i as vd,j as Od,k as Rd,l as Id,m as Pd,n as Md,o as kd,p as Bd,q as qd,r as zd,s as Hd,t as Vd,u as Ck,v as Ek,w as Sk,x as wk,y as Ak,z as vk}from"./chunks/chunk-D7KYPRK4.js";import{A as ux,B as mx,C as fx,D as _x,E as hx,F as gx,G as yx,H as bx,I as Tx,J as Cx,K as Ex,L as Sx,M as wx,N as Ax,O as vx,P as Ox,Q as Rx,R as Ix,S as Px,T as Mx,U as kx,V as xx,W as Nx,X as Lx,Y as Dx,Z as $x,_ as Fx,a as Uk,b as jk,c as Bk,d as qk,e as zk,f as Hk,g as Vk,h as Kk,i as Wk,j as Yk,k as Xk,l as Jk,m as Zk,n as Qk,o as ex,p as tx,q as rx,r as ox,s as nx,t as ix,u as sx,v as ax,w as dx,x as cx,y as lx,z as px}from"./chunks/chunk-F6NDMKZ4.js";import{$ as Wm,$a as j_,$b as jh,A as km,Aa as c_,Ab as fh,B as xm,Ba as l_,Bb as _h,C as Lm,Ca as p_,Cb as hh,D as Dm,Da as u_,Db as gh,E as qt,Ea as m_,Eb as yh,F as zt,Fa as f_,Fb as bh,G as Ht,Ga as __,Gb as Th,H as Vt,Ha as h_,Hb as Ch,I as Kt,Ia as g_,Ib as Eh,J as Wt,Ja as y_,Jb as Sh,K as Yt,Ka as b_,Kb as wh,L as Xt,La as T_,Lb as Ah,M as Jt,Ma as C_,Mb as vh,N as Zt,Na as E_,Nb as Oh,O as Qt,Oa as S_,Ob as Rh,P as $m,Pa as w_,Pb as Ih,Q as Fm,Qa as A_,Qb as Ph,R as Gm,Ra as v_,Rb as Mh,S as Um,Sa as O_,Sb as kh,T as jm,Ta as er,Tb as xh,U as Xe,Ua as ge,Ub as Nh,V as Bm,Va as L_,Vb as Lh,W as qm,Wa as D_,Wb as Dh,X as zm,Xa as $_,Xb as $h,Y as Hm,Ya as F_,Yb as Fh,Z as Vm,Za as G_,Zb as Gh,_ as Km,_a as U_,_b as Uh,a as $O,aa as Ym,ab as B_,ac as Bh,b as FO,ba as G0,bb as q_,bc as qh,c as GO,ca as U0,cb as z_,cc as zh,d as UO,da as j0,db as H_,dc as Hh,e as jO,ea as cf,eb as V_,ec as Vh,f as BO,fa as lf,fb as K_,fc as Kh,g as HO,ga as pf,gb as W_,gc as Wh,h as VO,ha as Zf,hb as Y_,hc as Yh,i as KO,ia as Qf,ib as X_,ic as Xh,j as WO,ja as X0,jb as J_,jc as Jh,k as Ns,ka as J0,kb as Z_,kc as Zh,l as XI,la as Z0,lb as Q_,lc as Qh,m as JI,ma as Q0,mb as eh,mc as eg,n as ZI,na as ek,nb as th,nc as tg,o as QI,oa as tk,ob as rh,oc as rg,p as eP,pa as rk,pb as oh,pc as og,q as tP,qa as ok,qb as nh,qc as ng,r as Ul,ra as e_,rb as ih,rc as ig,s as hu,sa as t_,sb as sh,sc as sg,t as gu,ta as r_,tb as ah,tc as ag,u as Tu,ua as o_,ub as dh,uc as dg,v as Cu,va as n_,vb as ch,vc as cg,w as Uu,wa as i_,wb as lh,wc as lg,x as Ku,xa as s_,xb as ph,xc as pg,y as vM,ya as a_,yb as uh,z as Ye,za as d_,zb as mh}from"./chunks/chunk-JI2GDE4I.js";import{e as nP,f as iP,g as jl,h as Bl,i as Ut}from"./chunks/chunk-OH6WQ7VT.js";import{A as R0,B as I0,C as P0,D as M0,E as k0,F as x0,G as N0,H as L0,I as D0,J as $0,K as F0,L as Zm,M as Qm,N as ef,O as tf,P as rf,Q as of,R as nf,S as sf,T as af,U as df,a as cM,b as lM,c as pM,d as uM,e as mM,f as _u,g as fM,h as _M,i as hM,j as gM,k as yM,m as Nm,n as Xm,o as g0,p as y0,q as b0,r as T0,s as C0,t as E0,u as Jm,v as S0,w as w0,x as A0,y as v0,z as O0}from"./chunks/chunk-AUEKTX7V.js";import{$ as II,$a as bp,$b as Eu,$c as Y0,A as nI,Aa as Wl,Ab as nu,Ad as Vf,B as iI,Ba as Yl,Bb as iu,Bd as Kf,C as sI,Ca as Xl,Cb as su,Cd as Wf,D as aI,Da as Jl,Db as au,Dd as Yf,E as dI,Ea as Zl,Eb as du,Ec as Qu,Ed as Xf,F as We,Fa as Ql,Fb as cu,Fd as Jf,G as cI,Ga as ep,Gb as lu,Gc as em,Gd as R_,H as Nt,Ha as tp,Hb as pu,Hc as tm,Hd as I_,I as lI,Ia as rp,Ib as uu,Ic as Am,Id as P_,J as pI,Ja as op,Jb as mu,Jc as vm,Jd as M_,K as uI,Ka as np,Kb as tM,Kd as k_,L as mI,La as ip,Lb as rM,Lc as Om,Ld as x_,M as fI,Ma as sp,Mb as oM,Mc as Rm,Md as N_,N as _I,Na as ap,Nb as nM,Nc as Im,O as hI,Oa as dp,Ob as iM,Oc as Pm,P as gI,Pa as cp,Pb as sM,Pc as Mm,Q as yI,Qa as lp,Qb as aM,Qc as uf,R as bI,Ra as pp,Rb as dM,Rc as mf,S as TI,Sa as dP,Sb as fu,Sc as ff,T as CI,Ta as up,Tb as bM,Tc as _f,U as EI,Ua as mp,Ub as TM,Uc as hf,V as SI,Va as fp,Vb as CM,Vc as gf,W as wI,Wa as _p,Wb as EM,Wc as yf,X as AI,Xa as cP,Xb as SM,Xc as bf,Y as vI,Ya as hp,Yc as Tf,Z as OI,Za as gp,Zb as yu,Zc as K0,_ as RI,_a as yp,_b as bu,_c as W0,a as YR,aa as PI,ab as Tp,ac as Su,ad as Cf,b as Mt,ba as MI,bb as lP,bd as Ef,c as XR,ca as kI,cb as pP,cc as wu,cd as Sf,d as Ve,da as xI,db as uP,dc as Au,dd as wf,e as te,ea as NI,eb as mP,ec as vu,ed as Af,f as jc,fa as LI,fb as fP,fc as Ou,fd as vf,gb as _P,gc as Ru,gd as Of,ha as wl,hb as hP,hc as Iu,hd as Rf,i as Ke,ia as Al,ib as DP,ic as Pu,id as If,j as Bc,ja as vl,jb as $P,jc as Mu,jd as Pf,k as qc,ka as Ol,kb as FP,kc as ku,kd as Mf,la as Rl,lb as GP,lc as xu,ld as kf,m as he,mb as UP,mc as Nu,md as xf,n as zc,na as Il,nb as jP,nc as Lu,nd as Nf,o as Hc,oa as Pl,ob as BP,oc as Du,od as Lf,p as Vc,pa as Ml,pb as WP,pc as $u,pd as Df,q as Kc,qa as kl,qb as YP,qc as Fu,qd as $f,r as JR,ra as rP,rb as eu,rd as Ff,s as ZR,sa as oP,sb as tu,sc as wM,sd as Gf,t as QR,ta as xl,tb as XP,tc as AM,td as Uf,u as eI,ua as Nl,ub as JP,uc as Gu,v as tI,va as Ll,vb as ZP,vc as Wu,vd as jf,w as kt,wa as Dl,wb as QP,wc as Yu,wd as Bf,x as rI,xa as $l,xb as eM,xc as Xu,xd as qf,y as oI,ya as Fl,yb as ru,yc as Ju,yd as zf,z as xt,za as Gl,zb as ou,zc as Zu,zd as Hf}from"./chunks/chunk-2RPORE7M.js";import"./chunks/chunk-UJMQP2HP.js";import{w as Rc}from"./chunks/chunk-6VRX2CM7.js";import{A as YI,Aa as _l,B as sl,C as al,Ca as hl,D as dl,Da as gl,E as cl,Ea as yl,F as Lt,Fa as bl,Ga as Tl,Ia as Cl,Ja as El,Ka as Sl,a as QO,b as eR,c as tR,d as rR,e as oR,f as nR,g as Ls,h as Ds,i as $s,j as Fs,k as Gs,la as Dt,m as DI,ma as $t,na as Ft,oa as Gt,pa as ll,ra as pl,sa as ul,ta as ml,v as HI,w as VI,y as KI,z as WI,za as fl}from"./chunks/chunk-LS3GI3H4.js";import{a as $I,b as FI,c as GI,d as UI,e as jI,f as BI,g as qI,h as Zc,i as Qc,j as el,k as tl,l as rl,m as zI,n as ol,o as nl,p as il}from"./chunks/chunk-DAX3AOFI.js";import{$a as PP,$b as e0,A as jR,Aa as Vp,Ab as IM,Ac as Tm,B as Ic,Ba as Kp,Bb as PM,Bc as Cm,C as Pc,Ca as Wp,Cb as MM,Cc as Em,D as Mc,Da as Yp,Db as kM,Dc as Bt,E as kc,Ea as Xp,Eb as xM,Ec as Sm,F as xc,Fa as Jp,Fb as NM,Fc as m0,G as Nc,Ga as Zp,Gc as f0,H as Lc,Ha as Qp,Hb as sm,Hc as _0,I as Dc,Ib as LM,Ic as wm,J as $c,Jb as DM,Jc as h0,K as Fc,Kb as $M,Kc as B0,L as Gc,La as gP,Lb as FM,Lc as q0,M as He,Ma as yP,Mb as GM,Mc as z0,N as BR,Na as bP,Nb as UM,Nc as H0,O as qR,Oa as TP,Ob as jM,Oc as V0,P as zR,Pa as CP,Pb as BM,Q as HR,Qa as EP,Qb as qM,R as VR,Ra as SP,Rb as zM,S as KR,Sa as wP,Sb as HM,T as WR,Ta as AP,Tb as VM,U as Uc,Ua as vP,Ub as KM,V as ql,Va as OP,Vb as WM,W as zl,Wa as RP,Wb as YM,X as Hl,Xa as IP,Xb as XM,Y as Vl,Yb as JM,Z as sP,Zb as ZM,_ as aP,_b as QM,a as YO,aa as Kl,ac as t0,b as XO,ba as Cp,bb as MP,bc as r0,c as JO,ca as Ep,cb as kP,cc as o0,d as ZO,da as Sp,dc as n0,e as OR,ea as wp,ec as i0,f as RR,fa as Ap,fb as xP,fc as s0,g as IR,ga as vp,gb as NP,gc as a0,h as PR,ha as Op,hb as LP,hc as d0,i as MR,ia as Rp,ic as c0,j as kR,ja as Ip,jb as qP,jc as l0,k as xR,ka as Pp,kb as zP,kc as p0,la as Mp,lb as HP,lc as u0,ma as kp,mb as VP,mc as jt,na as xp,nb as KP,nc as am,oa as Np,ob as ju,oc as dm,pa as Lp,pb as Bu,pc as cm,qa as Dp,qb as qu,qc as lm,ra as $p,rb as zu,rc as pm,sa as Fp,sb as Hu,sc as um,t as NR,ta as Gp,tb as Vu,tc as mm,u as LR,ua as Up,ub as OM,uc as fm,v as DR,va as jp,vb as rm,vc as _m,w as $R,wa as Bp,wb as om,wc as hm,x as FR,xa as qp,xb as nm,xc as gm,y as GR,ya as zp,yb as im,yc as ym,z as UR,za as Hp,zb as RM,zc as bm}from"./chunks/chunk-S4LPZ4TN.js";import{a as qO,b as zO}from"./chunks/chunk-UEGXWXUZ.js";import{$ as Sa,$a as ee,$b as wc,A as Js,Aa as Xa,Ab as cc,B as Zs,Ba as Ja,Bb as lc,C as Qs,Ca as Za,Cb as pc,D as ea,Da as Qa,Db as uc,E as ta,Ea as ed,Eb as mc,F as ra,Fa as td,Fb as fc,Ga as rd,Gb as _c,H as oa,Ha as od,Hb as hc,I as na,Ia as nd,J as ia,Ja as id,K as sa,Ka as sd,L as aa,La as ad,Lb as bR,M as da,Ma as dd,Mb as TR,N as ca,Na as cd,Nb as CR,O as la,Oa as ld,Ob as ER,P as pa,Pa as pd,Pb as SR,Q as ua,Qa as ud,Qb as wR,R as ma,Ra as md,Rb as AR,S as fa,Sa as fd,Sb as vR,T as _a,Ta as _d,U as ha,Ua as hd,Ub as gc,V as ga,Va as gd,Vb as yc,W as ya,Wa as yd,Wb as bc,X as ba,Xa as bd,Xb as Tc,Y as Ta,Ya as Td,Yb as Cc,Z as Ca,Zb as Ec,_ as Ea,_a as ze,_b as Sc,a as iR,aa as wa,ab as Cd,ac as Ac,b as sR,ba as Aa,bb as xd,bc as vc,c as aR,ca as va,cb as Nd,cc as Oc,d as Be,da as Oa,db as Ld,dc as Pt,e as dR,ea as Ra,eb as Dd,f as cR,fa as Ia,fb as $d,g as lR,ga as Pa,gb as Fd,h as It,ha as Ma,hb as Gd,i as qe,ia as ka,ib as Ud,j as pR,ja as xa,jb as jd,k as uR,ka as Na,kb as Kd,l as mR,la as La,lb as Wd,m as fR,ma as Da,mb as Yd,n as _R,na as $a,nb as Xd,o as hR,oa as Fa,ob as Jd,p as Us,pa as Ga,pb as Zd,q as js,qa as Ua,qb as Qd,r as Bs,ra as ja,rb as ec,s as qs,sa as Ba,sb as tc,t as zs,ta as qa,tb as rc,u as Hs,ua as za,ub as oc,v as Vs,va as Ha,vb as nc,w as Ks,wa as Va,wb as ic,x as Ws,xa as Ka,xb as sc,y as Ys,ya as Wa,yb as ac,z as Xs,za as Ya,zb as dc}from"./chunks/chunk-HNGLDMSZ.js";import{a as RO,b as IO,c as PO,d as MO,e as kO,f as xO,g as NO,h as LO,i as DO,j as ws,k as As,l as vs,m as Os,n as Rs,o as Is,q as Ps,s as Ms,x as ks}from"./chunks/chunk-FRNMQM45.js";import{b as AO}from"./chunks/chunk-HRFGFIYU.js";import"./chunks/chunk-IB7UB5TE.js";import{$ as OE,$b as Uv,$c as Es,A as XT,Aa as BA,Ac as Yv,B as JT,Bb as Qi,Bc as Xv,Cb as Av,Cc as Jv,Dc as Zv,Eb as vv,Ec as Qv,Fb as Ov,Fc as eO,Gb as Rv,Gc as tO,Hc as rO,Ib as Iv,Ic as oO,J as aC,Jc as nO,Ka as qA,Kc as iO,L as hC,La as zA,Lb as Pv,Lc as sO,M as gC,Ma as HA,Mc as aO,N as yC,Na as VA,Nb as Mv,Nc as dO,O as bC,Oa as KA,Oc as cO,P as AC,Pa as WA,Pc as lO,Q as vC,Qa as ev,Qc as ps,R as At,Ra as tv,Rb as kv,Rc as us,S as CE,Sa as rv,Sb as xv,Sc as ms,T as EE,Ta as vt,Tb as Nv,Tc as fs,U as SE,Ub as es,Uc as _s,Va as ov,Vb as Lv,Vc as hs,W as wE,Wa as nv,Wc as gs,Xa as iv,Xb as Dv,Xc as ys,Y as AE,Ya as sv,Yb as $v,Yc as bs,Z as vE,Za as av,Zb as Fv,Zc as Ts,_b as Gv,_c as Cs,a as DT,aa as RE,ab as dv,ac as jv,ad as Ss,ba as IE,bc as Bv,bd as pO,ca as hA,cc as qv,cd as uO,da as gA,dc as zv,dd as mO,ea as yA,eb as Ki,ec as Hv,ed as fO,fa as bA,fc as Ot,fd as _O,ga as IA,gc as Vv,gd as hO,hd as gO,i as nn,ia as qi,ic as Kv,id as yO,j as $T,ja as zi,jd as bO,k as FT,ka as Hi,kd as TO,l as GT,ld as CO,m as UT,ma as PA,n as jT,na as MA,o as BT,oa as kA,oc as ts,pa as xA,pb as gv,pc as rs,pd as Rt,q as qT,qa as NA,qb as yv,qc as os,qd as EO,ra as LA,rb as bv,rc as ns,rd as SO,s as zT,sa as DA,sb as Tv,sd as wO,t as HT,tc as is,td as vO,u as VT,ua as $A,ub as Cv,uc as ss,ud as OO,vb as Ev,vc as as,w as KT,wa as FA,wb as Sv,wc as ds,x as WT,xa as GA,xb as wv,xc as cs,ya as UA,yb as Ji,yc as ls,z as YT,za as jA,zb as Zi,zc as Wv}from"./chunks/chunk-5GWEY4P6.js";import{$ as bt,$b as xC,$c as ZC,$d as FE,$e as rS,$f as RS,$g as iw,$h as Qw,$i as mv,A as Fo,Aa as ZT,Ab as mC,Ac as zC,Ad as Ln,Ae as VE,Ag as NS,Ah as kw,Ai as TA,B as Go,Ba as QT,Bc as HC,Bd as _E,Be as KE,Bg as LS,Bh as xw,Bi as CA,C as Uo,Ca as eC,Cb as Et,Cd as Dn,Ce as WE,Ch as Nw,Ci as EA,D as jo,De as YE,Df as sS,Dh as Lw,Di as SA,E as Bo,Eb as St,Ed as hE,Ee as XE,Ef as aS,Eg as DS,Eh as Dw,Ei as wA,F as qo,Fa as hn,Fd as gE,Fe as JE,Ff as dS,Fg as $S,Fh as $w,Fi as AA,G as zo,Ga as tC,Gb as vn,Gd as yE,Ge as ZE,Gf as cS,Gg as FS,Gh as Fw,Gi as vA,H as De,Ha as rC,Hb as On,Hc as Pn,Hd as bE,He as QE,Hf as lS,Hg as GS,Hh as Gw,Hi as OA,I as $e,Ia as oC,Ib as _e,Ic as VC,Id as TE,Ie as Xn,If as pS,Ig as US,Ih as Ui,Ii as RA,J as Ho,Ja as nC,Jd as PE,Je as Jn,Jf as uS,Jg as jS,Jh as Uw,K as Vo,Kb as fC,Kc as KC,Kd as ME,Ke as D,Kf as mS,Kg as BS,L as Ko,La as gn,Ld as kE,Le as Zn,Lf as fS,Lg as qS,M as Wo,Ma as yn,Mb as _C,Md as xE,Mf as _S,Mg as zS,Mh as jw,N as Yo,Na as Ge,Nb as TC,Nd as NE,Nf as hS,Ng as HS,Nh as Bw,Ni as YA,O as Xo,Oa as iC,Ob as CC,Od as LE,Og as VS,Oh as qw,P as Jo,Pa as sC,Pb as EC,Pg as KS,Ph as zw,Q as Zo,Qa as bn,Qb as SC,Qf as gS,Qg as WS,Qh as Hw,Qi as XA,R as Qo,Ra as Tn,Rb as wC,Re as je,Rf as yS,Rg as YS,Rh as Vw,Ri as JA,S as en,Sb as OC,Se as Qn,Sf as bS,Sg as XS,T as tn,Ta as Cn,Tb as Ue,Tf as TS,Tg as JS,Th as Kw,U as rn,Ub as wt,Ud as DE,Uf as CS,Ug as ZS,Uh as Ww,Ui as ZA,V as on,Vb as RC,Vf as ES,Vg as QS,Vi,Wb as IC,Wc as WC,Wf as SS,Wg as ew,Wi as QA,Xb as PC,Xc as YC,Xd as $n,Xf as wS,Xg as tw,Xh as Yw,Xi as cv,Yb as MC,Yc as XC,Yd as $E,Yf as AS,Yg as rw,Yh as Xw,Yi as lv,Zb as z,Zd as Fn,Ze as eS,Zf as vS,Zg as ow,Zh as Jw,Zi as pv,_b as kC,_c as JC,_e as tS,_f as OS,_g as nw,_h as Zw,_i as uv,a as I,aa as Tt,ac as NC,af as ei,ah as sw,ai as eA,aj as fv,b as wT,ba as cn,bc as LC,bd as QC,bf as ti,bg as Ti,bh as aw,bi as tA,bj as _v,c as yt,ca as ln,cc as DC,cd as Mn,cf as ri,cg as Ci,ch as dw,ci as rA,cj as hv,d as AT,da as pn,dc as $C,df as oi,dg as Ei,dh as cw,di as oA,dj as Wi,e as vT,eb as En,ec as FC,ed as kn,ee as GE,ef as ni,eg as Si,eh as lw,ei as nA,ej as Yi,f as OT,fb as Sn,fd as xn,ff as ii,fg as wi,fh as pw,fi as iA,fj as Xi,g as RT,gb as wn,ge as UE,gf as si,gg as Ai,gh as uw,gi as sA,h as IT,ha as un,hc as GC,he as jE,hf as ai,hg as vi,hh as mw,hi as aA,i as PT,ib as An,id as eE,ie as Gn,if as di,ig as Oi,ih as fw,j as MT,ja as mn,jc as Rn,jd as tE,je as Un,jf as ci,jg as Ri,jh as _w,ji as dA,k as kT,ka as fn,kc as In,kd as rE,kf as li,kg as Ii,kh as hw,ki as ji,l as xT,la as _n,lb as dC,ld as oE,le as jn,lf as pi,lg as Pi,lh as gw,li as Bi,m as NT,mb as cC,md as nE,me as Bn,mf as ui,mg as Mi,mh as yw,n as LT,nd as iE,ne as qn,nf as mi,ng as ki,nh as bw,o as Io,od as sE,oe as zn,of as fi,og as xi,oh as Tw,p as Po,pd as Nn,pe as Hn,pf as oS,pg as Ni,ph as Cw,q as Mo,qd as aE,qe as BE,qf as nS,qg as Li,qh as Ew,qi as cA,r as ko,rb as lC,rd as dE,re as qE,rf as _i,rg as Di,rh as Sw,ri as lA,s as Ne,sf as iS,sg as $i,sh as ww,si as pA,t as xo,tf as hi,tg as Fi,th as Aw,ti as uA,u as L,ub as pC,ud as cE,ue as Vn,uf as gi,ug as Gi,uh as vw,v as Le,vc as UC,vd as lE,ve as Kn,vf as yi,vg as IS,vh as Ow,vi as mA,w as No,wd as pE,we as zE,wf as bi,wg as PS,wh as Rw,wi as fA,x as Lo,xb as uC,xc as jC,xd as uE,xe as Wn,xg as MS,xh as Iw,y as Do,yc as BC,yd as mE,ye as Yn,yg as kS,yh as Pw,yi as _A,z as $o,zc as qC,zd as fE,ze as HE,zg as xS,zh as Mw}from"./chunks/chunk-7ZRCYESH.js";import"./chunks/chunk-SPPHDVZE.js";import{a as Wc,b as Yc,e as Xc,f as Jc}from"./chunks/chunk-RSAN2YUU.js";import"./chunks/chunk-VS565KBX.js";import{A as me,B as ST,C as b,E as sn,F as Ct,G as fe,H as an,K as Fe,M as dn,b as hT,c as gT,d as yT,m as bT,r as TT,u as CT,y as ET}from"./chunks/chunk-O4ZLEN4T.js";import"./chunks/chunk-XAWE4EAK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8f11e0bf-4115-55a8-bd39-c360f43cdc09")}catch{}})();var H="2026-07-28",rr=["2025-11-25","2025-06-18"],re=[H],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},w={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},tr=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,o={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=o}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function mg(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,expected:"object"});let t=typeof e.name=="string"?e.name.trim():"",r=typeof e.version=="string"?e.version.trim():"";if(t.length===0||r.length===0)throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:w.clientInfo,required:["name","version"]});let o={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(o.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(o.websiteUrl=e.websiteUrl.trim().slice(0,2048)),o}function fg(e){if(e!==void 0){if(typeof e!="string"||!tr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...tr]});return e}}function Je(e){let t=h(e)?e._meta:void 0;if(!h(t))throw new u("Missing required MCP request metadata",m.invalidParams,{required:[w.protocolVersion,w.clientCapabilities]});let r=t[w.protocolVersion];if(typeof r!="string"||!re.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...re],requested:typeof r=="string"?r:null});let o=t[w.clientCapabilities];if(!h(o))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:w.clientCapabilities,expected:"object"});let n=mg(t[w.clientInfo]),s=fg(t[w.logLevel]);return{protocolVersion:H,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function Gx(e,t){if(t!==e.protocolVersion)throw new u("MCP protocol header does not match request metadata",m.headerMismatch,{header:t??null,metadata:e.protocolVersion})}function Ux(e,t){let r=t.filter(o=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,o));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(o=>[o,{}]))})}function jx(e,t){let r=e.clientCapabilities.extensions;return h(r)&&h(r[t])}function Ze(e,t){let r=h(e._meta)?e._meta:{};return{...e,_meta:{...r,[w.serverInfo]:{...t}}}}function _g(e,t){return Ze({...e,resultType:"complete"},t)}function Bx(e){let t=e.ttlMs??6e4;if(!Number.isFinite(t)||t<0)throw new u("Invalid MCP discovery cache TTL",m.invalidParams,{ttlMs:t});return _g({supportedVersions:[...re],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function qx(e,t){if(h(e)&&typeof e.resultType=="string")return e.resultType;if(t==="legacy")return"complete";throw new u("Modern MCP result is missing resultType",m.invalidParams,{required:"resultType"})}(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]="d4a56906-c542-567e-9265-15184a5c330b")}catch{}})();var hg=new Set(["--help","-h","--version","-V"]);function gg(e,t){let r=[`Usage: ${e==="stdio"?"pm-mcp":"pm-mcp-http"} [--help | --version]`,"",e==="stdio"?"JSON-RPC over stdin/stdout. With no arguments, starts the stdio server.":"Streamable HTTP POST /mcp. With no arguments, starts the HTTP server.","","Options:"," -h, --help Print help and exit before transport startup."," -V, --version Print the package version and exit.","","Environment:"," PM_PATH Tracker root (otherwise discovered from cwd)."," PM_GLOBAL_PATH Global settings root."," PM_MCP_PROFILE core (default), standard, full, or custom."," PM_MCP_TOOLS Comma-separated tool allowlist for custom profile."," PM_MCP_DISCOVERY_CURSOR_KEY Shared discovery cursor secret, at least 32 UTF-8 bytes."," PM_MCP_BAGGAGE_ALLOWLIST Comma-separated permitted trace baggage keys."];return e==="http"&&r.push(" PM_MCP_HTTP_HOST Bind host (default 127.0.0.1)."," PM_MCP_HTTP_PORT Bind port, 0..65535 (default 3000)."," PM_MCP_HTTP_ALLOWED_ORIGINS Comma-separated exact browser origins (default none)."," PM_MCP_HTTP_BEARER_TOKEN Deployment token for the bundled verifier."," PM_MCP_HTTP_AUTH_ISSUER Exact HTTPS authorization-server issuer."," PM_MCP_HTTP_RESOURCE Canonical resource/audience URI."," PM_MCP_HTTP_SCOPES Space-separated scopes (default pm:read pm:write).","","Non-loopback HTTP requires bearer token, issuer, and resource together."),r.push("",`MCP protocol: ${re.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${rr.join(", ")}.`:"HTTP requires modern per-request metadata; legacy initialize is stdio-only.","",e==="stdio"?"Client configuration:":"Example loopback server:",e==="stdio"?JSON.stringify({mcpServers:{pm:{command:"npx",args:["--yes","--package",`@unbrained/pm-cli@${t}`,"pm-mcp"]}}}):`PM_MCP_HTTP_PORT=3000 npx --yes --package @unbrained/pm-cli@${t} pm-mcp-http`,...e==="http"?["HTTP client configuration:",JSON.stringify({mcpServers:{pm:{url:"http://127.0.0.1:3000/mcp"}}})]:[],"","Configuration: https://github.com/unbraind/pm-cli/blob/main/docs/MCP_REMOTE_TRANSPORT_SECURITY.md",""),r.join(`
2
+ `)}function Vx(e,t,r){if(e.length===0)return{kind:"serve"};let o=e.find(n=>!hg.has(n));if(o!==void 0){let n=t==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(o)}. Run ${n} --help.
3
+ `}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?gg(t,r):`${r}
4
+ `,stderr:""}}import{createHash as ir,createHmac as sr,timingSafeEqual as yg}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]="15b81dd0-ef1a-58be-b6ee-5975b6778993")}catch{}})();var bg=["elicitation/create","roots/list","sampling/createMessage"],or=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},ar=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,ye=32,et=64*1024,be=16*1024,Qe={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function Tg(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function Te(e,t,r){let o;try{o=JSON.stringify(e)}catch{throw new u(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(o,"utf8")>t)throw new u(`Invalid ${r}: payload exceeds the protocol bound`,m.invalidParams,{field:r,maximumBytes:t})}function tt(e,t){if(!h(e))throw new u("Invalid MCP inputRequests",m.invalidParams,{field:"inputRequests",expected:"object"});let r=Object.entries(e);if(r.length===0||r.length>ye)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:ye,observed:r.length});let o={};for(let[n,s]of r){if(!ar.test(n)||!h(s))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${n}`});let i=s.method;if(typeof i!="string"||!bg.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=Tg(i);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!h(s.params))throw new u("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${n}.params`,expected:"object"});o[n]={method:i,params:structuredClone(s.params)}}return Te(o,et,"inputRequests"),o}function dr(e){if(!h(e))throw new u("Invalid MCP inputResponses",m.invalidParams,{field:"inputResponses",expected:"object"});let t=Object.entries(e);if(t.length>ye)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:ye,observed:t.length});let r={};for(let[o,n]of t){if(!ar.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return Te(r,et,"inputResponses"),r}function Xx(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>be)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:be});let r=e.inputRequests===void 0?void 0:tt(e.inputRequests,e.requestContext);if(r===void 0&&!t)throw new u("InputRequiredResult requires inputRequests or requestState",m.invalidParams,{requiredAnyOf:["inputRequests","requestState"]});return{resultType:"input_required",...r?{inputRequests:r}:{},...t?{requestState:t}:{},_meta:{[w.serverInfo]:{...e.serverInfo}}}}function cr(e){let t=Buffer.from(e);if(t.byteLength<32)throw new u("MCP requestState signing key must contain at least 32 bytes",m.invalidParams,{minimumBytes:32});return t}function Jx(e,t){if(!Number.isSafeInteger(e.expiresAt)||e.expiresAt<=0||e.method.trim().length===0||e.parameterDigest.trim().length===0||e.principal.trim().length===0)throw new u("Invalid MCP requestState payload",m.invalidParams);let r=Buffer.from(JSON.stringify({version:1,...e}),"utf8");if(r.byteLength>be/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:be/2});let o=r.toString("base64url"),n=sr("sha256",cr(t)).update(o).digest("base64url");return`${o}.${n}`}function Cg(e){if(!h(e)||e.version!==1)throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof o!="string"||typeof n!="string")throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:o,principal:n,state:s}}function Zx(e,t,r){let[o,n,s]=e.split(".");if(!o||!n||s!==void 0)throw new u("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let i=Buffer.from(n,"base64url"),a=sr("sha256",cr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!yg(i,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let d;try{d=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{d=null}let c=Cg(d),{expiresAt:l,method:p,parameterDigest:f,principal:_}=c;if(l<(r.nowMs??Date.now()))throw new u("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:l});if(p!==r.method||f!==r.parameterDigest||_!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return c}function Qx(e){return Te(e,et,"request parameters"),ir("sha256").update(JSON.stringify(e)).digest("hex")}var nr=class{#e=new Set;#t;constructor(t=4096){if(!Number.isSafeInteger(t)||t<1)throw new u("Invalid MCP replay guard capacity",m.invalidParams,{maximumEntries:t});this.#t=t}consume(t){let r=ir("sha256").update(t).digest("hex");if(this.#e.has(r))throw new u("MCP requestState replay detected",m.invalidParams,{field:"requestState"});if(this.#e.size>=this.#t){let o=this.#e.values().next().value;this.#e.delete(o)}this.#e.add(r)}};function Eg(e){if(!Number.isSafeInteger(e.ttlMs)||e.ttlMs<0||e.cacheScope!=="public"&&e.cacheScope!=="private")throw new u("Invalid MCP cache policy",m.invalidParams,{ttlMs:e.ttlMs,cacheScope:e.cacheScope});return{ttlMs:e.ttlMs,cacheScope:e.cacheScope}}function eN(e,t){return{...e,...Eg(t)}}function Sg(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function wg(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Sg)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Ag(e){let t=e.maxBytes??Qe.maxBytes,r=e.maxDepth??Qe.maxDepth,o=e.maxNodes??Qe.maxNodes;if(!Number.isSafeInteger(t)||t<2)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(r)||r<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);if(!Number.isSafeInteger(o)||o<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:o}}function vg(e,t){let r=Array.isArray(e.value)?e.value:h(e.value)?Object.values(e.value):[];for(let o of r)t.push({value:o,depth:e.depth+1})}function Og(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&wg(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function tN(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Ag(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});Te(e,r,"JSON Schema");let s=[{value:e,depth:0}],i=0;for(;s.length>0;){let a=s.pop();if(i+=1,i>n||a.depth>o)throw new u("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:o,maximumNodes:n});Og(e,a.value),vg(a,s)}return structuredClone(e)}import{randomUUID as Rg}from"node:crypto";import{readFile as Ig}from"node:fs/promises";import lr 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]="f3e94896-b2a0-561c-902b-71c28ddde2a1")}catch{}})();var cN="io.modelcontextprotocol/tasks",Pg=["working","input_required","completed","failed","cancelled"],Mg=/^mcp-task-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu,kg=3600*1e3,xg=1e3,Ee=1024,Ng=30,Lg=2e3;function rt(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function Ce(e){let t=e.trim();if(!Mg.test(t))throw rt("Unknown MCP task");return t}function pr(e,t){if(typeof e!="string"||!Number.isFinite(Date.parse(e)))throw new u("Corrupt MCP task record",m.invalidParams,{field:t});return e}function ur(e){if(!h(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new u("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,Ee),...h(e.data)?{data:structuredClone(e.data)}:{}}}function Dg(e){if(!Pg.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function $g(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function Fg(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function Gg(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Ug(e){if(e!==void 0){if(typeof e!="number"||!Number.isSafeInteger(e)||e<0)throw new u("Corrupt MCP task record",m.invalidParams);return e}}function jg(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function Bg(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?Ce(e.taskId):"",r=Dg(e.status),o=$g(e.principal),n=Fg(e.workerPid),s=Gg(e.ttlMs),i=Ug(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:pr(e.createdAt,"createdAt"),lastUpdatedAt:pr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:jg(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Ee)}:{},...typeof i=="number"?{pollIntervalMs:i}:{}};if(h(e.inputRequests)&&(a.inputRequests=structuredClone(e.inputRequests)),h(e.inputResponses)&&(a.inputResponses=structuredClone(e.inputResponses)),h(e.result)&&(a.result=structuredClone(e.result)),e.error!==void 0&&(a.error=ur(e.error)),a.status==="input_required"&&!a.inputRequests||a.status==="completed"&&!a.result||a.status==="failed"&&!a.error)throw new u("Corrupt MCP task status payload",m.invalidParams,{status:a.status});return a}function V(e){let t={taskId:e.taskId,status:e.status,createdAt:e.createdAt,lastUpdatedAt:e.lastUpdatedAt,ttlMs:e.ttlMs,...e.statusMessage?{statusMessage:e.statusMessage}:{},...e.pollIntervalMs===void 0?{}:{pollIntervalMs:e.pollIntervalMs}};return e.status==="input_required"?{...t,status:"input_required",inputRequests:structuredClone(e.inputRequests)}:e.status==="completed"?{...t,status:"completed",result:structuredClone(e.result)}:e.status==="failed"?{...t,status:"failed",error:structuredClone(e.error)}:e.status==="cancelled"?{...t,status:"cancelled"}:{...t,status:"working"}}function oe(e){return e==="completed"||e==="failed"||e==="cancelled"}function qg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var ot=class{#e;#t;#r;#o;#i;constructor(t){this.#e=lr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Rg()}`),this.#i=t.workerPid??process.pid}#s(t){return lr.join(this.#e,"runtime","mcp-tasks","records",`${Ce(t)}.json`)}async#d(t){try{return Bg(JSON.parse(await Ig(this.#s(t),"utf8")))}catch(r){throw fe(r)||r instanceof SyntaxError?rt("Unknown MCP task"):r}}async#a(t){await Fe(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
5
+ `)}async#n(t,r,o){let n=Ce(t),s=await je(this.#e,n,Ng,this.#t,!1,!1,Lg);try{let i=await this.#d(n);if(i.principal!==r)throw rt("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=Ce(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?kg:t.ttlMs,s=t.pollIntervalMs??xg;if(o.length===0||n!==null&&(!Number.isSafeInteger(n)||n<0)||!Number.isSafeInteger(s)||s<0)throw new u("Invalid MCP task creation options",m.invalidParams);let i=this.#r().toISOString(),a={version:1,taskId:r,status:"working",createdAt:i,lastUpdatedAt:i,ttlMs:n,pollIntervalMs:s,principal:o,workerPid:this.#i,consumedInputKeys:[],...t.statusMessage?.trim()?{statusMessage:t.statusMessage.trim().slice(0,Ee)}:{}};return await this.#a(a),{...V(a),resultType:"task"}}async get(t,r){return V(await this.#n(t,r,o=>{if(oe(o.status))return o;let n=this.#r().getTime(),s=o.ttlMs!==null&&Date.parse(o.createdAt)+o.ttlMs<=n,i=o.workerPid!==this.#i&&!qg(o.workerPid);return!s&&!i?o:{...o,status:"failed",statusMessage:s?"Task retention expired before completion.":"Task worker ended before recording a terminal result.",lastUpdatedAt:this.#r().toISOString(),error:{code:-32603,message:s?"MCP task expired":"MCP task worker unavailable after restart",data:{recoverable:!1,createNewTask:!0}},inputRequests:void 0}}))}async requireInput(t){let r=tt(t.inputRequests,t.requestContext);return V(await this.#n(t.taskId,t.principal,o=>{if(oe(o.status))return o;let n=Object.keys(r).filter(s=>o.consumedInputKeys.includes(s));if(n.length>0)throw new u("MCP task input request keys must be unique for the task lifetime",m.invalidParams,{reused:n});return{...o,status:"input_required",statusMessage:t.statusMessage?.trim().slice(0,Ee),lastUpdatedAt:this.#r().toISOString(),inputRequests:r}}))}async update(t,r,o){let n=dr(o),s=[],i=[];return await this.#n(t,r,a=>{if(a.status!=="input_required"||!a.inputRequests)return a;let d={...a.inputRequests},c=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(d,l)&&(c[l]=p,delete d[l],s.push(l));return i=Object.keys(d).sort(),s.length===0?a:{...a,status:i.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:i.length===0?void 0:d,inputResponses:c,consumedInputKeys:[...new Set([...a.consumedInputKeys,...s])].sort()}}),{acceptedKeys:s.sort(),remainingKeys:i}}async takeInputResponses(t,r){let o={};return await this.#n(t,r,n=>(o=structuredClone(n.inputResponses??{}),Object.keys(o).length===0?n:{...n,inputResponses:void 0})),o}async complete(t,r,o){return V(await this.#n(t,r,n=>oe(n.status)?n:{...n,status:"completed",statusMessage:"Task completed.",lastUpdatedAt:this.#r().toISOString(),result:structuredClone(o),inputRequests:void 0,error:void 0}))}async fail(t,r,o){let n=ur(o);return V(await this.#n(t,r,s=>oe(s.status)?s:{...s,status:"failed",statusMessage:n.message,lastUpdatedAt:this.#r().toISOString(),error:n,inputRequests:void 0,result:void 0}))}async cancel(t,r){return V(await this.#n(t,r,o=>oe(o.status)?o:{...o,status:"cancelled",statusMessage:"Task cancelled by the client.",lastUpdatedAt:this.#r().toISOString(),inputRequests:void 0,result:void 0,error:void 0}))}};function lN(e){return new ot(e)}(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]="15cbe26a-5716-5e8c-8700-eb36a1a056d6")}catch{}})();var Se="io.modelcontextprotocol/subscriptionId",mr=256,fr=2048,zg=5e3;function Hg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),zg);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function nt(e,t){if(e!==void 0){if(typeof e!="boolean")throw new u("Invalid MCP subscription filter",m.invalidParams,{field:`notifications.${t}`,expected:"boolean"});return e||void 0}}function Vg(e){if(!h(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=nt(e.toolsListChanged,"toolsListChanged"),r=nt(e.promptsListChanged,"promptsListChanged"),o=nt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>mr)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:mr});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>fr)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:fr});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function Kg(e,t){return{...e.toolsListChanged&&t.tools?.listChanged?{toolsListChanged:!0}:{},...e.promptsListChanged&&t.prompts?.listChanged?{promptsListChanged:!0}:{},...e.resourcesListChanged&&t.resources?.listChanged?{resourcesListChanged:!0}:{},...e.resourceSubscriptions&&t.resources?.subscribe?{resourceSubscriptions:[...e.resourceSubscriptions]}:{}}}var _r=class{#e;#t=new Map;#r;constructor(t){this.#e=structuredClone(t.capabilities),this.#r={...t.serverInfo}}get size(){return this.#t.size}async open(t){if(this.#t.has(t.id))throw new u("MCP subscription id is already active",m.invalidParams,{subscriptionId:t.id});let r=Kg(Vg(t.notifications),this.#e),o={filter:r,sink:t.sink,writeQueue:Promise.resolve()};this.#t.set(t.id,o);try{await this.#o(t.id,o,{jsonrpc:"2.0",method:"notifications/subscriptions/acknowledged",params:{_meta:{[Se]:t.id},notifications:structuredClone(r)}},!0)}catch(n){throw this.#t.delete(t.id),n}return structuredClone(r)}async emitListChanged(t){let r=`${t}ListChanged`,o=`notifications/${t}/list_changed`,n=[];for(let[s,i]of this.#t)i.filter[r]===!0&&n.push(this.#o(s,i,{jsonrpc:"2.0",method:o,params:{_meta:{[Se]:s}}}));return(await Promise.all(n)).filter(Boolean).length}async emitResourceUpdated(t){let r=[];for(let[o,n]of this.#t)n.filter.resourceSubscriptions?.includes(t)&&r.push(this.#o(o,n,{jsonrpc:"2.0",method:"notifications/resources/updated",params:{_meta:{[Se]:o},uri:t}}));return(await Promise.all(r)).filter(Boolean).length}async#o(t,r,o,n=!1){let s=r.writeQueue.then(async()=>{if(this.#t.get(t)!==r)return!1;try{return await Hg(r.sink,o),!0}catch(i){if(this.#t.get(t)===r&&this.#t.delete(t),n)throw i;return!1}});return r.writeQueue=s.then(()=>{},()=>{}),s}close(t){if(this.#t.delete(t))return{...Ze({resultType:"complete",_meta:{[Se]:t}},this.#r)}}closeAll(){let t=[];for(let r of this.#t.keys()){let o=this.close(r);t.push({id:r,result:o})}return t}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3681273a-e101-57a0-9446-982c450e7183")}catch{}})();var hr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,Wg=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,gr=/^[\t\x20-\x7E]*$/u,yr=new Set(["prompts/get","resources/read","tools/call"]);function Yg(e){let t=new Map;for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let n=typeof o=="string"?o:o.join(", ");t.set(r.toLowerCase(),n)}return t}function A(e,t){throw new u(e,m.headerMismatch,{header:t})}function br(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&gr.test(t)&&!hr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function Tr(e,t){let r=hr.exec(e);if(r){let o=r[1],n=Buffer.from(o,"base64");return n.toString("base64")!==o||n.length===0?A("Malformed MCP Base64 header value",t):n.toString("utf8")}return e.length===0||e.trim()!==e||!gr.test(e)?A("Malformed MCP header value",t):e}function we(e){return Array.isArray(e)?e.some(we):h(e)?Object.prototype.hasOwnProperty.call(e,"x-mcp-header")||Object.values(e).some(we):!1}function Xg(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!Wg.test(o)||!["boolean","integer","string"].includes(String(n))||r.has(o.toLowerCase()))throw new u("Invalid MCP x-mcp-header annotation",m.invalidParams,{field:t.join("."),annotation:o});return r.add(o.toLowerCase()),{name:o,path:t,type:n}}function Cr(e){if(!h(e))throw new u("Invalid MCP tool schema",m.invalidParams,{field:"inputSchema",expected:"object"});let t=[],r=new Set,o=(n,s)=>{let i=n.properties;if(i!==void 0){if(!h(i))throw new u("Invalid MCP tool schema properties",m.invalidParams,{field:"inputSchema.properties"});for(let[a,d]of Object.entries(i)){if(!h(d))continue;let c=[...s,a],l=Xg(d,c,r);l&&t.push(l);for(let[p,f]of Object.entries(d))if(p!=="properties"&&p!=="x-mcp-header"&&we(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:c.join("."),keyword:p});o(d,c)}}};for(let[n,s]of Object.entries(e))if(n!=="properties"&&we(s))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:"inputSchema",keyword:n});return o(e,[]),t}function Er(e,t){let r=e;for(let o of t){if(!h(r))return;r=r[o]}return r}function Sr(e,t){let r=e==="resources/read"?t.uri:t.name;return typeof r=="string"?r:void 0}function Jg(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Cr(t)){let s=Er(r,n.path);if(s!=null){if(!(n.type==="integer"&&typeof s=="number"&&Number.isSafeInteger(s)||n.type==="boolean"&&typeof s=="boolean"||n.type==="string"&&typeof s=="string"))throw new u("Invalid MCP custom header argument",m.invalidParams,{field:n.path.join("."),expected:n.type});o[`Mcp-Param-${n.name}`]=br(s)}}return o}function _N(e){let t=h(e.request.params)?e.request.params:void 0,r=Je(t),o=e.request.method;if(typeof o!="string"||o.length===0)return A("Missing MCP request method","Mcp-Method");let n={Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":r.protocolVersion,"Mcp-Method":o},s=Sr(o,t);if(yr.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=br(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,Jg(t,e.toolSchema)),n}function Zg(e,t){let r=t.method;(typeof r!="string"||r.length===0)&&A("Missing MCP request method","Mcp-Method");let o=h(t.params)?t.params:void 0,n=Je(o).protocolVersion;if(e.get("mcp-protocol-version")!==n&&A("MCP protocol header does not match request metadata","MCP-Protocol-Version"),e.get("mcp-method")!==r&&A("MCP method header does not match request body","Mcp-Method"),yr.has(r)){let s=e.get("mcp-name"),i=Sr(r,o);(s===void 0||i===void 0||Tr(s,"Mcp-Name")!==i)&&A("MCP name header does not match request body","Mcp-Name")}e.has("last-event-id")&&A("MCP SSE resumability is not supported","Last-Event-ID")}function Qg(e,t,r){return e.type==="integer"?typeof t=="number"&&Number.isSafeInteger(t)&&Number(r)===t:e.type==="boolean"?typeof t=="boolean"&&r===String(t):typeof t=="string"&&r===t}function ey(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Cr(e.toolSchema)){let o=Er(t,r.path),n=`Mcp-Param-${r.name}`,s=e.headers.get(n.toLowerCase());if(o==null){s!==void 0&&A("Unexpected MCP parameter header",n);continue}s===void 0&&A("Missing MCP parameter header",n),Qg(r,o,Tr(s,n))||A("MCP parameter header does not match request body",n)}}function hN(e){let t=Yg(e.headers),r=typeof e.request.method=="string"?e.request.method:"";Zg(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&ey({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var gN=H;import{AsyncLocalStorage as ty}from"node:async_hooks";import{createHash as wr,timingSafeEqual as ry}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]="a7c30d99-a0e4-552e-be61-0c54a455e211")}catch{}})();var y=class extends Error{httpStatus;challenge;constructor(t,r,o){super(t),this.name="PmMcpAuthorizationError",this.httpStatus=r,this.challenge=o}},oy=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,ny=/^[a-z][a-z0-9_*/-]{0,255}$/u,iy=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,sy=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,vr=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,Or=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,ay=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,dy=/%(?![0-9A-Fa-f]{2})/u,cy=512,ly=32,py=180,uy=8192,my=8192,Rr=new ty;function S(e,t,r=!1){if(new RegExp("\\p{Cc}","u").test(e))throw new y(`Invalid ${t}`,401);let o;try{o=new URL(e)}catch{throw new y(`Invalid ${t}`,401)}let n=o.hostname==="127.0.0.1"||o.hostname==="localhost";if(o.hash.length>0||o.protocol!=="https:"&&!(r&&n&&o.protocol==="http:"))throw new y(`Invalid ${t}`,401);return o}function fy(e,t){let r=t.toLowerCase();for(let[o,n]of Object.entries(e))if(!(o.toLowerCase()!==r||n===void 0))return typeof n=="string"?n:n.join(", ")}function EN(e){let t=S(e.resource,"protected resource URI",!0).href.replace(/\/$/u,"");if(e.authorizationServers.length===0)throw new y("Protected resource metadata requires an authorization server",401);let r=e.authorizationServers.map(n=>S(n,"authorization server issuer").href.replace(/\/$/u,"")),o=[...new Set(e.scopes??[])];if(o.some(n=>!vr.test(n)))throw new y("Invalid authorization scope",401);return{resource:t,authorization_servers:r,...o.length>0?{scopes_supported:o.sort()}:{}}}function SN(e){let t=S(e,"authorization server issuer"),r=t.pathname.replace(/^\/+|\/+$/gu,""),o=t.origin;return r?[`${o}/.well-known/oauth-authorization-server/${r}`,`${o}/.well-known/openid-configuration/${r}`,`${o}/${r}/.well-known/openid-configuration`]:[`${o}/.well-known/oauth-authorization-server`,`${o}/.well-known/openid-configuration`]}function wN(e,t){if(!h(e)||typeof e.issuer!="string")throw new y("Invalid authorization server metadata",401);let r=S(t,"expected issuer").href.replace(/\/$/u,"");if(S(e.issuer,"metadata issuer").href.replace(/\/$/u,"")!==r)throw new y("Authorization server issuer mismatch",401);if(!Array.isArray(e.code_challenge_methods_supported)||!e.code_challenge_methods_supported.includes("S256"))throw new y("Authorization server does not support required S256 PKCE",401);let o=d=>{let c=e[d];if(typeof c!="string")throw new y(`Authorization server metadata requires ${d}`,401);return S(c,d).href},n=d=>{let c=e[d];return typeof c=="string"?S(c,d).href:void 0},s=o("authorization_endpoint"),i=o("token_endpoint"),a=n("registration_endpoint");return{issuer:r,authorization_endpoint:s,token_endpoint:i,code_challenge_methods_supported:[...new Set(e.code_challenge_methods_supported.filter(d=>typeof d=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function AN(e){return e.hasPreRegisteredClient?"pre_registered":e.metadata.client_id_metadata_document_supported?"client_id_metadata_document":e.metadata.registration_endpoint?"dynamic":"user_supplied"}function vN(e){if(e.responseIssuer===void 0){if(e.issuerParameterSupported)throw new y("Authorization response omitted the advertised issuer",401);return}if(e.responseIssuer!==e.expectedIssuer)throw new y("Authorization response issuer mismatch",401)}function ON(e,t){let r=S(t,"client metadata document URL");if(r.pathname==="/"||!h(e)||e.client_id!==r.href||typeof e.client_name!="string"||e.client_name.trim().length===0||!Array.isArray(e.redirect_uris)||e.redirect_uris.length===0)throw new y("Invalid Client ID Metadata Document",401);for(let o of e.redirect_uris){if(typeof o!="string")throw new y("Invalid client redirect URI",401);S(o,"client redirect URI",!0)}return structuredClone(e)}function RN(e){if(e.redirectUris.length===0||e.clientName.trim().length===0)throw new y("Invalid dynamic client registration metadata",401);let t=e.redirectUris.map(r=>S(r,"redirect URI",!0).href);return{application_type:e.applicationType,client_name:e.clientName.trim().slice(0,128),redirect_uris:t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"}}var Ar=class{#e=new Map;set(t,r){let o=S(t,"credential issuer").href;this.#e.set(o,structuredClone(r))}get(t){let r=S(t,"credential issuer").href,o=this.#e.get(r);return o?structuredClone(o):void 0}delete(t){let r=S(t,"credential issuer").href;return this.#e.delete(r)}};function _y(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?oy.exec(t):null;if(!o)throw new y("Invalid MCP traceparent",403);let n=o[1],s=o[2];if(/^0+$/u.test(n)||/^0+$/u.test(s))throw new y("Invalid MCP traceparent",403)}if(r!==void 0&&(typeof r!="string"||!gy(r)))throw new y("Invalid MCP tracestate",403);return{...typeof t=="string"?{traceparent:t}:{},...typeof r=="string"?{tracestate:r}:{}}}function $(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function hy(e){return ny.test(e)||iy.test(e)}function gy(e){if(Buffer.byteLength(e,"utf8")>cy)return!1;let t=e.split(",");if(t.length>ly)return!1;let r=new Set;for(let o of t){let n=$(o);if(n.length===0)continue;let s=n.indexOf("="),i=s>0?n.slice(0,s):"",a=s>0?n.slice(s+1):"";if(!hy(i)||!sy.test(a)||r.has(i))return!1;r.add(i)}return!0}function Ir(e){return ay.test(e)&&!dy.test(e)}function yy(e){let t=$(e),r=t.indexOf("="),o=$(r>=0?t.slice(0,r):t),n=r>=0?$(t.slice(r+1)):void 0;return Or.test(o)&&(n===void 0||Ir(n))}function by(e){let t=$(e),r=t.split(";"),o=r[0],n=r.slice(1),s=o.indexOf("="),i=$(s>0?o.slice(0,s):""),a=s>0?$(o.slice(s+1)):"";if(!(!Or.test(i)||!Ir(a)||!n.every(yy)))return{key:i,serialized:t}}function Ty(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>uy)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>py)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=by(s);if(!i)throw new y("Invalid MCP baggage",403);r.has(i.key)&&n.push(i.serialized)}return n.length>0?n.join(","):void 0}function IN(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=Ty(r.baggage,t.baggageAllowlist??[]);return{..._y(r),...o?{baggage:o}:{}}}function PN(e,t){return Rr.run(structuredClone(e),t)}function MN(){let e=Rr.getStore();return e?{...e}:void 0}async function kN(e){let t=S(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(c=>!vr.test(c)))throw new y("Invalid authorization scope",401);let o=`Bearer resource_metadata="${t}"`;if(new URL(e.requestUrl,e.policy.resource).searchParams.has("access_token"))throw new y("Access tokens must not appear in URI query parameters",401,o);let n=fy(e.headers,"authorization")?.match(/^Bearer ([^\s]+)$/iu);if(!n)throw new y("Missing or malformed bearer token",401,o);let s=n[1];if(Buffer.byteLength(s,"utf8")>my)throw new y("Missing or malformed bearer token",401,o);let i;try{i=await e.policy.verifyAccessToken(s)}catch{throw new y("Invalid bearer token",401,o)}let a=Array.isArray(i.audience)?i.audience:[i.audience];if(i.issuer!==e.policy.issuer||!a.includes(e.policy.resource))throw new y("Bearer token issuer or audience mismatch",401,o);let d=r.filter(c=>!i.scopes.includes(c));if(d.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${d.join(" ")}"`);return{...i,audience:[...a],scopes:[...i.scopes]}}function xN(e){let t=wr("sha256").update(e.token).digest();return r=>{let o=wr("sha256").update(r).digest();if(!ry(t,o))throw new y("Invalid bearer token",401);return structuredClone(e.claims)}}(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]="46f5fe59-6b84-5c68-ad07-bb1329f4ea29")}catch{}})();var it="io.modelcontextprotocol/ui",Ae="2026-01-26",kr="text/html;profile=mcp-app",Pr=Object.freeze({specVersion:Ae,mimeTypes:[kr]});function DN(e){let t=e.clientCapabilities.extensions;if(!h(t))return!1;let r=t[it];if(r===void 0)return!1;if(!h(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:Pr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(kr)||n!==void 0&&n!==Ae)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[it]:Pr}}});return!0}var Cy={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},xr=Object.freeze([{id:"context",name:"Context explorer",description:"Inspect bounded project context, provenance, omissions, and token accounting.",toolName:"pm_context",uri:"ui://pm/context.html"},{id:"graph",name:"Relationship graph",description:"Explore typed relationships, explaining paths, and graph-governance evidence.",toolName:"pm_graph",uri:"ui://pm/graph.html"},{id:"plan",name:"Plan and milestone view",description:"Review durable plan steps, dependencies, decisions, discoveries, and validation state.",toolName:"pm_plan",uri:"ui://pm/plan.html"},{id:"assurance",name:"Assurance dashboard",description:"Inspect validation verdicts, evidence, omissions, and actionable recovery paths.",toolName:"pm_validate",uri:"ui://pm/assurance.html"},{id:"operations",name:"Long-operation view",description:"Inspect durable test and operation results without creating a second task store.",toolName:"pm_test",uri:"ui://pm/operations.html"}].map(e=>({...e,toolMeta:{resourceUri:e.uri,visibility:["model","app"]},resourceMeta:Cy})));function $N(e){return xr.find(t=>t.uri===e)}function FN(e){let t=new Map(xr.map(r=>[r.toolName,r]));return e.map(r=>{let o=t.get(r.name);return o?{...r,_meta:{...r._meta,ui:o.toolMeta}}:{...r}})}function Mr(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function GN(e){let t=Mr(e.name),r=Mr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Ae}),n=JSON.stringify(Ae);return`<!doctype html>
6
6
  <html lang="en">
7
7
  <head>
8
8
  <meta charset="utf-8">
@@ -25,11 +25,11 @@ import{a as Qh}from"./chunks/chunk-Y7H55PCY.js";import{a as bk,b as Tk,c as Ck,d
25
25
  (()=>{"use strict";const MAX=24000,status=document.querySelector("#status"),result=document.querySelector("#result"),input=document.querySelector("#input"),pending=new Map();let nextId=1;const render=(node,value)=>{let text;try{text=typeof value==="string"?value:JSON.stringify(value,null,2)}catch{text="Result could not be serialized."}if(text.length>MAX)text=text.slice(0,MAX)+"\\n\\n[View truncated at "+MAX+" characters; use the authoritative pm tool with a cursor or narrower projection.]";node.textContent=text};const send=(message)=>window.parent.postMessage(message,"*");window.addEventListener("message",event=>{if(event.source!==window.parent||!event.data||event.data.jsonrpc!=="2.0")return;const message=event.data;if(message.id!==undefined&&pending.has(message.id)){pending.get(message.id)(message);pending.delete(message.id);return}if(message.method==="ui/notifications/tool-input"||message.method==="ui/notifications/tool-input-partial"){render(input,message.params?.arguments??message.params);status.textContent="Input received"}else if(message.method==="ui/notifications/tool-result"){render(result,message.params);status.textContent="Current tool result"}else if(message.method==="ui/notifications/tool-cancelled"){status.textContent="Tool call cancelled";status.classList.add("notice")}else if(message.method==="ui/notifications/host-context-changed"&&message.params?.theme){document.documentElement.style.colorScheme=message.params.theme}});const request=(method,params)=>new Promise(resolve=>{const id=nextId++;pending.set(id,resolve);send({jsonrpc:"2.0",id,method,params})});document.querySelector("#copy").addEventListener("click",async()=>{const text=result.textContent+"\\n\\n"+input.textContent;try{await navigator.clipboard.writeText(text);status.textContent="Visible evidence copied"}catch{status.textContent="Clipboard permission unavailable";status.classList.add("notice")}});request("ui/initialize",{appInfo:${o},appCapabilities:{},protocolVersion:${n}}).then(message=>{if(message.error){status.textContent="Host rejected MCP App initialization";status.classList.add("notice");return}send({jsonrpc:"2.0",method:"ui/notifications/initialized"});status.textContent="Connected \u2014 awaiting authoritative result"})})();
26
26
  </script>
27
27
  </body>
28
- </html>`}import{createHash as st}from"node:crypto";import{lstat as cy,readdir as jr,readFile as ly}from"node:fs/promises";import M from"node:path";import{parseDocument as py}from"yaml";(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]="eafd8bc3-0da1-5220-8fb1-6967eecdb6bf")}catch{}})();var Nr="io.modelcontextprotocol/skills",at="SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",uy=Object.freeze({revision:at,status:"draft",directoryRead:!0});function kN(e,t=!1){let r=e.clientCapabilities.extensions,o=h(r)?r[Nr]:void 0;if(!h(o)||o.revision!==at||t&&o.directoryRead!==!0)throw new u("Missing or incompatible Skills over MCP draft capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[Nr]:uy}}})}var I=Object.freeze({maxFilesPerSkill:512,maxFileBytes:16*1024*1024,maxSkillBytes:16*1024*1024,defaultPageSize:20,maxPageSize:100}),Lr=100,my=32*1024*1024,fy=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Dr=new Set(Array.from({length:I.maxPageSize},(e,t)=>t+1));function C(e,t){throw new u(e,-32602,t)}function $r(e,t){try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),e.endsWith(".md")?"text/markdown":"text/plain"}catch{return"application/octet-stream"}}function _y(e,t){let r=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/u.exec(e);r||C(`Skill ${t} is missing YAML frontmatter.`);let o=py(r[1],{prettyErrors:!1,strict:!0,uniqueKeys:!0});o.errors.length>0&&C(`Skill ${t} has invalid YAML frontmatter.`,{errors:o.errors.map(s=>s.message)});let n;try{n=o.toJS({maxAliasCount:0})}catch(s){C(`Skill ${t} has unsupported YAML aliases.`,{error:String(s)})}return(typeof n!="object"||n===null||Array.isArray(n))&&C(`Skill ${t} frontmatter must be an object.`),n}async function hy(e,t,r,o){return r>I.maxFileBytes&&C(`Skill resource exceeds the per-file limit: ${t}.`),o.files+=1,o.files>I.maxFilesPerSkill&&C(`Skill exceeds ${I.maxFilesPerSkill} files.`),o.skillBytes+=r,o.skillBytes>I.maxSkillBytes&&C(`Skill exceeds the aggregate byte limit: ${t}.`),o.originBytes.value+=r,o.originBytes.value>my&&C(`Skill origin exceeds the aggregate byte limit: ${t}.`),ly(e)}async function Br(e,t,r){let o=M.join(e,t),n=await jr(o,{withFileTypes:!0}),s=[];for(let i of n.sort((a,d)=>a.name.localeCompare(d.name))){let a=M.posix.join(t.split(M.sep).join("/"),i.name),d=M.join(e,...a.split("/")),c=await cy(d);c.isSymbolicLink()&&C(`Skill resource must not be a symbolic link: ${a}.`),c.isDirectory()?s.push(...await Br(e,a,r)):c.isFile()?s.push({relative:a,bytes:await hy(d,a,c.size,r)}):C(`Skill resource must be a regular file or directory: ${a}.`)}return s}async function Fr(e,t,r){let o=new Map,n;try{n=await jr(e,{withFileTypes:!0})}catch(a){if(Ct(a))return o;throw a}let s=n.filter(a=>a.isDirectory()&&fy.test(a.name)).sort((a,d)=>a.name.localeCompare(d.name));s.length>Lr&&C(`Skill origin exceeds ${Lr} directories.`);let i={value:0};for(let a of s){let d=await Br(M.join(e,a.name),"",{files:0,skillBytes:0,originBytes:i}),c=d.reduce((g,T)=>g+T.bytes.byteLength,0),l=d.find(g=>g.relative==="SKILL.md");if(!l)continue;let p=_y(l.bytes.toString("utf8"),a.name);p.name!==a.name&&C(`Skill directory ${a.name} must match frontmatter name.`,{actual:p.name??null,expected:a.name}),(typeof p.description!="string"||p.description.trim().length===0)&&C(`Skill ${a.name} requires a non-empty frontmatter description.`,{required:["description"]});let f=d.map(g=>({uri:`skill://${a.name}/${g.relative}`,digest:`sha256:${st("sha256").update(g.bytes).digest("hex")}`,size:g.bytes.byteLength})),_=st("sha256").update(f.map(g=>`${g.uri}:${g.digest}`).join(`
28
+ </html>`}import{createHash as st}from"node:crypto";import{lstat as Ey,readdir as jr,readFile as Sy}from"node:fs/promises";import M from"node:path";import{parseDocument as wy}from"yaml";(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]="eafd8bc3-0da1-5220-8fb1-6967eecdb6bf")}catch{}})();var Nr="io.modelcontextprotocol/skills",at="SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",Ay=Object.freeze({revision:at,status:"draft",directoryRead:!0});function KN(e,t=!1){let r=e.clientCapabilities.extensions,o=h(r)?r[Nr]:void 0;if(!h(o)||o.revision!==at||t&&o.directoryRead!==!0)throw new u("Missing or incompatible Skills over MCP draft capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[Nr]:Ay}}})}var P=Object.freeze({maxFilesPerSkill:512,maxFileBytes:16*1024*1024,maxSkillBytes:16*1024*1024,defaultPageSize:20,maxPageSize:100}),Lr=100,vy=32*1024*1024,Oy=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Dr=new Set(Array.from({length:P.maxPageSize},(e,t)=>t+1));function C(e,t){throw new u(e,-32602,t)}function $r(e,t){try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),e.endsWith(".md")?"text/markdown":"text/plain"}catch{return"application/octet-stream"}}function Ry(e,t){let r=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/u.exec(e);r||C(`Skill ${t} is missing YAML frontmatter.`);let o=wy(r[1],{prettyErrors:!1,strict:!0,uniqueKeys:!0});o.errors.length>0&&C(`Skill ${t} has invalid YAML frontmatter.`,{errors:o.errors.map(s=>s.message)});let n;try{n=o.toJS({maxAliasCount:0})}catch(s){C(`Skill ${t} has unsupported YAML aliases.`,{error:String(s)})}return(typeof n!="object"||n===null||Array.isArray(n))&&C(`Skill ${t} frontmatter must be an object.`),n}async function Iy(e,t,r,o){return r>P.maxFileBytes&&C(`Skill resource exceeds the per-file limit: ${t}.`),o.files+=1,o.files>P.maxFilesPerSkill&&C(`Skill exceeds ${P.maxFilesPerSkill} files.`),o.skillBytes+=r,o.skillBytes>P.maxSkillBytes&&C(`Skill exceeds the aggregate byte limit: ${t}.`),o.originBytes.value+=r,o.originBytes.value>vy&&C(`Skill origin exceeds the aggregate byte limit: ${t}.`),Sy(e)}async function Br(e,t,r){let o=M.join(e,t),n=await jr(o,{withFileTypes:!0}),s=[];for(let i of n.sort((a,d)=>a.name.localeCompare(d.name))){let a=M.posix.join(t.split(M.sep).join("/"),i.name),d=M.join(e,...a.split("/")),c=await Ey(d);c.isSymbolicLink()&&C(`Skill resource must not be a symbolic link: ${a}.`),c.isDirectory()?s.push(...await Br(e,a,r)):c.isFile()?s.push({relative:a,bytes:await Iy(d,a,c.size,r)}):C(`Skill resource must be a regular file or directory: ${a}.`)}return s}async function Fr(e,t,r){let o=new Map,n;try{n=await jr(e,{withFileTypes:!0})}catch(a){if(Ct(a))return o;throw a}let s=n.filter(a=>a.isDirectory()&&Oy.test(a.name)).sort((a,d)=>a.name.localeCompare(d.name));s.length>Lr&&C(`Skill origin exceeds ${Lr} directories.`);let i={value:0};for(let a of s){let d=await Br(M.join(e,a.name),"",{files:0,skillBytes:0,originBytes:i}),c=d.reduce((g,T)=>g+T.bytes.byteLength,0),l=d.find(g=>g.relative==="SKILL.md");if(!l)continue;let p=Ry(l.bytes.toString("utf8"),a.name);p.name!==a.name&&C(`Skill directory ${a.name} must match frontmatter name.`,{actual:p.name??null,expected:a.name}),(typeof p.description!="string"||p.description.trim().length===0)&&C(`Skill ${a.name} requires a non-empty frontmatter description.`,{required:["description"]});let f=d.map(g=>({uri:`skill://${a.name}/${g.relative}`,digest:`sha256:${st("sha256").update(g.bytes).digest("hex")}`,size:g.bytes.byteLength})),_=st("sha256").update(f.map(g=>`${g.uri}:${g.digest}`).join(`
29
29
  `)).digest("hex");o.set(a.name,{uri:`skill://${a.name}/SKILL.md`,frontmatter:p,resources:f,_meta:{contractVersion:1,extensionRevision:at,origin:t,packageVersion:r,protocolVersion:H,trust:"untrusted",estimatedTokens:Math.ceil(c/4)},files:new Map(d.map(g=>[g.relative,g.bytes])),fingerprint:_})}return o}function Gr(e){let{files:t,fingerprint:r,...o}=e;return o}var Ur=class e{#e;#t;constructor(t){this.#e=t,this.#t=st("sha256").update([...t.entries()].sort(([r],[o])=>r.localeCompare(o)).map(([r,o])=>`${r}:${o.fingerprint}`).join(`
30
- `)).digest("hex").slice(0,16)}#r(t,r){if(!t)return 0;try{let o=JSON.parse(Buffer.from(t,"base64url").toString("utf8"));return(typeof o!="object"||o===null||!("fingerprint"in o)||o.fingerprint!==this.#t||!("scope"in o)||o.scope!==r||!("offset"in o)||!Number.isInteger(o.offset)||Number(o.offset)<0)&&C("Skill cursor is invalid or stale."),Number(o.offset)}catch(o){if(o instanceof u)throw o;return C("Skill cursor is invalid or stale.")}}#o(t,r){return Buffer.from(JSON.stringify({fingerprint:this.#t,offset:t,scope:r})).toString("base64url")}static async load(t){let r=await Fr(M.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=M.resolve(t.packageRoot,".agents","skills"),n=M.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await Fr(n,"workspace",t.packageVersion);for(let[i,a]of s)r.set(i,a)}}return new e(r)}list(t={}){let r=t.limit??I.defaultPageSize;Dr.has(r)||C(`Skill list limit must be an integer from 1 to ${I.maxPageSize}.`);let o=this.#r(t.cursor,"skills/list"),n=[...this.#e.values()].sort((d,c)=>d.uri.localeCompare(c.uri)),s=n.slice(o,o+r),i=o+s.length,a=i<n.length;return{skills:s.map(Gr),hasMore:a,...a?{nextCursor:this.#o(i,"skills/list")}:{}}}get(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/SKILL\.md$/u.exec(t),o=r?this.#e.get(r[1]):void 0;return o||C(`Unknown pm MCP skill: ${t}.`,{field:"uri"}),Gr(o)}read(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/(.+)$/u.exec(t),o=r?this.#e.get(r[1]):void 0,n=r?.[2]??"",s=o&&n?o.files.get(n):void 0,i=o?.resources.find(c=>c.uri===t);(!o||!s||!i)&&C(`Unknown pm MCP skill resource: ${t}.`,{field:"uri"});let a={digest:i.digest,origin:o._meta.origin,trust:"untrusted"},d=$r(n,s);return d!=="application/octet-stream"?{contents:[{uri:t,mimeType:d,text:s.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:d,blob:s.toString("base64"),_meta:a}]}}readDirectory(t,r={}){let o=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(.+))?$/u.exec(t),n=o?this.#e.get(o[1]):void 0;n||C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let s=(o?.[2]??"").replace(/\/$/u,""),i=s.length>0?`${s}/`:"",a=`skill://${o[1]}`,d=new Map;for(let T of n.resources){let S=T.uri.slice(`${a}/`.length);if(!S.startsWith(i))continue;let q=S.slice(i.length),[P,...vo]=q.split("/"),Oo=`${a}/${i}${P}`,Po=n.files.get(`${i}${P}`);d.set(P,{uri:Oo,name:P,mimeType:vo.length>0?"inode/directory":$r(P,Po)})}s.length>0&&d.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??I.maxPageSize;Dr.has(c)||C(`Skill directory limit must be an integer from 1 to ${I.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((T,S)=>T.uri.localeCompare(S.uri)),f=p.slice(l,l+c),_=l+f.length,g=_<p.length;return{resources:f,hasMore:g,...g?{nextCursor:this.#o(_,t)}:{}}}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}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]="2b24276b-948b-50bd-bfd9-f429cd74be70")}catch{}})();var qr="https://schema.unbrained.dev/pm/workspace-recipe/v1";function dt(e,t){if(e===null||typeof e=="boolean"||typeof e=="string")return e;if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`Workspace recipe JSON number must be finite at ${t}`);return e}if(Array.isArray(e))return Object.freeze(e.map((r,o)=>dt(r,`${t}[${o}]`)));if(typeof e!="object"||Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw new Error(`Workspace recipe input must contain JSON values at ${t}`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([r,o])=>[r,dt(o,`${t}.${r}`)])))}function ve(e){if(e.schema!==qr)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=St(e);if(e.operations.some(r=>r.action.trim().length===0||r.input===null||Array.isArray(r.input)))throw new Error("Workspace recipe operations require an action and object input");return Object.freeze({...t,operations:Object.freeze(e.operations.map((r,o)=>Object.freeze({action:r.action,input:dt(r.input,`operations[${o}].input`)})))})}async function zr(e,t){let r=ve(e);return wt(r,t)}async function gy(e,t){return zr(e,async()=>{let r=[];for(let[o,n]of e.operations.entries())r.push(await t(n,o));return r})}(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]="c234be1c-35b7-5388-8a70-a012e9a34389")}catch{}})();var Hr="pm.agent-observation/v1",Vr="pm.agent-verdict/v1",Kr="pm.agent-episode/v1";function O(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`)}function k(e,t){if(e.trim().length===0)throw new Error(`${t} must not be empty.`)}function ne(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))ne(t)}return e}function yy(e){if(e.length===0)throw new Error("observation.reads must declare at least one bounded read.");let t=0;for(let r of e)if(k(r.command,"observation.reads.command"),O(r.budget_tokens,"observation.reads.budget_tokens"),t+=r.budget_tokens,!Number.isSafeInteger(t))throw new Error("observation read ceilings exceed safe integer range.")}function by(e){if(e.basis!=="emitted_bytes")throw new Error("observation calibration must use emitted_bytes.");for(let r of e.samples)if(!Number.isSafeInteger(r)||r<0)throw new Error("observation calibration samples must be non-negative safe integers.");if(e.samples.length===0)throw new Error("observation calibration must include at least one sample.");if(O(e.expected_emitted_bytes,"observation.calibration.expected_emitted_bytes"),!Number.isSafeInteger(e.tolerance_bytes)||e.tolerance_bytes<0)throw new Error("observation.calibration.tolerance_bytes must be a non-negative safe integer.");let t=e.samples.reduce((r,o)=>r+o,0)/e.samples.length;if(Math.abs(t-e.expected_emitted_bytes)>e.tolerance_bytes)throw new Error("observation expected_emitted_bytes is outside the calibrated sample tolerance.")}function Ty(e){if(e.length===0)throw new Error("observation.tiers must declare a degradation ladder.");let t=new Set,r=Number.POSITIVE_INFINITY;for(let o of e){if(k(o.id,"observation.tiers.id"),O(o.max_tokens,"observation.tiers.max_tokens"),t.has(o.id))throw new Error(`Duplicate observation tier: ${o.id}.`);if(t.add(o.id),o.max_tokens>r)throw new Error("observation tiers must be ordered from largest to smallest max_tokens.");r=o.max_tokens;let n=new Set;for(let s of o.fields){if(F(s,"observation.tiers.fields"),n.has(s))throw new Error(`Duplicate observation tier field: ${s}.`);n.add(s)}}}function Cy(e){if(e.schema!==Hr)throw new Error(`observation.schema must be ${Hr}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),yy(e.reads),by(e.calibration),e.corpus_dependence.kind==="bounded"&&(k(e.corpus_dependence.dimension,"observation.corpus_dependence.dimension"),O(e.corpus_dependence.maximum,"observation.corpus_dependence.maximum")),Ty(e.tiers),ne(structuredClone(e))}function jN(e){return{contract_id:e.id,contract_version:e.version,guaranteed_ceiling_tokens:e.reads.reduce((t,r)=>t+r.budget_tokens,0),expected_emitted_bytes:e.calibration.expected_emitted_bytes,expected_tokens:Math.ceil(e.calibration.expected_emitted_bytes/4),tolerance_bytes:e.calibration.tolerance_bytes,calibration_basis:"emitted_bytes",corpus_dependence:e.corpus_dependence}}async function Sy(e,t,r){O(r.budget_tokens,"observation request budget_tokens");let o=[];for(let[n,s]of e.tiers.entries()){o.push(s.id);let i=await t(s),a=Buffer.byteLength(R(i),"utf8"),d=Math.ceil(a/4);if(d<=Math.min(r.budget_tokens,s.max_tokens))return{status:"served",payload:i,receipt:{contract_id:e.id,contract_version:e.version,served_tier:s.id,degraded:n>0,attempted_tiers:o,emitted_bytes:a,estimated_tokens:d,calibration_basis:"emitted_bytes"}}}return{status:"refused",reason:"no_declared_tier_fits_budget",receipt:{contract_id:e.id,contract_version:e.version,served_tier:null,degraded:e.tiers.length>1,attempted_tiers:o,emitted_bytes:null,estimated_tokens:null,calibration_basis:"emitted_bytes"}}}function F(e,t){let r=e.split(".");if(r.some(o=>o.length===0||o==="__proto__"||o==="prototype"||o==="constructor"))throw new Error(`${t} must be a safe, non-empty dot-separated path.`);return r}function Wr(e,t){let r=e;for(let o of F(t,"recorded field path")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function wy(e){return`/${F(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function Ey(e){if(e.kind!=="field_equals")return;let t;try{t=JSON.stringify(e.expected)}catch{throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}if(t===void 0)throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}function Ay(e){if(e.schema!==Vr)throw new Error(`verdict.schema must be ${Vr}.`);k(e.id,"verdict.id"),O(e.version,"verdict.version");let t=new Set;for(let o of e.predicates){k(o.id,"verdict.predicates.id"),F(o.path,"verdict.predicates.path");let n=o.kind;if(n!=="field_equals"&&n!=="field_present"&&n!=="field_absent")throw new Error(`Unsupported verdict predicate kind for ${o.id}.`);if(t.has(o.id))throw new Error(`Duplicate verdict predicate: ${o.id}.`);Ey(o),t.add(o.id)}if(e.composition.operator!=="all"&&e.composition.operator!=="any")throw new Error("verdict composition operator must be all or any.");if(e.composition.predicate_ids.length!==e.predicates.length)throw new Error("verdict composition must reference every predicate exactly once.");let r=new Set(e.composition.predicate_ids);if(r.size!==e.composition.predicate_ids.length||[...r].some(o=>!t.has(o)))throw new Error("verdict composition contains duplicate or unknown predicate ids.");return ne(structuredClone(e))}function vy(e,t){if(e.predicates.length===0)return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:"not_applicable",score:null,policy:"verdict_only_no_reward",reason:"no_predicates_declared",predicates:[]};let r=new Map(e.predicates.map(i=>[i.id,i])),o=e.composition.predicate_ids.map(i=>{let a=r.get(i),d=Wr(t.state,a.path),c=a.kind==="field_present"?d!==void 0:a.kind==="field_absent"?d===void 0:R(d)===R(a.expected);return{id:i,outcome:c?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${wy(a.path)}`,evidence_digest:yt(R(d))}}),n=o.filter(i=>i.outcome==="satisfied").length,s=e.composition.operator==="all"?n===o.length:n>0;return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:s?"satisfied":"violated",score:n/o.length,policy:"verdict_only_no_reward",predicates:o}}function BN(e){if(e.schema!==Kr)throw new Error(`episode.schema must be ${Kr}.`);if(k(e.id,"episode.id"),O(e.version,"episode.version"),!["benchmark","evaluation","training","scale_transfer"].includes(e.mode))throw new Error("episode.mode is not supported.");if(e.task_item_ids.length===0)throw new Error("episode.task_item_ids must declare at least one pm item.");for(let t of e.task_item_ids)k(t,"episode.task_item_ids");O(e.limits.max_actions,"episode.limits.max_actions"),O(e.limits.max_observations,"episode.limits.max_observations"),O(e.limits.max_tokens_per_observation,"episode.limits.max_tokens_per_observation");for(let t of e.observable_fields)F(t,"episode.observable_fields");for(let t of e.withheld_fields)F(t,"episode.withheld_fields");for(let t of e.observable_fields){let r=e.withheld_fields.find(o=>t===o||t.startsWith(`${o}.`)||o.startsWith(`${t}.`));if(r!==void 0)throw new Error(`Observable field ${t} overlaps withheld field ${r}.`)}for(let t of e.observation.tiers)for(let r of t.fields)if(!e.observable_fields.includes(r))throw new Error(`Observation tier field ${r} is not declared observable.`);return Cy(e.observation),Ay(e.verdict),ve(e.recipe),ne(structuredClone(e))}function Oy(e,t,r){let o=F(t,"observation projection field"),n=e;for(let[s,i]of o.entries()){if(s===o.length-1){r!==void 0&&(n[i]=structuredClone(r));return}let a=n[i];(a===null||typeof a!="object"||Array.isArray(a))&&(n[i]={}),n=n[i]}}function Py(e,t){let r={};for(let o of t)Oy(r,o,Wr(e,o));return r}async function qN(e,t){let r=[],o=0,n=0,s=!1,i,a={episode:{id:e.id,label:`pm agent environment v${e.version}`},provenance:{role:e.mode,topic:"agent-environment"}},d=await D(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:d.state_id});let c=async()=>{if(s)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let p=await t.readRecordedState(),f=await Sy(e.observation,async _=>Py(p.state,_.fields),{budget_tokens:e.limits.max_tokens_per_observation});return r.push({sequence:r.length+1,kind:"observation",state_id:f.receipt.served_tier??p.snapshot_id}),f},l=async(p=!1)=>{if(s&&!p)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let f=await t.readRecordedState(),_=vy(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),_};return{observe:()=>D(a,c),step:async p=>{if(s)throw new Error("episode is already closed.");if(o>=e.limits.max_actions)throw new Error("episode exceeded limits.max_actions.");o+=1;let f=await D(a,()=>t.execute(p));return r.push({sequence:r.length+1,kind:"action",state_id:f.state_id}),f},score:()=>D(a,l),close:()=>i!==void 0?i:s?Promise.reject(new Error("episode is already closed.")):(s=!0,i=D(a,()=>l(!0)).then(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:ne(structuredClone(r))})).catch(p=>{throw s=!1,p}).finally(()=>{i=void 0}),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]="14472bc2-ebca-5b9c-9462-bd8694b630a0")}catch{}})();var G="https://schema.unbrained.dev/pm/corpus-shape/v1";function K(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError(`Corpus shape ${t} must be a positive safe integer`);return e}function ie(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Xr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Xr(t);Object.freeze(e)}}function W(e){if(e.schema!==G)throw new TypeError(`Unsupported corpus shape schema: ${e.schema}`);if(e.name.trim().length===0||e.description.trim().length===0)throw new TypeError("Corpus shape name and description must be non-empty");if(K(e.hierarchy_depth,"hierarchy_depth"),K(e.hierarchy_fanout,"hierarchy_fanout"),ie(e.age_span_days,"age_span_days"),K(e.history_entries_per_item,"history_entries_per_item"),ie(e.comments_per_100_items,"comments_per_100_items"),ie(e.notes_per_100_items,"notes_per_100_items"),ie(e.learnings_per_100_items,"learnings_per_100_items"),K(e.author_cardinality,"author_cardinality"),K(e.component_count,"component_count"),e.edge_kind_mix.length===0||e.edge_kind_mix.some(r=>r.kind.trim().length===0||r.weight<=0))throw new TypeError("Corpus shape edge_kind_mix requires non-empty kinds with positive weights");if(e.terminal_statuses.some(r=>!e.custom_statuses.includes(r)))throw new TypeError("Corpus shape terminal_statuses must be declared in custom_statuses");let t=structuredClone(e);return Xr(t),t}var Oe=[{kind:"implements",weight:5},{kind:"blocked_by",weight:2},{kind:"discovered_from",weight:2},{kind:"verifies",weight:2},{kind:"supersedes",weight:1},{kind:"related",weight:4}],Y=Object.freeze({scratch:W({schema:G,name:"scratch",description:"Seconds-old, shallow project with minimal history.",hierarchy_depth:2,hierarchy_fanout:50,age_span_days:0,history_entries_per_item:1,comments_per_100_items:2,notes_per_100_items:1,learnings_per_100_items:1,edge_kind_mix:[{kind:"related",weight:1}],author_cardinality:2,component_count:1,include_cycles:!1,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),representative:W({schema:G,name:"representative",description:"Medium-lived project with rich evidence and typed lineage.",hierarchy_depth:5,hierarchy_fanout:8,age_span_days:730,history_entries_per_item:12,comments_per_100_items:30,notes_per_100_items:12,learnings_per_100_items:10,edge_kind_mix:Oe,author_cardinality:32,component_count:1,include_cycles:!1,custom_types:["Experiment"],custom_statuses:["review"],terminal_statuses:[],custom_fields:["domain"]}),"deep-graph":W({schema:G,name:"deep-graph",description:"Deep typed relationship graph with deterministic cycles.",hierarchy_depth:16,hierarchy_fanout:2,age_span_days:3650,history_entries_per_item:6,comments_per_100_items:15,notes_per_100_items:8,learnings_per_100_items:8,edge_kind_mix:Oe,author_cardinality:16,component_count:1,include_cycles:!0,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),"multi-decade":W({schema:G,name:"multi-decade",description:"Thirty-year event history with dense per-item evolution.",hierarchy_depth:6,hierarchy_fanout:6,age_span_days:10958,history_entries_per_item:24,comments_per_100_items:40,notes_per_100_items:20,learnings_per_100_items:16,edge_kind_mix:Oe,author_cardinality:64,component_count:1,include_cycles:!1,custom_types:["Program"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["portfolio"]}),"disconnected-archive":W({schema:G,name:"disconnected-archive",description:"Multiple disconnected historical project components.",hierarchy_depth:4,hierarchy_fanout:10,age_span_days:7305,history_entries_per_item:8,comments_per_100_items:10,notes_per_100_items:5,learnings_per_100_items:6,edge_kind_mix:Oe,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function Ry(){return Object.keys(Y).sort().map(e=>Y[e])}function Iy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(Y,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(Y).join(", ")}`);return Y[t]}var Yr=new WeakMap;function Jr(e,t){if(e===0)return[];let r=Yr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Yr.set(t,r));let o=[r[e%r.length]];return t.include_cycles&&e>2&&e%17===0&&o.push("related"),[...new Set(o)]}function My(e,t,r,o=42){if(ie(t,"item index"),K(r,"item count"),t>=r)throw new RangeError(`Corpus item index ${t} exceeds ${r}`);let n=Math.min(e.component_count,r),s=t%n,i=Math.floor(t/n),a=0,d=1;for(let S=0;S<e.hierarchy_depth;S+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+d),d=Math.min(Number.MAX_SAFE_INTEGER,d*e.hierarchy_fanout);let c=i%a,l=i-c,p=c===0?void 0:s+(l+Math.floor((c-1)/e.hierarchy_fanout))*n,f=Date.UTC(2026,0,1),_=e.age_span_days*864e5,g=new Date(f+(r===1?0:Math.round(t/(r-1)*_))).toISOString(),T=(t*37+o)%100;return{index:t,id:`pm-s${t.toString(36).padStart(7,"0")}`,...p===void 0?{}:{parent:`pm-s${p.toString(36).padStart(7,"0")}`},component:s,timestamp:g,author:`pm-corpus-agent-${(t+o)%Math.min(e.author_cardinality,r)}`,history_entry_count:e.history_entries_per_item,dependency_kinds:Jr(t,e),has_comment:T<e.comments_per_100_items,has_note:T<e.notes_per_100_items,has_learning:T<e.learnings_per_100_items,...e.custom_types.length>0&&t%11===0?{custom_type:e.custom_types[t%e.custom_types.length]}:{},...e.custom_statuses.length>0&&t%13===0?{custom_status:e.custom_statuses[t%e.custom_statuses.length]}:{}}}var ct=class{shape;authors=new Set;components=new Set;depths=new Map;childCounts=new Map;edgeKinds={};expectedEdgeKinds={};annotations={comments:0,notes:0,learnings:0};annotationFields;planMismatches=[];itemCount=0;observedDepth=0;observedFanout=0;historyEntryCount=0;firstTimestamp=null;lastTimestamp=null;constructor(t){this.shape=t,this.annotationFields=[["comments","has_comment",t.comments_per_100_items],["notes","has_note",t.notes_per_100_items],["learnings","has_learning",t.learnings_per_100_items]]}recordMismatch(t,r){t&&this.planMismatches.push(r)}recordEdgeKinds(t,r){for(let o of r)t[o]=(t[o]??0)+1}add(t){this.itemCount+=1,this.authors.add(t.author),this.components.add(t.component),this.recordMismatch(this.depths.has(t.id),`duplicate_id:${t.id}`);let r=1;if(t.parent!==void 0){let o=this.depths.get(t.parent);this.recordMismatch(o===void 0,`parent_missing:${t.parent}`),r=(o??0)+1;let n=(this.childCounts.get(t.parent)??0)+1;this.childCounts.set(t.parent,n),this.observedFanout=Math.max(this.observedFanout,n)}this.depths.set(t.id,r),this.observedDepth=Math.max(this.observedDepth,r),this.historyEntryCount+=t.history_entry_count,this.recordMismatch(t.history_entry_count!==this.shape.history_entries_per_item,"history_entries_per_item:drift"),this.firstTimestamp=this.firstTimestamp===null||t.timestamp<this.firstTimestamp?t.timestamp:this.firstTimestamp,this.lastTimestamp=this.lastTimestamp===null||t.timestamp>this.lastTimestamp?t.timestamp:this.lastTimestamp;for(let[o,n]of this.annotationFields)this.annotations[o]+=Number(t[n]);this.recordEdgeKinds(this.edgeKinds,t.dependency_kinds),this.recordEdgeKinds(this.expectedEdgeKinds,Jr(t.index,this.shape))}finish(){let t=Math.min(this.shape.author_cardinality,this.itemCount),r=Math.min(this.shape.component_count,this.itemCount),o=[...this.planMismatches,...this.itemCount===0?["item_count:empty"]:[],...this.authors.size===t?[]:[`author_count:${this.authors.size}!=${t}`],...this.components.size===r?[]:[`component_count:${this.components.size}!=${r}`],...this.observedDepth<=this.shape.hierarchy_depth?[]:[`hierarchy_depth:${this.observedDepth}>${this.shape.hierarchy_depth}`],...this.observedFanout<=this.shape.hierarchy_fanout?[]:[`hierarchy_fanout:${this.observedFanout}>${this.shape.hierarchy_fanout}`]];for(let[i,,a]of this.annotationFields){let d=Math.floor(this.itemCount/100),c=this.itemCount%100,l=d*a+Math.max(0,a+c-100),p=d*a+Math.min(a,c),f=this.annotations[i];(f<l||f>p)&&o.push(`${i}:${f}!in[${l},${p}]`)}let n=new Set([...Object.keys(this.edgeKinds),...Object.keys(this.expectedEdgeKinds)]);for(let i of[...n].sort()){let a=this.edgeKinds[i]??0,d=this.expectedEdgeKinds[i]??0;a!==d&&o.push(`edge_kind:${i}:${a}!=${d}`)}let s=[...new Set(o)];return{shape:this.shape.name,item_count:this.itemCount,author_count:this.authors.size,component_count:this.components.size,hierarchy_depth:this.observedDepth,hierarchy_fanout:this.observedFanout,timestamp_range:{first:this.firstTimestamp,last:this.lastTimestamp},history_entry_count:this.historyEntryCount,annotations:{...this.annotations},edge_kinds:{...this.edgeKinds},matches_declaration:s.length===0,mismatches:s}}};function Zr(e){return new ct(e)}function ky(e,t){let r=Zr(e);for(let o of t)r.add(o);return r.finish()}(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]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}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]="6a6b2905-b6b7-5b46-b87d-8b8287e37745")}catch{}})();async function xy(){let e=Ge(process.cwd(),process.env.PM_PATH);await vt(e,(t,r)=>Ot(t,r,{apply_runtime_defaults:!0}))}(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]="4534b1c9-de27-5745-88f2-641b00b94714")}catch{}})();async function Ny(){await Pt()}(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]="c1cb8d82-20a6-5460-a0ff-f55312911218")}catch{}})();var Qr=["lines","branches","functions","statements"];function Ly(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function Dy(e,t,r){if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);let o=r;if(typeof o.covered!="number"||typeof o.total!="number"||!Number.isInteger(o.covered)||!Number.isInteger(o.total)||o.covered<0||o.total<o.covered)throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);return{covered:o.covered,total:o.total}}function $y(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Coverage summary must be a JSON object.");if(!("total"in e))throw new TypeError("Coverage summary is missing the total entry.");let t=[];for(let[r,o]of Object.entries(e)){Ly(r,o);for(let n of Qr){let s=Dy(r,n,o[n]),i=s.total-s.covered;i>0&&t.push({file:r,metric:n,uncovered:i,...s})}}return t}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var Fy=["captured_redacted","captured_verbatim"],Gy=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function v(e){return typeof e=="string"&&e.trim().length>0}function Uy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let r=t,o=[];r.boundary_id!==e.id&&o.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(r.boundary_id)} instead of ${e.id}.`}),(r.version!==1||!Fy.includes(r.capture_source)||!v(r.capture_provenance)||!Array.isArray(r.redactions)||!r.redactions.every(v)||!("input"in r)||!("observed"in r))&&o.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let n=JSON.stringify(t);for(let s of Gy)s.pattern.test(n)&&o.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${s.label}.`});return o}function jy(e,t){let r=Date.parse(e.waiver_expires_at),o=v(e.waiver_reason)&&v(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&_e(e.waiver_expires_at)&&Number.isFinite(r);return{captured:0,waived:o&&r>=t?1:0,findings:o?r<t?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function By(e,t,r){if(!v(e.id)||!v(e.producer)||!v(e.consumer)||!v(e.format))return{captured:0,waived:0,findings:[{boundary_id:v(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let o=t[e.fixture_path],n=v(e.fixture_path)&&e.fixture_path in t?Uy(e,o):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:n.length===0?1:0,waived:0,findings:n}}return jy(e,r)}function sL(e,t,r=new Date){let o=[];if(e.version!==1||!v(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let n=new Set,s=0,i=0;for(let a of e.boundaries){if(typeof a!="object"||a===null||Array.isArray(a)){o.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let d=a,c=v(d.id)?d.id:void 0;if(c!==void 0&&n.has(c)){o.push({boundary_id:c,kind:"duplicate_boundary",detail:`Boundary ${c} is inventoried more than once.`});continue}c!==void 0&&n.add(c);let l=By(d,t,r.getTime());s+=l.captured,i+=l.waived,o.push(...l.findings)}return o.sort((a,d)=>a.boundary_id!==d.boundary_id?a.boundary_id.localeCompare(d.boundary_id):a.kind.localeCompare(d.kind)),{ok:o.length===0,boundary_count:e.boundaries.length,captured_count:s,waived_count:i,findings:o}}import X from"node:fs";import lt 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]="aacf5738-098d-50f9-b619-19e472b577ea")}catch{}})();var eo=300*1e3,qy=3;function pL(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function uL(e,t){let r=t.trim();if(!/^[a-zA-Z0-9_-][a-zA-Z0-9._-]*$/.test(r))throw new TypeError("Compile-cache generation must be a safe non-empty filename token.");X.mkdirSync(e,{recursive:!0});let o=lt.join(e,r);X.mkdirSync(o,{recursive:!0});let n=new Date;X.utimesSync(o,n,n);let s=X.readdirSync(e).filter(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:X.statSync(lt.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&fe(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),i=s.filter(c=>n.getTime()-c.mtimeMs<eo),a=Math.max(0,qy-1-i.length),d=s.filter(c=>n.getTime()-c.mtimeMs>=eo).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)X.rmSync(lt.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as zy}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]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var pt=1;function J(e){e?.throwIfAborted()}function U(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${t} must be non-empty`);return e.trim()}function Z(e,t,r={}){let o=Date.parse(r.createdAt??new Date().toISOString());if(!Number.isFinite(o))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let n=e.nodes(),s=e.edges(),i=t.list();return Object.freeze({version:pt,fingerprint:zy("sha256").update(R({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function Hy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e){if(!Hy(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==pt)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(n=>typeof n!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let t=new Ue([]);for(let n of e.kinds)t.register(n);let r=new z(e.nodes,e.edges,t),o=Z(r,t,{createdAt:e.created_at});if(o.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:o,registry:t,graph:r}}async function x(e,t){U(e.name,"adapter name");let r=U(t.workspace,"workspace");J(t.signal);let o=await e.read({...t,workspace:r});return J(t.signal),o===null?null:ae(o)}async function Pe(e,t){let r=U(t.workspace,"workspace"),o=ae(t.snapshot).snapshot,n=await x(e,{workspace:r,signal:t.signal});if(n?.snapshot.fingerprint===o.fingerprint)return{adapter:e.name,workspace:r,disposition:"current",fingerprint:o.fingerprint,previous_fingerprint:n.snapshot.fingerprint,node_count:o.nodes.length,edge_count:o.edges.length};if(J(t.signal),await e.replace({workspace:r,signal:t.signal,snapshot:o,expected_fingerprint:n?.snapshot.fingerprint??null}),(await x(e,{workspace:r,signal:t.signal}))?.snapshot.fingerprint!==o.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:r,disposition:"written",fingerprint:o.fingerprint,...n?{previous_fingerprint:n.snapshot.fingerprint}:{},node_count:o.nodes.length,edge_count:o.edges.length}}function Vy(e,t={}){let r=e.map(ae),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let d=o.get(a.kind);if(d&&R(d)!==R(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Ue([...o.values()].sort((i,a)=>i.kind.localeCompare(a.kind))),s=new z(new Set(r.flatMap(i=>[...i.snapshot.nodes])),r.flatMap(i=>[...i.snapshot.edges]),n);return Z(s,n,t)}var se=class{name;#e=new Map;constructor(t="memory"){this.name=U(t,"adapter name")}async read(t){J(t.signal);let r=this.#e.get(U(t.workspace,"workspace"));return r?structuredClone(r):null}async replace(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.set(r,structuredClone(ae(t.snapshot).snapshot))}async clear(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.delete(r)}};(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]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function to(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function Ky(e){let t=to(e.nodeCount,"nodeCount"),r=to(e.edgeStride??1,"edgeStride"),o=e.topology??"chain";if(!["chain","star","disconnected"].includes(o))throw new TypeError(`Unsupported relationship graph topology: ${o}`);let n=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!n||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let i=o==="disconnected"?0:Math.floor((t-1)/r);return{node_count:t,edge_count:i,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let a=0;a<t;a+=1)yield`${s}-${a}`}},edges:{*[Symbol.iterator](){if(o!=="disconnected")for(let a=r;a<t;a+=r)yield{source:`${s}-${o==="star"?0:a-r}`,target:`${s}-${a}`,kind:n}}}}}function j(e,t){if(!e)throw new Error(`Relationship graph adapter conformance: ${t}`)}async function ro(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=Et(),n=Z(new z(["a","b"],[{source:"a",target:"b",kind:"related"}],o),o,{createdAt:"2026-01-01T00:00:00.000Z"}),s=Z(new z(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],o),o,{createdAt:"2026-01-02T00:00:00.000Z"}),i=[];j(await x(e,{workspace:r})===null,"workspace must start empty"),i.push({name:"empty-read",passed:!0});let a=await Pe(e,{workspace:r,snapshot:n});j(a.disposition==="written","first sync must write"),i.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:r})).nodes.push("mutated-reader-copy"),j((await x(e,{workspace:r}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),i.push({name:"read-isolation",passed:!0}),j((await Pe(e,{workspace:r,snapshot:n})).disposition==="current","identical sync must be idempotent"),i.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:r,snapshot:s,expected_fingerprint:n.fingerprint}),j((await x(e,{workspace:r}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),i.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:r,snapshot:n,expected_fingerprint:n.fingerprint})}catch{d=!0}return j(d,"stale compare-and-swap must fail"),i.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:r,expected_fingerprint:s.fingerprint}),j(await x(e,{workspace:r})===null,"clear must remove the workspace"),i.push({name:"clear",passed:!0})),{adapter:e.name,workspace:r,cases:Object.freeze(i),clear_supported:e.clear!==void 0}}function Wy(e){return ro(new se,e?{workspace:e}:{})}(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]="58736688-35d0-545d-892e-e0ede7fedc1a")}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]="d45a8203-4501-5797-a6cc-a2e7844adec9")}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]="f5567aa1-0268-574d-907b-38d6249538ce")}catch{}})();var ut=2,Yy=["self_reported","independent_transport"];function Re(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function de(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function oo(e,t,r=!1){if(!Array.isArray(e)||e.length===0)throw new TypeError(`${t} must be a non-empty string array`);return e.map((o,n)=>{let s=de(o,`${t}[${String(n)}]`);return r?o:s})}function mt(e,t){return e===void 0?void 0:de(e,t)}function Xy(e,t){if(e===void 0)return;if(!Re(e)||Object.keys(e).length===0)throw new TypeError(`${t} must be a non-empty object`);let r=Object.entries(e).map(([o,n])=>{if(o.length===0||o.split(".").some(s=>s.length===0))throw new TypeError(`${t} must use dot-separated own-property paths`);if(n!==null&&typeof n!="string"&&typeof n!="boolean"&&(typeof n!="number"||!Number.isFinite(n)))throw new TypeError(`${t} values must be JSON primitives`);return[o,n]});return Object.fromEntries(r)}function Jy(e,t,r,o,n,s){if(o==="refusal"){if(We(r)||n===void 0||s===void 0)throw new TypeError(`${e} refusal steps require a non-success exit, error code, and refusal surface`);return}if(n!==void 0||s!==void 0)throw new TypeError(`${e} only refusal steps may declare expected_error_code or expected_refusal_surface`);let i=bt(t);if(i===void 0)throw new TypeError(`${e}.args must identify a command after global flags`);let a=t[i].trim().toLowerCase();if(a==="history"){let l=Tt(t.slice(i+1));l!==void 0&&(a=Le(`history ${l}`))}let d=Nt(a);if(!We(r)||r!==0&&!d?.exit_codes.some(l=>l===r))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let c=xt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function Zy(e,t,r){if(!Re(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=de(e.id,`${o}.id`),s=oo(e.args,`${o}.args`,!0),i=e.expected_exit_code;if(typeof i!="number"||!Number.isSafeInteger(i))throw new TypeError(`${o}.expected_exit_code must be a safe integer`);let a=e.expected_output_kind;if(a!=="refusal"&&!kt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!Yy.includes(c))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=c;if(l==="independent_transport"&&d!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=oo(e.required_fields,`${o}.required_fields`);if(p.some(S=>S.split(".").some(q=>q.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=Xy(e.expected_field_values,`${o}.expected_field_values`),_=mt(e.expected_error_code,`${o}.expected_error_code`),g=mt(e.expected_refusal_surface,`${o}.expected_refusal_surface`),T=mt(e.recovery_for,`${o}.recovery_for`);return Jy(o,s,i,d,_,g),{id:n,args:s,expected_exit_code:i,expected_output_kind:d,expected_accounting_mode:l,required_fields:p,...f?{expected_field_values:f}:{},..._?{expected_error_code:_}:{},...g?{expected_refusal_surface:g}:{},...T?{recovery_for:T}:{}}}function Qy(e,t){if(!Re(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=de(e.id,`tasks[${String(t)}].id`),o=de(e.description,`tasks.${r}.description`);if(!Array.isArray(e.steps)||e.steps.length===0)throw new TypeError(`tasks.${r}.steps must be a non-empty array`);let n=e.steps.map((i,a)=>Zy(i,r,a)),s=new Map;for(let i of n){if(s.has(i.id))throw new TypeError(`tasks.${r} contains duplicate step id ${i.id}`);if(i.recovery_for!==void 0&&(s.get(i.recovery_for)?.expected_output_kind!=="refusal"||i.expected_output_kind==="refusal"))throw new TypeError(`tasks.${r}.${i.id} recovery_for must reference an earlier refusal and declare successful output`);s.set(i.id,i)}if(n.at(-1)?.expected_output_kind==="refusal")throw new TypeError(`tasks.${r} completed task must terminate with successful output`);for(let i of n)if(i.expected_output_kind==="refusal"&&!n.some(a=>a.recovery_for===i.id))throw new TypeError(`tasks.${r}.${i.id} refusal must have a later successful recovery_for step`);return{id:r,description:o,steps:n}}function qL(e){if(!Re(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==ut)throw new TypeError(`agent-task transcript corpus version must be ${String(ut)}`);if(!Array.isArray(e.tasks)||e.tasks.length===0)throw new TypeError("agent-task transcript corpus tasks must be non-empty");let t=e.tasks.map((o,n)=>Qy(o,n)),r=new Set;for(let o of t){if(r.has(o.id))throw new TypeError(`duplicate agent-task transcript id ${o.id}`);r.add(o.id)}return{version:ut,tasks:t}}import{createHash as no}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]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function io(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function KL(e,t){let r=io(t.migrationId,"migrationId"),o=io(t.author,"author"),n=Date.parse(t.timestamp);if(!Number.isFinite(n))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(n).toISOString(),i=He(e,void 0,t.registry),a=i.graph.nodes(),d=i.graph.edges().map(f=>{let _=no("sha256").update(JSON.stringify([r,f.kind,f.source,f.target,f.createdAt??null,f.author??null,f.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${r}:${_}`,relationshipId:`migration:${r}:${_}`,action:"add",edge:f,author:o,timestamp:s,reason:`Backfill ${r} from legacy item metadata`})}),c=no("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:d})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=d.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:c,nodes:a,events:Object.freeze(p),edge_count:d.length,skipped_existing_count:d.length-p.length,duplicate_dependency_rows:i.duplicateRows.length,dangling_reference_count:i.dangling.active.length+i.dangling.legacy_terminal.length})}import*as so from"node:module";(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]="7a1d7194-6ff1-5365-ab64-80b47b0176d7")}catch{}})();var ce=["suggested_retry","candidate_command","example","next_step","migration_hint","restore_with"],ft={suggested_retry:{kind:"suggested_retry",semantics:"recovery"},retry_command:{kind:"suggested_retry",semantics:"recovery"},candidate_command:{kind:"candidate_command",semantics:"recovery"},candidate_commands:{kind:"candidate_command",semantics:"recovery"},fallback_candidates:{kind:"candidate_command",semantics:"recovery",nested_value_field:"command"},next_best_command:{kind:"candidate_command",semantics:"recovery"},example:{kind:"example",semantics:"recovery"},examples:{kind:"example",semantics:"recovery"},next_step:{kind:"next_step",semantics:"recovery"},next_steps:{kind:"next_step",semantics:"recovery"},suggested_next_steps:{kind:"next_step",semantics:"recovery"},migration_hint:{kind:"migration_hint",semantics:"replacement"},migration_hints:{kind:"migration_hint",semantics:"replacement"},restore_with:{kind:"restore_with",semantics:"behavior_preserving"}},YL=Object.freeze(Object.keys(ft));function ao(e){if(Object.hasOwn(ft,e))return ft[e]}var eb=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function tb(e,t){let r=e[t],o=t+1,n="";for(;o<e.length&&e[o]!==r;)e[o]==="\\"?o+=2:(n+=e[o],o+=1);return e[o]===r&&(o+=1),{next:o,value:n}}function rb(e){return e===void 0||e.kind==="punctuator"&&eb.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function ob(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
31
- `,t+2);return r===-1?e.length:r+1}if(e.startsWith("/*",t))return e.indexOf("*/",t+2)+2}function nb(e,t,r){if(e[t]!=="/"||!rb(r))return;let o=t+1,n=!1;for(;o<e.length;)if(e[o]==="\\")o+=2;else if(e[o]==="[")n=!0,o+=1;else if(e[o]==="]")n=!1,o+=1;else if(e[o]==="/"&&!n){for(o+=1;/[A-Za-z]/u.test(e.charAt(o));)o+=1;return o}else o+=1;return o}function ib(e,t){let r=e[t];if(r==="'"||r==='"'||r==="`"){let n=tb(e,t);return r==="`"?{next:n.next}:{next:n.next,token:{kind:"string",value:n.value,offset:t+1}}}if(/[A-Za-z_$]/u.test(r)){let n=t+1;for(;/[A-Za-z0-9_$]/u.test(e[n]??"");)n+=1;return{next:n,token:{kind:"identifier",value:e.slice(t,n),offset:t}}}let o=e.startsWith("=>",t)?"=>":r;return{next:t+o.length,token:{kind:"punctuator",value:o,offset:t}}}function sb(e){let t=[],r=0;for(;r<e.length;){let o=ob(e,r);if(o!==void 0){r=o;continue}let n=nb(e,r,t.at(-1));if(n!==void 0){r=n;continue}let s=ib(e,r);s.token&&t.push(s.token),r=s.next}return t}var ab=new Set(["object","block","pattern"]),db=new Set(["const","let","var"]),cb=new Set(["}",")","]"]),lb=new Set(["=","(","[",",",":","?","return"]);function pb(e,t,r){if([...r].reverse().find(n=>ab.has(n.kind))?.kind==="pattern"||r.at(-1)?.kind==="paren"&&r.at(-1)?.parameter_list)return"pattern";let o=e[t-1];return o?.kind==="identifier"&&db.has(o.value)?"pattern":o?.value==="=>"||o?.value===")"?"block":o&&lb.has(o.value)?"object":"block"}function ub(e,t,r){let o=e[t];if(o.value==="{"){let i=pb(e,t,r);return{kind:i,...i==="object"?{member_start:!0,candidates:[]}:{}}}if(o.value==="[")return{kind:"array"};if(o.value!=="(")return;let n=e[t-1],s=e[t-2];return{kind:"paren",...n?.value==="function"||s?.value==="function"?{parameter_list:!0}:{}}}function mb(e,t,r){if(!(e?.kind!=="object"||!e.member_start||t.kind!=="identifier"&&t.kind!=="string"||r?.value!==":"||!/^[A-Za-z][A-Za-z0-9_]*$/u.test(t.value)))return{field:t.value,offset:t.offset}}function fb(e,t){return e[t+1]?.value===")"&&e[t+2]?.value==="=>"||e[t+1]?.value==="="}function _b(e){let t=sb(so.stripTypeScriptTypes(e,{mode:"strip"})),r=[],o=[];for(let[n,s]of t.entries()){let i=o.at(-1),a=mb(i,s,t[n+1]);a&&i.candidates.push(a);let d=ub(t,n,o);if(d)o.push(d);else if(cb.has(s.value)){let c=o.pop();c?.kind==="object"&&!fb(t,n)&&r.push(...c.candidates)}else s.value===","&&i?.kind==="object"?i.member_start=!0:i?.kind==="object"&&s.value!==":"&&(i.member_start=!1)}return r}function hb(e){let t=[0];for(let r=0;r<e.length;r+=1)e[r]===`
32
- `&&t.push(r+1);return t}function gb(e,t){let r=0,o=e.length;for(;r<o;){let n=Math.floor((r+o)/2);e[n]<=t?r=n+1:o=n}return r}function XL(e){let t=[],r=[];for(let n of[...e].sort((s,i)=>Q(s.path,i.path))){let s=hb(n.content),i;try{i=_b(n.content)}catch(a){r.push({kind:"invalid_source",subject:n.path,detail:`${n.path} could not be parsed for recovery producers: ${String(a)}.`});continue}for(let a of i){let d=a.field,c=gb(s,a.offset),l=ao(d);l?t.push({path:n.path,line:c,field:d,kind:l.kind}):/(?:retry_command|candidate_command|fallback_candidate|next_best_command|example|next_step|migration_hint|restore_with)/u.test(d)&&!/(?:_total|_truncated)$/u.test(d)&&r.push({kind:"unknown_recovery_field",subject:`${n.path}:${c}:${d}`,detail:`${d} resembles a recovery reference but has no typed field contract.`})}}let o=Object.fromEntries(ce.map(n=>[n,t.filter(s=>s.kind===n).length]));for(let n of ce)o[n]===0&&r.push({kind:"missing_kind_producer",subject:n,detail:`No source producer emits the ${n} recovery-reference kind.`});return t.sort((n,s)=>n.path!==s.path?Q(n.path,s.path):n.line!==s.line?n.line-s.line:Q(n.field,s.field)),r.sort((n,s)=>n.subject!==s.subject?Q(n.subject,s.subject):Q(n.kind,s.kind)),{ok:r.length===0,scanned_file_count:e.length,producer_count:t.length,producer_count_by_kind:o,producers:t,findings:r}}function JL(e,t){let r=[],o=(n,s)=>{if(Array.isArray(n)){n.forEach((i,a)=>o(i,[...s,String(a)]));return}if(!(typeof n!="object"||n===null))for(let[i,a]of Object.entries(n).sort(([d],[c])=>Q(d,c))){let d=ao(i),c=d?.kind==="migration_hint"&&n.semantics==="behavior_preserving"?{...d,semantics:"behavior_preserving"}:d,l=[a].flat();c!==void 0&&l.forEach((p,f)=>{let _="nested_value_field"in c&&typeof c.nested_value_field=="string"?c.nested_value_field:void 0,g=_&&typeof p=="object"&&p!==null&&!Array.isArray(p)?p[_]:p;if(typeof g!="string"||g.trim().length===0)return;let T=[...s,i,String(f)].map(S=>encodeURIComponent(S)).join("/");r.push({id:`${e}:${c.kind}:${T}`,probe_id:e,kind:c.kind,semantics:c.semantics,value:g})}),o(a,[...s,i])}};return o(t,[]),r}function ZL(e,t){let r=e.flatMap(i=>(i.owned_states??[]).map(a=>({contract:i,state:a}))),o=[],n=new Map;for(let i of t){if(n.has(i.probe_id)){o.push({kind:"duplicate_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} was supplied more than once.`});continue}n.set(i.probe_id,i)}let s=new Set(r.map(({state:i})=>i.probe_id));for(let{contract:i,state:a}of r){let d=n.get(a.probe_id);if(!d){o.push({kind:"missing_probe",probe_id:a.probe_id,detail:`No entrypoint observation was recorded for ${i.code}.`});continue}d.code!==i.code&&o.push({kind:"wrong_error_code",probe_id:a.probe_id,detail:`Expected ${i.code}; observed ${d.code}.`}),d.exit_class!==a.expected_exit_class&&o.push({kind:"wrong_exit_class",probe_id:a.probe_id,detail:`Expected ${a.expected_exit_class}; observed ${d.exit_class}.`}),a.entrypoints.includes(d.entrypoint)||o.push({kind:"wrong_entrypoint",probe_id:a.probe_id,detail:`Expected one of ${a.entrypoints.join(", ")}; observed ${d.entrypoint}.`})}for(let i of t)s.has(i.probe_id)||o.push({kind:"undeclared_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} has no catalog declaration.`});return o.sort((i,a)=>i.probe_id!==a.probe_id?i.probe_id.localeCompare(a.probe_id):i.kind.localeCompare(a.kind)),{ok:o.length===0,declared_probe_count:r.length,observed_probe_count:t.length,findings:o}}function QL(e,t){let r=[],o=new Set,n=new Set;for(let d of e){if(o.has(d.id)){n.add(d.id),r.push({kind:"duplicate_obligation",reference_id:d.id,detail:`Recovery obligation ${d.id} was declared more than once.`});continue}o.add(d.id)}let s=new Map;for(let d of t){if(s.has(d.id)){r.push({kind:"duplicate_observation",reference_id:d.id,detail:`Recovery reference ${d.id} was observed more than once.`});continue}s.set(d.id,d),o.has(d.id)||r.push({kind:"undeclared_observation",reference_id:d.id,detail:`Recovery observation ${d.id} has no emitted obligation.`})}for(let d of e){if(n.has(d.id))continue;let c=s.get(d.id);c?c.reachable?c.semantics!==d.semantics&&r.push({kind:"wrong_semantics",reference_id:d.id,detail:`Recovery reference ${d.value} promised ${d.semantics}; proof demonstrated ${c.semantics}.`}):r.push({kind:"unreachable_reference",reference_id:d.id,detail:`Recovery reference ${d.value} did not reach its promised target.`}):r.push({kind:"missing_observation",reference_id:d.id,detail:`No reachability proof was recorded for ${d.kind} ${d.value}.`})}let i=ce.map(d=>{let c=e.filter(p=>p.kind===d),l=c.filter(p=>!n.has(p.id)).map(p=>s.get(p.id)).filter(p=>p!==void 0);return{kind:d,declared:c.length,observed:l.length,passed:c.filter(p=>{let f=s.get(p.id);return!n.has(p.id)&&f?.reachable===!0&&f.semantics===p.semantics}).length}});r.sort((d,c)=>d.reference_id!==c.reference_id?d.reference_id.localeCompare(c.reference_id):d.kind.localeCompare(c.kind));let a=i.reduce((d,c)=>d+c.passed,0);return{ok:r.length===0,declared_reference_count:e.length,observed_reference_count:t.length,pass_fraction:o.size===0?1:a/o.size,coverage_by_kind:i,findings:r}}function yb(e,t){let r=new Map(ce.map(s=>[s,new Set]));for(let s of t)r.get(s.kind).add(s.value);let o=ce.map(s=>({kind:s,source_producers:e.producer_count_by_kind[s],runtime_values:r.get(s).size})),n=o.filter(({source_producers:s,runtime_values:i})=>s>0&&i===0).map(({kind:s})=>s);return{ok:e.ok&&n.length===0,source_producer_count:e.producer_count,runtime_value_count:o.reduce((s,{runtime_values:i})=>s+i,0),coverage_by_kind:o,missing_runtime_kinds:n}}var eD=yb;(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]="2b2197f3-7203-52c8-9cc7-f714b33a9306")}catch{}})();var rD=16,bb=Object.freeze(["bulk_ids_input_empty","bulk_ids_input_missing_path","bulk_ids_input_unreadable","invalid_argument_value","missing_lifecycle_target","missing_required_argument","projection_options_mutually_exclusive","tracker_not_initialized","tracker_root_missing","tracker_root_not_directory","tracker_root_unreadable","unknown_context_intent","unknown_field_projection","unknown_option","unknown_subcommand"]),co=18,lo=Object.freeze([...bb,"manifest_unknown_key","no_version_bounds_declared"].sort((e,t)=>e.localeCompare(t)));function oD(e,t=co){return{ok:e.executable_error_code_count>=t,baseline:t,actual:e.executable_error_code_count}}function nD(e,t=lo){let r=new Set(e.rows.filter(({disposition:n})=>n==="executable").map(({canonical_code:n})=>n)),o=t.filter(n=>!r.has(n));return{ok:o.length===0,required_canonical_codes:[...t],missing_required_canonical_codes:o}}function _t(e,t){let r=e.get(t);if(r)return r;let o={kinds:new Set,probeIds:new Set};return e.set(t,o),o}function iD(e,t,r){let o=new Map(e.map(l=>[l.code,l.canonical_code??l.code])),n=new Map,s=0,i=0;for(let l of e){let p=_t(n,l.canonical_code??l.code);for(let f of l.owned_states??[])p.kinds.add("owned_state"),p.probeIds.add(f.probe_id)}for(let l of t){let p=o.get(l.error_code);if(p===void 0)continue;s+=1;let f=_t(n,p);f.kinds.add("closed_domain"),f.probeIds.add(l.probe_id)}for(let l of r){let p=o.get(l.error_code);if(p===void 0)continue;i+=1;let f=_t(n,p);f.kinds.add("grammar"),f.probeIds.add(l.probe_id)}let a=e.map(l=>{let p=l.canonical_code??l.code,f=n.get(p),_=[...f.probeIds].sort();return{code:l.code,canonical_code:p,disposition:_.length>0?"executable":"uncovered",evidence_kinds:[...f.kinds].sort(),probe_ids:_}}).sort((l,p)=>l.code<p.code?-1:1),d=a.filter(({disposition:l})=>l==="uncovered").map(({code:l})=>l),c=a.length-d.length;return{ok:d.length===0,catalog_error_code_count:a.length,executable_error_code_count:c,uncovered_error_code_count:d.length,coverage_fraction:a.length===0?1:c/a.length,closed_domain_probe_count:s,grammar_probe_count:i,uncovered_error_codes:d,rows:a}}function sD(e){let t=e.rows.map(r=>`| \`${r.code}\` | \`${r.canonical_code}\` | ${r.disposition} | ${r.evidence_kinds.join(", ")||"none"} | ${r.probe_ids.length} |`);return["# Generated refusal closure census","","Tracker: `pm-f05lsg`.","","Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.","",`- Catalog error codes: ${e.catalog_error_code_count}`,`- Executable error codes: ${e.executable_error_code_count}`,`- Executable-code ratchet floor: ${co}`,`- Required executable canonical codes: ${lo.map(r=>`\`${r}\``).join(", ")}`,`- Uncovered error codes: ${e.uncovered_error_code_count}`,`- Coverage fraction: ${e.coverage_fraction.toFixed(6)}`,`- Closed-domain probes: ${e.closed_domain_probe_count}`,`- Grammar probes: ${e.grammar_probe_count}`,"","| Error code | Canonical code | Disposition | Evidence kinds | Probe count |","| --- | --- | --- | --- | --- |",...t,""].join(`
33
- `)}(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]="d252409d-e33e-5c9e-9671-789f0ee87312")}catch{}})();function Tb(e){return[e.expected_error_code!==void 0&&e.error_code!==e.expected_error_code?{code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected error code ${e.expected_error_code}, received ${e.error_code??"<missing>"}.`}:void 0,e.expected_allowed_values!==void 0&&JSON.stringify([...e.allowed_values].sort())!==JSON.stringify([...e.expected_allowed_values].sort())?{code:"incomplete_allowed_values",probe_id:e.probe_id,detail:"The refusal's accepted domain differs from the SDK-owned domain contract."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)===0?{code:"missing_suggested_retry_args",probe_id:e.probe_id,detail:"The refusal omitted shell-free suggested retry arguments."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)>0&&JSON.stringify(e.suggested_retry_args)!==JSON.stringify(e.expected_suggested_retry_args)?{code:"suggested_retry_args_mismatch",probe_id:e.probe_id,detail:"The refusal's suggested retry arguments differ from the SDK-owned contract."}:void 0]}function Cb(e){return[e.exit_code!==me.USAGE?{code:"non_refusal_exit",probe_id:e.probe_id,detail:`${e.entrypoint} returned exit code ${e.exit_code}; a structured usage refusal must return ${me.USAGE}.`}:void 0,e.allowed_values_required!==!1&&e.allowed_values.length===0?{code:"missing_allowed_values",probe_id:e.probe_id,detail:"The refusal omitted its complete accepted value domain."}:void 0,e.allowed_values.includes(e.rejected_value)?{code:"accepted_rejected_value",probe_id:e.probe_id,detail:`${e.rejected_value} is both rejected and advertised as allowed.`}:void 0,e.suggested_retry.trim().length===0?{code:"missing_suggested_retry",probe_id:e.probe_id,detail:"The refusal omitted an executable suggested retry."}:void 0,e.retry_succeeded?void 0:{code:"retry_failed",probe_id:e.probe_id,detail:"The advertised suggested retry did not succeed."},...Tb(e)]}function cD(e){let t=[],r=new Set,o=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let n of e){if(r.has(n.probe_id)){t.push({code:"duplicate_probe",probe_id:n.probe_id,detail:`${n.probe_id} was supplied more than once.`});continue}r.add(n.probe_id);let s=t.length;for(let i of Cb(n))i!==void 0&&t.push(i);t.length===s&&(o+=1)}return t.sort((n,s)=>n.probe_id!==s.probe_id?n.probe_id.localeCompare(s.probe_id):n.code.localeCompare(s.code)),{ok:t.length===0,probe_count:r.size,closed_probe_count:o,closure_fraction:r.size===0?0:o/r.size,findings:t}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39b4e1fe-a34a-5ffc-9447-eaf8c46863c7")}catch{}})();var po="not-a-declared-action";function Sb(e,t){if(e.startsWith("assurance ")&&t.name==="kind")return"measurement";switch(t.value_kind){case"integer":return"1";case"item_id":return"pm-domain";case"action":throw new Error(`Cannot synthesize a preceding action value for positional slot ${t.name}.`);default:return"example"}}function le(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function yD(e=qe.filter(t=>Rt.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>le(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=le(r.command),a=s.length>1&&t.has(i)?s.map(le).join("--"):i,d=ee(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=Be.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${le(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>Sb(r.command,l)),...d],recovery_args:[...s,"--help"],error_code:c&&!r.command.startsWith("assurance ")?"invalid_argument_value":/^extension (?:activate|adopt|deactivate|uninstall)$/u.test(r.command)?"missing_lifecycle_target":"missing_required_argument",missing_argument:o.name,missing_argument_index:n}]})).sort((r,o)=>r.probe_id.localeCompare(o.probe_id))}function wb(e){switch(L(e)){case"assurance":case"workspace snapshot":return Be.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return De;case"merge":return $e;case"plan":return Ye;case"profile":return Xe;case"schema":return Lt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function bD(e=qe){return e.filter(({slots:t})=>t[0]?.required===!0&&t[0].value_kind==="action").map(({command:t})=>{let r=t.split(" ");return{probe_id:`unknown-subcommand-${le(t)}`,command:t,refusal_args:[...r,po],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:po,allowed_values:[...wb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function Eb(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function Ab(e,t){if(!t)return[{code:"refusal_probe_missing",probe_id:e.probe_id,detail:`${e.probe_id} has no runtime observation.`}];let r=[];return t.error_code!==e.error_code&&r.push({code:"refusal_error_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} emitted ${t.error_code||"<none>"}; expected ${e.error_code}.`}),t.exit_code!==2&&r.push({code:"refusal_exit_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} exited ${t.exit_code}; expected usage exit 2.`}),"allowed_values"in e&&!Eb(t.allowed_values,e.allowed_values)&&r.push({code:"refusal_allowed_values_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} did not expose its complete action domain.`}),t.recovery_succeeded||r.push({code:"refusal_recovery_failed",probe_id:e.probe_id,detail:`${e.probe_id} help recovery did not succeed.`}),t.refusal_mutated_state&&r.push({code:"refusal_mutated_state",probe_id:e.probe_id,detail:`${e.probe_id} changed tracker state while refusing input${t.mutated_paths?.length?`: ${t.mutated_paths.join(", ")}`:"."}`}),r}function TD(e,t){let r=new Map(e.map(i=>[i.probe_id,i])),o=new Map(t.map(i=>[i.probe_id,i])),n=[...e.flatMap(i=>Ab(i,o.get(i.probe_id))),...t.filter(i=>!r.has(i.probe_id)).map(i=>({code:"unexpected_refusal_probe",probe_id:i.probe_id,detail:`${i.probe_id} has no declared grammar refusal contract.`}))];n.sort((i,a)=>i.probe_id.localeCompare(a.probe_id)||i.code.localeCompare(a.code));let s=new Set(n.map(({probe_id:i})=>i));return{ok:n.length===0,probe_count:e.length,closed_probe_count:e.filter(({probe_id:i})=>!s.has(i)).length,findings:n}}(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]="d3795bc4-fbe5-5ca4-bc90-b72a2d469dc7")}catch{}})();var ht=[{probe_id:"tracker-root-missing",failure_kind:"missing_root",expected_error_code:"tracker_root_missing",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-settings-missing",failure_kind:"settings_missing",expected_error_code:"tracker_not_initialized",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-not-directory",failure_kind:"not_directory",expected_error_code:"tracker_root_not_directory",expected_exit_code:2,recovery_kind:"select_directory"},{probe_id:"tracker-root-unreadable",failure_kind:"unreadable_root",expected_error_code:"tracker_root_unreadable",expected_exit_code:1,recovery_kind:"repair_permissions"}];function SD(){return ht.map(e=>({...e}))}function vb(e,t){let r=[];t.error_code!==e.expected_error_code&&r.push({code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected ${e.expected_error_code}, received ${t.error_code}.`}),t.exit_code!==e.expected_exit_code&&r.push({code:"exit_code_mismatch",probe_id:e.probe_id,detail:`Expected exit ${e.expected_exit_code}, received ${t.exit_code}.`}),t.recovery_kind!==e.recovery_kind&&r.push({code:"recovery_kind_mismatch",probe_id:e.probe_id,detail:`Expected ${e.recovery_kind}, received ${t.recovery_kind}.`});let o=t.suggested_retry_args.indexOf("init"),n=o===0||o===2&&t.suggested_retry_args[0]==="--pm-path"&&t.suggested_retry_args[1]?.length>0;return e.recovery_kind==="initialize"&&!n&&r.push({code:"missing_init_recovery",probe_id:e.probe_id,detail:"Missing and uninitialized roots must emit a tokenized init retry."}),(t.unsafe_init_recommended||e.recovery_kind!=="initialize"&&t.suggested_retry_args.includes("init"))&&r.push({code:"unsafe_init_recovery",probe_id:e.probe_id,detail:"A tracker root that cannot be initialized safely must not recommend initialization."}),t.retry_succeeded||r.push({code:"retry_failed",probe_id:e.probe_id,detail:"The emitted retry or safe alternate-root recovery did not execute successfully."}),r}function wD(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of ht){let s=t.get(n.probe_id);if(s===void 0){r.push({code:"missing_probe",probe_id:n.probe_id,detail:"No runtime observation was supplied for this contract."});continue}let i=vb(n,s);r.push(...i),i.length===0&&(o+=1)}return r.sort((n,s)=>n.probe_id.localeCompare(s.probe_id)||n.code.localeCompare(s.code)),{ok:r.length===0,probe_count:ht.length,closed_probe_count:o,findings:r}}(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]="1cda240f-7416-5d00-abf5-53695f26ef69")}catch{}})();var Ie,Ob=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function Pb(e,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let r=Ob[L(e)];if(r===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return r}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(L(e))?"linked-file-path":["comments","notes","learnings"].includes(L(e))?"entry-file-input":"plan-definition-file"}function Me(){if(Ie!==void 0)return Ie;let e=te.filter(({command:n})=>ze(n)).flatMap(({command:n,family:s})=>Mt(n,ee(n)).map(i=>({command:n,family:s,concept:Pb(n,i.flag),flag:i.flag,aliases:Object.freeze([...i.aliases??[]]),value_kind:i.repeatable?"list":i.flag==="--limit"?"number":i.value_type}))),t=new Set(e.flatMap(n=>n.aliases.map(s=>`${n.command}:${s}`))),r=e.filter(n=>!t.has(`${n.command}:${n.flag}`)),o=new Map;for(let n of r){let s=o.get(n.concept)??new Set;s.add(n.value_kind),o.set(n.concept,s)}return Ie=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Ie}function RD(){return Object.freeze(Me().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var uo=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:102,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:36,events:34,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:29,schema:43,profile:22,activity:36,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:111,test:56,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:25,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),mo=Object.freeze({...uo,...Object.fromEntries(Ne.flatMap(({alias:e,canonical:t})=>{let r=uo[e];return r===void 0?[]:[[t,r]]}))});function fo(){let e=new Map(Object.keys(mo).map(t=>[t,0]));for(let{command:t}of Me())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(mo).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function Rb(e,t,r){for(let o of e)for(let n of o.aliases){let s=t.get(`${o.command}:${n}`);s===void 0||s.flag===o.flag||r.push({code:"alias_collision",command:o.command,detail:`${n} aliases ${o.flag} but is canonical for ${s.flag}.`})}}function Ib(e,t,r){let o=new Set(t.map(({command:n})=>n));for(let n of e.keys())o.has(n)||r.push({code:"missing_budget",command:n,detail:`${n} has canonical flags but no persisted budget.`});for(let n of t){let s=e.get(n.command)??0;s===0&&r.push({code:"stale_budget",command:n.command,detail:`${n.command} has a persisted budget but no canonical flags.`}),!(s<=n.maximum)&&r.push({code:"budget_exceeded",command:n.command,detail:`${s} canonical flags exceed the ratcheted maximum ${n.maximum}.`})}}function Mb(e,t,r){let o=new Map(e.map(n=>[`${n.command}:${n.flag}`,n]));for(let n of t){let s=`${n.command}:${n.canonical_flag}`,i=o.get(s);if(!i){r.push({code:"removed_canonical_spelling",command:n.command,detail:`${n.canonical_flag} disappeared from the executable spelling inventory.`});continue}let a=new Set([i.flag,...i.aliases]);for(let d of n.accepted_spellings)a.has(d)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${d} no longer resolves to ${n.canonical_flag}.`})}}function ID(e=Me(),t=fo(),r=[]){let o=[],n=new Map,s=new Map,i=new Map,a=new Map;for(let d of e){let c=`${d.command}:${d.flag}`;n.has(c)?o.push({code:"duplicate_canonical_flag",command:d.command,detail:`${d.flag} has more than one canonical row.`}):n.set(c,d),a.set(d.command,(a.get(d.command)??0)+1);let l=s.get(d.concept);l!==void 0&&l!==d.value_kind?o.push({code:"inconsistent_concept_kind",command:d.command,detail:`${d.concept} uses both ${l} and ${d.value_kind}.`}):s.set(d.concept,d.value_kind);let p=i.get(d.concept);p!==void 0&&p!==d.flag?o.push({code:"semantic_spelling_collision",command:d.command,detail:`${d.concept} is canonicalized by both ${p} and ${d.flag}.`}):i.set(d.concept,d.flag)}return Rb(e,n,o),Ib(a,t,o),Mb(e,r,o),o.sort((d,c)=>d.command.localeCompare(c.command)||d.code.localeCompare(c.code)||d.detail.localeCompare(c.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:d})=>d)).size,baseline_entry_count:r.length,findings:o}}function MD(){let e=Me(),t=fo(),r=new Map(t.map(({command:o})=>[o,"unknown"]));for(let{command:o,family:n}of e)r.set(o,n);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:o,current:n,maximum:s})=>{let i=r.get(o);return`| \`${o}\` | ${i} | ${n} | ${s} |`}),""].join(`
34
- `)}(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]="4c9a1aa8-05b6-53da-a8b1-f1a7289d39cf")}catch{}})();function xD(e){return e}function ND(e){return e}function LD(e){return e}function DD(e){return e}function $D(e){return e}function FD(e){return e}function GD(e){return e}function UD(e){return e}function jD(e){return e}function BD(e){return e}function qD(e){return e}function zD(e){return e}function HD(e){return e}function VD(e){return{handled:!0,result:e}}function KD(){return{handled:!1}}function WD(e){return e}function YD(e){return e}function XD(e){return e}function JD(e){return e}function ZD(e){return e}function QD(e){return e}function e1(e){return e}function t1(e){return e}function r1(e){return e}(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]="68ca9ab1-91e0-5020-859e-fc1f1f6dcc56")}catch{}})();function kb(e={},t={}){return new ge(t).extension(void 0,{...e,migrate:!0})}function xb(e={},t={}){return new ge(t).packageMigrate(e)}(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]="d0b86c6a-67f0-52f2-90b8-d1058e8f2284")}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]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function N(e){if(typeof e!="string"||!_e(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function Nb(e){let t=N(e.window_start),r=N(e.window_end);if(t>=r||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(o=>typeof o!="string"||o.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:t,end:r}}function Lb(e,t,r,o){let n=new Map(t.map(i=>[i,[]])),s=new Set;for(let i of e){if(typeof i.id!="string"||i.id.trim().length===0||s.has(i.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");s.add(i.id);let a=n.get(i.family);if(!a||!["success","failure","pending"].includes(i.outcome)||i.cause!==void 0&&(!["product","infrastructure","unknown"].includes(i.cause)||i.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let d=N(i.started_at);if(i.repaired_at!==void 0&&(N(i.repaired_at)<d||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");d>=r&&d<o&&a.push(i)}return n}function T1(e,t){let{start:r,end:o}=Nb(t),n=[...Lb(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(_=>_.outcome==="failure"),d=i.filter(_=>_.outcome!=="pending").length,c=d===0?null:a.length/d,l=a.filter(_=>_.repaired_at!==void 0&&N(_.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let _ of a)p[_.cause??"unknown"]+=1;let f=[];return d<t.min_completed_attempts&&f.push("insufficient_completed_attempts"),c!==null&&c>t.max_failure_rate&&f.push("failure_rate"),{family:s,attempts:i.length,completed:d,failed:a.length,pending:i.length-d,failure_rate:c,affected_days:[...new Set(a.map(_=>new Date(N(_.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(_=>(N(_.repaired_at)-N(_.started_at))/6e4).sort((_,g)=>_-g),unresolved:a.length-l.length,causes:p,violations:f,ok:f.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(r).toISOString(),window_end:new Date(o).toISOString(),ok:n.every(s=>s.ok),families:n}}(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]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function pe(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function Db(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!pe(r.name)||t.has(r.name)||r.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(r.identities))throw new TypeError("Invalid or duplicate artifact identity.");let o=new Set(r.identities);if(o.size!==r.identities.length||[...o].some(n=>!pe(n)))throw new TypeError("Invalid or duplicate artifact identity.");t.set(r.name,o)}if([...t.values()].every(r=>r.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return t}function $b(e,t){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let r=new Map;for(let o of e){if(o===null||typeof o!="object"||!pe(o.identity)||r.has(o.identity)||!pe(o.reason)||!pe(o.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let n=o.missing_from;if(!Array.isArray(n)||n.length===0||n.length>=t.length||new Set(n).size!==n.length||[...n].some(s=>!t.includes(s)))throw new TypeError("Invalid artifact exception ledger signature.");r.set(o.identity,o)}return r}function S1(e,t=[]){let r=Db(e),o=[...r.keys()].sort(),n=$b(t,o),s=[...new Set([...r.values()].flatMap(c=>[...c]))].sort(),i=[],a=new Set;for(let c of s){let l=o.filter(_=>!r.get(_).has(c));if(l.length===0)continue;let p=n.get(c),f=p!==void 0&&JSON.stringify([...p.missing_from].sort())===JSON.stringify(l);f&&a.add(c),i.push({identity:c,present_in:o.filter(_=>r.get(_).has(c)),missing_from:l,disposition:f?{reason:p.reason,evidence:p.evidence}:null})}let d=[...n.keys()].filter(c=>!a.has(c)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(c=>c.disposition!==null)&&d.length===0,counts:Object.fromEntries(o.map(c=>[c,r.get(c).size])),findings:i,stale_exceptions:d}}(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]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();import{createHash as ho,createHmac as Fb,randomBytes as Gb,timingSafeEqual as Ub}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]="98283845-5c48-5901-b54c-c8cc8138427b")}catch{}})();var i$="dev.unbrained.pm/progressive-tool-discovery",s$=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),jb=Object.freeze(["pm_discover","pm_next","pm_context","pm_search","pm_get"]),B=Object.freeze({lexical:.4,semantic:.2,graph:.1,permission:.15,freshness:.05,usage:.1}),Bb=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),go={core:0,standard:1,full:2,internal:3},yo=Object.freeze(["core","standard","full"]),qb=new Set(["core","standard","full","custom"]),bo=new Set(te.map(({family:e})=>e)),zb=Gb(32);function xe(e,t){if(typeof e!="string")throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);let r=e[Symbol.iterator](),o=0;for(let n=r.next();!n.done;n=r.next())if(o+=1,o>4096)throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);return e}function To(e){if(!Number.isInteger(e)||Number(e)<1||Number(e)>100)throw new b("pm tool discovery limit must be from 1 through 100.",64);return Number(e)}function Co(e){if(e!=="unbounded"&&(!Number.isInteger(e)||Number(e)<128))throw new b("pm tool discovery outputBudget must be unbounded or an integer of at least 128.",64);return e==="unbounded"?e:Number(e)}function So(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function wo(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function Hb(e){if(!Array.isArray(e))throw new b("pm tool discovery candidates must be an array.",64);for(let[t,r]of e.entries()){if(r===null||typeof r!="object"||Array.isArray(r))throw new b(`pm tool discovery candidate ${t} must be an object.`,64);if(typeof r.name!="string"||r.name.trim().length===0)throw new b(`pm tool discovery candidate ${t} name must be a non-empty string.`,64);if(typeof r.description!="string"||r.description.trim().length===0)throw new b(`pm tool discovery candidate ${t} description must be a non-empty string.`,64);if(r.inputSchema===null||typeof r.inputSchema!="object"||Array.isArray(r.inputSchema))throw new b(`pm tool discovery candidate ${t} inputSchema must be an object.`,64);if(r.authorized!==void 0&&typeof r.authorized!="boolean")throw new b(`pm tool discovery candidate ${t} authorized must be a boolean.`,64)}}function a$(e){if(wo(e),e.family!==void 0&&(typeof e.family!="string"||!bo.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!yo.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:xe(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:To(e.limit)}:{},...e.cursor!==void 0?{cursor:xe(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:So(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:Co(e.outputBudget)}:{}}}function Vb(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function ue(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function Kb(e,t){let r=ue(e);if(r.length===0)return 0;let o=new Set(ue(t)),n=r.filter(i=>o.has(i)).length,s=t.toLowerCase().includes(e.toLowerCase())?.25:0;return Math.min(1,n/r.length+s)}function Wb(e,t){let r=ue(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=ue(t),s=r.filter(a=>n.some(d=>d.startsWith(a)||a.startsWith(d))).length,i=o.includes(e.toLowerCase())?.2:0;return Math.min(1,s/r.length+i)}function _o(e){return ho("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function Eo(e,t,r){return Fb("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function Yb(e,t,r){let o={version:1,offset:t,signature:Eo(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function Xb(e,t,r,o){if(e===void 0)return 0;try{let n=JSON.parse(Buffer.from(e,"base64url").toString("utf8")),s=n.offset;if(n.version!==1||typeof s!="number"||!Number.isInteger(s)||s<0||s>r||typeof n.signature!="string")throw new Error("cursor fields do not match the request");let i=Buffer.from(Eo(t,s,o),"base64url"),a=Buffer.from(n.signature,"base64url");if(a.length!==i.length||!Ub(a,i))throw new Error("cursor signature does not match the request");return s}catch(n){throw new b("Invalid or stale pm tool discovery cursor; restart discovery without cursor.",64,{reason:String(n)})}}function gt(e,t,r){return{value:Vb(e),weight:t,available:r!=="unavailable",source:r}}function ke(e,t,r){return gt(e??t,r,e===void 0?"computed":"host")}function Jb(e,t,r){let o=Object.hasOwn(he,e.name)?he[e.name]:"help",n=Ve(o),s=`${e.name} ${e.description} ${o} ${n}`,i=Kb(t,s),a=new Set(ue(t)),d={lexical:gt(i,B.lexical,"computed"),semantic:ke(e.signals?.semantic,Wb(t,s),B.semantic),graph:ke(e.signals?.graph,a.has(n)||a.has(o)?1:0,B.graph),permission:gt(1,B.permission,"authorization"),freshness:ke(e.signals?.freshness,1,B.freshness),usage:ke(e.signals?.usage,jb.includes(e.name)?1:0,B.usage)},c=Object.values(d).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:Ke(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function Zb(e){if(e.cursorIntegrityKey!==void 0&&(!(e.cursorIntegrityKey instanceof Uint8Array)||e.cursorIntegrityKey.byteLength<32))throw new b("pm tool discovery cursorIntegrityKey must contain at least 32 bytes.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!yo.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);if(e.family!==void 0&&(typeof e.family!="string"||!bo.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.profile!==void 0&&(typeof e.profile!="string"||!qb.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function Qb(e){let t=xe(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");xe(e.cursor===void 0?"":e.cursor,"cursor");let r=To(e.limit===void 0?10:e.limit),o=Co(e.outputBudget===void 0?1200:e.outputBudget);return Zb(e),{query:t,includeSchema:So(e.includeSchema),limit:r,budget:o,maximumTier:go[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Ao(e,t,r){let o=r??e.tools.reduce((i,a,d)=>i+(d===0?0:1)+Buffer.byteLength(JSON.stringify(a),"utf8"),0),n={...e,tools:[]},s=0;for(let i=0;i<4;i+=1){let a=Buffer.byteLength(JSON.stringify({...n,token_cost:{estimated_tokens:s,budget:t,within_budget:!0}}),"utf8"),d=Math.ceil((a+o)/4);if(d===s)break;s=d}return s}function eT(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>Jb(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&go[o.tier]<=r.maximumTier&&(t.family===void 0||o.family===t.family)).sort((o,n)=>n.score-o.score||(o.name<n.name?-1:o.name>n.name?1:0))}function tT(e,t,r){if(t==="unbounded")return[...e];let o=[],n=0;for(let[s,i]of e.entries()){let a=n+(s===0?0:1)+Buffer.byteLength(JSON.stringify(i),"utf8");if(Ao(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function d$(e,t={}){Hb(e),wo(t);let r=Qb(t),o=t.cursorIntegrityKey??zb,n=eT(e,t,r),s=_o({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=Xb(t.cursor,s,n.length,o),a=n.slice(i,i+r.limit),d=[];r.includeSchema||d.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),i+r.limit<n.length&&d.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let c={result_type:"pm_tool_discovery",contract_version:1,query:r.query,profile:r.profile,total:n.length,ranking_policy:{version:1,formula:"weighted_sum_then_name",weights:B},cache:{key:_o({fingerprint:s,cursorIntegrityKey:ho("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:Bb}},l=(g,T=g.length)=>{let S=i+T,q=S<n.length,P=[...d];return T<a.length&&P.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...c,tools:[...g],returned:T,has_more:q,...q?{next_cursor:Yb(s,S,o)}:{},omission_receipt:{has_omissions:P.length>0,omitted:P}}},p=g=>{let T=l(g),S=Ao(T,r.budget);return{...T,token_cost:{estimated_tokens:S,budget:r.budget,within_budget:r.budget==="unbounded"||S<=r.budget}}},f=tT(a,r.budget,g=>l([],g)),_=p(f);if(a.length>0&&f.length===0){let g=p([a[0]]).token_cost.estimated_tokens;throw new b(`pm tool discovery outputBudget is too small to return a tool; increase it to at least ${g}.`,64,{required:String(g)})}if(r.budget!=="unbounded"&&_.token_cost.estimated_tokens>r.budget)throw new b(`pm tool discovery outputBudget is too small; at least ${_.token_cost.estimated_tokens} estimated tokens are required for this page.`,64,{required:String(_.token_cost.estimated_tokens)});return _}(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]="39336651-18af-56d7-b658-5e735a2adad5")}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]="ce202873-192a-559b-96fd-1ea22ed7d1bc")}catch{}})();export{nP as ACTIONABILITY_ORDERING_KINDS,Rd as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,Za as ACTIVITY_FLAG_CONTRACTS,ei as AGENT_PROVENANCE_DIMENSIONS,Ds as AGGREGATE_FLAG_CONTRACTS,Sa as APPEND_FLAG_CONTRACTS,qI as ASSURANCE_ACTIONS,zI as ASSURANCE_DECLARATION_KINDS,rR as ASSURANCE_DOCUMENT_VERSION,Ba as ASSURANCE_FLAG_CONTRACTS,oR as ASSURANCE_GATE_TRIGGERS,nR as ASSURANCE_MEASUREMENT_SOURCE_KINDS,YR as ASSURANCE_PRESET_IDS,ZP as AssuranceEvaluationRefusalError,JP as AssuranceMutationRefusalError,QP as AssuranceSourceResolutionError,Gn as BASELINE_ITEM_FORMAT_VERSION,Fy as BOUNDARY_FIXTURE_CAPTURE_SOURCES,TE as BRIEF_LIST_FIELDS,ri as BUILTIN_AGENT_PROVENANCE_ADAPTERS,Y as BUILTIN_CORPUS_SHAPES,ti as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,cn as BUILTIN_ITEM_TYPE_VALUES,zt as BUILTIN_PROFILES,mC as BUILTIN_RELATIONSHIP_KINDS,vd as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,Ja as CALENDAR_FLAG_CONTRACTS,wa as CLAIM_FLAG_CONTRACTS,pc as CLOSE_ACTION_OPTION_KEYS,Ta as CLOSE_FLAG_CONTRACTS,Ca as CLOSE_MANY_FLAG_CONTRACTS,Ra as CLOSE_TASK_FLAG_CONTRACTS,$s as COMMENTS_FLAG_CONTRACTS,FT as COMMON_MUTATION_COMMAND_OPTION_KEYS,ld as COMPLETION_FLAG_CONTRACTS,_n as CONFIDENCE_TEXT_VALUES,Zs as CONFIG_FLAG_CONTRACTS,Od as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,PM as CONTEXT_EVALUATION_METRIC_NAMES,ed as CONTEXT_FLAG_CONTRACTS,iE as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,jt as CONTEXT_OUTPUT_VALUES,xM as CONTEXT_PACKING_PROFILES,TM as CONTEXT_RECENCY_EPOCH,EM as CONTEXT_RELEVANCE_SERVICE,SM as CONTEXT_RELEVANCE_SIGNAL_NAMES,DM as CONTEXT_SIGNAL_SET_VERSION,LM as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,$M as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,Ww as CONTEXT_USAGE_LIMITS,cd as CONTRACTS_FLAG_CONTRACTS,Ka as COPY_FLAG_CONTRACTS,Fd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Ud as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Gd as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,sT as CREATE_DIRECT_CLOSE_REASON_DEFAULT,qa as CREATE_FLAG_CONTRACTS,gS as CURRENT_HISTORY_HASH_ALGORITHM,NE as CURRENT_HISTORY_ITEM_HASH_VERSION,DE as CURRENT_HISTORY_RECORD_HASH_VERSION,Un as CURRENT_ITEM_FORMAT_VERSION,jM as ContextSignalStore,Yw as ContextUsageValidationError,mM as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,n0 as DEFAULT_CHILD_SAMPLE_LIMIT,bE as DEFAULT_COMPACT_LIST_FIELDS,iv as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,Km as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,HR as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,nM as DEFAULT_TERMINAL_TRANSITION_POLICY,HM as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,YO as DEFECT_ESCAPE_CLASSES,XO as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Aa as DELETE_FLAG_CONTRACTS,un as DEPENDENCY_KIND_VALUES,od as DEPS_FLAG_CONTRACTS,js as DOCS_FLAG_CONTRACTS,Ga as DUPLICATES_FLAG_CONTRACTS,CI as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,eP as DefectRecurrencePolicyParseError,id as EVAL_FLAG_CONTRACTS,Um as EVAL_METRIC_NAMES,zm as EVAL_QUERY_SET_CONTRACT,Hm as EVAL_QUERY_SET_EXAMPLE,qm as EVAL_QUERY_SET_SCHEMA_ID,Qa as EVENTS_FLAG_CONTRACTS,Ma as EVENT_FLAG_CONTRACTS,Lo as EXECUTABLE_COMMAND_ALIASES,me as EXIT_CODE,ca as EXTENSION_ACTIVATE_FLAG_CONTRACTS,da as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,ha as EXTENSION_ADOPT_FLAG_CONTRACTS,L0 as EXTENSION_CAPABILITIES,nT as EXTENSION_CAPABILITY_CONTRACT,rT as EXTENSION_CAPABILITY_CONTRACT_VERSION,oT as EXTENSION_CAPABILITY_LEGACY_ALIASES,Mn as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,_a as EXTENSION_CATALOG_FLAG_CONTRACTS,la as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,aa as EXTENSION_DESCRIBE_FLAG_CONTRACTS,fa as EXTENSION_DOCTOR_FLAG_CONTRACTS,sa as EXTENSION_EXPLORE_FLAG_CONTRACTS,Qs as EXTENSION_FLAG_CONTRACTS,ta as EXTENSION_INIT_FLAG_CONTRACTS,na as EXTENSION_INSTALL_FLAG_CONTRACTS,ua as EXTENSION_MANAGE_FLAG_CONTRACTS,pa as EXTENSION_MIGRATE_FLAG_CONTRACTS,D0 as EXTENSION_POLICY_MODES,$0 as EXTENSION_POLICY_SURFACES,ma as EXTENSION_RELOAD_FLAG_CONTRACTS,G0 as EXTENSION_SANDBOX_PROFILES,ea as EXTENSION_SCOPE_FLAG_CONTRACTS,F0 as EXTENSION_TRUST_MODES,ia as EXTENSION_UNINSTALL_FLAG_CONTRACTS,CP as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,bP as EXTERNAL_DEPENDENCY_SOURCE_KIND,TP as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,Lv as ExtensionCommandError,Us as FILES_FLAG_CONTRACTS,Wa as FOCUS_FLAG_CONTRACTS,$a as GC_FLAG_CONTRACTS,EE as GET_DEPTH_INPUT_VALUES,wE as GET_DEPTH_VALUES,td as GET_FLAG_CONTRACTS,Ns as GLOBAL_FLAG_CONTRACTS,kp as GRAPH_DURABLE_CACHE_MIN_ITEMS,Mp as GRAPH_DURABLE_CACHE_VERSION,nd as GRAPH_FLAG_CONTRACTS,xO as GRAPH_QUERY_DEFAULTS,De as GRAPH_SUBCOMMAND_VALUES,rd as GUIDE_FLAG_CONTRACTS,Ua as HEALTH_FLAG_CONTRACTS,Vs as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,jR as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,YI as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,Ks as HISTORY_COMPACT_FLAG_CONTRACTS,hi as HISTORY_EVENT_CLASSIFICATION_VERSION,Bs as HISTORY_FLAG_CONTRACTS,_S as HISTORY_HASH_ALGORITHMS,WA as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,zs as HISTORY_REDACT_FLAG_CONTRACTS,Hs as HISTORY_REPAIR_FLAG_CONTRACTS,cl as INIT_AGENT_GUIDANCE_MODE_VALUES,Js as INIT_FLAG_CONTRACTS,ga as INSTALL_FLAG_CONTRACTS,fn as ISSUE_SEVERITY_VALUES,Ha as ITEM_COMPLETE_FLAG_CONTRACTS,uI as ITEM_LATEST_TIMESTAMP_FIELDS,iT as ITEM_METADATA_KEY_ORDER,za as ITEM_MUTATE_FLAG_CONTRACTS,Va as ITEM_REOPEN_FLAG_CONTRACTS,iI as ITEM_SCALAR_MISSING_VALUE,ln as ITEM_TYPE_VALUES,pI as ITEM_UNION_COLLECTION_FIELDS,UM as JsonFileContextSignalStoreAdapter,Gs as LEARNINGS_FLAG_CONTRACTS,hS as LEGACY_HISTORY_HASH_ALGORITHM,hu as LINKED_TEST_ENV_NAME_PATTERN,gu as LINKED_TEST_PM_CONTEXT_MODE_VALUES,_u as LINKED_TEST_PROTECTED_ENV_KEYS,yu as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,Ed as LIST_COMMANDER_STRING_OPTION_CONTRACTS,CE as LIST_COMMAND_DEFAULT_PROJECTIONS,j0 as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,Ls as LIST_FILTER_FLAG_CONTRACTS,RP as LIST_SORT_FIELDS,IP as LIST_SORT_ORDER_VALUES,gi as MAINTENANCE_HISTORY_OPERATIONS,o0 as MAX_CHILD_PROJECTION_ITEMS,uT as MAX_WORKFLOW_POLICIES,mT as MAX_WORKFLOW_POLICY_TERMS,Ia as MEET_FLAG_CONTRACTS,E0 as MERGE_DRIVER_ARTIFACT_VALUES,qs as MERGE_FLAG_CONTRACTS,$e as MERGE_SUBCOMMAND_VALUES,O0 as MUTATION_EVENT_WIRE_BUDGET,se as MemoryRelationshipGraphAdapter,Pd as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,ad as NEXT_FLAG_CONTRACTS,lm as NEXT_OUTPUT_VALUES,uM as NEXT_RANKING_POLICIES,Fs as NOTES_FLAG_CONTRACTS,bO as OutputEnvelopeFitError,ra as PACKAGE_FLAG_CONTRACTS,oa as PACKAGE_INIT_FLAG_CONTRACTS,Pa as PAUSE_TASK_FLAG_CONTRACTS,lc as PLAN_CREATE_METADATA_PARAMETER_KEYS,Xs as PLAN_FLAG_CONTRACTS,Ui as PLAN_SHOW_DEPTH_VALUES,Ye as PLAN_SUBCOMMANDS,bm as PLAN_TEMPLATE_NAMES,Yy as PM_AGENT_TASK_ACCOUNTING_MODES,ut as PM_AGENT_TASK_TRANSCRIPT_VERSION,Mo as PM_BULK_LIFECYCLE_COMMAND_ALIASES,ts as PM_CLI_ERROR_DETAILS_LIMITS,as as PM_CLI_EXPECTED_ERROR_NAME,GO as PM_CLI_GRAMMAR_CONTRACT,NO as PM_CLI_GRAMMAR_NOUNS,Wo as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,LO as PM_CLI_SHARED_VERBS,No as PM_COMMAND_ALIAS_CONTRACTS,te as PM_COMMAND_CAPABILITY_CONTRACTS,Rt as PM_COMMAND_DESTINATION_CONTRACTS,VP as PM_COMMAND_EXIT_CONTRACTS,HP as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Pi as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,BP as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,qe as PM_COMMAND_POSITIONAL_CONTRACTS,kc as PM_COMMAND_VISIBILITY_CONTRACTS,LR as PM_COMPLETE_LIST_FINDING_CODES,lO as PM_CONTEXT_INTENTS_FILE,sE as PM_CONTEXT_INTENT_CONTRACTS,Io as PM_CONTEXT_OPS_COMMAND_ALIASES,zo as PM_CORE_COMMAND_NAMES,G as PM_CORPUS_SHAPE_SCHEMA,Xo as PM_DEPRECATED_TOOL_ACTIONS,wi as PM_DIAGNOSTIC_DEGRADATION_STEPS,Ei as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,Si as PM_DIAGNOSTIC_OUTPUT_CLASSES,Jo as PM_DISCOVERABLE_TOOL_ACTIONS,Kr as PM_EPISODE_SCHEMA,UP as PM_ERROR_CODE_CATALOG,DP as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Qr as PM_EXACT_COVERAGE_METRICS,Fo as PM_EXTENSION_CAPABILITY_CONTRACTS,Ho as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Uo as PM_EXTENSION_POLICY_MODE_CONTRACTS,qo as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,Bo as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,Go as PM_EXTENSION_SERVICE_NAME_CONTRACTS,jo as PM_EXTENSION_TRUST_MODE_CONTRACTS,Ni as PM_GENERIC_REFUSAL_GUIDANCE,vR as PM_GITATTRIBUTES_END,AR as PM_GITATTRIBUTES_START,PR as PM_GITATTRIBUTES_V2_END,OR as PM_GITATTRIBUTES_V2_START,Uc as PM_GITIGNORE_END,Gc as PM_GITIGNORE_START,QI as PM_HISTORY_ATTESTATION_CONTRACT,Ro as PM_HISTORY_COMMAND_ALIASES,xS as PM_HISTORY_OPERATION_ALIASES,LS as PM_HISTORY_OPERATION_CONTRACT,NS as PM_HISTORY_OPERATION_PATTERNS,Ko as PM_ITEM_ACTION_SUBCOMMANDS,MS as PM_ITEM_HISTORY_OPERATIONS,it as PM_MCP_APPS_EXTENSION,Ir as PM_MCP_APPS_SERVER_CAPABILITY,Ae as PM_MCP_APPS_SPEC_VERSION,xr as PM_MCP_APP_CONTRACTS,kr as PM_MCP_APP_MIME_TYPE,jb as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,rN as PM_MCP_HTTP_PROTOCOL_VERSION,sg as PM_MCP_INPUT_REQUEST_METHODS,rr as PM_MCP_LEGACY_PROTOCOL_VERSIONS,tr as PM_MCP_LOG_LEVELS,E as PM_MCP_META_KEYS,i$ as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,s$ as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,$c as PM_MCP_PROMPT_CONTRACTS,H as PM_MCP_PROTOCOL_VERSION,Dc as PM_MCP_RESOURCE_CONTRACTS,at as PM_MCP_SKILLS_DRAFT_REVISION,Nr as PM_MCP_SKILLS_EXTENSION,uy as PM_MCP_SKILLS_SERVER_CAPABILITY,I as PM_MCP_SKILL_LIMITS,we as PM_MCP_SUBSCRIPTION_ID_META_KEY,re as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,Wx as PM_MCP_TASKS_EXTENSION,gg as PM_MCP_TASK_STATUSES,he as PM_MCP_TOOL_COMMAND_CONTRACTS,WS as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,ps as PM_MUTATION_ACTION_CONTRACTS,Ne as PM_NAMESPACED_COMMAND_ALIASES,Hr as PM_OBSERVATION_SCHEMA,Ci as PM_OUTPUT_BUDGET_CLASSES,Ti as PM_OUTPUT_DEGRADATION_STEPS,kt as PM_OUTPUT_ENVELOPE_KINDS,$t as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,Vo as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Dt as PM_PACKAGE_RESOURCE_KINDS,Be as PM_POSITIONAL_ACTION_CONTRACTS,yc as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,hc as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,ww as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,Lw as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,Cw as PM_READ_OUTPUT_DIMENSIONS,Sw as PM_READ_OUTPUT_OPTION_FLAGS,hw as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,_w as PM_READ_OUTPUT_SESSION_MIN_TOKENS,AC as PM_READ_OUTPUT_SURFACES,Ew as PM_READ_OUTPUT_SURFACE_CONTRACTS,KS as PM_READ_ROW_CONTRACTS,VS as PM_READ_ROW_JQ_SELECTOR,Fi as PM_RECOVERY_ECHO_FIELDS,YL as PM_RECOVERY_REFERENCE_FIELDS,ce as PM_RECOVERY_REFERENCE_KINDS,bb as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,lo as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,rD as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,co as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,ko as PM_RELOCATED_COMMAND_ALIASES,Nd as PM_REPRODUCIBLE_PROCESS_ENV,KP as PM_SUCCESS_EXIT_CODES,Yo as PM_TOOL_ACTIONS,uc as PM_TOOL_ACTION_PARAMETER_CONTRACTS,gc as PM_TOOL_PARAMETERS_SCHEMA,_c as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,fc as PM_TOOL_PARAMETERS_SCHEMA_VERSION,dc as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Vr as PM_VERDICT_SCHEMA,kS as PM_WORKSPACE_HISTORY_OPERATIONS,qr as PM_WORKSPACE_RECIPE_SCHEMA,Ys as PROFILE_FLAG_CONTRACTS,Jt as PROFILE_LINT_CODES,Xt as PROFILE_LINT_DIMENSIONS,qt as PROFILE_NAMES,Xe as PROFILE_SUBCOMMANDS,b as PmCliError,ge as PmClient,DR as PmCompleteListValidationError,y as PmMcpAuthorizationError,or as PmMcpInputRequiredError,Ar as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,nr as PmMcpRequestStateReplayGuard,Ur as PmMcpSkillRegistry,_r as PmMcpSubscriptionRegistry,ot as PmMcpTaskStore,Kw as QUERY_CURSOR_CONTRACT,ba as REINDEX_FLAG_CONTRACTS,UA as REINDEX_LOCK_ID,pt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,va as RELEASE_FLAG_CONTRACTS,ka as REMIND_FLAG_CONTRACTS,At as RESERVED_ITEM_FIELD_NAMES,Ea as RESTORE_FLAG_CONTRACTS,mn as RISK_VALUES,CO as RelationshipEventLog,SO as RelationshipEventStore,z as RelationshipGraph,Ue as RelationshipKindRegistry,Ws as SCHEMA_FLAG_CONTRACTS,Ad as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,B0 as SEARCH_EXTENSION_FLAG_DEFINITIONS,dd as SEARCH_FLAG_CONTRACTS,Du as SEMANTIC_ATTRIBUTION_LIMITS,dT as SETTINGS_DEFAULTS,Zm as SNAPSHOT_SCHEMA,SR as SOURCE_CONTEXT_ACCESS_ENV,wR as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Oa as START_TASK_FLAG_CONTRACTS,Fa as STATS_FLAG_CONTRACTS,pn as STATUS_VALUES,xs as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,yi as SUBSTANTIVE_HISTORY_OPERATIONS,LE as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,$E as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,bC as SUPPRESS_HOST_OUTPUT_MARKER,La as TELEMETRY_FLAG_CONTRACTS,Of as TELEMETRY_SUBCOMMANDS,Na as TEST_ALL_FLAG_CONTRACTS,xa as TEST_FLAG_CONTRACTS,Da as TEST_RUNS_FLAG_CONTRACTS,Sf as TEST_RUN_MEASUREMENT_LIMIT,nc as TOOL_ACTIVITY_OPTION_CONTRACTS,Vd as TOOL_AGGREGATE_OPTION_CONTRACTS,ec as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,oc as TOOL_CALENDAR_OPTION_CONTRACTS,rc as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,ic as TOOL_CONTEXT_OPTION_CONTRACTS,Jd as TOOL_CREATE_OPTION_CONTRACTS,Xd as TOOL_CREATE_OPTION_CONTRACT_SOURCE,sc as TOOL_DEPS_OPTION_CONTRACTS,ac as TOOL_GRAPH_OPTION_CONTRACTS,Hd as TOOL_LIST_FILTER_OPTION_CONTRACTS,Kd as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,Yd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,Wd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,tc as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,Qd as TOOL_UPDATE_OPTION_CONTRACTS,Zd as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,aT as TYPE_TO_FOLDER,pC as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,jd as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,qd as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Bd as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,Ya as UPDATE_FLAG_CONTRACTS,Xa as UPDATE_MANY_FLAG_CONTRACTS,ya as UPGRADE_FLAG_CONTRACTS,ja as VALIDATE_FLAG_CONTRACTS,pT as WORKFLOW_POLICY_ACTIONS,MR as WORKFLOW_POLICY_DOCUMENT_SCHEMA,IR as WORKFLOW_POLICY_SCHEMA,sd as WORKSPACE_FLAG_CONTRACTS,iA as WORKSPACE_HISTORY_ID,Qm as WORKSPACE_SNAPSHOT_ACTIONS,Ll as WorkspaceGraphCache,OO as WorkspaceTransactionInterruptedError,su as _testOnly,r0 as _testOnlyAggregateCommand,xl as _testOnlyConfigCommand,d0 as _testOnlyGetCommand,Vp as _testOnlyHealthCommand,ml as _testOnlyInit,ll as _testOnlyInitAgentGuidance,ok as _testOnlyItemTransaction,M0 as _testOnlyMutationEvents,QM as _testOnlyNextCommand,w0 as _testOnlySearchCommand,KR as _testOnlySimilarity,Em as _testOnlyTemplates,ou as _testOnlyValidateCommand,N0 as _testOnlyWorkspacePosition,ik as abandonItemTransaction,kO as abandonWorkspaceTransaction,QR as acceptAssuranceProposals,tu as acknowledgeLinkedTests,Il as acknowledgeUnknownAuthorHistoryEvents,Rl as acknowledgeUnknownAuthorHistoryEventsFromTransport,sv as acquireItemMetadataDerivedIndexLock,je as acquireLock,Qn as acquireLockLease,Fk as activateExtensionForTest,$C as activateExtensions,Zn as agentSessionEnvironment,P_ as aggregate,pf as analyzeAgentProvenanceDescriptorCoverage,ZO as analyzeDefectChangeRisk,BI as analyzeDefectRecurrenceCoverage,np as analyzeDuplicateItems,EO as analyzeGraphImpact,Sc as analyzeHierarchyIntegrity,AO as analyzeKnowledgeGraph,YP as analyzePmCommandExitConformance,Zo as analyzePmToolActionParity,RI as analyzeReconciliationDiscard,wO as analyzeRelationshipExecution,wp as analyzeRelationshipSchedule,Zh as analyzeSdkActionCoverage,It as analyzeSdkCliParameterCompleteness,U_ as append,Bi as appendHistoryEntry,cA as appendWorkspaceAuditEvent,dA as appendWorkspaceHistoryChange,ET as applyAcceptanceCriteriaMutations,JR as applyAssurancePreset,gd as applyBootstrapPagerPolicy,$I as applyClosureTimestampFix,pE as applyContextIntentProjection,cm as applyContextTagProjection,MP as applyFilterValueEcho,zA as applyHistoryPatch,xd as applyInvocationAuthorOverride,zl as applyPathMigrations,kw as applyReadOutputDimensions,Pw as applyReadOutputIncludeModes,yw as applyReadOutputSessionReferences,cS as applyRegisteredItemFieldDefaultsAndValidation,Wl as applyStandaloneNote,Ps as applyStoredExtensionMigrationState,vT as applyTagRemovals,dM as applyTerminalOrderingPolicy,Yl as artifactKey,QT as asRecordClone,ZT as asRecordOrNull,He as assembleWorkspaceRelationshipGraph,UR as assertCompleteListResult,yx as assertExtensionBlueprint,gx as assertExtensionCapabilityUsage,Qk as assertExtensionDeactivated,Cx as assertExtensionManifestCompatible,Tx as assertExtensionManifestMatchesBlueprint,Sx as assertExtensionPreflight,Ac as assertHierarchyMutationAllowed,XI as assertHistoryCompactTarget,MI as assertHistoryRepairTarget,Xi as assertInitializedTracker,Hl as assertLinkedArtifactMutationIsUnambiguous,Ax as assertMcpClientCapabilities,Ex as assertMcpProtocolHeader,Wy as assertMemoryRelationshipGraphAdapterConformance,RT as assertNoUnknownCsvKeys,fu as assertNonHierarchyCardinalityMutationAllowed,ex as assertPackageManifest,yA as assertParentReferenceIsNotSelf,kN as assertPmMcpSkillsCapability,bx as assertProjectProfile,tv as assertProjectRuntimeCompatibility,ZA as assertProjectRuntimeFormatGuard,YS as assertProjectionModeChoice,Yi as assertReadableTrackerRoot,tx as assertRegisteredCommandContract,px as assertRegisteredCommandOverride,ax as assertRegisteredExporter,rx as assertRegisteredFlags,ox as assertRegisteredHook,sx as assertRegisteredImporter,dx as assertRegisteredItemField,cx as assertRegisteredItemType,hx as assertRegisteredMigration,ux as assertRegisteredParserOverride,mx as assertRegisteredPreflightOverride,lx as assertRegisteredProfile,fx as assertRegisteredRendererOverride,nx as assertRegisteredSearchProvider,_x as assertRegisteredServiceOverride,ix as assertRegisteredVectorStoreAdapter,gC as assertRelationshipEdgeAllowed,ro as assertRelationshipGraphAdapterConformance,ST as assertSchemaPreviewSupported,If as assertTestMeasurementRun,RE as assertWellFormedOutputText,iR as assuranceAssertionUpdateIsLoosening,fE as attachContextIntentReceipt,Xw as attachContextUsageServingReceipt,Jp as attachLinkedTestMutationProvenance,Xp as attachLinkedTestProvenance,Ze as attachMcpServerInfo,tw as attachOutputOmissionReceipt,hE as attachOutputTokenAccounting,_E as attachReadOutputContracts,bw as attachReadOutputSessionReceipt,Kc as auditMergeAttributeFence,RR as auditMergeDriverConfiguration,Rp as auditWorkspaceRelationshipGraph,gN as authorizeMcpHttpRequest,Xn as boundAgentEpisodeIdentity,lw as boundReadOutputRows,im as buildChildrenByParent,g0 as buildCompactSearchFilterSummary,kP as buildContentFilterEcho,GM as buildContextSignalSnapshot,My as buildCorpusShapeItemPlan,JO as buildDefectRecurrenceIndex,ol as buildExtensionDescribeResult,il as buildExtensionInstallPlan,xP as buildGovernanceMissingFilterEcho,PA as buildInvalidTypeError,i0 as buildItemChildrenRollup,tk as buildItemCompletionMutations,wM as buildItemContextRelevanceCandidates,uv as buildItemNotFoundError,a0 as buildItemSchedule,FI as buildLinkedFileRepairReport,dN as buildMcpAuthorizationDiscoveryUrls,rg as buildMcpCompleteResult,Ox as buildMcpDiscoverResult,mN as buildMcpDynamicRegistrationMetadata,eN as buildMcpHttpRequestHeaders,Lx as buildMcpInputRequiredResult,aN as buildMcpProtectedResourceMetadata,Hc as buildMergeAttributePatterns,mc as buildPmActionToolInputSchema,iD as buildPmRefusalClosureCensus,VR as buildRelationshipContext,gv as buildSearchCorpus,bv as buildSemanticCorpusInput,NI as buildStatusRoleWarnings,Wi as buildTrackerInitializationRecovery,Ev as buildVectorizationEmbeddingIdentity,Av as buildVectorizationEmbeddingMetadata,y0 as buildVerboseSearchFilters,kR as buildWorkflowCompletenessCheck,VM as buildWorkspaceMemorySnapshot,Yn as canonicalDocument,GT as canonicalizeCommandOptionKey,yk as canonicalizeCommandSuggestions,CM as canonicalizeContextRecencyCoordinate,fC as canonicalizeRelationshipKind,XL as censusPmRecoveryReferenceProducers,GR as certifyCompleteListResult,Nk as checkExtensionManifestCompatibility,wh as claim,Eh as claimNext,BR as classifyHistoryAuthorEvent,bi as classifyHistoryEvent,OI as classifyHistoryMergeReceiptReferences,RC as classifyHostEnvironmentFault,T0 as classifyImplicitSemanticFallbackReason,qn as classifyItemFormatVersion,kf as classifyLinkedTestCommandSafety,xf as classifyLinkedTestFailure,eS as clearActiveExtensionHooks,$p as clearDurableGraphCache,jS as clearFocusedItem,Uf as clearWorkspaceContractsCache,Sh as close,cu as closeItem,kh as closeTask,Td as coalesceRepeatedListFlags,iP as collectBlockedByIds,aP as collectBlockedByIdsFromCorpus,Zw as collectContextUsageDeliveredItemIds,Rc as collectDanglingDependencyReferences,cP as collectDependencyBlockedIds,Oc as collectDuplicateDependencyRows,Pp as collectDuplicateRelationshipEdgeGroups,b0 as collectErrorCauseCodes,Cc as collectHierarchyRelations,Cr as collectMcpHeaderAnnotations,Ic as collectMissingDependencyTargetIds,mu as collectNewOrderingCycleWarnings,Ap as collectOrderingCycles,Pc as collectOrderingStorageContradictions,mO as collectPackageContextIntentContracts,Gt as collectPackageExtensionDirectories,aS as collectRegisteredItemFieldNames,AS as collectRuntimeCreateFieldValues,RA as collectRuntimeFilterValues,vS as collectRuntimeUpdateFieldValues,em as collectSubtreeIds,kn as collectUsedExtensionCapabilities,UT as commandOptionFlagLabel,M_ as comments,l_ as commitImportedItem,rk as commitItemCompletion,ek as commitItemMutations,RO as commitWorkspaceTransaction,ks as compactFlagAliasContracts,tm as compareCriticalItems,YA as comparePmDateVersions,vO as compareRelationshipSnapshots,eC as compareTimestampStrings,yM as compileHistoryProvenanceMatcher,cE as composeContextIntentContracts,Ok as composeExtension,xk as composeExtensionPackage,pP as computeActionabilityReport,rA as computeHistoryDiff,Cp as computeRelationshipCentrality,Tp as computeRelationshipDominators,Nl as computeWorkspaceGraphFingerprint,B_ as config,QC as consumeAfterCommandAffectedItems,S_ as context,mE as contextIntentRowId,vh as copy,Nf as countFailureCategories,dw as countReadOutputRows,bh as create,XR as createAssurancePreset,UI as createAssuranceWorkspaceContext,rC as createCheckpointId,$R as createCompleteListOptions,FC as createCoreCommandHookContext,Zr as createCorpusShapeMeasurement,lR as createEmptyAssuranceDocument,vC as createEmptyExtensionRegistrationRegistry,Dv as createExtensionCommandError,As as createExtensionCommandSdk,Rn as createExtensionContributionInventory,wx as createExtensionTestHarness,ji as createHistoryEntry,Jv as createLazyModule,xR as createLifecycleCompletenessPolicies,yN as createMcpStaticBearerVerifier,Yx as createMcpTaskStore,pv as createMutationGuardSdk,XS as createOutputOmissionReceipt,cs as createPmCliExpectedError,Es as createPmCliProgram,vi as createPmCommandOutputBudget,Uw as createQueryFingerprint,Ky as createRelationshipGraphScaleFixture,Z as createRelationshipGraphSnapshot,Et as createRelationshipKindRegistry,Dd as createReproducibleProcessRunner,_0 as createSearchCursorFingerprint,GC as createSerialQueue,LT as createStdinTokenResolver,uC as createUnknownSubcommandError,CT as createWorkflowPolicyEvaluator,ef as createWorkspaceSnapshot,Gk as deactivateExtensionForTest,KD as declineServiceOverride,uE as decodeContextIntentCursor,Xv as decodeHtmlEntitiesInOptions,Tr as decodeMcpHttpHeaderValue,yE as decodePmTableRows,zw as decodeQueryCursor,Bw as decodeQueryCursorEnvelope,qw as decodeQueryCursorState,Fw as decodeReadOutputContinuationCursor,Dk as decodeToon,wN as decoratePmMcpToolsWithApps,Jl as dedupeLinkedArtifacts,AM as defaultScoreContextCandidates,QD as defineAfterCommandHook,JD as defineBeforeCommandHook,ZD as defineBeforeMutationHook,LD as defineCommand,BD as defineCommandOverride,W as defineCorpusShape,BN as defineEpisodeSpecification,XD as defineExporter,Ak as defineExtension,vk as defineExtensionBlueprint,xD as defineExtensionManifest,DD as defineFlag,YD as defineImporter,FD as defineItemField,$D as defineItemType,GD as defineMigration,Cy as defineObservationContract,r1 as defineOnIndexHook,t1 as defineOnReadHook,e1 as defineOnWriteHook,qD as defineParserOverride,Oi as definePmCommandOutputBudget,jP as definePmCommandOutputEnvelope,$P as definePmErrorCodeCatalog,zD as definePreflightOverride,ND as defineProjectProfile,WD as defineRendererOverride,UD as defineSearchProvider,HD as defineServiceOverride,jD as defineVectorStoreAdapter,Ay as defineVerdictContract,ve as defineWorkspaceRecipe,Oh as deleteItem,af as deleteWorkspaceSnapshot,yC as dependencyToRelationship,F_ as deps,ZR as deriveAssuranceProposals,LI as deriveClosureTimestamp,Rk as deriveExtensionCapabilities,q0 as deriveMutationTransactionId,XP as derivePmBulkMutationEffect,JL as derivePmRecoveryReferenceObligations,Ep as deriveRelationshipDeadlines,Jc as deriveSchemaEvolutionMigrationId,Bv as deriveTelemetryCommandResolution,xA as describeAllowedTransitions,CR as describeExtensionActivation,Ik as describeExtensionBlueprint,cC as describeFlagScalarValueFailure,Bu as describeItemOwnershipConflict,jN as describeObservationCost,Wt as describeProfileComposition,Yt as describeProjectProfile,dk as describeReadCompletenessControls,$v as describeUnknownError,ci as detectAgentIdentity,mi as detectHarnessIdentity,yp as detectRelationshipCommunities,li as diagnoseAgentIdentity,Ip as diffRelationshipAuditSnapshots,Af as diffTestRunMeasurements,Fx as digestMcpRequestParameters,LC as discoverExtensions,yn as discoverNearbyPmRoot,d$ as discoverPmTools,JA as discoverProjectRuntimeVersionPins,$_ as docs,I_ as duplicates,xp as durableGraphCachePath,Fp as durableGraphCacheStatus,jn as effectiveItemFormatVersion,cO as emitTelemetryErrorEvent,c_ as emptyImportedDocument,aI as encodeItemScalarDecisionValue,br as encodeMcpHttpHeaderValue,gE as encodePmTableRows,jw as encodeQueryCursor,$w as encodeReadOutputContinuationCursor,$k as encodeToon,oA as enforceHistoryStreamPolicyForItem,nA as enforceHistoryStreamPolicyForItems,NP as enrichCliFlagInvocationContract,Mt as enrichCliFlagInvocationContracts,VA as ensureMaterializedHistoryTarget,Bc as ensurePmGitignore,Gl as ensureScope,Nv as ensureSentryCommandTracing,xv as ensureSentryInit,d_ as ensureTrackerInitialized,hp as enumerateRelationshipPaths,Ii as estimatePmOutputTokens,uR as evaluateAssuranceAssertion,mR as evaluateAssuranceGate,sL as evaluateBoundaryFixtures,RM as evaluateContextRanking,QO as evaluateDefectGateEvidence,pR as evaluateMeasurement,Bm as evaluateMetricFloors,ms as evaluateMutationGuard,gf as evaluateProvenanceCoverage,T1 as evaluateReliabilityWindow,ff as evaluateSemanticAttributionCoverage,sp as evaluateSimilarityGovernance,kA as evaluateTransition,vy as evaluateVerdictContract,TT as evaluateWorkflowPolicies,es as executeEmbeddingBatchesWithRetry,Sv as executeVectorDelete,wv as executeVectorReset,Cv as executeVectorUpsert,gy as executeWorkspaceRecipe,Kl as expandAddGlobEntries,dp as explainSourceTraceability,tM as exportAttestation,xh as extension,Lh as extensionActivate,Dh as extensionDeactivate,Nh as extensionList,kb as extensionMigrate,vI as extractHistoryMergeReceiptDispositions,AI as extractHistoryMergeReceiptReferences,fN as extractMcpTraceContext,BA as extractPatchFailureContext,Kp as extractReferencedPmItemIdsFromCommand,Vy as federateRelationshipGraphSnapshots,N_ as files,L_ as filesDiscover,D_ as filesLookup,Qw as finalizeContextUsageDelivery,$y as findCoverageDeficits,ip as findDuplicateClusters,zc as findGitWorkspaceRoot,TS as findHistoryIdentityDiscontinuities,tl as findInstalledNpmPackageCandidate,SN as findPmMcpAppByUri,xo as findPmNamespacedCommand,bp as findRedundantRelationshipEdges,Sp as findRelationshipCutStructure,op as findSimilarItems,dO as finishTelemetryCommand,TO as fitOutputEnvelope,dC as flattenFlagListValue,Ny as flushTelemetryQueue,Rh as focus,gp as forEachMatchedRelationshipEdge,Op as formatDuplicateEdgeGroup,wc as formatHierarchyRelation,vp as formatOrderingStorageContradiction,FO as formatPmPositionalActionFlagTip,Dm as formatProfileApplyHuman,Lm as formatProfileLintHuman,xm as formatProfileListHuman,Nm as formatProfileShowHuman,el as formatSchemaEvolutionMigrationHuman,S0 as formatVectorIndexRecoveryWarnings,x0 as formatWorkspacePositionHuman,mh as gc,Hi as generateItemId,v_ as get,XC as getActiveCommandResult,aE as getActiveContextIntentContracts,Nn as getActiveExtensionRegistrations,hN as getActiveMcpTraceContext,_R as getAssuranceDeclaration,Yh as getContracts,GS as getFocusedItem,Cn as getHistoryPath,yO as getItemAt,Tn as getItemPath,hs as getMutationActionContract,jc as getPmGitignoreBlock,bn as getSettingsPath,jf as getWorkspaceContracts,sA as getWorkspaceHistoryPath,G_ as graph,Np as graphAuditBaselinePath,_f as groupHistoryByEpisode,VD as handleServiceOverride,vx as hasMcpClientExtension,CN as hasPmMcpAppsCapability,ze as hasSubcommandFlagContractsForCommand,vv as hasVectorizationEmbeddingIdentityChanged,Ov as hasVectorizationVectorDimensionChanged,HE as hashDocument,VE as hashDocumentForVersion,KE as hashEmptyDocument,GE as hashHistoryPatch,FE as hashHistoryRecord,UE as hashHistoryStream,dI as hashItemScalarDecisionValue,uh as health,up as hierarchyAncestors,mp as hierarchyDescendants,gh as historyCompact,yh as historyCompactBulk,bS as historyDigest,gM as historyEntryMatchesProvenance,XA as historyItemHashVersionForRuntime,fh as historyRedact,_h as historyRepair,hh as historyRepairAll,sP as indexBlockedByIds,Ec as indexHierarchyRelations,Pv as inferConsistentVectorDimension,Ai as inferPmOutputBudgetClass,j_ as init,FR as inspectCompleteListResult,OC as inspectExtensionManifestSchema,El as inspectHistoryAuthorStream,hI as inspectMergeReceiptEvidence,ev as inspectProjectRuntimeCompatibility,Ss as inspectStaleInProgressItems,Qh as inspectStaticExtensionInventory,xI as inspectStatusRoleAssignments,aA as inspectWorkspaceHistoryState,tf as inspectWorkspaceSnapshot,Xc as installMergeFence,Px as interpretMcpResultType,um as isAlreadyClaimedError,Uv as isCommanderError,pk as isCompatibleRecoveryFlag,bl as isErrnoError,KO as isExternalDependencyReference,WO as isExternalDependencySourceKind,fe as isFileMissingError,Li as isGenericRefusalRequired,Di as isGenericRefusalWhy,CC as isHostOutputSuppressed,ds as isItemAlreadyExistsError,sI as isItemScalarMissingValue,SI as isLegacyMergeReceiptSummary,h as isMcpRecord,fs as isMutationAction,hC as isOrderingRelationshipKind,hA as isPlaceholderReferenceToken,rs as isPmCliErrorDetails,ls as isPmCliExpectedError,en as isPmExtensionCapabilityContract,rn as isPmExtensionPolicyModeContract,on as isPmExtensionPolicySurfaceContract,tn as isPmExtensionServiceNameContract,WP as isPmKnownExitCode,qP as isPmMutationReceipt,We as isPmSuccessfulExitCode,ss as isPmTokenBudgetRecovery,Qo as isPmToolAction,wI as isPreDurableCloneLocalReceiptSummary,EI as isPreDurableDispositionEligibleReference,QA as isProjectMutatingInvocation,Zv as isPureSnakeCaseAlias,xw as isReadOutputBudgetExceeded,fw as isReadOutputSessionReference,lk as isReadProjectionRecoveryFlag,ZS as isReadRowContract,bc as isRuntimeRecord,DA as isSettingsReadFallback,tO as isTerminalPlanMode,PS as isTerminalStatus,On as isTimestampLiteral,W0 as itemDocumentToMutationOptions,s0 as itemHasSchedule,In as jaccardSimilarity,x_ as learnings,lC as levenshteinDistanceWithinLimit,hl as limitAnnotationEntries,Zp as linkedTestTrustFingerprint,Mk as lintExtensionBlueprint,PC as lintExtensionManifestSchema,Zt as lintProjectProfile,w_ as list,ni as listAgentProvenanceAdapters,bd as listAliasPluralKeys,E_ as listAllComplete,cv as listAllDocumentCandidatesCached,Qi as listAllItemMetadata,lv as listAllItemMetadataLight,fR as listAssuranceDeclarations,TR as listAssuranceVerdicts,Ry as listBuiltinCorpusShapes,bk as listCoreClosedDomainContracts,AE as listGetProjectionFields,oI as listInvalidProvenanceHistoryStreamIds,SE as listListProjectionFields,gI as listMergeReceipts,_s as listMutationActions,P0 as listMutationEvents,fo as listPmCommandFlagBudgets,Nc as listPmCommandsForFamily,xc as listPmCommandsForTier,Me as listPmFlagLexicon,RD as listPmFlagSpellingInventory,Lc as listPmMcpToolsForProfile,yD as listPmRequiredArgumentRefusalContracts,bD as listPmSubcommandRefusalContracts,Kt as listProfiles,SD as listTrackerPreflightRecoveryContracts,J0 as listUpsertKeyCandidates,rf as listWorkspaceSnapshots,fO as loadContextIntentRuntimeLayers,Am as loadCreateTemplateOptions,DC as loadExtensions,Up as loadGraphAuditBaseline,Z0 as loadGuardedRuntimeSchema,nC as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,Ji as locateItem,PT as looksLikeGenericKeyValueEntry,cw as mapReadOutputRows,yI as markMergeReceiptReconciled,IA as matchesRuntimeFilters,sO as maybeRunFirstUseTelemetryPrompt,ky as measureCorpusShapePlan,Ki as measureItemMetadataReadWork,AT as mergeAdditiveTags,Pk as mergeExtensionBlueprints,cI as mergeHistoryStreams,mI as mergeItemDocuments,fI as mergeJsonDocuments,Cd as mergeLinkedTestTwoTokenEntries,lI as mergeRelationshipEventStreams,am as mergeSortedWarnings,eO as migrateItemFilesToFormat,fv as mutateItem,mv as mutateItemWithHistoryContext,lA as mutateWorkspaceJsonWithHistory,O_ as next,si as normalizeAgentProvenanceAdapterValue,_l as normalizeAnnotationTransportOptions,tR as normalizeAssuranceEvaluation,eR as normalizeAssuranceMutation,Sd as normalizeBootstrapInvocation,mS as normalizeBulkIdsValue,vc as normalizeDependencyGraphTarget,AP as normalizeDependencySeedId,EP as normalizeDependencySourceKind,Pn as normalizeExtensionContributionInventory,FS as normalizeHistoryOperationForWrite,rI as normalizeInvalidHistoryProvenance,VO as normalizeItemAddressInvocation,Bn as normalizeItemFormatVersion,zi as normalizeItemId,Vn as normalizeItemMetadata,vP as normalizeItemReference,yd as normalizeLegacyExtensionActionSyntax,Vl as normalizeLinkedPath,_A as normalizeParentReferenceValue,Ht as normalizeProfileName,qi as normalizeRawItemId,Rw as normalizeReadOutputIncludeModeOptions,JE as normalizeReplayPatchOps,gs as normalizeSimilarityText,OS as normalizeStatusForRegistry,Hn as normalizeStatusInput,SS as normalizeStatusInputWithRegistry,Gv as normalizeThrownExitCode,k_ as notes,vn as nowIso,Lp as openDurableGraphCache,$x as openMcpRequestState,qN as openPmEpisode,fp as orderingPredecessors,_p as orderingSuccessors,NM as packContextCandidates,rm as packRankedContextItems,Vh as packageActivate,Hh as packageCatalog,Kh as packageDeactivate,qh as packageDescribe,jh as packageDoctor,Gh as packageInstall,$h as packageLifecycle,Fh as packageList,Bh as packageManage,xb as packageMigrate,zh as packageReload,Uh as packageUninstall,Vw as paginateQueryRows,Ul as parseAddEntries,jl as parseAddGlobEntries,yl as parseAnnotationTextInput,z0 as parseAtomicMutationControls,hd as parseBootstrapCommandName,md as parseBootstrapGlobalOptions,_d as parseBootstrapHelpRequest,wd as parseBootstrapTypeValue,uS as parseBulkIdsText,Zu as parseContextDepth,Wu as parseContextFocusFields,pO as parseContextIntentDeclarations,Qu as parseContextSections,FM as parseContextSignalSnapshot,OT as parseCsvKv,rP as parseDefectChangeRiskRequest,jI as parseDefectRecurrenceCoverageRequest,tP as parseDefectRecurrencePolicy,jm as parseEvalMetricFloors,Vm as parseEvalQuerySet,WT as parseExtensionLongFlagToken,qp as parseGraphSubcommand,eM as parseHistoryAttestation,_M as parseHistoryProvenanceFilters,uP as parseIntegerLimit,RS as parseItemDocument,H0 as parseItemMutationBatch,OA as parseLimit,Ou as parseLinkedTestAssertionEqualsMap,Pu as parseLinkedTestAssertionGteMap,Cu as parseLinkedTestBoolean,Su as parseLinkedTestContextMode,Tu as parseLinkedTestEnvClear,bu as parseLinkedTestEnvSet,Ru as parseLinkedTestJsonEntries,vu as parseLinkedTestMinLines,Au as parseLinkedTestRegexList,Eu as parseLinkedTestStringList,wu as parseLinkedTestWorkspaceContextMode,cg as parseMcpCachePolicy,eg as parseMcpImplementation,tt as parseMcpInputRequests,dr as parseMcpInputResponses,xg as parseMcpSubscriptionFilter,ql as parseMigrateEntries,_P as parseMultiValueFilter,zP as parseMutationReceipt,$T as parseOptionalNonNegativeInteger,DT as parseOptionalNumber,qL as parsePmAgentTaskTranscriptCorpus,a$ as parsePmToolDiscoveryOptions,mP as parsePriority,yP as parsePriorityFilterSet,gw as parseReadOutputSession,dS as parseRegisteredItemFieldAssignments,ae as parseRelationshipGraphSnapshot,Bl as parseRemoveEntries,ap as parseSourceLineRange,wA as parseStatusFilterCsv,hP as parseStringFilterSet,nn as parseTags,wf as parseTestRunMeasurements,fP as parseType,gP as parseTypeFilterSet,Pl as parseUnknownAuthorHistoryEventCoordinates,fT as parseWorkflowPolicy,_T as parseWorkflowPolicyDocument,e0 as partitionDecisionEntries,tA as patchPathToChangedField,sn as pathExists,Mh as pauseTask,Dp as persistDurableGraphResult,LA as persistSelectedItemFormat,zR as planAgentIdentityVocabularyMutation,zM as planCompletedAtBackfill,sl as planExtensionDirectoryCopy,Ek as planItemMutationDocument,Qt as planProfileApplication,KL as planRelationshipEventBackfill,Bp as planRelationshipRemediation,Zc as planSchemaEvolutionMigration,vl as planUnknownAuthorHistoryAcknowledgment,of as planWorkspaceSnapshotRestore,jO as positionalShapeKey,BO as positionalSignatureKey,Lk as preflightExtension,bs as prepareSimilarityText,MT as preserveMutationStdinTokenFields,IT as preserveMutationStdinTokenLiterals,wk as previewItemMutationDocument,Q0 as previewItemMutations,xE as printError,kE as printResult,sh as profile,ch as profileApply,lh as profileLint,ah as profileList,dh as profileShow,ZC as projectAfterCommandItemSnapshot,Yu as projectContextFocusRows,Cf as projectFleetAttributionAnalytics,hM as projectHistoryProvenance,Gi as projectLeanRecoveryPayload,vE as projectPmBriefListEnvelope,OE as projectPmBriefSearchEnvelope,is as projectPmCliErrorContextDetails,os as projectPmCliErrorDetails,ki as projectPmDiagnosticOutput,xi as projectPmDiagnosticText,bf as projectProvenanceCoverageAnalytics,ru as projectValidateCounts,eI as promoteAssuranceAssertion,Jw as propagateContextUsageServingReceipt,uL as pruneCompileCacheGenerations,hR as putAssuranceDeclaration,gR as putAssuranceDeclarationBundle,rv as queryItemMetadataIndex,ov as queryLinkedFileMetadataIndex,nv as querySimilarItemMetadataIndex,Ef as queryTestRunMeasurementsBelow,wn as quoteCommandArg,Sn as quoteWindowsCommandArg,gk as rankCommandPaths,gl as readAnnotationEntries,pi as readAuthorEnvironment,qf as readBooleanOption,nE as readContextUsageAffinity,zf as readCsvListOption,Os as readExtensionMigrationState,an as readFileIfExists,Id as readFirstStringFromCommanderOptions,Md as readFirstValueFromCommanderOptions,hf as readHistoryAnalyticsWindow,zS as readHistoryEntries,_i as readHistorySnapshot,cf as readImprovementLedger,av as readItemMetadataDerivedIndexState,nk as readItemTransaction,Zi as readLocatedItem,aw as readOutputBudgetCollections,Dw as readOutputCollectionFingerprint,sw as readOutputContinuationRowCollections,nw as readOutputContinuationRowPaths,Ow as readOutputIncludeModeOptions,iw as readOutputRowCollections,ow as readOutputRowPaths,Tw as readOutputSessionRemainingTokens,Ft as readPmPackageManifest,Gf as readRequiredString,ES as readRuntimeFieldOptionValue,Vi as readSettings,nO as readSettingsSection,$A as readSettingsWithMetadata,kd as readStringArrayFromCommanderOptions,Bf as readStringOption,Fv as readThrownExitCode,Rv as readVectorizationStatusLedger,KA as readWorkflowPolicies,hT as readWorkflowPolicyField,uO as readWorkspaceContextIntentContracts,BM as readWorkspaceContextSignals,KM as readWorkspaceMemory,k0 as readWorkspacePosition,IO as readWorkspaceTransaction,eA as reanchorHistoryEntries,S1 as reconcileArtifactLedgers,xn as reconcileExtensionCapabilityUsage,uA as reconcileWorkspaceJsonHistory,JC as recordAfterCommandAffectedItem,bR as recordAssuranceVerdict,xu as recordClaimSemanticAttribution,tE as recordContextUsageDelivery,eE as recordContextUsageServing,rE as recordContextUsageTouch,oE as recordContextUsageTouches,Lu as recordFocusSemanticAttribution,df as recordImprovementObservation,Nu as recordReleaseSemanticAttribution,dv as refreshItemMetadataDerivedIndex,Wc as refreshMergeAttributeFenceIfInstalled,uw as refreshReadOutputDeliveredCounts,Mv as refreshSearchArtifactsForMutation,ii as registerAgentProvenanceAdapters,SP as registerExternalDependencyResolver,oi as registerHarnessSignalDescriptors,HS as registerOutputMaterialFieldGroups,Ah as release,pw as rememberReadOutputFocusRows,yR as removeAssuranceDeclaration,dn as removeFileIfExists,ep as renameArtifactsResultKey,zu as renderCalendarMarkdown,Hu as renderCalendarToon,dm as renderContextMarkdown,nl as renderExtensionDescribeMarkdown,rl as renderExtensionSurfaceMarkdown,m_ as renderGuideMarkdown,fk as renderMissingOptionRetry,t0 as renderNextMarkdown,Tk as renderPmClosedDomainHelp,En as renderPmCommand,$o as renderPmCommandAliasMigrationHint,Fc as renderPmCommandVisibilityMarkdown,MD as renderPmFlagLexiconMarkdown,EN as renderPmMcpAppHtml,sD as renderPmRefusalClosureCensusMarkdown,AA as renderRowsAsCsv,vA as renderRowsAsTable,Ch as reopen,HA as replayHistoryToTarget,YE as replayToCanonicalItemDocument,WE as replayToItemDocument,$S as requireHistoryOperation,sM as requireTerminalReason,aM as requireTerminalReasonWithRecovery,qE as resealHistoryRewrite,KC as resetActiveExtensionRuntimeState,$l as resetWorkspaceGraphCache,Jn as resolveAgentSessionContextFromSignals,wl as resolveAnnotationIndex,Tl as resolveAnnotationInput,qS as resolveAuthor,fi as resolveAuthorIdentity,fA as resolveBodyFileContent,Iy as resolveBuiltinCorpusShape,qu as resolveCalendarOutputFormat,FP as resolveCanonicalPmErrorCodeContract,_C as resolveCanonicalRelationshipKind,BS as resolveClaimPrincipal,fS as resolveCliBulkIdsInput,qT as resolveCommandOptionPolicyState,pL as resolveCompileCacheGeneration,qM as resolveCompletionTimestamp,EC as resolveConfiguredPmPackageRoot,PP as resolveContentFieldFilters,lE as resolveContextIntentContract,Xu as resolveContextOutputFormat,Ju as resolveContextTokenBudget,cM as resolveCreateExplicitEmptyFlag,p0 as resolveEffectiveSearchMode,_v as resolveEmbeddingProviders,aC as resolveExtensionFlagValueContract,al as resolveExtensionInstallSourceIdentity,YT as resolveExtensionLongFlagName,vs as resolveExtensionMigrationStatePath,NC as resolveExtensionRoots,wP as resolveExternalDependencyReference,sC as resolveFlagValueKind,VT as resolveGlobalPmRoot,p_ as resolveGuideOutputFormat,lf as resolveHistoryEpisodeGroupIdentity,yS as resolveHistoryHashAlgorithm,DS as resolveHistoryOperation,fM as resolveHistoryProvenanceDimensions,hO as resolveHistorySubject,qA as resolveHistoryTarget,m0 as resolveHybridSemanticWeight,gn as resolveImplicitPmRoot,tC as resolveIsoOrRelative,dP as resolveItemBlockers,oP as resolveItemExecutionRole,K0 as resolveItemMutationDocument,ju as resolveItemOwnershipConflict,hn as resolveItemTypeRegistry,CS as resolveItemTypesFilePath,sk as resolveLifecycleVerbRecovery,KT as resolveLinkedResourcePositionalRecovery,Lf as resolveLinkedTestFailureExitCode,Wp as resolveLinkedTestSourceRef,Yp as resolveLinkedTestSourceWorkspaceRoot,Qp as resolveLinkedTestTrust,eu as resolveLinkedTestTrustBatch,Ng as resolveMcpAcknowledgedSubscriptionFilter,Je as resolveMcpRequestContext,qc as resolveMergeInstallContext,_k as resolveMisnestedCommandPath,OP as resolveMissingMetadataFilters,mk as resolveMissingOptionPlaceholder,JS as resolveModePairedOutputOmissionReceipt,ZM as resolveNextOutputFormat,ew as resolveOutputOmissionReceipt,wC as resolvePmCliVersion,Do as resolvePmCommandAlias,Ve as resolvePmCommandCapabilityFamily,Nt as resolvePmCommandExitContract,L as resolvePmCommandOperation,Ri as resolvePmCommandOutputBudget,xt as resolvePmCommandOutputEnvelope,DO as resolvePmCommandPositionalContract,An as resolvePmCommandScopeArgs,Ke as resolvePmCommandVisibilityTier,Mi as resolvePmDiagnosticOutputBudget,GP as resolvePmErrorCodeContract,Pb as resolvePmFlagSemanticConcept,Le as resolvePmHistoryOperation,Mx as resolvePmMcpExecutableInvocation,SC as resolvePmPackageRootFromModule,$O as resolvePmPositionalActionContract,pd as resolvePmPositionalActionFlagContracts,Ge as resolvePmRoot,cc as resolvePmToolCustomFieldCollision,bA as resolvePriority,Vt as resolveProfile,Vc as resolveProjectMergeTypeFolders,Hw as resolveQueryCursorStart,ak as resolveReadCompletenessControls,ck as resolveReadOptionRetryArgs,Iw as resolveReadOutputDimensions,Nw as resolveReadOutputEncoding,mw as resolveReadOutputRecoveryBudget,Aw as resolveReadOutputSurface,QS as resolveReadRowContract,uk as resolveRecoveryCommandName,lS as resolveRegisteredSearchProvider,pS as resolveRegisteredVectorStoreAdapter,Ld as resolveReproducibleProcessEnvironment,Fn as resolveRuntimeFieldRegistry,$n as resolveRuntimeStatusRegistry,hv as resolveSearchCorpusFields,l0 as resolveSearchMaxResults,h0 as resolveSearchPage,u0 as resolveSearchScoreThreshold,f0 as resolveSearchTuning,yv as resolveSemanticCorpusCharacterLimit,ku as resolveSemanticLineageIds,GA as resolveSettingsWithSemanticRuntimeDefaults,ER as resolveSourceContextWritePolicy,Gu as resolveStartTaskInProgressStatus,ee as resolveSubcommandFlagContractsForCommand,cT as resolveTelemetryErrorCategory,kv as resolveTelemetrySourceAttribution,iM as resolveTerminalReason,X0 as resolveTransactionSchema,BT as resolveTypeDefinition,jT as resolveTypeName,EA as resolveTypeSynonym,MA as resolveTypeWorkflows,Ol as resolveUnknownAuthorAcknowledgmentSelector,C0 as resolveVectorIndexRecovery,Tv as resolveVectorStores,Tc as resolveWorkspaceRelationshipKindRegistry,HT as resolveWorkspaceRoot,Ph as restore,iC as restoreCheckpointItems,mA as restoreWorkspaceJsonFromHistory,sf as restoreWorkspaceSnapshot,nf as restoreWorkspaceSnapshotWithRecovery,Jh as runAction,tS as runActiveBeforeMutationHooks,oS as runActiveCommandHandler,rS as runActiveOnIndexHooks,Dn as runActiveOnReadHooks,Ln as runActiveOnWriteHooks,nS as runActiveParserOverride,iS as runActivePreflightOverride,sS as runActiveServiceOverride,Ku as runActivity,xC as runAfterCommandHooks,$m as runAggregate,Sl as runAnnotationCommand,du as runAppend,HI as runAssuranceAction,VI as runAssuranceDispatch,kC as runBeforeCommandHooks,Vu as runCalendar,mm as runClaim,fm as runClaimNext,lu as runClose,pu as runCloseMany,ym as runCloseTask,Ml as runComments,f_ as runCompletion,kl as runConfig,Bt as runContext,kM as runContextEvaluationCorpus,IM as runContextEvaluationScenario,uu as runCopy,Iu as runCreate,Mu as runDelete,Fl as runDeps,tp as runDocs,WR as runDuplicates,Wm as runEval,Xm as runEvent,dl as runExtension,Is as runExtensionMigrateAction,Rs as runExtensionMigrations,cp as runFiles,pp as runFilesDiscover,lp as runFilesLookup,Tf as runFleetAttributionAnalytics,Fu as runFocus,iu as runGc,Fm as runGet,zp as runGraph,u_ as runGuide,Hp as runHealth,c0 as runHistory,oM as runHistoryAttest,WI as runHistoryCompact,JI as runHistoryCompactBulk,PI as runHistoryMaintenance,ZI as runHistoryRedact,II as runHistoryRepair,kI as runHistoryRepairAll,fl as runInit,pl as runInitAgentGuidance,au as runLearnings,Ql as runLinkedArtifacts,Df as runLinkedTests,Mc as runList,Ym as runMeet,A0 as runMergeDriver,Yc as runMergeInstall,TI as runMergeReceiptEvidenceReport,bI as runMergeReceiptReport,v0 as runMergeReconcile,pm as runNext,wm as runNotes,gm as runPauseTask,Tm as runPlan,km as runProfileApply,Mm as runProfileLint,Rm as runProfileList,Im as runProfileShow,yf as runProvenanceCoverageAnalytics,Uk as runRegisteredCommandForTest,Hk as runRegisteredCommandOverrideForTest,Zk as runRegisteredExporterForTest,Bk as runRegisteredHookForTest,Jk as runRegisteredImporterForTest,Xk as runRegisteredMigrationForTest,jk as runRegisteredMutationGuardForTest,qk as runRegisteredParserOverrideForTest,zk as runRegisteredPreflightOverrideForTest,Vk as runRegisteredRendererOverrideForTest,Wk as runRegisteredSearchProviderForTest,Kk as runRegisteredServiceOverrideForTest,Yk as runRegisteredVectorStoreAdapterForTest,er as runReindex,_m as runRelease,Jm as runRemind,pM as runReopen,Cm as runRestore,Qc as runSchemaEvolutionMigration,Gm as runSearch,xy as runSearchRefreshWorkerEntrypoint,__ as runStartBackgroundRun,hm as runStartTask,vf as runStats,Pf as runTelemetry,Om as runTemplatesList,vm as runTemplatesSave,Pm as runTemplatesShow,$f as runTest,Ff as runTestAll,h_ as runTestRunsList,y_ as runTestRunsLogs,T_ as runTestRunsResume,g_ as runTestRunsStatus,b_ as runTestRunsStop,C_ as runTestRunsWorker,Uu as runUpdate,Sm as runUpdateMany,Ut as runUpgrade,nu as runValidate,Xh as runWithActiveExtensions,D as runWithAgentSessionContext,NA as runWithConfigurationOnlySettings,dE as runWithContextIntentContracts,_O as runWithDiscoveredContextIntentContracts,ai as runWithHarnessDetectionSignals,_N as runWithMcpTraceContext,$d as runWithReproducibleProcessEnvironment,di as runWithWorkspaceHarnessSignalDescriptors,zr as runWithWorkspaceRecipe,NR as runWorkflowPolicyAction,KI as runWorkspaceTransactionGc,jp as saveGraphAuditBaseline,DI as scanClosureTimestamps,tI as scanExtensionHostVersions,Al as scanHistoryAuthorAttribution,zn as scanItemFormatVersions,us as scanMutationSecrets,nI as scanProvenanceResolverHealth,ws as scanStaleInProgressItems,GI as scanStorageIntegrity,q_ as schema,X_ as schemaAddField,W_ as schemaAddStatus,V_ as schemaAddType,eh as schemaApplyPreset,th as schemaInferTypes,z_ as schemaList,Z_ as schemaListFields,nh as schemaRemapStatus,J_ as schemaRemoveField,Y_ as schemaRemoveStatus,K_ as schemaRemoveType,oh as schemaRenameField,rh as schemaRenameType,H_ as schemaShow,Q_ as schemaShowField,ih as schemaShowStatus,hk as scoreCommandPathMatch,vM as scoreContextCandidates,OM as scoreContextCandidatesWithActiveExtensions,Ts as scoreItemSimilarity,TD as scorePmGrammarRefusalClosure,cD as scorePmRefusalClosure,Cs as scorePreparedItemSimilarity,wD as scoreTrackerPreflightRecoveryClosure,jE as sealHistoryRecord,Dx as sealMcpRequestState,A_ as search,XM as searchWorkspaceMemory,JM as searchWorkspaceMemoryReadResult,lP as selectActionableEntries,Gw as selectCursorSemanticOptions,a_ as selectImportAuthor,lN as selectMcpClientRegistrationMode,YM as selectWorkspaceMemory,WM as selectWorkspaceMemoryRollups,$u as semanticAttributionAffinity,Kv as sentryCaptureCliError,Hv as sentryDiscardCommandSpan,Vv as sentryFinishCommandSpan,Yv as sentryFlush,Wv as sentryLogCliUsageError,qv as sentrySetCommandContext,zv as sentryStartCommandSpan,Wn as serializeItemDocument,Ck as serializeNdjsonRows,Sk as serializeNdjsonStream,Sy as serveDeclaredObservation,WC as setActiveCommandContext,YC as setActiveCommandResult,jC as setActiveExtensionCommands,UC as setActiveExtensionHooks,BC as setActiveExtensionParsers,qC as setActiveExtensionPreflight,VC as setActiveExtensionRegistrations,HC as setActiveExtensionRenderers,zC as setActiveExtensionServices,US as setFocusedItem,oO as settingsSectionRevision,rO as shouldCompletePlanOnClose,Gp as shouldPersistDurableGraphCache,NT as shouldResolveMutationStdinTokenField,xT as shouldResolveMutationStdinTokens,jA as shouldRunSearchRefreshInForeground,rp as similarityAdvisoryWarnings,rw as sliceReadOutputRowCollection,ns as snapshotPmCliErrorContext,Xl as sortLinkedArtifacts,wT as splitAcceptanceCriteria,Qv as splitCommaList,Kn as splitFrontMatter,Mw as stabilizeReadOutputReceiptEstimates,R as stableStringify,V0 as stableUpsertValue,lT as stableValueEquals,Ih as startTask,aO as startTelemetryCommand,R_ as stats,wS as statusIsTerminal,fd as stripGlobalBootstrapTokens,R0 as subscribeMutationEventBatches,I0 as subscribeMutationEvents,qR as summarizeAgentIdentityVocabulary,uf as summarizeAgentModelProvenance,mf as summarizeAgentProvenance,MM as summarizeContextEvaluationReports,Mf as summarizeContextPreflight,bM as summarizeHistoryProvenance,ul as summarizeInitResult,_I as summarizeMergeReceipt,lM as supportsCreateExplicitEmpty,HO as supportsItemIdAlias,TC as suppressHostOutput,Pe as syncRelationshipGraphAdapter,kk as synthesizeExtensionManifest,ud as toCompletionFlagString,sm as toContextFocusItem,om as toContextPackingSummary,nm as toContextRankingSummary,JT as toErrorMessage,Vf as toEstimatedMinutesValue,U0 as toExtensionFlagDefinitions,Jf as toImportBoolean,t_ as toImportConfidence,Xf as toImportInteger,i_ as toImportLinkedDocs,n_ as toImportLinkedFiles,s_ as toImportLinkedTests,o_ as toImportLogEntries,r_ as toImportNormalizedEnum,e_ as toImportNumberMap,Kf as toImportPriority,Yf as toImportStatus,Zf as toImportStringList,Qf as toImportStringMap,Wf as toImportTags,IS as toItemRecord,Hf as toNonEmptyImportString,XT as toNonEmptyStringOrUndefined,XE as toReplayDocument,PE as toWellFormedText,ys as tokenizeSimilarityText,kT as transferMutationStdinTokenPolicy,IC as translateHostEnvironmentFault,Th as update,Rf as updateLinkedTest,Wh as upgrade,ph as validate,aR as validateAssertionDefinition,cR as validateAssuranceDocument,dR as validateGateDefinition,Y0 as validateItemMutationRows,Zl as validateLinkedPaths,pN as validateMcpAuthorizationResponseIssuer,cN as validateMcpAuthorizationServerMetadata,uN as validateMcpClientMetadataDocument,tN as validateMcpHttpRequestHeaders,Ux as validateMcpJsonSchema,sR as validateMeasurementDefinition,gA as validateMissingParentReference,vw as validateReadOutputOptions,SA as validateSprintOrReleaseValue,zT as validateTypeOptions,PO as validateWorkspaceTransactionIdentity,rM as verifyAttestation,LP as verifyCliFlagInvocationParity,UO as verifyExplicitPositionalSlotCensus,QE as verifyHistoryChain,ZE as verifyHistoryChainWithVersion,gO as verifyHistoryEntries,BE as verifyHistoryRecordHash,zE as verifyHistoryRewriteEvidence,zO as verifyPmCliGrammar,qO as verifyPmCommandPositionalContracts,ID as verifyPmFlagLexicon,eD as verifyPmRecoveryKindRuntimeCoverage,yb as verifyPmRecoveryProducerRuntimeCoverage,QL as verifyPmRecoveryReferences,nD as verifyPmRefusalClosureIdentityRatchet,oD as verifyPmRefusalClosureRatchet,ZL as verifyPmRefusalReachability,zd as verifyToolOptionCliParity,TA as withCliMutationInput,Ms as withFlagAliasMetadata,MC as withHostEnvironmentBoundary,CA as withLiteralMutationInput,Gx as withMcpCachePolicy,$i as withoutGenericRefusalExamples,yT as workflowApprovalFingerprint,bT as workflowPolicyApplies,gT as workflowPolicyFingerprint,Dl as workspaceGraphCache,MO as workspaceTransactionPlanDigest,Cl as wrapOwnershipConflict,jv as wrapThrownErrorForSentry,ui as writeAuthorEnvironment,Fe as writeFileAtomic,oC as writeMutationCheckpoint,FA as writeSettings,iO as writeSettingsSection,ME as writeStderr,IE as writeStdout,Iv as writeVectorizationStatusLedger,pA as writeWorkspaceJsonWithHistory};
30
+ `)).digest("hex").slice(0,16)}#r(t,r){if(!t)return 0;try{let o=JSON.parse(Buffer.from(t,"base64url").toString("utf8"));return(typeof o!="object"||o===null||!("fingerprint"in o)||o.fingerprint!==this.#t||!("scope"in o)||o.scope!==r||!("offset"in o)||!Number.isInteger(o.offset)||Number(o.offset)<0)&&C("Skill cursor is invalid or stale."),Number(o.offset)}catch(o){if(o instanceof u)throw o;return C("Skill cursor is invalid or stale.")}}#o(t,r){return Buffer.from(JSON.stringify({fingerprint:this.#t,offset:t,scope:r})).toString("base64url")}static async load(t){let r=await Fr(M.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=M.resolve(t.packageRoot,".agents","skills"),n=M.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await Fr(n,"workspace",t.packageVersion);for(let[i,a]of s)r.set(i,a)}}return new e(r)}list(t={}){let r=t.limit??P.defaultPageSize;Dr.has(r)||C(`Skill list limit must be an integer from 1 to ${P.maxPageSize}.`);let o=this.#r(t.cursor,"skills/list"),n=[...this.#e.values()].sort((d,c)=>d.uri.localeCompare(c.uri)),s=n.slice(o,o+r),i=o+s.length,a=i<n.length;return{skills:s.map(Gr),hasMore:a,...a?{nextCursor:this.#o(i,"skills/list")}:{}}}get(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/SKILL\.md$/u.exec(t),o=r?this.#e.get(r[1]):void 0;return o||C(`Unknown pm MCP skill: ${t}.`,{field:"uri"}),Gr(o)}read(t){let r=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)\/(.+)$/u.exec(t),o=r?this.#e.get(r[1]):void 0,n=r?.[2]??"",s=o&&n?o.files.get(n):void 0,i=o?.resources.find(c=>c.uri===t);(!o||!s||!i)&&C(`Unknown pm MCP skill resource: ${t}.`,{field:"uri"});let a={digest:i.digest,origin:o._meta.origin,trust:"untrusted"},d=$r(n,s);return d!=="application/octet-stream"?{contents:[{uri:t,mimeType:d,text:s.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:d,blob:s.toString("base64"),_meta:a}]}}readDirectory(t,r={}){let o=/^skill:\/\/([a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(.+))?$/u.exec(t),n=o?this.#e.get(o[1]):void 0;n||C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let s=(o?.[2]??"").replace(/\/$/u,""),i=s.length>0?`${s}/`:"",a=`skill://${o[1]}`,d=new Map;for(let T of n.resources){let E=T.uri.slice(`${a}/`.length);if(!E.startsWith(i))continue;let q=E.slice(i.length),[R,...vo]=q.split("/"),Oo=`${a}/${i}${R}`,Ro=n.files.get(`${i}${R}`);d.set(R,{uri:Oo,name:R,mimeType:vo.length>0?"inode/directory":$r(R,Ro)})}s.length>0&&d.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let c=r.limit??P.maxPageSize;Dr.has(c)||C(`Skill directory limit must be an integer from 1 to ${P.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...d.values()].sort((T,E)=>T.uri.localeCompare(E.uri)),f=p.slice(l,l+c),_=l+f.length,g=_<p.length;return{resources:f,hasMore:g,...g?{nextCursor:this.#o(_,t)}:{}}}};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38023567-8a5b-5e25-8d71-5112f74d1894")}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]="2b24276b-948b-50bd-bfd9-f429cd74be70")}catch{}})();var qr="https://schema.unbrained.dev/pm/workspace-recipe/v1";function dt(e,t){if(e===null||typeof e=="boolean"||typeof e=="string")return e;if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`Workspace recipe JSON number must be finite at ${t}`);return e}if(Array.isArray(e))return Object.freeze(e.map((r,o)=>dt(r,`${t}[${o}]`)));if(typeof e!="object"||Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw new Error(`Workspace recipe input must contain JSON values at ${t}`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([r,o])=>[r,dt(o,`${t}.${r}`)])))}function ve(e){if(e.schema!==qr)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=Et(e);if(e.operations.some(r=>r.action.trim().length===0||r.input===null||Array.isArray(r.input)))throw new Error("Workspace recipe operations require an action and object input");return Object.freeze({...t,operations:Object.freeze(e.operations.map((r,o)=>Object.freeze({action:r.action,input:dt(r.input,`operations[${o}].input`)})))})}async function zr(e,t){let r=ve(e);return St(r,t)}async function Py(e,t){return zr(e,async()=>{let r=[];for(let[o,n]of e.operations.entries())r.push(await t(n,o));return r})}(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]="c234be1c-35b7-5388-8a70-a012e9a34389")}catch{}})();var Hr="pm.agent-observation/v1",Vr="pm.agent-verdict/v1",Kr="pm.agent-episode/v1";function O(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`${t} must be a positive safe integer.`)}function k(e,t){if(e.trim().length===0)throw new Error(`${t} must not be empty.`)}function ne(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))ne(t)}return e}function My(e){if(e.length===0)throw new Error("observation.reads must declare at least one bounded read.");let t=0;for(let r of e)if(k(r.command,"observation.reads.command"),O(r.budget_tokens,"observation.reads.budget_tokens"),t+=r.budget_tokens,!Number.isSafeInteger(t))throw new Error("observation read ceilings exceed safe integer range.")}function ky(e){if(e.basis!=="emitted_bytes")throw new Error("observation calibration must use emitted_bytes.");for(let r of e.samples)if(!Number.isSafeInteger(r)||r<0)throw new Error("observation calibration samples must be non-negative safe integers.");if(e.samples.length===0)throw new Error("observation calibration must include at least one sample.");if(O(e.expected_emitted_bytes,"observation.calibration.expected_emitted_bytes"),!Number.isSafeInteger(e.tolerance_bytes)||e.tolerance_bytes<0)throw new Error("observation.calibration.tolerance_bytes must be a non-negative safe integer.");let t=e.samples.reduce((r,o)=>r+o,0)/e.samples.length;if(Math.abs(t-e.expected_emitted_bytes)>e.tolerance_bytes)throw new Error("observation expected_emitted_bytes is outside the calibrated sample tolerance.")}function xy(e){if(e.length===0)throw new Error("observation.tiers must declare a degradation ladder.");let t=new Set,r=Number.POSITIVE_INFINITY;for(let o of e){if(k(o.id,"observation.tiers.id"),O(o.max_tokens,"observation.tiers.max_tokens"),t.has(o.id))throw new Error(`Duplicate observation tier: ${o.id}.`);if(t.add(o.id),o.max_tokens>r)throw new Error("observation tiers must be ordered from largest to smallest max_tokens.");r=o.max_tokens;let n=new Set;for(let s of o.fields){if(F(s,"observation.tiers.fields"),n.has(s))throw new Error(`Duplicate observation tier field: ${s}.`);n.add(s)}}}function Ny(e){if(e.schema!==Hr)throw new Error(`observation.schema must be ${Hr}.`);return k(e.id,"observation.id"),O(e.version,"observation.version"),My(e.reads),ky(e.calibration),e.corpus_dependence.kind==="bounded"&&(k(e.corpus_dependence.dimension,"observation.corpus_dependence.dimension"),O(e.corpus_dependence.maximum,"observation.corpus_dependence.maximum")),xy(e.tiers),ne(structuredClone(e))}function rL(e){return{contract_id:e.id,contract_version:e.version,guaranteed_ceiling_tokens:e.reads.reduce((t,r)=>t+r.budget_tokens,0),expected_emitted_bytes:e.calibration.expected_emitted_bytes,expected_tokens:Math.ceil(e.calibration.expected_emitted_bytes/4),tolerance_bytes:e.calibration.tolerance_bytes,calibration_basis:"emitted_bytes",corpus_dependence:e.corpus_dependence}}async function Ly(e,t,r){O(r.budget_tokens,"observation request budget_tokens");let o=[];for(let[n,s]of e.tiers.entries()){o.push(s.id);let i=await t(s),a=Buffer.byteLength(I(i),"utf8"),d=Math.ceil(a/4);if(d<=Math.min(r.budget_tokens,s.max_tokens))return{status:"served",payload:i,receipt:{contract_id:e.id,contract_version:e.version,served_tier:s.id,degraded:n>0,attempted_tiers:o,emitted_bytes:a,estimated_tokens:d,calibration_basis:"emitted_bytes"}}}return{status:"refused",reason:"no_declared_tier_fits_budget",receipt:{contract_id:e.id,contract_version:e.version,served_tier:null,degraded:e.tiers.length>1,attempted_tiers:o,emitted_bytes:null,estimated_tokens:null,calibration_basis:"emitted_bytes"}}}function F(e,t){let r=e.split(".");if(r.some(o=>o.length===0||o==="__proto__"||o==="prototype"||o==="constructor"))throw new Error(`${t} must be a safe, non-empty dot-separated path.`);return r}function Wr(e,t){let r=e;for(let o of F(t,"recorded field path")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function Dy(e){return`/${F(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function $y(e){if(e.kind!=="field_equals")return;let t;try{t=JSON.stringify(e.expected)}catch{throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}if(t===void 0)throw new Error(`Expected value for verdict predicate ${e.id} must be JSON serializable.`)}function Fy(e){if(e.schema!==Vr)throw new Error(`verdict.schema must be ${Vr}.`);k(e.id,"verdict.id"),O(e.version,"verdict.version");let t=new Set;for(let o of e.predicates){k(o.id,"verdict.predicates.id"),F(o.path,"verdict.predicates.path");let n=o.kind;if(n!=="field_equals"&&n!=="field_present"&&n!=="field_absent")throw new Error(`Unsupported verdict predicate kind for ${o.id}.`);if(t.has(o.id))throw new Error(`Duplicate verdict predicate: ${o.id}.`);$y(o),t.add(o.id)}if(e.composition.operator!=="all"&&e.composition.operator!=="any")throw new Error("verdict composition operator must be all or any.");if(e.composition.predicate_ids.length!==e.predicates.length)throw new Error("verdict composition must reference every predicate exactly once.");let r=new Set(e.composition.predicate_ids);if(r.size!==e.composition.predicate_ids.length||[...r].some(o=>!t.has(o)))throw new Error("verdict composition contains duplicate or unknown predicate ids.");return ne(structuredClone(e))}function Gy(e,t){if(e.predicates.length===0)return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:"not_applicable",score:null,policy:"verdict_only_no_reward",reason:"no_predicates_declared",predicates:[]};let r=new Map(e.predicates.map(i=>[i.id,i])),o=e.composition.predicate_ids.map(i=>{let a=r.get(i),d=Wr(t.state,a.path),c=a.kind==="field_present"?d!==void 0:a.kind==="field_absent"?d===void 0:I(d)===I(a.expected);return{id:i,outcome:c?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${Dy(a.path)}`,evidence_digest:yt(I(d))}}),n=o.filter(i=>i.outcome==="satisfied").length,s=e.composition.operator==="all"?n===o.length:n>0;return{contract_id:e.id,contract_version:e.version,snapshot_id:t.snapshot_id,outcome:s?"satisfied":"violated",score:n/o.length,policy:"verdict_only_no_reward",predicates:o}}function oL(e){if(e.schema!==Kr)throw new Error(`episode.schema must be ${Kr}.`);if(k(e.id,"episode.id"),O(e.version,"episode.version"),!["benchmark","evaluation","training","scale_transfer"].includes(e.mode))throw new Error("episode.mode is not supported.");if(e.task_item_ids.length===0)throw new Error("episode.task_item_ids must declare at least one pm item.");for(let t of e.task_item_ids)k(t,"episode.task_item_ids");O(e.limits.max_actions,"episode.limits.max_actions"),O(e.limits.max_observations,"episode.limits.max_observations"),O(e.limits.max_tokens_per_observation,"episode.limits.max_tokens_per_observation");for(let t of e.observable_fields)F(t,"episode.observable_fields");for(let t of e.withheld_fields)F(t,"episode.withheld_fields");for(let t of e.observable_fields){let r=e.withheld_fields.find(o=>t===o||t.startsWith(`${o}.`)||o.startsWith(`${t}.`));if(r!==void 0)throw new Error(`Observable field ${t} overlaps withheld field ${r}.`)}for(let t of e.observation.tiers)for(let r of t.fields)if(!e.observable_fields.includes(r))throw new Error(`Observation tier field ${r} is not declared observable.`);return Ny(e.observation),Fy(e.verdict),ve(e.recipe),ne(structuredClone(e))}function Uy(e,t,r){let o=F(t,"observation projection field"),n=e;for(let[s,i]of o.entries()){if(s===o.length-1){r!==void 0&&(n[i]=structuredClone(r));return}let a=n[i];(a===null||typeof a!="object"||Array.isArray(a))&&(n[i]={}),n=n[i]}}function jy(e,t){let r={};for(let o of t)Uy(r,o,Wr(e,o));return r}async function nL(e,t){let r=[],o=0,n=0,s=!1,i,a={episode:{id:e.id,label:`pm agent environment v${e.version}`},provenance:{role:e.mode,topic:"agent-environment"}},d=await D(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:d.state_id});let c=async()=>{if(s)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let p=await t.readRecordedState(),f=await Ly(e.observation,async _=>jy(p.state,_.fields),{budget_tokens:e.limits.max_tokens_per_observation});return r.push({sequence:r.length+1,kind:"observation",state_id:f.receipt.served_tier??p.snapshot_id}),f},l=async(p=!1)=>{if(s&&!p)throw new Error("episode is already closed.");if(n>=e.limits.max_observations)throw new Error("episode exceeded limits.max_observations.");n+=1;let f=await t.readRecordedState(),_=Gy(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),_};return{observe:()=>D(a,c),step:async p=>{if(s)throw new Error("episode is already closed.");if(o>=e.limits.max_actions)throw new Error("episode exceeded limits.max_actions.");o+=1;let f=await D(a,()=>t.execute(p));return r.push({sequence:r.length+1,kind:"action",state_id:f.state_id}),f},score:()=>D(a,l),close:()=>i!==void 0?i:s?Promise.reject(new Error("episode is already closed.")):(s=!0,i=D(a,()=>l(!0)).then(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:ne(structuredClone(r))})).catch(p=>{throw s=!1,p}).finally(()=>{i=void 0}),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]="14472bc2-ebca-5b9c-9462-bd8694b630a0")}catch{}})();var G="https://schema.unbrained.dev/pm/corpus-shape/v1";function K(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError(`Corpus shape ${t} must be a positive safe integer`);return e}function ie(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Xr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Xr(t);Object.freeze(e)}}function W(e){if(e.schema!==G)throw new TypeError(`Unsupported corpus shape schema: ${e.schema}`);if(e.name.trim().length===0||e.description.trim().length===0)throw new TypeError("Corpus shape name and description must be non-empty");if(K(e.hierarchy_depth,"hierarchy_depth"),K(e.hierarchy_fanout,"hierarchy_fanout"),ie(e.age_span_days,"age_span_days"),K(e.history_entries_per_item,"history_entries_per_item"),ie(e.comments_per_100_items,"comments_per_100_items"),ie(e.notes_per_100_items,"notes_per_100_items"),ie(e.learnings_per_100_items,"learnings_per_100_items"),K(e.author_cardinality,"author_cardinality"),K(e.component_count,"component_count"),e.edge_kind_mix.length===0||e.edge_kind_mix.some(r=>r.kind.trim().length===0||r.weight<=0))throw new TypeError("Corpus shape edge_kind_mix requires non-empty kinds with positive weights");if(e.terminal_statuses.some(r=>!e.custom_statuses.includes(r)))throw new TypeError("Corpus shape terminal_statuses must be declared in custom_statuses");let t=structuredClone(e);return Xr(t),t}var Oe=[{kind:"implements",weight:5},{kind:"blocked_by",weight:2},{kind:"discovered_from",weight:2},{kind:"verifies",weight:2},{kind:"supersedes",weight:1},{kind:"related",weight:4}],Y=Object.freeze({scratch:W({schema:G,name:"scratch",description:"Seconds-old, shallow project with minimal history.",hierarchy_depth:2,hierarchy_fanout:50,age_span_days:0,history_entries_per_item:1,comments_per_100_items:2,notes_per_100_items:1,learnings_per_100_items:1,edge_kind_mix:[{kind:"related",weight:1}],author_cardinality:2,component_count:1,include_cycles:!1,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),representative:W({schema:G,name:"representative",description:"Medium-lived project with rich evidence and typed lineage.",hierarchy_depth:5,hierarchy_fanout:8,age_span_days:730,history_entries_per_item:12,comments_per_100_items:30,notes_per_100_items:12,learnings_per_100_items:10,edge_kind_mix:Oe,author_cardinality:32,component_count:1,include_cycles:!1,custom_types:["Experiment"],custom_statuses:["review"],terminal_statuses:[],custom_fields:["domain"]}),"deep-graph":W({schema:G,name:"deep-graph",description:"Deep typed relationship graph with deterministic cycles.",hierarchy_depth:16,hierarchy_fanout:2,age_span_days:3650,history_entries_per_item:6,comments_per_100_items:15,notes_per_100_items:8,learnings_per_100_items:8,edge_kind_mix:Oe,author_cardinality:16,component_count:1,include_cycles:!0,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),"multi-decade":W({schema:G,name:"multi-decade",description:"Thirty-year event history with dense per-item evolution.",hierarchy_depth:6,hierarchy_fanout:6,age_span_days:10958,history_entries_per_item:24,comments_per_100_items:40,notes_per_100_items:20,learnings_per_100_items:16,edge_kind_mix:Oe,author_cardinality:64,component_count:1,include_cycles:!1,custom_types:["Program"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["portfolio"]}),"disconnected-archive":W({schema:G,name:"disconnected-archive",description:"Multiple disconnected historical project components.",hierarchy_depth:4,hierarchy_fanout:10,age_span_days:7305,history_entries_per_item:8,comments_per_100_items:10,notes_per_100_items:5,learnings_per_100_items:6,edge_kind_mix:Oe,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function By(){return Object.keys(Y).sort().map(e=>Y[e])}function qy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(Y,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(Y).join(", ")}`);return Y[t]}var Yr=new WeakMap;function Jr(e,t){if(e===0)return[];let r=Yr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Yr.set(t,r));let o=[r[e%r.length]];return t.include_cycles&&e>2&&e%17===0&&o.push("related"),[...new Set(o)]}function zy(e,t,r,o=42){if(ie(t,"item index"),K(r,"item count"),t>=r)throw new RangeError(`Corpus item index ${t} exceeds ${r}`);let n=Math.min(e.component_count,r),s=t%n,i=Math.floor(t/n),a=0,d=1;for(let E=0;E<e.hierarchy_depth;E+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+d),d=Math.min(Number.MAX_SAFE_INTEGER,d*e.hierarchy_fanout);let c=i%a,l=i-c,p=c===0?void 0:s+(l+Math.floor((c-1)/e.hierarchy_fanout))*n,f=Date.UTC(2026,0,1),_=e.age_span_days*864e5,g=new Date(f+(r===1?0:Math.round(t/(r-1)*_))).toISOString(),T=(t*37+o)%100;return{index:t,id:`pm-s${t.toString(36).padStart(7,"0")}`,...p===void 0?{}:{parent:`pm-s${p.toString(36).padStart(7,"0")}`},component:s,timestamp:g,author:`pm-corpus-agent-${(t+o)%Math.min(e.author_cardinality,r)}`,history_entry_count:e.history_entries_per_item,dependency_kinds:Jr(t,e),has_comment:T<e.comments_per_100_items,has_note:T<e.notes_per_100_items,has_learning:T<e.learnings_per_100_items,...e.custom_types.length>0&&t%11===0?{custom_type:e.custom_types[t%e.custom_types.length]}:{},...e.custom_statuses.length>0&&t%13===0?{custom_status:e.custom_statuses[t%e.custom_statuses.length]}:{}}}var ct=class{shape;authors=new Set;components=new Set;depths=new Map;childCounts=new Map;edgeKinds={};expectedEdgeKinds={};annotations={comments:0,notes:0,learnings:0};annotationFields;planMismatches=[];itemCount=0;observedDepth=0;observedFanout=0;historyEntryCount=0;firstTimestamp=null;lastTimestamp=null;constructor(t){this.shape=t,this.annotationFields=[["comments","has_comment",t.comments_per_100_items],["notes","has_note",t.notes_per_100_items],["learnings","has_learning",t.learnings_per_100_items]]}recordMismatch(t,r){t&&this.planMismatches.push(r)}recordEdgeKinds(t,r){for(let o of r)t[o]=(t[o]??0)+1}add(t){this.itemCount+=1,this.authors.add(t.author),this.components.add(t.component),this.recordMismatch(this.depths.has(t.id),`duplicate_id:${t.id}`);let r=1;if(t.parent!==void 0){let o=this.depths.get(t.parent);this.recordMismatch(o===void 0,`parent_missing:${t.parent}`),r=(o??0)+1;let n=(this.childCounts.get(t.parent)??0)+1;this.childCounts.set(t.parent,n),this.observedFanout=Math.max(this.observedFanout,n)}this.depths.set(t.id,r),this.observedDepth=Math.max(this.observedDepth,r),this.historyEntryCount+=t.history_entry_count,this.recordMismatch(t.history_entry_count!==this.shape.history_entries_per_item,"history_entries_per_item:drift"),this.firstTimestamp=this.firstTimestamp===null||t.timestamp<this.firstTimestamp?t.timestamp:this.firstTimestamp,this.lastTimestamp=this.lastTimestamp===null||t.timestamp>this.lastTimestamp?t.timestamp:this.lastTimestamp;for(let[o,n]of this.annotationFields)this.annotations[o]+=Number(t[n]);this.recordEdgeKinds(this.edgeKinds,t.dependency_kinds),this.recordEdgeKinds(this.expectedEdgeKinds,Jr(t.index,this.shape))}finish(){let t=Math.min(this.shape.author_cardinality,this.itemCount),r=Math.min(this.shape.component_count,this.itemCount),o=[...this.planMismatches,...this.itemCount===0?["item_count:empty"]:[],...this.authors.size===t?[]:[`author_count:${this.authors.size}!=${t}`],...this.components.size===r?[]:[`component_count:${this.components.size}!=${r}`],...this.observedDepth<=this.shape.hierarchy_depth?[]:[`hierarchy_depth:${this.observedDepth}>${this.shape.hierarchy_depth}`],...this.observedFanout<=this.shape.hierarchy_fanout?[]:[`hierarchy_fanout:${this.observedFanout}>${this.shape.hierarchy_fanout}`]];for(let[i,,a]of this.annotationFields){let d=Math.floor(this.itemCount/100),c=this.itemCount%100,l=d*a+Math.max(0,a+c-100),p=d*a+Math.min(a,c),f=this.annotations[i];(f<l||f>p)&&o.push(`${i}:${f}!in[${l},${p}]`)}let n=new Set([...Object.keys(this.edgeKinds),...Object.keys(this.expectedEdgeKinds)]);for(let i of[...n].sort()){let a=this.edgeKinds[i]??0,d=this.expectedEdgeKinds[i]??0;a!==d&&o.push(`edge_kind:${i}:${a}!=${d}`)}let s=[...new Set(o)];return{shape:this.shape.name,item_count:this.itemCount,author_count:this.authors.size,component_count:this.components.size,hierarchy_depth:this.observedDepth,hierarchy_fanout:this.observedFanout,timestamp_range:{first:this.firstTimestamp,last:this.lastTimestamp},history_entry_count:this.historyEntryCount,annotations:{...this.annotations},edge_kinds:{...this.edgeKinds},matches_declaration:s.length===0,mismatches:s}}};function Zr(e){return new ct(e)}function Hy(e,t){let r=Zr(e);for(let o of t)r.add(o);return r.finish()}(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]="48d03e9b-14a4-545c-8e5d-5f5f2092a113")}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]="6a6b2905-b6b7-5b46-b87d-8b8287e37745")}catch{}})();async function Vy(){let e=Ge(process.cwd(),process.env.PM_PATH);await vt(e,(t,r)=>Ot(t,r,{apply_runtime_defaults:!0}))}(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]="4534b1c9-de27-5745-88f2-641b00b94714")}catch{}})();async function Ky(){await Rt()}(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]="c1cb8d82-20a6-5460-a0ff-f55312911218")}catch{}})();var Qr=["lines","branches","functions","statements"];function Wy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function Yy(e,t,r){if(typeof r!="object"||r===null||Array.isArray(r))throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);let o=r;if(typeof o.covered!="number"||typeof o.total!="number"||!Number.isInteger(o.covered)||!Number.isInteger(o.total)||o.covered<0||o.total<o.covered)throw new TypeError(`Coverage entry ${e} has invalid ${t} counts.`);return{covered:o.covered,total:o.total}}function Xy(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("Coverage summary must be a JSON object.");if(!("total"in e))throw new TypeError("Coverage summary is missing the total entry.");let t=[];for(let[r,o]of Object.entries(e)){Wy(r,o);for(let n of Qr){let s=Yy(r,n,o[n]),i=s.total-s.covered;i>0&&t.push({file:r,metric:n,uncovered:i,...s})}}return t}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7e55d416-9cc3-51c5-8e56-6b5fd5c836a9")}catch{}})();var Jy=["captured_redacted","captured_verbatim"],Zy=[{label:"home directory",pattern:/(?:\/home\/|\/Users\/)[^/\s"']+/u},{label:"GitHub token",pattern:/\b(?:gh[oprsu]_[A-Za-z0-9_]{20,})\b/u},{label:"npm token",pattern:/\bnpm_[A-Za-z0-9]{20,}\b/u},{label:"private key",pattern:/-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u}];function v(e){return typeof e=="string"&&e.trim().length>0}function Qy(e,t){if(typeof t!="object"||t===null||Array.isArray(t))return[{boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} must contain a JSON object.`}];let r=t,o=[];r.boundary_id!==e.id&&o.push({boundary_id:e.id,kind:"fixture_boundary_mismatch",detail:`${e.fixture_path} names ${String(r.boundary_id)} instead of ${e.id}.`}),(r.version!==1||!Jy.includes(r.capture_source)||!v(r.capture_provenance)||!Array.isArray(r.redactions)||!r.redactions.every(v)||!("input"in r)||!("observed"in r))&&o.push({boundary_id:e.id,kind:"invalid_fixture",detail:`${e.fixture_path} lacks captured provenance, redaction metadata, input, or observed output.`});let n=JSON.stringify(t);for(let s of Zy)s.pattern.test(n)&&o.push({boundary_id:e.id,kind:"unsafe_fixture",detail:`${e.fixture_path} contains a possible ${s.label}.`});return o}function eb(e,t){let r=Date.parse(e.waiver_expires_at),o=v(e.waiver_reason)&&v(e.waiver_owner)&&e.waiver_expires_at.endsWith("Z")&&_e(e.waiver_expires_at)&&Number.isFinite(r);return{captured:0,waived:o&&r>=t?1:0,findings:o?r<t?[{boundary_id:e.id,kind:"expired_waiver",detail:`Boundary ${e.id} waiver expired at ${e.waiver_expires_at}.`}]:[]:[{boundary_id:e.id,kind:"invalid_waiver",detail:`Boundary ${e.id} waiver requires reason, owner, and an RFC 3339 UTC expiry.`}]}}function tb(e,t,r){if(!v(e.id)||!v(e.producer)||!v(e.consumer)||!v(e.format))return{captured:0,waived:0,findings:[{boundary_id:v(e.id)?e.id:"unknown",kind:"invalid_boundary",detail:"Each boundary requires non-empty id, producer, consumer, and format."}]};if("fixture_path"in e){let o=t[e.fixture_path],n=v(e.fixture_path)&&e.fixture_path in t?Qy(e,o):[{boundary_id:e.id,kind:"missing_fixture",detail:`Boundary ${e.id} fixture ${String(e.fixture_path)} is missing.`}];return{captured:n.length===0?1:0,waived:0,findings:n}}return eb(e,r)}function CL(e,t,r=new Date){let o=[];if(e.version!==1||!v(e.inventory_scope)||!Array.isArray(e.boundaries))return{ok:!1,boundary_count:0,captured_count:0,waived_count:0,findings:[{boundary_id:"registry",kind:"invalid_registry",detail:"Boundary registry requires version 1, inventory_scope, and boundaries."}]};let n=new Set,s=0,i=0;for(let a of e.boundaries){if(typeof a!="object"||a===null||Array.isArray(a)){o.push({boundary_id:"unknown",kind:"invalid_boundary",detail:"Each boundary must be a JSON object."});continue}let d=a,c=v(d.id)?d.id:void 0;if(c!==void 0&&n.has(c)){o.push({boundary_id:c,kind:"duplicate_boundary",detail:`Boundary ${c} is inventoried more than once.`});continue}c!==void 0&&n.add(c);let l=tb(d,t,r.getTime());s+=l.captured,i+=l.waived,o.push(...l.findings)}return o.sort((a,d)=>a.boundary_id!==d.boundary_id?a.boundary_id.localeCompare(d.boundary_id):a.kind.localeCompare(d.kind)),{ok:o.length===0,boundary_count:e.boundaries.length,captured_count:s,waived_count:i,findings:o}}import X from"node:fs";import lt 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]="aacf5738-098d-50f9-b619-19e472b577ea")}catch{}})();var eo=300*1e3,rb=3;function vL(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function OL(e,t){let r=t.trim();if(!/^[a-zA-Z0-9_-][a-zA-Z0-9._-]*$/.test(r))throw new TypeError("Compile-cache generation must be a safe non-empty filename token.");X.mkdirSync(e,{recursive:!0});let o=lt.join(e,r);X.mkdirSync(o,{recursive:!0});let n=new Date;X.utimesSync(o,n,n);let s=X.readdirSync(e).filter(c=>c!==r).flatMap(c=>{try{return[{name:c,mtimeMs:X.statSync(lt.join(e,c)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&fe(l))return[];throw l}}).sort((c,l)=>l.mtimeMs-c.mtimeMs||c.name.localeCompare(l.name)),i=s.filter(c=>n.getTime()-c.mtimeMs<eo),a=Math.max(0,rb-1-i.length),d=s.filter(c=>n.getTime()-c.mtimeMs>=eo).slice(a).map(c=>c.name).sort((c,l)=>c.localeCompare(l));for(let c of d)X.rmSync(lt.join(e,c),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:d}}import{createHash as ob}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]="ff60bc5b-bd85-5b3c-9a55-21e7e72477ac")}catch{}})();var pt=1;function J(e){e?.throwIfAborted()}function U(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${t} must be non-empty`);return e.trim()}function Z(e,t,r={}){let o=Date.parse(r.createdAt??new Date().toISOString());if(!Number.isFinite(o))throw new TypeError("Relationship graph createdAt must be a valid timestamp");let n=e.nodes(),s=e.edges(),i=t.list();return Object.freeze({version:pt,fingerprint:ob("sha256").update(I({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function nb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e){if(!nb(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==pt)throw new TypeError(`Unsupported relationship graph snapshot version: ${String(e.version)}`);if(!Array.isArray(e.nodes)||e.nodes.some(n=>typeof n!="string"))throw new TypeError("Relationship graph snapshot nodes must be strings");if(!Array.isArray(e.edges)||!Array.isArray(e.kinds))throw new TypeError("Relationship graph snapshot edges and kinds must be arrays");if(typeof e.created_at!="string"||!Number.isFinite(Date.parse(e.created_at)))throw new TypeError("Relationship graph snapshot created_at must be valid");if(typeof e.fingerprint!="string")throw new TypeError("Relationship graph snapshot fingerprint must be a string");let t=new Ue([]);for(let n of e.kinds)t.register(n);let r=new z(e.nodes,e.edges,t),o=Z(r,t,{createdAt:e.created_at});if(o.fingerprint!==e.fingerprint)throw new TypeError("Relationship graph snapshot fingerprint mismatch");return{snapshot:o,registry:t,graph:r}}async function x(e,t){U(e.name,"adapter name");let r=U(t.workspace,"workspace");J(t.signal);let o=await e.read({...t,workspace:r});return J(t.signal),o===null?null:ae(o)}async function Re(e,t){let r=U(t.workspace,"workspace"),o=ae(t.snapshot).snapshot,n=await x(e,{workspace:r,signal:t.signal});if(n?.snapshot.fingerprint===o.fingerprint)return{adapter:e.name,workspace:r,disposition:"current",fingerprint:o.fingerprint,previous_fingerprint:n.snapshot.fingerprint,node_count:o.nodes.length,edge_count:o.edges.length};if(J(t.signal),await e.replace({workspace:r,signal:t.signal,snapshot:o,expected_fingerprint:n?.snapshot.fingerprint??null}),(await x(e,{workspace:r,signal:t.signal}))?.snapshot.fingerprint!==o.fingerprint)throw new Error(`Relationship graph adapter "${e.name}" did not expose the replaced snapshot`);return{adapter:e.name,workspace:r,disposition:"written",fingerprint:o.fingerprint,...n?{previous_fingerprint:n.snapshot.fingerprint}:{},node_count:o.nodes.length,edge_count:o.edges.length}}function ib(e,t={}){let r=e.map(ae),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let d=o.get(a.kind);if(d&&I(d)!==I(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Ue([...o.values()].sort((i,a)=>i.kind.localeCompare(a.kind))),s=new z(new Set(r.flatMap(i=>[...i.snapshot.nodes])),r.flatMap(i=>[...i.snapshot.edges]),n);return Z(s,n,t)}var se=class{name;#e=new Map;constructor(t="memory"){this.name=U(t,"adapter name")}async read(t){J(t.signal);let r=this.#e.get(U(t.workspace,"workspace"));return r?structuredClone(r):null}async replace(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.set(r,structuredClone(ae(t.snapshot).snapshot))}async clear(t){J(t.signal);let r=U(t.workspace,"workspace"),o=this.#e.get(r);if(t.expected_fingerprint!==void 0&&(o?.fingerprint??null)!==t.expected_fingerprint)throw new Error(`Relationship graph adapter conflict for ${r}`);this.#e.delete(r)}};(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]="e47f9bb8-f98e-5159-9116-29c3e6fedfc3")}catch{}})();function to(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function sb(e){let t=to(e.nodeCount,"nodeCount"),r=to(e.edgeStride??1,"edgeStride"),o=e.topology??"chain";if(!["chain","star","disconnected"].includes(o))throw new TypeError(`Unsupported relationship graph topology: ${o}`);let n=(e.kind??"related").trim(),s=(e.idPrefix??"node").trim();if(!n||!s)throw new TypeError("Relationship graph kind and idPrefix must be non-empty");let i=o==="disconnected"?0:Math.floor((t-1)/r);return{node_count:t,edge_count:i,edge_basis:"fixture_generated",nodes:{*[Symbol.iterator](){for(let a=0;a<t;a+=1)yield`${s}-${a}`}},edges:{*[Symbol.iterator](){if(o!=="disconnected")for(let a=r;a<t;a+=r)yield{source:`${s}-${o==="star"?0:a-r}`,target:`${s}-${a}`,kind:n}}}}}function j(e,t){if(!e)throw new Error(`Relationship graph adapter conformance: ${t}`)}async function ro(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=wt(),n=Z(new z(["a","b"],[{source:"a",target:"b",kind:"related"}],o),o,{createdAt:"2026-01-01T00:00:00.000Z"}),s=Z(new z(["a","b","c"],[{source:"a",target:"b",kind:"related"},{source:"b",target:"c",kind:"blocked_by"}],o),o,{createdAt:"2026-01-02T00:00:00.000Z"}),i=[];j(await x(e,{workspace:r})===null,"workspace must start empty"),i.push({name:"empty-read",passed:!0});let a=await Re(e,{workspace:r,snapshot:n});j(a.disposition==="written","first sync must write"),i.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:r})).nodes.push("mutated-reader-copy"),j((await x(e,{workspace:r}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),i.push({name:"read-isolation",passed:!0}),j((await Re(e,{workspace:r,snapshot:n})).disposition==="current","identical sync must be idempotent"),i.push({name:"idempotent-sync",passed:!0}),await e.replace({workspace:r,snapshot:s,expected_fingerprint:n.fingerprint}),j((await x(e,{workspace:r}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),i.push({name:"replacement-visibility",passed:!0});let d=!1;try{await e.replace({workspace:r,snapshot:n,expected_fingerprint:n.fingerprint})}catch{d=!0}return j(d,"stale compare-and-swap must fail"),i.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:r,expected_fingerprint:s.fingerprint}),j(await x(e,{workspace:r})===null,"clear must remove the workspace"),i.push({name:"clear",passed:!0})),{adapter:e.name,workspace:r,cases:Object.freeze(i),clear_supported:e.clear!==void 0}}function ab(e){return ro(new se,e?{workspace:e}:{})}(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]="58736688-35d0-545d-892e-e0ede7fedc1a")}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]="d45a8203-4501-5797-a6cc-a2e7844adec9")}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]="f5567aa1-0268-574d-907b-38d6249538ce")}catch{}})();var ut=2,db=["self_reported","independent_transport"];function Ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function de(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function oo(e,t,r=!1){if(!Array.isArray(e)||e.length===0)throw new TypeError(`${t} must be a non-empty string array`);return e.map((o,n)=>{let s=de(o,`${t}[${String(n)}]`);return r?o:s})}function mt(e,t){return e===void 0?void 0:de(e,t)}function cb(e,t){if(e===void 0)return;if(!Ie(e)||Object.keys(e).length===0)throw new TypeError(`${t} must be a non-empty object`);let r=Object.entries(e).map(([o,n])=>{if(o.length===0||o.split(".").some(s=>s.length===0))throw new TypeError(`${t} must use dot-separated own-property paths`);if(n!==null&&typeof n!="string"&&typeof n!="boolean"&&(typeof n!="number"||!Number.isFinite(n)))throw new TypeError(`${t} values must be JSON primitives`);return[o,n]});return Object.fromEntries(r)}function lb(e,t,r,o,n,s){if(o==="refusal"){if(We(r)||n===void 0||s===void 0)throw new TypeError(`${e} refusal steps require a non-success exit, error code, and refusal surface`);return}if(n!==void 0||s!==void 0)throw new TypeError(`${e} only refusal steps may declare expected_error_code or expected_refusal_surface`);let i=bt(t);if(i===void 0)throw new TypeError(`${e}.args must identify a command after global flags`);let a=t[i].trim().toLowerCase();if(a==="history"){let l=Tt(t.slice(i+1));l!==void 0&&(a=Le(`history ${l}`))}let d=Nt(a);if(!We(r)||r!==0&&!d?.exit_codes.some(l=>l===r))throw new TypeError(`${e} successful output must use exit code 0 or a command-declared successful effect exit`);let c=xt(a).kind;if(o!==c)throw new TypeError(`${e} expected ${o}, but ${a} declares ${c}`)}function pb(e,t,r){if(!Ie(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=de(e.id,`${o}.id`),s=oo(e.args,`${o}.args`,!0),i=e.expected_exit_code;if(typeof i!="number"||!Number.isSafeInteger(i))throw new TypeError(`${o}.expected_exit_code must be a safe integer`);let a=e.expected_output_kind;if(a!=="refusal"&&!kt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let d=a,c=e.expected_accounting_mode;if(!db.includes(c))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=c;if(l==="independent_transport"&&d!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=oo(e.required_fields,`${o}.required_fields`);if(p.some(E=>E.split(".").some(q=>q.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=cb(e.expected_field_values,`${o}.expected_field_values`),_=mt(e.expected_error_code,`${o}.expected_error_code`),g=mt(e.expected_refusal_surface,`${o}.expected_refusal_surface`),T=mt(e.recovery_for,`${o}.recovery_for`);return lb(o,s,i,d,_,g),{id:n,args:s,expected_exit_code:i,expected_output_kind:d,expected_accounting_mode:l,required_fields:p,...f?{expected_field_values:f}:{},..._?{expected_error_code:_}:{},...g?{expected_refusal_surface:g}:{},...T?{recovery_for:T}:{}}}function ub(e,t){if(!Ie(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=de(e.id,`tasks[${String(t)}].id`),o=de(e.description,`tasks.${r}.description`);if(!Array.isArray(e.steps)||e.steps.length===0)throw new TypeError(`tasks.${r}.steps must be a non-empty array`);let n=e.steps.map((i,a)=>pb(i,r,a)),s=new Map;for(let i of n){if(s.has(i.id))throw new TypeError(`tasks.${r} contains duplicate step id ${i.id}`);if(i.recovery_for!==void 0&&(s.get(i.recovery_for)?.expected_output_kind!=="refusal"||i.expected_output_kind==="refusal"))throw new TypeError(`tasks.${r}.${i.id} recovery_for must reference an earlier refusal and declare successful output`);s.set(i.id,i)}if(n.at(-1)?.expected_output_kind==="refusal")throw new TypeError(`tasks.${r} completed task must terminate with successful output`);for(let i of n)if(i.expected_output_kind==="refusal"&&!n.some(a=>a.recovery_for===i.id))throw new TypeError(`tasks.${r}.${i.id} refusal must have a later successful recovery_for step`);return{id:r,description:o,steps:n}}function nD(e){if(!Ie(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==ut)throw new TypeError(`agent-task transcript corpus version must be ${String(ut)}`);if(!Array.isArray(e.tasks)||e.tasks.length===0)throw new TypeError("agent-task transcript corpus tasks must be non-empty");let t=e.tasks.map((o,n)=>ub(o,n)),r=new Set;for(let o of t){if(r.has(o.id))throw new TypeError(`duplicate agent-task transcript id ${o.id}`);r.add(o.id)}return{version:ut,tasks:t}}import{createHash as no}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]="7163a078-d8be-5bca-813f-c941fcb8e406")}catch{}})();function io(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function dD(e,t){let r=io(t.migrationId,"migrationId"),o=io(t.author,"author"),n=Date.parse(t.timestamp);if(!Number.isFinite(n))throw new TypeError("Relationship backfill timestamp must be valid");let s=new Date(n).toISOString(),i=He(e,void 0,t.registry),a=i.graph.nodes(),d=i.graph.edges().map(f=>{let _=no("sha256").update(JSON.stringify([r,f.kind,f.source,f.target,f.createdAt??null,f.author??null,f.payload??null])).digest("hex").slice(0,24);return Object.freeze({eventId:`backfill:${r}:${_}`,relationshipId:`migration:${r}:${_}`,action:"add",edge:f,author:o,timestamp:s,reason:`Backfill ${r} from legacy item metadata`})}),c=no("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:d})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=d.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:c,nodes:a,events:Object.freeze(p),edge_count:d.length,skipped_existing_count:d.length-p.length,duplicate_dependency_rows:i.duplicateRows.length,dangling_reference_count:i.dangling.active.length+i.dangling.legacy_terminal.length})}import*as so from"node:module";(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]="7a1d7194-6ff1-5365-ab64-80b47b0176d7")}catch{}})();var ce=["suggested_retry","candidate_command","example","next_step","migration_hint","restore_with"],ft={suggested_retry:{kind:"suggested_retry",semantics:"recovery"},retry_command:{kind:"suggested_retry",semantics:"recovery"},candidate_command:{kind:"candidate_command",semantics:"recovery"},candidate_commands:{kind:"candidate_command",semantics:"recovery"},fallback_candidates:{kind:"candidate_command",semantics:"recovery",nested_value_field:"command"},next_best_command:{kind:"candidate_command",semantics:"recovery"},example:{kind:"example",semantics:"recovery"},examples:{kind:"example",semantics:"recovery"},next_step:{kind:"next_step",semantics:"recovery"},next_steps:{kind:"next_step",semantics:"recovery"},suggested_next_steps:{kind:"next_step",semantics:"recovery"},migration_hint:{kind:"migration_hint",semantics:"replacement"},migration_hints:{kind:"migration_hint",semantics:"replacement"},restore_with:{kind:"restore_with",semantics:"behavior_preserving"}},lD=Object.freeze(Object.keys(ft));function ao(e){if(Object.hasOwn(ft,e))return ft[e]}var mb=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function fb(e,t){let r=e[t],o=t+1,n="";for(;o<e.length&&e[o]!==r;)e[o]==="\\"?o+=2:(n+=e[o],o+=1);return e[o]===r&&(o+=1),{next:o,value:n}}function _b(e){return e===void 0||e.kind==="punctuator"&&mb.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function hb(e,t){if(/\s/u.test(e[t]))return t+1;if(e.startsWith("//",t)){let r=e.indexOf(`
31
+ `,t+2);return r===-1?e.length:r+1}if(e.startsWith("/*",t))return e.indexOf("*/",t+2)+2}function gb(e,t,r){if(e[t]!=="/"||!_b(r))return;let o=t+1,n=!1;for(;o<e.length;)if(e[o]==="\\")o+=2;else if(e[o]==="[")n=!0,o+=1;else if(e[o]==="]")n=!1,o+=1;else if(e[o]==="/"&&!n){for(o+=1;/[A-Za-z]/u.test(e.charAt(o));)o+=1;return o}else o+=1;return o}function yb(e,t){let r=e[t];if(r==="'"||r==='"'||r==="`"){let n=fb(e,t);return r==="`"?{next:n.next}:{next:n.next,token:{kind:"string",value:n.value,offset:t+1}}}if(/[A-Za-z_$]/u.test(r)){let n=t+1;for(;/[A-Za-z0-9_$]/u.test(e[n]??"");)n+=1;return{next:n,token:{kind:"identifier",value:e.slice(t,n),offset:t}}}let o=e.startsWith("=>",t)?"=>":r;return{next:t+o.length,token:{kind:"punctuator",value:o,offset:t}}}function bb(e){let t=[],r=0;for(;r<e.length;){let o=hb(e,r);if(o!==void 0){r=o;continue}let n=gb(e,r,t.at(-1));if(n!==void 0){r=n;continue}let s=yb(e,r);s.token&&t.push(s.token),r=s.next}return t}var Tb=new Set(["object","block","pattern"]),Cb=new Set(["const","let","var"]),Eb=new Set(["}",")","]"]),Sb=new Set(["=","(","[",",",":","?","return"]);function wb(e,t,r){if([...r].reverse().find(n=>Tb.has(n.kind))?.kind==="pattern"||r.at(-1)?.kind==="paren"&&r.at(-1)?.parameter_list)return"pattern";let o=e[t-1];return o?.kind==="identifier"&&Cb.has(o.value)?"pattern":o?.value==="=>"||o?.value===")"?"block":o&&Sb.has(o.value)?"object":"block"}function Ab(e,t,r){let o=e[t];if(o.value==="{"){let i=wb(e,t,r);return{kind:i,...i==="object"?{member_start:!0,candidates:[]}:{}}}if(o.value==="[")return{kind:"array"};if(o.value!=="(")return;let n=e[t-1],s=e[t-2];return{kind:"paren",...n?.value==="function"||s?.value==="function"?{parameter_list:!0}:{}}}function vb(e,t,r){if(!(e?.kind!=="object"||!e.member_start||t.kind!=="identifier"&&t.kind!=="string"||r?.value!==":"||!/^[A-Za-z][A-Za-z0-9_]*$/u.test(t.value)))return{field:t.value,offset:t.offset}}function Ob(e,t){return e[t+1]?.value===")"&&e[t+2]?.value==="=>"||e[t+1]?.value==="="}function Rb(e){let t=bb(so.stripTypeScriptTypes(e,{mode:"strip"})),r=[],o=[];for(let[n,s]of t.entries()){let i=o.at(-1),a=vb(i,s,t[n+1]);a&&i.candidates.push(a);let d=Ab(t,n,o);if(d)o.push(d);else if(Eb.has(s.value)){let c=o.pop();c?.kind==="object"&&!Ob(t,n)&&r.push(...c.candidates)}else s.value===","&&i?.kind==="object"?i.member_start=!0:i?.kind==="object"&&s.value!==":"&&(i.member_start=!1)}return r}function Ib(e){let t=[0];for(let r=0;r<e.length;r+=1)e[r]===`
32
+ `&&t.push(r+1);return t}function Pb(e,t){let r=0,o=e.length;for(;r<o;){let n=Math.floor((r+o)/2);e[n]<=t?r=n+1:o=n}return r}function pD(e){let t=[],r=[];for(let n of[...e].sort((s,i)=>Q(s.path,i.path))){let s=Ib(n.content),i;try{i=Rb(n.content)}catch(a){r.push({kind:"invalid_source",subject:n.path,detail:`${n.path} could not be parsed for recovery producers: ${String(a)}.`});continue}for(let a of i){let d=a.field,c=Pb(s,a.offset),l=ao(d);l?t.push({path:n.path,line:c,field:d,kind:l.kind}):/(?:retry_command|candidate_command|fallback_candidate|next_best_command|example|next_step|migration_hint|restore_with)/u.test(d)&&!/(?:_total|_truncated)$/u.test(d)&&r.push({kind:"unknown_recovery_field",subject:`${n.path}:${c}:${d}`,detail:`${d} resembles a recovery reference but has no typed field contract.`})}}let o=Object.fromEntries(ce.map(n=>[n,t.filter(s=>s.kind===n).length]));for(let n of ce)o[n]===0&&r.push({kind:"missing_kind_producer",subject:n,detail:`No source producer emits the ${n} recovery-reference kind.`});return t.sort((n,s)=>n.path!==s.path?Q(n.path,s.path):n.line!==s.line?n.line-s.line:Q(n.field,s.field)),r.sort((n,s)=>n.subject!==s.subject?Q(n.subject,s.subject):Q(n.kind,s.kind)),{ok:r.length===0,scanned_file_count:e.length,producer_count:t.length,producer_count_by_kind:o,producers:t,findings:r}}function uD(e,t){let r=[],o=(n,s)=>{if(Array.isArray(n)){n.forEach((i,a)=>o(i,[...s,String(a)]));return}if(!(typeof n!="object"||n===null))for(let[i,a]of Object.entries(n).sort(([d],[c])=>Q(d,c))){let d=ao(i),c=d?.kind==="migration_hint"&&n.semantics==="behavior_preserving"?{...d,semantics:"behavior_preserving"}:d,l=[a].flat();c!==void 0&&l.forEach((p,f)=>{let _="nested_value_field"in c&&typeof c.nested_value_field=="string"?c.nested_value_field:void 0,g=_&&typeof p=="object"&&p!==null&&!Array.isArray(p)?p[_]:p;if(typeof g!="string"||g.trim().length===0)return;let T=[...s,i,String(f)].map(E=>encodeURIComponent(E)).join("/");r.push({id:`${e}:${c.kind}:${T}`,probe_id:e,kind:c.kind,semantics:c.semantics,value:g})}),o(a,[...s,i])}};return o(t,[]),r}function mD(e,t){let r=e.flatMap(i=>(i.owned_states??[]).map(a=>({contract:i,state:a}))),o=[],n=new Map;for(let i of t){if(n.has(i.probe_id)){o.push({kind:"duplicate_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} was supplied more than once.`});continue}n.set(i.probe_id,i)}let s=new Set(r.map(({state:i})=>i.probe_id));for(let{contract:i,state:a}of r){let d=n.get(a.probe_id);if(!d){o.push({kind:"missing_probe",probe_id:a.probe_id,detail:`No entrypoint observation was recorded for ${i.code}.`});continue}d.code!==i.code&&o.push({kind:"wrong_error_code",probe_id:a.probe_id,detail:`Expected ${i.code}; observed ${d.code}.`}),d.exit_class!==a.expected_exit_class&&o.push({kind:"wrong_exit_class",probe_id:a.probe_id,detail:`Expected ${a.expected_exit_class}; observed ${d.exit_class}.`}),a.entrypoints.includes(d.entrypoint)||o.push({kind:"wrong_entrypoint",probe_id:a.probe_id,detail:`Expected one of ${a.entrypoints.join(", ")}; observed ${d.entrypoint}.`})}for(let i of t)s.has(i.probe_id)||o.push({kind:"undeclared_probe",probe_id:i.probe_id,detail:`Observation ${i.probe_id} has no catalog declaration.`});return o.sort((i,a)=>i.probe_id!==a.probe_id?i.probe_id.localeCompare(a.probe_id):i.kind.localeCompare(a.kind)),{ok:o.length===0,declared_probe_count:r.length,observed_probe_count:t.length,findings:o}}function fD(e,t){let r=[],o=new Set,n=new Set;for(let d of e){if(o.has(d.id)){n.add(d.id),r.push({kind:"duplicate_obligation",reference_id:d.id,detail:`Recovery obligation ${d.id} was declared more than once.`});continue}o.add(d.id)}let s=new Map;for(let d of t){if(s.has(d.id)){r.push({kind:"duplicate_observation",reference_id:d.id,detail:`Recovery reference ${d.id} was observed more than once.`});continue}s.set(d.id,d),o.has(d.id)||r.push({kind:"undeclared_observation",reference_id:d.id,detail:`Recovery observation ${d.id} has no emitted obligation.`})}for(let d of e){if(n.has(d.id))continue;let c=s.get(d.id);c?c.reachable?c.semantics!==d.semantics&&r.push({kind:"wrong_semantics",reference_id:d.id,detail:`Recovery reference ${d.value} promised ${d.semantics}; proof demonstrated ${c.semantics}.`}):r.push({kind:"unreachable_reference",reference_id:d.id,detail:`Recovery reference ${d.value} did not reach its promised target.`}):r.push({kind:"missing_observation",reference_id:d.id,detail:`No reachability proof was recorded for ${d.kind} ${d.value}.`})}let i=ce.map(d=>{let c=e.filter(p=>p.kind===d),l=c.filter(p=>!n.has(p.id)).map(p=>s.get(p.id)).filter(p=>p!==void 0);return{kind:d,declared:c.length,observed:l.length,passed:c.filter(p=>{let f=s.get(p.id);return!n.has(p.id)&&f?.reachable===!0&&f.semantics===p.semantics}).length}});r.sort((d,c)=>d.reference_id!==c.reference_id?d.reference_id.localeCompare(c.reference_id):d.kind.localeCompare(c.kind));let a=i.reduce((d,c)=>d+c.passed,0);return{ok:r.length===0,declared_reference_count:e.length,observed_reference_count:t.length,pass_fraction:o.size===0?1:a/o.size,coverage_by_kind:i,findings:r}}function Mb(e,t){let r=new Map(ce.map(s=>[s,new Set]));for(let s of t)r.get(s.kind).add(s.value);let o=ce.map(s=>({kind:s,source_producers:e.producer_count_by_kind[s],runtime_values:r.get(s).size})),n=o.filter(({source_producers:s,runtime_values:i})=>s>0&&i===0).map(({kind:s})=>s);return{ok:e.ok&&n.length===0,source_producer_count:e.producer_count,runtime_value_count:o.reduce((s,{runtime_values:i})=>s+i,0),coverage_by_kind:o,missing_runtime_kinds:n}}var _D=Mb;(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]="2b2197f3-7203-52c8-9cc7-f714b33a9306")}catch{}})();var gD=16,kb=Object.freeze(["bulk_ids_input_empty","bulk_ids_input_missing_path","bulk_ids_input_unreadable","invalid_argument_value","missing_lifecycle_target","missing_required_argument","projection_options_mutually_exclusive","tracker_not_initialized","tracker_root_missing","tracker_root_not_directory","tracker_root_unreadable","unknown_context_intent","unknown_field_projection","unknown_option","unknown_subcommand"]),co=18,lo=Object.freeze([...kb,"manifest_unknown_key","no_version_bounds_declared"].sort((e,t)=>e.localeCompare(t)));function yD(e,t=co){return{ok:e.executable_error_code_count>=t,baseline:t,actual:e.executable_error_code_count}}function bD(e,t=lo){let r=new Set(e.rows.filter(({disposition:n})=>n==="executable").map(({canonical_code:n})=>n)),o=t.filter(n=>!r.has(n));return{ok:o.length===0,required_canonical_codes:[...t],missing_required_canonical_codes:o}}function _t(e,t){let r=e.get(t);if(r)return r;let o={kinds:new Set,probeIds:new Set};return e.set(t,o),o}function TD(e,t,r){let o=new Map(e.map(l=>[l.code,l.canonical_code??l.code])),n=new Map,s=0,i=0;for(let l of e){let p=_t(n,l.canonical_code??l.code);for(let f of l.owned_states??[])p.kinds.add("owned_state"),p.probeIds.add(f.probe_id)}for(let l of t){let p=o.get(l.error_code);if(p===void 0)continue;s+=1;let f=_t(n,p);f.kinds.add("closed_domain"),f.probeIds.add(l.probe_id)}for(let l of r){let p=o.get(l.error_code);if(p===void 0)continue;i+=1;let f=_t(n,p);f.kinds.add("grammar"),f.probeIds.add(l.probe_id)}let a=e.map(l=>{let p=l.canonical_code??l.code,f=n.get(p),_=[...f.probeIds].sort();return{code:l.code,canonical_code:p,disposition:_.length>0?"executable":"uncovered",evidence_kinds:[...f.kinds].sort(),probe_ids:_}}).sort((l,p)=>l.code<p.code?-1:1),d=a.filter(({disposition:l})=>l==="uncovered").map(({code:l})=>l),c=a.length-d.length;return{ok:d.length===0,catalog_error_code_count:a.length,executable_error_code_count:c,uncovered_error_code_count:d.length,coverage_fraction:a.length===0?1:c/a.length,closed_domain_probe_count:s,grammar_probe_count:i,uncovered_error_codes:d,rows:a}}function CD(e){let t=e.rows.map(r=>`| \`${r.code}\` | \`${r.canonical_code}\` | ${r.disposition} | ${r.evidence_kinds.join(", ")||"none"} | ${r.probe_ids.length} |`);return["# Generated refusal closure census","","Tracker: `pm-f05lsg`.","","Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.","",`- Catalog error codes: ${e.catalog_error_code_count}`,`- Executable error codes: ${e.executable_error_code_count}`,`- Executable-code ratchet floor: ${co}`,`- Required executable canonical codes: ${lo.map(r=>`\`${r}\``).join(", ")}`,`- Uncovered error codes: ${e.uncovered_error_code_count}`,`- Coverage fraction: ${e.coverage_fraction.toFixed(6)}`,`- Closed-domain probes: ${e.closed_domain_probe_count}`,`- Grammar probes: ${e.grammar_probe_count}`,"","| Error code | Canonical code | Disposition | Evidence kinds | Probe count |","| --- | --- | --- | --- | --- |",...t,""].join(`
33
+ `)}(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]="d252409d-e33e-5c9e-9671-789f0ee87312")}catch{}})();function xb(e){return[e.expected_error_code!==void 0&&e.error_code!==e.expected_error_code?{code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected error code ${e.expected_error_code}, received ${e.error_code??"<missing>"}.`}:void 0,e.expected_allowed_values!==void 0&&JSON.stringify([...e.allowed_values].sort())!==JSON.stringify([...e.expected_allowed_values].sort())?{code:"incomplete_allowed_values",probe_id:e.probe_id,detail:"The refusal's accepted domain differs from the SDK-owned domain contract."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)===0?{code:"missing_suggested_retry_args",probe_id:e.probe_id,detail:"The refusal omitted shell-free suggested retry arguments."}:void 0,e.expected_suggested_retry_args!==void 0&&(e.suggested_retry_args?.length??0)>0&&JSON.stringify(e.suggested_retry_args)!==JSON.stringify(e.expected_suggested_retry_args)?{code:"suggested_retry_args_mismatch",probe_id:e.probe_id,detail:"The refusal's suggested retry arguments differ from the SDK-owned contract."}:void 0]}function Nb(e){return[e.exit_code!==me.USAGE?{code:"non_refusal_exit",probe_id:e.probe_id,detail:`${e.entrypoint} returned exit code ${e.exit_code}; a structured usage refusal must return ${me.USAGE}.`}:void 0,e.allowed_values_required!==!1&&e.allowed_values.length===0?{code:"missing_allowed_values",probe_id:e.probe_id,detail:"The refusal omitted its complete accepted value domain."}:void 0,e.allowed_values.includes(e.rejected_value)?{code:"accepted_rejected_value",probe_id:e.probe_id,detail:`${e.rejected_value} is both rejected and advertised as allowed.`}:void 0,e.suggested_retry.trim().length===0?{code:"missing_suggested_retry",probe_id:e.probe_id,detail:"The refusal omitted an executable suggested retry."}:void 0,e.retry_succeeded?void 0:{code:"retry_failed",probe_id:e.probe_id,detail:"The advertised suggested retry did not succeed."},...xb(e)]}function wD(e){let t=[],r=new Set,o=0;e.length===0&&t.push({code:"empty_corpus",probe_id:"corpus",detail:"At least one real refusal observation is required."});for(let n of e){if(r.has(n.probe_id)){t.push({code:"duplicate_probe",probe_id:n.probe_id,detail:`${n.probe_id} was supplied more than once.`});continue}r.add(n.probe_id);let s=t.length;for(let i of Nb(n))i!==void 0&&t.push(i);t.length===s&&(o+=1)}return t.sort((n,s)=>n.probe_id!==s.probe_id?n.probe_id.localeCompare(s.probe_id):n.code.localeCompare(s.code)),{ok:t.length===0,probe_count:r.size,closed_probe_count:o,closure_fraction:r.size===0?0:o/r.size,findings:t}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39b4e1fe-a34a-5ffc-9447-eaf8c46863c7")}catch{}})();var po="not-a-declared-action";function Lb(e,t){if(e.startsWith("assurance ")&&t.name==="kind")return"measurement";switch(t.value_kind){case"integer":return"1";case"item_id":return"pm-domain";case"action":throw new Error(`Cannot synthesize a preceding action value for positional slot ${t.name}.`);default:return"example"}}function le(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function xD(e=qe.filter(t=>It.some(r=>r.command===t.command&&r.disposition!=="package_owned"))){let t=new Set(e.filter(({command:r})=>!r.includes(" ")).map(({command:r})=>le(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=le(r.command),a=s.length>1&&t.has(i)?s.map(le).join("--"):i,d=ee(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),c=Be.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${le(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>Lb(r.command,l)),...d],recovery_args:[...s,"--help"],error_code:c&&!r.command.startsWith("assurance ")?"invalid_argument_value":/^extension (?:activate|adopt|deactivate|uninstall)$/u.test(r.command)?"missing_lifecycle_target":"missing_required_argument",missing_argument:o.name,missing_argument_index:n}]})).sort((r,o)=>r.probe_id.localeCompare(o.probe_id))}function Db(e){switch(L(e)){case"assurance":case"workspace snapshot":return Be.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return De;case"merge":return $e;case"plan":return Ye;case"profile":return Xe;case"schema":return Lt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function ND(e=qe){return e.filter(({slots:t})=>t[0]?.required===!0&&t[0].value_kind==="action").map(({command:t})=>{let r=t.split(" ");return{probe_id:`unknown-subcommand-${le(t)}`,command:t,refusal_args:[...r,po],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:po,allowed_values:[...Db(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function $b(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function Fb(e,t){if(!t)return[{code:"refusal_probe_missing",probe_id:e.probe_id,detail:`${e.probe_id} has no runtime observation.`}];let r=[];return t.error_code!==e.error_code&&r.push({code:"refusal_error_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} emitted ${t.error_code||"<none>"}; expected ${e.error_code}.`}),t.exit_code!==2&&r.push({code:"refusal_exit_code_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} exited ${t.exit_code}; expected usage exit 2.`}),"allowed_values"in e&&!$b(t.allowed_values,e.allowed_values)&&r.push({code:"refusal_allowed_values_mismatch",probe_id:e.probe_id,detail:`${e.probe_id} did not expose its complete action domain.`}),t.recovery_succeeded||r.push({code:"refusal_recovery_failed",probe_id:e.probe_id,detail:`${e.probe_id} help recovery did not succeed.`}),t.refusal_mutated_state&&r.push({code:"refusal_mutated_state",probe_id:e.probe_id,detail:`${e.probe_id} changed tracker state while refusing input${t.mutated_paths?.length?`: ${t.mutated_paths.join(", ")}`:"."}`}),r}function LD(e,t){let r=new Map(e.map(i=>[i.probe_id,i])),o=new Map(t.map(i=>[i.probe_id,i])),n=[...e.flatMap(i=>Fb(i,o.get(i.probe_id))),...t.filter(i=>!r.has(i.probe_id)).map(i=>({code:"unexpected_refusal_probe",probe_id:i.probe_id,detail:`${i.probe_id} has no declared grammar refusal contract.`}))];n.sort((i,a)=>i.probe_id.localeCompare(a.probe_id)||i.code.localeCompare(a.code));let s=new Set(n.map(({probe_id:i})=>i));return{ok:n.length===0,probe_count:e.length,closed_probe_count:e.filter(({probe_id:i})=>!s.has(i)).length,findings:n}}(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]="d3795bc4-fbe5-5ca4-bc90-b72a2d469dc7")}catch{}})();var ht=[{probe_id:"tracker-root-missing",failure_kind:"missing_root",expected_error_code:"tracker_root_missing",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-settings-missing",failure_kind:"settings_missing",expected_error_code:"tracker_not_initialized",expected_exit_code:3,recovery_kind:"initialize"},{probe_id:"tracker-root-not-directory",failure_kind:"not_directory",expected_error_code:"tracker_root_not_directory",expected_exit_code:2,recovery_kind:"select_directory"},{probe_id:"tracker-root-unreadable",failure_kind:"unreadable_root",expected_error_code:"tracker_root_unreadable",expected_exit_code:1,recovery_kind:"repair_permissions"}];function $D(){return ht.map(e=>({...e}))}function Gb(e,t){let r=[];t.error_code!==e.expected_error_code&&r.push({code:"error_code_mismatch",probe_id:e.probe_id,detail:`Expected ${e.expected_error_code}, received ${t.error_code}.`}),t.exit_code!==e.expected_exit_code&&r.push({code:"exit_code_mismatch",probe_id:e.probe_id,detail:`Expected exit ${e.expected_exit_code}, received ${t.exit_code}.`}),t.recovery_kind!==e.recovery_kind&&r.push({code:"recovery_kind_mismatch",probe_id:e.probe_id,detail:`Expected ${e.recovery_kind}, received ${t.recovery_kind}.`});let o=t.suggested_retry_args.indexOf("init"),n=o===0||o===2&&t.suggested_retry_args[0]==="--pm-path"&&t.suggested_retry_args[1]?.length>0;return e.recovery_kind==="initialize"&&!n&&r.push({code:"missing_init_recovery",probe_id:e.probe_id,detail:"Missing and uninitialized roots must emit a tokenized init retry."}),(t.unsafe_init_recommended||e.recovery_kind!=="initialize"&&t.suggested_retry_args.includes("init"))&&r.push({code:"unsafe_init_recovery",probe_id:e.probe_id,detail:"A tracker root that cannot be initialized safely must not recommend initialization."}),t.retry_succeeded||r.push({code:"retry_failed",probe_id:e.probe_id,detail:"The emitted retry or safe alternate-root recovery did not execute successfully."}),r}function FD(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of ht){let s=t.get(n.probe_id);if(s===void 0){r.push({code:"missing_probe",probe_id:n.probe_id,detail:"No runtime observation was supplied for this contract."});continue}let i=Gb(n,s);r.push(...i),i.length===0&&(o+=1)}return r.sort((n,s)=>n.probe_id.localeCompare(s.probe_id)||n.code.localeCompare(s.code)),{ok:r.length===0,probe_count:ht.length,closed_probe_count:o,findings:r}}(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]="29c6ca01-4b1b-56fb-9bcc-5e1c26f17aff")}catch{}})();var Pe,Ub=Object.freeze({list:"list-item-projection","list-all":"list-item-projection","list-draft":"list-item-projection","list-open":"list-item-projection","list-in-progress":"list-item-projection","list-blocked":"list-item-projection","list-closed":"list-item-projection","list-canceled":"list-item-projection",get:"get-item-projection",graph:"graph-detail-projection",search:"search-result-projection",history:"history-entry-projection",events:"mutation-event-projection",activity:"activity-entry-projection",deps:"dependency-graph-projection",health:"health-diagnostic-projection",validate:"validation-diagnostic-projection",contracts:"contract-catalog-projection"});function jb(e,t){if(t==="--limit")return"result-row-limit";if(t==="--node-limit")return"graph-node-limit";if(t==="--edge-limit")return"graph-edge-limit";if(t==="--output-limit")return"rendered-output-row-limit";if(t==="--output-budget")return"rendered-output-byte-budget";if(t==="--token-budget")return"context-intent-token-budget";if(t==="--full"){let r=Ub[L(e)];if(r===void 0)throw new Error(`Command ${e} exposes --full without a registered projection concept.`);return r}return t!=="--file"?t.slice(2):["create","update","update-many"].includes(L(e))?"linked-file-path":["comments","notes","learnings"].includes(L(e))?"entry-file-input":"plan-definition-file"}function Me(){if(Pe!==void 0)return Pe;let e=te.filter(({command:n})=>ze(n)).flatMap(({command:n,family:s})=>Mt(n,ee(n)).map(i=>({command:n,family:s,concept:jb(n,i.flag),flag:i.flag,aliases:Object.freeze([...i.aliases??[]]),value_kind:i.repeatable?"list":i.flag==="--limit"?"number":i.value_type}))),t=new Set(e.flatMap(n=>n.aliases.map(s=>`${n.command}:${s}`))),r=e.filter(n=>!t.has(`${n.command}:${n.flag}`)),o=new Map;for(let n of r){let s=o.get(n.concept)??new Set;s.add(n.value_kind),o.set(n.concept,s)}return Pe=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Pe}function zD(){return Object.freeze(Me().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var uo=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:102,copy:24,focus:22,list:86,"list-all":86,"list-draft":84,"list-open":84,"list-in-progress":84,"list-blocked":84,"list-closed":84,"list-canceled":84,aggregate:40,context:45,ctx:45,get:30,graph:34,search:78,duplicates:25,eval:25,next:38,history:36,events:34,"history-attest":23,"history-redact":27,"history-repair":27,"history-compact":30,"history-author-acknowledge":28,merge:29,schema:43,profile:22,activity:36,restore:23,update:105,"update-many":146,close:32,"close-many":72,delete:24,append:25,comments:31,notes:35,learnings:31,files:39,docs:30,deps:32,plan:111,test:56,"test-all":40,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:39,release:25,"start-task":23,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),Bb=1,mo=Object.freeze(Object.fromEntries(Object.entries({...uo,...Object.fromEntries(Ne.flatMap(({alias:e,canonical:t})=>{let r=uo[e];return r===void 0?[]:[[t,r]]}))}).map(([e,t])=>[e,t+Bb])));function fo(){let e=new Map(Object.keys(mo).map(t=>[t,0]));for(let{command:t}of Me())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(mo).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function qb(e,t,r){for(let o of e)for(let n of o.aliases){let s=t.get(`${o.command}:${n}`);s===void 0||s.flag===o.flag||r.push({code:"alias_collision",command:o.command,detail:`${n} aliases ${o.flag} but is canonical for ${s.flag}.`})}}function zb(e,t,r){let o=new Set(t.map(({command:n})=>n));for(let n of e.keys())o.has(n)||r.push({code:"missing_budget",command:n,detail:`${n} has canonical flags but no persisted budget.`});for(let n of t){let s=e.get(n.command)??0;s===0&&r.push({code:"stale_budget",command:n.command,detail:`${n.command} has a persisted budget but no canonical flags.`}),!(s<=n.maximum)&&r.push({code:"budget_exceeded",command:n.command,detail:`${s} canonical flags exceed the ratcheted maximum ${n.maximum}.`})}}function Hb(e,t,r){let o=new Map(e.map(n=>[`${n.command}:${n.flag}`,n]));for(let n of t){let s=`${n.command}:${n.canonical_flag}`,i=o.get(s);if(!i){r.push({code:"removed_canonical_spelling",command:n.command,detail:`${n.canonical_flag} disappeared from the executable spelling inventory.`});continue}let a=new Set([i.flag,...i.aliases]);for(let d of n.accepted_spellings)a.has(d)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${d} no longer resolves to ${n.canonical_flag}.`})}}function HD(e=Me(),t=fo(),r=[]){let o=[],n=new Map,s=new Map,i=new Map,a=new Map;for(let d of e){let c=`${d.command}:${d.flag}`;n.has(c)?o.push({code:"duplicate_canonical_flag",command:d.command,detail:`${d.flag} has more than one canonical row.`}):n.set(c,d),a.set(d.command,(a.get(d.command)??0)+1);let l=s.get(d.concept);l!==void 0&&l!==d.value_kind?o.push({code:"inconsistent_concept_kind",command:d.command,detail:`${d.concept} uses both ${l} and ${d.value_kind}.`}):s.set(d.concept,d.value_kind);let p=i.get(d.concept);p!==void 0&&p!==d.flag?o.push({code:"semantic_spelling_collision",command:d.command,detail:`${d.concept} is canonicalized by both ${p} and ${d.flag}.`}):i.set(d.concept,d.flag)}return qb(e,n,o),zb(a,t,o),Hb(e,r,o),o.sort((d,c)=>d.command.localeCompare(c.command)||d.code.localeCompare(c.code)||d.detail.localeCompare(c.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:d})=>d)).size,baseline_entry_count:r.length,findings:o}}function VD(){let e=Me(),t=fo(),r=new Map(t.map(({command:o})=>[o,"unknown"]));for(let{command:o,family:n}of e)r.set(o,n);return["# Generated flag lexicon budgets","","This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not consume canonical budget.","","| Command | Capability family | Canonical flags | Maximum |","| --- | --- | ---: | ---: |",...t.map(({command:o,current:n,maximum:s})=>{let i=r.get(o);return`| \`${o}\` | ${i} | ${n} | ${s} |`}),""].join(`
34
+ `)}(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]="4c9a1aa8-05b6-53da-a8b1-f1a7289d39cf")}catch{}})();function WD(e){return e}function YD(e){return e}function XD(e){return e}function JD(e){return e}function ZD(e){return e}function QD(e){return e}function e1(e){return e}function t1(e){return e}function r1(e){return e}function o1(e){return e}function n1(e){return e}function i1(e){return e}function s1(e){return e}function a1(e){return{handled:!0,result:e}}function d1(){return{handled:!1}}function c1(e){return e}function l1(e){return e}function p1(e){return e}function u1(e){return e}function m1(e){return e}function f1(e){return e}function _1(e){return e}function h1(e){return e}function g1(e){return e}(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]="68ca9ab1-91e0-5020-859e-fc1f1f6dcc56")}catch{}})();function Vb(e={},t={}){return new ge(t).extension(void 0,{...e,migrate:!0})}function Kb(e={},t={}){return new ge(t).packageMigrate(e)}(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]="d0b86c6a-67f0-52f2-90b8-d1058e8f2284")}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]="604d7dcb-9fea-5631-8a72-b2a7ff3278f8")}catch{}})();function N(e){if(typeof e!="string"||!_e(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function Wb(e){let t=N(e.window_start),r=N(e.window_end);if(t>=r||!Number.isFinite(e.max_failure_rate)||e.max_failure_rate<0||e.max_failure_rate>=1||!Number.isSafeInteger(e.min_completed_attempts)||e.min_completed_attempts<1)throw new TypeError("Invalid reliability window policy.");if(e.families.length===0||e.families.some(o=>typeof o!="string"||o.trim().length===0)||new Set(e.families).size!==e.families.length)throw new TypeError("Expected unique, nonempty reliability families.");return{start:t,end:r}}function Yb(e,t,r,o){let n=new Map(t.map(i=>[i,[]])),s=new Set;for(let i of e){if(typeof i.id!="string"||i.id.trim().length===0||s.has(i.id))throw new TypeError("Invalid or duplicate reliability attempt identity.");s.add(i.id);let a=n.get(i.family);if(!a||!["success","failure","pending"].includes(i.outcome)||i.cause!==void 0&&(!["product","infrastructure","unknown"].includes(i.cause)||i.outcome!=="failure"))throw new TypeError("Invalid reliability attempt family, outcome or cause.");let d=N(i.started_at);if(i.repaired_at!==void 0&&(N(i.repaired_at)<d||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");d>=r&&d<o&&a.push(i)}return n}function L1(e,t){let{start:r,end:o}=Wb(t),n=[...Yb(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(_=>_.outcome==="failure"),d=i.filter(_=>_.outcome!=="pending").length,c=d===0?null:a.length/d,l=a.filter(_=>_.repaired_at!==void 0&&N(_.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let _ of a)p[_.cause??"unknown"]+=1;let f=[];return d<t.min_completed_attempts&&f.push("insufficient_completed_attempts"),c!==null&&c>t.max_failure_rate&&f.push("failure_rate"),{family:s,attempts:i.length,completed:d,failed:a.length,pending:i.length-d,failure_rate:c,affected_days:[...new Set(a.map(_=>new Date(N(_.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(_=>(N(_.repaired_at)-N(_.started_at))/6e4).sort((_,g)=>_-g),unresolved:a.length-l.length,causes:p,violations:f,ok:f.length===0}});return{schema:"pm-reliability-window/1",window_start:new Date(r).toISOString(),window_end:new Date(o).toISOString(),ok:n.every(s=>s.ok),families:n}}(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]="773ad2b6-326e-5483-bdce-a377f935cb31")}catch{}})();function pe(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function Xb(e){if(!Array.isArray(e)||e.length<2)throw new TypeError("Expected at least two artifact ledgers.");let t=new Map;for(let r of e){if(r===null||typeof r!="object"||!pe(r.name)||t.has(r.name)||r.complete!==!0)throw new TypeError("Expected unique complete artifact ledgers.");if(!Array.isArray(r.identities))throw new TypeError("Invalid or duplicate artifact identity.");let o=new Set(r.identities);if(o.size!==r.identities.length||[...o].some(n=>!pe(n)))throw new TypeError("Invalid or duplicate artifact identity.");t.set(r.name,o)}if([...t.values()].every(r=>r.size===0))throw new TypeError("Empty inventories cannot establish artifact reconciliation.");return t}function Jb(e,t){if(!Array.isArray(e))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let r=new Map;for(let o of e){if(o===null||typeof o!="object"||!pe(o.identity)||r.has(o.identity)||!pe(o.reason)||!pe(o.evidence))throw new TypeError("Expected unique evidence-backed artifact exceptions.");let n=o.missing_from;if(!Array.isArray(n)||n.length===0||n.length>=t.length||new Set(n).size!==n.length||[...n].some(s=>!t.includes(s)))throw new TypeError("Invalid artifact exception ledger signature.");r.set(o.identity,o)}return r}function $1(e,t=[]){let r=Xb(e),o=[...r.keys()].sort(),n=Jb(t,o),s=[...new Set([...r.values()].flatMap(c=>[...c]))].sort(),i=[],a=new Set;for(let c of s){let l=o.filter(_=>!r.get(_).has(c));if(l.length===0)continue;let p=n.get(c),f=p!==void 0&&JSON.stringify([...p.missing_from].sort())===JSON.stringify(l);f&&a.add(c),i.push({identity:c,present_in:o.filter(_=>r.get(_).has(c)),missing_from:l,disposition:f?{reason:p.reason,evidence:p.evidence}:null})}let d=[...n.keys()].filter(c=>!a.has(c)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(c=>c.disposition!==null)&&d.length===0,counts:Object.fromEntries(o.map(c=>[c,r.get(c).size])),findings:i,stale_exceptions:d}}(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]="fca4e9bb-3a30-512e-9929-565ab6c11c54")}catch{}})();import{createHash as ho,createHmac as Zb,randomBytes as Qb,timingSafeEqual as eT}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]="98283845-5c48-5901-b54c-c8cc8138427b")}catch{}})();var T$="dev.unbrained.pm/progressive-tool-discovery",C$=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),tT=Object.freeze(["pm_discover","pm_next","pm_context","pm_search","pm_get"]),B=Object.freeze({lexical:.4,semantic:.2,graph:.1,permission:.15,freshness:.05,usage:.1}),rT=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),go={core:0,standard:1,full:2,internal:3},yo=Object.freeze(["core","standard","full"]),oT=new Set(["core","standard","full","custom"]),bo=new Set(te.map(({family:e})=>e)),nT=Qb(32);function xe(e,t){if(typeof e!="string")throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);let r=e[Symbol.iterator](),o=0;for(let n=r.next();!n.done;n=r.next())if(o+=1,o>4096)throw new b(`pm tool discovery ${t} must be a string of at most 4096 Unicode characters.`,64);return e}function To(e){if(!Number.isInteger(e)||Number(e)<1||Number(e)>100)throw new b("pm tool discovery limit must be from 1 through 100.",64);return Number(e)}function Co(e){if(e!=="unbounded"&&(!Number.isInteger(e)||Number(e)<128))throw new b("pm tool discovery outputBudget must be unbounded or an integer of at least 128.",64);return e==="unbounded"?e:Number(e)}function Eo(e){if(e!==void 0&&typeof e!="boolean")throw new b("pm tool discovery includeSchema must be a boolean.",64);return e===!0}function So(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new b("pm tool discovery options must be an object.",64)}function iT(e){if(!Array.isArray(e))throw new b("pm tool discovery candidates must be an array.",64);for(let[t,r]of e.entries()){if(r===null||typeof r!="object"||Array.isArray(r))throw new b(`pm tool discovery candidate ${t} must be an object.`,64);if(typeof r.name!="string"||r.name.trim().length===0)throw new b(`pm tool discovery candidate ${t} name must be a non-empty string.`,64);if(typeof r.description!="string"||r.description.trim().length===0)throw new b(`pm tool discovery candidate ${t} description must be a non-empty string.`,64);if(r.inputSchema===null||typeof r.inputSchema!="object"||Array.isArray(r.inputSchema))throw new b(`pm tool discovery candidate ${t} inputSchema must be an object.`,64);if(r.authorized!==void 0&&typeof r.authorized!="boolean")throw new b(`pm tool discovery candidate ${t} authorized must be a boolean.`,64)}}function E$(e){if(So(e),e.family!==void 0&&(typeof e.family!="string"||!bo.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!yo.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:xe(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:To(e.limit)}:{},...e.cursor!==void 0?{cursor:xe(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:Eo(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:Co(e.outputBudget)}:{}}}function sT(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function ue(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function aT(e,t){let r=ue(e);if(r.length===0)return 0;let o=new Set(ue(t)),n=r.filter(i=>o.has(i)).length,s=t.toLowerCase().includes(e.toLowerCase())?.25:0;return Math.min(1,n/r.length+s)}function dT(e,t){let r=ue(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=ue(t),s=r.filter(a=>n.some(d=>d.startsWith(a)||a.startsWith(d))).length,i=o.includes(e.toLowerCase())?.2:0;return Math.min(1,s/r.length+i)}function _o(e){return ho("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function wo(e,t,r){return Zb("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function cT(e,t,r){let o={version:1,offset:t,signature:wo(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function lT(e,t,r,o){if(e===void 0)return 0;try{let n=JSON.parse(Buffer.from(e,"base64url").toString("utf8")),s=n.offset;if(n.version!==1||typeof s!="number"||!Number.isInteger(s)||s<0||s>r||typeof n.signature!="string")throw new Error("cursor fields do not match the request");let i=Buffer.from(wo(t,s,o),"base64url"),a=Buffer.from(n.signature,"base64url");if(a.length!==i.length||!eT(a,i))throw new Error("cursor signature does not match the request");return s}catch(n){throw new b("Invalid or stale pm tool discovery cursor; restart discovery without cursor.",64,{reason:String(n)})}}function gt(e,t,r){return{value:sT(e),weight:t,available:r!=="unavailable",source:r}}function ke(e,t,r){return gt(e??t,r,e===void 0?"computed":"host")}function pT(e,t,r){let o=Object.hasOwn(he,e.name)?he[e.name]:"help",n=Ve(o),s=`${e.name} ${e.description} ${o} ${n}`,i=aT(t,s),a=new Set(ue(t)),d={lexical:gt(i,B.lexical,"computed"),semantic:ke(e.signals?.semantic,dT(t,s),B.semantic),graph:ke(e.signals?.graph,a.has(n)||a.has(o)?1:0,B.graph),permission:gt(1,B.permission,"authorization"),freshness:ke(e.signals?.freshness,1,B.freshness),usage:ke(e.signals?.usage,tT.includes(e.name)?1:0,B.usage)},c=Object.values(d).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:Ke(o),family:n,score:Number(c.toFixed(6)),signals:d,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function uT(e){if(e.cursorIntegrityKey!==void 0&&(!(e.cursorIntegrityKey instanceof Uint8Array)||e.cursorIntegrityKey.byteLength<32))throw new b("pm tool discovery cursorIntegrityKey must contain at least 32 bytes.",64);if(e.tier!==void 0&&(typeof e.tier!="string"||!yo.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);if(e.family!==void 0&&(typeof e.family!="string"||!bo.has(e.family)))throw new b("pm tool discovery family must be a declared capability family.",64);if(e.profile!==void 0&&(typeof e.profile!="string"||!oT.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function mT(e){let t=xe(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");xe(e.cursor===void 0?"":e.cursor,"cursor");let r=To(e.limit===void 0?10:e.limit),o=Co(e.outputBudget===void 0?1200:e.outputBudget);return uT(e),{query:t,includeSchema:Eo(e.includeSchema),limit:r,budget:o,maximumTier:go[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Ao(e,t,r){let o=r??e.tools.reduce((i,a,d)=>i+(d===0?0:1)+Buffer.byteLength(JSON.stringify(a),"utf8"),0),n={...e,tools:[]},s=0;for(let i=0;i<4;i+=1){let a=Buffer.byteLength(JSON.stringify({...n,token_cost:{estimated_tokens:s,budget:t,within_budget:!0}}),"utf8"),d=Math.ceil((a+o)/4);if(d===s)break;s=d}return s}function fT(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>pT(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&go[o.tier]<=r.maximumTier&&(t.family===void 0||o.family===t.family)).sort((o,n)=>n.score-o.score||(o.name<n.name?-1:o.name>n.name?1:0))}function _T(e,t,r){if(t==="unbounded")return[...e];let o=[],n=0;for(let[s,i]of e.entries()){let a=n+(s===0?0:1)+Buffer.byteLength(JSON.stringify(i),"utf8");if(Ao(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function S$(e,t={}){iT(e),So(t);let r=mT(t),o=t.cursorIntegrityKey??nT,n=fT(e,t,r),s=_o({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=lT(t.cursor,s,n.length,o),a=n.slice(i,i+r.limit),d=[];r.includeSchema||d.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),i+r.limit<n.length&&d.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let c={result_type:"pm_tool_discovery",contract_version:1,query:r.query,profile:r.profile,total:n.length,ranking_policy:{version:1,formula:"weighted_sum_then_name",weights:B},cache:{key:_o({fingerprint:s,cursorIntegrityKey:ho("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:rT}},l=(g,T=g.length)=>{let E=i+T,q=E<n.length,R=[...d];return T<a.length&&R.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...c,tools:[...g],returned:T,has_more:q,...q?{next_cursor:cT(s,E,o)}:{},omission_receipt:{has_omissions:R.length>0,omitted:R}}},p=g=>{let T=l(g),E=Ao(T,r.budget);return{...T,token_cost:{estimated_tokens:E,budget:r.budget,within_budget:r.budget==="unbounded"||E<=r.budget}}},f=_T(a,r.budget,g=>l([],g)),_=p(f);if(a.length>0&&f.length===0){let g=p([a[0]]).token_cost.estimated_tokens;throw new b(`pm tool discovery outputBudget is too small to return a tool; increase it to at least ${g}.`,64,{required:String(g)})}if(r.budget!=="unbounded"&&_.token_cost.estimated_tokens>r.budget)throw new b(`pm tool discovery outputBudget is too small; at least ${_.token_cost.estimated_tokens} estimated tokens are required for this page.`,64,{required:String(_.token_cost.estimated_tokens)});return _}(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]="39336651-18af-56d7-b658-5e735a2adad5")}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]="e8053a05-36e4-58a6-ad9c-6d03ef7435db")}catch{}})();export{IO as ACTIONABILITY_ORDERING_KINDS,Fd as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,ad as ACTIVITY_FLAG_CONTRACTS,ei as AGENT_PROVENANCE_DIMENSIONS,Hs as AGGREGATE_FLAG_CONTRACTS,Ma as APPEND_FLAG_CONTRACTS,nM as ASSURANCE_ACTIONS,iM as ASSURANCE_DECLARATION_KINDS,gI as ASSURANCE_DOCUMENT_VERSION,Ja as ASSURANCE_FLAG_CONTRACTS,yI as ASSURANCE_GATE_TRIGGERS,bI as ASSURANCE_MEASUREMENT_SOURCE_KINDS,lP as ASSURANCE_PRESET_IDS,mI as AssuranceEvaluationRefusalError,uI as AssuranceMutationRefusalError,fI as AssuranceSourceResolutionError,Gn as BASELINE_ITEM_FORMAT_VERSION,Jy as BOUNDARY_FIXTURE_CAPTURE_SOURCES,Lw as BRIEF_LIST_FIELDS,ri as BUILTIN_AGENT_PROVENANCE_ADAPTERS,Y as BUILTIN_CORPUS_SHAPES,ti as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,cn as BUILTIN_ITEM_TYPE_VALUES,zt as BUILTIN_PROFILES,OC as BUILTIN_RELATIONSHIP_KINDS,Ld as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,sd as CALENDAR_FLAG_CONTRACTS,ka as CLAIM_FLAG_CONTRACTS,Tc as CLOSE_ACTION_OPTION_KEYS,Ia as CLOSE_FLAG_CONTRACTS,Pa as CLOSE_MANY_FLAG_CONTRACTS,Fa as CLOSE_TASK_FLAG_CONTRACTS,Vs as COMMENTS_FLAG_CONTRACTS,ZT as COMMON_MUTATION_COMMAND_OPTION_KEYS,bd as COMPLETION_FLAG_CONTRACTS,_n as CONFIDENCE_TEXT_VALUES,aa as CONFIG_FLAG_CONTRACTS,Dd as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,qM as CONTEXT_EVALUATION_METRIC_NAMES,cd as CONTEXT_FLAG_CONTRACTS,Tw as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,jt as CONTEXT_OUTPUT_VALUES,WM as CONTEXT_PACKING_PROFILES,LM as CONTEXT_RECENCY_EPOCH,GM as CONTEXT_RELEVANCE_SERVICE,$M as CONTEXT_RELEVANCE_SIGNAL_NAMES,JM as CONTEXT_SIGNAL_SET_VERSION,XM as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,ZM as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,cw as CONTEXT_USAGE_LIMITS,yd as CONTRACTS_FLAG_CONTRACTS,rd as COPY_FLAG_CONTRACTS,Kd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Yd as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Wd as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,TT as CREATE_DIRECT_CLOSE_REASON_DEFAULT,Za as CREATE_FLAG_CONTRACTS,kE as CURRENT_HISTORY_HASH_ALGORITHM,Yw as CURRENT_HISTORY_ITEM_HASH_VERSION,Jw as CURRENT_HISTORY_RECORD_HASH_VERSION,Un as CURRENT_ITEM_FORMAT_VERSION,r0 as ContextSignalStore,lw as ContextUsageValidationError,RM as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,b0 as DEFAULT_CHILD_SAMPLE_LIMIT,Nw as DEFAULT_COMPACT_LIST_FIELDS,Tv as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,af as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,sP as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,bM as DEFAULT_TERMINAL_TRANSITION_POLICY,s0 as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,bR as DEFECT_ESCAPE_CLASSES,TR as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Na as DELETE_FLAG_CONTRACTS,un as DEPENDENCY_KIND_VALUES,ud as DEPS_FLAG_CONTRACTS,Xs as DOCS_FLAG_CONTRACTS,Wa as DUPLICATES_FLAG_CONTRACTS,DP as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,wR as DefectRecurrencePolicyParseError,fd as EVAL_FLAG_CONTRACTS,Qm as EVAL_METRIC_NAMES,of as EVAL_QUERY_SET_CONTRACT,nf as EVAL_QUERY_SET_EXAMPLE,rf as EVAL_QUERY_SET_SCHEMA_ID,dd as EVENTS_FLAG_CONTRACTS,Ua as EVENT_FLAG_CONTRACTS,Lo as EXECUTABLE_COMMAND_ALIASES,me as EXIT_CODE,ya as EXTENSION_ACTIVATE_FLAG_CONTRACTS,ga as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Aa as EXTENSION_ADOPT_FLAG_CONTRACTS,X0 as EXTENSION_CAPABILITIES,yT as EXTENSION_CAPABILITY_CONTRACT,hT as EXTENSION_CAPABILITY_CONTRACT_VERSION,gT as EXTENSION_CAPABILITY_LEGACY_ALIASES,Mn as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,wa as EXTENSION_CATALOG_FLAG_CONTRACTS,ba as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,ha as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Sa as EXTENSION_DOCTOR_FLAG_CONTRACTS,_a as EXTENSION_EXPLORE_FLAG_CONTRACTS,da as EXTENSION_FLAG_CONTRACTS,la as EXTENSION_INIT_FLAG_CONTRACTS,ma as EXTENSION_INSTALL_FLAG_CONTRACTS,Ca as EXTENSION_MANAGE_FLAG_CONTRACTS,Ta as EXTENSION_MIGRATE_FLAG_CONTRACTS,J0 as EXTENSION_POLICY_MODES,Z0 as EXTENSION_POLICY_SURFACES,Ea as EXTENSION_RELOAD_FLAG_CONTRACTS,ek as EXTENSION_SANDBOX_PROFILES,ca as EXTENSION_SCOPE_FLAG_CONTRACTS,Q0 as EXTENSION_TRUST_MODES,fa as EXTENSION_UNINSTALL_FLAG_CONTRACTS,DR as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,NR as EXTERNAL_DEPENDENCY_SOURCE_KIND,LR as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,Xv as ExtensionCommandError,Ys as FILES_FLAG_CONTRACTS,od as FOCUS_FLAG_CONTRACTS,Va as GC_FLAG_CONTRACTS,Gw as GET_DEPTH_INPUT_VALUES,Fw as GET_DEPTH_VALUES,ld as GET_FLAG_CONTRACTS,qs as GLOBAL_FLAG_CONTRACTS,jp as GRAPH_DURABLE_CACHE_MIN_ITEMS,Up as GRAPH_DURABLE_CACHE_VERSION,md as GRAPH_FLAG_CONTRACTS,iR as GRAPH_QUERY_DEFAULTS,De as GRAPH_SUBCOMMAND_VALUES,pd as GUIDE_FLAG_CONTRACTS,Ya as HEALTH_FLAG_CONTRACTS,ta as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,rP as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,lM as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,ra as HISTORY_COMPACT_FLAG_CONTRACTS,hi as HISTORY_EVENT_CLASSIFICATION_VERSION,Js as HISTORY_FLAG_CONTRACTS,PE as HISTORY_HASH_ALGORITHMS,cv as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,Qs as HISTORY_REDACT_FLAG_CONTRACTS,ea as HISTORY_REPAIR_FLAG_CONTRACTS,yl as INIT_AGENT_GUIDANCE_MODE_VALUES,sa as INIT_FLAG_CONTRACTS,va as INSTALL_FLAG_CONTRACTS,fn as ISSUE_SEVERITY_VALUES,ed as ITEM_COMPLETE_FLAG_CONTRACTS,OP as ITEM_LATEST_TIMESTAMP_FIELDS,bT as ITEM_METADATA_KEY_ORDER,Qa as ITEM_MUTATE_FLAG_CONTRACTS,td as ITEM_REOPEN_FLAG_CONTRACTS,vs as ITEM_REVISION_CONFLICT_CHANGE_LIMIT,As as ITEM_REVISION_CONFLICT_CODE,TP as ITEM_SCALAR_MISSING_VALUE,ln as ITEM_TYPE_VALUES,vP as ITEM_UNION_COLLECTION_FIELDS,t0 as JsonFileContextSignalStoreAdapter,Ws as LEARNINGS_FLAG_CONTRACTS,ME as LEGACY_HISTORY_HASH_ALGORITHM,Au as LINKED_TEST_ENV_NAME_PATTERN,vu as LINKED_TEST_PM_CONTEXT_MODE_VALUES,wu as LINKED_TEST_PROTECTED_ENV_KEYS,Ou as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,xd as LIST_COMMANDER_STRING_OPTION_CONTRACTS,Dw as LIST_COMMAND_DEFAULT_PROJECTIONS,rk as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,zs as LIST_FILTER_FLAG_CONTRACTS,zR as LIST_SORT_FIELDS,HR as LIST_SORT_ORDER_VALUES,gi as MAINTENANCE_HISTORY_OPERATIONS,y0 as MAX_CHILD_PROJECTION_ITEMS,vT as MAX_WORKFLOW_POLICIES,OT as MAX_WORKFLOW_POLICY_TERMS,Ga as MEET_FLAG_CONTRACTS,G0 as MERGE_DRIVER_ARTIFACT_VALUES,Zs as MERGE_FLAG_CONTRACTS,$e as MERGE_SUBCOMMAND_VALUES,B0 as MUTATION_EVENT_WIRE_BUDGET,se as MemoryRelationshipGraphAdapter,$d as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,hd as NEXT_FLAG_CONTRACTS,Sm as NEXT_OUTPUT_VALUES,OM as NEXT_RANKING_POLICIES,Ks as NOTES_FLAG_CONTRACTS,HO as OutputEnvelopeFitError,pa as PACKAGE_FLAG_CONTRACTS,ua as PACKAGE_INIT_FLAG_CONTRACTS,$a as PAUSE_TASK_FLAG_CONTRACTS,bc as PLAN_CREATE_METADATA_PARAMETER_KEYS,ia as PLAN_FLAG_CONTRACTS,Ui as PLAN_SHOW_DEPTH_VALUES,Ye as PLAN_SUBCOMMANDS,km as PLAN_TEMPLATE_NAMES,db as PM_AGENT_TASK_ACCOUNTING_MODES,ut as PM_AGENT_TASK_TRANSCRIPT_VERSION,Mo as PM_BULK_LIFECYCLE_COMMAND_ALIASES,ts as PM_CLI_ERROR_DETAILS_LIMITS,as as PM_CLI_EXPECTED_ERROR_NAME,pR as PM_CLI_GRAMMAR_CONTRACT,sR as PM_CLI_GRAMMAR_NOUNS,Wo as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,aR as PM_CLI_SHARED_VERBS,No as PM_COMMAND_ALIAS_CONTRACTS,te as PM_COMMAND_CAPABILITY_CONTRACTS,It as PM_COMMAND_DESTINATION_CONTRACTS,aI as PM_COMMAND_EXIT_CONTRACTS,sI as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,Ri as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,oI as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,qe as PM_COMMAND_POSITIONAL_CONTRACTS,jc as PM_COMMAND_VISIBILITY_CONTRACTS,XI as PM_COMPLETE_LIST_FINDING_CODES,$O as PM_CONTEXT_INTENTS_FILE,Cw as PM_CONTEXT_INTENT_CONTRACTS,Po as PM_CONTEXT_OPS_COMMAND_ALIASES,zo as PM_CORE_COMMAND_NAMES,G as PM_CORPUS_SHAPE_SCHEMA,Xo as PM_DEPRECATED_TOOL_ACTIONS,Si as PM_DIAGNOSTIC_DEGRADATION_STEPS,wi as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,Ei as PM_DIAGNOSTIC_OUTPUT_CLASSES,Jo as PM_DISCOVERABLE_TOOL_ACTIONS,Kr as PM_EPISODE_SCHEMA,tI as PM_ERROR_CODE_CATALOG,JR as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,Qr as PM_EXACT_COVERAGE_METRICS,Fo as PM_EXTENSION_CAPABILITY_CONTRACTS,Ho as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,Uo as PM_EXTENSION_POLICY_MODE_CONTRACTS,qo as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,Bo as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,Go as PM_EXTENSION_SERVICE_NAME_CONTRACTS,jo as PM_EXTENSION_TRUST_MODE_CONTRACTS,Ni as PM_GENERIC_REFUSAL_GUIDANCE,jI as PM_GITATTRIBUTES_END,UI as PM_GITATTRIBUTES_START,qI as PM_GITATTRIBUTES_V2_END,BI as PM_GITATTRIBUTES_V2_START,Yc as PM_GITIGNORE_END,Wc as PM_GITIGNORE_START,fM as PM_HISTORY_ATTESTATION_CONTRACT,Io as PM_HISTORY_COMMAND_ALIASES,WE as PM_HISTORY_OPERATION_ALIASES,XE as PM_HISTORY_OPERATION_CONTRACT,YE as PM_HISTORY_OPERATION_PATTERNS,Ko as PM_ITEM_ACTION_SUBCOMMANDS,VE as PM_ITEM_HISTORY_OPERATIONS,it as PM_MCP_APPS_EXTENSION,Pr as PM_MCP_APPS_SERVER_CAPABILITY,Ae as PM_MCP_APPS_SPEC_VERSION,xr as PM_MCP_APP_CONTRACTS,kr as PM_MCP_APP_MIME_TYPE,tT as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,gN as PM_MCP_HTTP_PROTOCOL_VERSION,bg as PM_MCP_INPUT_REQUEST_METHODS,rr as PM_MCP_LEGACY_PROTOCOL_VERSIONS,tr as PM_MCP_LOG_LEVELS,w as PM_MCP_META_KEYS,T$ as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,C$ as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,Vc as PM_MCP_PROMPT_CONTRACTS,H as PM_MCP_PROTOCOL_VERSION,Hc as PM_MCP_RESOURCE_CONTRACTS,at as PM_MCP_SKILLS_DRAFT_REVISION,Nr as PM_MCP_SKILLS_EXTENSION,Ay as PM_MCP_SKILLS_SERVER_CAPABILITY,P as PM_MCP_SKILL_LIMITS,Se as PM_MCP_SUBSCRIPTION_ID_META_KEY,re as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,cN as PM_MCP_TASKS_EXTENSION,Pg as PM_MCP_TASK_STATUSES,he as PM_MCP_TOOL_COMMAND_CONTRACTS,cS as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,ps as PM_MUTATION_ACTION_CONTRACTS,Ne as PM_NAMESPACED_COMMAND_ALIASES,Hr as PM_OBSERVATION_SCHEMA,Ci as PM_OUTPUT_BUDGET_CLASSES,Ti as PM_OUTPUT_DEGRADATION_STEPS,kt as PM_OUTPUT_ENVELOPE_KINDS,$t as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,Vo as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,Dt as PM_PACKAGE_RESOURCE_KINDS,Be as PM_POSITIONAL_ACTION_CONTRACTS,Oc as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Ac as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,FS as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,XS as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,DS as PM_READ_OUTPUT_DIMENSIONS,$S as PM_READ_OUTPUT_OPTION_FLAGS,MS as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,PS as PM_READ_OUTPUT_SESSION_MIN_TOKENS,GC as PM_READ_OUTPUT_SURFACES,GS as PM_READ_OUTPUT_SURFACE_CONTRACTS,dS as PM_READ_ROW_CONTRACTS,aS as PM_READ_ROW_JQ_SELECTOR,Fi as PM_RECOVERY_ECHO_FIELDS,lD as PM_RECOVERY_REFERENCE_FIELDS,ce as PM_RECOVERY_REFERENCE_KINDS,kb as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,lo as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,gD as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,co as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,ko as PM_RELOCATED_COMMAND_ALIASES,qd as PM_REPRODUCIBLE_PROCESS_ENV,dI as PM_SUCCESS_EXIT_CODES,Yo as PM_TOOL_ACTIONS,Cc as PM_TOOL_ACTION_PARAMETER_CONTRACTS,vc as PM_TOOL_PARAMETERS_SCHEMA,wc as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Sc as PM_TOOL_PARAMETERS_SCHEMA_VERSION,gc as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Vr as PM_VERDICT_SCHEMA,KE as PM_WORKSPACE_HISTORY_OPERATIONS,qr as PM_WORKSPACE_RECIPE_SCHEMA,na as PROFILE_FLAG_CONTRACTS,Jt as PROFILE_LINT_CODES,Xt as PROFILE_LINT_DIMENSIONS,qt as PROFILE_NAMES,Xe as PROFILE_SUBCOMMANDS,b as PmCliError,ge as PmClient,JI as PmCompleteListValidationError,y as PmMcpAuthorizationError,or as PmMcpInputRequiredError,Ar as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,nr as PmMcpRequestStateReplayGuard,Ur as PmMcpSkillRegistry,_r as PmMcpSubscriptionRegistry,ot as PmMcpTaskStore,dw as QUERY_CURSOR_CONTRACT,Ra as REINDEX_FLAG_CONTRACTS,tv as REINDEX_LOCK_ID,pt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,La as RELEASE_FLAG_CONTRACTS,ja as REMIND_FLAG_CONTRACTS,At as RESERVED_ITEM_FIELD_NAMES,xa as RESTORE_FLAG_CONTRACTS,mn as RISK_VALUES,KO as RelationshipEventLog,WO as RelationshipEventStore,z as RelationshipGraph,Ue as RelationshipKindRegistry,oa as SCHEMA_FLAG_CONTRACTS,Nd as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,ok as SEARCH_EXTENSION_FLAG_DEFINITIONS,gd as SEARCH_FLAG_CONTRACTS,Hu as SEMANTIC_ATTRIBUTION_LIMITS,ET as SETTINGS_DEFAULTS,uf as SNAPSHOT_SCHEMA,$I as SOURCE_CONTEXT_ACCESS_ENV,FI as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Xu as START_BLOCKED_REFUSAL_CODE,Yu as START_BLOCKER_ENFORCEMENT_DEFAULT,Da as START_TASK_FLAG_CONTRACTS,Ka as STATS_FLAG_CONTRACTS,pn as STATUS_VALUES,Bs as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,yi as SUBSTANTIVE_HISTORY_OPERATIONS,Xw as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,Zw as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,xC as SUPPRESS_HOST_OUTPUT_MARKER,za as TELEMETRY_FLAG_CONTRACTS,Uf as TELEMETRY_SUBCOMMANDS,qa as TEST_ALL_FLAG_CONTRACTS,Ba as TEST_FLAG_CONTRACTS,Ha as TEST_RUNS_FLAG_CONTRACTS,Lf as TEST_RUN_MEASUREMENT_LIMIT,mc as TOOL_ACTIVITY_OPTION_CONTRACTS,tc as TOOL_AGGREGATE_OPTION_CONTRACTS,cc as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,uc as TOOL_CALENDAR_OPTION_CONTRACTS,pc as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,fc as TOOL_CONTEXT_OPTION_CONTRACTS,sc as TOOL_CREATE_OPTION_CONTRACTS,ic as TOOL_CREATE_OPTION_CONTRACT_SOURCE,_c as TOOL_DEPS_OPTION_CONTRACTS,hc as TOOL_GRAPH_OPTION_CONTRACTS,ec as TOOL_LIST_FILTER_OPTION_CONTRACTS,rc as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,nc as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,oc as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,lc as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,dc as TOOL_UPDATE_OPTION_CONTRACTS,ac as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,CT as TYPE_TO_FOLDER,AC as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,Xd as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,Zd as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,Jd as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,nd as UPDATE_FLAG_CONTRACTS,id as UPDATE_MANY_FLAG_CONTRACTS,Oa as UPGRADE_FLAG_CONTRACTS,Xa as VALIDATE_FLAG_CONTRACTS,AT as WORKFLOW_POLICY_ACTIONS,VI as WORKFLOW_POLICY_DOCUMENT_SCHEMA,HI as WORKFLOW_POLICY_SCHEMA,_d as WORKSPACE_FLAG_CONTRACTS,TA as WORKSPACE_HISTORY_ID,mf as WORKSPACE_SNAPSHOT_ACTIONS,zl as WorkspaceGraphCache,QO as WorkspaceTransactionInterruptedError,_u as _testOnly,g0 as _testOnlyAggregateCommand,Bl as _testOnlyConfigCommand,S0 as _testOnlyGetCommand,tu as _testOnlyHealthCommand,El as _testOnlyInit,bl as _testOnlyInitAgentGuidance,yk as _testOnlyItemTransaction,V0 as _testOnlyMutationEvents,f0 as _testOnlyNextCommand,F0 as _testOnlySearchCommand,dP as _testOnlySimilarity,$m as _testOnlyTemplates,uu as _testOnlyValidateCommand,Y0 as _testOnlyWorkspacePosition,Tk as abandonItemTransaction,nR as abandonWorkspaceTransaction,fP as acceptAssuranceProposals,lu as acknowledgeLinkedTests,Gl as acknowledgeUnknownAuthorHistoryEvents,Fl as acknowledgeUnknownAuthorHistoryEventsFromTransport,Cv as acquireItemMetadataDerivedIndexLock,je as acquireLock,Qn as acquireLockLease,Qk as activateExtensionForTest,JC as activateExtensions,Zu as admitStartWithOpenBlockers,Zn as agentSessionEnvironment,j_ as aggregate,wf as analyzeAgentProvenanceDescriptorCoverage,ER as analyzeDefectChangeRisk,oM as analyzeDefectRecurrenceCoverage,mp as analyzeDuplicateItems,XO as analyzeGraphImpact,Mc as analyzeHierarchyIntegrity,JO as analyzeKnowledgeGraph,lI as analyzePmCommandExitConformance,Zo as analyzePmToolActionParity,zP as analyzeReconciliationDiscard,YO as analyzeRelationshipExecution,kp as analyzeRelationshipSchedule,pg as analyzeSdkActionCoverage,Pt as analyzeSdkCliParameterCompleteness,Q_ as append,Bi as appendHistoryEntry,wA as appendWorkspaceAuditEvent,SA as appendWorkspaceHistoryChange,FT as applyAcceptanceCriteriaMutations,uP as applyAssurancePreset,vd as applyBootstrapPagerPolicy,ZP as applyClosureTimestampFix,vw as applyContextIntentProjection,Em as applyContextTagProjection,VR as applyFilterValueEcho,iv as applyHistoryPatch,Bd as applyInvocationAuthorOverride,Ql as applyPathMigrations,KS as applyReadOutputDimensions,qS as applyReadOutputIncludeModes,xS as applyReadOutputSessionReferences,SE as applyRegisteredItemFieldDefaultsAndValidation,op as applyStandaloneNote,$s as applyStoredExtensionMigrationState,UT as applyTagRemovals,SM as applyTerminalOrderingPolicy,np as artifactKey,mC as asRecordClone,uC as asRecordOrNull,He as assembleWorkspaceRelationshipGraph,tP as assertCompleteListResult,xx as assertExtensionBlueprint,kx as assertExtensionCapabilityUsage,fx as assertExtensionDeactivated,Dx as assertExtensionManifestCompatible,Lx as assertExtensionManifestMatchesBlueprint,$x as assertExtensionPreflight,Nc as assertHierarchyMutationAllowed,pM as assertHistoryCompactTarget,VP as assertHistoryRepairTarget,Xi as assertInitializedTracker,ep as assertLinkedArtifactMutationIsUnambiguous,Ux as assertMcpClientCapabilities,Gx as assertMcpProtocolHeader,ab as assertMemoryRelationshipGraphAdapterConformance,qT as assertNoUnknownCsvKeys,Su as assertNonHierarchyCardinalityMutationAllowed,_x as assertPackageManifest,xA as assertParentReferenceIsNotSelf,KN as assertPmMcpSkillsCapability,Nx as assertProjectProfile,hv as assertProjectRuntimeCompatibility,mv as assertProjectRuntimeFormatGuard,lS as assertProjectionModeChoice,Yi as assertReadableTrackerRoot,hx as assertRegisteredCommandContract,vx as assertRegisteredCommandOverride,Ex as assertRegisteredExporter,gx as assertRegisteredFlags,yx as assertRegisteredHook,Cx as assertRegisteredImporter,Sx as assertRegisteredItemField,wx as assertRegisteredItemType,Mx as assertRegisteredMigration,Ox as assertRegisteredParserOverride,Rx as assertRegisteredPreflightOverride,Ax as assertRegisteredProfile,Ix as assertRegisteredRendererOverride,bx as assertRegisteredSearchProvider,Px as assertRegisteredServiceOverride,Tx as assertRegisteredVectorStoreAdapter,MC as assertRelationshipEdgeAllowed,ro as assertRelationshipGraphAdapterConformance,DT as assertSchemaPreviewSupported,qf as assertTestMeasurementRun,zw as assertWellFormedOutputText,TI as assuranceAssertionUpdateIsLoosening,Iw as attachContextIntentReceipt,pw as attachContextUsageServingReceipt,su as attachLinkedTestMutationProvenance,iu as attachLinkedTestProvenance,Ze as attachMcpServerInfo,hS as attachOutputOmissionReceipt,Mw as attachOutputTokenAccounting,Pw as attachReadOutputContracts,NS as attachReadOutputSessionReceipt,rl as auditMergeAttributeFence,zI as auditMergeDriverConfiguration,Fp as auditWorkspaceRelationshipGraph,kN as authorizeMcpHttpRequest,Xn as boundAgentEpisodeIdentity,AS as boundReadOutputRows,ym as buildChildrenByParent,k0 as buildCompactSearchFilterSummary,KR as buildContentFilterEcho,e0 as buildContextSignalSnapshot,zy as buildCorpusShapeItemPlan,CR as buildDefectRecurrenceIndex,ul as buildExtensionDescribeResult,fl as buildExtensionInstallPlan,WR as buildGovernanceMissingFilterEcho,qA as buildInvalidTypeError,T0 as buildItemChildrenRollup,hk as buildItemCompletionMutations,FM as buildItemContextRelevanceCandidates,Ov as buildItemNotFoundError,E0 as buildItemSchedule,QP as buildLinkedFileRepairReport,SN as buildMcpAuthorizationDiscoveryUrls,_g as buildMcpCompleteResult,Bx as buildMcpDiscoverResult,RN as buildMcpDynamicRegistrationMetadata,_N as buildMcpHttpRequestHeaders,Xx as buildMcpInputRequiredResult,EN as buildMcpProtectedResourceMetadata,el as buildMergeAttributePatterns,Ec as buildPmActionToolInputSchema,TD as buildPmRefusalClosureCensus,aP as buildRelationshipContext,kv as buildSearchCorpus,Nv as buildSemanticCorpusInput,YP as buildStatusRoleWarnings,Wi as buildTrackerInitializationRecovery,Gv as buildVectorizationEmbeddingIdentity,Uv as buildVectorizationEmbeddingMetadata,x0 as buildVerboseSearchFilters,KI as buildWorkflowCompletenessCheck,a0 as buildWorkspaceMemorySnapshot,Yn as canonicalDocument,QT as canonicalizeCommandOptionKey,xk as canonicalizeCommandSuggestions,DM as canonicalizeContextRecencyCoordinate,RC as canonicalizeRelationshipKind,pD as censusPmRecoveryReferenceProducers,eP as certifyCompleteListResult,Yk as checkExtensionManifestCompatibility,Dh as claim,$h as claimNext,oP as classifyHistoryAuthorEvent,bi as classifyHistoryEvent,BP as classifyHistoryMergeReceiptReferences,qC as classifyHostEnvironmentFault,L0 as classifyImplicitSemanticFallbackReason,qn as classifyItemFormatVersion,Hf as classifyLinkedTestCommandSafety,Vf as classifyLinkedTestFailure,fE as clearActiveExtensionHooks,Vp as clearDurableGraphCache,rS as clearFocusedItem,Qf as clearWorkspaceContractsCache,Lh as close,yu as closeItem,Hh as closeTask,Id as coalesceRepeatedListFlags,PO as collectBlockedByIds,kO as collectBlockedByIdsFromCorpus,mw as collectContextUsageDeliveredItemIds,Fc as collectDanglingDependencyReferences,NO as collectDependencyBlockedIds,Dc as collectDuplicateDependencyRows,$p as collectDuplicateRelationshipEdgeGroups,N0 as collectErrorCauseCodes,Pc as collectHierarchyRelations,Cr as collectMcpHeaderAnnotations,Gc as collectMissingDependencyTargetIds,Eu as collectNewOrderingCycleWarnings,Np as collectOrderingCycles,$c as collectOrderingStorageContradictions,UO as collectPackageContextIntentContracts,Gt as collectPackageExtensionDirectories,CE as collectRegisteredItemFieldNames,UE as collectRuntimeCreateFieldValues,zA as collectRuntimeFilterValues,jE as collectRuntimeUpdateFieldValues,mm as collectSubtreeIds,kn as collectUsedExtensionCapabilities,eC as commandOptionFlagLabel,z_ as comments,S_ as commitImportedItem,gk as commitItemCompletion,_k as commitItemMutations,tR as commitWorkspaceTransaction,js as compactFlagAliasContracts,fm as compareCriticalItems,lv as comparePmDateVersions,ZO as compareRelationshipSnapshots,fC as compareTimestampStrings,xM as compileHistoryProvenanceMatcher,ww as composeContextIntentContracts,Bk as composeExtension,Wk as composeExtensionPackage,DO as computeActionabilityReport,gA as computeHistoryDiff,Pp as computeRelationshipCentrality,Ip as computeRelationshipDominators,ql as computeWorkspaceGraphFingerprint,th as config,mE as consumeAfterCommandAffectedItems,L_ as context,Rw as contextIntentRowId,Gh as copy,Kf as countFailureCategories,SS as countReadOutputRows,kh as create,pP as createAssurancePreset,tM as createAssuranceWorkspaceContext,hC as createCheckpointId,ZI as createCompleteListOptions,ZC as createCoreCommandHookContext,Zr as createCorpusShapeMeasurement,AI as createEmptyAssuranceDocument,UC as createEmptyExtensionRegistrationRegistry,Jv as createExtensionCommandError,Ns as createExtensionCommandSdk,In as createExtensionContributionInventory,Fx as createExtensionTestHarness,ji as createHistoryEntry,uO as createLazyModule,WI as createLifecycleCompletenessPolicies,xN as createMcpStaticBearerVerifier,lN as createMcpTaskStore,vv as createMutationGuardSdk,pS as createOutputOmissionReceipt,cs as createPmCliExpectedError,xs as createPmCliProgram,vi as createPmCommandOutputBudget,tw as createQueryFingerprint,sb as createRelationshipGraphScaleFixture,Z as createRelationshipGraphSnapshot,wt as createRelationshipKindRegistry,Hd as createReproducibleProcessRunner,P0 as createSearchCursorFingerprint,QC as createSerialQueue,YT as createStdinTokenResolver,vC as createUnknownSubcommandError,LT as createWorkflowPolicyEvaluator,ff as createWorkspaceSnapshot,ex as deactivateExtensionForTest,d1 as declineServiceOverride,Ow as decodeContextIntentCursor,pO as decodeHtmlEntitiesInOptions,Tr as decodeMcpHttpHeaderValue,xw as decodePmTableRows,iw as decodeQueryCursor,ow as decodeQueryCursorEnvelope,nw as decodeQueryCursorState,QS as decodeReadOutputContinuationCursor,Jk as decodeToon,FN as decoratePmMcpToolsWithApps,sp as dedupeLinkedArtifacts,wE as defaultConfigScope,UM as defaultScoreContextCandidates,f1 as defineAfterCommandHook,u1 as defineBeforeCommandHook,m1 as defineBeforeMutationHook,XD as defineCommand,o1 as defineCommandOverride,W as defineCorpusShape,oL as defineEpisodeSpecification,p1 as defineExporter,Uk as defineExtension,jk as defineExtensionBlueprint,WD as defineExtensionManifest,JD as defineFlag,l1 as defineImporter,QD as defineItemField,ZD as defineItemType,e1 as defineMigration,Ny as defineObservationContract,g1 as defineOnIndexHook,h1 as defineOnReadHook,_1 as defineOnWriteHook,n1 as defineParserOverride,Oi as definePmCommandOutputBudget,rI as definePmCommandOutputEnvelope,ZR as definePmErrorCodeCatalog,i1 as definePreflightOverride,YD as defineProjectProfile,c1 as defineRendererOverride,t1 as defineSearchProvider,s1 as defineServiceOverride,r1 as defineVectorStoreAdapter,Fy as defineVerdictContract,ve as defineWorkspaceRecipe,Uh as deleteItem,Tf as deleteWorkspaceSnapshot,kC as dependencyToRelationship,J_ as deps,mP as deriveAssuranceProposals,XP as deriveClosureTimestamp,zk as deriveExtensionCapabilities,nk as deriveMutationTransactionId,pI as derivePmBulkMutationEffect,uD as derivePmRecoveryReferenceObligations,xp as deriveRelationshipDeadlines,sl as deriveSchemaEvolutionMigrationId,oO as deriveTelemetryCommandResolution,WA as describeAllowedTransitions,DI as describeExtensionActivation,Hk as describeExtensionBlueprint,SC as describeFlagScalarValueFailure,tm as describeItemOwnershipConflict,Ps as describeItemRevisionChanges,rL as describeObservationCost,Wt as describeProfileComposition,Yt as describeProjectProfile,Sk as describeReadCompletenessControls,Zv as describeUnknownError,ci as detectAgentIdentity,mi as detectHarnessIdentity,Op as detectRelationshipCommunities,li as diagnoseAgentIdentity,Gp as diffRelationshipAuditSnapshots,Ff as diffTestRunMeasurements,Qx as digestMcpRequestParameters,YC as discoverExtensions,yn as discoverNearbyPmRoot,S$ as discoverPmTools,uv as discoverProjectRuntimeVersionPins,X_ as docs,q_ as duplicates,Bp as durableGraphCachePath,Kp as durableGraphCacheStatus,jn as effectiveItemFormatVersion,wO as emitTelemetryErrorEvent,E_ as emptyImportedDocument,EP as encodeItemScalarDecisionValue,br as encodeMcpHttpHeaderValue,kw as encodePmTableRows,rw as encodeQueryCursor,ZS as encodeReadOutputContinuationCursor,Zk as encodeToon,yA as enforceHistoryStreamPolicyForItem,bA as enforceHistoryStreamPolicyForItems,YR as enrichCliFlagInvocationContract,Mt as enrichCliFlagInvocationContracts,av as ensureMaterializedHistoryTarget,Jc as ensurePmGitignore,Wl as ensureScope,Yv as ensureSentryCommandTracing,Wv as ensureSentryInit,C_ as ensureTrackerInitialized,Ap as enumerateRelationshipPaths,Pi as estimatePmOutputTokens,OI as evaluateAssuranceAssertion,RI as evaluateAssuranceGate,CL as evaluateBoundaryFixtures,zM as evaluateContextRanking,SR as evaluateDefectGateEvidence,vI as evaluateMeasurement,tf as evaluateMetricFloors,ms as evaluateMutationGuard,Pf as evaluateProvenanceCoverage,L1 as evaluateReliabilityWindow,Of as evaluateSemanticAttributionCoverage,_p as evaluateSimilarityGovernance,KA as evaluateTransition,Gy as evaluateVerdictContract,NT as evaluateWorkflowPolicies,es as executeEmbeddingBatchesWithRetry,$v as executeVectorDelete,Fv as executeVectorReset,Dv as executeVectorUpsert,Py as executeWorkspaceRecipe,rp as expandAddGlobEntries,gp as explainSourceTraceability,hM as exportAttestation,Vh as extension,Wh as extensionActivate,Yh as extensionDeactivate,Kh as extensionList,Vb as extensionMigrate,jP as extractHistoryMergeReceiptDispositions,UP as extractHistoryMergeReceiptReferences,IN as extractMcpTraceContext,ov as extractPatchFailureContext,ru as extractReferencedPmItemIdsFromCommand,ib as federateRelationshipGraphSnapshots,K_ as files,W_ as filesDiscover,Y_ as filesLookup,fw as finalizeContextUsageDelivery,Xy as findCoverageDeficits,fp as findDuplicateClusters,Qc as findGitWorkspaceRoot,LE as findHistoryIdentityDiscontinuities,ll as findInstalledNpmPackageCandidate,$N as findPmMcpAppByUri,xo as findPmNamespacedCommand,Rp as findRedundantRelationshipEdges,Mp as findRelationshipCutStructure,up as findSimilarItems,SO as finishTelemetryCommand,VO as fitOutputEnvelope,EC as flattenFlagListValue,Ky as flushTelemetryQueue,Bh as focus,vp as forEachMatchedRelationshipEdge,Dp as formatDuplicateEdgeGroup,kc as formatHierarchyRelation,Lp as formatOrderingStorageContradiction,lR as formatPmPositionalActionFlagTip,Ym as formatProfileApplyHuman,Wm as formatProfileLintHuman,Vm as formatProfileListHuman,Km as formatProfileShowHuman,cl as formatSchemaEvolutionMigrationHuman,$0 as formatVectorIndexRecoveryWarnings,W0 as formatWorkspacePositionHuman,vh as gc,Hi as generateItemId,G_ as get,lE as getActiveCommandResult,Ew as getActiveContextIntentContracts,Nn as getActiveExtensionRegistrations,MN as getActiveMcpTraceContext,PI as getAssuranceDeclaration,dg as getContracts,eS as getFocusedItem,Cn as getHistoryPath,zO as getItemAt,Tn as getItemPath,hs as getMutationActionContract,Xc as getPmGitignoreBlock,bn as getSettingsPath,e_ as getWorkspaceContracts,CA as getWorkspaceHistoryPath,Z_ as graph,qp as graphAuditBaselinePath,Rf as groupHistoryByEpisode,a1 as handleServiceOverride,jx as hasMcpClientExtension,DN as hasPmMcpAppsCapability,ze as hasSubcommandFlagContractsForCommand,jv as hasVectorizationEmbeddingIdentityChanged,Bv as hasVectorizationVectorDimensionChanged,sA as hashDocument,aA as hashDocumentForVersion,dA as hashEmptyDocument,eA as hashHistoryPatch,Qw as hashHistoryRecord,tA as hashHistoryStream,SP as hashItemScalarDecisionValue,Ah as health,Cp as hierarchyAncestors,Ep as hierarchyDescendants,Ph as historyCompact,Mh as historyCompactBulk,NE as historyDigest,kM as historyEntryMatchesProvenance,pv as historyItemHashVersionForRuntime,Oh as historyRedact,Rh as historyRepair,Ih as historyRepairAll,MO as indexBlockedByIds,xc as indexHierarchyRelations,qv as inferConsistentVectorDimension,Ai as inferPmOutputBudgetClass,eh as init,QI as inspectCompleteListResult,jC as inspectExtensionManifestSchema,xl as inspectHistoryAuthorStream,MP as inspectMergeReceiptEvidence,_v as inspectProjectRuntimeCompatibility,Es as inspectStaleInProgressItems,ug as inspectStaticExtensionInventory,WP as inspectStatusRoleAssignments,EA as inspectWorkspaceHistoryState,_f as inspectWorkspaceSnapshot,il as installMergeFence,qx as interpretMcpResultType,Am as isAlreadyClaimedError,tO as isCommanderError,vk as isCompatibleRecoveryFlag,Rl as isErrnoError,vO as isExternalDependencyReference,OO as isExternalDependencySourceKind,fe as isFileMissingError,Li as isGenericRefusalRequired,Di as isGenericRefusalWhy,LC as isHostOutputSuppressed,ds as isItemAlreadyExistsError,Ms as isItemRevisionConflict,CP as isItemScalarMissingValue,$P as isLegacyMergeReceiptSummary,h as isMcpRecord,fs as isMutationAction,PC as isOrderingRelationshipKind,MA as isPlaceholderReferenceToken,rs as isPmCliErrorDetails,ls as isPmCliExpectedError,en as isPmExtensionCapabilityContract,rn as isPmExtensionPolicyModeContract,on as isPmExtensionPolicySurfaceContract,tn as isPmExtensionServiceNameContract,cI as isPmKnownExitCode,nI as isPmMutationReceipt,We as isPmSuccessfulExitCode,ss as isPmTokenBudgetRecovery,Qo as isPmToolAction,FP as isPreDurableCloneLocalReceiptSummary,GP as isPreDurableDispositionEligibleReference,fv as isProjectMutatingInvocation,mO as isPureSnakeCaseAlias,WS as isReadOutputBudgetExceeded,IS as isReadOutputSessionReference,Ak as isReadProjectionRecoveryFlag,mS as isReadRowContract,Rc as isRuntimeRecord,JA as isSettingsReadFallback,Ju as isStartTransition,hO as isTerminalPlanMode,qE as isTerminalStatus,On as isTimestampLiteral,ck as itemDocumentToMutationOptions,C0 as itemHasSchedule,Pn as jaccardSimilarity,V_ as learnings,wC as levenshteinDistanceWithinLimit,Al as limitAnnotationEntries,au as linkedTestTrustFingerprint,Vk as lintExtensionBlueprint,BC as lintExtensionManifestSchema,Zt as lintProjectProfile,D_ as list,ni as listAgentProvenanceAdapters,Rd as listAliasPluralKeys,$_ as listAllComplete,wv as listAllDocumentCandidatesCached,Qi as listAllItemMetadata,Av as listAllItemMetadataLight,II as listAssuranceDeclarations,LI as listAssuranceVerdicts,By as listBuiltinCorpusShapes,Nk as listCoreClosedDomainContracts,Uw as listGetProjectionFields,yP as listInvalidProvenanceHistoryStreamIds,$w as listListProjectionFields,kP as listMergeReceipts,_s as listMutationActions,q0 as listMutationEvents,fo as listPmCommandFlagBudgets,qc as listPmCommandsForFamily,Bc as listPmCommandsForTier,Me as listPmFlagLexicon,zD as listPmFlagSpellingInventory,zc as listPmMcpToolsForProfile,xD as listPmRequiredArgumentRefusalContracts,ND as listPmSubcommandRefusalContracts,Kt as listProfiles,$D as listTrackerPreflightRecoveryContracts,uk as listUpsertKeyCandidates,hf as listWorkspaceSnapshots,jO as loadContextIntentRuntimeLayers,Fm as loadCreateTemplateOptions,XC as loadExtensions,Yp as loadGraphAuditBaseline,mk as loadGuardedRuntimeSchema,yC as loadMutationCheckpoint,x as loadRelationshipGraphAdapter,Ji as locateItem,BT as looksLikeGenericKeyValueEntry,wS as mapReadOutputRows,xP as markMergeReceiptReconciled,HA as matchesRuntimeFilters,CO as maybeRunFirstUseTelemetryPrompt,Hy as measureCorpusShapePlan,Ki as measureItemMetadataReadWork,GT as mergeAdditiveTags,qk as mergeExtensionBlueprints,wP as mergeHistoryStreams,RP as mergeItemDocuments,IP as mergeJsonDocuments,Pd as mergeLinkedTestTwoTokenEntries,AP as mergeRelationshipEventStreams,Tm as mergeSortedWarnings,_O as migrateItemFilesToFormat,Iv as mutateItem,Rv as mutateItemWithHistoryContext,AA as mutateWorkspaceJsonWithHistory,U_ as next,si as normalizeAgentProvenanceAdapterValue,wl as normalizeAnnotationTransportOptions,hI as normalizeAssuranceEvaluation,_I as normalizeAssuranceMutation,Md as normalizeBootstrapInvocation,RE as normalizeBulkIdsValue,Lc as normalizeDependencyGraphTarget,UR as normalizeDependencySeedId,GR as normalizeDependencySourceKind,Os as normalizeExpectedItemHash,Rn as normalizeExtensionContributionInventory,QE as normalizeHistoryOperationForWrite,gP as normalizeInvalidHistoryProvenance,yR as normalizeItemAddressInvocation,Bn as normalizeItemFormatVersion,zi as normalizeItemId,Vn as normalizeItemMetadata,jR as normalizeItemReference,Od as normalizeLegacyExtensionActionSyntax,tp as normalizeLinkedPath,PA as normalizeParentReferenceValue,Ht as normalizeProfileName,qi as normalizeRawItemId,zS as normalizeReadOutputIncludeModeOptions,uA as normalizeReplayPatchOps,gs as normalizeSimilarityText,BE as normalizeStatusForRegistry,Hn as normalizeStatusInput,$E as normalizeStatusInputWithRegistry,eO as normalizeThrownExitCode,H_ as notes,vn as nowIso,zp as openDurableGraphCache,Zx as openMcpRequestState,nL as openPmEpisode,Sp as orderingPredecessors,wp as orderingSuccessors,YM as packContextCandidates,_m as packRankedContextItems,ig as packageActivate,ng as packageCatalog,sg as packageDeactivate,rg as packageDescribe,eg as packageDoctor,Zh as packageInstall,Xh as packageLifecycle,Jh as packageList,tg as packageManage,Kb as packageMigrate,og as packageReload,Qh as packageUninstall,aw as paginateQueryRows,Yl as parseAddEntries,Xl as parseAddGlobEntries,Ol as parseAnnotationTextInput,ik as parseAtomicMutationControls,Ad as parseBootstrapCommandName,Ed as parseBootstrapGlobalOptions,wd as parseBootstrapHelpRequest,kd as parseBootstrapTypeValue,OE as parseBulkIdsText,pm as parseContextDepth,am as parseContextFocusFields,FO as parseContextIntentDeclarations,um as parseContextSections,QM as parseContextSignalSnapshot,jT as parseCsvKv,vR as parseDefectChangeRiskRequest,rM as parseDefectRecurrenceCoverageRequest,AR as parseDefectRecurrencePolicy,ef as parseEvalMetricFloors,sf as parseEvalQuerySet,Rs as parseExpectHashSpecs,dC as parseExtensionLongFlagToken,Zp as parseGraphSubcommand,_M as parseHistoryAttestation,PM as parseHistoryProvenanceFilters,OR as parseIntegerLimit,zE as parseItemDocument,sk as parseItemMutationBatch,BA as parseLimit,Du as parseLinkedTestAssertionEqualsMap,$u as parseLinkedTestAssertionGteMap,Pu as parseLinkedTestBoolean,Mu as parseLinkedTestContextMode,Iu as parseLinkedTestEnvClear,Ru as parseLinkedTestEnvSet,Fu as parseLinkedTestJsonEntries,Lu as parseLinkedTestMinLines,Nu as parseLinkedTestRegexList,xu as parseLinkedTestStringList,ku as parseLinkedTestWorkspaceContextMode,Eg as parseMcpCachePolicy,mg as parseMcpImplementation,tt as parseMcpInputRequests,dr as parseMcpInputResponses,Vg as parseMcpSubscriptionFilter,Zl as parseMigrateEntries,PR as parseMultiValueFilter,iI as parseMutationReceipt,JT as parseOptionalNonNegativeInteger,XT as parseOptionalNumber,nD as parsePmAgentTaskTranscriptCorpus,E$ as parsePmToolDiscoveryOptions,RR as parsePriority,xR as parsePriorityFilterSet,kS as parseReadOutputSession,EE as parseRegisteredItemFieldAssignments,ae as parseRelationshipGraphSnapshot,Jl as parseRemoveEntries,hp as parseSourceLineRange,FA as parseStatusFilterCsv,MR as parseStringFilterSet,nn as parseTags,Df as parseTestRunMeasurements,IR as parseType,kR as parseTypeFilterSet,$l as parseUnknownAuthorHistoryEventCoordinates,RT as parseWorkflowPolicy,IT as parseWorkflowPolicyDocument,_0 as partitionDecisionEntries,hA as patchPathToChangedField,sn as pathExists,zh as pauseTask,Hp as persistDurableGraphResult,XA as persistSelectedItemFormat,iP as planAgentIdentityVocabularyMutation,i0 as planCompletedAtBackfill,_l as planExtensionDirectoryCopy,Gk as planItemMutationDocument,Qt as planProfileApplication,dD as planRelationshipEventBackfill,Jp as planRelationshipRemediation,al as planSchemaEvolutionMigration,Ll as planUnknownAuthorHistoryAcknowledgment,gf as planWorkspaceSnapshotRestore,mR as positionalShapeKey,fR as positionalSignatureKey,Xk as preflightExtension,bs as prepareSimilarityText,HT as preserveMutationStdinTokenFields,zT as preserveMutationStdinTokenLiterals,Fk as previewItemMutationDocument,fk as previewItemMutations,Ww as printError,Kw as printResult,bh as profile,Eh as profileApply,Sh as profileLint,Th as profileList,Ch as profileShow,uE as projectAfterCommandItemSnapshot,dm as projectContextFocusRows,Nf as projectFleetAttributionAnalytics,MM as projectHistoryProvenance,Gi as projectLeanRecoveryPayload,jw as projectPmBriefListEnvelope,Bw as projectPmBriefSearchEnvelope,is as projectPmCliErrorContextDetails,os as projectPmCliErrorDetails,ki as projectPmDiagnosticOutput,xi as projectPmDiagnosticText,kf as projectProvenanceCoverageAnalytics,pu as projectValidateCounts,_P as promoteAssuranceAssertion,uw as propagateContextUsageServingReceipt,OL as pruneCompileCacheGenerations,MI as putAssuranceDeclaration,kI as putAssuranceDeclarationBundle,gv as queryItemMetadataIndex,yv as queryLinkedFileMetadataIndex,bv as querySimilarItemMetadataIndex,$f as queryTestRunMeasurementsBelow,Sn as quoteCommandArg,En as quoteWindowsCommandArg,kk as rankCommandPaths,vl as readAnnotationEntries,pi as readAuthorEnvironment,r_ as readBooleanOption,bw as readContextUsageAffinity,o_ as readCsvListOption,Ds as readExtensionMigrationState,an as readFileIfExists,Gd as readFirstStringFromCommanderOptions,Ud as readFirstValueFromCommanderOptions,If as readHistoryAnalyticsWindow,iS as readHistoryEntries,_i as readHistorySnapshot,Ef as readImprovementLedger,Ev as readItemMetadataDerivedIndexState,Is as readItemRevision,bk as readItemTransaction,Zi as readLocatedItem,ES as readOutputBudgetCollections,JS as readOutputCollectionFingerprint,CS as readOutputContinuationRowCollections,bS as readOutputContinuationRowPaths,BS as readOutputIncludeModeOptions,TS as readOutputRowCollections,yS as readOutputRowPaths,LS as readOutputSessionRemainingTokens,Ft as readPmPackageManifest,Zf as readRequiredString,GE as readRuntimeFieldOptionValue,Vi as readSettings,bO as readSettingsSection,ZA as readSettingsWithMetadata,jd as readStringArrayFromCommanderOptions,t_ as readStringOption,Qv as readThrownExitCode,zv as readVectorizationStatusLedger,dv as readWorkflowPolicies,PT as readWorkflowPolicyField,GO as readWorkspaceContextIntentContracts,o0 as readWorkspaceContextSignals,d0 as readWorkspaceMemory,K0 as readWorkspacePosition,rR as readWorkspaceTransaction,_A as reanchorHistoryEntries,$1 as reconcileArtifactLedgers,xn as reconcileExtensionCapabilityUsage,OA as reconcileWorkspaceJsonHistory,pE as recordAfterCommandAffectedItem,NI as recordAssuranceVerdict,Bu as recordClaimSemanticAttribution,hw as recordContextUsageDelivery,_w as recordContextUsageServing,gw as recordContextUsageTouch,yw as recordContextUsageTouches,zu as recordFocusSemanticAttribution,Cf as recordImprovementObservation,qu as recordReleaseSemanticAttribution,Sv as refreshItemMetadataDerivedIndex,ol as refreshMergeAttributeFenceIfInstalled,OS as refreshReadOutputDeliveredCounts,Vv as refreshSearchArtifactsForMutation,ii as registerAgentProvenanceAdapters,$R as registerExternalDependencyResolver,oi as registerHarnessSignalDescriptors,sS as registerOutputMaterialFieldGroups,Fh as release,vS as rememberReadOutputFocusRows,xI as removeAssuranceDeclaration,dn as removeFileIfExists,cp as renameArtifactsResultKey,om as renderCalendarMarkdown,nm as renderCalendarToon,Cm as renderContextMarkdown,ml as renderExtensionDescribeMarkdown,pl as renderExtensionSurfaceMarkdown,v_ as renderGuideMarkdown,Ik as renderMissingOptionRetry,h0 as renderNextMarkdown,Lk as renderPmClosedDomainHelp,wn as renderPmCommand,$o as renderPmCommandAliasMigrationHint,Kc as renderPmCommandVisibilityMarkdown,VD as renderPmFlagLexiconMarkdown,GN as renderPmMcpAppHtml,CD as renderPmRefusalClosureCensusMarkdown,UA as renderRowsAsCsv,jA as renderRowsAsTable,Nh as reopen,sv as replayHistoryToTarget,lA as replayToCanonicalItemDocument,cA as replayToItemDocument,ZE as requireHistoryOperation,CM as requireTerminalReason,EM as requireTerminalReasonWithRecovery,nA as resealHistoryRewrite,aE as resetActiveExtensionRuntimeState,Vl as resetWorkspaceGraphCache,Jn as resolveAgentSessionContextFromSignals,kl as resolveAnnotationIndex,Il as resolveAnnotationInput,nS as resolveAuthor,fi as resolveAuthorIdentity,IA as resolveBodyFileContent,qy as resolveBuiltinCorpusShape,rm as resolveCalendarOutputFormat,QR as resolveCanonicalPmErrorCodeContract,IC as resolveCanonicalRelationshipKind,oS as resolveClaimPrincipal,IE as resolveCliBulkIdsInput,oC as resolveCommandOptionPolicyState,vL as resolveCompileCacheGeneration,n0 as resolveCompletionTimestamp,FC as resolveConfiguredPmPackageRoot,qR as resolveContentFieldFilters,Aw as resolveContextIntentContract,cm as resolveContextOutputFormat,lm as resolveContextTokenBudget,wM as resolveCreateExplicitEmptyFlag,ws as resolveDeclaredBlockers,v0 as resolveEffectiveSearchMode,Pv as resolveEmbeddingProviders,CC as resolveExtensionFlagValueContract,hl as resolveExtensionInstallSourceIdentity,cC as resolveExtensionLongFlagName,Ls as resolveExtensionMigrationStatePath,WC as resolveExtensionRoots,FR as resolveExternalDependencyReference,TC as resolveFlagValueKind,sC as resolveGlobalPmRoot,w_ as resolveGuideOutputFormat,Sf as resolveHistoryEpisodeGroupIdentity,xE as resolveHistoryHashAlgorithm,JE as resolveHistoryOperation,IM as resolveHistoryProvenanceDimensions,AO as resolveHistorySubject,nv as resolveHistoryTarget,R0 as resolveHybridSemanticWeight,gn as resolveImplicitPmRoot,_C as resolveIsoOrRelative,xO as resolveItemBlockers,RO as resolveItemExecutionRole,dk as resolveItemMutationDocument,em as resolveItemOwnershipConflict,hn as resolveItemTypeRegistry,DE as resolveItemTypesFilePath,Ck as resolveLifecycleVerbRecovery,aC as resolveLinkedResourcePositionalRecovery,Wf as resolveLinkedTestFailureExitCode,ou as resolveLinkedTestSourceRef,nu as resolveLinkedTestSourceWorkspaceRoot,du as resolveLinkedTestTrust,cu as resolveLinkedTestTrustBatch,Kg as resolveMcpAcknowledgedSubscriptionFilter,Je as resolveMcpRequestContext,Zc as resolveMergeInstallContext,Pk as resolveMisnestedCommandPath,BR as resolveMissingMetadataFilters,Rk as resolveMissingOptionPlaceholder,uS as resolveModePairedOutputOmissionReceipt,m0 as resolveNextOutputFormat,_S as resolveOutputOmissionReceipt,$C as resolvePmCliVersion,Do as resolvePmCommandAlias,Ve as resolvePmCommandCapabilityFamily,Nt as resolvePmCommandExitContract,L as resolvePmCommandOperation,Ii as resolvePmCommandOutputBudget,xt as resolvePmCommandOutputEnvelope,dR as resolvePmCommandPositionalContract,An as resolvePmCommandScopeArgs,Ke as resolvePmCommandVisibilityTier,Mi as resolvePmDiagnosticOutputBudget,eI as resolvePmErrorCodeContract,jb as resolvePmFlagSemanticConcept,Le as resolvePmHistoryOperation,Vx as resolvePmMcpExecutableInvocation,DC as resolvePmPackageRootFromModule,cR as resolvePmPositionalActionContract,Td as resolvePmPositionalActionFlagContracts,Ge as resolvePmRoot,yc as resolvePmToolCustomFieldCollision,NA as resolvePriority,Vt as resolveProfile,tl as resolveProjectMergeTypeFolders,sw as resolveQueryCursorStart,Ek as resolveReadCompletenessControls,wk as resolveReadOptionRetryArgs,HS as resolveReadOutputDimensions,YS as resolveReadOutputEncoding,RS as resolveReadOutputRecoveryBudget,US as resolveReadOutputSurface,fS as resolveReadRowContract,Ok as resolveRecoveryCommandName,AE as resolveRegisteredSearchProvider,vE as resolveRegisteredVectorStoreAdapter,zd as resolveReproducibleProcessEnvironment,Fn as resolveRuntimeFieldRegistry,$n as resolveRuntimeStatusRegistry,Mv as resolveSearchCorpusFields,A0 as resolveSearchMaxResults,M0 as resolveSearchPage,O0 as resolveSearchScoreThreshold,I0 as resolveSearchTuning,xv as resolveSemanticCorpusCharacterLimit,ju as resolveSemanticLineageIds,ev as resolveSettingsWithSemanticRuntimeDefaults,GI as resolveSourceContextWritePolicy,Wu as resolveStartTaskInProgressStatus,ee as resolveSubcommandFlagContractsForCommand,ST as resolveTelemetryErrorCategory,Kv as resolveTelemetrySourceAttribution,TM as resolveTerminalReason,pk as resolveTransactionSchema,rC as resolveTypeDefinition,tC as resolveTypeName,GA as resolveTypeSynonym,VA as resolveTypeWorkflows,Dl as resolveUnknownAuthorAcknowledgmentSelector,D0 as resolveVectorIndexRecovery,Lv as resolveVectorStores,Ic as resolveWorkspaceRelationshipKindRegistry,iC as resolveWorkspaceRoot,jh as restore,bC as restoreCheckpointItems,RA as restoreWorkspaceJsonFromHistory,bf as restoreWorkspaceSnapshot,yf as restoreWorkspaceSnapshotWithRecovery,lg as runAction,_E as runActiveBeforeMutationHooks,gE as runActiveCommandHandler,hE as runActiveOnIndexHooks,Dn as runActiveOnReadHooks,Ln as runActiveOnWriteHooks,yE as runActiveParserOverride,bE as runActivePreflightOverride,TE as runActiveServiceOverride,sm as runActivity,KC as runAfterCommandHooks,Xm as runAggregate,Ml as runAnnotationCommand,gu as runAppend,sM as runAssuranceAction,aM as runAssuranceDispatch,VC as runBeforeCommandHooks,im as runCalendar,vm as runClaim,Om as runClaimNext,bu as runClose,Tu as runCloseMany,Mm as runCloseTask,Ul as runComments,O_ as runCompletion,jl as runConfig,Bt as runContext,KM as runContextEvaluationCorpus,HM as runContextEvaluationScenario,Cu as runCopy,Gu as runCreate,Uu as runDelete,Kl as runDeps,lp as runDocs,cP as runDuplicates,df as runEval,lf as runEvent,gl as runExtension,Gs as runExtensionMigrateAction,Fs as runExtensionMigrations,yp as runFiles,Tp as runFilesDiscover,bp as runFilesLookup,xf as runFleetAttributionAnalytics,Ku as runFocus,fu as runGc,Jm as runGet,Qp as runGraph,A_ as runGuide,eu as runHealth,w0 as runHistory,yM as runHistoryAttest,cM as runHistoryCompact,uM as runHistoryCompactBulk,qP as runHistoryMaintenance,mM as runHistoryRedact,HP as runHistoryRepair,KP as runHistoryRepairAll,Sl as runInit,Tl as runInitAgentGuidance,hu as runLearnings,dp as runLinkedArtifacts,Yf as runLinkedTests,Uc as runList,cf as runMeet,U0 as runMergeDriver,nl as runMergeInstall,LP as runMergeReceiptEvidenceReport,NP as runMergeReceiptReport,j0 as runMergeReconcile,wm as runNext,Dm as runNotes,Pm as runPauseTask,xm as runPlan,Hm as runProfileApply,zm as runProfileLint,Bm as runProfileList,qm as runProfileShow,Mf as runProvenanceCoverageAnalytics,tx as runRegisteredCommandForTest,sx as runRegisteredCommandOverrideForTest,mx as runRegisteredExporterForTest,ox as runRegisteredHookForTest,ux as runRegisteredImporterForTest,px as runRegisteredMigrationForTest,rx as runRegisteredMutationGuardForTest,nx as runRegisteredParserOverrideForTest,ix as runRegisteredPreflightOverrideForTest,ax as runRegisteredRendererOverrideForTest,cx as runRegisteredSearchProviderForTest,dx as runRegisteredServiceOverrideForTest,lx as runRegisteredVectorStoreAdapterForTest,er as runReindex,Rm as runRelease,pf as runRemind,vM as runReopen,Nm as runRestore,dl as runSchemaEvolutionMigration,Zm as runSearch,Vy as runSearchRefreshWorkerEntrypoint,R_ as runStartBackgroundRun,Im as runStartTask,Gf as runStats,jf as runTelemetry,Um as runTemplatesList,Gm as runTemplatesSave,jm as runTemplatesShow,Xf as runTest,Jf as runTestAll,I_ as runTestRunsList,M_ as runTestRunsLogs,x_ as runTestRunsResume,P_ as runTestRunsStatus,k_ as runTestRunsStop,N_ as runTestRunsWorker,Qu as runUpdate,Lm as runUpdateMany,Ut as runUpgrade,mu as runValidate,cg as runWithActiveExtensions,D as runWithAgentSessionContext,YA as runWithConfigurationOnlySettings,Sw as runWithContextIntentContracts,BO as runWithDiscoveredContextIntentContracts,ai as runWithHarnessDetectionSignals,PN as runWithMcpTraceContext,Vd as runWithReproducibleProcessEnvironment,di as runWithWorkspaceHarnessSignalDescriptors,zr as runWithWorkspaceRecipe,YI as runWorkflowPolicyAction,dM as runWorkspaceTransactionGc,Xp as saveGraphAuditBaseline,JP as scanClosureTimestamps,hP as scanExtensionHostVersions,Nl as scanHistoryAuthorAttribution,zn as scanItemFormatVersions,us as scanMutationSecrets,bP as scanProvenanceResolverHealth,Ss as scanStaleInProgressItems,eM as scanStorageIntegrity,rh as schema,ch as schemaAddField,ah as schemaAddStatus,ih as schemaAddType,mh as schemaApplyPreset,fh as schemaInferTypes,oh as schemaList,ph as schemaListFields,gh as schemaRemapStatus,lh as schemaRemoveField,dh as schemaRemoveStatus,sh as schemaRemoveType,hh as schemaRenameField,_h as schemaRenameType,nh as schemaShow,uh as schemaShowField,yh as schemaShowStatus,Mk as scoreCommandPathMatch,jM as scoreContextCandidates,BM as scoreContextCandidatesWithActiveExtensions,Ts as scoreItemSimilarity,LD as scorePmGrammarRefusalClosure,wD as scorePmRefusalClosure,Cs as scorePreparedItemSimilarity,FD as scoreTrackerPreflightRecoveryClosure,rA as sealHistoryRecord,Jx as sealMcpRequestState,F_ as search,p0 as searchWorkspaceMemory,u0 as searchWorkspaceMemoryReadResult,LO as selectActionableEntries,ew as selectCursorSemanticOptions,T_ as selectImportAuthor,AN as selectMcpClientRegistrationMode,l0 as selectWorkspaceMemory,c0 as selectWorkspaceMemoryRollups,Vu as semanticAttributionAffinity,dO as sentryCaptureCliError,sO as sentryDiscardCommandSpan,aO as sentryFinishCommandSpan,lO as sentryFlush,cO as sentryLogCliUsageError,nO as sentrySetCommandContext,iO as sentryStartCommandSpan,Wn as serializeItemDocument,Dk as serializeNdjsonRows,$k as serializeNdjsonStream,Ly as serveDeclaredObservation,dE as setActiveCommandContext,cE as setActiveCommandResult,tE as setActiveExtensionCommands,eE as setActiveExtensionHooks,rE as setActiveExtensionParsers,oE as setActiveExtensionPreflight,sE as setActiveExtensionRegistrations,iE as setActiveExtensionRenderers,nE as setActiveExtensionServices,tS as setFocusedItem,yO as settingsSectionRevision,gO as shouldCompletePlanOnClose,Wp as shouldPersistDurableGraphCache,WT as shouldResolveMutationStdinTokenField,KT as shouldResolveMutationStdinTokens,rv as shouldRunSearchRefreshInForeground,pp as similarityAdvisoryWarnings,gS as sliceReadOutputRowCollection,ns as snapshotPmCliErrorContext,ip as sortLinkedArtifacts,$T as splitAcceptanceCriteria,fO as splitCommaList,Kn as splitFrontMatter,VS as stabilizeReadOutputReceiptEstimates,I as stableStringify,ak as stableUpsertValue,wT as stableValueEquals,qh as startTask,EO as startTelemetryCommand,B_ as stats,FE as statusIsTerminal,Sd as stripGlobalBootstrapTokens,z0 as subscribeMutationEventBatches,H0 as subscribeMutationEvents,nP as summarizeAgentIdentityVocabulary,Af as summarizeAgentModelProvenance,vf as summarizeAgentProvenance,VM as summarizeContextEvaluationReports,zf as summarizeContextPreflight,NM as summarizeHistoryProvenance,Cl as summarizeInitResult,PP as summarizeMergeReceipt,AM as supportsCreateExplicitEmpty,gR as supportsItemIdAlias,NC as suppressHostOutput,Re as syncRelationshipGraphAdapter,Kk as synthesizeExtensionManifest,Cd as toCompletionFlagString,bm as toContextFocusItem,hm as toContextPackingSummary,gm as toContextRankingSummary,pC as toErrorMessage,i_ as toEstimatedMinutesValue,tk as toExtensionFlagDefinitions,l_ as toImportBoolean,f_ as toImportConfidence,c_ as toImportInteger,y_ as toImportLinkedDocs,g_ as toImportLinkedFiles,b_ as toImportLinkedTests,h_ as toImportLogEntries,__ as toImportNormalizedEnum,m_ as toImportNumberMap,s_ as toImportPriority,d_ as toImportStatus,p_ as toImportStringList,u_ as toImportStringMap,a_ as toImportTags,HE as toItemRecord,n_ as toNonEmptyImportString,lC as toNonEmptyStringOrUndefined,pA as toReplayDocument,qw as toWellFormedText,ys as tokenizeSimilarityText,VT as transferMutationStdinTokenPolicy,zC as translateHostEnvironmentFault,xh as update,Bf as updateLinkedTest,ag as upgrade,wh as validate,EI as validateAssertionDefinition,wI as validateAssuranceDocument,SI as validateGateDefinition,lk as validateItemMutationRows,ap as validateLinkedPaths,vN as validateMcpAuthorizationResponseIssuer,wN as validateMcpAuthorizationServerMetadata,ON as validateMcpClientMetadataDocument,hN as validateMcpHttpRequestHeaders,tN as validateMcpJsonSchema,CI as validateMeasurementDefinition,kA as validateMissingParentReference,jS as validateReadOutputOptions,$A as validateSprintOrReleaseValue,nC as validateTypeOptions,eR as validateWorkspaceTransactionIdentity,gM as verifyAttestation,XR as verifyCliFlagInvocationParity,uR as verifyExplicitPositionalSlotCensus,fA as verifyHistoryChain,mA as verifyHistoryChainWithVersion,qO as verifyHistoryEntries,oA as verifyHistoryRecordHash,iA as verifyHistoryRewriteEvidence,hR as verifyPmCliGrammar,_R as verifyPmCommandPositionalContracts,HD as verifyPmFlagLexicon,_D as verifyPmRecoveryKindRuntimeCoverage,Mb as verifyPmRecoveryProducerRuntimeCoverage,fD as verifyPmRecoveryReferences,bD as verifyPmRefusalClosureIdentityRatchet,yD as verifyPmRefusalClosureRatchet,mD as verifyPmRefusalReachability,Qd as verifyToolOptionCliParity,LA as withCliMutationInput,ks as withExpectedItemRevisions,Us as withFlagAliasMetadata,HC as withHostEnvironmentBoundary,DA as withLiteralMutationInput,eN as withMcpCachePolicy,$i as withoutGenericRefusalExamples,kT as workflowApprovalFingerprint,xT as workflowPolicyApplies,MT as workflowPolicyFingerprint,Hl as workspaceGraphCache,oR as workspaceTransactionPlanDigest,Pl as wrapOwnershipConflict,rO as wrapThrownErrorForSentry,ui as writeAuthorEnvironment,Fe as writeFileAtomic,gC as writeMutationCheckpoint,QA as writeSettings,TO as writeSettingsSection,Vw as writeStderr,Hw as writeStdout,Hv as writeVectorizationStatusLedger,vA as writeWorkspaceJsonWithHistory};
35
35
  //# sourceMappingURL=sdk.js.map