@unbrained/pm-cli 2026.11.14 → 2026.11.16
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/README.md +1 -1
- package/dist/cli/error-guidance.js +2 -2
- package/dist/cli/extension-command-help.js +2 -2
- package/dist/cli/help-content.js +2 -2
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-UJMQP2HP.js → chunk-2D26HRXB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EXO4PM5J.js → chunk-2WNORBVN.js} +86 -71
- package/dist/cli-bundle/chunks/chunk-4I7YG3VZ.js +3 -0
- package/dist/cli-bundle/chunks/chunk-4WIVCOA7.js +2 -0
- package/dist/cli-bundle/chunks/chunk-A3WCP4TU.js +6 -0
- package/dist/cli-bundle/chunks/chunk-AB5S6TWE.js +124 -0
- package/dist/cli-bundle/chunks/chunk-BV7J3LRH.js +114 -0
- package/dist/cli-bundle/chunks/{chunk-AXTUB74T.js → chunk-DZWRNL6R.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-E4BQRZF2.js +10 -0
- package/dist/cli-bundle/chunks/chunk-ERD2RYWM.js +31 -0
- package/dist/cli-bundle/chunks/chunk-F7P42FL5.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-547OEGDR.js → chunk-FZ4XWWLO.js} +25 -25
- package/dist/cli-bundle/chunks/{chunk-65SBMIK6.js → chunk-I3T2FVUA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-IGEBFNWE.js +2 -0
- package/dist/cli-bundle/chunks/chunk-IYICNCK2.js +2 -0
- package/dist/cli-bundle/chunks/chunk-J257NZRD.js +20 -0
- package/dist/cli-bundle/chunks/chunk-JD3XWF66.js +3 -0
- package/dist/cli-bundle/chunks/chunk-JLHD7OQ2.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-V2OAXGHK.js → chunk-KGOGLKL2.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-LC4DJVXR.js +2 -0
- package/dist/cli-bundle/chunks/chunk-NHNM3GIP.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-RSAN2YUU.js → chunk-NYN5OR2T.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-OFZQEQ6X.js +2 -0
- package/dist/cli-bundle/chunks/chunk-QGL5IAP4.js +8 -0
- package/dist/cli-bundle/chunks/chunk-R24NZ2TB.js +8 -0
- package/dist/cli-bundle/chunks/chunk-VJLZHOTP.js +2 -0
- package/dist/cli-bundle/chunks/chunk-VO2HSB5F.js +2 -0
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-I6RQGD6Y.js → indexed-receipt-blobs-HNLN6UXH.js} +2 -2
- package/dist/cli-bundle/chunks/item-revision-PSOL5I4H.js +2 -0
- package/dist/cli-bundle/chunks/item-transaction-55QTCU2M.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-BDBBH3ZS.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-WUN7JYVJ.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-MCNOV6ML.js → register-list-query-AESCVO6H.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-KYXLYHOK.js → register-mutation-SKCEP5QU.js} +3 -3
- package/dist/cli-bundle/chunks/register-operations-ZT4OYCF3.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-JVWNS2TY.js +2 -0
- package/dist/cli-bundle/chunks/{settlement-hook-JHXLUBEN.js → settlement-hook-MVVVUIVZ.js} +2 -2
- package/dist/cli-bundle/chunks/stage-RMU3JAWM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-3WVMEA2A.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-5UVJOAUP.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-5WQ3LNUK.js +78 -0
- package/dist/cli-bundle/focused-chunks/chunk-6E4X7MQA.js +26 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IDAYTYNN.js → chunk-7SEPCQV2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EXCVUBAE.js → chunk-7XHE335U.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-BEHIMEV2.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-CZFZCSOX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TA4EGVE6.js → chunk-DFBHW7HP.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-DZMP3VYQ.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-HHMMIHZP.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HPC2M6JD.js +6 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EAYRYXA6.js → chunk-HR5FEUUL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-J7ESCE7M.js +24 -0
- package/dist/cli-bundle/focused-chunks/chunk-KRNF3WTC.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-KWZLY35A.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-M4IA4LC6.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-3SUKWYR2.js → chunk-NASE6JC2.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ONM2R32I.js +65 -0
- package/dist/cli-bundle/focused-chunks/chunk-PDXSMSO5.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-PEL4SQXV.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QJ647CQE.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-SFATIM77.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EH7JKGDH.js → chunk-UBBTBNUY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZCN35TCK.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZSQ2FT22.js +44 -0
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-7XGVHYAO.js → indexed-receipt-blobs-ADMQXF3N.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-revision-GNKYO6GZ.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-transaction-AUUQHR5Z.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-OBRD7HFZ.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-6TX3EOJX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{settlement-hook-H56537UV.js → settlement-hook-5U2M75BY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/stage-LERF2YJU.js +2 -0
- package/dist/cli-bundle/main.js +10 -10
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +3 -3
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +57 -57
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +11 -11
- package/dist/core/diagnostics/remediation.js +1 -1
- package/dist/core/extensions/extension-hook-runtime.js +1 -1
- package/dist/core/extensions/extension-types.d.ts +30 -0
- package/dist/core/extensions/extension-types.js +1 -1
- package/dist/core/extensions/index.d.ts +21 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/mutation-actor-snapshot.js +2 -0
- package/dist/core/extensions/mutation-actor.js +2 -0
- package/dist/core/item/deferred-fields.js +2 -0
- package/dist/core/item/item-format-version.d.ts +8 -7
- package/dist/core/item/item-format-version.js +1 -1
- package/dist/core/item/item-format.js +2 -2
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output.d.ts +7 -0
- package/dist/core/output/output.js +3 -3
- package/dist/core/schema/runtime-field-values.d.ts +4 -0
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/shared/errors.d.ts +22 -0
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/shared/item-metadata-contract.js +1 -1
- package/dist/core/store/item-store.d.ts +15 -4
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/telemetry/policy.d.ts +21 -2
- package/dist/core/telemetry/policy.js +1 -1
- package/dist/sdk/agent/closed-domain-contracts.js +1 -1
- package/dist/sdk/authoring.d.ts +1 -1
- package/dist/sdk/authoring.js +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.js +1 -1
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/completion/bash.js +1 -1
- package/dist/sdk/completion/fish.js +4 -1
- package/dist/sdk/completion/zsh.js +14 -2
- package/dist/sdk/extension/command-options.d.ts +23 -4
- package/dist/sdk/extension/command-options.js +1 -1
- package/dist/sdk/extension/native-command-options.js +2 -0
- package/dist/sdk/flag-invocation-contracts.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/governance/health.js +2 -2
- package/dist/sdk/governance/in-progress-work-health.d.ts +49 -0
- package/dist/sdk/governance/in-progress-work-health.js +2 -0
- package/dist/sdk/governance/lifecycle-dependency-cycles.d.ts +12 -0
- package/dist/sdk/governance/lifecycle-dependency-cycles.js +2 -0
- package/dist/sdk/governance/stale-work.d.ts +143 -2
- package/dist/sdk/governance/stale-work.js +1 -1
- package/dist/sdk/governance/validate-deferred-fields.js +2 -0
- package/dist/sdk/governance/validate.d.ts +2 -2
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/governance.d.ts +1 -1
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/item-transaction.d.ts +2 -2
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/lifecycle/claim.d.ts +46 -3
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/copy.js +1 -1
- package/dist/sdk/lifecycle/create-deferrals.js +2 -0
- package/dist/sdk/lifecycle/create.d.ts +6 -2
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/shared-unset-fields.d.ts +7 -1
- package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/merge/three-way.d.ts +1 -1
- package/dist/sdk/merge/three-way.js +2 -2
- package/dist/sdk/ownership-source.d.ts +32 -0
- package/dist/sdk/ownership-source.js +1 -1
- package/dist/sdk/package-import-adapters.d.ts +9 -1
- package/dist/sdk/package-import-adapters.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/complete-list.d.ts +14 -5
- package/dist/sdk/query/complete-list.js +1 -1
- package/dist/sdk/query/context.d.ts +5 -1
- package/dist/sdk/query/context.js +2 -2
- package/dist/sdk/query/list.js +1 -1
- package/dist/sdk/query/next.d.ts +19 -3
- package/dist/sdk/query/next.js +1 -1
- package/dist/sdk/query/projection-contracts.d.ts +6 -0
- package/dist/sdk/query/projection-contracts.js +1 -1
- package/dist/sdk/read-output/extension.js +1 -1
- package/dist/sdk/runtime-input.d.ts +6 -2
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +2 -2
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime.d.ts +2 -2
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/testing.d.ts +15 -2
- package/dist/sdk/testing.js +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.js +1 -1
- package/docs/AGENT_GUIDE.md +2 -0
- package/docs/COMMANDS.md +31 -0
- package/docs/CONFIGURATION.md +20 -7
- package/docs/EXTENSIONS.md +1 -1
- package/docs/LIFECYCLE_COMMANDS.md +8 -1
- package/docs/MUTATION_INTEGRITY.md +79 -1
- package/docs/SDK.md +139 -5
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +3 -3
- package/marketplace.json +1 -1
- package/node_modules/commander/Readme.md +6 -32
- package/node_modules/commander/index.js +1 -1
- package/node_modules/commander/lib/command.js +22 -9
- package/node_modules/commander/lib/help.js +6 -2
- package/node_modules/commander/lib/option.js +1 -1
- package/node_modules/commander/package.json +2 -1
- package/node_modules/commander/typings/index.d.ts +6 -3
- package/node_modules/semver/classes/range.js +2 -2
- package/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +1 -1
- package/package.json +8 -5
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/extensions/calendar/command-definitions.ts +2 -0
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/extensions/todos/runtime.ts +3 -0
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-25BUKX4W.js +0 -2
- package/dist/cli-bundle/chunks/chunk-27FG6ROB.js +0 -2
- package/dist/cli-bundle/chunks/chunk-5TGFB34A.js +0 -2
- package/dist/cli-bundle/chunks/chunk-BHH65KLL.js +0 -2
- package/dist/cli-bundle/chunks/chunk-C7M54YV6.js +0 -122
- package/dist/cli-bundle/chunks/chunk-DMWL3K4A.js +0 -20
- package/dist/cli-bundle/chunks/chunk-DVN7CD5B.js +0 -2
- package/dist/cli-bundle/chunks/chunk-DZ7CWUVM.js +0 -8
- package/dist/cli-bundle/chunks/chunk-FRCNYOTG.js +0 -9
- package/dist/cli-bundle/chunks/chunk-HXECILIE.js +0 -31
- package/dist/cli-bundle/chunks/chunk-IDFRGH4X.js +0 -3
- package/dist/cli-bundle/chunks/chunk-JSTBYDLL.js +0 -3
- package/dist/cli-bundle/chunks/chunk-MELSYAFE.js +0 -124
- package/dist/cli-bundle/chunks/chunk-O4ZLEN4T.js +0 -3
- package/dist/cli-bundle/chunks/chunk-OTM6PXZQ.js +0 -8
- package/dist/cli-bundle/chunks/chunk-PC5DGK3C.js +0 -6
- package/dist/cli-bundle/chunks/chunk-PF3V443A.js +0 -2
- package/dist/cli-bundle/chunks/chunk-U2HVJVA5.js +0 -2
- package/dist/cli-bundle/chunks/chunk-VERRDW3Q.js +0 -2
- package/dist/cli-bundle/chunks/item-revision-VGIHIWZM.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-6OB6BGTD.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-LL6SGQYU.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-6RQF6IAE.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-XGPOFFD3.js +0 -2
- package/dist/cli-bundle/chunks/stage-ZS7WNUD4.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2A4JCFMI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2T6MQ7NP.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-32QYILXW.js +0 -82
- package/dist/cli-bundle/focused-chunks/chunk-4WOF3Q6R.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5IQPFV4Y.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-6C7NBJ7A.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-7KNF6RCV.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-FNLOLNPQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-G6ERMFJ5.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-HRLGC3P7.js +0 -28
- package/dist/cli-bundle/focused-chunks/chunk-I7A5VP5E.js +0 -65
- package/dist/cli-bundle/focused-chunks/chunk-JHC3X43E.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-MKYNDWT3.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-RDTHL44U.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-UCCLV5GJ.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-W3RWCLEU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-W57DSFSU.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-YNYO7PMT.js +0 -26
- package/dist/cli-bundle/focused-chunks/item-revision-7J7WSCPC.js +0 -2
- package/dist/cli-bundle/focused-chunks/item-transaction-F5YMCPRB.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-2NRQEAOG.js +0 -2
- package/dist/cli-bundle/focused-chunks/stage-2KVCKOGC.js +0 -2
package/dist/cli-bundle/sdk.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as Tg}from"./chunks/chunk-65SBMIK6.js";import{a as Yk,b as Xk,c as Jk,d as Qk}from"./chunks/chunk-IDFRGH4X.js";import{a as Zk,b as ex}from"./chunks/chunk-PF3V443A.js";import{b as bk,c as Tk,d as Ck,e as Ek,f as Sk,g as wk,h as Ak,i as Ok,j as vk,k as Rk,l as Ik,m as Pk,n as Mk,o as kk,p as xk,q as Nk,r as Lk}from"./chunks/chunk-27FG6ROB.js";import{A as Bk,B as qk,C as zk,D as Hk,E as Vk,F as Kk,G as Wk,a as Ds,b as OR,c as vR,d as Oc,e as vc,f as Rc,h as Ic,i as Pc,j as Mc,k as kc,l as xc,m as Nc,n as Lc,o as Dc,p as Gd,q as Ud,r as jd,s as Bd,t as qd,u as Dk,v as $k,w as Fk,x as Gk,y as Uk,z as jk}from"./chunks/chunk-BHH65KLL.js";import{A as vx,B as Rx,C as Ix,D as Px,E as Mx,F as kx,G as xx,H as Nx,I as Lx,J as Dx,K as $x,L as Fx,M as Gx,N as Ux,O as jx,P as Bx,Q as qx,R as zx,S as Hx,T as Vx,U as Kx,V as Wx,W as Yx,X as Xx,Y as Jx,Z as Qx,_ as Zx,a as tx,b as rx,c as ox,d as nx,e as ix,f as sx,g as ax,h as cx,i as dx,j as lx,k as px,l as ux,m as mx,n as fx,o as _x,p as hx,q as gx,r as yx,s as bx,t as Tx,u as Cx,v as Ex,w as Sx,x as wx,y as Ax,z as Ox}from"./chunks/chunk-DZ7CWUVM.js";import{$ as of,$a as Y_,$b as Yh,A as Ke,Aa as g_,Ab as Eh,B as Bm,Ba as y_,Bb as Sh,C as qm,Ca as b_,Cb as wh,D as Hm,Da as T_,Db as Ah,E as zt,Ea as C_,Eb as Oh,F as Ht,Fa as E_,Fb as vh,G as Vt,Ga as S_,Gb as Rh,H as Kt,Ha as w_,Hb as Ih,I as Wt,Ia as A_,Ib as Ph,J as Yt,Ja as O_,Jb as Mh,K as Xt,Ka as v_,Kb as kh,L as Jt,La as R_,Lb as xh,M as Qt,Ma as I_,Mb as Nh,N as Zt,Na as P_,Nb as Lh,O as er,Oa as M_,Ob as Dh,P as Vm,Pa as k_,Pb as $h,Q as Km,Qa as x_,Qb as Fh,R as Wm,Ra as N_,Rb as Gh,S as Ym,Sa as L_,Sb as Uh,T as Xm,Ta as tr,Tb as jh,U as We,Ua as _e,Ub as Bh,V as Jm,Va as q_,Vb as qh,W as Qm,Wa as z_,Wb as zh,X as Zm,Xa as H_,Xb as Hh,Y as ef,Ya as V_,Yb as Vh,Z as tf,Za as K_,Zb as Kh,_ as rf,_a as W_,_b as Wh,a as Gv,aa as nf,ab as X_,ac as Xh,b as Uv,ba as ek,bb as J_,bc as Jh,c as jv,ca as tk,cb as Q_,cc as Qh,d as Bv,da as rk,db as Z_,dc as Zh,e as qv,ea as yf,eb as eh,ec as eg,f as zv,fa as bf,fb as th,fc as tg,g as Kv,ga as Tf,gb as rh,gc as rg,h as Wv,ha as s_,hb as oh,hc as og,i as Yv,ia as a_,ib as nh,ic as ng,j as Xv,ja as pk,jb as ih,jc as ig,k as $s,ka as uk,kb as sh,kc as sg,l as td,la as mk,lb as ah,lc as ag,m as rd,ma as fk,mb as ch,mc as cg,n as od,na as _k,nb as dh,nc as dg,o as pP,oa as hk,ob as lh,oc as lg,p as uP,pa as gk,pb as ph,pc as pg,q as mP,qa as yk,qb as uh,qc as ug,r as fP,ra as c_,rb as mh,rc as mg,s as _P,sa as d_,sb as fh,sc as fg,t as hP,ta as l_,tb as _h,tc as _g,u as Ou,ua as p_,ub as hh,uc as hg,v as Iu,va as u_,vb as gh,vc as gg,w as Pu,wa as m_,wb as yh,wc as yg,x as Xu,xa as f_,xb as bh,xc as bg,y as om,ya as __,yb as Th,z as jM,za as h_,zb as Ch}from"./chunks/chunk-EXO4PM5J.js";import{e as bP,f as TP,g as Kl,h as Wl,i as jt}from"./chunks/chunk-JSTBYDLL.js";import{A as q0,B as z0,C as H0,D as V0,E as K0,F as W0,G as Y0,H as X0,I as J0,J as Q0,K as Z0,L as cf,M as df,N as lf,O as pf,P as uf,Q as mf,R as ff,S as _f,T as hf,U as gf,a as wM,b as AM,c as OM,d as vM,e as RM,f as Au,g as IM,h as PM,i as MM,j as kM,k as xM,m as zm,n as sf,o as k0,p as x0,q as N0,r as L0,s as D0,t as $0,u as af,v as F0,w as G0,x as U0,y as j0,z as B0}from"./chunks/chunk-PC5DGK3C.js";import{$ as SI,$a as fp,$b as hM,$c as Dm,$d as U_,A as ze,Aa as WI,Ab as QP,Ac as Uu,Ad as Ff,B as ee,Ba as YI,Bb as ZP,Bc as ju,Bd as Gf,C as ol,Ca as XI,Cb as eM,Cc as Bu,Cd as Uf,Db as tM,Dc as qu,Dd as jf,Ea as gP,Eb as rM,Ec as zu,Ed as Bf,F as He,Fa as yP,Fb as oM,Fc as Hu,Fd as qf,G as nl,Ga as Ul,Gb as dM,Gc as Vu,Gd as zf,H as il,Ha as jl,Hb as lM,Hc as Ku,Hd as Hf,Ia as Bl,Ib as lu,Ic as Wu,Id as Vf,J as fe,Ja as ql,Jb as pu,Jd as Kf,K as sl,Ka as zl,Kb as pM,Kc as GM,Kd as Wf,L as al,La as Hl,Lb as uM,Lc as UM,Ld as Yf,M as cl,Ma as Vl,Mb as mM,Mc as Yu,N as dl,Na as ep,Nb as fM,Nc as nm,Nd as Xf,O as uI,Oa as tp,Ob as _M,Oc as im,Od as Jf,P as mI,Pa as rp,Pb as uu,Pc as sm,Pd as Qf,Q as fI,Qa as op,Qb as mu,Qc as am,Qd as Zf,R as _I,Ra as np,Rb as fu,Rc as cm,Rd as e_,S as hI,Sa as ip,Sb as _u,Sd as t_,T as xt,Ta as sp,Tb as hu,Td as r_,U as gI,Ua as ap,Ub as gu,Ud as o_,V as yI,Va as cp,Vb as yu,Vd as n_,W as Nt,Wa as dp,Wb as bu,Wc as dm,Wd as i_,X as bI,Xa as lp,Xb as Tu,Xd as D_,Y as TI,Ya as pp,Yb as Cu,Yc as lm,Yd as $_,Z as CI,Za as up,Zb as Eu,Zc as pm,Zd as F_,_ as EI,_a as mp,_b as Su,_c as Lm,_d as G_,a as RR,aa as Ve,ab as _p,ac as gM,ae as j_,b as It,ba as wI,bb as hp,bc as yM,bd as $m,be as B_,c as IR,ca as Lt,cb as gp,cc as bM,cd as Fm,d as Vc,da as AI,db as yp,dc as TM,dd as Gm,e as Kc,ea as OI,eb as bp,ec as CM,ed as Um,f as Wc,fa as vI,fb as Tp,fc as EM,fd as jm,g as Yc,ga as RI,gb as Cp,gc as SM,gd as Cf,h as Xc,ha as II,hb as SP,hc as wu,hd as Ef,ia as PI,ib as Ep,ic as NM,id as Sf,j as Jc,ja as MI,jb as Sp,jc as LM,jd as wf,k as Qc,ka as kI,kb as wp,kc as DM,kd as Af,la as xI,lb as Ap,lc as $M,ld as Of,ma as NI,mb as wP,mc as FM,md as vf,na as LI,nb as Op,nd as Rf,o as Zc,oa as DI,ob as vp,oc as vu,od as If,p as ed,pa as $I,pb as Rp,pc as Ru,pd as ck,qa as FI,qb as Ip,qc as Mu,qd as dk,ra as GI,rb as Pp,rc as ku,rd as lk,sa as UI,sb as AP,sd as Pf,ta as jI,tb as OP,tc as xu,td as Mf,ua as BI,ub as vP,uc as Nu,ud as kf,va as qI,vb as RP,vc as Lu,vd as xf,w as Mt,wa as zI,wb as IP,wc as Du,wd as Nf,xa as HI,xb as PP,xc as $u,xd as Lf,y as kt,ya as VI,yb as MP,yc as Fu,yd as Df,za as KI,zb as JP,zc as Gu,zd as $f}from"./chunks/chunk-HXECILIE.js";import"./chunks/chunk-UJMQP2HP.js";import{w as zd}from"./chunks/chunk-DVN7CD5B.js";import{A as lP,Aa as Ml,B as El,C as Sl,Ca as kl,D as wl,Da as xl,E as Al,Ea as Nl,F as Dt,Fa as Ll,Ga as Dl,Ia as $l,Ja as Fl,Ka as Gl,a as tR,b as rR,c as oR,d as nR,e as iR,f as sR,g as Fs,h as Gs,i as Us,j as js,k as Bs,la as $t,m as JI,ma as Ft,na as Gt,oa as Ut,pa as Ol,ra as vl,sa as Rl,ta as Il,v as sP,w as aP,y as cP,z as dP,za as Pl}from"./chunks/chunk-547OEGDR.js";import{a as QI,b as ZI,c as eP,d as tP,e as rP,f as oP,g as nP,h as fl,i as _l,j as hl,k as gl,l as yl,m as iP,n as bl,o as Tl,p as Cl}from"./chunks/chunk-OTM6PXZQ.js";import{$a as HP,$b as _0,A as nI,Aa as ru,Ab as zM,Ac as Pm,B as Hd,Ba as ou,Bb as HM,Bc as Mm,C as Vd,Ca as nu,Cb as VM,Cc as km,D as Kd,Da as iu,Db as KM,Dc as qt,E as Wd,Ea as su,Eb as WM,Ec as xm,F as Yd,Fa as au,Fb as YM,Fc as R0,G as Xd,Ga as cu,Gc as I0,H as Jd,Ha as du,Hb as hm,Hc as P0,I as Qd,Ib as XM,Ic as Nm,J as Zd,Jb as JM,Jc as M0,K as el,Kb as QM,Kc as ok,L as tl,La as kP,Lb as ZM,Lc as nk,M as qe,Ma as xP,Mb as e0,Mc as ik,N as iI,Na as NP,Nb as t0,Nc as sk,O as sI,Oa as LP,Ob as r0,Oc as ak,P as aI,Pa as DP,Pb as o0,Q as cI,Qa as $P,Qb as n0,R as dI,Ra as FP,Rb as i0,S as lI,Sa as GP,Sb as s0,T as pI,Ta as UP,Tb as a0,U as rl,Ua as jP,Ub as c0,V as Yl,Va as BP,Vb as d0,W as Xl,Wa as qP,Wb as l0,X as Jl,Xa as zP,Xb as p0,Y as Ql,Yb as u0,Z as CP,Zb as m0,_ as EP,_b as f0,a as Jv,aa as Zl,ac as h0,b as Qv,ba as Mp,bb as VP,bc as g0,c as Zv,ca as kp,cb as KP,cc as y0,d as eR,da as xp,dc as b0,e as zR,ea as Np,ec as T0,f as HR,fa as Lp,fb as WP,fc as C0,g as VR,ga as Dp,gb as YP,gc as E0,h as KR,ha as $p,hb as XP,hc as S0,i as WR,ia as Fp,ic as w0,j as YR,ja as Gp,jb as nM,jc as A0,k as XR,ka as Up,kb as iM,kc as O0,la as jp,lb as sM,lc as v0,ma as Bp,mb as aM,mc as Bt,na as qp,nb as cM,nc as gm,oa as zp,ob as Ju,oc as ym,pa as Hp,pb as Qu,pc as bm,qa as Vp,qb as Zu,qc as Tm,ra as Kp,rb as em,rc as Cm,sa as Wp,sb as tm,sc as Em,t as JR,ta as Yp,tb as rm,tc as Sm,u as QR,ua as Xp,ub as BM,uc as wm,v as ZR,va as Jp,vb as um,vc as Am,w as eI,wa as Qp,wb as mm,wc as Om,x as tI,xa as Zp,xb as fm,xc as vm,y as rI,ya as eu,yb as _m,yc as Rm,z as oI,za as tu,zb as qM,zc as Im}from"./chunks/chunk-DMWL3K4A.js";import{a as Hv,b as Vv}from"./chunks/chunk-VERRDW3Q.js";import{$ as ha,$a as hc,A as Hs,Aa as qa,Ab as dd,B as Vs,Ba as za,Bb as ld,Ca as Ha,Cb as pd,D as Ks,Da as Va,Db as ud,E as Ws,Ea as Ka,Eb as md,F as Ys,Fa as Wa,Fb as fd,G as Xs,Ga as Ya,Gb as _d,H as Js,Ha as Xa,Hb as hd,I as Qs,Ia as Ja,Ib as gd,J as Zs,Ja as Qa,Jb as yd,K as ea,Ka as Za,Kb as bd,L as ta,La as ec,Lb as Td,M as ra,Ma as tc,Mb as Cd,N as oa,Na as rc,Nb as Ed,O as na,Oa as oc,Ob as Sd,P as ia,Pa as nc,Pb as wd,Q as sa,Qa as ic,Qb as Ad,Ra as sc,Rb as Od,S as aa,Sa as ac,Sb as vd,T as ca,Ta as cc,Tb as PR,U as da,Ua as dc,Ub as MR,V as la,Va as lc,Vb as kR,W as pa,Wa as pc,Wb as xR,X as ua,Xa as uc,Xb as NR,Y as ma,Ya as mc,Yb as LR,Z as fa,Za as fc,_ as _a,_a as _c,a as aR,aa as ga,ab as gc,ac as DR,b as cR,ba as ya,bb as yc,bc as $R,c as dR,ca as ba,cb as bc,cc as FR,d as lR,da as Ta,db as Tc,dc as GR,e as pR,ea as Ca,eb as Cc,ec as UR,f as uR,fa as Ea,fb as Ec,fc as jR,g as mR,ga as Sa,gb as Sc,gc as BR,h as qs,ha as wa,hb as wc,hc as qR,i as fR,ia as Aa,ja as Oa,jb as Be,jc as Rd,ka as va,kb as Z,kc as Id,l as _R,la as Ra,lb as Ac,lc as Pd,m as hR,ma as Ia,mb as $c,mc as Md,n as Ue,na as Pa,nb as Fc,nc as kd,o as gR,oa as Ma,ob as Gc,oc as xd,p as yR,pa as ka,pb as Uc,pc as Nd,q as bR,qa as xa,qb as jc,qc as Ld,r as Rt,ra as Na,rb as Bc,rc as Dd,s as je,sa as La,sb as qc,sc as $d,t as TR,ta as Da,tb as zc,tc as Fd,u as CR,ua as $a,ub as Hc,uc as Pt,v as ER,va as Fa,vb as nd,w as SR,wa as Ga,wb as id,x as wR,xa as Ua,xb as sd,y as AR,ya as ja,yb as ad,z as zs,za as Ba,zb as cd}from"./chunks/chunk-FRCNYOTG.js";import{a as Pv,b as Mv,c as kv,d as xv,e as Nv,f as Lv,g as Dv,h as $v,i as Fv,j as vs,k as Rs,l as Is,m as Ps,n as Ms,o as ks,q as xs,s as Ns,y as Ls}from"./chunks/chunk-25BUKX4W.js";import{b as vv}from"./chunks/chunk-U2HVJVA5.js";import"./chunks/chunk-IB7UB5TE.js";import{$b as LO,$c as hs,A as QT,Aa as BA,Ab as CO,Ac as as,Ad as Av,B as ZT,Ba as qA,Bb as EO,Bd as Ov,C as eC,Cc as cs,Cd as Rv,Db as SO,Dc as ds,Dd as Iv,Eb as wO,Ec as ls,Fb as AO,Fc as ps,Gb as OO,Gc as us,Hb as es,Hc as ms,Ib as ts,Ic as XO,Jc as JO,K as lC,Kb as rs,Kc as QO,La as zA,Lb as vO,Lc as ZO,M as bC,Ma as HA,Mc as ev,N as TC,Na as VA,Nb as RO,Nc as tv,O as CC,Oa as KA,Ob as IO,Oc as rv,P as EC,Pa as WA,Pb as PO,Pc as ov,Q as RC,Qa as YA,Qc as nv,R as IC,Ra as tO,Rb as MO,Rc as iv,S as wt,Sa as rO,Sc as sv,T as wE,Ta as oO,Tc as av,U as AE,Ua as At,Ub as kO,Uc as cv,V as OE,Vc as dv,Wa as nO,Wb as xO,Wc as lv,X as vE,Xa as iO,Xc as pv,Ya as sO,Yc as uv,Z as RE,Za as aO,Zc as fs,_ as IE,_a as cO,_b as NO,_c as _s,a as GT,aa as PE,ac as DO,ad as gs,ba as ME,bb as dO,bc as os,bd as ys,ca as kE,cc as $O,cd as bs,da as gA,dd as Ts,ea as yA,ec as FO,ed as Cs,fa as bA,fb as Xi,fc as GO,fd as Es,ga as TA,gc as UO,gd as Ss,ha as PA,hc as jO,hd as ws,i as sn,ic as BO,id as As,j as UT,ja as Vi,jc as qO,jd as Os,k as jT,ka as Ki,kc as zO,kd as mv,l as BT,la as Wi,lc as HO,ld as fv,m as qT,mc as VO,md as _v,na as MA,nc as KO,nd as hv,o as zT,oa as kA,oc as Ot,od as gv,p as HT,pa as xA,pc as WO,pd as yv,qa as NA,qd as bv,r as VT,ra as LA,rc as YO,rd as Tv,sa as DA,sd as Cv,t as KT,ta as $A,td as Ev,u as WT,ud as Sv,v as YT,va as FA,x as XT,xa as GA,xc as ns,y as JT,ya as UA,yb as bO,yc as is,yd as vt,za as jA,zb as TO,zc as ss,zd as wv}from"./chunks/chunk-MELSYAFE.js";import{$ as gt,$b as OC,$f as bS,$g as WS,$h as Vw,$i as JA,A as Go,Aa as tC,Ad as dE,Ae as Wn,Af as hi,Ag as Li,Ah as Cw,B as Uo,Ba as rC,Bd as Fn,Be as Yn,Bf as gi,Bg as Di,Bh as Ew,Bi as lA,C as jo,Ca as oC,Cb as mC,Cd as lE,Ce as HE,Cf as yi,Cg as $i,Ch as Sw,Ci as pA,D as Bo,Dd as pE,De as VE,Df as sS,Dg as Fi,Dh as ww,Di as uA,E as qo,Ef as aS,Eg as Gi,Eh as Aw,Ei as mA,F as zo,Fa as gn,Fb as fC,Ff as bi,Fg as Ui,Fh as Ow,G as Ho,Ga as nC,Gc as qC,Gd as uE,Gf as cS,Gg as ji,Gh as vw,Gi as fA,H as Ne,Ha as iC,Hd as mE,Hf as Ti,Hg as Bi,Hh as Rw,Hi as _A,I as Le,Ia as sC,Ib as _C,Ic as zC,Id as fE,Ie as Xn,If as Ci,Ig as qi,Ih as Iw,J as Vo,Ja as aC,Jc as HC,Jd as _E,Je as Jn,Jf as Ei,Jg as kS,Jh as Pw,Ji as hA,K as Ko,Kc as VC,Kd as hE,Ke as KE,Kf as Si,Kg as xS,Kh as Mw,L as Wo,La as yn,Lb as hC,Lc as KC,Ld as gE,Le as Qn,Lg as NS,Lh as kw,Li as CA,M as Yo,Ma as bn,Mc as WC,Md as Gn,Me as Zn,Mg as LS,Mh as xw,Mi as EA,N as Xo,Na as $e,Nb as Tt,Nd as yE,Ne as WE,Ng as DS,Nh as Nw,Ni as SA,O as Jo,Oa as cC,Od as Un,Oe as YE,Og as $S,Oh as Lw,Oi as wA,P as Qo,Pa as dC,Pb as Ct,Pe as XE,Pg as FS,Ph as Dw,Pi as AA,Q as Zo,Qa as Tn,Qd as bE,Qe as JE,Qg as GS,Qh as $w,Qi as OA,R as en,Ra as Cn,Rb as Pn,Rd as TE,Re as QE,Rf as dS,Rg as US,Rh as Fw,Ri as vA,S as tn,Sb as Mn,Sd as CE,Se as ZE,Sf as lS,Sh as Gw,Si as RA,T as rn,Ta as En,Tb as Et,Tc as Nn,Td as EE,Te as eS,Tf as pS,Ti as IA,U as on,Uc as YC,Ud as SE,Ue as tS,Uf as uS,Ug as jS,V as nn,Vb as gC,Vd as xE,Ve as rS,Vf as mS,Vg as BS,Vh as Uw,Wc as XC,Wd as NE,We as ei,Wf as fS,Wg as qS,Wh as jw,Xb as yC,Xd as LE,Xe as ti,Xf as _S,Xg as zS,Xh as Bw,Yb as SC,Yd as DE,Ye as L,Yf as hS,Yg as HS,Yh as qw,Yi as XA,Zb as wC,Zd as $E,Ze as ri,Zf as gS,Zg as VS,Zh as zw,_b as AC,_d as FE,_f as yS,_g as KS,_h as Hw,a as R,aa as yt,ac as vC,ah as YS,ai as Kw,aj as QA,b as vT,ba as ln,bc as PC,bh as XS,c as ht,ca as pn,cc as Fe,cg as TS,ch as JS,ci as Ww,d as RT,da as un,dc as St,df as Ge,dg as CS,dh as QS,di as Yw,dj as ZA,e as IT,eb as Sn,ec as MC,ee as GE,ef as oi,eg as ES,eh as ZS,ej as Yi,f as PT,fb as wn,fc as kC,fg as SS,fh as ew,fj as eO,g as MT,gb as An,gc as xC,gd as JC,gg as wS,gh as tw,gi as Xw,gj as lO,h as kT,ha as mn,hb as On,hc as NC,hd as QC,he as jn,hg as AS,hh as rw,hi as Jw,hj as pO,i as xT,ib as vn,ic as q,id as ZC,ie as UE,ig as OS,ih as ow,ii as Qw,ij as uO,j as NT,ja as fn,jc as LC,je as Bn,jg as vS,jh as nw,ji as Zw,jj as mO,k as LT,ka as _n,kc as DC,kd as eE,kg as RS,kh as iw,ki as eA,kj as fO,l as DT,la as hn,lc as $C,ld as tE,le as jE,lf as oS,lg as IS,lh as sw,li as tA,lj as _O,m as $T,mc as FC,mf as nS,mg as PS,mh as aw,mi as rA,mj as hO,n as FT,nc as GC,nd as rE,nf as iS,ng as MS,nh as cw,ni as oA,nj as gO,o as Po,oc as UC,od as Ln,of as ni,oh as dw,oi as nA,oj as yO,p as Mo,pc as jC,pf as ii,pg as wi,ph as lw,pi as iA,pj as Ji,q as ko,qd as Dn,qe as BE,qf as si,qg as Ai,qh as pw,qi as sA,qj as Qi,r as xo,rb as Rn,rd as $n,rf as ai,rg as Oi,rh as uw,ri as aA,rj as Zi,s as ke,sc as BC,se as qE,sf as ci,sg as vi,sh as mw,si as cA,t as No,tb as In,te as zE,tf as di,tg as Ri,th as fw,u as N,uc as kn,ud as oE,ue as qn,uf as li,ug as Ii,uh as _w,ui as dA,v as xe,vc as xn,vd as nE,ve as zn,vf as pi,vg as Pi,vh as hw,vi as zi,w as Lo,wb as pC,wd as iE,wf as ui,wg as Mi,wh as gw,wi as Hi,x as Do,xb as uC,xd as sE,xe as Hn,xf as mi,xg as ki,xh as yw,y as $o,yd as aE,ye as Vn,yf as fi,yg as xi,yh as bw,z as Fo,zd as cE,ze as Kn,zf as _i,zg as Ni,zh as Tw}from"./chunks/chunk-C7M54YV6.js";import"./chunks/chunk-SPPHDVZE.js";import{a as ll,b as pl,e as ul,f as ml}from"./chunks/chunk-RSAN2YUU.js";import"./chunks/chunk-VS565KBX.js";import{A as ue,B as OT,C as b,E as an,F as bt,G as me,H as cn,K as De,M as dn,b as bT,c as TT,d as CT,m as ET,r as ST,u as wT,y as AT}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 z="2026-07-28",or=["2025-11-25","2025-06-18"],te=[z],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"},rr=["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 Cg(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 Eg(e){if(e!==void 0){if(typeof e!="string"||!rr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...rr]});return e}}function Ye(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"||!te.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...te],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=Cg(t[w.clientInfo]),s=Eg(t[w.logLevel]);return{protocolVersion:z,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function eN(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 tN(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 rN(e,t){let r=e.clientCapabilities.extensions;return h(r)&&h(r[t])}function Xe(e,t){let r=h(e._meta)?e._meta:{};return{...e,_meta:{...r,[w.serverInfo]:{...t}}}}function Sg(e,t){return Xe({...e,resultType:"complete"},t)}function oN(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 Sg({supportedVersions:[...te],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function nN(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 wg=new Set(["--help","-h","--version","-V"]);function Ag(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: ${te.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${or.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
|
|
3
|
-
`}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?
|
|
4
|
-
`,stderr:""}}import{createHash as sr,createHmac as ar,timingSafeEqual as Og}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 vg=["elicitation/create","roots/list","sampling/createMessage"],nr=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},cr=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,he=32,Qe=64*1024,ge=16*1024,Je={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function Rg(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function ye(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 Ze(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>he)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:he,observed:r.length});let o={};for(let[n,s]of r){if(!cr.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"||!vg.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=Rg(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 ye(o,Qe,"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>he)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:he,observed:t.length});let r={};for(let[o,n]of t){if(!cr.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return ye(r,Qe,"inputResponses"),r}function pN(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>ge)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:ge});let r=e.inputRequests===void 0?void 0:Ze(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 lr(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 uN(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>ge/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:ge/2});let o=r.toString("base64url"),n=ar("sha256",lr(t)).update(o).digest("base64url");return`${o}.${n}`}function Ig(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 mN(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=ar("sha256",lr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!Og(i,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let c;try{c=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{c=null}let d=Ig(c),{expiresAt:l,method:p,parameterDigest:f,principal:_}=d;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 d}function fN(e){return ye(e,Qe,"request parameters"),sr("sha256").update(JSON.stringify(e)).digest("hex")}var ir=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=sr("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 Pg(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 _N(e,t){return{...e,...Pg(t)}}function Mg(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function kg(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Mg)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function xg(e){let t=e.maxBytes??Je.maxBytes,r=e.maxDepth??Je.maxDepth,o=e.maxNodes??Je.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 Ng(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 Lg(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&kg(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function hN(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=xg(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});ye(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});Lg(e,a.value),Ng(a,s)}return structuredClone(e)}import{randomUUID as Dg}from"node:crypto";import{readFile as $g}from"node:fs/promises";import pr 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 wN="io.modelcontextprotocol/tasks",Fg=["working","input_required","completed","failed","cancelled"],Gg=/^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,Ug=3600*1e3,jg=1e3,Te=1024,Bg=30,qg=2e3;function et(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function be(e){let t=e.trim();if(!Gg.test(t))throw et("Unknown MCP task");return t}function ur(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 mr(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,Te),...h(e.data)?{data:structuredClone(e.data)}:{}}}function zg(e){if(!Fg.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Hg(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function Vg(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function Kg(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function Wg(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 Yg(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function Xg(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?be(e.taskId):"",r=zg(e.status),o=Hg(e.principal),n=Vg(e.workerPid),s=Kg(e.ttlMs),i=Wg(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:ur(e.createdAt,"createdAt"),lastUpdatedAt:ur(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:Yg(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Te)}:{},...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=mr(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 H(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 re(e){return e==="completed"||e==="failed"||e==="cancelled"}function Jg(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var tt=class{#e;#t;#r;#o;#i;constructor(t){this.#e=pr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Dg()}`),this.#i=t.workerPid??process.pid}#s(t){return pr.join(this.#e,"runtime","mcp-tasks","records",`${be(t)}.json`)}async#c(t){try{return Xg(JSON.parse(await $g(this.#s(t),"utf8")))}catch(r){throw me(r)||r instanceof SyntaxError?et("Unknown MCP task"):r}}async#a(t){await De(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
5
|
-
`)}async#n(t,r,o){let n=be(t),s=await Ge(this.#e,n,Bg,this.#t,!1,!1,qg);try{let i=await this.#c(n);if(i.principal!==r)throw et("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=be(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Ug:t.ttlMs,s=t.pollIntervalMs??jg;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,Te)}:{}};return await this.#a(a),{...H(a),resultType:"task"}}async get(t,r){return H(await this.#n(t,r,o=>{if(re(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&&!Jg(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=Ze(t.inputRequests,t.requestContext);return H(await this.#n(t.taskId,t.principal,o=>{if(re(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,Te),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 c={...a.inputRequests},d=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(c,l)&&(d[l]=p,delete c[l],s.push(l));return i=Object.keys(c).sort(),s.length===0?a:{...a,status:i.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:i.length===0?void 0:c,inputResponses:d,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 H(await this.#n(t,r,n=>re(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=mr(o);return H(await this.#n(t,r,s=>re(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 H(await this.#n(t,r,o=>re(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 AN(e){return new tt(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 Ce="io.modelcontextprotocol/subscriptionId",fr=256,_r=2048,Qg=5e3;function Zg(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),Qg);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function rt(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 ey(e){if(!h(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=rt(e.toolsListChanged,"toolsListChanged"),r=rt(e.promptsListChanged,"promptsListChanged"),o=rt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>fr)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:fr});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>_r)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:_r});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function ty(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 hr=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=ty(ey(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:{[Ce]: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:{[Ce]: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:{[Ce]: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 Zg(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{...Xe({resultType:"complete",_meta:{[Ce]: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 gr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,ry=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,yr=/^[\t\x20-\x7E]*$/u,br=new Set(["prompts/get","resources/read","tools/call"]);function oy(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 Tr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&yr.test(t)&&!gr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function Cr(e,t){let r=gr.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||!yr.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 ny(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!ry.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 Er(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,c]of Object.entries(i)){if(!h(c))continue;let d=[...s,a],l=ny(c,d,r);l&&t.push(l);for(let[p,f]of Object.entries(c))if(p!=="properties"&&p!=="x-mcp-header"&&Ee(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:d.join("."),keyword:p});o(c,d)}}};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 iy(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Er(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}`]=Tr(s)}}return o}function PN(e){let t=h(e.request.params)?e.request.params:void 0,r=Ye(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(br.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=Tr(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,iy(t,e.toolSchema)),n}function sy(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=Ye(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"),br.has(r)){let s=e.get("mcp-name"),i=wr(r,o);(s===void 0||i===void 0||Cr(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 ay(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 cy(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Er(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),ay(r,o,Cr(s,n))||A("MCP parameter header does not match request body",n)}}function MN(e){let t=oy(e.headers),r=typeof e.request.method=="string"?e.request.method:"";sy(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&cy({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var kN=z;import{AsyncLocalStorage as dy}from"node:async_hooks";import{createHash as Ar,timingSafeEqual as ly}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}},py=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,uy=/^[a-z][a-z0-9_*/-]{0,255}$/u,my=/^(?:[a-z0-9][a-z0-9_*/-]{0,240})@[a-z][a-z0-9_*/-]{0,13}$/u,fy=/^[\x20-\x2B\x2D-\x3C\x3E-\x7E]{0,255}[\x21-\x2B\x2D-\x3C\x3E-\x7E]$/u,vr=/^[\x21\x23-\x5B\x5D-\x7E]+$/u,Rr=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,_y=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,hy=/%(?![0-9A-Fa-f]{2})/u,gy=512,yy=32,by=180,Ty=8192,Cy=8192,Ir=new dy;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 Ey(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 $N(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 FN(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 GN(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=c=>{let d=e[c];if(typeof d!="string")throw new y(`Authorization server metadata requires ${c}`,401);return S(d,c).href},n=c=>{let d=e[c];return typeof d=="string"?S(d,c).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(c=>typeof c=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function UN(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 jN(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 BN(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 qN(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 Or=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 Sy(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?py.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"||!Ay(r)))throw new y("Invalid MCP tracestate",403);return{...typeof t=="string"?{traceparent:t}:{},...typeof r=="string"?{tracestate:r}:{}}}function D(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function wy(e){return uy.test(e)||my.test(e)}function Ay(e){if(Buffer.byteLength(e,"utf8")>gy)return!1;let t=e.split(",");if(t.length>yy)return!1;let r=new Set;for(let o of t){let n=D(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(!wy(i)||!fy.test(a)||r.has(i))return!1;r.add(i)}return!0}function Pr(e){return _y.test(e)&&!hy.test(e)}function Oy(e){let t=D(e),r=t.indexOf("="),o=D(r>=0?t.slice(0,r):t),n=r>=0?D(t.slice(r+1)):void 0;return Rr.test(o)&&(n===void 0||Pr(n))}function vy(e){let t=D(e),r=t.split(";"),o=r[0],n=r.slice(1),s=o.indexOf("="),i=D(s>0?o.slice(0,s):""),a=s>0?D(o.slice(s+1)):"";if(!(!Rr.test(i)||!Pr(a)||!n.every(Oy)))return{key:i,serialized:t}}function Ry(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>Ty)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>by)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=vy(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 zN(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=Ry(r.baggage,t.baggageAllowlist??[]);return{...Sy(r),...o?{baggage:o}:{}}}function HN(e,t){return Ir.run(structuredClone(e),t)}function VN(){let e=Ir.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(d=>!vr.test(d)))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=Ey(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")>Cy)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 c=r.filter(d=>!i.scopes.includes(d));if(c.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${c.join(" ")}"`);return{...i,audience:[...a],scopes:[...i.scopes]}}function WN(e){let t=Ar("sha256").update(e.token).digest();return r=>{let o=Ar("sha256").update(r).digest();if(!ly(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 ot="io.modelcontextprotocol/ui",Se="2026-01-26",xr="text/html;profile=mcp-app",Mr=Object.freeze({specVersion:Se,mimeTypes:[xr]});function JN(e){let t=e.clientCapabilities.extensions;if(!h(t))return!1;let r=t[ot];if(r===void 0)return!1;if(!h(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[ot]:Mr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(xr)||n!==void 0&&n!==Se)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[ot]:Mr}}});return!0}var Iy={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},Nr=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:Iy})));function QN(e){return Nr.find(t=>t.uri===e)}function ZN(e){let t=new Map(Nr.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 kr(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function eL(e){let t=kr(e.name),r=kr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Se}),n=JSON.stringify(Se);return`<!doctype html>
|
|
1
|
+
import{a as Rg}from"./chunks/chunk-I3T2FVUA.js";import{a as gx,b as yx,c as bx,d as Tx}from"./chunks/chunk-4I7YG3VZ.js";import{a as Cx,b as Ex}from"./chunks/chunk-VO2HSB5F.js";import{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 Qk,n as Zk,o as ex,p as tx,q as rx,r as ox}from"./chunks/chunk-IGEBFNWE.js";import{A as lx,B as px,C as ux,D as mx,E as fx,F as _x,G as hx,a as Us,b as VI,c as KI,d as Pc,e as Mc,f as kc,h as xc,i as Nc,j as Lc,k as Dc,l as $c,m as Fc,n as Gc,o as Uc,p as qd,q as zd,r as Hd,s as Vd,t as Kd,u as nx,v as ix,w as sx,x as ax,y as cx,z as dx}from"./chunks/chunk-IYICNCK2.js";import{A as Yx,B as Xx,C as Jx,D as Qx,E as Zx,F as eN,G as tN,H as rN,I as oN,J as nN,K as iN,L as sN,M as aN,N as cN,O as dN,P as lN,Q as pN,R as uN,S as mN,T as fN,U as _N,V as hN,W as gN,X as yN,Y as bN,Z as TN,_ as CN,a as Sx,b as wx,c as Ax,d as Ox,e as vx,f as Ix,g as Rx,h as Px,i as Mx,j as kx,k as xx,l as Nx,m as Lx,n as Dx,o as $x,p as Fx,q as Gx,r as Ux,s as jx,t as Bx,u as qx,v as zx,w as Hx,x as Vx,y as Kx,z as Wx}from"./chunks/chunk-R24NZ2TB.js";import{$ as pf,$a as rh,$b as rg,A as d0,Aa as w_,Ab as Rh,B as Ke,Ba as A_,Bb as Ph,C as Xm,Ca as O_,Cb as Mh,D as Jm,Da as v_,Db as kh,E as Zm,Ea as I_,Eb as xh,F as zt,Fa as R_,Fb as Nh,G as Ht,Ga as P_,Gb as Lh,H as Vt,Ha as M_,Hb as Dh,I as Kt,Ia as k_,Ib as $h,J as Wt,Ja as x_,Jb as Fh,K as Yt,Ka as N_,Kb as Gh,L as Xt,La as L_,Lb as Uh,M as Jt,Ma as D_,Mb as jh,N as Qt,Na as $_,Nb as Bh,O as Zt,Oa as F_,Ob as qh,P as er,Pa as G_,Pb as zh,Q as ef,Qa as U_,Qb as Hh,R as tf,Ra as j_,Rb as Vh,S as rf,Sa as B_,Sb as Kh,T as of,Ta as q_,Tb as Wh,U as nf,Ua as z_,Ub as Yh,V as We,Va as tr,Vb as Xh,W as sf,Wa as _e,Wb as Jh,X as af,Xa as Q_,Xb as Qh,Y as cf,Ya as Z_,Yb as Zh,Z as df,Za as eh,Zb as eg,_ as lf,_a as th,_b as tg,a as iI,aa as uf,ab as oh,ac as og,b as sI,ba as mf,bb as nh,bc as ng,c as aI,ca as Ek,cb as ih,cc as ig,d as cI,da as Sk,db as sh,dc as sg,e as dI,ea as wk,eb as ah,ec as ag,f as lI,fa as Of,fb as ch,fc as cg,g as mI,ga as vf,gb as dh,gc as dg,h as fI,ha as If,hb as lh,hc as lg,i as _I,ia as f_,ib as ph,ic as pg,j as hI,ja as __,jb as uh,jc as ug,k as js,ka as xk,kb as mh,kc as mg,l as id,la as Nk,lb as fh,lc as fg,m as sd,ma as Lk,mb as _h,mc as _g,n as ad,na as Dk,nb as hh,nc as hg,oa as $k,ob as gh,oc as gg,p as MP,pa as Fk,pb as yh,pc as yg,q as kP,qa as Gk,qb as bh,qc as bg,r as xP,ra as Uk,rb as Th,rc as Tg,s as NP,sa as h_,sb as Ch,sc as Cg,t as LP,ta as g_,tb as Eh,tc as Eg,u as DP,ua as y_,ub as Sh,uc as Sg,v as Mu,va as b_,vb as wh,vc as wg,w as Nu,wa as T_,wb as Ah,wc as Ag,x as Lu,xa as C_,xb as Oh,xc as Og,y as tm,ya as E_,yb as vh,yc as vg,z as cm,za as S_,zb as Ih,zc as Ig}from"./chunks/chunk-2WNORBVN.js";import{e as GP,f as UP,g as Jl,h as Ql,i as jt}from"./chunks/chunk-JD3XWF66.js";import{A as pk,B as uk,C as mk,D as fk,E as _k,F as hk,G as gk,H as yk,I as bk,J as Tk,K as Ck,L as hf,M as gf,N as yf,O as bf,P as Tf,Q as Cf,R as Ef,S as Sf,T as wf,U as Af,a as VM,b as KM,c as WM,d as YM,e as XM,f as Pu,g as JM,h as QM,i as ZM,j as e0,k as t0,m as Qm,n as ff,o as ek,p as tk,q as rk,r as ok,s as nk,t as ik,u as _f,v as sk,w as ak,x as ck,y as dk,z as lk}from"./chunks/chunk-A3WCP4TU.js";import{$ as qR,$a as gp,$b as Au,$d as V_,A as ze,Aa as fP,Ab as tM,Ac as ju,Ad as qf,B as ee,Ba as _P,Bb as fu,Bc as Bu,Bd as zf,C as al,Ca as hP,Cb as rM,Cc as qu,Cd as Hf,Db as bM,Dc as zu,Dd as Vf,Eb as TM,Ec as Hu,Ed as Kf,F as He,Fa as $P,Fb as CM,Fc as Vu,Fd as Wf,G as cl,Ga as FP,Gb as EM,Gc as Ku,Gd as Yf,H as dl,Ha as zl,Hb as SM,Hc as Wu,Hd as Xf,Ia as Hl,Ib as wM,Ic as Yu,Id as Jf,J as fe,Ja as Vl,Jb as AM,Jc as Xu,Jd as Qf,K as ll,Ka as Kl,Kb as MM,Kc as Ju,Kd as Zf,L as pl,La as Wl,Lb as kM,Lc as Qu,Ld as e_,M as ul,Ma as Yl,Mb as _u,Mc as Zu,Md as t_,N as ml,Na as Xl,Nb as hu,Nd as r_,O as kR,Oa as np,Ob as xM,Oc as a0,Od as o_,P as xR,Pa as ip,Pb as NM,Pc as c0,Q as NR,Qa as sp,Qb as LM,Qc as em,Qd as n_,R as LR,Ra as ap,Rb as DM,Rc as dm,Rd as i_,S as DR,Sa as cp,Sb as $M,Sc as lm,Sd as s_,T as xt,Ta as dp,Tb as gu,Tc as pm,Td as a_,U as $R,Ua as lp,Ub as yu,Uc as um,Ud as c_,V as FR,Va as pp,Vb as bu,Vc as mm,Vd as d_,W as Nt,Wa as up,Wb as Tu,Wd as l_,X as GR,Xa as mp,Xb as Cu,Xd as p_,Y as UR,Ya as fp,Yb as Eu,Yd as u_,Z as jR,Za as _p,Zb as Su,Zd as m_,_ as BR,_a as hp,_b as wu,_c as fm,_d as H_,a as WI,aa as Ve,ab as yp,ac as Ou,ad as Bm,ae as K_,b as Rt,ba as zR,bb as bp,bc as vu,bd as qm,be as W_,c as YI,ca as Lt,cb as Tp,cc as Iu,cd as zm,ce as Y_,d as Xc,da as HR,db as Cp,dc as FM,de as X_,e as Jc,ea as VR,eb as Ep,ec as GM,ed as Hm,ee as J_,f as Qc,fa as KR,fb as Sp,fc as UM,fd as Vm,g as Zc,ga as WR,gb as wp,gc as jM,gd as Km,h as ed,ha as YR,hb as Ap,hc as BM,hd as Wm,ia as XR,ib as qP,ic as qM,id as Ym,j as td,ja as JR,jb as Op,jc as zM,jd as Rf,k as rd,ka as QR,kb as vp,kc as HM,kd as Pf,la as ZR,lb as Ip,lc as Ru,ld as Mf,ma as eP,mb as Rp,mc as r0,md as kf,na as tP,nb as zP,nc as o0,nd as xf,o as od,oa as rP,ob as Pp,oc as n0,od as Nf,p as nd,pa as oP,pb as Mp,pc as i0,pd as Lf,qa as nP,qb as kp,qc as s0,qd as Df,ra as iP,rb as xp,rd as $f,sa as sP,sb as Np,sc as ku,sd as Pk,ta as aP,tb as HP,tc as xu,td as Mk,ua as cP,ub as VP,uc as Du,ud as kk,va as dP,vb as KP,vc as $u,vd as Ff,w as Mt,wa as lP,wb as WP,wd as Gf,xa as pP,xb as YP,xc as Fu,xd as Uf,y as kt,ya as uP,yb as XP,yc as Gu,yd as jf,za as mP,zb as JP,zc as Uu,zd as Bf}from"./chunks/chunk-ERD2RYWM.js";import"./chunks/chunk-2D26HRXB.js";import{x as Wd}from"./chunks/chunk-VJLZHOTP.js";import{A as PP,B as Ol,Ba as Dl,C as vl,Ca as $l,D as Il,Da as Fl,E as Rl,Ea as Gl,F as Dt,Fa as Ul,Ha as jl,Ia as Bl,Ja as ql,a as CI,b as EI,c as SI,d as wI,e as AI,f as OI,g as Bs,h as qs,i as zs,j as Hs,k as Vs,la as $t,m as gP,ma as Ft,na as Gt,oa as Ut,pa as Pl,ra as Ml,sa as kl,ta as xl,v as OP,w as vP,y as IP,ya as Nl,z as RP,za as Ll}from"./chunks/chunk-FZ4XWWLO.js";import{a as yP,b as bP,c as TP,d as CP,e as EP,f as SP,g as wP,h as yl,i as bl,j as Tl,k as Cl,l as El,m as AP,n as Sl,o as wl,p as Al}from"./chunks/chunk-QGL5IAP4.js";import{a as fl,b as _l,e as hl,f as gl}from"./chunks/chunk-NYN5OR2T.js";import{$a as mM,$b as x0,A as wR,Aa as su,Ab as Tm,Ac as xm,B as Yd,Ba as au,Bb as Cm,Bc as Nm,C as Xd,Ca as cu,Cb as Em,Cc as Lm,D as Jd,Da as du,Db as p0,Dc as Dm,E as Qd,Ea as lu,Eb as u0,Ec as $m,F as Zd,Fa as pu,Fb as m0,Fc as Fm,G as el,Ga as uu,Gb as f0,Gc as Gm,H as tl,Ha as mu,Hb as _0,Hc as qt,I as rl,Ib as h0,Ic as Um,J as ol,Jb as g0,Jc as X0,K as nl,Kc as J0,L as il,La as QP,Lb as Sm,Lc as Q0,M as qe,Ma as ZP,Mb as y0,Mc as jm,N as AR,Na as eM,Nb as b0,Nc as Z0,O as OR,Oa as oM,Ob as T0,Oc as Ak,P as vR,Pa as nM,Pb as C0,Pc as Ok,Q as IR,Qa as iM,Qb as E0,Qc as vk,R as RR,Ra as sM,Rb as S0,Rc as Ik,S as PR,Sa as aM,Sb as w0,Sc as Rk,T as MR,Ta as cM,Tb as A0,U as sl,Ua as dM,Ub as O0,V as Zl,Va as lM,Vb as v0,W as ep,Wa as pM,Wb as I0,X as tp,Xa as uM,Xb as R0,Y as rp,Yb as P0,Z as jP,Zb as M0,_ as BP,_b as k0,a as gI,aa as op,ac as N0,b as yI,ba as Lp,bb as fM,bc as L0,c as bI,ca as Dp,cb as _M,cc as D0,d as TI,da as $p,dc as $0,e as lR,ea as Fp,ec as F0,f as pR,fa as Gp,fb as hM,fc as G0,g as uR,ga as Up,gb as gM,gc as U0,h as mR,ha as jp,hb as yM,hc as j0,i as fR,ia as Bp,ic as B0,j as _R,ja as qp,jb as OM,jc as q0,k as hR,ka as zp,kb as vM,kc as z0,la as Hp,lb as IM,lc as H0,ma as Vp,mb as RM,mc as V0,na as Kp,nb as PM,nc as K0,oa as Wp,ob as rm,oc as W0,pa as Yp,pb as om,pc as Y0,qa as Xp,qb as nm,qc as Bt,ra as Jp,rb as im,rc as wm,sa as Qp,sb as sm,sc as Am,t as gR,ta as Zp,tb as am,tc as Om,u as yR,ua as eu,ub as _m,uc as vm,v as bR,va as tu,vb as hm,vc as Im,w as TR,wa as ru,wb as gm,wc as Rm,x as CR,xa as ou,xb as ym,xc as Pm,y as ER,ya as nu,yb as l0,yc as Mm,z as SR,za as iu,zb as bm,zc as km}from"./chunks/chunk-J257NZRD.js";import{a as pI,b as uI}from"./chunks/chunk-JLHD7OQ2.js";import{$ as ba,$a as bc,A as Ws,Aa as Va,Ab as ud,B as Ys,Ba as Ka,Bb as md,C as Xs,Ca as Wa,Cb as fd,Da as Ya,Db as _d,E as Js,Ea as Xa,Eb as hd,F as Qs,Fa as Ja,Fb as gd,G as Zs,Ga as Qa,Gb as yd,H as ea,Ha as Za,Hb as bd,I as ta,Ia as ec,Ib as Td,J as ra,Ja as tc,Jb as Cd,K as oa,Ka as rc,Kb as Ed,L as na,La as oc,Lb as Sd,M as ia,Ma as nc,Mb as wd,N as sa,Na as ic,Nb as Ad,O as aa,Oa as sc,Ob as Od,P as ca,Pa as ac,Pb as vd,Q as da,Qa as cc,Qb as Id,R as la,Ra as dc,Rb as Rd,Sa as lc,Sb as Pd,T as pa,Ta as pc,Tb as Md,U as ua,Ua as uc,Ub as XI,V as ma,Va as mc,Vb as JI,W as fa,Wa as fc,Wb as QI,X as _a,Xa as _c,Xb as ZI,Y as ha,Ya as hc,Yb as eR,Z as ga,Za as gc,Zb as tR,_ as ya,_a as yc,a as vI,aa as Ta,ab as Tc,b as II,ba as Ca,bb as Cc,bc as rR,c as RI,ca as Ea,cb as Ec,cc as oR,d as PI,da as Sa,db as Sc,dc as nR,e as MI,ea as wa,eb as wc,ec as iR,fa as Aa,fb as Ac,fc as sR,g as kI,ga as Oa,gb as Oc,gc as aR,h as xI,ha as va,hb as vc,hc as cR,i as Ks,ia as Ia,ib as Ic,ic as dR,j as NI,ja as Ra,ka as Pa,kb as Be,kc as kd,la as Ma,lb as Z,lc as xd,m as LI,ma as ka,mb as Rc,mc as Nd,n as DI,na as xa,nb as jc,nc as Ld,o as Ue,oa as Na,ob as Bc,oc as Dd,p as $I,pa as La,pb as qc,pc as $d,q as FI,qa as Da,qb as zc,qc as Fd,r as GI,ra as $a,rb as Hc,rc as Gd,s as It,sa as Fa,sb as Vc,sc as Ud,t as je,ta as Ga,tb as Kc,tc as jd,u as UI,ua as Ua,ub as Wc,uc as Bd,v as jI,va as ja,vb as Yc,vc as Pt,w as BI,wa as Ba,wb as cd,x as qI,xa as qa,xb as dd,y as zI,ya as za,yb as ld,z as HI,za as Ha,zb as pd}from"./chunks/chunk-F7P42FL5.js";import{a as Xv,b as Jv,c as Qv,d as Zv,e as eI,f as tI,g as rI,h as oI,i as nI,j as Ms,k as ks,l as xs,m as Ns,n as Ls,o as Ds,q as $s,s as Fs,y as Gs}from"./chunks/chunk-LC4DJVXR.js";import{b as Kv}from"./chunks/chunk-4WIVCOA7.js";import"./chunks/chunk-IB7UB5TE.js";import{$b as zO,$c as gs,A as aC,Aa as JA,Ab as PO,Ad as Nv,B as cC,Ba as QA,Bb as MO,Bc as cs,Bd as Lv,C as dC,Cc as ds,Cd as Dv,Db as kO,Dc as ls,Dd as $v,Eb as xO,Ec as ps,Ed as Fv,Fb as NO,Fc as us,Fd as Gv,Gb as LO,Gc as ms,Gd as Uv,Hb as es,Hc as iv,Hd as jv,Ib as ts,Ic as sv,Id as Bv,Jc as av,Jd as qv,K as bC,Kb as rs,Kc as cv,La as ZA,Lb as DO,Lc as dv,M as IC,Ma as eO,Mc as lv,N as RC,Na as tO,Nb as $O,Nc as pv,Nd as vt,O as PC,Oa as rO,Ob as FO,Oc as uv,Od as zv,P as MC,Pa as oO,Pb as GO,Pc as mv,Pd as Hv,Q as $C,Qa as nO,Qc as fv,Qd as Vv,R as FC,Ra as lO,Rb as UO,Rc as _v,Rd as Wv,S as wt,Sa as pO,Sc as hv,Sd as Yv,T as FE,Ta as uO,Tc as gv,U as GE,Ua as At,Ub as jO,Uc as yv,V as UE,Vc as bv,Wa as mO,Wb as BO,Wc as Tv,X as jE,Xa as fO,Xc as Cv,Ya as _O,Yc as fs,Z as BE,Za as hO,Zc as _s,_ as qE,_a as gO,_b as qO,_c as hs,a as WT,aa as zE,ac as HO,ad as ys,ba as HE,bb as yO,bc as os,bd as bs,ca as VE,cc as VO,cd as Ts,da as OA,dd as Cs,ea as vA,ec as KO,ed as Es,fa as IA,fb as Xi,fc as WO,fd as Ss,ga as RA,gc as YO,gd as ws,ha as GA,hc as XO,i as sn,ic as JO,id as As,j as YT,ja as Vi,jc as QO,jd as Ev,k as XT,ka as Ki,kc as ZO,kd as Sv,l as JT,la as Wi,lc as ev,ld as Os,m as QT,mc as tv,md as wv,na as UA,nc as rv,nd as Av,o as ZT,oa as jA,oc as Ot,od as vs,p as eC,pa as BA,pc as ov,pd as Is,qa as qA,qc as nv,qd as Ov,r as tC,ra as zA,rd as vv,sa as HA,sd as Iv,t as rC,ta as VA,td as Rv,u as oC,ud as Pv,v as nC,va as KA,vd as Mv,wc as ns,wd as kv,x as iC,xa as WA,xc as is,xd as Rs,y as sC,ya as YA,yb as IO,yc as ss,yd as Ps,za as XA,zb as RO,zc as as,zd as xv}from"./chunks/chunk-AB5S6TWE.js";import{$a as $S,$b as fw,$c as aA,$d as CO,A as ai,Ab as qS,Ac as jw,Ad as AA,Bb as zS,Bc as Bw,C as tS,Cb as HS,Cc as qw,Cd as PA,Db as VS,Dc as zw,Dd as MA,Eb as KS,Ec as Hw,Ed as kA,Fb as WS,Fc as Vw,Fd as xA,Ga as yS,Gb as YS,Gc as Kw,Gd as NA,Ha as bS,Hc as Ww,Hd as LA,I as rS,Ia as TS,Id as DA,Ja as CS,Jb as XS,Jd as $A,Ka as ES,Kb as JS,Kc as Yw,Kd as FA,L as oS,La as SS,Lb as QS,Lc as Xw,M as nS,Ma as wS,Mb as ZS,Mc as Jw,N as ci,Na as AS,Nb as ew,Nc as Qw,O as di,Oa as OS,Ob as tw,Oc as Zw,Pa as vS,Pb as rw,Pc as eA,Pd as iO,Q as li,Qa as IS,Qb as ow,Qc as tA,R as pi,Rb as nw,Rc as rA,S as ui,Sb as iw,Sd as sO,T as mi,Ta as RS,Tb as sw,Td as aO,U as fi,Ua as PS,Ub as aw,V as iS,Va as MS,Vb as cw,Vc as oA,W as sS,Wa as kS,Wb as dw,Wc as nA,Wd as cO,Xa as xS,Xb as lw,Xd as Yi,Ya as NS,Yb as pw,Yd as dO,Za as LS,Zb as uw,Zc as iA,Zd as bO,_a as DS,_b as mw,_c as sA,_d as TO,ab as FS,ac as _w,ad as cA,ae as EO,bb as GS,bc as hw,bd as dA,be as SO,cb as US,cc as gw,cd as lA,ce as wO,dc as yw,dd as pA,de as AO,e as gt,eb as wi,ec as bw,ed as uA,ee as OO,f as yt,fb as Ai,fc as Tw,fd as mA,fe as vO,ga as _i,gb as Oi,gc as Cw,gd as fA,ge as Ji,h as Rn,ha as hi,hb as vi,hc as Ew,hd as _A,he as Qi,ia as aS,ib as Ii,ic as Sw,id as hA,ie as Zi,ja as gi,jb as Ri,jc as ww,jd as gA,k as KE,ka as yi,kb as Pi,kc as Aw,l as WE,la as cS,lb as Mi,lc as Ow,ld as yA,m as YE,ma as dS,mb as ki,mc as vw,md as zi,n as XE,na as lS,nb as xi,nc as Iw,nd as Hi,o as JE,oa as pS,ob as Ni,oc as Rw,p as QE,pa as uS,pb as Li,pc as Pw,qa as mS,qb as Di,qc as Mw,ra as fS,rb as $i,rc as kw,sa as _S,sb as Fi,sc as xw,sd as bA,ta as hS,tb as Gi,tc as Nw,td as TA,ua as bi,ub as Ui,uc as Lw,ud as CA,v as ZE,va as gS,vb as ji,vc as Dw,vd as EA,wa as Ti,wb as Bi,wc as $w,xa as Ci,xb as qi,xc as Fw,xd as SA,y as si,ya as Ei,yb as jS,yc as Gw,yd as wA,z as eS,za as Si,zb as BS,zc as Uw}from"./chunks/chunk-BV7J3LRH.js";import{$b as Fe,$d as Qn,A as Fo,Aa as pC,Ae as PE,B as Go,Ba as uC,Bb as SC,Be as ME,C as Uo,Ce as ni,D as jo,E as Bo,Ea as gn,Ec as QC,F as qo,Fa as mC,Fb as wC,Fe as kE,G as zo,Ga as fC,Gc as ZC,Gd as Ge,Ge as ii,H as Ho,Ha as _C,Hc as eE,Hd as jn,I as Ne,Ia as hC,Ib as AC,Ic as tE,Ie as xE,J as Le,Jc as rE,K as Vo,Ka as yn,Kb as Tt,Kc as oE,Ke as NE,L as Ko,La as bn,Le as LE,M as Wo,Ma as $e,Mb as Ct,Me as DE,N as Yo,Na as gC,O as Xo,Oa as yC,Ob as Pn,Od as uE,Oe as $E,P as Jo,Pa as Tn,Pb as Mn,Pd as mE,Q as Qo,Qa as Cn,Qb as Et,Qd as fE,R as Zo,Rd as Bn,S as en,Sa as En,Sb as OC,Sd as qn,T as tn,Td as zn,U as rn,Ub as vC,Ud as Hn,V as on,Vb as kC,Vc as Nn,Vd as Vn,W as nn,Wb as xC,Wc as nE,Wd as Kn,Xb as NC,Xd as Wn,Y as ln,Yb as LC,Yc as iE,Yd as Yn,Z as pn,Zb as DC,Zd as Xn,_ as un,_b as GC,_d as Jn,a as I,ac as St,ae as Zn,b as DT,bc as UC,be as ei,c as ht,cc as jC,ce as ti,da as mn,db as Sn,dc as BC,de as ri,e as $T,eb as wn,ec as qC,f as FT,fa as fn,fb as An,fc as q,g as GT,ga as _n,gb as On,gc as zC,ge as _E,h as UT,ha as hn,hb as vn,hc as HC,he as hE,i as jT,ic as VC,id as sE,j as BT,jc as KC,jd as aE,k as qT,kc as WC,kd as cE,ke as gE,l as zT,lc as YC,le as yE,m as HT,mc as XC,md as dE,me as bE,n as VT,nd as lE,ne as TE,o as KT,oe as CE,p as Po,pc as JC,pd as pE,pe as EE,q as Mo,qb as In,qd as Ln,qe as SE,r as ko,re as oi,s as xo,sc as kn,sd as Dn,se as wE,t as ke,tb as TC,tc as xn,td as $n,te as AE,u as No,ub as CC,ud as Fn,v as N,vd as Gn,w as xe,wd as L,we as OE,x as Lo,xd as Un,xe as vE,y as Do,yb as EC,ye as IE,z as $o,za as lC,ze as RE}from"./chunks/chunk-E4BQRZF2.js";import"./chunks/chunk-VS565KBX.js";import"./chunks/chunk-SPPHDVZE.js";import{A as ue,B as LT,C as b,E as an,F as bt,G as me,H as cn,K as De,M as dn,b as IT,c as RT,d as PT,m as MT,r as kT,u as xT,y as NT}from"./chunks/chunk-NHNM3GIP.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 z="2026-07-28",or=["2025-11-25","2025-06-18"],te=[z],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"},rr=["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 Pg(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 Mg(e){if(e!==void 0){if(typeof e!="string"||!rr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:w.logLevel,allowed:[...rr]});return e}}function Ye(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"||!te.includes(r))throw new u("Unsupported protocol version",m.unsupportedProtocolVersion,{supported:[...te],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=Pg(t[w.clientInfo]),s=Mg(t[w.logLevel]);return{protocolVersion:z,clientCapabilities:o,...n?{clientInfo:n}:{},...s?{logLevel:s}:{}}}function EN(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 SN(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 wN(e,t){let r=e.clientCapabilities.extensions;return h(r)&&h(r[t])}function Xe(e,t){let r=h(e._meta)?e._meta:{};return{...e,_meta:{...r,[w.serverInfo]:{...t}}}}function kg(e,t){return Xe({...e,resultType:"complete"},t)}function AN(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 kg({supportedVersions:[...te],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function ON(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 xg=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: ${te.join(", ")}.`,e==="stdio"?`Legacy initialize compatibility: ${or.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 RN(e,t,r){if(e.length===0)return{kind:"serve"};let o=e.find(n=>!xg.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 sr,createHmac as ar,timingSafeEqual as Lg}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 Dg=["elicitation/create","roots/list","sampling/createMessage"],nr=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},cr=/^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/u,he=32,Qe=64*1024,ge=16*1024,Je={maxBytes:256*1024,maxDepth:32,maxNodes:4096};function $g(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function ye(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 Ze(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>he)throw new u("Invalid MCP inputRequests count",m.invalidParams,{minimum:1,maximum:he,observed:r.length});let o={};for(let[n,s]of r){if(!cr.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"||!Dg.includes(i))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${n}.method`,method:i??null});let a=$g(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 ye(o,Qe,"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>he)throw new u("Invalid MCP inputResponses count",m.invalidParams,{maximum:he,observed:t.length});let r={};for(let[o,n]of t){if(!cr.test(o)||!h(n))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${o}`});r[o]=structuredClone(n)}return ye(r,Qe,"inputResponses"),r}function xN(e){let t=e.requestState?.trim();if(t&&Buffer.byteLength(t,"utf8")>ge)throw new u("Invalid MCP requestState: payload exceeds the protocol bound",m.invalidParams,{field:"requestState",maximumBytes:ge});let r=e.inputRequests===void 0?void 0:Ze(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 lr(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 NN(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>ge/2)throw new u("MCP requestState payload exceeds the protocol bound",m.invalidParams,{maximumBytes:ge/2});let o=r.toString("base64url"),n=ar("sha256",lr(t)).update(o).digest("base64url");return`${o}.${n}`}function Fg(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 LN(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=ar("sha256",lr(t)).update(o).digest();if(i.byteLength!==a.byteLength||!Lg(i,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let c;try{c=JSON.parse(Buffer.from(o,"base64url").toString("utf8"))}catch{c=null}let d=Fg(c),{expiresAt:l,method:p,parameterDigest:f,principal:_}=d;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 d}function DN(e){return ye(e,Qe,"request parameters"),sr("sha256").update(JSON.stringify(e)).digest("hex")}var ir=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=sr("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 Gg(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 $N(e,t){return{...e,...Gg(t)}}function Ug(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function jg(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let o of t.slice(2).split("/").map(Ug)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,o))return;r=r[o]}return r}function Bg(e){let t=e.maxBytes??Je.maxBytes,r=e.maxDepth??Je.maxDepth,o=e.maxNodes??Je.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 qg(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 zg(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&jg(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function FN(e,t={}){let{maximumBytes:r,maximumDepth:o,maximumNodes:n}=Bg(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});ye(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});zg(e,a.value),qg(a,s)}return structuredClone(e)}import{randomUUID as Hg}from"node:crypto";import{readFile as Vg}from"node:fs/promises";import pr 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 VN="io.modelcontextprotocol/tasks",Kg=["working","input_required","completed","failed","cancelled"],Wg=/^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,Yg=3600*1e3,Xg=1e3,Te=1024,Jg=30,Qg=2e3;function et(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function be(e){let t=e.trim();if(!Wg.test(t))throw et("Unknown MCP task");return t}function ur(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 mr(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,Te),...h(e.data)?{data:structuredClone(e.data)}:{}}}function Zg(e){if(!Kg.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function ey(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function ty(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function ry(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function oy(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 ny(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function iy(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?be(e.taskId):"",r=Zg(e.status),o=ey(e.principal),n=ty(e.workerPid),s=ry(e.ttlMs),i=oy(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:o,workerPid:n,createdAt:ur(e.createdAt,"createdAt"),lastUpdatedAt:ur(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:s,consumedInputKeys:ny(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Te)}:{},...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=mr(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 H(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 re(e){return e==="completed"||e==="failed"||e==="cancelled"}function sy(e){try{return process.kill(e,0),!0}catch(t){return!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ESRCH")}}var tt=class{#e;#t;#r;#o;#i;constructor(t){this.#e=pr.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#o=t.taskIdFactory??(()=>`mcp-task-${Hg()}`),this.#i=t.workerPid??process.pid}#s(t){return pr.join(this.#e,"runtime","mcp-tasks","records",`${be(t)}.json`)}async#c(t){try{return iy(JSON.parse(await Vg(this.#s(t),"utf8")))}catch(r){throw me(r)||r instanceof SyntaxError?et("Unknown MCP task"):r}}async#a(t){await De(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
5
|
+
`)}async#n(t,r,o){let n=be(t),s=await Ge(this.#e,n,Jg,this.#t,!1,!1,Qg);try{let i=await this.#c(n);if(i.principal!==r)throw et("Unknown MCP task");let a=o(i);return await this.#a(a),a}finally{await s()}}async create(t){let r=be(this.#o()),o=t.principal.trim(),n=t.ttlMs===void 0?Yg: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,Te)}:{}};return await this.#a(a),{...H(a),resultType:"task"}}async get(t,r){return H(await this.#n(t,r,o=>{if(re(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&&!sy(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=Ze(t.inputRequests,t.requestContext);return H(await this.#n(t.taskId,t.principal,o=>{if(re(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,Te),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 c={...a.inputRequests},d=a.inputResponses?{...a.inputResponses}:{};for(let[l,p]of Object.entries(n))Object.prototype.hasOwnProperty.call(c,l)&&(d[l]=p,delete c[l],s.push(l));return i=Object.keys(c).sort(),s.length===0?a:{...a,status:i.length===0?"working":"input_required",lastUpdatedAt:this.#r().toISOString(),inputRequests:i.length===0?void 0:c,inputResponses:d,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 H(await this.#n(t,r,n=>re(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=mr(o);return H(await this.#n(t,r,s=>re(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 H(await this.#n(t,r,o=>re(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 KN(e){return new tt(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 Ce="io.modelcontextprotocol/subscriptionId",fr=256,_r=2048,ay=5e3;function cy(e,t){return new Promise((r,o)=>{let n=setTimeout(()=>o(new Error("MCP subscription sink write timed out")),ay);n.unref(),Promise.resolve().then(()=>e(t)).then(()=>{clearTimeout(n),r()},s=>{clearTimeout(n),o(s instanceof Error?s:new Error(String(s)))})})}function rt(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 dy(e){if(!h(e))throw new u("Invalid MCP subscription filter",m.invalidParams,{field:"notifications",expected:"object"});let t=rt(e.toolsListChanged,"toolsListChanged"),r=rt(e.promptsListChanged,"promptsListChanged"),o=rt(e.resourcesListChanged,"resourcesListChanged"),n;if(e.resourceSubscriptions!==void 0){if(!Array.isArray(e.resourceSubscriptions)||e.resourceSubscriptions.length>fr)throw new u("Invalid MCP resource subscriptions",m.invalidParams,{field:"notifications.resourceSubscriptions",maximum:fr});let s=new Set;for(let i of e.resourceSubscriptions){if(typeof i!="string"||i.trim().length===0||Buffer.byteLength(i,"utf8")>_r)throw new u("Invalid MCP resource subscription URI",m.invalidParams,{field:"notifications.resourceSubscriptions",maximumBytes:_r});s.add(i)}s.size>0&&(n=[...s].sort())}return{...t?{toolsListChanged:t}:{},...r?{promptsListChanged:r}:{},...o?{resourcesListChanged:o}:{},...n?{resourceSubscriptions:n}:{}}}function ly(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 hr=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=ly(dy(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:{[Ce]: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:{[Ce]: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:{[Ce]: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 cy(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{...Xe({resultType:"complete",_meta:{[Ce]: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 gr=/^=\?base64\?([A-Za-z0-9+/]*={0,2})\?=$/u,py=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u,yr=/^[\t\x20-\x7E]*$/u,br=new Set(["prompts/get","resources/read","tools/call"]);function uy(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 Tr(e){let t=typeof e=="boolean"?String(e).toLowerCase():String(e);return t.length>0&&t.trim()===t&&yr.test(t)&&!gr.test(t)?t:`=?base64?${Buffer.from(t,"utf8").toString("base64")}?=`}function Cr(e,t){let r=gr.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||!yr.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 my(e,t,r){let o=e["x-mcp-header"];if(o===void 0)return;let n=e.type;if(typeof o!="string"||!py.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 Er(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,c]of Object.entries(i)){if(!h(c))continue;let d=[...s,a],l=my(c,d,r);l&&t.push(l);for(let[p,f]of Object.entries(c))if(p!=="properties"&&p!=="x-mcp-header"&&Ee(f))throw new u("MCP x-mcp-header is not statically reachable",m.invalidParams,{field:d.join("."),keyword:p});o(c,d)}}};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 fy(e,t){let r=h(e.arguments)?e.arguments:{},o={};for(let n of Er(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}`]=Tr(s)}}return o}function QN(e){let t=h(e.request.params)?e.request.params:void 0,r=Ye(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(br.has(o)){if(s===void 0)return A("Missing MCP request name","Mcp-Name");n["Mcp-Name"]=Tr(s)}return o==="tools/call"&&e.toolSchema!==void 0&&Object.assign(n,fy(t,e.toolSchema)),n}function _y(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=Ye(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"),br.has(r)){let s=e.get("mcp-name"),i=wr(r,o);(s===void 0||i===void 0||Cr(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 hy(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 gy(e){let t=h(e.params.arguments)?e.params.arguments:{};for(let r of Er(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),hy(r,o,Cr(s,n))||A("MCP parameter header does not match request body",n)}}function ZN(e){let t=uy(e.headers),r=typeof e.request.method=="string"?e.request.method:"";_y(t,e.request),!(r!=="tools/call"||e.toolSchema===void 0)&&gy({headers:t,params:e.request.params,toolSchema:e.toolSchema})}var eL=z;import{AsyncLocalStorage as yy}from"node:async_hooks";import{createHash as Ar,timingSafeEqual as by}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}},Ty=/^00-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/u,Cy=/^[a-z][a-z0-9_*/-]{0,255}$/u,Ey=/^(?:[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,Ir=/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/u,wy=/^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]*$/u,Ay=/%(?![0-9A-Fa-f]{2})/u,Oy=512,vy=32,Iy=180,Ry=8192,Py=8192,Rr=new yy;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 My(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 iL(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 sL(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 aL(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=c=>{let d=e[c];if(typeof d!="string")throw new y(`Authorization server metadata requires ${c}`,401);return S(d,c).href},n=c=>{let d=e[c];return typeof d=="string"?S(d,c).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(c=>typeof c=="string"))],...e.client_id_metadata_document_supported===!0?{client_id_metadata_document_supported:!0}:{},...a?{registration_endpoint:a}:{}}}function cL(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 dL(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 lL(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 pL(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 Or=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 ky(e){let t=e.traceparent,r=e.tracestate;if(t!==void 0){let o=typeof t=="string"?Ty.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 D(e){return e.replace(/^[ \t]*|[ \t]*$/gu,"")}function xy(e){return Cy.test(e)||Ey.test(e)}function Ny(e){if(Buffer.byteLength(e,"utf8")>Oy)return!1;let t=e.split(",");if(t.length>vy)return!1;let r=new Set;for(let o of t){let n=D(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(!xy(i)||!Sy.test(a)||r.has(i))return!1;r.add(i)}return!0}function Pr(e){return wy.test(e)&&!Ay.test(e)}function Ly(e){let t=D(e),r=t.indexOf("="),o=D(r>=0?t.slice(0,r):t),n=r>=0?D(t.slice(r+1)):void 0;return Ir.test(o)&&(n===void 0||Pr(n))}function Dy(e){let t=D(e),r=t.split(";"),o=r[0],n=r.slice(1),s=o.indexOf("="),i=D(s>0?o.slice(0,s):""),a=s>0?D(o.slice(s+1)):"";if(!(!Ir.test(i)||!Pr(a)||!n.every(Ly)))return{key:i,serialized:t}}function $y(e,t){if(e===void 0)return;if(typeof e!="string"||Buffer.byteLength(e,"utf8")>Ry)throw new y("Invalid MCP baggage",403);let r=new Set(t),o=e.split(",");if(o.length>Iy)throw new y("Invalid MCP baggage",403);let n=[];for(let s of o){let i=Dy(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 uL(e,t={}){let r=h(e)&&h(e._meta)?e._meta:{},o=$y(r.baggage,t.baggageAllowlist??[]);return{...ky(r),...o?{baggage:o}:{}}}function mL(e,t){return Rr.run(structuredClone(e),t)}function fL(){let e=Rr.getStore();return e?{...e}:void 0}async function _L(e){let t=S(e.policy.resourceMetadataUrl,"protected resource metadata URL",!0).href,r=[...new Set(e.policy.requiredScopes??[])];if(r.some(d=>!vr.test(d)))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=My(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")>Py)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 c=r.filter(d=>!i.scopes.includes(d));if(c.length>0)throw new y("Bearer token has insufficient scope",403,`${o}, scope="${c.join(" ")}"`);return{...i,audience:[...a],scopes:[...i.scopes]}}function hL(e){let t=Ar("sha256").update(e.token).digest();return r=>{let o=Ar("sha256").update(r).digest();if(!by(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 ot="io.modelcontextprotocol/ui",Se="2026-01-26",xr="text/html;profile=mcp-app",Mr=Object.freeze({specVersion:Se,mimeTypes:[xr]});function bL(e){let t=e.clientCapabilities.extensions;if(!h(t))return!1;let r=t[ot];if(r===void 0)return!1;if(!h(r))throw new u("Invalid MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[ot]:Mr}}});let o=r.mimeTypes,n=r.specVersion;if(!Array.isArray(o)||!o.includes(xr)||n!==void 0&&n!==Se)throw new u("Unsupported MCP Apps client capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[ot]:Mr}}});return!0}var Fy={csp:{connectDomains:[],resourceDomains:[],frameDomains:[]},permissions:{},prefersBorder:!0},Nr=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:Fy})));function TL(e){return Nr.find(t=>t.uri===e)}function CL(e){let t=new Map(Nr.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 kr(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function EL(e){let t=kr(e.name),r=kr(e.description),o=JSON.stringify({name:`pm-${e.id}-view`,version:Se}),n=JSON.stringify(Se);return`<!doctype html>
|
|
6
6
|
<html lang="en">
|
|
7
7
|
<head>
|
|
8
8
|
<meta charset="utf-8">
|
|
@@ -25,11 +25,11 @@ import{a as Tg}from"./chunks/chunk-65SBMIK6.js";import{a as Yk,b as Xk,c as Jk,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 nt}from"node:crypto";import{lstat as
|
|
28
|
+
</html>`}import{createHash as nt}from"node:crypto";import{lstat as Gy,readdir as Br,readFile as Uy}from"node:fs/promises";import P from"node:path";import{parseDocument as jy}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 Lr="io.modelcontextprotocol/skills",it="SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",By=Object.freeze({revision:it,status:"draft",directoryRead:!0});function PL(e,t=!1){let r=e.clientCapabilities.extensions,o=h(r)?r[Lr]:void 0;if(!h(o)||o.revision!==it||t&&o.directoryRead!==!0)throw new u("Missing or incompatible Skills over MCP draft capability",m.missingRequiredClientCapability,{requiredCapabilities:{extensions:{[Lr]:By}}})}var R=Object.freeze({maxFilesPerSkill:512,maxFileBytes:16*1024*1024,maxSkillBytes:16*1024*1024,defaultPageSize:20,maxPageSize:100}),Dr=100,qy=32*1024*1024,zy=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,$r=new Set(Array.from({length:R.maxPageSize},(e,t)=>t+1));function C(e,t){throw new u(e,-32602,t)}function Fr(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 Hy(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=jy(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 Vy(e,t,r,o){return r>R.maxFileBytes&&C(`Skill resource exceeds the per-file limit: ${t}.`),o.files+=1,o.files>R.maxFilesPerSkill&&C(`Skill exceeds ${R.maxFilesPerSkill} files.`),o.skillBytes+=r,o.skillBytes>R.maxSkillBytes&&C(`Skill exceeds the aggregate byte limit: ${t}.`),o.originBytes.value+=r,o.originBytes.value>qy&&C(`Skill origin exceeds the aggregate byte limit: ${t}.`),Uy(e)}async function qr(e,t,r){let o=P.join(e,t),n=await Br(o,{withFileTypes:!0}),s=[];for(let i of n.sort((a,c)=>a.name.localeCompare(c.name))){let a=P.posix.join(t.split(P.sep).join("/"),i.name),c=P.join(e,...a.split("/")),d=await Gy(c);d.isSymbolicLink()&&C(`Skill resource must not be a symbolic link: ${a}.`),d.isDirectory()?s.push(...await qr(e,a,r)):d.isFile()?s.push({relative:a,bytes:await Vy(c,a,d.size,r)}):C(`Skill resource must be a regular file or directory: ${a}.`)}return s}async function Gr(e,t,r){let o=new Map,n;try{n=await Br(e,{withFileTypes:!0})}catch(a){if(bt(a))return o;throw a}let s=n.filter(a=>a.isDirectory()&&zy.test(a.name)).sort((a,c)=>a.name.localeCompare(c.name));s.length>Dr&&C(`Skill origin exceeds ${Dr} directories.`);let i={value:0};for(let a of s){let c=await qr(P.join(e,a.name),"",{files:0,skillBytes:0,originBytes:i}),d=c.reduce((g,T)=>g+T.bytes.byteLength,0),l=c.find(g=>g.relative==="SKILL.md");if(!l)continue;let p=Hy(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=c.map(g=>({uri:`skill://${a.name}/${g.relative}`,digest:`sha256:${nt("sha256").update(g.bytes).digest("hex")}`,size:g.bytes.byteLength})),_=nt("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:it,origin:t,packageVersion:r,protocolVersion:z,trust:"untrusted",estimatedTokens:Math.ceil(d/4)},files:new Map(c.map(g=>[g.relative,g.bytes])),fingerprint:_})}return o}function Ur(e){let{files:t,fingerprint:r,...o}=e;return o}var jr=class e{#e;#t;constructor(t){this.#e=t,this.#t=nt("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 Gr(P.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=P.resolve(t.packageRoot,".agents","skills"),n=P.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await Gr(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;$r.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((c,d)=>c.uri.localeCompare(d.uri)),s=n.slice(o,o+r),i=o+s.length,a=i<n.length;return{skills:s.map(Ur),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"}),Ur(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(d=>d.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"},c=Fr(n,s);return c!=="application/octet-stream"?{contents:[{uri:t,mimeType:c,text:s.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:c,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]}`,c=new Map;for(let T of n.resources){let E=T.uri.slice(`${a}/`.length);if(!E.startsWith(i))continue;let B=E.slice(i.length),[v,...vo]=B.split("/"),Ro=`${a}/${i}${v}`,Io=n.files.get(`${i}${v}`);c.set(v,{uri:Ro,name:v,mimeType:vo.length>0?"inode/directory":Fr(v,Io)})}s.length>0&&c.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let d=r.limit??I.maxPageSize;$r.has(d)||C(`Skill directory limit must be an integer from 1 to ${I.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...c.values()].sort((T,E)=>T.uri.localeCompare(E.uri)),f=p.slice(l,l+d),_=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]="619dbd55-b854-5e69-b5a5-c0bcada81629")}catch{}})();var zr="https://schema.unbrained.dev/pm/workspace-recipe/v1";function st(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)=>st(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,st(o,`${t}.${r}`)])))}function we(e){if(e.schema!==zr)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=Tt(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:st(r.input,`operations[${o}].input`)})))})}async function Hr(e,t){let r=we(e);return Ct(r,t)}async function Fy(e,t){return Hr(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 Vr="pm.agent-observation/v1",Kr="pm.agent-verdict/v1",Wr="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 M(e,t){if(e.trim().length===0)throw new Error(`${t} must not be empty.`)}function oe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))oe(t)}return e}function Gy(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(M(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 Uy(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 jy(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(M(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($(s,"observation.tiers.fields"),n.has(s))throw new Error(`Duplicate observation tier field: ${s}.`);n.add(s)}}}function By(e){if(e.schema!==Vr)throw new Error(`observation.schema must be ${Vr}.`);return M(e.id,"observation.id"),O(e.version,"observation.version"),Gy(e.reads),Uy(e.calibration),e.corpus_dependence.kind==="bounded"&&(M(e.corpus_dependence.dimension,"observation.corpus_dependence.dimension"),O(e.corpus_dependence.maximum,"observation.corpus_dependence.maximum")),jy(e.tiers),oe(structuredClone(e))}function gL(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 qy(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"),c=Math.ceil(a/4);if(c<=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:c,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 $(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 Yr(e,t){let r=e;for(let o of $(t,"recorded field path")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function zy(e){return`/${$(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function Hy(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 Vy(e){if(e.schema!==Kr)throw new Error(`verdict.schema must be ${Kr}.`);M(e.id,"verdict.id"),O(e.version,"verdict.version");let t=new Set;for(let o of e.predicates){M(o.id,"verdict.predicates.id"),$(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}.`);Hy(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 oe(structuredClone(e))}function Ky(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),c=Yr(t.state,a.path),d=a.kind==="field_present"?c!==void 0:a.kind==="field_absent"?c===void 0:R(c)===R(a.expected);return{id:i,outcome:d?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${zy(a.path)}`,evidence_digest:ht(R(c))}}),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 yL(e){if(e.schema!==Wr)throw new Error(`episode.schema must be ${Wr}.`);if(M(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)M(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)$(t,"episode.observable_fields");for(let t of e.withheld_fields)$(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 By(e.observation),Vy(e.verdict),we(e.recipe),oe(structuredClone(e))}function Wy(e,t,r){let o=$(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 Yy(e,t){let r={};for(let o of t)Wy(r,o,Yr(e,o));return r}async function bL(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"}},c=await L(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:c.state_id});let d=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 qy(e.observation,async _=>Yy(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(),_=Ky(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),_};return{observe:()=>L(a,d),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 L(a,()=>t.execute(p));return r.push({sequence:r.length+1,kind:"action",state_id:f.state_id}),f},score:()=>L(a,l),close:()=>i!==void 0?i:s?Promise.reject(new Error("episode is already closed.")):(s=!0,i=L(a,()=>l(!0)).then(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:oe(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]="1202ba19-0bcb-5478-b245-4472e361d4de")}catch{}})();var F="https://schema.unbrained.dev/pm/corpus-shape/v1";function V(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError(`Corpus shape ${t} must be a positive safe integer`);return e}function ne(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Jr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Jr(t);Object.freeze(e)}}function K(e){if(e.schema!==F)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(V(e.hierarchy_depth,"hierarchy_depth"),V(e.hierarchy_fanout,"hierarchy_fanout"),ne(e.age_span_days,"age_span_days"),V(e.history_entries_per_item,"history_entries_per_item"),ne(e.comments_per_100_items,"comments_per_100_items"),ne(e.notes_per_100_items,"notes_per_100_items"),ne(e.learnings_per_100_items,"learnings_per_100_items"),V(e.author_cardinality,"author_cardinality"),V(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 Jr(t),t}var Ae=[{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}],W=Object.freeze({scratch:K({schema:F,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:K({schema:F,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:Ae,author_cardinality:32,component_count:1,include_cycles:!1,custom_types:["Experiment"],custom_statuses:["review"],terminal_statuses:[],custom_fields:["domain"]}),"deep-graph":K({schema:F,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:Ae,author_cardinality:16,component_count:1,include_cycles:!0,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),"multi-decade":K({schema:F,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:Ae,author_cardinality:64,component_count:1,include_cycles:!1,custom_types:["Program"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["portfolio"]}),"disconnected-archive":K({schema:F,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:Ae,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function Xy(){return Object.keys(W).sort().map(e=>W[e])}function Jy(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(W,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(W).join(", ")}`);return W[t]}var Xr=new WeakMap;function Qr(e,t){if(e===0)return[];let r=Xr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Xr.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 Qy(e,t,r,o=42){if(ne(t,"item index"),V(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,c=1;for(let E=0;E<e.hierarchy_depth;E+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+c),c=Math.min(Number.MAX_SAFE_INTEGER,c*e.hierarchy_fanout);let d=i%a,l=i-d,p=d===0?void 0:s+(l+Math.floor((d-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:Qr(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 at=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,Qr(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 c=Math.floor(this.itemCount/100),d=this.itemCount%100,l=c*a+Math.max(0,a+d-100),p=c*a+Math.min(a,d),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,c=this.expectedEdgeKinds[i]??0;a!==c&&o.push(`edge_kind:${i}:${a}!=${c}`)}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 at(e)}function Zy(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 eb(){let e=$e(process.cwd(),process.env.PM_PATH);await At(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 tb(){await vt()}(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 eo=["lines","branches","functions","statements"];function rb(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function ob(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 nb(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)){rb(r,o);for(let n of eo){let s=ob(r,n,o[n]),i=s.total-s.covered;i>0&&t.push({file:r,metric:n,uncovered:i,...s})}}return t}import Y from"node:fs";import ct 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 to=300*1e3,ib=3;function FL(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function GL(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.");Y.mkdirSync(e,{recursive:!0});let o=ct.join(e,r);Y.mkdirSync(o,{recursive:!0});let n=new Date;Y.utimesSync(o,n,n);let s=Y.readdirSync(e).filter(d=>d!==r).flatMap(d=>{try{return[{name:d,mtimeMs:Y.statSync(ct.join(e,d)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&me(l))return[];throw l}}).sort((d,l)=>l.mtimeMs-d.mtimeMs||d.name.localeCompare(l.name)),i=s.filter(d=>n.getTime()-d.mtimeMs<to),a=Math.max(0,ib-1-i.length),c=s.filter(d=>n.getTime()-d.mtimeMs>=to).slice(a).map(d=>d.name).sort((d,l)=>d.localeCompare(l));for(let d of c)Y.rmSync(ct.join(e,d),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:c}}import{createHash as sb}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 dt=1;function X(e){e?.throwIfAborted()}function G(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${t} must be non-empty`);return e.trim()}function J(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:dt,fingerprint:sb("sha256").update(R({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function ab(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function se(e){if(!ab(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==dt)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 Fe([]);for(let n of e.kinds)t.register(n);let r=new q(e.nodes,e.edges,t),o=J(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 k(e,t){G(e.name,"adapter name");let r=G(t.workspace,"workspace");X(t.signal);let o=await e.read({...t,workspace:r});return X(t.signal),o===null?null:se(o)}async function Oe(e,t){let r=G(t.workspace,"workspace"),o=se(t.snapshot).snapshot,n=await k(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(X(t.signal),await e.replace({workspace:r,signal:t.signal,snapshot:o,expected_fingerprint:n?.snapshot.fingerprint??null}),(await k(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 cb(e,t={}){let r=e.map(se),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let c=o.get(a.kind);if(c&&R(c)!==R(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Fe([...o.values()].sort((i,a)=>i.kind.localeCompare(a.kind))),s=new q(new Set(r.flatMap(i=>[...i.snapshot.nodes])),r.flatMap(i=>[...i.snapshot.edges]),n);return J(s,n,t)}var ie=class{name;#e=new Map;constructor(t="memory"){this.name=G(t,"adapter name")}async read(t){X(t.signal);let r=this.#e.get(G(t.workspace,"workspace"));return r?structuredClone(r):null}async replace(t){X(t.signal);let r=G(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(se(t.snapshot).snapshot))}async clear(t){X(t.signal);let r=G(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 ro(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function db(e){let t=ro(e.nodeCount,"nodeCount"),r=ro(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 U(e,t){if(!e)throw new Error(`Relationship graph adapter conformance: ${t}`)}async function oo(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=St(),n=J(new q(["a","b"],[{source:"a",target:"b",kind:"related"}],o),o,{createdAt:"2026-01-01T00:00:00.000Z"}),s=J(new q(["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=[];U(await k(e,{workspace:r})===null,"workspace must start empty"),i.push({name:"empty-read",passed:!0});let a=await Oe(e,{workspace:r,snapshot:n});U(a.disposition==="written","first sync must write"),i.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:r})).nodes.push("mutated-reader-copy"),U((await k(e,{workspace:r}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),i.push({name:"read-isolation",passed:!0}),U((await Oe(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}),U((await k(e,{workspace:r}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),i.push({name:"replacement-visibility",passed:!0});let c=!1;try{await e.replace({workspace:r,snapshot:n,expected_fingerprint:n.fingerprint})}catch{c=!0}return U(c,"stale compare-and-swap must fail"),i.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:r,expected_fingerprint:s.fingerprint}),U(await k(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 lb(e){return oo(new ie,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 lt=2,pb=["self_reported","independent_transport"];function ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function no(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=ae(o,`${t}[${String(n)}]`);return r?o:s})}function pt(e,t){return e===void 0?void 0:ae(e,t)}function ub(e,t){if(e===void 0)return;if(!ve(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 mb(e,t,r,o,n,s){if(o==="refusal"){if(Ve(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=gt(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=yt(t.slice(i+1));l!==void 0&&(a=xe(`history ${l}`))}let c=Lt(a);if(!Ve(r)||r!==0&&!c?.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 d=Nt(a).kind;if(o!==d)throw new TypeError(`${e} expected ${o}, but ${a} declares ${d}`)}function fb(e,t,r){if(!ve(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=ae(e.id,`${o}.id`),s=no(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"&&!xt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let c=a,d=e.expected_accounting_mode;if(!pb.includes(d))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=d;if(l==="independent_transport"&&c!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=no(e.required_fields,`${o}.required_fields`);if(p.some(E=>E.split(".").some(B=>B.length===0)))throw new TypeError(`${o}.required_fields must contain dot-separated own-property paths`);let f=ub(e.expected_field_values,`${o}.expected_field_values`),_=pt(e.expected_error_code,`${o}.expected_error_code`),g=pt(e.expected_refusal_surface,`${o}.expected_refusal_surface`),T=pt(e.recovery_for,`${o}.recovery_for`);return mb(o,s,i,c,_,g),{id:n,args:s,expected_exit_code:i,expected_output_kind:c,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 _b(e,t){if(!ve(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=ae(e.id,`tasks[${String(t)}].id`),o=ae(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)=>fb(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 hD(e){if(!ve(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==lt)throw new TypeError(`agent-task transcript corpus version must be ${String(lt)}`);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)=>_b(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:lt,tasks:t}}import{createHash as io}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 so(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function TD(e,t){let r=so(t.migrationId,"migrationId"),o=so(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=qe(e,void 0,t.registry),a=i.graph.nodes(),c=i.graph.edges().map(f=>{let _=io("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`})}),d=io("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:c})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=c.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:d,nodes:a,events:Object.freeze(p),edge_count:c.length,skipped_existing_count:c.length-p.length,duplicate_dependency_rows:i.duplicateRows.length,dangling_reference_count:i.dangling.active.length+i.dangling.legacy_terminal.length})}import*as ao 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"],ut={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"}},ED=Object.freeze(Object.keys(ut));function co(e){if(Object.hasOwn(ut,e))return ut[e]}var hb=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function gb(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 yb(e){return e===void 0||e.kind==="punctuator"&&hb.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function bb(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
|
|
32
|
-
`&&t.push(r+1);return t}function
|
|
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 Db(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 $b(e){return[e.exit_code!==ue.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 ${ue.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."},...Db(e)]}function DD(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 $b(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 uo="not-a-declared-action";function Fb(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 de(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function HD(e=je.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})=>de(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=de(r.command),a=s.length>1&&t.has(i)?s.map(de).join("--"):i,c=Z(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),d=Ue.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${de(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>Fb(r.command,l)),...c],recovery_args:[...s,"--help"],error_code:d&&!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 Gb(e){switch(N(e)){case"assurance":case"workspace snapshot":return Ue.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return Ne;case"merge":return Le;case"plan":return Ke;case"profile":return We;case"schema":return Dt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function VD(e=je){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-${de(t)}`,command:t,refusal_args:[...r,uo],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:uo,allowed_values:[...Gb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function Ub(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function jb(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&&!Ub(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 KD(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=>jb(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 ft=[{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 YD(){return ft.map(e=>({...e}))}function Bb(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 XD(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of ft){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=Bb(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:ft.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]="53d44e0f-8c72-5169-9417-db057e165f63")}catch{}})();var Re,qb=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 zb(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=qb[N(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(N(e))?"linked-file-path":["comments","notes","learnings"].includes(N(e))?"entry-file-input":"plan-definition-file"}function Ie(){if(Re!==void 0)return Re;let e=ee.filter(({command:n})=>Be(n)).flatMap(({command:n,family:s})=>It(n,Z(n)).map(i=>({command:n,family:s,concept:zb(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 Re=Object.freeze(r.map(n=>Object.freeze({...n,concept:o.get(n.concept)?.size===1?n.concept:`${n.concept}@${n.command}`}))),Re}function r1(){return Object.freeze(Ie().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var mo=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:32,notes:36,learnings:32,files:41,docs:32,deps:32,plan:111,test:58,"test-all":41,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}),Hb=1,fo=Object.freeze(Object.fromEntries(Object.entries({...mo,...Object.fromEntries(ke.flatMap(({alias:e,canonical:t})=>{let r=mo[e];return r===void 0?[]:[[t,r]]}))}).map(([e,t])=>[e,t+Hb])));function _o(){let e=new Map(Object.keys(fo).map(t=>[t,0]));for(let{command:t}of Ie())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(fo).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function Vb(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 Kb(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 Wb(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 c of n.accepted_spellings)a.has(c)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${c} no longer resolves to ${n.canonical_flag}.`})}}function o1(e=Ie(),t=_o(),r=[]){let o=[],n=new Map,s=new Map,i=new Map,a=new Map;for(let c of e){let d=`${c.command}:${c.flag}`;n.has(d)?o.push({code:"duplicate_canonical_flag",command:c.command,detail:`${c.flag} has more than one canonical row.`}):n.set(d,c),a.set(c.command,(a.get(c.command)??0)+1);let l=s.get(c.concept);l!==void 0&&l!==c.value_kind?o.push({code:"inconsistent_concept_kind",command:c.command,detail:`${c.concept} uses both ${l} and ${c.value_kind}.`}):s.set(c.concept,c.value_kind);let p=i.get(c.concept);p!==void 0&&p!==c.flag?o.push({code:"semantic_spelling_collision",command:c.command,detail:`${c.concept} is canonicalized by both ${p} and ${c.flag}.`}):i.set(c.concept,c.flag)}return Vb(e,n,o),Kb(a,t,o),Wb(e,r,o),o.sort((c,d)=>c.command.localeCompare(d.command)||c.code.localeCompare(d.code)||c.detail.localeCompare(d.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:c})=>c)).size,baseline_entry_count:r.length,findings:o}}function n1(){let e=Ie(),t=_o(),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]="3f3a5dca-8370-52d7-b279-dc6f9f0aeadf")}catch{}})();function s1(e){return e}function a1(e){return e}function c1(e){return e}function d1(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 y1(e){return e}function b1(e){return{handled:!0,result:e}}function T1(){return{handled:!1}}function C1(e){return e}function E1(e){return e}function S1(e){return e}function w1(e){return e}function A1(e){return e}function O1(e){return e}function v1(e){return e}function R1(e){return e}function I1(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 Yb(e={},t={}){return new _e(t).extension(void 0,{...e,migrate:!0})}function Xb(e={},t={}){return new _e(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]="c96e4de9-16ef-581a-aa4b-6450917c2c65")}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 x(e){if(typeof e!="string"||!Et(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function Jb(e){let t=x(e.window_start),r=x(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 Qb(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 c=x(i.started_at);if(i.repaired_at!==void 0&&(x(i.repaired_at)<c||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");c>=r&&c<o&&a.push(i)}return n}function W1(e,t){let{start:r,end:o}=Jb(t),n=[...Qb(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(_=>_.outcome==="failure"),c=i.filter(_=>_.outcome!=="pending").length,d=c===0?null:a.length/c,l=a.filter(_=>_.repaired_at!==void 0&&x(_.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let _ of a)p[_.cause??"unknown"]+=1;let f=[];return c<t.min_completed_attempts&&f.push("insufficient_completed_attempts"),d!==null&&d>t.max_failure_rate&&f.push("failure_rate"),{family:s,attempts:i.length,completed:c,failed:a.length,pending:i.length-c,failure_rate:d,affected_days:[...new Set(a.map(_=>new Date(x(_.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(_=>(x(_.repaired_at)-x(_.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 le(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function Zb(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"||!le(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=>!le(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 eT(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"||!le(o.identity)||r.has(o.identity)||!le(o.reason)||!le(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 X1(e,t=[]){let r=Zb(e),o=[...r.keys()].sort(),n=eT(t,o),s=[...new Set([...r.values()].flatMap(d=>[...d]))].sort(),i=[],a=new Set;for(let d of s){let l=o.filter(_=>!r.get(_).has(d));if(l.length===0)continue;let p=n.get(d),f=p!==void 0&&JSON.stringify([...p.missing_from].sort())===JSON.stringify(l);f&&a.add(d),i.push({identity:d,present_in:o.filter(_=>r.get(_).has(d)),missing_from:l,disposition:f?{reason:p.reason,evidence:p.evidence}:null})}let c=[...n.keys()].filter(d=>!a.has(d)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(d=>d.disposition!==null)&&c.length===0,counts:Object.fromEntries(o.map(d=>[d,r.get(d).size])),findings:i,stale_exceptions:c}}(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]="15d63d97-9126-59ae-be28-b77fdfd07b9c")}catch{}})();import{createHash as go,createHmac as tT,randomBytes as rT,timingSafeEqual as oT}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 x$="dev.unbrained.pm/progressive-tool-discovery",N$=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),nT=Object.freeze(["pm_discover","pm_next","pm_context","pm_search","pm_get"]),j=Object.freeze({lexical:.4,semantic:.2,graph:.1,permission:.15,freshness:.05,usage:.1}),iT=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),yo={core:0,standard:1,full:2,internal:3},bo=Object.freeze(["core","standard","full"]),sT=new Set(["core","standard","full","custom"]),To=new Set(ee.map(({family:e})=>e)),aT=rT(32);function Me(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 Co(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 Eo(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 cT(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 L$(e){if(wo(e),e.family!==void 0&&(typeof e.family!="string"||!To.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"||!bo.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:Me(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:Co(e.limit)}:{},...e.cursor!==void 0?{cursor:Me(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:So(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:Eo(e.outputBudget)}:{}}}function dT(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function pe(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function lT(e,t){let r=pe(e);if(r.length===0)return 0;let o=new Set(pe(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 pT(e,t){let r=pe(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=pe(t),s=r.filter(a=>n.some(c=>c.startsWith(a)||a.startsWith(c))).length,i=o.includes(e.toLowerCase())?.2:0;return Math.min(1,s/r.length+i)}function ho(e){return go("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function Ao(e,t,r){return tT("sha256",r).update(JSON.stringify({version:1,fingerprint:e,offset:t})).digest("base64url")}function uT(e,t,r){let o={version:1,offset:t,signature:Ao(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function mT(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(Ao(t,s,o),"base64url"),a=Buffer.from(n.signature,"base64url");if(a.length!==i.length||!oT(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 _t(e,t,r){return{value:dT(e),weight:t,available:r!=="unavailable",source:r}}function Pe(e,t,r){return _t(e??t,r,e===void 0?"computed":"host")}function fT(e,t,r){let o=Object.hasOwn(fe,e.name)?fe[e.name]:"help",n=ze(o),s=`${e.name} ${e.description} ${o} ${n}`,i=lT(t,s),a=new Set(pe(t)),c={lexical:_t(i,j.lexical,"computed"),semantic:Pe(e.signals?.semantic,pT(t,s),j.semantic),graph:Pe(e.signals?.graph,a.has(n)||a.has(o)?1:0,j.graph),permission:_t(1,j.permission,"authorization"),freshness:Pe(e.signals?.freshness,1,j.freshness),usage:Pe(e.signals?.usage,nT.includes(e.name)?1:0,j.usage)},d=Object.values(c).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:He(o),family:n,score:Number(d.toFixed(6)),signals:c,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function _T(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"||!bo.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"||!To.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"||!sT.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function hT(e){let t=Me(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");Me(e.cursor===void 0?"":e.cursor,"cursor");let r=Co(e.limit===void 0?10:e.limit),o=Eo(e.outputBudget===void 0?1200:e.outputBudget);return _T(e),{query:t,includeSchema:So(e.includeSchema),limit:r,budget:o,maximumTier:yo[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Oo(e,t,r){let o=r??e.tools.reduce((i,a,c)=>i+(c===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"),c=Math.ceil((a+o)/4);if(c===s)break;s=c}return s}function gT(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>fT(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&yo[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 yT(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(Oo(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function D$(e,t={}){cT(e),wo(t);let r=hT(t),o=t.cursorIntegrityKey??aT,n=gT(e,t,r),s=ho({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=mT(t.cursor,s,n.length,o),a=n.slice(i,i+r.limit),c=[];r.includeSchema||c.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),i+r.limit<n.length&&c.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let d={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:j},cache:{key:ho({fingerprint:s,cursorIntegrityKey:go("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:iT}},l=(g,T=g.length)=>{let E=i+T,B=E<n.length,v=[...c];return T<a.length&&v.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...d,tools:[...g],returned:T,has_more:B,...B?{next_cursor:uT(s,E,o)}:{},omission_receipt:{has_omissions:v.length>0,omitted:v}}},p=g=>{let T=l(g),E=Oo(T,r.budget);return{...T,token_cost:{estimated_tokens:E,budget:r.budget,within_budget:r.budget==="unbounded"||E<=r.budget}}},f=yT(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]="e02d896b-ffa2-5bfa-83dc-d567e1ecd8be")}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]="1a20eaea-fce9-55ce-863c-499cd9af38fd")}catch{}})();export{Mv as ACTIONABILITY_ORDERING_KINDS,Bc as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,pc as ACTIVITY_FLAG_CONTRACTS,ni as AGENT_PROVENANCE_DIMENSIONS,Ys as AGGREGATE_FLAG_CONTRACTS,La as APPEND_FLAG_CONTRACTS,bM as ASSURANCE_ACTIONS,TM as ASSURANCE_DECLARATION_KINDS,kI as ASSURANCE_DOCUMENT_VERSION,tc as ASSURANCE_FLAG_CONTRACTS,xI as ASSURANCE_GATE_TRIGGERS,NI as ASSURANCE_MEASUREMENT_SOURCE_KINDS,AP as ASSURANCE_PRESET_IDS,RI as AssuranceEvaluationRefusalError,vI as AssuranceMutationRefusalError,II as AssuranceSourceResolutionError,qn as BASELINE_ITEM_FORMAT_VERSION,PR as BOUNDARY_FIXTURE_CAPTURE_SOURCES,dR as BRIEF_LIST_FIELDS,si as BUILTIN_AGENT_PROVENANCE_ADAPTERS,W as BUILTIN_CORPUS_SHAPES,ii as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,ln as BUILTIN_ITEM_TYPE_VALUES,Ht as BUILTIN_PROFILES,PC as BUILTIN_RELATIONSHIP_KINDS,Gc as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,lc as CALENDAR_FLAG_CONTRACTS,Da as CLAIM_FLAG_CONTRACTS,Md as CLOSE_ACTION_OPTION_KEYS,xa as CLOSE_FLAG_CONTRACTS,Na as CLOSE_MANY_FLAG_CONTRACTS,Ba as CLOSE_TASK_FLAG_CONTRACTS,Xs as COMMENTS_FLAG_CONTRACTS,tC as COMMON_MUTATION_COMMAND_OPTION_KEYS,Sc as COMPLETION_FLAG_CONTRACTS,hn as CONFIDENCE_TEXT_VALUES,pa as CONFIG_FLAG_CONTRACTS,Uc as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,n0 as CONTEXT_EVALUATION_METRIC_NAMES,mc as CONTEXT_FLAG_CONTRACTS,Rw as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,Bt as CONTEXT_OUTPUT_VALUES,d0 as CONTEXT_PACKING_PROFILES,XM as CONTEXT_RECENCY_EPOCH,e0 as CONTEXT_RELEVANCE_SERVICE,QM as CONTEXT_RELEVANCE_SIGNAL_NAMES,u0 as CONTEXT_SIGNAL_SET_VERSION,p0 as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,m0 as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,gw as CONTEXT_USAGE_LIMITS,Ec as CONTRACTS_FLAG_CONTRACTS,sc as COPY_FLAG_CONTRACTS,nd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,sd as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,id as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,ST as CREATE_DIRECT_CLOSE_REASON_DEFAULT,rc as CREATE_FLAG_CONTRACTS,LE as CURRENT_HISTORY_HASH_ALGORITHM,Xw as CURRENT_HISTORY_ITEM_HASH_VERSION,Qw as CURRENT_HISTORY_RECORD_HASH_VERSION,zn as CURRENT_ITEM_FORMAT_VERSION,g0 as ContextSignalStore,yw as ContextUsageValidationError,qM as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,N0 as DEFAULT_CHILD_SAMPLE_LIMIT,cR as DEFAULT_COMPACT_LIST_FIELDS,EO as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,hf as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,CP as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,NM as DEFAULT_TERMINAL_TRANSITION_POLICY,C0 as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,DR as DEFECT_ESCAPE_CLASSES,$R as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Fa as DELETE_FLAG_CONTRACTS,mn as DEPENDENCY_KIND_VALUES,hc as DEPS_FLAG_CONTRACTS,ea as DOCS_FLAG_CONTRACTS,Qa as DUPLICATES_FLAG_CONTRACTS,JP as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,jR as DefectRecurrencePolicyParseError,yc as EVAL_FLAG_CONTRACTS,df as EVAL_METRIC_NAMES,mf as EVAL_QUERY_SET_CONTRACT,ff as EVAL_QUERY_SET_EXAMPLE,uf as EVAL_QUERY_SET_SCHEMA_ID,uc as EVENTS_FLAG_CONTRACTS,za as EVENT_FLAG_CONTRACTS,Do as EXECUTABLE_COMMAND_ALIASES,ue as EXIT_CODE,Ea as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Ca as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,Ia as EXTENSION_ADOPT_FLAG_CONTRACTS,pk as EXTENSION_CAPABILITIES,CT as EXTENSION_CAPABILITY_CONTRACT,bT as EXTENSION_CAPABILITY_CONTRACT_VERSION,TT as EXTENSION_CAPABILITY_LEGACY_ALIASES,Ln as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,Ra as EXTENSION_CATALOG_FLAG_CONTRACTS,Sa as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,Ta as EXTENSION_DESCRIBE_FLAG_CONTRACTS,va as EXTENSION_DOCTOR_FLAG_CONTRACTS,ba as EXTENSION_EXPLORE_FLAG_CONTRACTS,ua as EXTENSION_FLAG_CONTRACTS,fa as EXTENSION_INIT_FLAG_CONTRACTS,ga as EXTENSION_INSTALL_FLAG_CONTRACTS,Aa as EXTENSION_MANAGE_FLAG_CONTRACTS,wa as EXTENSION_MIGRATE_FLAG_CONTRACTS,uk as EXTENSION_POLICY_MODES,mk as EXTENSION_POLICY_SURFACES,Oa as EXTENSION_RELOAD_FLAG_CONTRACTS,_k as EXTENSION_SANDBOX_PROFILES,ma as EXTENSION_SCOPE_FLAG_CONTRACTS,fk as EXTENSION_TRUST_MODES,ya as EXTENSION_UNINSTALL_FLAG_CONTRACTS,ZR as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,JR as EXTERNAL_DEPENDENCY_SOURCE_KIND,QR as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,QO as ExtensionCommandError,Zs as FILES_FLAG_CONTRACTS,ac as FOCUS_FLAG_CONTRACTS,Xa as GC_FLAG_CONTRACTS,mR as GET_DEPTH_INPUT_VALUES,uR as GET_DEPTH_VALUES,fc as GET_FLAG_CONTRACTS,Ks as GLOBAL_FLAG_CONTRACTS,Jp as GRAPH_DURABLE_CACHE_MIN_ITEMS,Xp as GRAPH_DURABLE_CACHE_VERSION,gc as GRAPH_FLAG_CONTRACTS,aR as GRAPH_QUERY_DEFAULTS,Ne as GRAPH_SUBCOMMAND_VALUES,_c as GUIDE_FLAG_CONTRACTS,Za as HEALTH_FLAG_CONTRACTS,ia as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,gP as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,AM as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,sa as HISTORY_COMPACT_FLAG_CONTRACTS,Ti as HISTORY_EVENT_CLASSIFICATION_VERSION,ta as HISTORY_FLAG_CONTRACTS,xE as HISTORY_HASH_ALGORITHMS,lO as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,oa as HISTORY_REDACT_FLAG_CONTRACTS,na as HISTORY_REPAIR_FLAG_CONTRACTS,Nl as INIT_AGENT_GUIDANCE_MODE_VALUES,la as INIT_FLAG_CONTRACTS,Pa as INSTALL_FLAG_CONTRACTS,_n as ISSUE_SEVERITY_VALUES,nc as ITEM_COMPLETE_FLAG_CONTRACTS,BP as ITEM_LATEST_TIMESTAMP_FIELDS,ET as ITEM_METADATA_KEY_ORDER,oc as ITEM_MUTATE_FLAG_CONTRACTS,ic as ITEM_REOPEN_FLAG_CONTRACTS,Is as ITEM_REVISION_CONFLICT_CHANGE_LIMIT,Rs as ITEM_REVISION_CONFLICT_CODE,LP as ITEM_SCALAR_MISSING_VALUE,pn as ITEM_TYPE_VALUES,jP as ITEM_UNION_COLLECTION_FIELDS,h0 as JsonFileContextSignalStoreAdapter,Qs as LEARNINGS_FLAG_CONTRACTS,NE as LEGACY_HISTORY_HASH_ALGORITHM,ep as LINKED_ARTIFACT_NOTE_CONFLICT_MODES,Lu as LINKED_TEST_ENV_NAME_PATTERN,Du as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Nu as LINKED_TEST_PROTECTED_ENV_KEYS,$u as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,$c as LIST_COMMANDER_STRING_OPTION_CONTRACTS,lR as LIST_COMMAND_DEFAULT_PROJECTIONS,gk as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,Ws as LIST_FILTER_FLAG_CONTRACTS,aI as LIST_SORT_FIELDS,cI as LIST_SORT_ORDER_VALUES,Ci as MAINTENANCE_HISTORY_OPERATIONS,x0 as MAX_CHILD_PROJECTION_ITEMS,MR as MAX_WAIVER_NOTICE_DAYS,IT as MAX_WORKFLOW_POLICIES,PT as MAX_WORKFLOW_POLICY_TERMS,qa as MEET_FLAG_CONTRACTS,ek as MERGE_DRIVER_ARTIFACT_VALUES,ra as MERGE_FLAG_CONTRACTS,Le as MERGE_SUBCOMMAND_VALUES,ok as MUTATION_EVENT_WIRE_BUDGET,ie as MemoryRelationshipGraphAdapter,jc as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,Tc as NEXT_FLAG_CONTRACTS,xm as NEXT_OUTPUT_VALUES,BM as NEXT_RANKING_POLICIES,Js as NOTES_FLAG_CONTRACTS,Kv as OutputEnvelopeFitError,_a as PACKAGE_FLAG_CONTRACTS,ha as PACKAGE_INIT_FLAG_CONTRACTS,ja as PAUSE_TASK_FLAG_CONTRACTS,Pd as PLAN_CREATE_METADATA_PARAMETER_KEYS,da as PLAN_FLAG_CONTRACTS,qs as PLAN_SHOW_DEPTH_VALUES,Ke as PLAN_SUBCOMMANDS,Bm as PLAN_TEMPLATE_NAMES,pb as PM_AGENT_TASK_ACCOUNTING_MODES,lt as PM_AGENT_TASK_TRANSCRIPT_VERSION,ko as PM_BULK_LIFECYCLE_COMMAND_ALIASES,ns as PM_CLI_ERROR_DETAILS_LIMITS,ls as PM_CLI_EXPECTED_ERROR_NAME,TR as PM_CLI_GRAMMAR_CONTRACT,_R as PM_CLI_GRAMMAR_NOUNS,Yo as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,hR as PM_CLI_SHARED_VERBS,Lo as PM_COMMAND_ALIAS_CONTRACTS,ee as PM_COMMAND_CAPABILITY_CONTRACTS,Rt as PM_COMMAND_DESTINATION_CONTRACTS,EI as PM_COMMAND_EXIT_CONTRACTS,CI as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,ki as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,yI as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,je as PM_COMMAND_POSITIONAL_CONTRACTS,ol as PM_COMMAND_VISIBILITY_CONTRACTS,pP as PM_COMPLETE_LIST_FINDING_CODES,Gv as PM_CONTEXT_INTENTS_FILE,Iw as PM_CONTEXT_INTENT_CONTRACTS,Mo as PM_CONTEXT_OPS_COMMAND_ALIASES,Ho as PM_CORE_COMMAND_NAMES,F as PM_CORPUS_SHAPE_SCHEMA,Jo as PM_DEPRECATED_TOOL_ACTIONS,vi as PM_DIAGNOSTIC_DEGRADATION_STEPS,Ri as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,Oi as PM_DIAGNOSTIC_OUTPUT_CLASSES,Qo as PM_DISCOVERABLE_TOOL_ACTIONS,Wr as PM_EPISODE_SCHEMA,hI as PM_ERROR_CODE_CATALOG,uI as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,eo as PM_EXACT_COVERAGE_METRICS,Go as PM_EXTENSION_CAPABILITY_CONTRACTS,Vo as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,jo as PM_EXTENSION_POLICY_MODE_CONTRACTS,zo as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,qo as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,Uo as PM_EXTENSION_SERVICE_NAME_CONTRACTS,Bo as PM_EXTENSION_TRUST_MODE_CONTRACTS,Fi as PM_GENERIC_REFUSAL_GUIDANCE,rP as PM_GITATTRIBUTES_END,tP as PM_GITATTRIBUTES_START,nP as PM_GITATTRIBUTES_V2_END,oP as PM_GITATTRIBUTES_V2_START,pl as PM_GITIGNORE_END,ll as PM_GITIGNORE_START,IM as PM_HISTORY_ATTESTATION_CONTRACT,Po as PM_HISTORY_COMMAND_ALIASES,JE as PM_HISTORY_OPERATION_ALIASES,ZE as PM_HISTORY_OPERATION_CONTRACT,QE as PM_HISTORY_OPERATION_PATTERNS,Wo as PM_ITEM_ACTION_SUBCOMMANDS,YE as PM_ITEM_HISTORY_OPERATIONS,ot as PM_MCP_APPS_EXTENSION,Mr as PM_MCP_APPS_SERVER_CAPABILITY,Se as PM_MCP_APPS_SPEC_VERSION,Nr as PM_MCP_APP_CONTRACTS,xr as PM_MCP_APP_MIME_TYPE,nT as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,kN as PM_MCP_HTTP_PROTOCOL_VERSION,vg as PM_MCP_INPUT_REQUEST_METHODS,or as PM_MCP_LEGACY_PROTOCOL_VERSIONS,rr as PM_MCP_LOG_LEVELS,w as PM_MCP_META_KEYS,x$ as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,N$ as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,cl as PM_MCP_PROMPT_CONTRACTS,z as PM_MCP_PROTOCOL_VERSION,al as PM_MCP_RESOURCE_CONTRACTS,it as PM_MCP_SKILLS_DRAFT_REVISION,Lr as PM_MCP_SKILLS_EXTENSION,xy as PM_MCP_SKILLS_SERVER_CAPABILITY,I as PM_MCP_SKILL_LIMITS,Ce as PM_MCP_SUBSCRIPTION_ID_META_KEY,te as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,wN as PM_MCP_TASKS_EXTENSION,Fg as PM_MCP_TASK_STATUSES,fe as PM_MCP_TOOL_COMMAND_CONTRACTS,uS as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,fs as PM_MUTATION_ACTION_CONTRACTS,ke as PM_NAMESPACED_COMMAND_ALIASES,Vr as PM_OBSERVATION_SCHEMA,Ai as PM_OUTPUT_BUDGET_CLASSES,wi as PM_OUTPUT_DEGRADATION_STEPS,xt as PM_OUTPUT_ENVELOPE_KINDS,Ft as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,Ko as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,$t as PM_PACKAGE_RESOURCE_KINDS,Ue as PM_POSITIONAL_ACTION_CONTRACTS,Fd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Dd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,qS as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,nw as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,jS as PM_READ_OUTPUT_DIMENSIONS,BS as PM_READ_OUTPUT_OPTION_FLAGS,DS as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,LS as PM_READ_OUTPUT_SESSION_MIN_TOKENS,BC as PM_READ_OUTPUT_SURFACES,zS as PM_READ_OUTPUT_SURFACE_CONTRACTS,kS as PM_READ_OUTPUT_TAIL_RETENTION_POLICIES,pS as PM_READ_ROW_CONTRACTS,lS as PM_READ_ROW_JQ_SELECTOR,Bi as PM_RECOVERY_ECHO_FIELDS,ED as PM_RECOVERY_REFERENCE_FIELDS,ce as PM_RECOVERY_REFERENCE_KINDS,Lb as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,po as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,ID as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,lo as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,xo as PM_RELOCATED_COMMAND_ALIASES,Ud as PM_REPRODUCIBLE_PROCESS_ENV,SI as PM_SUCCESS_EXIT_CODES,Xo as PM_TOOL_ACTIONS,kd as PM_TOOL_ACTION_PARAMETER_CONTRACTS,$d as PM_TOOL_PARAMETERS_SCHEMA,Ld as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Nd as PM_TOOL_PARAMETERS_SCHEMA_VERSION,Rd as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Kr as PM_VERDICT_SCHEMA,XE as PM_WORKSPACE_HISTORY_OPERATIONS,zr as PM_WORKSPACE_RECIPE_SCHEMA,ca as PROFILE_FLAG_CONTRACTS,Qt as PROFILE_LINT_CODES,Jt as PROFILE_LINT_DIMENSIONS,zt as PROFILE_NAMES,We as PROFILE_SUBCOMMANDS,b as PmCliError,_e as PmClient,uP as PmCompleteListValidationError,y as PmMcpAuthorizationError,nr as PmMcpInputRequiredError,Or as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,ir as PmMcpRequestStateReplayGuard,jr as PmMcpSkillRegistry,hr as PmMcpSubscriptionRegistry,tt as PmMcpTaskStore,hw as QUERY_CURSOR_CONTRACT,VS as READ_OUTPUT_MUTATION_CONFLICT_CODE,KS as READ_OUTPUT_SHAPING_CONTROL_FLAGS,ka as REINDEX_FLAG_CONTRACTS,rO as REINDEX_LOCK_ID,dt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,Ga as RELEASE_FLAG_CONTRACTS,Ha as REMIND_FLAG_CONTRACTS,wt as RESERVED_ITEM_FIELD_NAMES,$a as RESTORE_FLAG_CONTRACTS,fn as RISK_VALUES,Yv as RelationshipEventLog,Xv as RelationshipEventStore,q as RelationshipGraph,Fe as RelationshipKindRegistry,aa as SCHEMA_FLAG_CONTRACTS,Fc as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,yk as SEARCH_EXTENSION_FLAG_DEFINITIONS,Cc as SEARCH_FLAG_CONTRACTS,tm as SEMANTIC_ATTRIBUTION_LIMITS,AT as SETTINGS_DEFAULTS,Cf as SNAPSHOT_SCHEMA,QI as SOURCE_CONTEXT_ACCESS_ENV,ZI as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,sm as START_BLOCKED_REFUSAL_CODE,im as START_BLOCKER_ENFORCEMENT_DEFAULT,Ua as START_TASK_FLAG_CONTRACTS,Ja as STATS_FLAG_CONTRACTS,un as STATUS_VALUES,Vs as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Ei as SUBSTANTIVE_HISTORY_OPERATIONS,Jw as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,Zw as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,DC as SUPPRESS_HOST_OUTPUT_MARKER,Wa as TELEMETRY_FLAG_CONTRACTS,Yf as TELEMETRY_SUBCOMMANDS,Ka as TEST_ALL_FLAG_CONTRACTS,Va as TEST_FLAG_CONTRACTS,Ya as TEST_RUNS_FLAG_CONTRACTS,zf as TEST_RUN_MEASUREMENT_LIMIT,wd as TOOL_ACTIVITY_OPTION_CONTRACTS,ud as TOOL_AGGREGATE_OPTION_CONTRACTS,Td as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,Sd as TOOL_CALENDAR_OPTION_CONTRACTS,Ed as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,Ad as TOOL_CONTEXT_OPTION_CONTRACTS,gd as TOOL_CREATE_OPTION_CONTRACTS,hd as TOOL_CREATE_OPTION_CONTRACT_SOURCE,Od as TOOL_DEPS_OPTION_CONTRACTS,vd as TOOL_GRAPH_OPTION_CONTRACTS,pd as TOOL_LIST_FILTER_OPTION_CONTRACTS,md as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,_d as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,fd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,Cd as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,bd as TOOL_UPDATE_OPTION_CONTRACTS,yd as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,wT as TYPE_TO_FOLDER,RC as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,ad as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,dd as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,cd as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,cc as UPDATE_FLAG_CONTRACTS,dc as UPDATE_MANY_FLAG_CONTRACTS,Ma as UPGRADE_FLAG_CONTRACTS,On as URL_CREDENTIAL_PLACEHOLDER,ec as VALIDATE_FLAG_CONTRACTS,RT as WORKFLOW_POLICY_ACTIONS,aP as WORKFLOW_POLICY_DOCUMENT_SCHEMA,sP as WORKFLOW_POLICY_SCHEMA,bc as WORKSPACE_FLAG_CONTRACTS,CA as WORKSPACE_HISTORY_ID,Ef as WORKSPACE_SNAPSHOT_ACTIONS,Xl as WorkspaceGraphCache,tR as WorkspaceTransactionInterruptedError,Au as _testOnly,k0 as _testOnlyAggregateCommand,Wl as _testOnlyConfigCommand,F0 as _testOnlyGetCommand,pu as _testOnlyHealthCommand,Fl as _testOnlyInit,Ll as _testOnlyInitAgentGuidance,xk as _testOnlyItemTransaction,ak as _testOnlyMutationEvents,I0 as _testOnlyNextCommand,Z0 as _testOnlySearchCommand,SP as _testOnlySimilarity,Vm as _testOnlyTemplates,Eu as _testOnlyValidateCommand,lk as _testOnlyWorkspacePosition,Lk as abandonItemTransaction,sR as abandonWorkspaceTransaction,IP as acceptAssuranceProposals,Tu as acknowledgeLinkedTests,Vl as acknowledgeUnknownAuthorHistoryEvents,Hl as acknowledgeUnknownAuthorHistoryEventsFromTransport,SO as acquireItemMetadataDerivedIndexLock,Ge as acquireLock,oi as acquireLockLease,fx as activateExtensionForTest,eE as activateExtensions,cm as admitStartWithOpenBlockers,ri as agentSessionEnvironment,Y_ as aggregate,xf as analyzeAgentProvenanceDescriptorCoverage,GR as analyzeDefectChangeRisk,yM as analyzeDefectRecurrenceCoverage,Sp as analyzeDuplicateItems,Qv as analyzeGraphImpact,Kd as analyzeHierarchyIntegrity,Zv as analyzeKnowledgeGraph,AI as analyzePmCommandExitConformance,Zo as analyzePmToolActionParity,iM as analyzeReconciliationDiscard,Jv as analyzeRelationshipExecution,Bp as analyzeRelationshipSchedule,bg as analyzeSdkActionCoverage,Pt as analyzeSdkCliParameterCompleteness,ah as append,Hi as appendHistoryEntry,AA as appendWorkspaceAuditEvent,wA as appendWorkspaceHistoryChange,jT as applyAcceptanceCriteriaMutations,vP as applyAssurancePreset,Pc as applyBootstrapPagerPolicy,mM as applyClosureTimestampFix,Nw as applyContextIntentProjection,km as applyContextTagProjection,dI as applyFilterValueEcho,sO as applyHistoryPatch,Gd as applyInvocationAuthorOverride,dp as applyPathMigrations,ew as applyReadOutputDimensions,XS as applyReadOutputIncludeModes,FS as applyReadOutputSessionReferences,OE as applyRegisteredItemFieldDefaultsAndValidation,mp as applyStandaloneNote,Us as applyStoredExtensionMigrationState,qT as applyTagRemovals,FM as applyTerminalOrderingPolicy,fp as artifactKey,hC as asRecordClone,_C as asRecordOrNull,qe as assembleWorkspaceRelationshipGraph,hP as assertCompleteListResult,Wx as assertExtensionBlueprint,Kx as assertExtensionCapabilityUsage,Ix as assertExtensionDeactivated,Jx as assertExtensionManifestCompatible,Xx as assertExtensionManifestMatchesBlueprint,Qx as assertExtensionPreflight,Xd as assertHierarchyMutationAllowed,OM as assertHistoryCompactTarget,aM as assertHistoryRepairTarget,Zi as assertInitializedTracker,lp as assertLinkedArtifactMutationIsUnambiguous,tN as assertMcpClientCapabilities,eN as assertMcpProtocolHeader,lb as assertMemoryRelationshipGraphAdapterConformance,VT as assertNoUnknownCsvKeys,ku as assertNonHierarchyCardinalityMutationAllowed,Px as assertPackageManifest,NA as assertParentReferenceIsNotSelf,cL as assertPmMcpSkillsCapability,Yx as assertProjectProfile,yO as assertProjectRuntimeCompatibility,fO as assertProjectRuntimeFormatGuard,mS as assertProjectionModeChoice,Qi as assertReadableTrackerRoot,Mx as assertRegisteredCommandContract,jx as assertRegisteredCommandOverride,$x as assertRegisteredExporter,kx as assertRegisteredFlags,xx as assertRegisteredHook,Dx as assertRegisteredImporter,Fx as assertRegisteredItemField,Gx as assertRegisteredItemType,Vx as assertRegisteredMigration,Bx as assertRegisteredParserOverride,qx as assertRegisteredPreflightOverride,Ux as assertRegisteredProfile,zx as assertRegisteredRendererOverride,Nx as assertRegisteredSearchProvider,Hx as assertRegisteredServiceOverride,Lx as assertRegisteredVectorStoreAdapter,NC as assertRelationshipEdgeAllowed,oo as assertRelationshipGraphAdapterConformance,GT as assertSchemaPreviewSupported,Qf as assertTestMeasurementRun,Hw as assertWellFormedOutputText,LI as assuranceAssertionUpdateIsLoosening,$w as attachContextIntentReceipt,bw as attachContextUsageServingReceipt,hu as attachLinkedTestMutationProvenance,_u as attachLinkedTestProvenance,Xe as attachMcpServerInfo,bS as attachOutputOmissionReceipt,Gw as attachOutputTokenAccounting,Fw as attachReadOutputContracts,GS as attachReadOutputSessionReceipt,yl as auditMergeAttributeFence,iP as auditMergeDriverConfiguration,Wp as auditWorkspaceRelationshipGraph,KN as authorizeMcpHttpRequest,ei as boundAgentEpisodeIdentity,RS as boundReadOutputRows,Rm as buildChildrenByParent,K0 as buildCompactSearchFilterSummary,lI as buildContentFilterEcho,_0 as buildContextSignalSnapshot,Qy as buildCorpusShapeItemPlan,FR as buildDefectRecurrenceIndex,Rl as buildExtensionDescribeResult,Pl as buildExtensionInstallPlan,pI as buildGovernanceMissingFilterEcho,zA as buildInvalidTypeError,L0 as buildItemChildrenRollup,Mk as buildItemCompletionMutations,ZM as buildItemContextRelevanceCandidates,IO as buildItemNotFoundError,$0 as buildItemSchedule,fM as buildLinkedFileRepairReport,FN as buildMcpAuthorizationDiscoveryUrls,Sg as buildMcpCompleteResult,oN as buildMcpDiscoverResult,qN as buildMcpDynamicRegistrationMetadata,PN as buildMcpHttpRequestHeaders,pN as buildMcpInputRequiredResult,$N as buildMcpProtectedResourceMetadata,hl as buildMergeAttributePatterns,xd as buildPmActionToolInputSchema,kD as buildPmRefusalClosureCensus,EP as buildRelationshipContext,NO as buildSearchCorpus,DO as buildSemanticCorpusInput,lM as buildStatusRoleWarnings,Ji as buildTrackerInitializationRecovery,jO as buildVectorizationEmbeddingIdentity,BO as buildVectorizationEmbeddingMetadata,W0 as buildVerboseSearchFilters,cP as buildWorkflowCompletenessCheck,E0 as buildWorkspaceMemorySnapshot,Zn as canonicalDocument,rC as canonicalizeCommandOptionKey,Wk as canonicalizeCommandSuggestions,JM as canonicalizeContextRecencyCoordinate,MC as canonicalizeRelationshipKind,SD as censusPmRecoveryReferenceProducers,_P as certifyCompleteListResult,lx as checkExtensionManifestCompatibility,zh as claim,Hh as claimNext,yP as classifyHistoryAuthorEvent,Si as classifyHistoryEvent,oM as classifyHistoryMergeReceiptReferences,VC as classifyHostEnvironmentFault,X0 as classifyImplicitSemanticFallbackReason,Kn as classifyItemFormatVersion,e_ as classifyLinkedTestCommandSafety,t_ as classifyLinkedTestFailure,gE as clearActiveExtensionHooks,ru as clearDurableGraphCache,iS as clearFocusedItem,a_ as clearWorkspaceContractsCache,qh as close,vu as closeItem,Zh as closeTask,xc as coalesceRepeatedListFlags,kv as collectBlockedByIds,Nv as collectBlockedByIdsFromCorpus,Cw as collectContextUsageDeliveredItemIds,el as collectDanglingDependencyReferences,Dv as collectDependencyBlockedIds,Qd as collectDuplicateDependencyRows,Kp as collectDuplicateRelationshipEdgeGroups,Y0 as collectErrorCauseCodes,Vd as collectHierarchyRelations,Er as collectMcpHeaderAnnotations,tl as collectMissingDependencyTargetIds,Mu as collectNewOrderingCycleWarnings,zp as collectOrderingCycles,Zd as collectOrderingStorageContradictions,Bv as collectPackageContextIntentContracts,Ut as collectPackageExtensionDirectories,wE as collectRegisteredItemFieldNames,qE as collectRuntimeCreateFieldValues,HA as collectRuntimeFilterValues,zE as collectRuntimeUpdateFieldValues,Sm as collectSubtreeIds,Dn as collectUsedExtensionCapabilities,oC as commandOptionFlagLabel,Q_ as comments,M_ as commitImportedItem,kk as commitItemCompletion,Pk as commitItemMutations,oR as commitWorkspaceTransaction,Hs as compactFlagAliasContracts,wm as compareCriticalItems,pO as comparePmDateVersions,eR as compareRelationshipSnapshots,gC as compareTimestampStrings,WM as compileHistoryProvenanceMatcher,kw as composeContextIntentContracts,ox as composeExtension,dx as composeExtensionPackage,Fv as computeActionabilityReport,yA as computeHistoryDiff,Up as computeRelationshipCentrality,Gp as computeRelationshipDominators,Yl as computeWorkspaceGraphFingerprint,dh as config,hE as consumeAfterCommandAffectedItems,q_ as context,Dw as contextIntentRowId,Kh as copy,xu as countFailureCategories,OS as countReadOutputRows,Uh as create,OP as createAssurancePreset,hM as createAssuranceWorkspaceContext,bC as createCheckpointId,mP as createCompleteListOptions,tE as createCoreCommandHookContext,Zr as createCorpusShapeMeasurement,UI as createEmptyAssuranceDocument,qC as createEmptyExtensionRegistrationRegistry,ZO as createExtensionCommandError,$s as createExtensionCommandSdk,xn as createExtensionContributionInventory,Zx as createExtensionTestHarness,zi as createHistoryEntry,fv as createLazyModule,dP as createLifecycleCompletenessPolicies,WN as createMcpStaticBearerVerifier,AN as createMcpTaskStore,RO as createMutationGuardSdk,fS as createOutputOmissionReceipt,us as createPmCliExpectedError,Ds as createPmCliProgram,Pi as createPmCommandOutputBudget,dw as createQueryFingerprint,db as createRelationshipGraphScaleFixture,J as createRelationshipGraphSnapshot,St as createRelationshipKindRegistry,Bd as createReproducibleProcessRunner,H0 as createSearchCursorFingerprint,rE as createSerialQueue,QT as createStdinTokenResolver,IC as createUnknownSubcommandError,FT as createWorkflowPolicyEvaluator,Sf as createWorkspaceSnapshot,_x as deactivateExtensionForTest,T1 as declineServiceOverride,Lw as decodeContextIntentCursor,mv as decodeHtmlEntitiesInOptions,Cr as decodeMcpHttpHeaderValue,jw as decodePmTableRows,mw as decodeQueryCursor,pw as decodeQueryCursorEnvelope,uw as decodeQueryCursorState,aw as decodeReadOutputContinuationCursor,ux as decodeToon,ZN as decoratePmMcpToolsWithApps,hp as dedupeLinkedArtifacts,vE as defaultConfigScope,t0 as defaultScoreContextCandidates,O1 as defineAfterCommandHook,w1 as defineBeforeCommandHook,A1 as defineBeforeMutationHook,c1 as defineCommand,_1 as defineCommandOverride,K as defineCorpusShape,yL as defineEpisodeSpecification,S1 as defineExporter,tx as defineExtension,rx as defineExtensionBlueprint,s1 as defineExtensionManifest,d1 as defineFlag,E1 as defineImporter,p1 as defineItemField,l1 as defineItemType,u1 as defineMigration,By as defineObservationContract,I1 as defineOnIndexHook,R1 as defineOnReadHook,v1 as defineOnWriteHook,h1 as defineParserOverride,Mi as definePmCommandOutputBudget,gI as definePmCommandOutputEnvelope,mI as definePmErrorCodeCatalog,g1 as definePreflightOverride,a1 as defineProjectProfile,C1 as defineRendererOverride,m1 as defineSearchProvider,y1 as defineServiceOverride,f1 as defineVectorStoreAdapter,Vy as defineVerdictContract,we as defineWorkspaceRecipe,Wh as deleteItem,If as deleteWorkspaceSnapshot,LC as dependencyToRelationship,ih as deps,RP as deriveAssuranceProposals,pM as deriveClosureTimestamp,ix as deriveExtensionCapabilities,bk as deriveMutationTransactionId,OI as derivePmBulkMutationEffect,wD as derivePmRecoveryReferenceObligations,qp as deriveRelationshipDeadlines,El as deriveSchemaEvolutionMigrationId,iv as deriveTelemetryCommandResolution,YA as describeAllowedTransitions,JI as describeExtensionActivation,sx as describeExtensionBlueprint,OC as describeFlagScalarValueFailure,pm as describeItemOwnershipConflict,xs as describeItemRevisionChanges,gL as describeObservationCost,Yt as describeProfileComposition,Xt as describeProjectProfile,Fk as describeReadCompletenessControls,ev as describeUnknownError,mi as detectAgentIdentity,gi as detectHarnessIdentity,$p as detectRelationshipCommunities,fi as diagnoseAgentIdentity,Yp as diffRelationshipAuditSnapshots,Kf as diffTestRunMeasurements,fN as digestMcpRequestParameters,QC as discoverExtensions,bn as discoverNearbyPmRoot,D$ as discoverPmTools,mO as discoverProjectRuntimeVersionPins,nh as docs,J_ as duplicates,Qp as durableGraphCachePath,ou as durableGraphCacheStatus,Hn as effectiveItemFormatVersion,Ov as emitTelemetryErrorEvent,P_ as emptyImportedDocument,$P as encodeItemScalarDecisionValue,Tr as encodeMcpHttpHeaderValue,Uw as encodePmTableRows,lw as encodeQueryCursor,sw as encodeReadOutputContinuationCursor,mx as encodeToon,bA as enforceHistoryStreamPolicyForItem,TA as enforceHistoryStreamPolicyForItems,RR as enrichCliFlagInvocationContract,It as enrichCliFlagInvocationContracts,cO as ensureMaterializedHistoryTarget,ml as ensurePmGitignore,np as ensureScope,JO as ensureSentryCommandTracing,XO as ensureSentryInit,I_ as ensureTrackerInitialized,Lp as enumerateRelationshipPaths,Ni as estimatePmOutputTokens,BI as evaluateAssuranceAssertion,qI as evaluateAssuranceGate,LR as evaluateBoundaryFixtures,i0 as evaluateContextRanking,UR as evaluateDefectGateEvidence,jI as evaluateMeasurement,pf as evaluateMetricFloors,hs as evaluateMutationGuard,Gf as evaluateProvenanceCoverage,W1 as evaluateReliabilityWindow,Df as evaluateSemanticAttributionCoverage,Ap as evaluateSimilarityGovernance,WA as evaluateTransition,Ky as evaluateVerdictContract,$T as evaluateWorkflowPolicies,os as executeEmbeddingBatchesWithRetry,GO as executeVectorDelete,UO as executeVectorReset,FO as executeVectorUpsert,Fy as executeWorkspaceRecipe,up as expandAddGlobEntries,vp as explainSourceTraceability,MM as exportAttestation,eg as extension,rg as extensionActivate,og as extensionDeactivate,tg as extensionList,Yb as extensionMigrate,rM as extractHistoryMergeReceiptDispositions,tM as extractHistoryMergeReceiptReferences,zN as extractMcpTraceContext,nO as extractPatchFailureContext,uu as extractReferencedPmItemIdsFromCommand,cb as federateRelationshipGraphSnapshots,th as files,rh as filesDiscover,oh as filesLookup,Ew as finalizeContextUsageDelivery,nb as findCoverageDeficits,wp as findDuplicateClusters,_l as findGitWorkspaceRoot,FE as findHistoryIdentityDiscontinuities,Ol as findInstalledNpmPackageCandidate,QN as findPmMcpAppByUri,No as findPmNamespacedCommand,Fp as findRedundantRelationshipEdges,jp as findRelationshipCutStructure,Ep as findSimilarItems,Av as finishTelemetryCommand,Wv as fitOutputEnvelope,AC as flattenFlagListValue,tb as flushTelemetryQueue,Xh as focus,Dp as forEachMatchedRelationshipEdge,Vp as formatDuplicateEdgeGroup,Wd as formatHierarchyRelation,Hp as formatOrderingStorageContradiction,bR as formatPmPositionalActionFlagTip,nf as formatProfileApplyHuman,of as formatProfileLintHuman,tf as formatProfileListHuman,rf as formatProfileShowHuman,Al as formatSchemaEvolutionMigrationHuman,Q0 as formatVectorIndexRecoveryWarnings,dk as formatWorkspacePositionHuman,Nh as gc,Wi as generateItemId,K_ as get,mE as getActiveCommandResult,Pw as getActiveContextIntentContracts,Fn as getActiveExtensionRegistrations,VN as getActiveMcpTraceContext,HI as getAssuranceDeclaration,hg as getContracts,oS as getFocusedItem,En as getHistoryPath,Vv as getItemAt,Cn as getItemPath,bs as getMutationActionContract,ul as getPmGitignoreBlock,Tn as getSettingsPath,c_ as getWorkspaceContracts,EA as getWorkspaceHistoryPath,sh as graph,Zp as graphAuditBaselinePath,$f as groupHistoryByEpisode,b1 as handleServiceOverride,rN as hasMcpClientExtension,JN as hasPmMcpAppsCapability,Be as hasSubcommandFlagContractsForCommand,qO as hasVectorizationEmbeddingIdentityChanged,zO as hasVectorizationVectorDimensionChanged,aA as hashDocument,cA as hashDocumentForVersion,dA as hashEmptyDocument,tA as hashHistoryPatch,eA as hashHistoryRecord,rA as hashHistoryStream,FP as hashItemScalarDecisionValue,xh as health,Mp as hierarchyAncestors,kp as hierarchyDescendants,Fh as historyCompact,Gh as historyCompactBulk,$E as historyDigest,KM as historyEntryMatchesProvenance,uO as historyItemHashVersionForRuntime,Lh as historyRedact,Dh as historyRepair,$h as historyRepairAll,xv as indexBlockedByIds,Yd as indexHierarchyRelations,HO as inferConsistentVectorDimension,Ii as inferPmOutputBudgetClass,ch as init,fP as inspectCompleteListResult,zC as inspectExtensionManifestSchema,Ul as inspectHistoryAuthorStream,VP as inspectMergeReceiptEvidence,gO as inspectProjectRuntimeCompatibility,As as inspectStaleInProgressItems,Tg as inspectStaticExtensionInventory,dM as inspectStatusRoleAssignments,SA as inspectWorkspaceHistoryState,wf as inspectWorkspaceSnapshot,Cl as installMergeFence,nN as interpretMcpResultType,Lm as isAlreadyClaimedError,ov as isCommanderError,jk as isCompatibleRecoveryFlag,Xc as isErrnoError,Rv as isExternalDependencyReference,Iv as isExternalDependencySourceKind,me as isFileMissingError,Gi as isGenericRefusalRequired,Ui as isGenericRefusalWhy,FC as isHostOutputSuppressed,ps as isItemAlreadyExistsError,Ns as isItemRevisionConflict,DP as isItemScalarMissingValue,QP as isLegacyMergeReceiptSummary,h as isMcpRecord,gs as isMutationAction,xC as isOrderingRelationshipKind,kA as isPlaceholderReferenceToken,is as isPmCliErrorDetails,ms as isPmCliExpectedError,tn as isPmExtensionCapabilityContract,on as isPmExtensionPolicyModeContract,nn as isPmExtensionPolicySurfaceContract,rn as isPmExtensionServiceNameContract,wI as isPmKnownExitCode,bI as isPmMutationReceipt,Ve as isPmSuccessfulExitCode,ds as isPmTokenBudgetRecovery,en as isPmToolAction,ZP as isPreDurableCloneLocalReceiptSummary,eM as isPreDurableDispositionEligibleReference,hO as isProjectMutatingInvocation,_v as isPureSnakeCaseAlias,rw as isReadOutputBudgetExceeded,NS as isReadOutputSessionReference,Uk as isReadProjectionRecoveryFlag,tw as isReadResultOmittedForBudget,hS as isReadRowContract,zd as isRuntimeRecord,QA as isSettingsReadFallback,am as isStartTransition,yv as isTerminalPlanMode,VE as isTerminalStatus,Mn as isTimestampLiteral,kR as isWaiverNoticeDays,wk as itemDocumentToMutationOptions,D0 as itemHasSchedule,Nn as jaccardSimilarity,eh as learnings,vC as levenshteinDistanceWithinLimit,Kc as limitAnnotationEntries,gu as linkedTestTrustFingerprint,ax as lintExtensionBlueprint,HC as lintExtensionManifestSchema,Zt as lintProjectProfile,z_ as list,ci as listAgentProvenanceAdapters,kc as listAliasPluralKeys,H_ as listAllComplete,OO as listAllDocumentCandidatesCached,rs as listAllItemMetadata,vO as listAllItemMetadataLight,zI as listAssuranceDeclarations,XI as listAssuranceVerdicts,Xy as listBuiltinCorpusShapes,Yk as listCoreClosedDomainContracts,fR as listGetProjectionFields,xP as listInvalidProvenanceHistoryStreamIds,pR as listListProjectionFields,KP as listMergeReceipts,ys as listMutationActions,nk as listMutationEvents,_o as listPmCommandFlagBudgets,il as listPmCommandsForFamily,nl as listPmCommandsForTier,Ie as listPmFlagLexicon,r1 as listPmFlagSpellingInventory,sl as listPmMcpToolsForProfile,HD as listPmRequiredArgumentRefusalContracts,VD as listPmSubcommandRefusalContracts,Wt as listProfiles,YD as listTrackerPreflightRecoveryContracts,vk as listUpsertKeyCandidates,Af as listWorkspaceSnapshots,qv as loadContextIntentRuntimeLayers,Km as loadCreateTemplateOptions,ZC as loadExtensions,iu as loadGraphAuditBaseline,Rk as loadGuardedRuntimeSchema,CC as loadMutationCheckpoint,k as loadRelationshipGraphAdapter,es as locateItem,HT as looksLikeGenericKeyValueEntry,vS as mapReadOutputRows,WP as markMergeReceiptReconciled,VA as matchesRuntimeFilters,Sv as maybeRunFirstUseTelemetryPrompt,Zy as measureCorpusShapePlan,Xi as measureItemMetadataReadWork,BT as mergeAdditiveTags,nx as mergeExtensionBlueprints,GP as mergeHistoryStreams,qP as mergeItemDocuments,zP as mergeJsonDocuments,Nc as mergeLinkedTestTwoTokenEntries,UP as mergeRelationshipEventStreams,Pm as mergeSortedWarnings,gv as migrateItemFilesToFormat,MO as mutateItem,PO as mutateItemWithHistoryContext,OA as mutateWorkspaceJsonWithHistory,W_ as next,li as normalizeAgentProvenanceAdapterValue,Vc as normalizeAnnotationTransportOptions,MI as normalizeAssuranceEvaluation,PI as normalizeAssuranceMutation,Lc as normalizeBootstrapInvocation,ME as normalizeBulkIdsValue,Jd as normalizeDependencyGraphTarget,oI as normalizeDependencySeedId,rI as normalizeDependencySourceKind,kt as normalizeDirectExtensionCommandOptions,Ps as normalizeExpectedItemHash,kn as normalizeExtensionContributionInventory,rS as normalizeHistoryOperationForWrite,kP as normalizeInvalidHistoryProvenance,vR as normalizeItemAddressInvocation,Vn as normalizeItemFormatVersion,Ki as normalizeItemId,Xn as normalizeItemMetadata,nI as normalizeItemReference,Mc as normalizeLegacyExtensionActionSyntax,pp as normalizeLinkedPath,MA as normalizeParentReferenceValue,Vt as normalizeProfileName,Vi as normalizeRawItemId,JS as normalizeReadOutputIncludeModeOptions,mA as normalizeReplayPatchOps,Ts as normalizeSimilarityText,HE as normalizeStatusForRegistry,Yn as normalizeStatusInput,UE as normalizeStatusInputWithRegistry,rv as normalizeThrownExitCode,Z_ as notes,Pn as nowIso,eu as openDurableGraphCache,mN as openMcpRequestState,bL as openPmEpisode,xp as orderingPredecessors,Np as orderingSuccessors,l0 as packContextCandidates,Am as packRankedContextItems,mg as packageActivate,ug as packageCatalog,fg as packageDeactivate,lg as packageDescribe,cg as packageDoctor,sg as packageInstall,ng as packageLifecycle,ig as packageList,dg as packageManage,Xb as packageMigrate,pg as packageReload,ag as packageUninstall,_w as paginateQueryRows,ip as parseAddEntries,sp as parseAddGlobEntries,Yc as parseAnnotationTextInput,Tk as parseAtomicMutationControls,Ic as parseBootstrapCommandName,Oc as parseBootstrapGlobalOptions,Rc as parseBootstrapHelpRequest,Dc as parseBootstrapTypeValue,PE as parseBulkIdsText,Cm as parseContextDepth,gm as parseContextFocusFields,Uv as parseContextIntentDeclarations,Em as parseContextSections,f0 as parseContextSignalSnapshot,zT as parseCsvKv,qR as parseDefectChangeRiskRequest,gM as parseDefectRecurrenceCoverageRequest,BR as parseDefectRecurrencePolicy,lf as parseEvalMetricFloors,_f as parseEvalQuerySet,Ms as parseExpectHashSpecs,pC as parseExtensionLongFlagToken,cu as parseGraphSubcommand,PM as parseHistoryAttestation,HM as parseHistoryProvenanceFilters,zR as parseIntegerLimit,KE as parseItemDocument,Ck as parseItemMutationBatch,qA as parseLimit,Vu as parseLinkedTestAssertionEqualsMap,Ku as parseLinkedTestAssertionGteMap,Uu as parseLinkedTestBoolean,ju as parseLinkedTestContextMode,Gu as parseLinkedTestEnvClear,Fu as parseLinkedTestEnvSet,Wu as parseLinkedTestJsonEntries,Hu as parseLinkedTestMinLines,zu as parseLinkedTestRegexList,qu as parseLinkedTestStringList,Bu as parseLinkedTestWorkspaceContextMode,Pg as parseMcpCachePolicy,Cg as parseMcpImplementation,Ze as parseMcpInputRequests,dr as parseMcpInputResponses,ey as parseMcpSubscriptionFilter,cp as parseMigrateEntries,KR as parseMultiValueFilter,TI as parseMutationReceipt,eC as parseOptionalNonNegativeInteger,ZT as parseOptionalNumber,hD as parsePmAgentTaskTranscriptCorpus,L$ as parsePmToolDiscoveryOptions,HR as parsePriority,XR as parsePriorityFilterSet,$S as parseReadOutputSession,AE as parseRegisteredItemFieldAssignments,se as parseRelationshipGraphSnapshot,ap as parseRemoveEntries,Op as parseSourceLineRange,GA as parseStatusFilterCsv,WR as parseStringFilterSet,sn as parseTags,Hf as parseTestRunMeasurements,VR as parseType,YR as parseTypeFilterSet,zl as parseUnknownAuthorHistoryEventCoordinates,MT as parseWorkflowPolicy,kT as parseWorkflowPolicyDocument,P0 as partitionDecisionEntries,gA as patchPathToChangedField,an as pathExists,Qh as pauseTask,tu as persistDurableGraphResult,JA as persistSelectedItemFormat,TP as planAgentIdentityVocabularyMutation,T0 as planCompletedAtBackfill,Ml as planExtensionDirectoryCopy,ex as planItemMutationDocument,er as planProfileApplication,TD as planRelationshipEventBackfill,au as planRelationshipRemediation,Sl as planSchemaEvolutionMigration,Bl as planUnknownAuthorHistoryAcknowledgment,Of as planWorkspaceSnapshotRestore,ER as positionalShapeKey,SR as positionalSignatureKey,px as preflightExtension,Es as prepareSimilarityText,WT as preserveMutationStdinTokenFields,KT as preserveMutationStdinTokenLiterals,Zk as previewItemMutationDocument,Ik as previewItemMutations,Yw as printError,Ww as printResult,vh as profile,Ph as profileApply,Mh as profileLint,Rh as profileList,Ih as profileShow,_E as projectAfterCommandItemSnapshot,ym as projectContextFocusRows,qf as projectFleetAttributionAnalytics,VM as projectHistoryProvenance,qi as projectLeanRecoveryPayload,op as projectLinkedCollectionMutation,Bw as projectPmBriefListEnvelope,qw as projectPmBriefSearchEnvelope,cs as projectPmCliErrorContextDetails,ss as projectPmCliErrorDetails,Di as projectPmDiagnosticOutput,$i as projectPmDiagnosticText,jf as projectProvenanceCoverageAnalytics,Cu as projectValidateCounts,PP as promoteAssuranceAssertion,Tw as propagateContextUsageServingReceipt,GL as pruneCompileCacheGenerations,VI as putAssuranceDeclaration,KI as putAssuranceDeclarationBundle,bO as queryItemMetadataIndex,TO as queryLinkedFileMetadataIndex,CO as querySimilarItemMetadataIndex,Vf as queryTestRunMeasurementsBelow,wn as quoteCommandArg,Sn as quoteWindowsCommandArg,Kk as rankCommandPaths,Wc as readAnnotationEntries,_i as readAuthorEnvironment,l_ as readBooleanOption,vw as readContextUsageAffinity,p_ as readCsvListOption,Gs as readExtensionMigrationState,cn as readFileIfExists,qc as readFirstStringFromCommanderOptions,zc as readFirstValueFromCommanderOptions,Ff as readHistoryAnalyticsWindow,cS as readHistoryEntries,bi as readHistorySnapshot,Mf as readImprovementLedger,wO as readItemMetadataDerivedIndexState,ks as readItemRevision,Nk as readItemTransaction,ts as readLocatedItem,AS as readOutputBudgetCollections,iw as readOutputCollectionFingerprint,wS as readOutputContinuationRowCollections,ES as readOutputContinuationRowPaths,YS as readOutputIncludeModeOptions,xS as readOutputRetainsTail,SS as readOutputRowCollections,CS as readOutputRowPaths,US as readOutputSessionRemainingTokens,Gt as readPmPackageManifest,s_ as readRequiredString,BE as readRuntimeFieldOptionValue,Yi as readSettings,Cv as readSettingsSection,ZA as readSettingsWithMetadata,Hc as readStringArrayFromCommanderOptions,d_ as readStringOption,tv as readThrownExitCode,VO as readVectorizationStatusLedger,dO as readWorkflowPolicies,xT as readWorkflowPolicyField,jv as readWorkspaceContextIntentContracts,y0 as readWorkspaceContextSignals,S0 as readWorkspaceMemory,ck as readWorkspacePosition,nR as readWorkspaceTransaction,hA as reanchorHistoryEntries,X1 as reconcileArtifactLedgers,$n as reconcileExtensionCapabilityUsage,RA as reconcileWorkspaceJsonHistory,fE as recordAfterCommandAffectedItem,YI as recordAssuranceVerdict,Qu as recordClaimSemanticAttribution,ww as recordContextUsageDelivery,Sw as recordContextUsageServing,Aw as recordContextUsageTouch,Ow as recordContextUsageTouches,em as recordFocusSemanticAttribution,Pf as recordImprovementObservation,Zu as recordReleaseSemanticAttribution,Rn as redactUrlCredentialsInText,vn as redactUrlCredentialsInToken,AO as refreshItemMetadataDerivedIndex,bl as refreshMergeAttributeFenceIfInstalled,PS as refreshReadOutputDeliveredCounts,WO as refreshSearchArtifactsForMutation,di as registerAgentProvenanceAdapters,eI as registerExternalDependencyResolver,ai as registerHarnessSignalDescriptors,dS as registerOutputMaterialFieldGroups,Vh as release,IS as rememberReadOutputFocusRows,WI as removeAssuranceDeclaration,dn as removeFileIfExists,bp as renameArtifactsResultKey,mm as renderCalendarMarkdown,fm as renderCalendarToon,Mm as renderContextMarkdown,Il as renderExtensionDescribeMarkdown,vl as renderExtensionSurfaceMarkdown,N_ as renderGuideMarkdown,zk as renderMissingOptionRetry,M0 as renderNextMarkdown,Xk as renderPmClosedDomainHelp,An as renderPmCommand,Fo as renderPmCommandAliasMigrationHint,dl as renderPmCommandVisibilityMarkdown,n1 as renderPmFlagLexiconMarkdown,eL as renderPmMcpAppHtml,xD as renderPmRefusalClosureCensusMarkdown,jA as renderRowsAsCsv,BA as renderRowsAsTable,Bh as reopen,aO as replayHistoryToTarget,pA as replayToCanonicalItemDocument,lA as replayToItemDocument,tS as requireHistoryOperation,DM as requireTerminalReason,$M as requireTerminalReasonWithRecovery,iA as resealHistoryRewrite,lE as resetActiveExtensionRuntimeState,Ql as resetWorkspaceGraphCache,ti as resolveAgentSessionContextFromSignals,ed as resolveAnnotationIndex,Jc as resolveAnnotationInput,aS as resolveAuthor,yi as resolveAuthorIdentity,PA as resolveBodyFileContent,Jy as resolveBuiltinCorpusShape,um as resolveCalendarOutputFormat,fI as resolveCanonicalPmErrorCodeContract,kC as resolveCanonicalRelationshipKind,sS as resolveClaimPrincipal,kE as resolveCliBulkIdsInput,sC as resolveCommandOptionPolicyState,FL as resolveCompileCacheGeneration,b0 as resolveCompletionTimestamp,jC as resolveConfiguredPmPackageRoot,sI as resolveContentFieldFilters,xw as resolveContextIntentContract,bm as resolveContextOutputFormat,Tm as resolveContextTokenBudget,GM as resolveCreateExplicitEmptyFlag,vs as resolveDeclaredBlockers,j0 as resolveEffectiveSearchMode,kO as resolveEmbeddingProviders,Mt as resolveExtensionFlagOptionKey,wC as resolveExtensionFlagValueContract,kl as resolveExtensionInstallSourceIdentity,uC as resolveExtensionLongFlagName,Fs as resolveExtensionMigrationStatePath,JC as resolveExtensionRoots,tI as resolveExternalDependencyReference,SC as resolveFlagValueKind,dC as resolveGlobalPmRoot,k_ as resolveGuideOutputFormat,kf as resolveHistoryEpisodeGroupIdentity,DE as resolveHistoryHashAlgorithm,eS as resolveHistoryOperation,zM as resolveHistoryProvenanceDimensions,vv as resolveHistorySubject,iO as resolveHistoryTarget,q0 as resolveHybridSemanticWeight,yn as resolveImplicitPmRoot,yC as resolveIsoOrRelative,Lv as resolveItemBlockers,Pv as resolveItemExecutionRole,Sk as resolveItemMutationDocument,lm as resolveItemOwnershipConflict,gn as resolveItemTypeRegistry,GE as resolveItemTypesFilePath,Dk as resolveLifecycleVerbRecovery,lC as resolveLinkedResourcePositionalRecovery,r_ as resolveLinkedTestFailureExitCode,mu as resolveLinkedTestSourceRef,fu as resolveLinkedTestSourceWorkspaceRoot,yu as resolveLinkedTestTrust,bu as resolveLinkedTestTrustBatch,ty as resolveMcpAcknowledgedSubscriptionFilter,Ye as resolveMcpRequestContext,fl as resolveMergeInstallContext,Hk as resolveMisnestedCommandPath,iI as resolveMissingMetadataFilters,qk as resolveMissingOptionPlaceholder,_S as resolveModePairedOutputOmissionReceipt,R0 as resolveNextOutputFormat,yS as resolveOutputOmissionReceipt,UC as resolvePmCliVersion,$o as resolvePmCommandAlias,ze as resolvePmCommandCapabilityFamily,Lt as resolvePmCommandExitContract,N as resolvePmCommandOperation,xi as resolvePmCommandOutputBudget,Nt as resolvePmCommandOutputEnvelope,gR as resolvePmCommandPositionalContract,In as resolvePmCommandScopeArgs,He as resolvePmCommandVisibilityTier,Li as resolvePmDiagnosticOutputBudget,_I as resolvePmErrorCodeContract,zb as resolvePmFlagSemanticConcept,xe as resolvePmHistoryOperation,aN as resolvePmMcpExecutableInvocation,GC as resolvePmPackageRootFromModule,yR as resolvePmPositionalActionContract,wc as resolvePmPositionalActionFlagContracts,$e as resolvePmRoot,Id as resolvePmToolCustomFieldCollision,LA as resolvePriority,Kt as resolveProfile,gl as resolveProjectMergeTypeFolders,fw as resolveQueryCursorStart,$k as resolveReadCompletenessControls,Gk as resolveReadOptionRetryArgs,QS as resolveReadOutputDimensions,ow as resolveReadOutputEncoding,MS as resolveReadOutputRecoveryBudget,HS as resolveReadOutputSurface,gS as resolveReadRowContract,Bk as resolveRecoveryCommandName,RE as resolveRegisteredSearchProvider,IE as resolveRegisteredVectorStoreAdapter,jd as resolveReproducibleProcessEnvironment,Bn as resolveRuntimeFieldRegistry,jn as resolveRuntimeStatusRegistry,xO as resolveSearchCorpusFields,U0 as resolveSearchMaxResults,V0 as resolveSearchPage,B0 as resolveSearchScoreThreshold,z0 as resolveSearchTuning,LO as resolveSemanticCorpusCharacterLimit,Ju as resolveSemanticLineageIds,tO as resolveSettingsWithSemanticRuntimeDefaults,eP as resolveSourceContextWritePolicy,nm as resolveStartTaskInProgressStatus,Z as resolveSubcommandFlagContractsForCommand,OT as resolveTelemetryErrorCategory,YO as resolveTelemetrySourceAttribution,LM as resolveTerminalReason,Ok as resolveTransactionSchema,iC as resolveTypeDefinition,nC as resolveTypeName,UA as resolveTypeSynonym,KA as resolveTypeWorkflows,ql as resolveUnknownAuthorAcknowledgmentSelector,J0 as resolveVectorIndexRecovery,$O as resolveVectorStores,Hd as resolveWorkspaceRelationshipKindRegistry,cC as resolveWorkspaceRoot,Yh as restore,EC as restoreCheckpointItems,IA as restoreWorkspaceJsonFromHistory,Rf as restoreWorkspaceSnapshot,vf as restoreWorkspaceSnapshotWithRecovery,tp as reviseLinkedNote,yg as runAction,yE as runActiveBeforeMutationHooks,TE as runActiveCommandHandler,bE as runActiveOnIndexHooks,Un as runActiveOnReadHooks,Gn as runActiveOnWriteHooks,CE as runActiveParserOverride,EE as runActivePreflightOverride,SE as runActiveServiceOverride,hm as runActivity,XC as runAfterCommandHooks,sf as runAggregate,Zc as runAnnotationCommand,Ou as runAppend,CM as runAssuranceAction,EM as runAssuranceDispatch,YC as runBeforeCommandHooks,_m as runCalendar,Dm as runClaim,$m as runClaimNext,Ru as runClose,Iu as runCloseMany,jm as runCloseTask,td as runComments,L_ as runCompletion,Kl as runConfig,qt as runContext,c0 as runContextEvaluationCorpus,s0 as runContextEvaluationScenario,Pu as runCopy,Yu as runCreate,Xu as runDelete,Zl as runDeps,Tp as runDocs,wP as runDuplicates,gf as runEval,bf as runEvent,xl as runExtension,Bs as runExtensionMigrateAction,js as runExtensionMigrations,Rp as runFiles,Pp as runFilesDiscover,Ip as runFilesLookup,Bf as runFleetAttributionAnalytics,om as runFocus,wu as runGc,af as runGet,du as runGraph,x_ as runGuide,lu as runHealth,G0 as runHistory,xM as runHistoryAttest,wM as runHistoryCompact,vM as runHistoryCompactBulk,nM as runHistoryMaintenance,RM as runHistoryRedact,sM as runHistoryRepair,cM as runHistoryRepairAll,Gl as runInit,Dl as runInitAgentGuidance,rd as runLearnings,yp as runLinkedArtifacts,o_ as runLinkedTests,rl as runList,yf as runMeet,tk as runMergeDriver,Tl as runMergeInstall,XP as runMergeReceiptEvidenceReport,YP as runMergeReceiptReport,rk as runMergeReconcile,Nm as runNext,od as runNotes,Um as runPauseTask,qm as runPlan,ef as runProfileApply,Zm as runProfileLint,Jm as runProfileList,Qm as runProfileShow,Uf as runProvenanceCoverageAnalytics,hx as runRegisteredCommandForTest,Cx as runRegisteredCommandOverrideForTest,Rx as runRegisteredExporterForTest,yx as runRegisteredHookForTest,vx as runRegisteredImporterForTest,Ox as runRegisteredMigrationForTest,gx as runRegisteredMutationGuardForTest,bx as runRegisteredParserOverrideForTest,Tx as runRegisteredPreflightOverrideForTest,Ex as runRegisteredRendererOverrideForTest,wx as runRegisteredSearchProviderForTest,Sx as runRegisteredServiceOverrideForTest,Ax as runRegisteredVectorStoreAdapterForTest,tr as runReindex,Fm as runRelease,Tf as runRemind,jM as runReopen,zm as runRestore,wl as runSchemaEvolutionMigration,cf as runSearch,eb as runSearchRefreshWorkerEntrypoint,D_ as runStartBackgroundRun,Gm as runStartTask,Wf as runStats,Xf as runTelemetry,Ym as runTemplatesList,Wm as runTemplatesSave,Xm as runTemplatesShow,n_ as runTest,i_ as runTestAll,$_ as runTestRunsList,G_ as runTestRunsLogs,j_ as runTestRunsResume,F_ as runTestRunsStatus,U_ as runTestRunsStop,B_ as runTestRunsWorker,dm as runUpdate,Hm as runUpdateMany,jt as runUpgrade,Su as runValidate,gg as runWithActiveExtensions,L as runWithAgentSessionContext,XA as runWithConfigurationOnlySettings,Mw as runWithContextIntentContracts,zv as runWithDiscoveredContextIntentContracts,pi as runWithHarnessDetectionSignals,HN as runWithMcpTraceContext,qd as runWithReproducibleProcessEnvironment,ui as runWithWorkspaceHarnessSignalDescriptors,Hr as runWithWorkspaceRecipe,lP as runWorkflowPolicyAction,SM as runWorkspaceTransactionGc,su as saveGraphAuditBaseline,uM as scanClosureTimestamps,MP as scanExtensionHostVersions,jl as scanHistoryAuthorAttribution,Wn as scanItemFormatVersions,_s as scanMutationSecrets,NP as scanProvenanceResolverHealth,Os as scanStaleInProgressItems,_M as scanStorageIntegrity,lh as schema,gh as schemaAddField,_h as schemaAddStatus,mh as schemaAddType,Ch as schemaApplyPreset,Eh as schemaInferTypes,ph as schemaList,bh as schemaListFields,Ah as schemaRemapStatus,yh as schemaRemoveField,hh as schemaRemoveStatus,fh as schemaRemoveType,wh as schemaRenameField,Sh as schemaRenameType,uh as schemaShow,Th as schemaShowField,Oh as schemaShowStatus,Vk as scoreCommandPathMatch,r0 as scoreContextCandidates,o0 as scoreContextCandidatesWithActiveExtensions,Ss as scoreItemSimilarity,KD as scorePmGrammarRefusalClosure,DD as scorePmRefusalClosure,ws as scorePreparedItemSimilarity,XD as scoreTrackerPreflightRecoveryClosure,oA as sealHistoryRecord,uN as sealMcpRequestState,V_ as search,O0 as searchWorkspaceMemory,v0 as searchWorkspaceMemoryReadResult,$v as selectActionableEntries,cw as selectCursorSemanticOptions,R_ as selectImportAuthor,UN as selectMcpClientRegistrationMode,A0 as selectWorkspaceMemory,w0 as selectWorkspaceMemoryRollups,rm as semanticAttributionAffinity,lv as sentryCaptureCliError,cv as sentryDiscardCommandSpan,dv as sentryFinishCommandSpan,uv as sentryFlush,pv as sentryLogCliUsageError,sv as sentrySetCommandContext,av as sentryStartCommandSpan,Qn as serializeItemDocument,Jk as serializeNdjsonRows,Qk as serializeNdjsonStream,qy as serveDeclaredObservation,pE as setActiveCommandContext,uE as setActiveCommandResult,nE as setActiveExtensionCommands,oE as setActiveExtensionHooks,iE as setActiveExtensionParsers,sE as setActiveExtensionPreflight,dE as setActiveExtensionRegistrations,cE as setActiveExtensionRenderers,aE as setActiveExtensionServices,nS as setFocusedItem,Tv as settingsSectionRevision,bv as shouldCompletePlanOnClose,nu as shouldPersistDurableGraphCache,JT as shouldResolveMutationStdinTokenField,XT as shouldResolveMutationStdinTokens,oO as shouldRunSearchRefreshInForeground,Cp as similarityAdvisoryWarnings,TS as sliceReadOutputRowCollection,as as snapshotPmCliErrorContext,_p as sortLinkedArtifacts,NR as sortWaiverNotices,UT as splitAcceptanceCriteria,hv as splitCommaList,Jn as splitFrontMatter,ZS as stabilizeReadOutputReceiptEstimates,R as stableStringify,Ek as stableUpsertValue,vT as stableValueEquals,_O as stampRequiredItemFormat,Jh as startTask,wv as startTelemetryCommand,X_ as stats,jE as statusIsTerminal,vc as stripGlobalBootstrapTokens,ik as subscribeMutationEventBatches,sk as subscribeMutationEvents,bP as summarizeAgentIdentityVocabulary,Nf as summarizeAgentModelProvenance,Lf as summarizeAgentProvenance,a0 as summarizeContextEvaluationReports,Zf as summarizeContextPreflight,YM as summarizeHistoryProvenance,$l as summarizeInitResult,HP as summarizeMergeReceipt,UM as supportsCreateExplicitEmpty,OR as supportsItemIdAlias,$C as suppressHostOutput,Oe as syncRelationshipGraphAdapter,cx as synthesizeExtensionManifest,Ac as toCompletionFlagString,Im as toContextFocusItem,Om as toContextPackingSummary,vm as toContextRankingSummary,fC as toErrorMessage,m_ as toEstimatedMinutesValue,hk as toExtensionFlagDefinitions,y_ as toImportBoolean,E_ as toImportConfidence,g_ as toImportInteger,O_ as toImportLinkedDocs,A_ as toImportLinkedFiles,v_ as toImportLinkedTests,w_ as toImportLogEntries,S_ as toImportNormalizedEnum,C_ as toImportNumberMap,f_ as toImportPriority,h_ as toImportStatus,b_ as toImportStringList,T_ as toImportStringMap,__ as toImportTags,WE as toItemRecord,u_ as toNonEmptyImportString,mC as toNonEmptyStringOrUndefined,uA as toReplayDocument,zw as toWellFormedText,Cs as tokenizeSimilarityText,YT as transferMutationStdinTokenPolicy,KC as translateHostEnvironmentFault,jh as update,Jf as updateLinkedTest,_g as upgrade,kh as validate,$I as validateAssertionDefinition,GI as validateAssuranceDocument,FI as validateGateDefinition,Ak as validateItemMutationRows,gp as validateLinkedPaths,jN as validateMcpAuthorizationResponseIssuer,GN as validateMcpAuthorizationServerMetadata,BN as validateMcpClientMetadataDocument,MN as validateMcpHttpRequestHeaders,hN as validateMcpJsonSchema,DI as validateMeasurementDefinition,xA as validateMissingParentReference,WS as validateReadOutputOptions,FA as validateSprintOrReleaseValue,aC as validateTypeOptions,rR as validateWorkspaceTransactionIdentity,kM as verifyAttestation,IR as verifyCliFlagInvocationParity,CR as verifyExplicitPositionalSlotCensus,_A as verifyHistoryChain,fA as verifyHistoryChainWithVersion,Hv as verifyHistoryEntries,nA as verifyHistoryRecordHash,sA as verifyHistoryRewriteEvidence,AR as verifyPmCliGrammar,wR as verifyPmCommandPositionalContracts,o1 as verifyPmFlagLexicon,vD as verifyPmRecoveryKindRuntimeCoverage,Nb as verifyPmRecoveryProducerRuntimeCoverage,OD as verifyPmRecoveryReferences,MD as verifyPmRefusalClosureIdentityRatchet,PD as verifyPmRefusalClosureRatchet,AD as verifyPmRefusalReachability,ld as verifyToolOptionCliParity,xR as waiverNoticeFor,DA as withCliMutationInput,Ls as withExpectedItemRevisions,zs as withFlagAliasMetadata,WC as withHostEnvironmentBoundary,$A as withLiteralMutationInput,_N as withMcpCachePolicy,ji as withoutGenericRefusalExamples,LT as workflowApprovalFingerprint,DT as workflowPolicyApplies,NT as workflowPolicyFingerprint,Jl as workspaceGraphCache,iR as workspaceTransactionPlanDigest,Qc as wrapOwnershipConflict,nv as wrapThrownErrorForSentry,hi as writeAuthorEnvironment,De as writeFileAtomic,TC as writeMutationCheckpoint,eO as writeSettings,Ev as writeSettingsSection,Kw as writeStderr,Vw as writeStdout,KO as writeVectorizationStatusLedger,vA as writeWorkspaceJsonWithHistory,rp as writtenLinkedEntries};
|
|
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 Gr(P.join(t.packageRoot,".agents","skills"),"package",t.packageVersion);if(t.workspaceRoot){let o=P.resolve(t.packageRoot,".agents","skills"),n=P.resolve(t.workspaceRoot,".agents","skills");if(n!==o){let s=await Gr(n,"workspace",t.packageVersion);for(let[i,a]of s)r.set(i,a)}}return new e(r)}list(t={}){let r=t.limit??R.defaultPageSize;$r.has(r)||C(`Skill list limit must be an integer from 1 to ${R.maxPageSize}.`);let o=this.#r(t.cursor,"skills/list"),n=[...this.#e.values()].sort((c,d)=>c.uri.localeCompare(d.uri)),s=n.slice(o,o+r),i=o+s.length,a=i<n.length;return{skills:s.map(Ur),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"}),Ur(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(d=>d.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"},c=Fr(n,s);return c!=="application/octet-stream"?{contents:[{uri:t,mimeType:c,text:s.toString("utf8"),_meta:a}]}:{contents:[{uri:t,mimeType:c,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]}`,c=new Map;for(let T of n.resources){let E=T.uri.slice(`${a}/`.length);if(!E.startsWith(i))continue;let B=E.slice(i.length),[v,...vo]=B.split("/"),Io=`${a}/${i}${v}`,Ro=n.files.get(`${i}${v}`);c.set(v,{uri:Io,name:v,mimeType:vo.length>0?"inode/directory":Fr(v,Ro)})}s.length>0&&c.size===0&&C(`Unknown pm MCP skill directory: ${t}.`,{field:"uri"});let d=r.limit??R.maxPageSize;$r.has(d)||C(`Skill directory limit must be an integer from 1 to ${R.maxPageSize}.`);let l=this.#r(r.cursor,t),p=[...c.values()].sort((T,E)=>T.uri.localeCompare(E.uri)),f=p.slice(l,l+d),_=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]="619dbd55-b854-5e69-b5a5-c0bcada81629")}catch{}})();var zr="https://schema.unbrained.dev/pm/workspace-recipe/v1";function st(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)=>st(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,st(o,`${t}.${r}`)])))}function we(e){if(e.schema!==zr)throw new Error(`Unsupported workspace recipe schema: ${e.schema}`);let t=Tt(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:st(r.input,`operations[${o}].input`)})))})}async function Hr(e,t){let r=we(e);return Ct(r,t)}async function Ky(e,t){return Hr(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 Vr="pm.agent-observation/v1",Kr="pm.agent-verdict/v1",Wr="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 M(e,t){if(e.trim().length===0)throw new Error(`${t} must not be empty.`)}function oe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))oe(t)}return e}function Wy(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(M(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 Yy(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(M(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($(s,"observation.tiers.fields"),n.has(s))throw new Error(`Duplicate observation tier field: ${s}.`);n.add(s)}}}function Jy(e){if(e.schema!==Vr)throw new Error(`observation.schema must be ${Vr}.`);return M(e.id,"observation.id"),O(e.version,"observation.version"),Wy(e.reads),Yy(e.calibration),e.corpus_dependence.kind==="bounded"&&(M(e.corpus_dependence.dimension,"observation.corpus_dependence.dimension"),O(e.corpus_dependence.maximum,"observation.corpus_dependence.maximum")),Xy(e.tiers),oe(structuredClone(e))}function GL(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 Qy(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"),c=Math.ceil(a/4);if(c<=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:c,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 $(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 Yr(e,t){let r=e;for(let o of $(t,"recorded field path")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function Zy(e){return`/${$(e,"verdict predicate path").map(t=>t.replaceAll("~","~0").replaceAll("/","~1")).join("/")}`}function eb(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 tb(e){if(e.schema!==Kr)throw new Error(`verdict.schema must be ${Kr}.`);M(e.id,"verdict.id"),O(e.version,"verdict.version");let t=new Set;for(let o of e.predicates){M(o.id,"verdict.predicates.id"),$(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}.`);eb(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 oe(structuredClone(e))}function rb(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),c=Yr(t.state,a.path),d=a.kind==="field_present"?c!==void 0:a.kind==="field_absent"?c===void 0:I(c)===I(a.expected);return{id:i,outcome:d?"satisfied":"violated",evidence_pointer:`${t.snapshot_id}#${Zy(a.path)}`,evidence_digest:ht(I(c))}}),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 UL(e){if(e.schema!==Wr)throw new Error(`episode.schema must be ${Wr}.`);if(M(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)M(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)$(t,"episode.observable_fields");for(let t of e.withheld_fields)$(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 Jy(e.observation),tb(e.verdict),we(e.recipe),oe(structuredClone(e))}function ob(e,t,r){let o=$(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 nb(e,t){let r={};for(let o of t)ob(r,o,Yr(e,o));return r}async function jL(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"}},c=await L(a,()=>t.reset(e.recipe));r.push({sequence:1,kind:"reset",state_id:c.state_id});let d=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 Qy(e.observation,async _=>nb(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(),_=rb(e.verdict,f);return r.push({sequence:r.length+1,kind:"verdict",state_id:f.snapshot_id}),_};return{observe:()=>L(a,d),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 L(a,()=>t.execute(p));return r.push({sequence:r.length+1,kind:"action",state_id:f.state_id}),f},score:()=>L(a,l),close:()=>i!==void 0?i:s?Promise.reject(new Error("episode is already closed.")):(s=!0,i=L(a,()=>l(!0)).then(p=>(r.push({sequence:r.length+1,kind:"close",state_id:p.snapshot_id}),{verdict:p,trajectory:oe(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]="1202ba19-0bcb-5478-b245-4472e361d4de")}catch{}})();var F="https://schema.unbrained.dev/pm/corpus-shape/v1";function V(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError(`Corpus shape ${t} must be a positive safe integer`);return e}function ne(e,t){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Corpus shape ${t} must be a non-negative safe integer`);return e}function Jr(e){if(!(typeof e!="object"||e===null||Object.isFrozen(e))){for(let t of Object.values(e))Jr(t);Object.freeze(e)}}function K(e){if(e.schema!==F)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(V(e.hierarchy_depth,"hierarchy_depth"),V(e.hierarchy_fanout,"hierarchy_fanout"),ne(e.age_span_days,"age_span_days"),V(e.history_entries_per_item,"history_entries_per_item"),ne(e.comments_per_100_items,"comments_per_100_items"),ne(e.notes_per_100_items,"notes_per_100_items"),ne(e.learnings_per_100_items,"learnings_per_100_items"),V(e.author_cardinality,"author_cardinality"),V(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 Jr(t),t}var Ae=[{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}],W=Object.freeze({scratch:K({schema:F,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:K({schema:F,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:Ae,author_cardinality:32,component_count:1,include_cycles:!1,custom_types:["Experiment"],custom_statuses:["review"],terminal_statuses:[],custom_fields:["domain"]}),"deep-graph":K({schema:F,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:Ae,author_cardinality:16,component_count:1,include_cycles:!0,custom_types:[],custom_statuses:[],terminal_statuses:[],custom_fields:[]}),"multi-decade":K({schema:F,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:Ae,author_cardinality:64,component_count:1,include_cycles:!1,custom_types:["Program"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["portfolio"]}),"disconnected-archive":K({schema:F,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:Ae,author_cardinality:24,component_count:5,include_cycles:!1,custom_types:["Archive"],custom_statuses:["archived"],terminal_statuses:["archived"],custom_fields:["archive_source"]})});function ib(){return Object.keys(W).sort().map(e=>W[e])}function sb(e){let t=e.trim().toLowerCase();if(!Object.hasOwn(W,t))throw new TypeError(`Unknown corpus shape "${e}". Available: ${Object.keys(W).join(", ")}`);return W[t]}var Xr=new WeakMap;function Qr(e,t){if(e===0)return[];let r=Xr.get(t);r===void 0&&(r=t.edge_kind_mix.flatMap(n=>Array.from({length:n.weight},()=>n.kind)),Xr.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 ab(e,t,r,o=42){if(ne(t,"item index"),V(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,c=1;for(let E=0;E<e.hierarchy_depth;E+=1)a=Math.min(Number.MAX_SAFE_INTEGER,a+c),c=Math.min(Number.MAX_SAFE_INTEGER,c*e.hierarchy_fanout);let d=i%a,l=i-d,p=d===0?void 0:s+(l+Math.floor((d-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:Qr(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 at=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,Qr(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 c=Math.floor(this.itemCount/100),d=this.itemCount%100,l=c*a+Math.max(0,a+d-100),p=c*a+Math.min(a,d),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,c=this.expectedEdgeKinds[i]??0;a!==c&&o.push(`edge_kind:${i}:${a}!=${c}`)}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 at(e)}function cb(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 db(){let e=$e(process.cwd(),process.env.PM_PATH);await At(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 lb(){await vt()}(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 eo=["lines","branches","functions","statements"];function pb(e,t){if(typeof t!="object"||t===null||Array.isArray(t))throw new TypeError(`Coverage entry for ${e} must be an object.`)}function ub(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 mb(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)){pb(r,o);for(let n of eo){let s=ub(r,n,o[n]),i=s.total-s.covered;i>0&&t.push({file:r,metric:n,uncovered:i,...s})}}return t}import Y from"node:fs";import ct 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 to=300*1e3,fb=3;function sD(e){return(e?.trim()||"development").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/^\./,"_")}function aD(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.");Y.mkdirSync(e,{recursive:!0});let o=ct.join(e,r);Y.mkdirSync(o,{recursive:!0});let n=new Date;Y.utimesSync(o,n,n);let s=Y.readdirSync(e).filter(d=>d!==r).flatMap(d=>{try{return[{name:d,mtimeMs:Y.statSync(ct.join(e,d)).mtimeMs}]}catch(l){if(l instanceof Error&&"code"in l&&me(l))return[];throw l}}).sort((d,l)=>l.mtimeMs-d.mtimeMs||d.name.localeCompare(l.name)),i=s.filter(d=>n.getTime()-d.mtimeMs<to),a=Math.max(0,fb-1-i.length),c=s.filter(d=>n.getTime()-d.mtimeMs>=to).slice(a).map(d=>d.name).sort((d,l)=>d.localeCompare(l));for(let d of c)Y.rmSync(ct.join(e,d),{recursive:!0,force:!0,maxRetries:3,retryDelay:50});return{retained:r,removed:c}}import{createHash as _b}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 dt=1;function X(e){e?.throwIfAborted()}function G(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship graph ${t} must be non-empty`);return e.trim()}function J(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:dt,fingerprint:_b("sha256").update(I({nodes:n,edges:s,kinds:i})).digest("hex"),created_at:new Date(o).toISOString(),nodes:n,edges:s,kinds:i})}function hb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function se(e){if(!hb(e))throw new TypeError("Relationship graph snapshot must be an object");if(e.version!==dt)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 Fe([]);for(let n of e.kinds)t.register(n);let r=new q(e.nodes,e.edges,t),o=J(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 k(e,t){G(e.name,"adapter name");let r=G(t.workspace,"workspace");X(t.signal);let o=await e.read({...t,workspace:r});return X(t.signal),o===null?null:se(o)}async function Oe(e,t){let r=G(t.workspace,"workspace"),o=se(t.snapshot).snapshot,n=await k(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(X(t.signal),await e.replace({workspace:r,signal:t.signal,snapshot:o,expected_fingerprint:n?.snapshot.fingerprint??null}),(await k(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 gb(e,t={}){let r=e.map(se),o=new Map;for(let i of r)for(let a of i.snapshot.kinds){let c=o.get(a.kind);if(c&&I(c)!==I(a))throw new TypeError(`Conflicting federated relationship kind: ${a.kind}`);o.set(a.kind,a)}let n=new Fe([...o.values()].sort((i,a)=>i.kind.localeCompare(a.kind))),s=new q(new Set(r.flatMap(i=>[...i.snapshot.nodes])),r.flatMap(i=>[...i.snapshot.edges]),n);return J(s,n,t)}var ie=class{name;#e=new Map;constructor(t="memory"){this.name=G(t,"adapter name")}async read(t){X(t.signal);let r=this.#e.get(G(t.workspace,"workspace"));return r?structuredClone(r):null}async replace(t){X(t.signal);let r=G(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(se(t.snapshot).snapshot))}async clear(t){X(t.signal);let r=G(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 ro(e,t){if(!Number.isInteger(e)||e<1)throw new TypeError(`Relationship graph ${t} must be a positive integer`);return e}function yb(e){let t=ro(e.nodeCount,"nodeCount"),r=ro(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 U(e,t){if(!e)throw new Error(`Relationship graph adapter conformance: ${t}`)}async function oo(e,t={}){let r=t.workspace?.trim()||"pm-graph-conformance",o=St(),n=J(new q(["a","b"],[{source:"a",target:"b",kind:"related"}],o),o,{createdAt:"2026-01-01T00:00:00.000Z"}),s=J(new q(["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=[];U(await k(e,{workspace:r})===null,"workspace must start empty"),i.push({name:"empty-read",passed:!0});let a=await Oe(e,{workspace:r,snapshot:n});U(a.disposition==="written","first sync must write"),i.push({name:"atomic-replace",passed:!0}),(await e.read({workspace:r})).nodes.push("mutated-reader-copy"),U((await k(e,{workspace:r}))?.snapshot.nodes.length===2,"reads must not mutate stored state"),i.push({name:"read-isolation",passed:!0}),U((await Oe(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}),U((await k(e,{workspace:r}))?.snapshot.fingerprint===s.fingerprint,"replacement must become visible"),i.push({name:"replacement-visibility",passed:!0});let c=!1;try{await e.replace({workspace:r,snapshot:n,expected_fingerprint:n.fingerprint})}catch{c=!0}return U(c,"stale compare-and-swap must fail"),i.push({name:"stale-cas",passed:!0}),e.clear&&(await e.clear({workspace:r,expected_fingerprint:s.fingerprint}),U(await k(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 bb(e){return oo(new ie,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 lt=2,Tb=["self_reported","independent_transport"];function ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`${t} must be a non-empty string`);return e.trim()}function no(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=ae(o,`${t}[${String(n)}]`);return r?o:s})}function pt(e,t){return e===void 0?void 0:ae(e,t)}function Cb(e,t){if(e===void 0)return;if(!ve(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 Eb(e,t,r,o,n,s){if(o==="refusal"){if(Ve(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=gt(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=yt(t.slice(i+1));l!==void 0&&(a=xe(`history ${l}`))}let c=Lt(a);if(!Ve(r)||r!==0&&!c?.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 d=Nt(a).kind;if(o!==d)throw new TypeError(`${e} expected ${o}, but ${a} declares ${d}`)}function Sb(e,t,r){if(!ve(e))throw new TypeError(`tasks.${t}.steps[${String(r)}] must be an object`);let o=`tasks.${t}.steps[${String(r)}]`,n=ae(e.id,`${o}.id`),s=no(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"&&!xt.includes(a))throw new TypeError(`${o}.expected_output_kind is unsupported`);let c=a,d=e.expected_accounting_mode;if(!Tb.includes(d))throw new TypeError(`${o}.expected_accounting_mode is unsupported`);let l=d;if(l==="independent_transport"&&c!=="refusal")throw new TypeError(`${o} independent_transport accounting is supported only for refusal steps`);let p=no(e.required_fields,`${o}.required_fields`);if(p.some(E=>E.split(".").some(B=>B.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`),_=pt(e.expected_error_code,`${o}.expected_error_code`),g=pt(e.expected_refusal_surface,`${o}.expected_refusal_surface`),T=pt(e.recovery_for,`${o}.recovery_for`);return Eb(o,s,i,c,_,g),{id:n,args:s,expected_exit_code:i,expected_output_kind:c,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 wb(e,t){if(!ve(e))throw new TypeError(`tasks[${String(t)}] must be an object`);let r=ae(e.id,`tasks[${String(t)}].id`),o=ae(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)=>Sb(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 FD(e){if(!ve(e))throw new TypeError("agent-task transcript corpus must be an object");if(e.version!==lt)throw new TypeError(`agent-task transcript corpus version must be ${String(lt)}`);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)=>wb(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:lt,tasks:t}}import{createHash as io}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 so(e,t){if(typeof e!="string"||e.trim().length===0)throw new TypeError(`Relationship backfill ${t} must be non-empty`);return e.trim()}function BD(e,t){let r=so(t.migrationId,"migrationId"),o=so(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=qe(e,void 0,t.registry),a=i.graph.nodes(),c=i.graph.edges().map(f=>{let _=io("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`})}),d=io("sha256").update(JSON.stringify({migrationId:r,nodes:a,events:c})).digest("hex"),l=new Set([...t.existingEventIds??[]].filter(f=>typeof f=="string").map(f=>f.trim()).filter(Boolean)),p=c.filter(f=>!l.has(f.eventId));return Object.freeze({migration_id:r,fingerprint:d,nodes:a,events:Object.freeze(p),edge_count:c.length,skipped_existing_count:c.length-p.length,duplicate_dependency_rows:i.duplicateRows.length,dangling_reference_count:i.dangling.active.length+i.dangling.legacy_terminal.length})}import*as ao 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"],ut={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"}},zD=Object.freeze(Object.keys(ut));function co(e){if(Object.hasOwn(ut,e))return ut[e]}var Ab=new Set([..."=([{,:;!?&|+-*%^~<>","=>"]);function Q(e,t){return e<t?-1:e>t?1:0}function Ob(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 vb(e){return e===void 0||e.kind==="punctuator"&&Ab.has(e.value)||e.kind==="identifier"&&["return","case","throw","else","yield"].includes(e.value)}function Ib(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 Rb(e,t,r){if(e[t]!=="/"||!vb(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 Pb(e,t){let r=e[t];if(r==="'"||r==='"'||r==="`"){let n=Ob(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 Mb(e){let t=[],r=0;for(;r<e.length;){let o=Ib(e,r);if(o!==void 0){r=o;continue}let n=Rb(e,r,t.at(-1));if(n!==void 0){r=n;continue}let s=Pb(e,r);s.token&&t.push(s.token),r=s.next}return t}var kb=new Set(["object","block","pattern"]),xb=new Set(["const","let","var"]),Nb=new Set(["}",")","]"]),Lb=new Set(["=","(","[",",",":","?","return"]);function Db(e,t,r){if([...r].reverse().find(n=>kb.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"&&xb.has(o.value)?"pattern":o?.value==="=>"||o?.value===")"?"block":o&&Lb.has(o.value)?"object":"block"}function $b(e,t,r){let o=e[t];if(o.value==="{"){let i=Db(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 Fb(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 Gb(e,t){return e[t+1]?.value===")"&&e[t+2]?.value==="=>"||e[t+1]?.value==="="}function Ub(e){let t=Mb(ao.stripTypeScriptTypes(e,{mode:"strip"})),r=[],o=[];for(let[n,s]of t.entries()){let i=o.at(-1),a=Fb(i,s,t[n+1]);a&&i.candidates.push(a);let c=$b(t,n,o);if(c)o.push(c);else if(Nb.has(s.value)){let d=o.pop();d?.kind==="object"&&!Gb(t,n)&&r.push(...d.candidates)}else s.value===","&&i?.kind==="object"?i.member_start=!0:i?.kind==="object"&&s.value!==":"&&(i.member_start=!1)}return r}function jb(e){let t=[0];for(let r=0;r<e.length;r+=1)e[r]===`
|
|
32
|
+
`&&t.push(r+1);return t}function Bb(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 HD(e){let t=[],r=[];for(let n of[...e].sort((s,i)=>Q(s.path,i.path))){let s=jb(n.content),i;try{i=Ub(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 c=a.field,d=Bb(s,a.offset),l=co(c);l?t.push({path:n.path,line:d,field:c,kind:l.kind}):/(?:retry_command|candidate_command|fallback_candidate|next_best_command|example|next_step|migration_hint|restore_with)/u.test(c)&&!/(?:_total|_truncated)$/u.test(c)&&r.push({kind:"unknown_recovery_field",subject:`${n.path}:${d}:${c}`,detail:`${c} 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 VD(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(([c],[d])=>Q(c,d))){let c=co(i),d=c?.kind==="migration_hint"&&n.semantics==="behavior_preserving"?{...c,semantics:"behavior_preserving"}:c,l=[a].flat();d!==void 0&&l.forEach((p,f)=>{let _="nested_value_field"in d&&typeof d.nested_value_field=="string"?d.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}:${d.kind}:${T}`,probe_id:e,kind:d.kind,semantics:d.semantics,value:g})}),o(a,[...s,i])}};return o(t,[]),r}function KD(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 c=n.get(a.probe_id);if(!c){o.push({kind:"missing_probe",probe_id:a.probe_id,detail:`No entrypoint observation was recorded for ${i.code}.`});continue}c.code!==i.code&&o.push({kind:"wrong_error_code",probe_id:a.probe_id,detail:`Expected ${i.code}; observed ${c.code}.`}),c.exit_class!==a.expected_exit_class&&o.push({kind:"wrong_exit_class",probe_id:a.probe_id,detail:`Expected ${a.expected_exit_class}; observed ${c.exit_class}.`}),a.entrypoints.includes(c.entrypoint)||o.push({kind:"wrong_entrypoint",probe_id:a.probe_id,detail:`Expected one of ${a.entrypoints.join(", ")}; observed ${c.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 WD(e,t){let r=[],o=new Set,n=new Set;for(let c of e){if(o.has(c.id)){n.add(c.id),r.push({kind:"duplicate_obligation",reference_id:c.id,detail:`Recovery obligation ${c.id} was declared more than once.`});continue}o.add(c.id)}let s=new Map;for(let c of t){if(s.has(c.id)){r.push({kind:"duplicate_observation",reference_id:c.id,detail:`Recovery reference ${c.id} was observed more than once.`});continue}s.set(c.id,c),o.has(c.id)||r.push({kind:"undeclared_observation",reference_id:c.id,detail:`Recovery observation ${c.id} has no emitted obligation.`})}for(let c of e){if(n.has(c.id))continue;let d=s.get(c.id);d?d.reachable?d.semantics!==c.semantics&&r.push({kind:"wrong_semantics",reference_id:c.id,detail:`Recovery reference ${c.value} promised ${c.semantics}; proof demonstrated ${d.semantics}.`}):r.push({kind:"unreachable_reference",reference_id:c.id,detail:`Recovery reference ${c.value} did not reach its promised target.`}):r.push({kind:"missing_observation",reference_id:c.id,detail:`No reachability proof was recorded for ${c.kind} ${c.value}.`})}let i=ce.map(c=>{let d=e.filter(p=>p.kind===c),l=d.filter(p=>!n.has(p.id)).map(p=>s.get(p.id)).filter(p=>p!==void 0);return{kind:c,declared:d.length,observed:l.length,passed:d.filter(p=>{let f=s.get(p.id);return!n.has(p.id)&&f?.reachable===!0&&f.semantics===p.semantics}).length}});r.sort((c,d)=>c.reference_id!==d.reference_id?c.reference_id.localeCompare(d.reference_id):c.kind.localeCompare(d.kind));let a=i.reduce((c,d)=>c+d.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 qb(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 YD=qb;(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 JD=16,zb=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"]),lo=18,po=Object.freeze([...zb,"manifest_unknown_key","no_version_bounds_declared"].sort((e,t)=>e.localeCompare(t)));function QD(e,t=lo){return{ok:e.executable_error_code_count>=t,baseline:t,actual:e.executable_error_code_count}}function ZD(e,t=po){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 mt(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 e1(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=mt(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=mt(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=mt(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),c=a.filter(({disposition:l})=>l==="uncovered").map(({code:l})=>l),d=a.length-c.length;return{ok:c.length===0,catalog_error_code_count:a.length,executable_error_code_count:d,uncovered_error_code_count:c.length,coverage_fraction:a.length===0?1:d/a.length,closed_domain_probe_count:s,grammar_probe_count:i,uncovered_error_codes:c,rows:a}}function t1(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: ${lo}`,`- Required executable canonical codes: ${po.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 Hb(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 Vb(e){return[e.exit_code!==ue.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 ${ue.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."},...Hb(e)]}function n1(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 Vb(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 uo="not-a-declared-action";function Kb(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 de(e){return e.replaceAll(/[^a-z0-9]+/gu,"-").replaceAll(/^-|-$/gu,"")}function m1(e=je.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})=>de(r)));return e.flatMap(r=>r.slots.flatMap((o,n)=>{if(!o.required)return[];let s=r.command.split(" "),i=de(r.command),a=s.length>1&&t.has(i)?s.map(de).join("--"):i,c=Z(r.command).flatMap(l=>l.required?[l.flag,...l.value_name?["example"]:[]]:[]),d=Ue.some(l=>l.command===r.command);return[{probe_id:`required-argument-${a}-${de(o.name)}`,command:r.command,refusal_args:[...s,...r.slots.slice(0,n).map(l=>Kb(r.command,l)),...c],recovery_args:[...s,"--help"],error_code:d&&!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(N(e)){case"assurance":case"workspace snapshot":return Ue.filter(({parent:t})=>t===e).map(({action:t})=>t);case"graph":return Ne;case"merge":return Le;case"plan":return Ke;case"profile":return We;case"schema":return Dt;default:throw new Error(`Required positional action family ${e} has no authoritative value domain.`)}}function f1(e=je){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-${de(t)}`,command:t,refusal_args:[...r,uo],recovery_args:[...r,"--help"],error_code:"unknown_subcommand",rejected_value:uo,allowed_values:[...Wb(t)].sort()}}).sort((t,r)=>t.probe_id.localeCompare(r.probe_id))}function Yb(e,t){let r=[...t].sort();return e.length===t.length&&[...e].sort().every((o,n)=>o===r[n])}function Xb(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&&!Yb(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 _1(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=>Xb(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 ft=[{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 g1(){return ft.map(e=>({...e}))}function Jb(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 y1(e){let t=new Map(e.map(n=>[n.probe_id,n])),r=[],o=0;for(let n of ft){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=Jb(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:ft.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]="9df3f350-83bd-524a-92df-b4011cdcea62")}catch{}})();var Ie,Qb=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 Zb(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=Qb[N(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(N(e))?"linked-file-path":["comments","notes","learnings"].includes(N(e))?"entry-file-input":"plan-definition-file"}function Re(){if(Ie!==void 0)return Ie;let e=ee.filter(({command:n})=>Be(n)).flatMap(({command:n,family:s})=>Rt(n,Z(n)).map(i=>({command:n,family:s,concept:Zb(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 w1(){return Object.freeze(Re().map(e=>Object.freeze({command:e.command,canonical_flag:e.flag,accepted_spellings:Object.freeze([...new Set([e.flag,...e.aliases])].sort())})))}var mo=Object.freeze({init:30,item:20,config:36,extension:55,package:56,packages:56,install:27,upgrade:29,create:104,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:32,notes:36,learnings:32,files:41,docs:32,deps:32,plan:111,test:58,"test-all":41,telemetry:21,stats:29,health:36,validate:46,assurance:30,gc:22,workspace:23,contracts:29,claim:40,release:25,"start-task":24,"pause-task":23,"close-task":24,meet:33,event:33,remind:29,"test-runs-worker":20}),eT=1,fo=Object.freeze(Object.fromEntries(Object.entries({...mo,...Object.fromEntries(ke.flatMap(({alias:e,canonical:t})=>{let r=mo[e];return r===void 0?[]:[[t,r]]}))}).map(([e,t])=>[e,t+eT])));function _o(){let e=new Map(Object.keys(fo).map(t=>[t,0]));for(let{command:t}of Re())e.set(t,Number(e.get(t))+1);return Object.freeze(Object.entries(fo).map(([t,r])=>Object.freeze({command:t,current:Number(e.get(t)),maximum:r})))}function tT(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 rT(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 oT(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 c of n.accepted_spellings)a.has(c)||r.push({code:"removed_compatibility_spelling",command:n.command,detail:`${c} no longer resolves to ${n.canonical_flag}.`})}}function A1(e=Re(),t=_o(),r=[]){let o=[],n=new Map,s=new Map,i=new Map,a=new Map;for(let c of e){let d=`${c.command}:${c.flag}`;n.has(d)?o.push({code:"duplicate_canonical_flag",command:c.command,detail:`${c.flag} has more than one canonical row.`}):n.set(d,c),a.set(c.command,(a.get(c.command)??0)+1);let l=s.get(c.concept);l!==void 0&&l!==c.value_kind?o.push({code:"inconsistent_concept_kind",command:c.command,detail:`${c.concept} uses both ${l} and ${c.value_kind}.`}):s.set(c.concept,c.value_kind);let p=i.get(c.concept);p!==void 0&&p!==c.flag?o.push({code:"semantic_spelling_collision",command:c.command,detail:`${c.concept} is canonicalized by both ${p} and ${c.flag}.`}):i.set(c.concept,c.flag)}return tT(e,n,o),rT(a,t,o),oT(e,r,o),o.sort((c,d)=>c.command.localeCompare(d.command)||c.code.localeCompare(d.code)||c.detail.localeCompare(d.detail)),{ok:o.length===0,entry_count:e.length,budget_count:t.length,concept_count:new Set(e.map(({concept:c})=>c)).size,baseline_entry_count:r.length,findings:o}}function O1(){let e=Re(),t=_o(),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]="3f3a5dca-8370-52d7-b279-dc6f9f0aeadf")}catch{}})();function I1(e){return e}function R1(e){return e}function P1(e){return e}function M1(e){return e}function k1(e){return e}function x1(e){return e}function N1(e){return e}function L1(e){return e}function D1(e){return e}function $1(e){return e}function F1(e){return e}function G1(e){return e}function U1(e){return e}function j1(e){return{handled:!0,result:e}}function B1(){return{handled:!1}}function q1(e){return e}function z1(e){return e}function H1(e){return e}function V1(e){return e}function K1(e){return e}function W1(e){return e}function Y1(e){return e}function X1(e){return e}function J1(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 nT(e={},t={}){return new _e(t).extension(void 0,{...e,migrate:!0})}function iT(e={},t={}){return new _e(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]="53d81dd1-e713-5055-863d-66cad3650bfc")}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 x(e){if(typeof e!="string"||!Et(e))throw new TypeError("Invalid reliability timestamp.");return Date.parse(e)}function sT(e){let t=x(e.window_start),r=x(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 aT(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 c=x(i.started_at);if(i.repaired_at!==void 0&&(x(i.repaired_at)<c||i.outcome!=="failure"))throw new TypeError("Invalid reliability repair chronology.");c>=r&&c<o&&a.push(i)}return n}function h$(e,t){let{start:r,end:o}=sT(t),n=[...aT(e,t.families,r,o)].map(([s,i])=>{let a=i.filter(_=>_.outcome==="failure"),c=i.filter(_=>_.outcome!=="pending").length,d=c===0?null:a.length/c,l=a.filter(_=>_.repaired_at!==void 0&&x(_.repaired_at)<o),p={product:0,infrastructure:0,unknown:0};for(let _ of a)p[_.cause??"unknown"]+=1;let f=[];return c<t.min_completed_attempts&&f.push("insufficient_completed_attempts"),d!==null&&d>t.max_failure_rate&&f.push("failure_rate"),{family:s,attempts:i.length,completed:c,failed:a.length,pending:i.length-c,failure_rate:d,affected_days:[...new Set(a.map(_=>new Date(x(_.started_at)).toISOString().slice(0,10)))].sort(),repair_minutes:l.map(_=>(x(_.repaired_at)-x(_.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 le(e){return typeof e=="string"&&e.length>0&&e.trim()===e}function cT(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"||!le(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=>!le(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 dT(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"||!le(o.identity)||r.has(o.identity)||!le(o.reason)||!le(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 y$(e,t=[]){let r=cT(e),o=[...r.keys()].sort(),n=dT(t,o),s=[...new Set([...r.values()].flatMap(d=>[...d]))].sort(),i=[],a=new Set;for(let d of s){let l=o.filter(_=>!r.get(_).has(d));if(l.length===0)continue;let p=n.get(d),f=p!==void 0&&JSON.stringify([...p.missing_from].sort())===JSON.stringify(l);f&&a.add(d),i.push({identity:d,present_in:o.filter(_=>r.get(_).has(d)),missing_from:l,disposition:f?{reason:p.reason,evidence:p.evidence}:null})}let c=[...n.keys()].filter(d=>!a.has(d)).sort();return{schema:"pm-artifact-ledgers/1",ok:i.every(d=>d.disposition!==null)&&c.length===0,counts:Object.fromEntries(o.map(d=>[d,r.get(d).size])),findings:i,stale_exceptions:c}}(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]="14b66b71-90c1-5a6b-96cc-af2694079048")}catch{}})();import{createHash as go,createHmac as lT,randomBytes as pT,timingSafeEqual as uT}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 rF="dev.unbrained.pm/progressive-tool-discovery",oF=Object.freeze({version:1,discoveryTool:"pm_discover",canonicalResult:"structuredContent.result",compatibilityText:"pointer"}),mT=Object.freeze(["pm_discover","pm_next","pm_context","pm_search","pm_get"]),j=Object.freeze({lexical:.4,semantic:.2,graph:.1,permission:.15,freshness:.05,usage:.1}),fT=Object.freeze(["profile_changed","tool_contract_changed","workspace_extension_changed","authorization_changed","ranking_signal_changed","cursor_integrity_key_rotated"]),yo={core:0,standard:1,full:2,internal:3},bo=Object.freeze(["core","standard","full"]),_T=new Set(["core","standard","full","custom"]),To=new Set(ee.map(({family:e})=>e)),hT=pT(32);function Me(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 Co(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 Eo(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 gT(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 nF(e){if(wo(e),e.family!==void 0&&(typeof e.family!="string"||!To.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"||!bo.includes(e.tier)))throw new b("pm tool discovery tier must be core, standard, or full.",64);return{...e.query!==void 0?{query:Me(e.query,"query")}:{},...e.family!==void 0?{family:e.family}:{},...e.tier!==void 0?{tier:e.tier}:{},...e.limit!==void 0?{limit:Co(e.limit)}:{},...e.cursor!==void 0?{cursor:Me(e.cursor,"cursor")}:{},...e.includeSchema!==void 0?{includeSchema:So(e.includeSchema)}:{},...e.outputBudget!==void 0?{outputBudget:Eo(e.outputBudget)}:{}}}function yT(e){return e===void 0||!Number.isFinite(e)?0:Math.min(1,Math.max(0,e))}function pe(e){return[...new Set(e.toLowerCase().match(/[a-z0-9]+/gu)??[])].sort()}function bT(e,t){let r=pe(e);if(r.length===0)return 0;let o=new Set(pe(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 TT(e,t){let r=pe(e);if(r.length===0)return 0;let o=t.toLowerCase(),n=pe(t),s=r.filter(a=>n.some(c=>c.startsWith(a)||a.startsWith(c))).length,i=o.includes(e.toLowerCase())?.2:0;return Math.min(1,s/r.length+i)}function ho(e){return go("sha256").update(JSON.stringify(e)).digest("hex").slice(0,24)}function Ao(e,t,r){return lT("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:Ao(e,t,r)};return Buffer.from(JSON.stringify(o),"utf8").toString("base64url")}function ET(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(Ao(t,s,o),"base64url"),a=Buffer.from(n.signature,"base64url");if(a.length!==i.length||!uT(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 _t(e,t,r){return{value:yT(e),weight:t,available:r!=="unavailable",source:r}}function Pe(e,t,r){return _t(e??t,r,e===void 0?"computed":"host")}function ST(e,t,r){let o=Object.hasOwn(fe,e.name)?fe[e.name]:"help",n=ze(o),s=`${e.name} ${e.description} ${o} ${n}`,i=bT(t,s),a=new Set(pe(t)),c={lexical:_t(i,j.lexical,"computed"),semantic:Pe(e.signals?.semantic,TT(t,s),j.semantic),graph:Pe(e.signals?.graph,a.has(n)||a.has(o)?1:0,j.graph),permission:_t(1,j.permission,"authorization"),freshness:Pe(e.signals?.freshness,1,j.freshness),usage:Pe(e.signals?.usage,mT.includes(e.name)?1:0,j.usage)},d=Object.values(c).reduce((l,p)=>l+p.value*p.weight,0);return{name:e.name,description:e.description,command:o,tier:He(o),family:n,score:Number(d.toFixed(6)),signals:c,...r?{input_schema:structuredClone(e.inputSchema)}:{}}}function wT(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"||!bo.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"||!To.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"||!_T.has(e.profile)))throw new b("pm tool discovery profile must be core, standard, full, or custom.",64)}function AT(e){let t=Me(e.query===void 0?"":e.query,"query").trim().replace(/\s+/gu," ");Me(e.cursor===void 0?"":e.cursor,"cursor");let r=Co(e.limit===void 0?10:e.limit),o=Eo(e.outputBudget===void 0?1200:e.outputBudget);return wT(e),{query:t,includeSchema:So(e.includeSchema),limit:r,budget:o,maximumTier:yo[e.tier??"full"],profile:e.profile===void 0?"core":e.profile}}function Oo(e,t,r){let o=r??e.tools.reduce((i,a,c)=>i+(c===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"),c=Math.ceil((a+o)/4);if(c===s)break;s=c}return s}function OT(e,t,r){return e.filter(o=>o.authorized!==!1).map(o=>ST(o,r.query,r.includeSchema)).filter(o=>o.tier!=="internal"&&yo[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 vT(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(Oo(r(s+1),t,a)>t)break;o.push(i),n=a}return o}function iF(e,t={}){gT(e),wo(t);let r=AT(t),o=t.cursorIntegrityKey??hT,n=OT(e,t,r),s=ho({query:r.query,family:t.family??null,tier:t.tier??"full",includeSchema:r.includeSchema,profile:r.profile,ranked:n}),i=ET(t.cursor,s,n.length,o),a=n.slice(i,i+r.limit),c=[];r.includeSchema||c.push({name:"input_schema",reason:"compact_projection",restore_with:"Set includeSchema=true."}),i+r.limit<n.length&&c.push({name:"tools",reason:"limit",restore_with:"Continue with next_cursor or increase limit."});let d={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:j},cache:{key:ho({fingerprint:s,cursorIntegrityKey:go("sha256").update(o).digest("hex"),limit:r.limit,offset:i,budget:r.budget}),ttl_ms:3e4,scope:"private",invalidates_on:fT}},l=(g,T=g.length)=>{let E=i+T,B=E<n.length,v=[...c];return T<a.length&&v.push({name:"tools",reason:"token_budget",restore_with:"Continue with next_cursor or increase outputBudget."}),{...d,tools:[...g],returned:T,has_more:B,...B?{next_cursor:CT(s,E,o)}:{},omission_receipt:{has_omissions:v.length>0,omitted:v}}},p=g=>{let T=l(g),E=Oo(T,r.budget);return{...T,token_cost:{estimated_tokens:E,budget:r.budget,within_budget:r.budget==="unbounded"||E<=r.budget}}},f=vT(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]="e02d896b-ffa2-5bfa-83dc-d567e1ecd8be")}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]="9a4e9ba0-45d3-52bc-a074-5e2b9a8e6ac7")}catch{}})();export{Jv as ACTIONABILITY_ORDERING_KINDS,Vc as ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,_c as ACTIVITY_FLAG_CONTRACTS,Bn as AGENT_PROVENANCE_DIMENSIONS,Zs as AGGREGATE_FLAG_CONTRACTS,Ga as APPEND_FLAG_CONTRACTS,jM as ASSURANCE_ACTIONS,BM as ASSURANCE_DECLARATION_KINDS,QR as ASSURANCE_DOCUMENT_VERSION,ic as ASSURANCE_FLAG_CONTRACTS,ZR as ASSURANCE_GATE_TRIGGERS,eP as ASSURANCE_MEASUREMENT_SOURCE_KINDS,HP as ASSURANCE_PRESET_IDS,WR as AssuranceEvaluationRefusalError,KR as AssuranceMutationRefusalError,YR as AssuranceSourceResolutionError,ci as BASELINE_ITEM_FORMAT_VERSION,XI as BOUNDARY_FIXTURE_CAPTURE_SOURCES,RI as BRIEF_LIST_FIELDS,zn as BUILTIN_AGENT_PROVENANCE_ADAPTERS,W as BUILTIN_CORPUS_SHAPES,qn as BUILTIN_HARNESS_SIGNAL_DESCRIPTORS,ln as BUILTIN_ITEM_TYPE_VALUES,Ht as BUILTIN_PROFILES,GC as BUILTIN_RELATIONSHIP_KINDS,qc as CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,fc as CALENDAR_FLAG_CONTRACTS,Ua as CLAIM_FLAG_CONTRACTS,Ld as CLOSE_ACTION_OPTION_KEYS,$a as CLOSE_FLAG_CONTRACTS,Fa as CLOSE_MANY_FLAG_CONTRACTS,Va as CLOSE_TASK_FLAG_CONTRACTS,ea as COMMENTS_FLAG_CONTRACTS,lC as COMMON_MUTATION_COMMAND_OPTION_KEYS,vc as COMPLETION_FLAG_CONTRACTS,hn as CONFIDENCE_TEXT_VALUES,_a as CONFIG_FLAG_CONTRACTS,zc as CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,O0 as CONTEXT_EVALUATION_METRIC_NAMES,gc as CONTEXT_FLAG_CONTRACTS,$w as CONTEXT_INTENT_LIMIT_OVERRIDE_WARNING,Bt as CONTEXT_OUTPUT_VALUES,M0 as CONTEXT_PACKING_PROFILES,y0 as CONTEXT_RECENCY_EPOCH,E0 as CONTEXT_RELEVANCE_SERVICE,T0 as CONTEXT_RELEVANCE_SIGNAL_NAMES,N0 as CONTEXT_SIGNAL_SET_VERSION,x0 as CONTEXT_SIGNAL_STORE_FORMAT_VERSION,L0 as CONTEXT_SIGNAL_STORE_WARNING_DETAILS,Ow as CONTEXT_USAGE_LIMITS,Oc as CONTRACTS_FLAG_CONTRACTS,lc as COPY_FLAG_CONTRACTS,cd as CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,ld as CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,dd as CREATE_COMMANDER_STRING_OPTION_CONTRACTS,kT as CREATE_DIRECT_CLOSE_REASON_DEFAULT,sc as CREATE_FLAG_CONTRACTS,YE as CURRENT_HISTORY_HASH_ALGORITHM,iA as CURRENT_HISTORY_ITEM_HASH_VERSION,aA as CURRENT_HISTORY_RECORD_HASH_VERSION,di as CURRENT_ITEM_FORMAT_VERSION,G0 as ContextSignalStore,vw as ContextUsageValidationError,p0 as DEFAULT_AUTHOR_IDENTITY_VOCABULARY,rk as DEFAULT_CHILD_SAMPLE_LIMIT,II as DEFAULT_COMPACT_LIST_FIELDS,MO as DEFAULT_DERIVED_INDEX_MINIMUM_ITEMS,wf as DEFAULT_EVAL_QUERIES_RELATIVE_PATH,jP as DEFAULT_RELATIONSHIP_CONTEXT_TOKEN_BUDGET,r0 as DEFAULT_TERMINAL_TRANSITION_POLICY,q0 as DEFAULT_WORKSPACE_MEMORY_MINIMUM_ITEMS,rR as DEFECT_ESCAPE_CLASSES,oR as DEFECT_GATE_EVIDENCE_DISPOSITIONS,Ba as DELETE_FLAG_CONTRACTS,mn as DEPENDENCY_KIND_VALUES,Tc as DEPS_FLAG_CONTRACTS,na as DOCS_FLAG_CONTRACTS,rc as DUPLICATES_FLAG_CONTRACTS,bM as DURABLE_MERGE_RECEIPT_INTRODUCED_AT,aR as DefectRecurrencePolicyParseError,Ec as EVAL_FLAG_CONTRACTS,gf as EVAL_METRIC_NAMES,Cf as EVAL_QUERY_SET_CONTRACT,Ef as EVAL_QUERY_SET_EXAMPLE,Tf as EVAL_QUERY_SET_SCHEMA_ID,hc as EVENTS_FLAG_CONTRACTS,Wa as EVENT_FLAG_CONTRACTS,Do as EXECUTABLE_COMMAND_ALIASES,ue as EXIT_CODE,Oa as EXTENSION_ACTIVATE_FLAG_CONTRACTS,Aa as EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,xa as EXTENSION_ADOPT_FLAG_CONTRACTS,xk as EXTENSION_CAPABILITIES,PT as EXTENSION_CAPABILITY_CONTRACT,IT as EXTENSION_CAPABILITY_CONTRACT_VERSION,RT as EXTENSION_CAPABILITY_LEGACY_ALIASES,Ln as EXTENSION_CAPABILITY_REGISTRATION_SURFACES,ka as EXTENSION_CATALOG_FLAG_CONTRACTS,va as EXTENSION_DEACTIVATE_FLAG_CONTRACTS,wa as EXTENSION_DESCRIBE_FLAG_CONTRACTS,Ma as EXTENSION_DOCTOR_FLAG_CONTRACTS,Sa as EXTENSION_EXPLORE_FLAG_CONTRACTS,ha as EXTENSION_FLAG_CONTRACTS,ya as EXTENSION_INIT_FLAG_CONTRACTS,Ca as EXTENSION_INSTALL_FLAG_CONTRACTS,Ra as EXTENSION_MANAGE_FLAG_CONTRACTS,Ia as EXTENSION_MIGRATE_FLAG_CONTRACTS,Nk as EXTENSION_POLICY_MODES,Lk as EXTENSION_POLICY_SURFACES,Pa as EXTENSION_RELOAD_FLAG_CONTRACTS,$k as EXTENSION_SANDBOX_PROFILES,ga as EXTENSION_SCOPE_FLAG_CONTRACTS,Dk as EXTENSION_TRUST_MODES,Ea as EXTENSION_UNINSTALL_FLAG_CONTRACTS,bR as EXTERNAL_DEPENDENCY_RESOLUTION_STATUSES,gR as EXTERNAL_DEPENDENCY_SOURCE_KIND,yR as EXTERNAL_DEPENDENCY_SOURCE_KIND_ALIAS,av as ExtensionCommandError,oa as FILES_FLAG_CONTRACTS,pc as FOCUS_FLAG_CONTRACTS,ec as GC_FLAG_CONTRACTS,xI as GET_DEPTH_INPUT_VALUES,kI as GET_DEPTH_VALUES,yc as GET_FLAG_CONTRACTS,Js as GLOBAL_FLAG_CONTRACTS,tu as GRAPH_DURABLE_CACHE_MIN_ITEMS,eu as GRAPH_DURABLE_CACHE_VERSION,Cc as GRAPH_FLAG_CONTRACTS,vI as GRAPH_QUERY_DEFAULTS,Ne as GRAPH_SUBCOMMAND_VALUES,bc as GUIDE_FLAG_CONTRACTS,oc as HEALTH_FLAG_CONTRACTS,da as HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,$P as HISTORY_AUTHOR_ATTRIBUTION_BASELINE,KM as HISTORY_COMPACT_BULK_DEFAULT_MIN_ENTRIES,la as HISTORY_COMPACT_FLAG_CONTRACTS,Ti as HISTORY_EVENT_CLASSIFICATION_VERSION,ia as HISTORY_FLAG_CONTRACTS,KE as HISTORY_HASH_ALGORITHMS,bO as HISTORY_ITEM_HASH_VERSION_3_INTRODUCED_IN,aa as HISTORY_REDACT_FLAG_CONTRACTS,ca as HISTORY_REPAIR_FLAG_CONTRACTS,Fl as INIT_AGENT_GUIDANCE_MODE_VALUES,fa as INIT_FLAG_CONTRACTS,Na as INSTALL_FLAG_CONTRACTS,tM as IN_PROGRESS_WORK_DETAIL_LIMIT,_n as ISSUE_SEVERITY_VALUES,cc as ITEM_COMPLETE_FLAG_CONTRACTS,lM as ITEM_LATEST_TIMESTAMP_FIELDS,MT as ITEM_METADATA_KEY_ORDER,ac as ITEM_MUTATE_FLAG_CONTRACTS,dc as ITEM_REOPEN_FLAG_CONTRACTS,xs as ITEM_REVISION_CONFLICT_CHANGE_LIMIT,ks as ITEM_REVISION_CONFLICT_CODE,oM as ITEM_SCALAR_MISSING_VALUE,pn as ITEM_TYPE_VALUES,dM as ITEM_UNION_COLLECTION_FIELDS,F0 as JsonFileContextSignalStoreAdapter,ra as LEARNINGS_FLAG_CONTRACTS,WE as LEGACY_HISTORY_HASH_ALGORITHM,np as LINKED_ARTIFACT_NOTE_CONFLICT_MODES,Uu as LINKED_TEST_ENV_NAME_PATTERN,ju as LINKED_TEST_PM_CONTEXT_MODE_VALUES,Gu as LINKED_TEST_PROTECTED_ENV_KEYS,Bu as LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,jc as LIST_COMMANDER_STRING_OPTION_CONTRACTS,PI as LIST_COMMAND_DEFAULT_PROJECTIONS,Gk as LIST_FILTER_EXTENSION_FLAG_DEFINITIONS,Qs as LIST_FILTER_FLAG_CONTRACTS,vR as LIST_SORT_FIELDS,IR as LIST_SORT_ORDER_VALUES,Ci as MAINTENANCE_HISTORY_OPERATIONS,tk as MAX_CHILD_PROJECTION_ITEMS,JI as MAX_WAIVER_NOTICE_DAYS,FT as MAX_WORKFLOW_POLICIES,GT as MAX_WORKFLOW_POLICY_TERMS,Ka as MEET_FLAG_CONTRACTS,Ek as MERGE_DRIVER_ARTIFACT_VALUES,sa as MERGE_FLAG_CONTRACTS,Le as MERGE_SUBCOMMAND_VALUES,Ak as MUTATION_EVENT_WIRE_BUDGET,ie as MemoryRelationshipGraphAdapter,Hc as NEXT_COMMANDER_STRING_OPTION_CONTRACTS,wc as NEXT_FLAG_CONTRACTS,Um as NEXT_OUTPUT_VALUES,l0 as NEXT_RANKING_POLICIES,ta as NOTES_FLAG_CONTRACTS,mI as OutputEnvelopeFitError,ba as PACKAGE_FLAG_CONTRACTS,Ta as PACKAGE_INIT_FLAG_CONTRACTS,Ha as PAUSE_TASK_FLAG_CONTRACTS,Nd as PLAN_CREATE_METADATA_PARAMETER_KEYS,ma as PLAN_FLAG_CONTRACTS,Ks as PLAN_SHOW_DEPTH_VALUES,Ke as PLAN_SUBCOMMANDS,Xm as PLAN_TEMPLATE_NAMES,Tb as PM_AGENT_TASK_ACCOUNTING_MODES,lt as PM_AGENT_TASK_TRANSCRIPT_VERSION,ko as PM_BULK_LIFECYCLE_COMMAND_ALIASES,ns as PM_CLI_ERROR_DETAILS_LIMITS,ls as PM_CLI_EXPECTED_ERROR_NAME,UI as PM_CLI_GRAMMAR_CONTRACT,LI as PM_CLI_GRAMMAR_NOUNS,Yo as PM_CLI_ONLY_TOOL_ACTION_WAIVERS,DI as PM_CLI_SHARED_VERBS,Lo as PM_COMMAND_ALIAS_CONTRACTS,ee as PM_COMMAND_CAPABILITY_CONTRACTS,It as PM_COMMAND_DESTINATION_CONTRACTS,BR as PM_COMMAND_EXIT_CONTRACTS,jR as PM_COMMAND_EXIT_OUTCOME_CONTRACTS,ki as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,FR as PM_COMMAND_OUTPUT_ENVELOPE_CONTRACTS,je as PM_COMMAND_POSITIONAL_CONTRACTS,al as PM_COMMAND_VISIBILITY_CONTRACTS,MP as PM_COMPLETE_LIST_FINDING_CODES,iI as PM_CONTEXT_INTENTS_FILE,Fw as PM_CONTEXT_INTENT_CONTRACTS,Mo as PM_CONTEXT_OPS_COMMAND_ALIASES,Ho as PM_CORE_COMMAND_NAMES,F as PM_CORPUS_SHAPE_SCHEMA,Jo as PM_DEPRECATED_TOOL_ACTIONS,vi as PM_DIAGNOSTIC_DEGRADATION_STEPS,Ii as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,Oi as PM_DIAGNOSTIC_OUTPUT_CLASSES,Qo as PM_DISCOVERABLE_TOOL_ACTIONS,Wr as PM_EPISODE_SCHEMA,DR as PM_ERROR_CODE_CATALOG,kR as PM_ERROR_CODE_EXIT_CLASS_CONTRACTS,eo as PM_EXACT_COVERAGE_METRICS,Go as PM_EXTENSION_CAPABILITY_CONTRACTS,Vo as PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,jo as PM_EXTENSION_POLICY_MODE_CONTRACTS,zo as PM_EXTENSION_POLICY_SURFACE_CONTRACTS,qo as PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,Uo as PM_EXTENSION_SERVICE_NAME_CONTRACTS,Bo as PM_EXTENSION_TRUST_MODE_CONTRACTS,Fi as PM_GENERIC_REFUSAL_GUIDANCE,EP as PM_GITATTRIBUTES_END,CP as PM_GITATTRIBUTES_START,wP as PM_GITATTRIBUTES_V2_END,SP as PM_GITATTRIBUTES_V2_START,_l as PM_GITIGNORE_END,fl as PM_GITIGNORE_START,JM as PM_HISTORY_ATTESTATION_CONTRACT,Po as PM_HISTORY_COMMAND_ALIASES,pS as PM_HISTORY_OPERATION_ALIASES,mS as PM_HISTORY_OPERATION_CONTRACT,uS as PM_HISTORY_OPERATION_PATTERNS,Wo as PM_ITEM_ACTION_SUBCOMMANDS,dS as PM_ITEM_HISTORY_OPERATIONS,ot as PM_MCP_APPS_EXTENSION,Mr as PM_MCP_APPS_SERVER_CAPABILITY,Se as PM_MCP_APPS_SPEC_VERSION,Nr as PM_MCP_APP_CONTRACTS,xr as PM_MCP_APP_MIME_TYPE,mT as PM_MCP_ENTRY_TOOL_NAMES,m as PM_MCP_ERROR_CODES,eL as PM_MCP_HTTP_PROTOCOL_VERSION,Dg as PM_MCP_INPUT_REQUEST_METHODS,or as PM_MCP_LEGACY_PROTOCOL_VERSIONS,rr as PM_MCP_LOG_LEVELS,w as PM_MCP_META_KEYS,rF as PM_MCP_PROGRESSIVE_DISCOVERY_EXTENSION,oF as PM_MCP_PROGRESSIVE_DISCOVERY_SERVER_CAPABILITY,ul as PM_MCP_PROMPT_CONTRACTS,z as PM_MCP_PROTOCOL_VERSION,pl as PM_MCP_RESOURCE_CONTRACTS,it as PM_MCP_SKILLS_DRAFT_REVISION,Lr as PM_MCP_SKILLS_EXTENSION,By as PM_MCP_SKILLS_SERVER_CAPABILITY,R as PM_MCP_SKILL_LIMITS,Ce as PM_MCP_SUBSCRIPTION_ID_META_KEY,te as PM_MCP_SUPPORTED_PROTOCOL_VERSIONS,VN as PM_MCP_TASKS_EXTENSION,Kg as PM_MCP_TASK_STATUSES,fe as PM_MCP_TOOL_COMMAND_CONTRACTS,CS as PM_MODE_PAIRED_OUTPUT_PROJECTION_CONTRACTS,fs as PM_MUTATION_ACTION_CONTRACTS,ke as PM_NAMESPACED_COMMAND_ALIASES,Vr as PM_OBSERVATION_SCHEMA,Ai as PM_OUTPUT_BUDGET_CLASSES,wi as PM_OUTPUT_DEGRADATION_STEPS,xt as PM_OUTPUT_ENVELOPE_KINDS,Ft as PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,Ko as PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,$t as PM_PACKAGE_RESOURCE_KINDS,Ue as PM_POSITIONAL_ACTION_CONTRACTS,Bd as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,Ud as PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,QS as PM_READ_OUTPUT_COMPOSITION_OPTION_FLAGS,mw as PM_READ_OUTPUT_CONTINUATION_FINGERPRINT_POLICIES,XS as PM_READ_OUTPUT_DIMENSIONS,JS as PM_READ_OUTPUT_OPTION_FLAGS,HS as PM_READ_OUTPUT_SESSION_MAX_SEEN_ITEM_IDS,zS as PM_READ_OUTPUT_SESSION_MIN_TOKENS,JC as PM_READ_OUTPUT_SURFACES,ZS as PM_READ_OUTPUT_SURFACE_CONTRACTS,jS as PM_READ_OUTPUT_TAIL_RETENTION_POLICIES,TS as PM_READ_ROW_CONTRACTS,bS as PM_READ_ROW_JQ_SELECTOR,Bi as PM_RECOVERY_ECHO_FIELDS,zD as PM_RECOVERY_REFERENCE_FIELDS,ce as PM_RECOVERY_REFERENCE_KINDS,zb as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,po as PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2,JD as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE,lo as PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2,xo as PM_RELOCATED_COMMAND_ALIASES,zd as PM_REPRODUCIBLE_PROCESS_ENV,qR as PM_SUCCESS_EXIT_CODES,Xo as PM_TOOL_ACTIONS,Dd as PM_TOOL_ACTION_PARAMETER_CONTRACTS,jd as PM_TOOL_PARAMETERS_SCHEMA,Gd as PM_TOOL_PARAMETERS_SCHEMA_MAJOR,Fd as PM_TOOL_PARAMETERS_SCHEMA_VERSION,kd as PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,Kr as PM_VERDICT_SCHEMA,lS as PM_WORKSPACE_HISTORY_OPERATIONS,zr as PM_WORKSPACE_RECIPE_SCHEMA,ua as PROFILE_FLAG_CONTRACTS,Qt as PROFILE_LINT_CODES,Jt as PROFILE_LINT_DIMENSIONS,zt as PROFILE_NAMES,We as PROFILE_SUBCOMMANDS,b as PmCliError,_e as PmClient,kP as PmCompleteListValidationError,y as PmMcpAuthorizationError,nr as PmMcpInputRequiredError,Or as PmMcpIssuerCredentialStore,u as PmMcpProtocolError,ir as PmMcpRequestStateReplayGuard,jr as PmMcpSkillRegistry,hr as PmMcpSubscriptionRegistry,tt as PmMcpTaskStore,Aw as QUERY_CURSOR_CONTRACT,tw as READ_OUTPUT_MUTATION_CONFLICT_CODE,rw as READ_OUTPUT_SHAPING_CONTROL_FLAGS,Da as REINDEX_FLAG_CONTRACTS,pO as REINDEX_LOCK_ID,dt as RELATIONSHIP_GRAPH_SNAPSHOT_VERSION,qa as RELEASE_FLAG_CONTRACTS,Ya as REMIND_FLAG_CONTRACTS,wt as RESERVED_ITEM_FIELD_NAMES,ja as RESTORE_FLAG_CONTRACTS,fn as RISK_VALUES,_I as RelationshipEventLog,hI as RelationshipEventStore,q as RelationshipGraph,Fe as RelationshipKindRegistry,pa as SCHEMA_FLAG_CONTRACTS,Bc as SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,Uk as SEARCH_EXTENSION_FLAG_DEFINITIONS,Ac as SEARCH_FLAG_CONTRACTS,sm as SEMANTIC_ATTRIBUTION_LIMITS,NT as SETTINGS_DEFAULTS,Rf as SNAPSHOT_SCHEMA,yP as SOURCE_CONTEXT_ACCESS_ENV,bP as SOURCE_CONTEXT_WRITE_OVERRIDE_ENV,Bm as STALE_CLAIM_TAKEOVER_REFUSED_CODE,As as STALE_WORK_THRESHOLD_SETTING,pm as START_BLOCKED_REFUSAL_CODE,lm as START_BLOCKER_ENFORCEMENT_DEFAULT,za as START_TASK_FLAG_CONTRACTS,tc as STATS_FLAG_CONTRACTS,un as STATUS_VALUES,Xs as SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,Ei as SUBSTANTIVE_HISTORY_OPERATIONS,sA as SUPPORTED_HISTORY_ITEM_HASH_VERSIONS,cA as SUPPORTED_HISTORY_RECORD_HASH_VERSIONS,HC as SUPPRESS_HOST_OUTPUT_MARKER,Qa as TELEMETRY_FLAG_CONTRACTS,o_ as TELEMETRY_SUBCOMMANDS,Ja as TEST_ALL_FLAG_CONTRACTS,Xa as TEST_FLAG_CONTRACTS,Za as TEST_RUNS_FLAG_CONTRACTS,Qf as TEST_RUN_MEASUREMENT_LIMIT,Id as TOOL_ACTIVITY_OPTION_CONTRACTS,hd as TOOL_AGGREGATE_OPTION_CONTRACTS,wd as TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,vd as TOOL_CALENDAR_OPTION_CONTRACTS,Od as TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,Rd as TOOL_CONTEXT_OPTION_CONTRACTS,Cd as TOOL_CREATE_OPTION_CONTRACTS,Td as TOOL_CREATE_OPTION_CONTRACT_SOURCE,Pd as TOOL_DEPS_OPTION_CONTRACTS,Md as TOOL_GRAPH_OPTION_CONTRACTS,_d as TOOL_LIST_FILTER_OPTION_CONTRACTS,gd as TOOL_SEARCH_FILTER_OPTION_CONTRACTS,bd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,yd as TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,Ad as TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,Sd as TOOL_UPDATE_OPTION_CONTRACTS,Ed as TOOL_UPDATE_OPTION_CONTRACT_SOURCE,xT as TYPE_TO_FOLDER,$C as UNKNOWN_SUBCOMMAND_COMPATIBILITY_CODES,Ev as UNPROVEN_ACTIVITY_REASONS,pd as UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,md as UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,ud as UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,uc as UPDATE_FLAG_CONTRACTS,mc as UPDATE_MANY_FLAG_CONTRACTS,La as UPGRADE_FLAG_CONTRACTS,On as URL_CREDENTIAL_PLACEHOLDER,nc as VALIDATE_FLAG_CONTRACTS,$T as WORKFLOW_POLICY_ACTIONS,vP as WORKFLOW_POLICY_DOCUMENT_SCHEMA,OP as WORKFLOW_POLICY_SCHEMA,Sc as WORKSPACE_FLAG_CONTRACTS,PA as WORKSPACE_HISTORY_ID,Pf as WORKSPACE_SNAPSHOT_ACTIONS,ep as WorkspaceGraphCache,CI as WorkspaceTransactionInterruptedError,Pu as _testOnly,ek as _testOnlyAggregateCommand,Ql as _testOnlyConfigCommand,sk as _testOnlyGetCommand,hu as _testOnlyHealthCommand,Bl as _testOnlyInit,Gl as _testOnlyInitAgentGuidance,tx as _testOnlyItemTransaction,Rk as _testOnlyMutationEvents,J0 as _testOnlyNextCommand,Ck as _testOnlySearchCommand,qP as _testOnlySimilarity,ef as _testOnlyTemplates,vu as _testOnlyValidateCommand,kk as _testOnlyWorkspacePosition,ox as abandonItemTransaction,OI as abandonWorkspaceTransaction,YP as acceptAssuranceProposals,Au as acknowledgeLinkedTests,Xl as acknowledgeUnknownAuthorHistoryEvents,Yl as acknowledgeUnknownAuthorHistoryEventsFromTransport,kO as acquireItemMetadataDerivedIndexLock,Ge as acquireLock,jn as acquireLockLease,Dx as activateExtensionForTest,dE as activateExtensions,mm as admitStartWithOpenBlockers,Un as agentSessionEnvironment,nh as aggregate,jf as analyzeAgentProvenanceDescriptorCoverage,iR as analyzeDefectChangeRisk,UM as analyzeDefectRecurrenceCoverage,vp as analyzeDuplicateItems,yI as analyzeGraphImpact,Jd as analyzeHierarchyIntegrity,bI as analyzeKnowledgeGraph,HR as analyzePmCommandExitConformance,Zo as analyzePmToolActionParity,vM as analyzeReconciliationDiscard,gI as analyzeRelationshipExecution,Vp as analyzeRelationshipSchedule,Ig as analyzeSdkActionCoverage,Pt as analyzeSdkCliParameterCompleteness,hh as append,Hi as appendHistoryEntry,NA as appendWorkspaceAuditEvent,xA as appendWorkspaceHistoryChange,XT as applyAcceptanceCriteriaMutations,KP as applyAssurancePreset,Nc as applyBootstrapPagerPolicy,LM as applyClosureTimestampFix,qw as applyContextIntentProjection,Gm as applyContextTagProjection,RR as applyFilterValueEcho,_O as applyHistoryPatch,qd as applyInvocationAuthorOverride,mp as applyPathMigrations,dw as applyReadOutputDimensions,iw as applyReadOutputIncludeModes,KS as applyReadOutputSessionReferences,UE as applyRegisteredItemFieldDefaultsAndValidation,gp as applyStandaloneNote,zs as applyStoredExtensionMigrationState,QT as applyTagRemovals,s0 as applyTerminalOrderingPolicy,yp as artifactKey,AC as asRecordClone,wC as asRecordOrNull,qe as assembleWorkspaceRelationshipGraph,DP as assertCompleteListResult,hN as assertExtensionBlueprint,_N as assertExtensionCapabilityUsage,Jx as assertExtensionDeactivated,bN as assertExtensionManifestCompatible,yN as assertExtensionManifestMatchesBlueprint,TN as assertExtensionPreflight,el as assertHierarchyMutationAllowed,WM as assertHistoryCompactTarget,RM as assertHistoryRepairTarget,Zi as assertInitializedTracker,fp as assertLinkedArtifactMutationIsUnambiguous,SN as assertMcpClientCapabilities,EN as assertMcpProtocolHeader,bb as assertMemoryRelationshipGraphAdapterConformance,tC as assertNoUnknownCsvKeys,$u as assertNonHierarchyCardinalityMutationAllowed,Qx as assertPackageManifest,qA as assertParentReferenceIsNotSelf,PL as assertPmMcpSkillsCapability,gN as assertProjectProfile,vO as assertProjectRuntimeCompatibility,SO as assertProjectRuntimeFormatGuard,ES as assertProjectionModeChoice,Qi as assertReadableTrackerRoot,Zx as assertRegisteredCommandContract,dN as assertRegisteredCommandOverride,iN as assertRegisteredExporter,eN as assertRegisteredFlags,tN as assertRegisteredHook,nN as assertRegisteredImporter,sN as assertRegisteredItemField,aN as assertRegisteredItemType,fN as assertRegisteredMigration,lN as assertRegisteredParserOverride,pN as assertRegisteredPreflightOverride,cN as assertRegisteredProfile,uN as assertRegisteredRendererOverride,rN as assertRegisteredSearchProvider,mN as assertRegisteredServiceOverride,oN as assertRegisteredVectorStoreAdapter,qC as assertRelationshipEdgeAllowed,oo as assertRelationshipGraphAdapterConformance,WT as assertSchemaPreviewSupported,s_ as assertTestMeasurementRun,eA as assertWellFormedOutputText,tP as assuranceAssertionUpdateIsLoosening,Vw as attachContextIntentReceipt,Iw as attachContextUsageServingReceipt,Cu as attachLinkedTestMutationProvenance,Tu as attachLinkedTestProvenance,Xe as attachMcpServerInfo,IS as attachOutputOmissionReceipt,Ww as attachOutputTokenAccounting,Kw as attachReadOutputContracts,WS as attachReadOutputSessionReceipt,El as auditMergeAttributeFence,AP as auditMergeDriverConfiguration,Qp as auditWorkspaceRelationshipGraph,_L as authorizeMcpHttpRequest,Fn as boundAgentEpisodeIdentity,$S as boundReadOutputRows,Lm as buildChildrenByParent,_k as buildCompactSearchFilterSummary,PR as buildContentFilterEcho,$0 as buildContextSignalSnapshot,ab as buildCorpusShapeItemPlan,nR as buildDefectRecurrenceIndex,kl as buildExtensionDescribeResult,Nl as buildExtensionInstallPlan,MR as buildGovernanceMissingFilterEcho,fu as buildInProgressSweepCommands,rM as buildInProgressWorkHealthSummary,ZA as buildInvalidTypeError,ok as buildItemChildrenRollup,Zk as buildItemCompletionMutations,C0 as buildItemContextRelevanceCandidates,FO as buildItemNotFoundError,ik as buildItemSchedule,DM as buildLinkedFileRepairReport,sL as buildMcpAuthorizationDiscoveryUrls,kg as buildMcpCompleteResult,AN as buildMcpDiscoverResult,pL as buildMcpDynamicRegistrationMetadata,QN as buildMcpHttpRequestHeaders,xN as buildMcpInputRequiredResult,iL as buildMcpProtectedResourceMetadata,Tl as buildMergeAttributePatterns,$d as buildPmActionToolInputSchema,e1 as buildPmRefusalClosureCensus,BP as buildRelationshipContext,qO as buildSearchCorpus,HO as buildSemanticCorpusInput,kM as buildStatusRoleWarnings,Ji as buildTrackerInitializationRecovery,XO as buildVectorizationEmbeddingIdentity,JO as buildVectorizationEmbeddingMetadata,hk as buildVerboseSearchFilters,IP as buildWorkflowCompletenessCheck,z0 as buildWorkspaceMemorySnapshot,yi as canonicalDocument,pC as canonicalizeCommandOptionKey,hx as canonicalizeCommandSuggestions,b0 as canonicalizeContextRecencyCoordinate,UC as canonicalizeRelationshipKind,HD as censusPmRecoveryReferenceProducers,LP as certifyCompleteListResult,kx as checkExtensionManifestCompatibility,Zh as claim,eg as claimNext,FP as classifyHistoryAuthorEvent,Si as classifyHistoryEvent,AM as classifyHistoryMergeReceiptReferences,tE as classifyHostEnvironmentFault,yk as classifyImplicitSemanticFallbackReason,ui as classifyItemFormatVersion,c_ as classifyLinkedTestCommandSafety,d_ as classifyLinkedTestFailure,ME as clearActiveExtensionHooks,su as clearDurableGraphCache,fE as clearFocusedItem,__ as clearWorkspaceContractsCache,Qh as close,ku as closeItem,cg as closeTask,$c as coalesceRepeatedListFlags,Qv as collectBlockedByIds,eI as collectBlockedByIdsFromCorpus,Pw as collectContextUsageDeliveredItemIds,nl as collectDanglingDependencyReferences,rI as collectDependencyBlockedIds,rl as collectDuplicateDependencyRows,Jp as collectDuplicateRelationshipEdgeGroups,gk as collectErrorCauseCodes,Xd as collectHierarchyRelations,Er as collectMcpHeaderAnnotations,il as collectMissingDependencyTargetIds,Du as collectNewOrderingCycleWarnings,Wp as collectOrderingCycles,ol as collectOrderingStorageContradictions,cI as collectPackageContextIntentContracts,Ut as collectPackageExtensionDirectories,FE as collectRegisteredItemFieldNames,oS as collectRuntimeCreateFieldValues,eO as collectRuntimeFilterValues,nS as collectRuntimeUpdateFieldValues,Pm as collectSubtreeIds,Dn as collectUsedExtensionCapabilities,uC as commandOptionFlagLabel,ah as comments,U_ as commitImportedItem,ex as commitItemCompletion,Qk as commitItemMutations,SI as commitWorkspaceTransaction,Ys as compactFlagAliasContracts,Mm as compareCriticalItems,TO as comparePmDateVersions,TI as compareRelationshipSnapshots,OC as compareTimestampStrings,h0 as compileHistoryProvenanceMatcher,jw as composeContextIntentContracts,Ax as composeExtension,Mx as composeExtensionPackage,nI as computeActionabilityReport,vA as computeHistoryDiff,zp as computeRelationshipCentrality,qp as computeRelationshipDominators,Zl as computeWorkspaceGraphFingerprint,yh as config,PE as consumeAfterCommandAffectedItems,Q_ as context,Hw as contextIntentRowId,rg as copy,Fu as countFailureCategories,LS as countReadOutputRows,Yh as create,VP as createAssurancePreset,FM as createAssuranceWorkspaceContext,IC as createCheckpointId,xP as createCompleteListOptions,lE as createCoreCommandHookContext,Zr as createCorpusShapeMeasurement,sP as createEmptyAssuranceDocument,QC as createEmptyExtensionRegistrationRegistry,cv as createExtensionCommandError,js as createExtensionCommandSdk,xn as createExtensionContributionInventory,CN as createExtensionTestHarness,zi as createHistoryEntry,Nv as createLazyModule,RP as createLifecycleCompletenessPolicies,hL as createMcpStaticBearerVerifier,KN as createMcpTaskStore,$O as createMutationGuardSdk,SS as createOutputOmissionReceipt,us as createPmCliExpectedError,Us as createPmCliProgram,Pi as createPmCommandOutputBudget,yw as createQueryFingerprint,yb as createRelationshipGraphScaleFixture,J as createRelationshipGraphSnapshot,St as createRelationshipKindRegistry,Vd as createReproducibleProcessRunner,mk as createSearchCursorFingerprint,pE as createSerialQueue,aC as createStdinTokenResolver,FC as createUnknownSubcommandError,KT as createWorkflowPolicyEvaluator,Mf as createWorkspaceSnapshot,$x as deactivateExtensionForTest,B1 as declineServiceOverride,zw as decodeContextIntentCursor,xv as decodeHtmlEntitiesInOptions,Cr as decodeMcpHttpHeaderValue,Xw as decodePmTableRows,Ew as decodeQueryCursor,Tw as decodeQueryCursorEnvelope,Cw as decodeQueryCursorState,hw as decodeReadOutputContinuationCursor,Nx as decodeToon,CL as decoratePmMcpToolsWithApps,Tp as dedupeLinkedArtifacts,jE as defaultConfigScope,S0 as defaultScoreContextCandidates,W1 as defineAfterCommandHook,V1 as defineBeforeCommandHook,K1 as defineBeforeMutationHook,P1 as defineCommand,$1 as defineCommandOverride,K as defineCorpusShape,UL as defineEpisodeSpecification,H1 as defineExporter,Sx as defineExtension,wx as defineExtensionBlueprint,I1 as defineExtensionManifest,M1 as defineFlag,z1 as defineImporter,x1 as defineItemField,k1 as defineItemType,N1 as defineMigration,Jy as defineObservationContract,J1 as defineOnIndexHook,X1 as defineOnReadHook,Y1 as defineOnWriteHook,F1 as defineParserOverride,Mi as definePmCommandOutputBudget,$R as definePmCommandOutputEnvelope,xR as definePmErrorCodeCatalog,G1 as definePreflightOverride,R1 as defineProjectProfile,q1 as defineRendererOverride,L1 as defineSearchProvider,U1 as defineServiceOverride,D1 as defineVectorStoreAdapter,tb as defineVerdictContract,we as defineWorkspaceRecipe,og as deleteItem,$f as deleteWorkspaceSnapshot,zC as dependencyToRelationship,fh as deps,WP as deriveAssuranceProposals,xM as deriveClosureTimestamp,vx as deriveExtensionCapabilities,jk as deriveMutationTransactionId,VR as derivePmBulkMutationEffect,VD as derivePmRecoveryReferenceObligations,Kp as deriveRelationshipDeadlines,Ol as deriveSchemaEvolutionMigrationId,fv as deriveTelemetryCommandResolution,nO as describeAllowedTransitions,gP as describeExtensionActivation,Ix as describeExtensionBlueprint,LC as describeFlagScalarValueFailure,ym as describeItemOwnershipConflict,$s as describeItemRevisionChanges,GL as describeObservationCost,Yt as describeProfileComposition,Xt as describeProjectProfile,sx as describeReadCompletenessControls,dv as describeUnknownError,Jn as detectAgentIdentity,ti as detectHarnessIdentity,jp as detectRelationshipCommunities,Qn as diagnoseAgentIdentity,Zp as diffRelationshipAuditSnapshots,t_ as diffTestRunMeasurements,DN as digestMcpRequestParameters,aE as discoverExtensions,bn as discoverNearbyPmRoot,iF as discoverPmTools,EO as discoverProjectRuntimeVersionPins,mh as docs,sh as duplicates,ru as durableGraphCachePath,au as durableGraphCacheStatus,li as effectiveItemFormatVersion,Vv as emitTelemetryErrorEvent,G_ as emptyImportedDocument,iM as encodeItemScalarDecisionValue,Tr as encodeMcpHttpHeaderValue,Yw as encodePmTableRows,bw as encodeQueryCursor,_w as encodeReadOutputContinuationCursor,Lx as encodeToon,IA as enforceHistoryStreamPolicyForItem,RA as enforceHistoryStreamPolicyForItems,WI as enrichCliFlagInvocationContract,Rt as enrichCliFlagInvocationContracts,gO as ensureMaterializedHistoryTarget,gl as ensurePmGitignore,cp as ensureScope,sv as ensureSentryCommandTracing,iv as ensureSentryInit,F_ as ensureTrackerInitialized,Gp as enumerateRelationshipPaths,Ni as estimatePmOutputTokens,cP as evaluateAssuranceAssertion,dP as evaluateAssuranceGate,tR as evaluateBoundaryFixtures,_m as evaluateClaimActivity,v0 as evaluateContextRanking,sR as evaluateDefectGateEvidence,aP as evaluateMeasurement,bf as evaluateMetricFloors,hs as evaluateMutationGuard,Kf as evaluateProvenanceCoverage,h$ as evaluateReliabilityWindow,zf as evaluateSemanticAttributionCoverage,Rp as evaluateSimilarityGovernance,oO as evaluateTransition,rb as evaluateVerdictContract,VT as evaluateWorkflowPolicies,os as executeEmbeddingBatchesWithRetry,WO as executeVectorDelete,YO as executeVectorReset,KO as executeVectorUpsert,Ky as executeWorkspaceRecipe,hp as expandAddGlobEntries,Mp as explainSourceTraceability,ZM as exportAttestation,dg as extension,pg as extensionActivate,ug as extensionDeactivate,lg as extensionList,nT as extensionMigrate,wM as extractHistoryMergeReceiptDispositions,SM as extractHistoryMergeReceiptReferences,uL as extractMcpTraceContext,mO as extractPatchFailureContext,gu as extractReferencedPmItemIdsFromCommand,gb as federateRelationshipGraphSnapshots,lh as files,ph as filesDiscover,uh as filesLookup,Mw as finalizeContextUsageDelivery,mb as findCoverageDeficits,Ip as findDuplicateClusters,bl as findGitWorkspaceRoot,QE as findHistoryIdentityDiscontinuities,Pl as findInstalledNpmPackageCandidate,TL as findPmMcpAppByUri,No as findPmNamespacedCommand,Bp as findRedundantRelationshipEdges,Hp as findRelationshipCutStructure,Op as findSimilarItems,Hv as finishTelemetryCommand,fI as fitOutputEnvelope,NC as flattenFlagListValue,lb as flushTelemetryQueue,ig as focus,Up as forEachMatchedRelationshipEdge,Xp as formatDuplicateEdgeGroup,Qd as formatHierarchyRelation,Yp as formatOrderingStorageContradiction,GI as formatPmPositionalActionFlagTip,mf as formatProfileApplyHuman,uf as formatProfileLintHuman,lf as formatProfileListHuman,pf as formatProfileShowHuman,Rl as formatSchemaEvolutionMigrationHuman,Tk as formatVectorIndexRecoveryWarnings,Mk as formatWorkspacePositionHuman,qh as gc,Wi as generateItemId,rh as get,vE as getActiveCommandResult,Gw as getActiveContextIntentContracts,oi as getActiveExtensionRegistrations,fL as getActiveMcpTraceContext,pP as getAssuranceDeclaration,Ag as getContracts,uE as getFocusedItem,En as getHistoryPath,uI as getItemAt,Cn as getItemPath,bs as getMutationActionContract,hl as getPmGitignoreBlock,Tn as getSettingsPath,h_ as getWorkspaceContracts,MA as getWorkspaceHistoryPath,_h as graph,ou as graphAuditBaselinePath,Hf as groupHistoryByEpisode,j1 as handleServiceOverride,wN as hasMcpClientExtension,bL as hasPmMcpAppsCapability,Be as hasSubcommandFlagContractsForCommand,QO as hasVectorizationEmbeddingIdentityChanged,ZO as hasVectorizationVectorDimensionChanged,hA as hashDocument,gA as hashDocumentForVersion,yA as hashEmptyDocument,lA as hashHistoryPatch,dA as hashHistoryRecord,pA as hashHistoryStream,sM as hashItemScalarDecisionValue,Bh as health,Lp as hierarchyAncestors,Dp as hierarchyDescendants,Kh as historyCompact,Wh as historyCompactBulk,JE as historyDigest,_0 as historyEntryMatchesProvenance,CO as historyItemHashVersionForRuntime,zh as historyRedact,Hh as historyRepair,Vh as historyRepairAll,Zv as indexBlockedByIds,Zd as indexHierarchyRelations,ev as inferConsistentVectorDimension,Ri as inferPmOutputBudgetClass,gh as init,NP as inspectCompleteListResult,ZC as inspectExtensionManifestSchema,zl as inspectHistoryAuthorStream,vs as inspectInProgressWork,fM as inspectMergeReceiptEvidence,OO as inspectProjectRuntimeCompatibility,Is as inspectStaleInProgressItems,Rg as inspectStaticExtensionInventory,MM as inspectStatusRoleAssignments,kA as inspectWorkspaceHistoryState,kf as inspectWorkspaceSnapshot,Al as installMergeFence,ON as interpretMcpResultType,qm as isAlreadyClaimedError,uv as isCommanderError,dx as isCompatibleRecoveryFlag,ed as isErrnoError,Wv as isExternalDependencyReference,Yv as isExternalDependencySourceKind,me as isFileMissingError,Gi as isGenericRefusalRequired,Ui as isGenericRefusalWhy,KC as isHostOutputSuppressed,ps as isItemAlreadyExistsError,Fs as isItemRevisionConflict,nM as isItemScalarMissingValue,vv as isJudgeableHistoryRecord,TM as isLegacyMergeReceiptSummary,h as isMcpRecord,gs as isMutationAction,BC as isOrderingRelationshipKind,jA as isPlaceholderReferenceToken,is as isPmCliErrorDetails,ms as isPmCliExpectedError,tn as isPmExtensionCapabilityContract,on as isPmExtensionPolicyModeContract,nn as isPmExtensionPolicySurfaceContract,rn as isPmExtensionServiceNameContract,zR as isPmKnownExitCode,GR as isPmMutationReceipt,Ve as isPmSuccessfulExitCode,ds as isPmTokenBudgetRecovery,en as isPmToolAction,CM as isPreDurableCloneLocalReceiptSummary,EM as isPreDurableDispositionEligibleReference,AO as isProjectMutatingInvocation,Lv as isPureSnakeCaseAlias,pw as isReadOutputBudgetExceeded,qS as isReadOutputSessionReference,cx as isReadProjectionRecoveryFlag,lw as isReadResultOmittedForBudget,AS as isReadRowContract,Wd as isRuntimeRecord,aO as isSettingsReadFallback,um as isStartTransition,Fv as isTerminalPlanMode,sS as isTerminalStatus,Mn as isTimestampLiteral,QI as isWaiverNoticeDays,Ov as isWellFormedHistoryRecord,Vk as itemDocumentToMutationOptions,nk as itemHasSchedule,Nn as jaccardSimilarity,Pv as latestHistoryTimestamp,dh as learnings,DC as levenshteinDistanceWithinLimit,Jc as limitAnnotationEntries,Eu as linkedTestTrustFingerprint,Rx as lintExtensionBlueprint,eE as lintExtensionManifestSchema,Zt as lintProjectProfile,Z_ as list,Vn as listAgentProvenanceAdapters,Dc as listAliasPluralKeys,eh as listAllComplete,LO as listAllDocumentCandidatesCached,rs as listAllItemMetadata,DO as listAllItemMetadataLight,lP as listAssuranceDeclarations,hP as listAssuranceVerdicts,ib as listBuiltinCorpusShapes,gx as listCoreClosedDomainContracts,NI as listGetProjectionFields,ZP as listInvalidProvenanceHistoryStreamIds,MI as listListProjectionFields,_M as listMergeReceipts,ys as listMutationActions,Ok as listMutationEvents,_o as listPmCommandFlagBudgets,dl as listPmCommandsForFamily,cl as listPmCommandsForTier,Re as listPmFlagLexicon,w1 as listPmFlagSpellingInventory,ll as listPmMcpToolsForProfile,m1 as listPmRequiredArgumentRefusalContracts,f1 as listPmSubcommandRefusalContracts,Wt as listProfiles,g1 as listTrackerPreflightRecoveryContracts,Yk as listUpsertKeyCandidates,xf as listWorkspaceSnapshots,dI as loadContextIntentRuntimeLayers,tf as loadCreateTemplateOptions,cE as loadExtensions,du as loadGraphAuditBaseline,Xk as loadGuardedRuntimeSchema,PC as loadMutationCheckpoint,k as loadRelationshipGraphAdapter,es as locateItem,eC as looksLikeGenericKeyValueEntry,DS as mapReadOutputRows,hM as markMergeReceiptReconciled,tO as matchesRuntimeFilters,qv as maybeRunFirstUseTelemetryPrompt,cb as measureCorpusShapePlan,Xi as measureItemMetadataReadWork,JT as mergeAdditiveTags,Ox as mergeExtensionBlueprints,aM as mergeHistoryStreams,pM as mergeItemDocuments,uM as mergeJsonDocuments,Fc as mergeLinkedTestTwoTokenEntries,cM as mergeRelationshipEventStreams,$m as mergeSortedWarnings,$v as migrateItemFilesToFormat,UO as mutateItem,GO as mutateItemWithHistoryContext,LA as mutateWorkspaceJsonWithHistory,oh as next,Wn as normalizeAgentProvenanceAdapterValue,Xc as normalizeAnnotationTransportOptions,JR as normalizeAssuranceEvaluation,XR as normalizeAssuranceMutation,Gc as normalizeBootstrapInvocation,HE as normalizeBulkIdsValue,tl as normalizeDependencyGraphTarget,SR as normalizeDependencySeedId,ER as normalizeDependencySourceKind,kt as normalizeDirectExtensionCommandOptions,Ns as normalizeExpectedItemHash,kn as normalizeExtensionContributionInventory,hS as normalizeHistoryOperationForWrite,QP as normalizeInvalidHistoryProvenance,KI as normalizeItemAddressInvocation,pi as normalizeItemFormatVersion,Ki as normalizeItemId,_i as normalizeItemMetadata,wR as normalizeItemReference,Lc as normalizeLegacyExtensionActionSyntax,_p as normalizeLinkedPath,UA as normalizeParentReferenceValue,Vt as normalizeProfileName,Vi as normalizeRawItemId,sw as normalizeReadOutputIncludeModeOptions,EA as normalizeReplayPatchOps,Ts as normalizeSimilarityText,Sv as normalizeStaleWorkThresholdHours,iS as normalizeStatusForRegistry,fi as normalizeStatusInput,eS as normalizeStatusInputWithRegistry,pv as normalizeThrownExitCode,ch as notes,Pn as nowIso,nu as openDurableGraphCache,LN as openMcpRequestState,jL as openPmEpisode,$p as orderingPredecessors,Fp as orderingSuccessors,k0 as packContextCandidates,km as packRankedContextItems,Eg as packageActivate,Cg as packageCatalog,Sg as packageDeactivate,bg as packageDescribe,gg as packageDoctor,_g as packageInstall,mg as packageLifecycle,fg as packageList,yg as packageManage,iT as packageMigrate,Tg as packageReload,hg as packageUninstall,ww as paginateQueryRows,dp as parseAddEntries,lp as parseAddGlobEntries,Zc as parseAnnotationTextInput,Bk as parseAtomicMutationControls,xc as parseBootstrapCommandName,Pc as parseBootstrapGlobalOptions,kc as parseBootstrapHelpRequest,Uc as parseBootstrapTypeValue,zE as parseBulkIdsText,Im as parseContextDepth,wm as parseContextFocusFields,sI as parseContextIntentDeclarations,Rm as parseContextSections,D0 as parseContextSignalSnapshot,ZT as parseCsvKv,dR as parseDefectChangeRiskRequest,GM as parseDefectRecurrenceCoverageRequest,cR as parseDefectRecurrencePolicy,yf as parseEvalMetricFloors,Sf as parseEvalQuerySet,Ls as parseExpectHashSpecs,TC as parseExtensionLongFlagToken,uu as parseGraphSubcommand,QM as parseHistoryAttestation,m0 as parseHistoryProvenanceFilters,lR as parseIntegerLimit,aS as parseItemDocument,qk as parseItemMutationBatch,QA as parseLimit,Ju as parseLinkedTestAssertionEqualsMap,Qu as parseLinkedTestAssertionGteMap,Hu as parseLinkedTestBoolean,Vu as parseLinkedTestContextMode,zu as parseLinkedTestEnvClear,qu as parseLinkedTestEnvSet,Zu as parseLinkedTestJsonEntries,Xu as parseLinkedTestMinLines,Yu as parseLinkedTestRegexList,Wu as parseLinkedTestStringList,Ku as parseLinkedTestWorkspaceContextMode,Gg as parseMcpCachePolicy,Pg as parseMcpImplementation,Ze as parseMcpInputRequests,dr as parseMcpInputResponses,dy as parseMcpSubscriptionFilter,up as parseMigrateEntries,mR as parseMultiValueFilter,UR as parseMutationReceipt,dC as parseOptionalNonNegativeInteger,cC as parseOptionalNumber,FD as parsePmAgentTaskTranscriptCorpus,nF as parsePmToolDiscoveryOptions,pR as parsePriority,hR as parsePriorityFilterSet,VS as parseReadOutputSession,GE as parseRegisteredItemFieldAssignments,se as parseRelationshipGraphSnapshot,pp as parseRemoveEntries,Pp as parseSourceLineRange,WA as parseStatusFilterCsv,fR as parseStringFilterSet,sn as parseTags,Zf as parseTestRunMeasurements,uR as parseType,_R as parseTypeFilterSet,Wl as parseUnknownAuthorHistoryEventCoordinates,UT as parseWorkflowPolicy,jT as parseWorkflowPolicyDocument,Q0 as partitionDecisionEntries,OA as patchPathToChangedField,an as pathExists,ag as pauseTask,iu as persistDurableGraphResult,sO as persistSelectedItemFormat,UP as planAgentIdentityVocabularyMutation,B0 as planCompletedAtBackfill,Ll as planExtensionDirectoryCopy,Ex as planItemMutationDocument,er as planProfileApplication,BD as planRelationshipEventBackfill,pu as planRelationshipRemediation,vl as planSchemaEvolutionMigration,Vl as planUnknownAuthorHistoryAcknowledgment,Nf as planWorkspaceSnapshotRestore,BI as positionalShapeKey,qI as positionalSignatureKey,xx as preflightExtension,Es as prepareSimilarityText,oC as preserveMutationStdinTokenFields,rC as preserveMutationStdinTokenLiterals,Cx as previewItemMutationDocument,Jk as previewItemMutations,nA as printError,oA as printResult,Dh as profile,Gh as profileApply,Uh as profileLint,$h as profileList,Fh as profileShow,RE as projectAfterCommandItemSnapshot,Am as projectContextFocusRows,Jf as projectFleetAttributionAnalytics,f0 as projectHistoryProvenance,qi as projectLeanRecoveryPayload,ap as projectLinkedCollectionMutation,Jw as projectPmBriefListEnvelope,Qw as projectPmBriefSearchEnvelope,cs as projectPmCliErrorContextDetails,ss as projectPmCliErrorDetails,Di as projectPmDiagnosticOutput,$i as projectPmDiagnosticText,Yf as projectProvenanceCoverageAnalytics,Ou as projectValidateCounts,XP as promoteAssuranceAssertion,Rw as propagateContextUsageServingReceipt,aD as pruneCompileCacheGenerations,uP as putAssuranceDeclaration,mP as putAssuranceDeclarationBundle,IO as queryItemMetadataIndex,RO as queryLinkedFileMetadataIndex,PO as querySimilarItemMetadataIndex,e_ as queryTestRunMeasurementsBelow,wn as quoteCommandArg,Sn as quoteWindowsCommandArg,_x as rankCommandPaths,Qc as readAnnotationEntries,Zn as readAuthorEnvironment,y_ as readBooleanOption,Dw as readContextUsageAffinity,b_ as readCsvListOption,qs as readExtensionMigrationState,cn as readFileIfExists,Kc as readFirstStringFromCommanderOptions,Wc as readFirstValueFromCommanderOptions,Vf as readHistoryAnalyticsWindow,gS as readHistoryEntries,bi as readHistorySnapshot,Gf as readImprovementLedger,xO as readItemMetadataDerivedIndexState,Ds as readItemRevision,rx as readItemTransaction,kv as readLatestHistoryActivity,ts as readLocatedItem,NS as readOutputBudgetCollections,fw as readOutputCollectionFingerprint,xS as readOutputContinuationRowCollections,MS as readOutputContinuationRowPaths,nw as readOutputIncludeModeOptions,BS as readOutputRetainsTail,kS as readOutputRowCollections,PS as readOutputRowPaths,YS as readOutputSessionRemainingTokens,Gt as readPmPackageManifest,f_ as readRequiredString,rS as readRuntimeFieldOptionValue,Yi as readSettings,jv as readSettingsSection,cO as readSettingsWithMetadata,Yc as readStringArrayFromCommanderOptions,g_ as readStringOption,lv as readThrownExitCode,tv as readVectorizationStatusLedger,yO as readWorkflowPolicies,BT as readWorkflowPolicyField,aI as readWorkspaceContextIntentContracts,U0 as readWorkspaceContextSignals,H0 as readWorkspaceMemory,Pk as readWorkspacePosition,wI as readWorkspaceTransaction,AA as reanchorHistoryEntries,y$ as reconcileArtifactLedgers,$n as reconcileExtensionCapabilityUsage,$A as reconcileWorkspaceJsonHistory,IE as recordAfterCommandAffectedItem,_P as recordAssuranceVerdict,om as recordClaimSemanticAttribution,xw as recordContextUsageDelivery,kw as recordContextUsageServing,Nw as recordContextUsageTouch,Lw as recordContextUsageTouches,im as recordFocusSemanticAttribution,Ff as recordImprovementObservation,nm as recordReleaseSemanticAttribution,Rv as recordedBaselineActivity,Mv as recordedPrefixActivity,In as redactUrlCredentialsInText,vn as redactUrlCredentialsInToken,NO as refreshItemMetadataDerivedIndex,Sl as refreshMergeAttributeFenceIfInstalled,GS as refreshReadOutputDeliveredCounts,ov as refreshSearchArtifactsForMutation,Kn as registerAgentProvenanceAdapters,TR as registerExternalDependencyResolver,Hn as registerHarnessSignalDescriptors,yS as registerOutputMaterialFieldGroups,tg as release,FS as rememberReadOutputFocusRows,fP as removeAssuranceDeclaration,dn as removeFileIfExists,Sp as renameArtifactsResultKey,Tm as renderCalendarMarkdown,Cm as renderCalendarToon,Fm as renderContextMarkdown,xl as renderExtensionDescribeMarkdown,Ml as renderExtensionSurfaceMarkdown,q_ as renderGuideMarkdown,ux as renderMissingOptionRetry,Z0 as renderNextMarkdown,yx as renderPmClosedDomainHelp,An as renderPmCommand,Fo as renderPmCommandAliasMigrationHint,ml as renderPmCommandVisibilityMarkdown,O1 as renderPmFlagLexiconMarkdown,EL as renderPmMcpAppHtml,t1 as renderPmRefusalClosureCensusMarkdown,XA as renderRowsAsCsv,JA as renderRowsAsTable,Jh as reopen,hO as replayHistoryToTarget,TA as replayToCanonicalItemDocument,bA as replayToItemDocument,_S as requireHistoryOperation,n0 as requireTerminalReason,i0 as requireTerminalReasonWithRecovery,fA as resealHistoryRewrite,wE as resetActiveExtensionRuntimeState,rp as resetWorkspaceGraphCache,Gn as resolveAgentSessionContextFromSignals,nd as resolveAnnotationIndex,td as resolveAnnotationInput,hE as resolveAuthor,ri as resolveAuthorIdentity,GA as resolveBodyFileContent,sb as resolveBuiltinCorpusShape,bm as resolveCalendarOutputFormat,NR as resolveCanonicalPmErrorCodeContract,jC as resolveCanonicalRelationshipKind,_E as resolveClaimPrincipal,VE as resolveCliBulkIdsInput,_C as resolveCommandOptionPolicyState,sD as resolveCompileCacheGeneration,j0 as resolveCompletionTimestamp,XC as resolveConfiguredPmPackageRoot,OR as resolveContentFieldFilters,Bw as resolveContextIntentContract,Om as resolveContextOutputFormat,vm as resolveContextTokenBudget,a0 as resolveCreateExplicitEmptyFlag,Ms as resolveDeclaredBlockers,dk as resolveEffectiveSearchMode,jO as resolveEmbeddingProviders,Mt as resolveExtensionFlagOptionKey,xC as resolveExtensionFlagValueContract,Dl as resolveExtensionInstallSourceIdentity,CC as resolveExtensionLongFlagName,Bs as resolveExtensionMigrationStatePath,sE as resolveExtensionRoots,CR as resolveExternalDependencyReference,kC as resolveFlagValueKind,yC as resolveGlobalPmRoot,j_ as resolveGuideOutputFormat,Uf as resolveHistoryEpisodeGroupIdentity,XE as resolveHistoryHashAlgorithm,fS as resolveHistoryOperation,u0 as resolveHistoryProvenanceDimensions,Kv as resolveHistorySubject,fO as resolveHistoryTarget,pk as resolveHybridSemanticWeight,yn as resolveImplicitPmRoot,vC as resolveIsoOrRelative,tI as resolveItemBlockers,Xv as resolveItemExecutionRole,Hk as resolveItemMutationDocument,gm as resolveItemOwnershipActivity,hm as resolveItemOwnershipConflict,gn as resolveItemTypeRegistry,ZE as resolveItemTypesFilePath,Os as resolveLastActivityAt,nx as resolveLifecycleVerbRecovery,bC as resolveLinkedResourcePositionalRecovery,l_ as resolveLinkedTestFailureExitCode,yu as resolveLinkedTestSourceRef,bu as resolveLinkedTestSourceWorkspaceRoot,Su as resolveLinkedTestTrust,wu as resolveLinkedTestTrustBatch,ly as resolveMcpAcknowledgedSubscriptionFilter,Ye as resolveMcpRequestContext,yl as resolveMergeInstallContext,mx as resolveMisnestedCommandPath,AR as resolveMissingMetadataFilters,px as resolveMissingOptionPlaceholder,wS as resolveModePairedOutputOmissionReceipt,X0 as resolveNextOutputFormat,vS as resolveOutputOmissionReceipt,YC as resolvePmCliVersion,$o as resolvePmCommandAlias,ze as resolvePmCommandCapabilityFamily,Lt as resolvePmCommandExitContract,N as resolvePmCommandOperation,xi as resolvePmCommandOutputBudget,Nt as resolvePmCommandOutputEnvelope,$I as resolvePmCommandPositionalContract,Rn as resolvePmCommandScopeArgs,He as resolvePmCommandVisibilityTier,Li as resolvePmDiagnosticOutputBudget,LR as resolvePmErrorCodeContract,Zb as resolvePmFlagSemanticConcept,xe as resolvePmHistoryOperation,RN as resolvePmMcpExecutableInvocation,WC as resolvePmPackageRootFromModule,FI as resolvePmPositionalActionContract,Ic as resolvePmPositionalActionFlagContracts,$e as resolvePmRoot,xd as resolvePmToolCustomFieldCollision,zA as resolvePriority,Kt as resolveProfile,Cl as resolveProjectMergeTypeFolders,Sw as resolveQueryCursorStart,ix as resolveReadCompletenessControls,ax as resolveReadOptionRetryArgs,aw as resolveReadOutputDimensions,uw as resolveReadOutputEncoding,US as resolveReadOutputRecoveryBudget,ew as resolveReadOutputSurface,OS as resolveReadRowContract,lx as resolveRecoveryCommandName,BE as resolveRegisteredSearchProvider,qE as resolveRegisteredVectorStoreAdapter,Hd as resolveReproducibleProcessEnvironment,ai as resolveRuntimeFieldRegistry,si as resolveRuntimeStatusRegistry,BO as resolveSearchCorpusFields,ck as resolveSearchMaxResults,fk as resolveSearchPage,lk as resolveSearchScoreThreshold,uk as resolveSearchTuning,zO as resolveSemanticCorpusCharacterLimit,rm as resolveSemanticLineageIds,lO as resolveSettingsWithSemanticRuntimeDefaults,TP as resolveSourceContextWritePolicy,dm as resolveStartTaskInProgressStatus,Z as resolveSubcommandFlagContractsForCommand,LT as resolveTelemetryErrorCategory,nv as resolveTelemetrySourceAttribution,o0 as resolveTerminalReason,Wk as resolveTransactionSchema,fC as resolveTypeDefinition,mC as resolveTypeName,YA as resolveTypeSynonym,rO as resolveTypeWorkflows,Kl as resolveUnknownAuthorAcknowledgmentSelector,bk as resolveVectorIndexRecovery,VO as resolveVectorStores,Yd as resolveWorkspaceRelationshipKindRegistry,gC as resolveWorkspaceRoot,ng as restore,MC as restoreCheckpointItems,FA as restoreWorkspaceJsonFromHistory,Df as restoreWorkspaceSnapshot,Lf as restoreWorkspaceSnapshotWithRecovery,ip as reviseLinkedNote,vg as runAction,kE as runActiveBeforeMutationHooks,NE as runActiveCommandHandler,xE as runActiveOnIndexHooks,ii as runActiveOnReadHooks,ni as runActiveOnWriteHooks,LE as runActiveParserOverride,DE as runActivePreflightOverride,$E as runActiveServiceOverride,Sm as runActivity,iE as runAfterCommandHooks,ff as runAggregate,od as runAnnotationCommand,Mu as runAppend,qM as runAssuranceAction,zM as runAssuranceDispatch,nE as runBeforeCommandHooks,Em as runCalendar,zm as runClaim,Hm as runClaimNext,xu as runClose,Nu as runCloseMany,Ym as runCloseTask,id as runComments,z_ as runCompletion,Jl as runConfig,qt as runContext,P0 as runContextEvaluationCorpus,I0 as runContextEvaluationScenario,Lu as runCopy,em as runCreate,tm as runDelete,op as runDeps,wp as runDocs,zP as runDuplicates,Af as runEval,vf as runEvent,$l as runExtension,Vs as runExtensionMigrateAction,Hs as runExtensionMigrations,kp as runFiles,Np as runFilesDiscover,xp as runFilesLookup,Xf as runFleetAttributionAnalytics,cm as runFocus,Ru as runGc,_f as runGet,mu as runGraph,B_ as runGuide,_u as runHealth,ak as runHistory,t0 as runHistoryAttest,VM as runHistoryCompact,YM as runHistoryCompactBulk,OM as runHistoryMaintenance,XM as runHistoryRedact,IM as runHistoryRepair,PM as runHistoryRepairAll,ql as runInit,Ul as runInitAgentGuidance,sd as runLearnings,Ep as runLinkedArtifacts,p_ as runLinkedTests,sl as runList,Of as runMeet,Sk as runMergeDriver,wl as runMergeInstall,yM as runMergeReceiptEvidenceReport,gM as runMergeReceiptReport,wk as runMergeReconcile,jm as runNext,ad as runNotes,Wm as runPauseTask,Jm as runPlan,df as runProfileApply,cf as runProfileLint,sf as runProfileList,af as runProfileShow,Wf as runProvenanceCoverageAnalytics,Fx as runRegisteredCommandForTest,qx as runRegisteredCommandOverrideForTest,Xx as runRegisteredExporterForTest,Ux as runRegisteredHookForTest,Yx as runRegisteredImporterForTest,Wx as runRegisteredMigrationForTest,Gx as runRegisteredMutationGuardForTest,jx as runRegisteredParserOverrideForTest,Bx as runRegisteredPreflightOverrideForTest,zx as runRegisteredRendererOverrideForTest,Vx as runRegisteredSearchProviderForTest,Hx as runRegisteredServiceOverrideForTest,Kx as runRegisteredVectorStoreAdapterForTest,tr as runReindex,Vm as runRelease,If as runRemind,d0 as runReopen,Qm as runRestore,Il as runSchemaEvolutionMigration,hf as runSearch,db as runSearchRefreshWorkerEntrypoint,H_ as runStartBackgroundRun,Km as runStartTask,r_ as runStats,n_ as runTelemetry,of as runTemplatesList,rf as runTemplatesSave,nf as runTemplatesShow,u_ as runTest,m_ as runTestAll,V_ as runTestRunsList,W_ as runTestRunsLogs,X_ as runTestRunsResume,K_ as runTestRunsStatus,Y_ as runTestRunsStop,J_ as runTestRunsWorker,fm as runUpdate,Zm as runUpdateMany,jt as runUpgrade,Iu as runValidate,Og as runWithActiveExtensions,L as runWithAgentSessionContext,iO as runWithConfigurationOnlySettings,Uw as runWithContextIntentContracts,lI as runWithDiscoveredContextIntentContracts,Yn as runWithHarnessDetectionSignals,mL as runWithMcpTraceContext,Kd as runWithReproducibleProcessEnvironment,Xn as runWithWorkspaceHarnessSignalDescriptors,Hr as runWithWorkspaceRecipe,PP as runWorkflowPolicyAction,HM as runWorkspaceTransactionGc,lu as saveGraphAuditBaseline,NM as scanClosureTimestamps,JP as scanExtensionHostVersions,Hl as scanHistoryAuthorAttribution,Rs as scanInProgressWork,mi as scanItemFormatVersions,_s as scanMutationSecrets,eM as scanProvenanceResolverHealth,Ps as scanStaleInProgressItems,$M as scanStorageIntegrity,bh as schema,Oh as schemaAddField,wh as schemaAddStatus,Eh as schemaAddType,Ph as schemaApplyPreset,Mh as schemaInferTypes,Th as schemaList,Ih as schemaListFields,Nh as schemaRemapStatus,vh as schemaRemoveField,Ah as schemaRemoveStatus,Sh as schemaRemoveType,xh as schemaRenameField,kh as schemaRenameType,Ch as schemaShow,Rh as schemaShowField,Lh as schemaShowStatus,fx as scoreCommandPathMatch,w0 as scoreContextCandidates,A0 as scoreContextCandidatesWithActiveExtensions,Ss as scoreItemSimilarity,_1 as scorePmGrammarRefusalClosure,n1 as scorePmRefusalClosure,ws as scorePreparedItemSimilarity,y1 as scoreTrackerPreflightRecoveryClosure,uA as sealHistoryRecord,NN as sealMcpRequestState,th as search,W0 as searchWorkspaceMemory,Y0 as searchWorkspaceMemoryReadResult,oI as selectActionableEntries,gw as selectCursorSemanticOptions,$_ as selectImportAuthor,cL as selectMcpClientRegistrationMode,K0 as selectWorkspaceMemory,V0 as selectWorkspaceMemoryRollups,am as semanticAttributionAffinity,bv as sentryCaptureCliError,gv as sentryDiscardCommandSpan,yv as sentryFinishCommandSpan,Cv as sentryFlush,Tv as sentryLogCliUsageError,_v as sentrySetCommandContext,hv as sentryStartCommandSpan,gi as serializeItemDocument,bx as serializeNdjsonRows,Tx as serializeNdjsonStream,Qy as serveDeclaredObservation,AE as setActiveCommandContext,OE as setActiveCommandResult,yE as setActiveExtensionCommands,gE as setActiveExtensionHooks,bE as setActiveExtensionParsers,TE as setActiveExtensionPreflight,SE as setActiveExtensionRegistrations,EE as setActiveExtensionRenderers,CE as setActiveExtensionServices,mE as setFocusedItem,Uv as settingsSectionRevision,Gv as shouldCompletePlanOnClose,cu as shouldPersistDurableGraphCache,sC as shouldResolveMutationStdinTokenField,iC as shouldResolveMutationStdinTokens,uO as shouldRunSearchRefreshInForeground,Ap as similarityAdvisoryWarnings,RS as sliceReadOutputRowCollection,as as snapshotPmCliErrorContext,bp as sortLinkedArtifacts,eR as sortWaiverNotices,YT as splitAcceptanceCriteria,Dv as splitCommaList,hi as splitFrontMatter,cw as stabilizeReadOutputReceiptEstimates,I as stableStringify,zk as stableUpsertValue,DT as stableValueEquals,Av as staleEligibleAt,wO as stampRequiredItemFormat,sg as startTask,zv as startTelemetryCommand,ih as stats,tS as statusIsTerminal,Mc as stripGlobalBootstrapTokens,vk as subscribeMutationEventBatches,Ik as subscribeMutationEvents,GP as summarizeAgentIdentityVocabulary,Bf as summarizeAgentModelProvenance,qf as summarizeAgentProvenance,R0 as summarizeContextEvaluationReports,a_ as summarizeContextPreflight,g0 as summarizeHistoryProvenance,jl as summarizeInitResult,mM as summarizeMergeReceipt,c0 as supportsCreateExplicitEmpty,VI as supportsItemIdAlias,VC as suppressHostOutput,Oe as syncRelationshipGraphAdapter,Px as synthesizeExtensionManifest,Rc as toCompletionFlagString,Dm as toContextFocusItem,xm as toContextPackingSummary,Nm as toContextRankingSummary,SC as toErrorMessage,C_ as toEstimatedMinutesValue,Fk as toExtensionFlagDefinitions,O_ as toImportBoolean,P_ as toImportConfidence,L_ as toImportDeferredFields,A_ as toImportInteger,N_ as toImportLinkedDocs,x_ as toImportLinkedFiles,D_ as toImportLinkedTests,k_ as toImportLogEntries,M_ as toImportNormalizedEnum,R_ as toImportNumberMap,E_ as toImportPriority,w_ as toImportStatus,v_ as toImportStringList,I_ as toImportStringMap,S_ as toImportTags,cS as toItemRecord,T_ as toNonEmptyImportString,EC as toNonEmptyStringOrUndefined,CA as toReplayDocument,Zw as toWellFormedText,Cs as tokenizeSimilarityText,nC as transferMutationStdinTokenPolicy,rE as translateHostEnvironmentFault,Iv as unprovenClaimActivity,Xh as update,i_ as updateLinkedTest,wg as upgrade,jh as validate,oP as validateAssertionDefinition,iP as validateAssuranceDocument,nP as validateGateDefinition,Kk as validateItemMutationRows,Cp as validateLinkedPaths,dL as validateMcpAuthorizationResponseIssuer,aL as validateMcpAuthorizationServerMetadata,lL as validateMcpClientMetadataDocument,ZN as validateMcpHttpRequestHeaders,FN as validateMcpJsonSchema,rP as validateMeasurementDefinition,BA as validateMissingParentReference,ow as validateReadOutputOptions,KA as validateSprintOrReleaseValue,hC as validateTypeOptions,EI as validateWorkspaceTransactionIdentity,e0 as verifyAttestation,YI as verifyCliFlagInvocationParity,jI as verifyExplicitPositionalSlotCensus,wA as verifyHistoryChain,SA as verifyHistoryChainWithVersion,pI as verifyHistoryEntries,mA as verifyHistoryRecordHash,_A as verifyHistoryRewriteEvidence,HI as verifyPmCliGrammar,zI as verifyPmCommandPositionalContracts,A1 as verifyPmFlagLexicon,YD as verifyPmRecoveryKindRuntimeCoverage,qb as verifyPmRecoveryProducerRuntimeCoverage,WD as verifyPmRecoveryReferences,ZD as verifyPmRefusalClosureIdentityRatchet,QD as verifyPmRefusalClosureRatchet,KD as verifyPmRefusalReachability,fd as verifyToolOptionCliParity,ZI as waiverNoticeFor,wv as wholeHoursSince,HA as withCliMutationInput,Gs as withExpectedItemRevisions,Ws as withFlagAliasMetadata,oE as withHostEnvironmentBoundary,VA as withLiteralMutationInput,$N as withMcpCachePolicy,ji as withoutGenericRefusalExamples,zT as workflowApprovalFingerprint,HT as workflowPolicyApplies,qT as workflowPolicyFingerprint,tp as workspaceGraphCache,AI as workspaceTransactionPlanDigest,rd as wrapOwnershipConflict,mv as wrapThrownErrorForSentry,ei as writeAuthorEnvironment,De as writeFileAtomic,RC as writeMutationCheckpoint,dO as writeSettings,Bv as writeSettingsSection,rA as writeStderr,tA as writeStdout,rv as writeVectorizationStatusLedger,DA as writeWorkspaceJsonWithHistory,sp as writtenLinkedEntries};
|
|
35
35
|
//# sourceMappingURL=sdk.js.map
|