@unbrained/pm-cli 2026.12.1 → 2026.12.2
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/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-CWPR234D.js → chunk-7NAO7I75.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YQMQOUO.js → chunk-7V65VACG.js} +52 -52
- package/dist/cli-bundle/chunks/{chunk-NA6D75V5.js → chunk-G6TARHFK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YSVOXCYH.js → chunk-GOEQXVOI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OKEJ4U2I.js → chunk-ROTEELDL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-U7RBJGLF.js → chunk-SDXCJZKB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XME6GIFQ.js → chunk-TKUG2X24.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q6GLSAJY.js → chunk-UNBW2LF3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-V2S4XAX3.js +2 -0
- package/dist/cli-bundle/chunks/{item-transaction-66RDV7PH.js → item-transaction-56J5OCHA.js} +2 -2
- package/dist/cli-bundle/chunks/{linked-resource-value-list-E2DX52LY.js → linked-resource-value-list-ZBIY4H23.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-2F6JUBST.js → register-mutation-EK6DVIQK.js} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-ET3UKPYK.js → register-operations-6MURXE4V.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-I63QTFCU.js → register-setup-RW26X3GJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SQ72CVUH.js → chunk-3COWDIPX.js} +54 -54
- package/dist/cli-bundle/focused-chunks/{chunk-PT7RT3T6.js → chunk-J72TRWR5.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{item-transaction-2K4SFLJ7.js → item-transaction-LQLQLZE7.js} +2 -2
- package/dist/cli-bundle/main.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-merge.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 +1 -1
- package/dist/sdk/extension/install-sources.d.ts +2 -2
- package/dist/sdk/extension/install-sources.js +5 -5
- package/marketplace.json +1 -1
- package/node_modules/tar/README.md +1792 -1147
- package/node_modules/tar/dist/commonjs/bytes.d.ts +21 -0
- package/node_modules/tar/dist/commonjs/bytes.js +83 -0
- package/node_modules/tar/dist/commonjs/codec.d.ts +53 -0
- package/node_modules/tar/dist/commonjs/codec.js +35 -0
- package/node_modules/tar/dist/commonjs/concat.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/concat.js +20 -0
- package/node_modules/tar/dist/commonjs/create.d.ts +39 -2
- package/node_modules/tar/dist/commonjs/create.js +150 -64
- package/node_modules/tar/dist/commonjs/dealias.d.ts +79 -0
- package/node_modules/tar/dist/commonjs/dealias.js +50 -0
- package/node_modules/tar/dist/commonjs/delete.d.ts +19 -0
- package/node_modules/tar/dist/commonjs/delete.js +121 -0
- package/node_modules/tar/dist/commonjs/entries.d.ts +82 -0
- package/node_modules/tar/dist/commonjs/entries.js +398 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts +14 -2
- package/node_modules/tar/dist/commonjs/extract.js +40 -81
- package/node_modules/tar/dist/commonjs/fs.d.ts +201 -0
- package/node_modules/tar/dist/commonjs/fs.js +5 -0
- package/node_modules/tar/dist/commonjs/header.d.ts +4 -4
- package/node_modules/tar/dist/commonjs/header.js +71 -53
- package/node_modules/tar/dist/commonjs/index.d.ts +25 -18
- package/node_modules/tar/dist/commonjs/index.js +46 -18
- package/node_modules/tar/dist/commonjs/index.min.js +2 -3
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +2 -2
- package/node_modules/tar/dist/commonjs/large-numbers.js +4 -4
- package/node_modules/tar/dist/commonjs/list.d.ts +23 -6
- package/node_modules/tar/dist/commonjs/list.js +99 -138
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +16 -11
- package/node_modules/tar/dist/commonjs/mkdir.js +121 -159
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +9 -0
- package/node_modules/tar/dist/commonjs/options.d.ts +284 -513
- package/node_modules/tar/dist/commonjs/options.js +20 -61
- package/node_modules/tar/dist/commonjs/pack.d.ts +150 -96
- package/node_modules/tar/dist/commonjs/pack.js +752 -445
- package/node_modules/tar/dist/commonjs/parser.d.ts +98 -0
- package/node_modules/tar/dist/commonjs/parser.js +452 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +17 -7
- package/node_modules/tar/dist/commonjs/path-reservations.js +110 -140
- package/node_modules/tar/dist/commonjs/path.d.ts +19 -0
- package/node_modules/tar/dist/commonjs/path.js +90 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts +3 -1
- package/node_modules/tar/dist/commonjs/pax.js +67 -36
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +97 -11
- package/node_modules/tar/dist/commonjs/read-entry.js +251 -97
- package/node_modules/tar/dist/commonjs/read-file.d.ts +22 -0
- package/node_modules/tar/dist/commonjs/read-file.js +104 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts +45 -1
- package/node_modules/tar/dist/commonjs/replace.js +164 -211
- package/node_modules/tar/dist/commonjs/server/codecs.d.ts +38 -0
- package/node_modules/tar/dist/commonjs/server/codecs.js +252 -0
- package/node_modules/tar/dist/commonjs/server/index.d.ts +115 -0
- package/node_modules/tar/dist/commonjs/server/index.js +166 -0
- package/node_modules/tar/dist/commonjs/server/index.min.js +3 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +8 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +17 -20
- package/node_modules/tar/dist/commonjs/to-stream.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/to-stream.js +22 -0
- package/node_modules/tar/dist/commonjs/types.d.ts +4 -3
- package/node_modules/tar/dist/commonjs/types.js +4 -3
- package/node_modules/tar/dist/commonjs/unpack.d.ts +143 -89
- package/node_modules/tar/dist/commonjs/unpack.js +780 -725
- package/node_modules/tar/dist/commonjs/update.d.ts +11 -1
- package/node_modules/tar/dist/commonjs/update.js +37 -28
- package/node_modules/tar/dist/commonjs/warn.d.ts +27 -0
- package/node_modules/tar/dist/commonjs/warn.js +36 -0
- package/node_modules/tar/dist/commonjs/win32-path.d.ts +16 -0
- package/node_modules/tar/dist/commonjs/win32-path.js +67 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +64 -111
- package/node_modules/tar/dist/commonjs/write-entry.js +108 -672
- package/node_modules/tar/dist/commonjs/write-flag.d.ts +18 -0
- package/node_modules/tar/dist/commonjs/write-flag.js +29 -0
- package/node_modules/tar/dist/esm/bytes.d.ts +21 -0
- package/node_modules/tar/dist/esm/bytes.js +72 -0
- package/node_modules/tar/dist/esm/codec.d.ts +53 -0
- package/node_modules/tar/dist/esm/codec.js +32 -0
- package/node_modules/tar/dist/esm/concat.d.ts +3 -0
- package/node_modules/tar/dist/esm/concat.js +16 -0
- package/node_modules/tar/dist/esm/create.d.ts +39 -2
- package/node_modules/tar/dist/esm/create.js +144 -61
- package/node_modules/tar/dist/esm/dealias.d.ts +79 -0
- package/node_modules/tar/dist/esm/dealias.js +46 -0
- package/node_modules/tar/dist/esm/delete.d.ts +19 -0
- package/node_modules/tar/dist/esm/delete.js +117 -0
- package/node_modules/tar/dist/esm/entries.d.ts +82 -0
- package/node_modules/tar/dist/esm/entries.js +388 -0
- package/node_modules/tar/dist/esm/extract.d.ts +14 -2
- package/node_modules/tar/dist/esm/extract.js +37 -44
- package/node_modules/tar/dist/esm/fs.d.ts +201 -0
- package/node_modules/tar/dist/esm/fs.js +4 -0
- package/node_modules/tar/dist/esm/header.d.ts +4 -4
- package/node_modules/tar/dist/esm/header.js +71 -53
- package/node_modules/tar/dist/esm/index.d.ts +25 -18
- package/node_modules/tar/dist/esm/index.js +23 -18
- package/node_modules/tar/dist/esm/index.min.js +2 -3
- package/node_modules/tar/dist/esm/large-numbers.d.ts +2 -2
- package/node_modules/tar/dist/esm/large-numbers.js +4 -4
- package/node_modules/tar/dist/esm/list.d.ts +23 -6
- package/node_modules/tar/dist/esm/list.js +96 -101
- package/node_modules/tar/dist/esm/mkdir.d.ts +16 -11
- package/node_modules/tar/dist/esm/mkdir.js +119 -154
- package/node_modules/tar/dist/esm/normalize-unicode.js +9 -0
- package/node_modules/tar/dist/esm/options.d.ts +284 -513
- package/node_modules/tar/dist/esm/options.js +17 -51
- package/node_modules/tar/dist/esm/pack.d.ts +150 -96
- package/node_modules/tar/dist/esm/pack.js +750 -441
- package/node_modules/tar/dist/esm/parser.d.ts +98 -0
- package/node_modules/tar/dist/esm/parser.js +448 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts +17 -7
- package/node_modules/tar/dist/esm/path-reservations.js +110 -140
- package/node_modules/tar/dist/esm/path.d.ts +19 -0
- package/node_modules/tar/dist/esm/path.js +80 -0
- package/node_modules/tar/dist/esm/pax.d.ts +3 -1
- package/node_modules/tar/dist/esm/pax.js +66 -35
- package/node_modules/tar/dist/esm/read-entry.d.ts +97 -11
- package/node_modules/tar/dist/esm/read-entry.js +248 -96
- package/node_modules/tar/dist/esm/read-file.d.ts +22 -0
- package/node_modules/tar/dist/esm/read-file.js +99 -0
- package/node_modules/tar/dist/esm/replace.d.ts +45 -1
- package/node_modules/tar/dist/esm/replace.js +160 -207
- package/node_modules/tar/dist/esm/server/codecs.d.ts +38 -0
- package/node_modules/tar/dist/esm/server/codecs.js +214 -0
- package/node_modules/tar/dist/esm/server/index.d.ts +115 -0
- package/node_modules/tar/dist/esm/server/index.js +102 -0
- package/node_modules/tar/dist/esm/server/index.min.js +3 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +8 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +17 -20
- package/node_modules/tar/dist/esm/to-stream.d.ts +7 -0
- package/node_modules/tar/dist/esm/to-stream.js +18 -0
- package/node_modules/tar/dist/esm/types.d.ts +4 -3
- package/node_modules/tar/dist/esm/types.js +4 -3
- package/node_modules/tar/dist/esm/unpack.d.ts +143 -89
- package/node_modules/tar/dist/esm/unpack.js +776 -719
- package/node_modules/tar/dist/esm/update.d.ts +11 -1
- package/node_modules/tar/dist/esm/update.js +35 -28
- package/node_modules/tar/dist/esm/warn.d.ts +27 -0
- package/node_modules/tar/dist/esm/warn.js +31 -0
- package/node_modules/tar/dist/esm/win32-path.d.ts +16 -0
- package/node_modules/tar/dist/esm/win32-path.js +60 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts +64 -111
- package/node_modules/tar/dist/esm/write-entry.js +107 -633
- package/node_modules/tar/dist/esm/write-flag.d.ts +18 -0
- package/node_modules/tar/dist/esm/write-flag.js +25 -0
- package/node_modules/tar/package.json +68 -224
- package/package.json +2 -2
- package/packages/pm-beads/package.json +1 -1
- 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/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-AJLU6KLW.js +0 -2
- package/node_modules/@isaacs/fs-minipass/LICENSE +0 -15
- package/node_modules/@isaacs/fs-minipass/README.md +0 -71
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +0 -118
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +0 -430
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +0 -3
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +0 -118
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +0 -420
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +0 -3
- package/node_modules/@isaacs/fs-minipass/package.json +0 -72
- package/node_modules/chownr/LICENSE.md +0 -63
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/dist/commonjs/index.d.ts +0 -3
- package/node_modules/chownr/dist/commonjs/index.js +0 -93
- package/node_modules/chownr/dist/commonjs/package.json +0 -3
- package/node_modules/chownr/dist/esm/index.d.ts +0 -3
- package/node_modules/chownr/dist/esm/index.js +0 -85
- package/node_modules/chownr/dist/esm/package.json +0 -3
- package/node_modules/chownr/package.json +0 -69
- package/node_modules/minipass/LICENSE.md +0 -55
- package/node_modules/minipass/README.md +0 -825
- package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
- package/node_modules/minipass/dist/commonjs/index.js +0 -1038
- package/node_modules/minipass/dist/commonjs/package.json +0 -3
- package/node_modules/minipass/dist/esm/index.d.ts +0 -545
- package/node_modules/minipass/dist/esm/index.js +0 -1020
- package/node_modules/minipass/dist/esm/package.json +0 -3
- package/node_modules/minipass/package.json +0 -77
- package/node_modules/minizlib/LICENSE +0 -26
- package/node_modules/minizlib/README.md +0 -64
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +0 -2
- package/node_modules/minizlib/dist/commonjs/constants.js +0 -123
- package/node_modules/minizlib/dist/commonjs/index.d.ts +0 -99
- package/node_modules/minizlib/dist/commonjs/index.js +0 -416
- package/node_modules/minizlib/dist/commonjs/package.json +0 -3
- package/node_modules/minizlib/dist/esm/constants.d.ts +0 -2
- package/node_modules/minizlib/dist/esm/constants.js +0 -117
- package/node_modules/minizlib/dist/esm/index.d.ts +0 -99
- package/node_modules/minizlib/dist/esm/index.js +0 -363
- package/node_modules/minizlib/dist/esm/package.json +0 -3
- package/node_modules/minizlib/package.json +0 -80
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/get-write-flag.js +0 -32
- package/node_modules/tar/dist/commonjs/make-command.d.ts +0 -49
- package/node_modules/tar/dist/commonjs/make-command.js +0 -52
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +0 -12
- package/node_modules/tar/dist/commonjs/parse.d.ts +0 -92
- package/node_modules/tar/dist/commonjs/parse.js +0 -655
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/process-umask.js +0 -7
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +0 -24
- package/node_modules/tar/dist/commonjs/warn-method.js +0 -31
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +0 -2
- package/node_modules/tar/dist/esm/get-write-flag.js +0 -26
- package/node_modules/tar/dist/esm/make-command.d.ts +0 -49
- package/node_modules/tar/dist/esm/make-command.js +0 -48
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +0 -2
- package/node_modules/tar/dist/esm/normalize-windows-path.js +0 -9
- package/node_modules/tar/dist/esm/parse.d.ts +0 -92
- package/node_modules/tar/dist/esm/parse.js +0 -651
- package/node_modules/tar/dist/esm/process-umask.d.ts +0 -2
- package/node_modules/tar/dist/esm/process-umask.js +0 -3
- package/node_modules/tar/dist/esm/warn-method.d.ts +0 -24
- package/node_modules/tar/dist/esm/warn-method.js +0 -27
- package/node_modules/yallist/LICENSE.md +0 -63
- package/node_modules/yallist/README.md +0 -205
- package/node_modules/yallist/dist/commonjs/index.d.ts +0 -39
- package/node_modules/yallist/dist/commonjs/index.js +0 -384
- package/node_modules/yallist/dist/commonjs/package.json +0 -3
- package/node_modules/yallist/dist/esm/index.d.ts +0 -39
- package/node_modules/yallist/dist/esm/index.js +0 -379
- package/node_modules/yallist/dist/esm/package.json +0 -3
- package/node_modules/yallist/package.json +0 -68
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$a as Dc,$b as Dd,Aa as Zb,Ab as cd,Ac as ce,Ba as _b,Bb as dd,Ca as $b,Cb as ed,Da as ac,Db as fd,Ea as bc,Eb as gd,Fa as cc,Fb as hd,Ga as dc,Gb as id,Ha as ec,Hb as jd,Ia as fc,Ib as kd,Ja as gc,Jb as ld,Ka as hc,Kb as md,La as ic,Lb as nd,Ma as jc,Mb as od,Na as kc,Nb as pd,Oa as lc,Ob as qd,Pa as mc,Pb as rd,Qa as nc,Qb as sd,R as Gb,Ra as oc,Rb as td,S as Hb,Sa as pc,Sb as ud,T as Ib,Ta as qc,Tb as vd,U as Jb,Ua as rc,Ub as wd,Va as sc,Vb as xd,Wa as yc,Wb as yd,Xa as zc,Xb as zd,Ya as Ac,Yb as Ad,Za as Bc,Zb as Bd,_a as Cc,_b as Cd,ab as Ec,ac as Ed,bb as Fc,bc as Fd,cb as Gc,cc as Gd,db as Hc,dc as Hd,eb as Ic,ec as Id,fb as Jc,fc as Jd,gb as Kc,gc as Kd,hb as Lc,hc as Ld,ia as Ob,ib as Mc,ic as Md,ja as Pb,jb as Nc,jc as Nd,kb as Oc,kc as Od,lb as Pc,lc as Pd,mb as Qc,mc as Qd,n as db,nb as Rc,nc as Rd,o as eb,ob as Sc,oc as Sd,p as fb,pb as Tc,pc as Td,q as gb,qb as Uc,qc as Ud,r as hb,ra as Qb,rb as Vc,rc as Vd,sa as Rb,sb as Wc,sc as Wd,ta as Sb,tb as Xc,tc as Xd,ua as Tb,ub as Yc,uc as Yd,va as Ub,vb as Zc,vc as Zd,w as pb,wa as Vb,wb as _c,wc as _d,x as qb,xa as Wb,xb as $c,xc as $d,y as rb,ya as Xb,yb as ad,yc as ae,z as tb,za as Yb,zb as bd,zc as be}from"./chunks/chunk-
|
|
1
|
+
import{$a as Dc,$b as Dd,Aa as Zb,Ab as cd,Ac as ce,Ba as _b,Bb as dd,Ca as $b,Cb as ed,Da as ac,Db as fd,Ea as bc,Eb as gd,Fa as cc,Fb as hd,Ga as dc,Gb as id,Ha as ec,Hb as jd,Ia as fc,Ib as kd,Ja as gc,Jb as ld,Ka as hc,Kb as md,La as ic,Lb as nd,Ma as jc,Mb as od,Na as kc,Nb as pd,Oa as lc,Ob as qd,Pa as mc,Pb as rd,Qa as nc,Qb as sd,R as Gb,Ra as oc,Rb as td,S as Hb,Sa as pc,Sb as ud,T as Ib,Ta as qc,Tb as vd,U as Jb,Ua as rc,Ub as wd,Va as sc,Vb as xd,Wa as yc,Wb as yd,Xa as zc,Xb as zd,Ya as Ac,Yb as Ad,Za as Bc,Zb as Bd,_a as Cc,_b as Cd,ab as Ec,ac as Ed,bb as Fc,bc as Fd,cb as Gc,cc as Gd,db as Hc,dc as Hd,eb as Ic,ec as Id,fb as Jc,fc as Jd,gb as Kc,gc as Kd,hb as Lc,hc as Ld,ia as Ob,ib as Mc,ic as Md,ja as Pb,jb as Nc,jc as Nd,kb as Oc,kc as Od,lb as Pc,lc as Pd,mb as Qc,mc as Qd,n as db,nb as Rc,nc as Rd,o as eb,ob as Sc,oc as Sd,p as fb,pb as Tc,pc as Td,q as gb,qb as Uc,qc as Ud,r as hb,ra as Qb,rb as Vc,rc as Vd,sa as Rb,sb as Wc,sc as Wd,ta as Sb,tb as Xc,tc as Xd,ua as Tb,ub as Yc,uc as Yd,va as Ub,vb as Zc,vc as Zd,w as pb,wa as Vb,wb as _c,wc as _d,x as qb,xa as Wb,xb as $c,xc as $d,y as rb,ya as Xb,yb as ad,yc as ae,z as tb,za as Yb,zb as bd,zc as be}from"./chunks/chunk-ROTEELDL.js";import"./chunks/chunk-G6TARHFK.js";import{L as Mb,m as Fb,n as Kb,u as Lb}from"./chunks/chunk-SY5C3U32.js";import{$c as uc,Nb as jb,Ob as kb,Pb as lb,Rb as mb,Tb as nb,Ub as ob,Uc as Nb,Xa as ib,_c as tc,ad as vc,bd as wc,cd as xc,jc as sb,rc as Cb,sc as Db,tc as Eb}from"./chunks/chunk-SDXCJZKB.js";import{Ab as ub,Bb as vb,Cb as wb,Db as xb,Jc as zb,Kc as Ab,Oc as Bb,U as Va,sc as yb}from"./chunks/chunk-ZL6J6JYT.js";import"./chunks/chunk-X5D5YUHR.js";import"./chunks/chunk-4QA5O64H.js";import"./chunks/chunk-L2ZSSMYY.js";import"./chunks/chunk-GOEQXVOI.js";import{s as _a,t as $a,v as ab,w as bb,x as cb}from"./chunks/chunk-7V65VACG.js";import"./chunks/chunk-3HKPVOAN.js";import"./chunks/chunk-6H36ZHMI.js";import"./chunks/chunk-Q6K7HWZ7.js";import{a as Wa,b as Xa,e as Ya,f as Za}from"./chunks/chunk-OGVSGXQX.js";import"./chunks/chunk-AA52P34H.js";import"./chunks/chunk-C6WM6ZN4.js";import"./chunks/chunk-QDV7S2QS.js";import"./chunks/chunk-AHV3CSQG.js";import"./chunks/chunk-PZA7QECY.js";import{Mc as Sa,Nc as Ta,Pc as Ua,Za as Fa,bc as Ka,cc as La,dc as Ma,ec as Na,fa as za,ga as Aa,gc as Oa,ha as Ba,i as n,ic as Pa,kc as Qa,lc as Ra,mb as Ga,nb as Ha,oa as Ca,pa as Da,pb as Ia,qb as Ja}from"./chunks/chunk-CBUC4X7Q.js";import{u as Ea}from"./chunks/chunk-OXC5KBIQ.js";import"./chunks/chunk-3AZOATC2.js";import{$c as da,Aa as L,Ba as M,Ca as N,Da as O,Ea as P,Ga as Q,Sa as R,Ta as S,Va as T,Wa as U,Xg as wa,Yc as aa,Zc as ba,_c as ca,a as c,ad as ea,b as d,bd as fa,c as e,cd as ga,d as f,dd as ha,e as g,ed as ia,f as h,fb as V,fd as ja,g as i,gb as W,gd as ka,gh as xa,h as j,hd as la,hf as ua,i as k,id as ma,if as va,j as l,jc as X,jd as na,k as m,kc as Y,kd as oa,kh as ya,lc as Z,ld as pa,mc as _,md as qa,nd as ra,od as sa,pd as ta,xa as J,ya as K,yc as $}from"./chunks/chunk-NRQCBUYD.js";import{g as z,m as A,o as B,r as C,s as D,u as E}from"./chunks/chunk-GSLOAEY2.js";import"./chunks/chunk-WSEIEDEK.js";import"./chunks/chunk-A5ZEMOVR.js";import{Q as F,R as G}from"./chunks/chunk-I4SPJQQI.js";import{a as s,b as t,ba as H,c as u,da as I,h as v,j as w,k as x,l as y}from"./chunks/chunk-TE6FBDHP.js";import{A as a,C as b,E as o,H as p,L as q,N as r}from"./chunks/chunk-K672XXGQ.js";import"./chunks/chunk-XAWE4EAK.js";export{J as BASELINE_ITEM_FORMAT_VERSION,s as BUILTIN_ITEM_TYPE_VALUES,y as CONFIDENCE_TEXT_VALUES,yb as CONTEXT_OUTPUT_VALUES,K as CURRENT_ITEM_FORMAT_VERSION,jb as DEFAULT_TERMINAL_TRANSITION_POLICY,v as DEPENDENCY_KIND_VALUES,a as EXIT_CODE,X as HISTORY_EVENT_CLASSIFICATION_VERSION,x as ISSUE_SEVERITY_VALUES,t as ITEM_TYPE_VALUES,Y as MAINTENANCE_HISTORY_OPERATIONS,d as MAX_WORKFLOW_POLICIES,e as MAX_WORKFLOW_POLICY_TERMS,Ab as NEXT_OUTPUT_VALUES,Ka as PM_CLI_ERROR_DETAILS_LIMITS,Pa as PM_CLI_EXPECTED_ERROR_NAME,ia as PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,da as PM_DIAGNOSTIC_DEGRADATION_STEPS,ea as PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,ca as PM_DIAGNOSTIC_OUTPUT_CLASSES,oa as PM_GENERIC_REFUSAL_GUIDANCE,Xa as PM_GITIGNORE_END,Wa as PM_GITIGNORE_START,ba as PM_OUTPUT_BUDGET_CLASSES,aa as PM_OUTPUT_DEGRADATION_STEPS,sa as PM_RECOVERY_ECHO_FIELDS,b as PmCliError,yc as PmClient,db as PmCompleteListValidationError,w as RISK_VALUES,Qb as SEARCH_EXTENSION_FLAG_DEFINITIONS,u as STATUS_VALUES,Z as SUBSTANTIVE_HISTORY_OPERATIONS,c as WORKFLOW_POLICY_ACTIONS,$a as WORKFLOW_POLICY_DOCUMENT_SCHEMA,_a as WORKFLOW_POLICY_SCHEMA,V as acquireLock,W as acquireLockLease,Fc as aggregate,ce as analyzeSdkActionCoverage,Rc as append,va as appendHistoryEntry,mb as applyTerminalOrderingPolicy,hb as assertCompleteListResult,ab as buildWorkflowCompletenessCheck,U as canonicalDocument,gb as certifyCompleteListResult,Ad as claim,Bd as claimNext,_ as classifyHistoryEvent,N as classifyItemFormatVersion,Pb as clearWorkspaceContractsCache,zd as close,nb as closeItem,Jd as closeTask,Ic as comments,nc as commitImportedItem,Tc as config,zc as context,Dd as copy,wd as create,eb as createCompleteListOptions,ua as createHistoryEntry,bb as createLifecycleCompletenessPolicies,Qa as createPmCliExpectedError,ga as createPmCommandOutputBudget,m as createWorkflowPolicyEvaluator,ha as definePmCommandOutputBudget,Ed as deleteItem,Pc as deps,Oc as docs,Hc as duplicates,L as effectiveItemFormatVersion,mc as emptyImportedDocument,Za as ensurePmGitignore,lc as ensureTrackerInitialized,ka as estimatePmOutputTokens,l as evaluateWorkflowPolicies,Kd as extension,Md as extensionActivate,Nd as extensionDeactivate,Ld as extensionList,Lc as files,Mc as filesDiscover,Nc as filesLookup,Gd as focus,qd as gc,Ba as generateItemId,Dc as get,wa as getActiveExtensionRegistrations,_d as getContracts,E as getHistoryPath,D as getItemPath,Ya as getPmGitignoreBlock,C as getSettingsPath,Rb as getWorkspaceContracts,Qc as graph,pd as health,ud as historyCompact,vd as historyCompactBulk,rd as historyRedact,sd as historyRepair,td as historyRepairAll,fa as inferPmOutputBudgetClass,Sc as init,fb as inspectCompleteListResult,pa as isGenericRefusalRequired,qa as isGenericRefusalWhy,La as isPmCliErrorDetails,Ra as isPmCliExpectedError,Q as isTerminalStatus,G as isTimestampLiteral,$ as jaccardSimilarity,Kc as learnings,Ac as list,Bc as listAllComplete,Ia as listAllItemMetadata,Ja as listAllItemMetadataLight,Gb as loadCreateTemplateOptions,Ga as locateItem,Ec as next,M as normalizeItemFormatVersion,Aa as normalizeItemId,R as normalizeItemMetadata,za as normalizeRawItemId,Sa as normalizeSimilarityText,P as normalizeStatusInput,Jc as notes,F as nowIso,Xd as packageActivate,Wd as packageCatalog,Yd as packageDeactivate,Ud as packageDescribe,Sd as packageDoctor,Qd as packageInstall,Od as packageLifecycle,Pd as packageList,Td as packageManage,Vd as packageReload,Rd as packageUninstall,n as parseTags,f as parseWorkflowPolicy,g as parseWorkflowPolicyDocument,o as pathExists,Id as pauseTask,jd as profile,md as profileApply,nd as profileLint,kd as profileList,ld as profileShow,ta as projectLeanRecoveryPayload,Oa as projectPmCliErrorContextDetails,Ma as projectPmCliErrorDetails,ma as projectPmDiagnosticOutput,na as projectPmDiagnosticText,Tb as readBooleanOption,Ub as readCsvListOption,p as readFileIfExists,Ha as readLocatedItem,Ob as readRequiredString,Ea as readSettings,Sb as readStringOption,Fa as readWorkflowPolicies,h as readWorkflowPolicyField,Cd as release,r as removeFileIfExists,vb as renderCalendarMarkdown,wb as renderCalendarToon,qc as renderGuideMarkdown,yd as reopen,lb as requireTerminalReason,ub as resolveCalendarOutputFormat,oc as resolveGuideOutputFormat,A as resolveImplicitPmRoot,z as resolveItemTypeRegistry,ja as resolvePmCommandOutputBudget,la as resolvePmDiagnosticOutputBudget,B as resolvePmRoot,I as resolveRuntimeFieldRegistry,H as resolveRuntimeStatusRegistry,kb as resolveTerminalReason,Fd as restore,be as runAction,ya as runActiveOnReadHooks,xa as runActiveOnWriteHooks,Kb as runAggregate,xb as runCalendar,ob as runClose,Eb as runCloseTask,rc as runCompletion,zb as runContext,pb as runCopy,qb as runDelete,ib as runDuplicates,rb as runFocus,Lb as runGet,pc as runGuide,ae as runInActiveExtensionScope,Va as runList,Bb as runNext,Db as runPauseTask,sc as runReindex,tb as runReopen,Fb as runRestore,Mb as runSearch,Cb as runStartTask,Nb as runStats,Ib as runTemplatesList,Hb as runTemplatesSave,Jb as runTemplatesShow,tc as runTestRunsList,vc as runTestRunsLogs,xc as runTestRunsResume,uc as runTestRunsStatus,wc as runTestRunsStop,sb as runUpdate,$d as runWithActiveExtensions,cb as runWorkflowPolicyAction,O as scanItemFormatVersions,Uc as schema,$c as schemaAddField,Zc as schemaAddStatus,Xc as schemaAddType,dd as schemaApplyPreset,ed as schemaInferTypes,Vc as schemaList,bd as schemaListFields,hd as schemaRemapStatus,ad as schemaRemoveField,_c as schemaRemoveStatus,Yc as schemaRemoveType,gd as schemaRenameField,fd as schemaRenameType,Wc as schemaShow,cd as schemaShowField,id as schemaShowStatus,Ua as scoreItemSimilarity,Cc as search,kc as selectImportAuthor,T as serializeItemDocument,Na as snapshotPmCliErrorContext,S as splitFrontMatter,Hd as startTask,Gc as stats,Wb as toEstimatedMinutesValue,$b as toImportBoolean,dc as toImportConfidence,ic as toImportDeferredFields,_b as toImportInteger,hc as toImportLinkedDocs,gc as toImportLinkedFiles,jc as toImportLinkedTests,fc as toImportLogEntries,ec as toImportNormalizedEnum,cc as toImportNumberMap,Xb as toImportPriority,Zb as toImportStatus,ac as toImportStringList,bc as toImportStringMap,Yb as toImportTags,Vb as toNonEmptyImportString,Ta as tokenizeSimilarityText,xd as update,Zd as upgrade,od as validate,Ca as withCliMutationInput,Da as withLiteralMutationInput,ra as withoutGenericRefusalExamples,j as workflowApprovalFingerprint,k as workflowPolicyApplies,i as workflowPolicyFingerprint,q as writeFileAtomic};
|
|
2
2
|
//# sourceMappingURL=sdk-runtime.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as t,B as u,C as v,D as w,E as x,F as y,G as z,H as A,I as B,J as C,K as D,L as E,M as F,N as G,O as H,P as I,Q as J,R as K,S as L,T as M,U as N,V as O,W as P,X as Q,Y as R,Z as S,_ as T,f as c,g as d,l as e,m as f,n as g,o as h,p as i,q as j,r as k,s as l,t as m,u as n,v as o,w as p,x as q,y as r,z as s}from"./chunks/chunk-
|
|
1
|
+
import{A as t,B as u,C as v,D as w,E as x,F as y,G as z,H as A,I as B,J as C,K as D,L as E,M as F,N as G,O as H,P as I,Q as J,R as K,S as L,T as M,U as N,V as O,W as P,X as Q,Y as R,Z as S,_ as T,f as c,g as d,l as e,m as f,n as g,o as h,p as i,q as j,r as k,s as l,t as m,u as n,v as o,w as p,x as q,y as r,z as s}from"./chunks/chunk-TKUG2X24.js";import"./chunks/chunk-ROTEELDL.js";import"./chunks/chunk-G6TARHFK.js";import"./chunks/chunk-SY5C3U32.js";import"./chunks/chunk-SDXCJZKB.js";import"./chunks/chunk-ZL6J6JYT.js";import"./chunks/chunk-X5D5YUHR.js";import"./chunks/chunk-4QA5O64H.js";import"./chunks/chunk-L2ZSSMYY.js";import"./chunks/chunk-GOEQXVOI.js";import{la as b,n as a}from"./chunks/chunk-7V65VACG.js";import"./chunks/chunk-3HKPVOAN.js";import"./chunks/chunk-6H36ZHMI.js";import"./chunks/chunk-Q6K7HWZ7.js";import"./chunks/chunk-OGVSGXQX.js";import"./chunks/chunk-AA52P34H.js";import"./chunks/chunk-C6WM6ZN4.js";import"./chunks/chunk-QDV7S2QS.js";import"./chunks/chunk-AHV3CSQG.js";import"./chunks/chunk-PZA7QECY.js";import"./chunks/chunk-CBUC4X7Q.js";import"./chunks/chunk-OXC5KBIQ.js";import"./chunks/chunk-3AZOATC2.js";import"./chunks/chunk-NRQCBUYD.js";import"./chunks/chunk-GSLOAEY2.js";import"./chunks/chunk-WSEIEDEK.js";import"./chunks/chunk-A5ZEMOVR.js";import"./chunks/chunk-I4SPJQQI.js";import"./chunks/chunk-TE6FBDHP.js";import"./chunks/chunk-K672XXGQ.js";import"./chunks/chunk-XAWE4EAK.js";export{e as activateExtensionForTest,M as assertExtensionBlueprint,L as assertExtensionCapabilityUsage,t as assertExtensionDeactivated,P as assertExtensionManifestCompatible,O as assertExtensionManifestMatchesBlueprint,Q as assertExtensionPreflight,u as assertPackageManifest,N as assertProjectProfile,v as assertRegisteredCommandContract,F as assertRegisteredCommandOverride,B as assertRegisteredExporter,w as assertRegisteredFlags,x as assertRegisteredHook,A as assertRegisteredImporter,C as assertRegisteredItemField,D as assertRegisteredItemType,K as assertRegisteredMigration,G as assertRegisteredParserOverride,H as assertRegisteredPreflightOverride,E as assertRegisteredProfile,I as assertRegisteredRendererOverride,y as assertRegisteredSearchProvider,J as assertRegisteredServiceOverride,z as assertRegisteredVectorStoreAdapter,R as createExtensionTestHarness,f as deactivateExtensionForTest,S as decodeToon,a as describeExtensionActivation,c as describeExtensionBlueprint,T as encodeToon,d as lintExtensionBlueprint,b as renderExtensionSurfaceMarkdown,g as runRegisteredCommandForTest,l as runRegisteredCommandOverrideForTest,s as runRegisteredExporterForTest,i as runRegisteredHookForTest,r as runRegisteredImporterForTest,q as runRegisteredMigrationForTest,h as runRegisteredMutationGuardForTest,j as runRegisteredParserOverrideForTest,k as runRegisteredPreflightOverrideForTest,m as runRegisteredRendererOverrideForTest,o as runRegisteredSearchProviderForTest,n as runRegisteredServiceOverrideForTest,p as runRegisteredVectorStoreAdapterForTest};
|
|
2
2
|
//# sourceMappingURL=sdk-testing.js.map
|
package/dist/cli-bundle/sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as Bg}from"./chunks/chunk-3KEMIPKG.js";import{a as vN,b as kN,c as NN,d as LN}from"./chunks/chunk-4YYFY33T.js";import{a as $N,b as DN}from"./chunks/chunk-CWPR234D.js";import{b as rN,c as nN,d as oN,e as iN,f as sN,g as aN,h as cN,i as dN,j as pN,k as lN,l as uN,m as mN,n as fN,o as _N,p as hN,q as gN,r as CN}from"./chunks/chunk-Q6GLSAJY.js";import{a as kc,b as _d,c as hd,d as gd,e as Cd,f as yd,g as yN,h as SN,i as TN,j as EN,k as AN,l as xN,m as bN,n as wN,o as ON,p as RN,q as PN,r as MN,s as IN}from"./chunks/chunk-OBPO6V7H.js";import{a as aP,b as cP,c as Uc,d as jc,e as Bc,g as qc,h as zc,i as Hc,j as Vc,k as Kc,l as Wc,m as Yc,p as Xc}from"./chunks/chunk-MZZ4ZJ5Z.js";import{A as p0,B as l0,C as u0,D as m0,E as f0,F as _0,G as h0,H as g0,I as C0,J as y0,K as S0,L as T0,M as E0,N as A0,O as x0,P as b0,Q as w0,R as O0,S as R0,T as P0,U as M0,V as I0,W as v0,X as k0,Y as N0,Z as L0,_ as $0,a as FN,b as GN,c as UN,d as jN,e as BN,f as qN,g as zN,h as HN,i as VN,j as KN,k as WN,l as YN,m as XN,n as JN,o as QN,p as ZN,q as e0,r as t0,s as r0,t as n0,u as o0,v as i0,w as s0,x as a0,y as c0,z as d0}from"./chunks/chunk-XME6GIFQ.js";import{$ as Af,$a as fh,$b as fg,A as Ke,Aa as $_,Ab as jh,Ac as jg,B as cf,Ba as D_,Bb as Bh,C as df,Ca as F_,Cb as qh,D as lf,Da as G_,Db as zh,E as uf,Ea as U_,Eb as Hh,F as Ht,Fa as j_,Fb as Vh,G as Vt,Ga as B_,Gb as Kh,H as Kt,Ha as q_,Hb as Wh,I as Wt,Ia as z_,Ib as Yh,J as Yt,Ja as H_,Jb as Xh,K as Xt,Ka as V_,Kb as Jh,L as Jt,La as K_,Lb as Qh,M as Qt,Ma as W_,Mb as Zh,N as Zt,Na as Y_,Nb as eg,O as er,Oa as X_,Ob as tg,P as tr,Pa as J_,Pb as rg,Q as mf,Qa as Q_,Qb as ng,R as ff,Ra as Z_,Rb as og,S as _f,Sa as eh,Sb as ig,T as hf,Ta as th,Tb as sg,U as gf,Ua as rh,Ub as ag,V as We,Va as rr,Vb as cg,W as Cf,Wa as _e,Wb as dg,X as yf,Xa as ph,Xb as pg,Y as Sf,Ya as lh,Yb as lg,Z as Tf,Za as uh,Zb as ug,_ as Ef,_a as mh,_b as mg,a as GR,aa as xf,ab as _h,ac as _g,b as UR,ba as bf,bb as hh,bc as hg,c as jR,ca as Dk,cb as gh,cc as gg,d as BR,da as Fk,db as Ch,dc as Cg,e as qR,ea as Gk,eb as yh,ec as yg,f as zR,fa as Ff,fb as Sh,fc as Sg,g as KR,ga as Gf,gb as Th,gc as Tg,h as WR,ha as Uf,hb as Eh,hc as Eg,i as YR,ia as w_,ib as Ah,ic as Ag,j as XR,ja as O_,jb as xh,jc as xg,k as Nc,ka as Wk,kb as bh,kc as bg,la as Yk,lb as wh,lc as wg,m as VM,ma as Xk,mb as Oh,mc as Og,n as KM,na as Jk,nb as Rh,nc as Rg,o as WM,oa as Qk,ob as Ph,oc as Pg,p as YM,pa as Zk,pb as Mh,pc as Mg,q as XM,qa as eN,qb as Ih,qc as Ig,r as JM,ra as tN,rb as vh,rc as vg,s as ol,sa as R_,sb as kh,sc as kg,t as Gu,ta as P_,tb as Nh,tc as Ng,u as Uu,ua as M_,ub as Lh,uc as Lg,v as qu,va as I_,vb as $h,vc as $g,w as zu,wa as v_,wb as Dh,wc as Dg,x as pm,xa as k_,xb as Fh,xc as Fg,y as gm,ya as N_,yb as Gh,yc as Gg,z as xv,za as L_,zb as Uh,zc as Ug}from"./chunks/chunk-OKEJ4U2I.js";import{e as eI,f as tI,g as il,h as sl,i as Bt}from"./chunks/chunk-NA6D75V5.js";import{A as wk,B as Ok,C as Rk,D as Pk,E as Mk,F as Ik,G as vk,H as kk,I as Nk,J as Lk,K as $k,L as Rf,M as Pf,N as Mf,O as If,P as vf,Q as kf,R as Nf,S as Lf,T as $f,U as Df,a as av,b as cv,c as dv,d as pv,e as lv,f as Fu,g as uv,h as mv,i as fv,j as _v,k as hv,m as pf,n as wf,o as _k,p as hk,q as gk,r as Ck,s as yk,t as Sk,u as Of,v as Tk,w as Ek,x as Ak,y as xk,z as bk}from"./chunks/chunk-SY5C3U32.js";import{$ as rM,$a as jl,$b as dm,$c as ih,Aa as OM,Ab as QI,Ac as Kf,Ba as RM,Bb as Nu,Bc as Wf,C as ze,Ca as PM,Cb as Lu,Cc as Yf,D as ee,Da as MM,Db as $u,Dc as Hk,E as fp,Ea as IM,Eb as ZI,Ec as Vk,Fb as ev,Fc as Kk,Gb as tv,Gc as Xf,H as He,Ha as QM,Hb as rv,Hc as Jf,I as _p,Ia as ZM,Ib as nv,Ic as Qf,J as hp,Ja as Jp,Jb as ov,Jc as Zf,Ka as Qp,Kb as iv,Kc as e_,L as fe,La as Zp,Lb as sv,Lc as t_,M as gp,Ma as el,Mb as Du,Mc as r_,N as Cp,Na as tl,Nb as gv,Nc as n_,O as yp,Oa as rl,Ob as Cv,Oc as o_,P as Sp,Pa as nl,Pb as yv,Pc as i_,Q as KP,Qa as vl,Qb as Sv,Qc as s_,R as WP,Ra as kl,Rb as Tv,Rc as a_,S as YP,Sa as oI,Sc as c_,T as XP,Ta as Nl,Tb as ju,Tc as d_,U as JP,Ua as Ll,Ub as Bu,Uc as f_,V as Nt,Va as $l,Vb as Hu,Vc as __,W as QP,Wa as Dl,Wb as Vu,X as ZP,Xa as iI,Xc as h_,Y as Lt,Ya as Fl,Yc as b_,Z as eM,Za as Gl,Zb as Ev,Zc as nh,_ as tM,_a as Ul,_b as Av,_c as oh,a as dP,aa as nM,ab as Bl,ac as Cm,ad as sh,b as Mt,ba as oM,bb as sI,bc as ym,bd as ah,c as pP,ca as Ve,cb as aI,cc as Sm,cd as ch,d as sd,da as iM,db as cI,dc as Tm,dd as dh,e as ad,ea as $t,eb as dI,ec as Em,f as cd,fa as sM,fb as pI,g as dd,ga as aM,gb as lI,h as pd,ha as cM,hb as uI,ia as dM,ib as hI,j as ld,ja as pM,jb as Eu,jc as Am,k as ud,ka as lM,kb as gI,la as uM,lb as NI,lc as Zm,ma as mM,mb as LI,mc as ef,na as fM,nb as $I,nc as tf,o as md,oa as _M,ob as DI,p as fd,pa as hM,pb as FI,pc as rf,qa as gM,qb as GI,qc as nf,ra as CM,rb as UI,rc as of,sa as yM,sb as VI,sc as sf,ta as SM,tb as KI,tc as af,ua as TM,ub as Au,uc as jf,va as EM,vb as xu,vc as Bf,w as vt,wa as AM,wb as WI,wc as qf,xa as xM,xb as YI,xc as zf,y as kt,ya as bM,yb as XI,yc as Hf,za as wM,zb as JI,zc as Vf}from"./chunks/chunk-U7RBJGLF.js";import{$a as RI,$b as Vv,A as GP,Aa as fu,Ab as Pm,Ac as Bm,B as rp,Ba as _u,Bb as Mm,Bc as qm,C as np,Ca as hu,Cb as Im,Cc as zm,D as op,Da as gu,Db as vm,Dc as Hm,E as ip,Ea as Cu,Eb as wv,Ec as Vm,F as sp,Fa as yu,Fb as Ov,Fc as Km,G as ap,Ga as Su,Gb as Rv,Gc as Wm,H as cp,Ha as Tu,Hb as Pv,Hc as Ym,I as dp,Ib as Mv,Ic as Xm,J as pp,Jb as Iv,Jc as zt,K as lp,Kb as vv,Kc as Jm,L as up,La as mI,Lc as lk,M as qe,Ma as fI,Mb as km,Mc as uk,N as UP,Na as _I,Nb as Nm,Nc as mk,O as jP,Oa as CI,Ob as kv,Oc as Qm,P as BP,Pa as yI,Pb as Nv,Pc as fk,Q as qP,Qa as SI,Qb as Lv,Qc as Uk,R as zP,Ra as TI,Rb as $v,Rc as jk,S as HP,Sa as EI,Sb as Dv,Sc as Bk,T as VP,Ta as AI,Tb as Fv,Tc as qk,U as mp,Ua as xI,Ub as Gv,Uc as zk,V as al,Va as bI,Vb as Uv,W as cl,Wa as wI,Wb as jv,X as dl,Xa as OI,Xb as Bv,Y as pl,Yb as qv,Z as rI,Zb as zv,_ as nI,_b as Hv,a as JR,aa as ll,ac as Kv,b as QR,ba as ql,bb as PI,bc as Wv,c as ZR,ca as zl,cb as MI,cc as Yv,d as eP,da as Hl,dc as Xv,e as bP,ea as Vl,ec as Jv,f as wP,fa as Kl,fb as II,fc as Qv,g as OP,ga as Wl,gb as vI,gc as Zv,h as RP,ha as Yl,hb as kI,hc as ek,i as PP,ia as Xl,ic as tk,j as MP,ja as Jl,jb as jI,jc as rk,k as IP,ka as Ql,kb as BI,kc as nk,la as Zl,lb as qI,lc as ok,ma as eu,mb as zI,mc as ik,na as tu,nb as HI,nc as sk,oa as ru,ob as lm,oc as ak,pa as nu,pb as um,pc as ck,qa as ou,qb as mm,qc as dk,ra as iu,rb as fm,rc as pk,sa as su,sb as _m,sc as qt,t as vP,ta as au,tb as hm,tc as Lm,u as kP,ua as cu,ub as xm,uc as $m,v as NP,va as du,vb as bm,vc as Dm,w as LP,wa as pu,wb as wm,wc as Fm,x as $P,xa as lu,xb as Om,xc as Gm,y as DP,ya as uu,yb as Rm,yc as Um,z as FP,za as mu,zb as bv,zc as jm}from"./chunks/chunk-ZL6J6JYT.js";import"./chunks/chunk-X5D5YUHR.js";import"./chunks/chunk-4QA5O64H.js";import{x as tp}from"./chunks/chunk-L2ZSSMYY.js";import{$ as m_,A as Mu,B as Iu,C as vu,D as ku,I as Ku,J as Wu,K as Yu,L as Xu,M as Ju,N as Qu,O as Zu,P as em,Q as tm,R as rm,S as nm,T as om,U as im,V as sm,W as am,X as cm,Y as p_,Z as l_,_ as u_,b as ul,ba as g_,c as ml,ca as C_,d as fl,da as y_,e as _l,ea as S_,f as hl,g as gl,ga as T_,h as Cl,ha as E_,i as yl,ia as A_,j as Sl,ja as x_,k as Tl,l as El,m as Al,n as xl,o as bl,p as wl,q as Ol,r as Rl,s as Pl,t as Ml,u as Il,v as bu,w as wu,x as Ou,y as Ru,z as Pu}from"./chunks/chunk-YSVOXCYH.js";import{A as Lp,Aa as Kp,B as $p,C as Dt,Ca as Wp,Da as Yp,Ea as Xp,b as tP,c as rP,d as nP,da as Ft,e as oP,ea as Gt,f as iP,fa as Ut,g as sP,ga as jt,h as Lc,i as $c,j as Dc,ja as Dp,k as Fc,l as Gc,la as Fp,ma as Gp,n as vM,na as Up,s as jM,t as BM,ta as jp,ua as Bp,v as qM,w as zM,wa as qp,x as HM,xa as zp,y as kp,ya as Hp,z as Np,za as Vp}from"./chunks/chunk-4YQMQOUO.js";import{a as HR,b as VR}from"./chunks/chunk-3HKPVOAN.js";import"./chunks/chunk-6H36ZHMI.js";import{a as kM,b as NM,c as LM,d as $M,e as DM,f as FM,g as GM,h as bp,i as wp,j as Op,k as Rp,l as Pp,m as UM,n as Mp,o as Ip,p as vp}from"./chunks/chunk-Q6K7HWZ7.js";import{a as Tp,b as Ep,e as Ap,f as xp}from"./chunks/chunk-OGVSGXQX.js";import"./chunks/chunk-AA52P34H.js";import{$ as Vd,A as Dd,B as Fd,C as Gd,D as Ud,E as jd,F as Bd,G as qd,H as lP,I as uP,J as mP,K as fP,L as _P,M as hP,Q as gP,R as CP,S as yP,T as SP,U as TP,V as EP,W as AP,X as xP,Z as zd,_ as Hd,a as Jc,aa as Kd,b as Qc,ba as Wd,c as Zc,ca as Yd,d as ed,da as Xd,e as td,ea as Jd,f as rd,fa as Qd,g as nd,ga as Zd,h as od,ha as ep,i as id,ia as It,j as Sd,k as Td,l as Ed,m as Ad,n as xd,o as bd,p as wd,q as Od,r as Rd,s as Pd,t as Md,u as Id,v as vd,w as kd,x as Nd,y as Ld,z as $d}from"./chunks/chunk-C6WM6ZN4.js";import{b as MR,c as IR,d as vR,e as kR,f as NR,g as LR,h as $R,i as DR,j as FR,k as xc,l as bc,m as wc,n as Oc,o as Rc,p as Pc,r as Mc,t as Ic,z as vc}from"./chunks/chunk-QDV7S2QS.js";import{b as OR}from"./chunks/chunk-AHV3CSQG.js";import"./chunks/chunk-PZA7QECY.js";import{$ as jb,$c as BO,A as ST,Ac as NO,Ad as PR,B as TT,Bb as nO,Bc as LO,C as ET,Cc as $O,Dc as Ss,Ec as Ts,Fb as oO,Fc as Es,Gb as iO,Gc as As,Ha as fw,Hb as sO,Hc as xs,Ia as _w,Ib as ds,Ic as bs,Ja as hw,Jb as aO,Jc as ws,K as vT,Ka as gw,Kc as Os,La as Cw,Lb as cO,Lc as Rs,M as jT,Ma as yw,Mb as dO,Mc as Ps,N as BT,Na as bw,Nb as pO,Nc as Ms,O as qT,Oa as ww,Ob as lO,Oc as Is,P as zT,Pa as Ow,Pb as uO,Pc as vs,Q as XT,Qa as wt,Qb as mO,Qc as ks,R as JT,Rb as fO,Sa as Rw,Sb as _O,Sc as Ns,T as Lb,Ta as Pw,Tb as hO,Tc as DO,Ua as Mw,Ub as gO,Uc as FO,V as $b,Va as Iw,Vb as Ot,Vc as Ls,W as Db,Wa as vw,Wb as CO,Wc as GO,Xb as yO,Xc as UO,Y as Fb,Yc as $s,Z as Gb,Za as kw,Zc as Ds,_ as Ub,_c as jO,a as aT,aa as Bb,ad as qO,ba as qb,bb as rs,bc as ps,bd as zO,ca as zb,cc as ls,cd as HO,da as ew,db as qw,dc as us,dd as VO,eb as zw,ec as ms,ed as KO,fa as Qi,fb as Hw,fd as Fs,ga as Zi,gb as Vw,gc as fs,gd as Gs,ha as es,hc as _s,hd as WO,i as io,ib as Kw,ic as hs,id as YO,j as cT,ja as tw,jb as Ww,jc as gs,jd as XO,k as dT,ka as rw,kb as Yw,kc as Cs,kd as JO,l as pT,la as nw,lb as Xw,lc as ys,ld as QO,m as lT,ma as ow,mb as ss,mc as SO,md as ZO,na as iw,nb as as,nc as TO,nd as eR,o as uT,oa as sw,oc as EO,od as tR,p as mT,pa as aw,pb as cs,pc as AO,pd as rR,qb as Jw,qc as xO,qd as nR,r as fT,ra as cw,rc as bO,rd as oR,sb as Qw,sc as wO,t as _T,ta as dw,tb as Zw,tc as OO,u as hT,ua as pw,ub as eO,uc as RO,v as gT,va as lw,vc as PO,vd as Rt,wa as uw,wb as tO,wc as MO,wd as iR,x as CT,xa as mw,xc as IO,xd as sR,y as yT,yc as vO,yd as aR,zb as rO,zc as kO,zd as RR}from"./chunks/chunk-CBUC4X7Q.js";import{A as Fw,B as Gw,C as Uw,D as jw,E as Bw,F as ns,G as os,H as is,a as Hb,b as Vb,c as Kb,d as Wb,e as Yb,f as Xb,g as Jb,h as Qb,i as Zb,l as Sw,o as Tw,p as Ew,t as Aw,u as ts,v as xw,w as Nw,x as Lw,y as $w,z as Dw}from"./chunks/chunk-OXC5KBIQ.js";import"./chunks/chunk-3AZOATC2.js";import{$a as Zo,$c as bi,$d as qA,A as Qn,Aa as Bo,Ab as li,Ac as GE,Ae as hx,B as Zn,Ba as qo,Bb as ui,Bc as UE,Bd as gA,Be as gx,C as eo,Ca as zo,Cb as mi,Cc as jE,Cd as CA,Cg as cb,D as to,Da as Ho,Db as fi,Dc as BE,Dd as yA,Df as Bx,Dg as db,E as ro,Ea as Vo,Eb as _i,Ec as qE,Ed as SA,Ee as Cx,Ef as Ge,Eg as pb,F as no,Fa as gE,Fc as zE,Fd as TA,Fe as yx,Ff as xt,G as oo,Ga as CE,Gc as HE,Gd as EA,Ge as Sx,Gf as qx,Gg as lb,Hb as xE,Hc as VE,Hd as AA,He as Tx,Hf as zx,Hg as ub,Ib as bE,Ic as KE,Id as xA,Ie as Ex,If as Hx,Jb as hi,Jc as WE,Jd as bA,Je as Ax,Jf as Vx,Jg as mb,Kc as YE,Kd as wA,Ke as xx,Kf as q,Kg as Vi,Lc as XE,Ld as OA,Le as bx,Lf as Kx,M as Ct,Mc as JE,Md as RA,Mf as Wx,Mg as Ki,N as yt,Nb as wE,Nc as QE,Nd as PA,Nf as Yx,Ng as Wi,Ob as OE,Oc as ZE,Od as MA,Of as Xx,Pc as eA,Pd as IA,Pe as wx,Q as No,Qc as tA,Qd as vA,Qe as Ox,Qf as zi,Qg as fb,Rc as rA,Rd as kA,Rf as Hi,Rg as _b,S as kT,Sa as Ko,Sc as nA,Sd as NA,Sg as hb,T as NT,Ta as Wo,Tc as oA,Td as LA,Te as Rx,Tg as gb,Ua as yE,Uc as iA,Ud as $A,Ue as Px,Ug as Cb,Va as Yo,Vc as sA,Vd as DA,Ve as Mx,Vg as yb,Wa as Xo,Wc as aA,Wd as FA,We as Ix,Wg as Sb,X as LT,Xa as SE,Xb as RE,Xd as GA,Xe as vx,Xg as Yi,Ya as Jo,Yb as PE,Yc as Ei,Yd as UA,Ye as kx,Yg as Tb,Za as Qo,Zb as ME,Zc as Ai,Zd as jA,Ze as Nx,Zg as Eb,_ as $T,_a as L,_b as IE,_c as xi,_d as BA,_e as Lx,a as XS,ac as vE,ad as wi,ae as zA,af as $x,ag as Jx,ah as Ab,b as JS,ba as DT,bc as kE,bd as Oi,be as HA,bf as Dx,bg as bt,bh as xb,c as QS,cd as Ri,ce as VA,cf as Fx,cg as Qx,ch as bb,d as ZS,dd as Pi,de as KA,df as Gx,dg as Zx,dh as wb,e as eT,ea as FT,ed as Mi,ee as WA,ef as Ux,eg as eb,eh as Ob,f as tT,fa as HT,fb as Fe,fd as Ii,fe as YA,fh as Rb,g as rT,ga as VT,gb as ei,gd as vi,ge as XA,gf as jx,gh as Xi,h as nT,ha as KT,hc as NE,hd as ki,he as JA,hf as Bi,hg as tb,i as oT,ia as WT,id as Ni,ie as QA,if as qi,ig as rb,j as iT,ja as YT,jc as gi,jd as Li,je as ZA,jg as nb,jh as Pb,k as sT,ka as QT,kc as Ci,kd as $i,ke as ex,kg as ob,kh as Ji,l as Gn,la as ZT,lc as yi,ld as Di,le as tx,lg as ib,m as Un,ma as eE,mc as Si,md as Fi,me as rx,n as jn,na as tE,nb as TE,nd as Gi,ne as nx,nh as Mb,o as Bn,oa as rE,ob as EE,od as Ui,oe as ox,og as sb,oh as Ib,p as qn,pa as nE,pb as AE,pd as ji,pe as ix,ph as vb,q as zn,qa as oE,qb as ti,qd as cA,qe as sx,qg as ab,qh as kb,r as Hn,ra as iE,rb as ri,rd as dA,re as ax,rh as Nb,s as Ne,sa as sE,sb as ni,sc as LE,sd as pA,se as cx,t as Le,ta as aE,tb as oi,tc as $E,td as lA,te as dx,u as Vn,ua as cE,ub as ii,uc as DE,ud as uA,ue as px,v as Kn,va as dE,vb as si,vd as mA,ve as lx,w as Wn,wa as pE,wb as ai,wd as fA,we as ux,x as Yn,xa as Uo,xb as ci,xd as _A,xe as mx,y as Xn,ya as jo,yb as di,yc as Ti,yd as hA,ye as fx,z as Jn,zb as pi,ze as _x}from"./chunks/chunk-NRQCBUYD.js";import{b as AT,c as xT,d as bT,g as go,h as wT,i as OT,j as RT,k as PT,m as Co,n as yo,o as De,p as MT,q as IT,r as So,s as To,u as Eo}from"./chunks/chunk-GSLOAEY2.js";import"./chunks/chunk-WSEIEDEK.js";import{$ as oa,$a as oc,A as wR,Aa as Ia,B as js,Ba as va,C as Bs,Ca as ka,D as qs,Da as Na,Ea as La,Fa as $a,Ga as Da,Ha as Fa,Ia as Ga,Ja as Ua,K as zs,Ka as ja,L as Hs,La as Ba,M as Vs,Ma as qa,N as Ks,Na as za,O as Ws,Oa as Ha,P as Ys,Pa as Va,Q as Xs,Qa as Ka,Ra as Wa,Sa as Ya,T as Js,Ta as Xa,U as Qs,Ua as Ja,V as Zs,Va as Qa,W as ea,Wa as Za,X as ta,Xa as ec,Y as ra,Ya as tc,Z as na,Za as rc,_a as nc,aa as ia,ab as ic,b as cR,ba as sa,bb as sc,c as dR,ca as aa,cb as ac,d as pR,da as ca,db as cc,e as lR,ea as da,eb as dc,f as uR,fa as pa,fb as pc,ga as la,gb as lc,h as mR,ha as ua,hb as uc,i as fR,ia as ma,ib as mc,j as Us,ja as fa,jb as fc,k as _R,ka as _a,kb as _c,la as ha,lb as hc,ma as ga,mb as gc,n as hR,na as Ca,nb as Cc,o as gR,oa as ya,ob as yc,p as Ue,pa as Sa,pb as Sc,q as CR,qa as Ta,qb as Tc,r as yR,ra as Ea,rb as Ec,s as SR,sa as Aa,t as Pt,ta as xa,tb as Be,u as je,ua as ba,v as TR,va as wa,vb as Z,w as ER,wa as Oa,wb as Ac,x as AR,xa as Ra,y as xR,ya as Pa,z as bR,za as Ma}from"./chunks/chunk-A5ZEMOVR.js";import{I as ko,L as Tt,N as Et,Q as Lo,R as $o,S as At,U as GT,W as UT,Y as Go,a as R,b as YS,c as gt,da as fE,e as Mn,f as In,g as vn,ga as _E,h as kn,ha as hE,i as ve,j as Nn,k as N,ka as FE,l as ke,m as Ln,n as $n,o as Dn,p as Fn,q as Ao,r as xo,s as bo,t as wo,u as Oo,v as Ro,w as Po,x as Mo,y as Io,z as vo}from"./chunks/chunk-I4SPJQQI.js";import{_ as lE,a as po,b as lo,ba as Do,c as uo,ca as uE,da as Fo,fa as mE,h as mo,j as fo,k as _o,l as ho}from"./chunks/chunk-TE6FBDHP.js";import{A as ue,B as WS,C as S,E as so,F as St,G as me,H as ao,L as $e,N as co,b as jS,c as BS,d as qS,m as zS,r as HS,u as VS,y as KS}from"./chunks/chunk-K672XXGQ.js";import"./chunks/chunk-XAWE4EAK.js";var z="2026-07-28",or=["2025-11-25","2025-06-18"],te=[z],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},x={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},nr=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,n={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=n}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function qg(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:x.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:x.clientInfo,required:["name","version"]});let n={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(n.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(n.websiteUrl=e.websiteUrl.trim().slice(0,2048)),n}function zg(e){if(e!==void 0){if(typeof e!="string"||!nr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:x.logLevel,allowed:[...nr]});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:[x.protocolVersion,x.clientCapabilities]});let r=t[x.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 n=t[x.clientCapabilities];if(!h(n))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:x.clientCapabilities,expected:"object"});let o=qg(t[x.clientInfo]),i=zg(t[x.logLevel]);return{protocolVersion:z,clientCapabilities:n,...o?{clientInfo:o}:{},...i?{logLevel:i}:{}}}function D0(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 F0(e,t){let r=t.filter(n=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,n));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(n=>[n,{}]))})}function G0(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,[x.serverInfo]:{...t}}}}function Hg(e,t){return Xe({...e,resultType:"complete"},t)}function U0(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 Hg({supportedVersions:[...te],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function j0(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"})}var Vg=new Set(["--help","-h","--version","-V"]);function Kg(e,t){let n=[`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"&&n.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."),n.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",""),n.join(`
|
|
1
|
+
import{f as Bg}from"./chunks/chunk-3KEMIPKG.js";import{a as vN,b as kN,c as NN,d as LN}from"./chunks/chunk-4YYFY33T.js";import{a as $N,b as DN}from"./chunks/chunk-7NAO7I75.js";import{b as rN,c as nN,d as oN,e as iN,f as sN,g as aN,h as cN,i as dN,j as pN,k as lN,l as uN,m as mN,n as fN,o as _N,p as hN,q as gN,r as CN}from"./chunks/chunk-UNBW2LF3.js";import{a as kc,b as _d,c as hd,d as gd,e as Cd,f as yd,g as yN,h as SN,i as TN,j as EN,k as AN,l as xN,m as bN,n as wN,o as ON,p as RN,q as PN,r as MN,s as IN}from"./chunks/chunk-OBPO6V7H.js";import{a as aP,b as cP,c as Uc,d as jc,e as Bc,g as qc,h as zc,i as Hc,j as Vc,k as Kc,l as Wc,m as Yc,p as Xc}from"./chunks/chunk-MZZ4ZJ5Z.js";import{A as p0,B as l0,C as u0,D as m0,E as f0,F as _0,G as h0,H as g0,I as C0,J as y0,K as S0,L as T0,M as E0,N as A0,O as x0,P as b0,Q as w0,R as O0,S as R0,T as P0,U as M0,V as I0,W as v0,X as k0,Y as N0,Z as L0,_ as $0,a as FN,b as GN,c as UN,d as jN,e as BN,f as qN,g as zN,h as HN,i as VN,j as KN,k as WN,l as YN,m as XN,n as JN,o as QN,p as ZN,q as e0,r as t0,s as r0,t as n0,u as o0,v as i0,w as s0,x as a0,y as c0,z as d0}from"./chunks/chunk-TKUG2X24.js";import{$ as Af,$a as fh,$b as fg,A as Ke,Aa as $_,Ab as jh,Ac as jg,B as cf,Ba as D_,Bb as Bh,C as df,Ca as F_,Cb as qh,D as lf,Da as G_,Db as zh,E as uf,Ea as U_,Eb as Hh,F as Ht,Fa as j_,Fb as Vh,G as Vt,Ga as B_,Gb as Kh,H as Kt,Ha as q_,Hb as Wh,I as Wt,Ia as z_,Ib as Yh,J as Yt,Ja as H_,Jb as Xh,K as Xt,Ka as V_,Kb as Jh,L as Jt,La as K_,Lb as Qh,M as Qt,Ma as W_,Mb as Zh,N as Zt,Na as Y_,Nb as eg,O as er,Oa as X_,Ob as tg,P as tr,Pa as J_,Pb as rg,Q as mf,Qa as Q_,Qb as ng,R as ff,Ra as Z_,Rb as og,S as _f,Sa as eh,Sb as ig,T as hf,Ta as th,Tb as sg,U as gf,Ua as rh,Ub as ag,V as We,Va as rr,Vb as cg,W as Cf,Wa as _e,Wb as dg,X as yf,Xa as ph,Xb as pg,Y as Sf,Ya as lh,Yb as lg,Z as Tf,Za as uh,Zb as ug,_ as Ef,_a as mh,_b as mg,a as GR,aa as xf,ab as _h,ac as _g,b as UR,ba as bf,bb as hh,bc as hg,c as jR,ca as Dk,cb as gh,cc as gg,d as BR,da as Fk,db as Ch,dc as Cg,e as qR,ea as Gk,eb as yh,ec as yg,f as zR,fa as Ff,fb as Sh,fc as Sg,g as KR,ga as Gf,gb as Th,gc as Tg,h as WR,ha as Uf,hb as Eh,hc as Eg,i as YR,ia as w_,ib as Ah,ic as Ag,j as XR,ja as O_,jb as xh,jc as xg,k as Nc,ka as Wk,kb as bh,kc as bg,la as Yk,lb as wh,lc as wg,m as VM,ma as Xk,mb as Oh,mc as Og,n as KM,na as Jk,nb as Rh,nc as Rg,o as WM,oa as Qk,ob as Ph,oc as Pg,p as YM,pa as Zk,pb as Mh,pc as Mg,q as XM,qa as eN,qb as Ih,qc as Ig,r as JM,ra as tN,rb as vh,rc as vg,s as ol,sa as R_,sb as kh,sc as kg,t as Gu,ta as P_,tb as Nh,tc as Ng,u as Uu,ua as M_,ub as Lh,uc as Lg,v as qu,va as I_,vb as $h,vc as $g,w as zu,wa as v_,wb as Dh,wc as Dg,x as pm,xa as k_,xb as Fh,xc as Fg,y as gm,ya as N_,yb as Gh,yc as Gg,z as xv,za as L_,zb as Uh,zc as Ug}from"./chunks/chunk-ROTEELDL.js";import{e as eI,f as tI,g as il,h as sl,i as Bt}from"./chunks/chunk-G6TARHFK.js";import{A as wk,B as Ok,C as Rk,D as Pk,E as Mk,F as Ik,G as vk,H as kk,I as Nk,J as Lk,K as $k,L as Rf,M as Pf,N as Mf,O as If,P as vf,Q as kf,R as Nf,S as Lf,T as $f,U as Df,a as av,b as cv,c as dv,d as pv,e as lv,f as Fu,g as uv,h as mv,i as fv,j as _v,k as hv,m as pf,n as wf,o as _k,p as hk,q as gk,r as Ck,s as yk,t as Sk,u as Of,v as Tk,w as Ek,x as Ak,y as xk,z as bk}from"./chunks/chunk-SY5C3U32.js";import{$ as rM,$a as jl,$b as dm,$c as ih,Aa as OM,Ab as QI,Ac as Kf,Ba as RM,Bb as Nu,Bc as Wf,C as ze,Ca as PM,Cb as Lu,Cc as Yf,D as ee,Da as MM,Db as $u,Dc as Hk,E as fp,Ea as IM,Eb as ZI,Ec as Vk,Fb as ev,Fc as Kk,Gb as tv,Gc as Xf,H as He,Ha as QM,Hb as rv,Hc as Jf,I as _p,Ia as ZM,Ib as nv,Ic as Qf,J as hp,Ja as Jp,Jb as ov,Jc as Zf,Ka as Qp,Kb as iv,Kc as e_,L as fe,La as Zp,Lb as sv,Lc as t_,M as gp,Ma as el,Mb as Du,Mc as r_,N as Cp,Na as tl,Nb as gv,Nc as n_,O as yp,Oa as rl,Ob as Cv,Oc as o_,P as Sp,Pa as nl,Pb as yv,Pc as i_,Q as KP,Qa as vl,Qb as Sv,Qc as s_,R as WP,Ra as kl,Rb as Tv,Rc as a_,S as YP,Sa as oI,Sc as c_,T as XP,Ta as Nl,Tb as ju,Tc as d_,U as JP,Ua as Ll,Ub as Bu,Uc as f_,V as Nt,Va as $l,Vb as Hu,Vc as __,W as QP,Wa as Dl,Wb as Vu,X as ZP,Xa as iI,Xc as h_,Y as Lt,Ya as Fl,Yc as b_,Z as eM,Za as Gl,Zb as Ev,Zc as nh,_ as tM,_a as Ul,_b as Av,_c as oh,a as dP,aa as nM,ab as Bl,ac as Cm,ad as sh,b as Mt,ba as oM,bb as sI,bc as ym,bd as ah,c as pP,ca as Ve,cb as aI,cc as Sm,cd as ch,d as sd,da as iM,db as cI,dc as Tm,dd as dh,e as ad,ea as $t,eb as dI,ec as Em,f as cd,fa as sM,fb as pI,g as dd,ga as aM,gb as lI,h as pd,ha as cM,hb as uI,ia as dM,ib as hI,j as ld,ja as pM,jb as Eu,jc as Am,k as ud,ka as lM,kb as gI,la as uM,lb as NI,lc as Zm,ma as mM,mb as LI,mc as ef,na as fM,nb as $I,nc as tf,o as md,oa as _M,ob as DI,p as fd,pa as hM,pb as FI,pc as rf,qa as gM,qb as GI,qc as nf,ra as CM,rb as UI,rc as of,sa as yM,sb as VI,sc as sf,ta as SM,tb as KI,tc as af,ua as TM,ub as Au,uc as jf,va as EM,vb as xu,vc as Bf,w as vt,wa as AM,wb as WI,wc as qf,xa as xM,xb as YI,xc as zf,y as kt,ya as bM,yb as XI,yc as Hf,za as wM,zb as JI,zc as Vf}from"./chunks/chunk-SDXCJZKB.js";import{$a as RI,$b as Vv,A as GP,Aa as fu,Ab as Pm,Ac as Bm,B as rp,Ba as _u,Bb as Mm,Bc as qm,C as np,Ca as hu,Cb as Im,Cc as zm,D as op,Da as gu,Db as vm,Dc as Hm,E as ip,Ea as Cu,Eb as wv,Ec as Vm,F as sp,Fa as yu,Fb as Ov,Fc as Km,G as ap,Ga as Su,Gb as Rv,Gc as Wm,H as cp,Ha as Tu,Hb as Pv,Hc as Ym,I as dp,Ib as Mv,Ic as Xm,J as pp,Jb as Iv,Jc as zt,K as lp,Kb as vv,Kc as Jm,L as up,La as mI,Lc as lk,M as qe,Ma as fI,Mb as km,Mc as uk,N as UP,Na as _I,Nb as Nm,Nc as mk,O as jP,Oa as CI,Ob as kv,Oc as Qm,P as BP,Pa as yI,Pb as Nv,Pc as fk,Q as qP,Qa as SI,Qb as Lv,Qc as Uk,R as zP,Ra as TI,Rb as $v,Rc as jk,S as HP,Sa as EI,Sb as Dv,Sc as Bk,T as VP,Ta as AI,Tb as Fv,Tc as qk,U as mp,Ua as xI,Ub as Gv,Uc as zk,V as al,Va as bI,Vb as Uv,W as cl,Wa as wI,Wb as jv,X as dl,Xa as OI,Xb as Bv,Y as pl,Yb as qv,Z as rI,Zb as zv,_ as nI,_b as Hv,a as JR,aa as ll,ac as Kv,b as QR,ba as ql,bb as PI,bc as Wv,c as ZR,ca as zl,cb as MI,cc as Yv,d as eP,da as Hl,dc as Xv,e as bP,ea as Vl,ec as Jv,f as wP,fa as Kl,fb as II,fc as Qv,g as OP,ga as Wl,gb as vI,gc as Zv,h as RP,ha as Yl,hb as kI,hc as ek,i as PP,ia as Xl,ic as tk,j as MP,ja as Jl,jb as jI,jc as rk,k as IP,ka as Ql,kb as BI,kc as nk,la as Zl,lb as qI,lc as ok,ma as eu,mb as zI,mc as ik,na as tu,nb as HI,nc as sk,oa as ru,ob as lm,oc as ak,pa as nu,pb as um,pc as ck,qa as ou,qb as mm,qc as dk,ra as iu,rb as fm,rc as pk,sa as su,sb as _m,sc as qt,t as vP,ta as au,tb as hm,tc as Lm,u as kP,ua as cu,ub as xm,uc as $m,v as NP,va as du,vb as bm,vc as Dm,w as LP,wa as pu,wb as wm,wc as Fm,x as $P,xa as lu,xb as Om,xc as Gm,y as DP,ya as uu,yb as Rm,yc as Um,z as FP,za as mu,zb as bv,zc as jm}from"./chunks/chunk-ZL6J6JYT.js";import"./chunks/chunk-X5D5YUHR.js";import"./chunks/chunk-4QA5O64H.js";import{x as tp}from"./chunks/chunk-L2ZSSMYY.js";import{$ as m_,A as Mu,B as Iu,C as vu,D as ku,I as Ku,J as Wu,K as Yu,L as Xu,M as Ju,N as Qu,O as Zu,P as em,Q as tm,R as rm,S as nm,T as om,U as im,V as sm,W as am,X as cm,Y as p_,Z as l_,_ as u_,b as ul,ba as g_,c as ml,ca as C_,d as fl,da as y_,e as _l,ea as S_,f as hl,g as gl,ga as T_,h as Cl,ha as E_,i as yl,ia as A_,j as Sl,ja as x_,k as Tl,l as El,m as Al,n as xl,o as bl,p as wl,q as Ol,r as Rl,s as Pl,t as Ml,u as Il,v as bu,w as wu,x as Ou,y as Ru,z as Pu}from"./chunks/chunk-GOEQXVOI.js";import{A as Lp,Aa as Kp,B as $p,C as Dt,Ca as Wp,Da as Yp,Ea as Xp,b as tP,c as rP,d as nP,da as Ft,e as oP,ea as Gt,f as iP,fa as Ut,g as sP,ga as jt,h as Lc,i as $c,j as Dc,ja as Dp,k as Fc,l as Gc,la as Fp,ma as Gp,n as vM,na as Up,s as jM,t as BM,ta as jp,ua as Bp,v as qM,w as zM,wa as qp,x as HM,xa as zp,y as kp,ya as Hp,z as Np,za as Vp}from"./chunks/chunk-7V65VACG.js";import{a as HR,b as VR}from"./chunks/chunk-3HKPVOAN.js";import"./chunks/chunk-6H36ZHMI.js";import{a as kM,b as NM,c as LM,d as $M,e as DM,f as FM,g as GM,h as bp,i as wp,j as Op,k as Rp,l as Pp,m as UM,n as Mp,o as Ip,p as vp}from"./chunks/chunk-Q6K7HWZ7.js";import{a as Tp,b as Ep,e as Ap,f as xp}from"./chunks/chunk-OGVSGXQX.js";import"./chunks/chunk-AA52P34H.js";import{$ as Vd,A as Dd,B as Fd,C as Gd,D as Ud,E as jd,F as Bd,G as qd,H as lP,I as uP,J as mP,K as fP,L as _P,M as hP,Q as gP,R as CP,S as yP,T as SP,U as TP,V as EP,W as AP,X as xP,Z as zd,_ as Hd,a as Jc,aa as Kd,b as Qc,ba as Wd,c as Zc,ca as Yd,d as ed,da as Xd,e as td,ea as Jd,f as rd,fa as Qd,g as nd,ga as Zd,h as od,ha as ep,i as id,ia as It,j as Sd,k as Td,l as Ed,m as Ad,n as xd,o as bd,p as wd,q as Od,r as Rd,s as Pd,t as Md,u as Id,v as vd,w as kd,x as Nd,y as Ld,z as $d}from"./chunks/chunk-C6WM6ZN4.js";import{b as MR,c as IR,d as vR,e as kR,f as NR,g as LR,h as $R,i as DR,j as FR,k as xc,l as bc,m as wc,n as Oc,o as Rc,p as Pc,r as Mc,t as Ic,z as vc}from"./chunks/chunk-QDV7S2QS.js";import{b as OR}from"./chunks/chunk-AHV3CSQG.js";import"./chunks/chunk-PZA7QECY.js";import{$ as jb,$c as BO,A as ST,Ac as NO,Ad as PR,B as TT,Bb as nO,Bc as LO,C as ET,Cc as $O,Dc as Ss,Ec as Ts,Fb as oO,Fc as Es,Gb as iO,Gc as As,Ha as fw,Hb as sO,Hc as xs,Ia as _w,Ib as ds,Ic as bs,Ja as hw,Jb as aO,Jc as ws,K as vT,Ka as gw,Kc as Os,La as Cw,Lb as cO,Lc as Rs,M as jT,Ma as yw,Mb as dO,Mc as Ps,N as BT,Na as bw,Nb as pO,Nc as Ms,O as qT,Oa as ww,Ob as lO,Oc as Is,P as zT,Pa as Ow,Pb as uO,Pc as vs,Q as XT,Qa as wt,Qb as mO,Qc as ks,R as JT,Rb as fO,Sa as Rw,Sb as _O,Sc as Ns,T as Lb,Ta as Pw,Tb as hO,Tc as DO,Ua as Mw,Ub as gO,Uc as FO,V as $b,Va as Iw,Vb as Ot,Vc as Ls,W as Db,Wa as vw,Wb as CO,Wc as GO,Xb as yO,Xc as UO,Y as Fb,Yc as $s,Z as Gb,Za as kw,Zc as Ds,_ as Ub,_c as jO,a as aT,aa as Bb,ad as qO,ba as qb,bb as rs,bc as ps,bd as zO,ca as zb,cc as ls,cd as HO,da as ew,db as qw,dc as us,dd as VO,eb as zw,ec as ms,ed as KO,fa as Qi,fb as Hw,fd as Fs,ga as Zi,gb as Vw,gc as fs,gd as Gs,ha as es,hc as _s,hd as WO,i as io,ib as Kw,ic as hs,id as YO,j as cT,ja as tw,jb as Ww,jc as gs,jd as XO,k as dT,ka as rw,kb as Yw,kc as Cs,kd as JO,l as pT,la as nw,lb as Xw,lc as ys,ld as QO,m as lT,ma as ow,mb as ss,mc as SO,md as ZO,na as iw,nb as as,nc as TO,nd as eR,o as uT,oa as sw,oc as EO,od as tR,p as mT,pa as aw,pb as cs,pc as AO,pd as rR,qb as Jw,qc as xO,qd as nR,r as fT,ra as cw,rc as bO,rd as oR,sb as Qw,sc as wO,t as _T,ta as dw,tb as Zw,tc as OO,u as hT,ua as pw,ub as eO,uc as RO,v as gT,va as lw,vc as PO,vd as Rt,wa as uw,wb as tO,wc as MO,wd as iR,x as CT,xa as mw,xc as IO,xd as sR,y as yT,yc as vO,yd as aR,zb as rO,zc as kO,zd as RR}from"./chunks/chunk-CBUC4X7Q.js";import{A as Fw,B as Gw,C as Uw,D as jw,E as Bw,F as ns,G as os,H as is,a as Hb,b as Vb,c as Kb,d as Wb,e as Yb,f as Xb,g as Jb,h as Qb,i as Zb,l as Sw,o as Tw,p as Ew,t as Aw,u as ts,v as xw,w as Nw,x as Lw,y as $w,z as Dw}from"./chunks/chunk-OXC5KBIQ.js";import"./chunks/chunk-3AZOATC2.js";import{$a as Zo,$c as bi,$d as qA,A as Qn,Aa as Bo,Ab as li,Ac as GE,Ae as hx,B as Zn,Ba as qo,Bb as ui,Bc as UE,Bd as gA,Be as gx,C as eo,Ca as zo,Cb as mi,Cc as jE,Cd as CA,Cg as cb,D as to,Da as Ho,Db as fi,Dc as BE,Dd as yA,Df as Bx,Dg as db,E as ro,Ea as Vo,Eb as _i,Ec as qE,Ed as SA,Ee as Cx,Ef as Ge,Eg as pb,F as no,Fa as gE,Fc as zE,Fd as TA,Fe as yx,Ff as xt,G as oo,Ga as CE,Gc as HE,Gd as EA,Ge as Sx,Gf as qx,Gg as lb,Hb as xE,Hc as VE,Hd as AA,He as Tx,Hf as zx,Hg as ub,Ib as bE,Ic as KE,Id as xA,Ie as Ex,If as Hx,Jb as hi,Jc as WE,Jd as bA,Je as Ax,Jf as Vx,Jg as mb,Kc as YE,Kd as wA,Ke as xx,Kf as q,Kg as Vi,Lc as XE,Ld as OA,Le as bx,Lf as Kx,M as Ct,Mc as JE,Md as RA,Mf as Wx,Mg as Ki,N as yt,Nb as wE,Nc as QE,Nd as PA,Nf as Yx,Ng as Wi,Ob as OE,Oc as ZE,Od as MA,Of as Xx,Pc as eA,Pd as IA,Pe as wx,Q as No,Qc as tA,Qd as vA,Qe as Ox,Qf as zi,Qg as fb,Rc as rA,Rd as kA,Rf as Hi,Rg as _b,S as kT,Sa as Ko,Sc as nA,Sd as NA,Sg as hb,T as NT,Ta as Wo,Tc as oA,Td as LA,Te as Rx,Tg as gb,Ua as yE,Uc as iA,Ud as $A,Ue as Px,Ug as Cb,Va as Yo,Vc as sA,Vd as DA,Ve as Mx,Vg as yb,Wa as Xo,Wc as aA,Wd as FA,We as Ix,Wg as Sb,X as LT,Xa as SE,Xb as RE,Xd as GA,Xe as vx,Xg as Yi,Ya as Jo,Yb as PE,Yc as Ei,Yd as UA,Ye as kx,Yg as Tb,Za as Qo,Zb as ME,Zc as Ai,Zd as jA,Ze as Nx,Zg as Eb,_ as $T,_a as L,_b as IE,_c as xi,_d as BA,_e as Lx,a as XS,ac as vE,ad as wi,ae as zA,af as $x,ag as Jx,ah as Ab,b as JS,ba as DT,bc as kE,bd as Oi,be as HA,bf as Dx,bg as bt,bh as xb,c as QS,cd as Ri,ce as VA,cf as Fx,cg as Qx,ch as bb,d as ZS,dd as Pi,de as KA,df as Gx,dg as Zx,dh as wb,e as eT,ea as FT,ed as Mi,ee as WA,ef as Ux,eg as eb,eh as Ob,f as tT,fa as HT,fb as Fe,fd as Ii,fe as YA,fh as Rb,g as rT,ga as VT,gb as ei,gd as vi,ge as XA,gf as jx,gh as Xi,h as nT,ha as KT,hc as NE,hd as ki,he as JA,hf as Bi,hg as tb,i as oT,ia as WT,id as Ni,ie as QA,if as qi,ig as rb,j as iT,ja as YT,jc as gi,jd as Li,je as ZA,jg as nb,jh as Pb,k as sT,ka as QT,kc as Ci,kd as $i,ke as ex,kg as ob,kh as Ji,l as Gn,la as ZT,lc as yi,ld as Di,le as tx,lg as ib,m as Un,ma as eE,mc as Si,md as Fi,me as rx,n as jn,na as tE,nb as TE,nd as Gi,ne as nx,nh as Mb,o as Bn,oa as rE,ob as EE,od as Ui,oe as ox,og as sb,oh as Ib,p as qn,pa as nE,pb as AE,pd as ji,pe as ix,ph as vb,q as zn,qa as oE,qb as ti,qd as cA,qe as sx,qg as ab,qh as kb,r as Hn,ra as iE,rb as ri,rd as dA,re as ax,rh as Nb,s as Ne,sa as sE,sb as ni,sc as LE,sd as pA,se as cx,t as Le,ta as aE,tb as oi,tc as $E,td as lA,te as dx,u as Vn,ua as cE,ub as ii,uc as DE,ud as uA,ue as px,v as Kn,va as dE,vb as si,vd as mA,ve as lx,w as Wn,wa as pE,wb as ai,wd as fA,we as ux,x as Yn,xa as Uo,xb as ci,xd as _A,xe as mx,y as Xn,ya as jo,yb as di,yc as Ti,yd as hA,ye as fx,z as Jn,zb as pi,ze as _x}from"./chunks/chunk-NRQCBUYD.js";import{b as AT,c as xT,d as bT,g as go,h as wT,i as OT,j as RT,k as PT,m as Co,n as yo,o as De,p as MT,q as IT,r as So,s as To,u as Eo}from"./chunks/chunk-GSLOAEY2.js";import"./chunks/chunk-WSEIEDEK.js";import{$ as oa,$a as oc,A as wR,Aa as Ia,B as js,Ba as va,C as Bs,Ca as ka,D as qs,Da as Na,Ea as La,Fa as $a,Ga as Da,Ha as Fa,Ia as Ga,Ja as Ua,K as zs,Ka as ja,L as Hs,La as Ba,M as Vs,Ma as qa,N as Ks,Na as za,O as Ws,Oa as Ha,P as Ys,Pa as Va,Q as Xs,Qa as Ka,Ra as Wa,Sa as Ya,T as Js,Ta as Xa,U as Qs,Ua as Ja,V as Zs,Va as Qa,W as ea,Wa as Za,X as ta,Xa as ec,Y as ra,Ya as tc,Z as na,Za as rc,_a as nc,aa as ia,ab as ic,b as cR,ba as sa,bb as sc,c as dR,ca as aa,cb as ac,d as pR,da as ca,db as cc,e as lR,ea as da,eb as dc,f as uR,fa as pa,fb as pc,ga as la,gb as lc,h as mR,ha as ua,hb as uc,i as fR,ia as ma,ib as mc,j as Us,ja as fa,jb as fc,k as _R,ka as _a,kb as _c,la as ha,lb as hc,ma as ga,mb as gc,n as hR,na as Ca,nb as Cc,o as gR,oa as ya,ob as yc,p as Ue,pa as Sa,pb as Sc,q as CR,qa as Ta,qb as Tc,r as yR,ra as Ea,rb as Ec,s as SR,sa as Aa,t as Pt,ta as xa,tb as Be,u as je,ua as ba,v as TR,va as wa,vb as Z,w as ER,wa as Oa,wb as Ac,x as AR,xa as Ra,y as xR,ya as Pa,z as bR,za as Ma}from"./chunks/chunk-A5ZEMOVR.js";import{I as ko,L as Tt,N as Et,Q as Lo,R as $o,S as At,U as GT,W as UT,Y as Go,a as R,b as YS,c as gt,da as fE,e as Mn,f as In,g as vn,ga as _E,h as kn,ha as hE,i as ve,j as Nn,k as N,ka as FE,l as ke,m as Ln,n as $n,o as Dn,p as Fn,q as Ao,r as xo,s as bo,t as wo,u as Oo,v as Ro,w as Po,x as Mo,y as Io,z as vo}from"./chunks/chunk-I4SPJQQI.js";import{_ as lE,a as po,b as lo,ba as Do,c as uo,ca as uE,da as Fo,fa as mE,h as mo,j as fo,k as _o,l as ho}from"./chunks/chunk-TE6FBDHP.js";import{A as ue,B as WS,C as S,E as so,F as St,G as me,H as ao,L as $e,N as co,b as jS,c as BS,d as qS,m as zS,r as HS,u as VS,y as KS}from"./chunks/chunk-K672XXGQ.js";import"./chunks/chunk-XAWE4EAK.js";var z="2026-07-28",or=["2025-11-25","2025-06-18"],te=[z],m={headerMismatch:-32020,missingRequiredClientCapability:-32021,unsupportedProtocolVersion:-32022,invalidParams:-32602},x={clientCapabilities:"io.modelcontextprotocol/clientCapabilities",clientInfo:"io.modelcontextprotocol/clientInfo",logLevel:"io.modelcontextprotocol/logLevel",protocolVersion:"io.modelcontextprotocol/protocolVersion",serverInfo:"io.modelcontextprotocol/serverInfo"},nr=["debug","info","notice","warning","error","critical","alert","emergency"],u=class extends Error{code;data;constructor(t,r,n={}){super(t),this.name="PmMcpProtocolError",this.code=r,this.data=n}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function qg(e){if(e===void 0)return;if(!h(e))throw new u("Invalid MCP clientInfo metadata",m.invalidParams,{field:x.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:x.clientInfo,required:["name","version"]});let n={name:t.slice(0,128),version:r.slice(0,128)};return typeof e.description=="string"&&e.description.trim()&&(n.description=e.description.trim().slice(0,1024)),typeof e.websiteUrl=="string"&&e.websiteUrl.trim()&&(n.websiteUrl=e.websiteUrl.trim().slice(0,2048)),n}function zg(e){if(e!==void 0){if(typeof e!="string"||!nr.includes(e))throw new u("Invalid MCP logLevel metadata",m.invalidParams,{field:x.logLevel,allowed:[...nr]});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:[x.protocolVersion,x.clientCapabilities]});let r=t[x.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 n=t[x.clientCapabilities];if(!h(n))throw new u("Invalid MCP client capabilities metadata",m.invalidParams,{field:x.clientCapabilities,expected:"object"});let o=qg(t[x.clientInfo]),i=zg(t[x.logLevel]);return{protocolVersion:z,clientCapabilities:n,...o?{clientInfo:o}:{},...i?{logLevel:i}:{}}}function D0(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 F0(e,t){let r=t.filter(n=>!Object.prototype.hasOwnProperty.call(e.clientCapabilities,n));if(r.length>0)throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:Object.fromEntries(r.map(n=>[n,{}]))})}function G0(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,[x.serverInfo]:{...t}}}}function Hg(e,t){return Xe({...e,resultType:"complete"},t)}function U0(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 Hg({supportedVersions:[...te],capabilities:structuredClone(e.capabilities),ttlMs:t,cacheScope:"public",...e.instructions?{instructions:e.instructions}:{}},e.serverInfo)}function j0(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"})}var Vg=new Set(["--help","-h","--version","-V"]);function Kg(e,t){let n=[`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"&&n.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."),n.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",""),n.join(`
|
|
2
2
|
`)}function z0(e,t,r){if(e.length===0)return{kind:"serve"};let n=e.find(i=>!Vg.has(i));if(n!==void 0){let i=t==="stdio"?"pm-mcp":"pm-mcp-http";return{kind:"exit",exitCode:64,stdout:"",stderr:`Unsupported argument ${JSON.stringify(n)}. Run ${i} --help.
|
|
3
3
|
`}}return{kind:"exit",exitCode:0,stdout:e.includes("--help")||e.includes("-h")?Kg(t,r):`${r}
|
|
4
4
|
`,stderr:""}}import{createHash as ar,createHmac as cr,timingSafeEqual as Wg}from"node:crypto";var Yg=["elicitation/create","roots/list","sampling/createMessage"],ir=class extends Error{inputRequests;requestState;constructor(t){super("MCP operation requires additional input"),this.name="PmMcpInputRequiredError",this.inputRequests=t.inputRequests,this.requestState=t.requestState}},dr=/^[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 Xg(e){return e==="elicitation/create"?"elicitation":e==="sampling/createMessage"?"sampling":"roots"}function Ce(e,t,r){let n;try{n=JSON.stringify(e)}catch{throw new u(`Invalid ${r}: value is not JSON serializable`,m.invalidParams,{field:r})}if(Buffer.byteLength(n,"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 n={};for(let[o,i]of r){if(!dr.test(o)||!h(i))throw new u("Invalid MCP input request entry",m.invalidParams,{field:`inputRequests.${o}`});let s=i.method;if(typeof s!="string"||!Yg.includes(s))throw new u("Unsupported MCP input request method",m.invalidParams,{field:`inputRequests.${o}.method`,method:s??null});let a=Xg(s);if(!Object.prototype.hasOwnProperty.call(t.clientCapabilities,a))throw new u("Missing required client capability",m.missingRequiredClientCapability,{requiredCapabilities:{[a]:{}}});if(!h(i.params))throw new u("Invalid MCP input request parameters",m.invalidParams,{field:`inputRequests.${o}.params`,expected:"object"});n[o]={method:s,params:structuredClone(i.params)}}return Ce(n,Qe,"inputRequests"),n}function pr(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[n,o]of t){if(!dr.test(n)||!h(o))throw new u("Invalid MCP input response entry",m.invalidParams,{field:`inputResponses.${n}`});r[n]=structuredClone(o)}return Ce(r,Qe,"inputResponses"),r}function W0(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:{[x.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 Y0(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 n=r.toString("base64url"),o=cr("sha256",lr(t)).update(n).digest("base64url");return`${n}.${o}`}function Jg(e){if(!h(e)||e.version!==1)throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});let{expiresAt:t,method:r,parameterDigest:n,principal:o,state:i}=e;if(typeof t!="number"||!Number.isSafeInteger(t))throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});if(typeof r!="string"||typeof n!="string"||typeof o!="string")throw new u("Invalid MCP requestState payload",m.invalidParams,{field:"requestState"});return{expiresAt:t,method:r,parameterDigest:n,principal:o,state:i}}function X0(e,t,r){let[n,o,i]=e.split(".");if(!n||!o||i!==void 0)throw new u("Invalid MCP requestState encoding",m.invalidParams,{field:"requestState"});let s=Buffer.from(o,"base64url"),a=cr("sha256",lr(t)).update(n).digest();if(s.byteLength!==a.byteLength||!Wg(s,a))throw new u("Invalid MCP requestState signature",m.invalidParams,{field:"requestState"});let c;try{c=JSON.parse(Buffer.from(n,"base64url").toString("utf8"))}catch{c=null}let d=Jg(c),{expiresAt:p,method:l,parameterDigest:f,principal:g}=d;if(p<(r.nowMs??Date.now()))throw new u("Expired MCP requestState",m.invalidParams,{field:"requestState",expiredAt:p});if(l!==r.method||f!==r.parameterDigest||g!==r.principal)throw new u("MCP requestState binding mismatch",m.invalidParams,{field:"requestState"});return d}function J0(e){return Ce(e,Qe,"request parameters"),ar("sha256").update(JSON.stringify(e)).digest("hex")}var sr=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=ar("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 n=this.#e.values().next().value;this.#e.delete(n)}this.#e.add(r)}};function Qg(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 Q0(e,t){return{...e,...Qg(t)}}function Zg(e){return e.replaceAll("~1","/").replaceAll("~0","~")}function eC(e,t){if(t==="#")return e;if(!t.startsWith("#/"))return;let r=e;for(let n of t.slice(2).split("/").map(Zg)){if(!h(r)&&!Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,n))return;r=r[n]}return r}function tC(e){let t=e.maxBytes??Je.maxBytes,r=e.maxDepth??Je.maxDepth,n=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(n)||n<1)throw new u("Invalid MCP JSON Schema work bounds",m.invalidParams);return{maximumBytes:t,maximumDepth:r,maximumNodes:n}}function rC(e,t){let r=Array.isArray(e.value)?e.value:h(e.value)?Object.values(e.value):[];for(let n of r)t.push({value:n,depth:e.depth+1})}function nC(e,t){if(!h(t)||typeof t.$ref!="string")return;let r=t.$ref;if(r.startsWith("#")&&eC(e,r)===void 0)throw new u("MCP JSON Schema contains an unresolved local reference",m.invalidParams,{reference:r})}function Z0(e,t={}){let{maximumBytes:r,maximumDepth:n,maximumNodes:o}=tC(t);if(typeof e!="boolean"&&!h(e))throw new u("Invalid MCP JSON Schema root",m.invalidParams,{expected:"object or boolean"});Ce(e,r,"JSON Schema");let i=[{value:e,depth:0}],s=0;for(;i.length>0;){let a=i.pop();if(s+=1,s>o||a.depth>n)throw new u("MCP JSON Schema exceeds validation work bounds",m.invalidParams,{maximumDepth:n,maximumNodes:o});nC(e,a.value),rC(a,i)}return structuredClone(e)}import{randomUUID as oC}from"node:crypto";import{readFile as iC}from"node:fs/promises";import ur from"node:path";var aL="io.modelcontextprotocol/tasks",sC=["working","input_required","completed","failed","cancelled"],aC=/^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,cC=3600*1e3,dC=1e3,Se=1024,pC=30,lC=2e3;function et(e){return new u(e,m.invalidParams,{code:"mcp_task_not_found_or_not_authorized"})}function ye(e){let t=e.trim();if(!aC.test(t))throw et("Unknown MCP task");return t}function mr(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 fr(e){if(!h(e)||typeof e.code!="number"||!Number.isFinite(e.code)||typeof e.message!="string")throw new u("Corrupt MCP task error",m.invalidParams);return{code:e.code,message:e.message.slice(0,Se),...h(e.data)?{data:structuredClone(e.data)}:{}}}function uC(e){if(!sC.includes(e))throw new u("Corrupt MCP task record",m.invalidParams);return e}function mC(e){if(typeof e!="string"||e.length===0)throw new u("Corrupt MCP task record",m.invalidParams);return e}function fC(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<1)throw new u("Corrupt MCP task record",m.invalidParams);return e}function _C(e){if(e!==null&&(typeof e!="number"||!Number.isSafeInteger(e)||e<0))throw new u("Corrupt MCP task record",m.invalidParams);return e}function hC(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 gC(e){if(!Array.isArray(e)||e.some(t=>typeof t!="string"))throw new u("Corrupt MCP task record",m.invalidParams);return[...e]}function CC(e){if(!h(e)||e.version!==1)throw new u("Corrupt MCP task record",m.invalidParams);let t=typeof e.taskId=="string"?ye(e.taskId):"",r=uC(e.status),n=mC(e.principal),o=fC(e.workerPid),i=_C(e.ttlMs),s=hC(e.pollIntervalMs),a={version:1,taskId:t,status:r,principal:n,workerPid:o,createdAt:mr(e.createdAt,"createdAt"),lastUpdatedAt:mr(e.lastUpdatedAt,"lastUpdatedAt"),ttlMs:i,consumedInputKeys:gC(e.consumedInputKeys),...typeof e.statusMessage=="string"?{statusMessage:e.statusMessage.slice(0,Se)}:{},...typeof s=="number"?{pollIntervalMs:s}:{}};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=fr(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 yC(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;#n;#i;constructor(t){this.#e=ur.resolve(t.pmRoot),this.#t=t.owner?.trim()||"pm-mcp",this.#r=t.now??(()=>new Date),this.#n=t.taskIdFactory??(()=>`mcp-task-${oC()}`),this.#i=t.workerPid??process.pid}#s(t){return ur.join(this.#e,"runtime","mcp-tasks","records",`${ye(t)}.json`)}async#c(t){try{return CC(JSON.parse(await iC(this.#s(t),"utf8")))}catch(r){throw me(r)||r instanceof SyntaxError?et("Unknown MCP task"):r}}async#a(t){await $e(this.#s(t.taskId),`${JSON.stringify(t,null,2)}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Implements extension package-management support for Install Sources.
|
|
5
5
|
*/
|
|
6
|
-
import{execFile}from "node:child_process";import{type
|
|
6
|
+
import{execFile}from "node:child_process";import{type EntryData}from "tar";import{PmCliError,type PmCliErrorContext}from "../../core/shared/errors.js";declare const execFileAsync:typeof execFile.__promisify__;interface LocalPackageArchiveLimits{maxArchiveBytes:number;maxEntries:number;maxExpandedBytes:number;maxEntryBytes:number;}
|
|
7
7
|
/** Parsed filesystem install source. */
|
|
8
8
|
export interface LocalInstallSource{
|
|
9
9
|
/** Discriminator for a filesystem source. */
|
|
@@ -91,7 +91,7 @@ export declare function normalizeNpmLocalFileAliasSpec(spec:string,cwd?:string):
|
|
|
91
91
|
* share the same bounded validation, dependency installation, and cleanup
|
|
92
92
|
* contract. Registry artifacts must also exist inside the requested pack root.
|
|
93
93
|
*/
|
|
94
|
-
declare function resolveNpmSourceDirectoryWithRunner(source:NpmInstallSource,npmRunner:typeof runNpmCommand):Promise<{directory:string;package?:string;version?:string;cleanup:()=> Promise<void>;}>;declare function validateLocalPackageArchiveEntry(entry:
|
|
94
|
+
declare function resolveNpmSourceDirectoryWithRunner(source:NpmInstallSource,npmRunner:typeof runNpmCommand):Promise<{directory:string;package?:string;version?:string;cleanup:()=> Promise<void>;}>;declare function validateLocalPackageArchiveEntry(entry:EntryData,limits:LocalPackageArchiveLimits,state:{entries:number;expandedBytes:number;packageJsonEntries:number;}):void;
|
|
95
95
|
/** Validate and extract one local npm package archive into an isolated temporary root. */
|
|
96
96
|
declare function extractLocalPackageArchive(archivePath:string,limits?:LocalPackageArchiveLimits):Promise<{directory:string;package?:string;version?:string;cleanup:()=> Promise<void>;}>;declare function installNpmPackageRuntimeDependencies(packageRoot:string,npmRunner?:typeof runNpmCommand):Promise<void>;declare function hasHostedPmCliDependency(manifest:{dependencies?:unknown;optionalDependencies?:unknown;peerDependencies?:unknown;}):boolean;declare function removeHostedPmCliDependency(manifest:Record<string,unknown>):void;declare function linkHostedPmCliDependency(packageRoot:string):Promise<void>;declare function resolveDirectorySymlinkType(platform:NodeJS.Platform):"dir"|"junction";declare function runtimeDependencyInstallSpecs(manifest:{dependencies?:unknown;optionalDependencies?:unknown;peerDependencies?:unknown;}):string[];declare function resolvePackageExtensionDirectory(packageRoot:string,sourceLabel:string):Promise<string>;
|
|
97
97
|
/** Implements resolve install source for the public runtime surface of this module. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{execFile as
|
|
2
|
-
${r}`,
|
|
3
|
-
${f}`,p.GENERIC_FAILURE)}}function E(e){const n=e.trim(),t=n.includes("@file:")?n.slice(0,n.lastIndexOf("@file:")):n;return t.startsWith("@")?t.match(/^(@[^/@\s]+\/[^/@\s]+)/)?.[1]??t:t.match(/^([^/@\s]+)/)?.[1]??t}const re=/^(?:(?:github|gitlab|bitbucket|gist):|git(?:\+[a-z]+)?:|[a-z][a-z0-9+.-]*:\/\/|[\w.-]+@[\w.-]+:)/iu;function ie(e){if(!S(e)){try{const n=v(e.trim());if((n.type==="git"||n.type==="remote")&&!n.name)return}catch{}return E(e)}}function oe(e){const n=e.trim();let t;try{t=v(n)}catch{return}if(!(t.type!=="git"||t.name||re.test(n)))throw new d(`npm:${n} names no local directory here, and npm would read it as a git repository.`,p.USAGE,{code:"npm_source_shorthand_ambiguous",required:"Spell the source explicitly: npm:./<path> for a local directory, or npm:github:<owner>/<repo> for a repository.",why:"A bare owner/repo npm spec means a local directory when one exists and a git host otherwise, so pm refuses to guess which code to install."})}function S(e){const n="@file:",t=e.lastIndexOf(n);return t>0&&e.slice(0,t).trim().length>0&&e.slice(t+n.length).trim().length>0}function se(e){const t=(e instanceof Error?e.message:String(e)).toLowerCase();return t.includes("npm err! code e404")||t.includes("404 not found")||t.includes("is not in this registry")}function ce(e){const t=(e instanceof Error?e.message:String(e)).toLowerCase();return se(e)||t.includes("not found")}function le(e){const n=e.trim().toLowerCase();return n.startsWith("@unbrained/pm-")||n.startsWith("pm-")}function pe(e){const n=E(e),t=le(n),a=n.replace(/^.*\//,""),i=t?`github.com/unbraind/${a}`:void 0,r=i?`pm package install --project ${i}`:void 0;return{message:t?`npm package "${e}" was not found in the registry. If this is an unpublished first-party pm package, install its GitHub repository instead.`:`npm package "${e}" was not found in the registry.`,context:{code:"npm_package_not_found",required:"Use an install source that exists, or publish the npm package before installing it with npm:<name>.",why:"Classifying npm 404s avoids repeated registry retries and gives agents a deterministic fallback path.",examples:r?[r,"pm package catalog --project --json"]:[`npm view ${n}`,"pm package catalog --project --json"],nextSteps:r?[`Try ${r} if the repository exists.`,"Use pm package catalog --project --json to inspect bundled package aliases before installing."]:[`Verify ${n} exists in the npm registry and that you have access to it.`,"Use pm package catalog --project --json to inspect bundled package aliases before installing."],recovery:{attempted_command:`pm install --project npm:${e}`,normalized_args:["install","--project",`npm:${e}`],...i&&r?{fallback_candidates:[{source:i,command:r,reason:"canonical first-party GitHub repository fallback for unpublished pm packages"}],next_best_command:r}:{}}}}}function de(e,n){if(!ce(n))return null;const t=pe(e);return new d(t.message,p.NOT_FOUND,t.context)}async function A(e){if(c.isAbsolute(e)||e.startsWith(".")||e.startsWith("..")){const n=c.resolve(process.cwd(),e);return await m(n)?n:null}try{const n=new URL(e);if(n.protocol==="file:"){const t=q(n);return await m(t)?t:null}}catch{}if(!/^[a-z][a-z0-9+.-]*:/i.test(e)){const n=c.resolve(process.cwd(),e);if(await m(n))return n}return null}async function $(e){const n=await A(e);if(n)return n;const t=ue(e);return t!==e?t:(/^[a-z][a-z0-9+.-]*:/i.test(e),e)}function ue(e,n=process.cwd()){const t="@file:",a=e.lastIndexOf(t);if(!S(e))return e;const i=e.slice(0,a),r=e.slice(a+t.length);if(r.startsWith("//")&&!r.startsWith("///"))return e;if(!r.startsWith("/"))return`${i}@${c.resolve(n,r)}`;let o;try{o=decodeURIComponent(new URL(`file:${r}`).pathname)}catch{return e}const s=/^\/[A-Za-z]:/.test(o)?o.slice(1):o;return`${i}@${s}`}function N(e,n){const t=c.resolve(e,n),a=c.relative(e,t);if(a.length===0||a===".."||a.startsWith(`..${c.sep}`)||c.isAbsolute(a))throw new d("npm pack reported a package archive outside its isolated destination.",p.GENERIC_FAILURE,{code:"npm_package_archive_unsafe",required:"Retry with a trusted npm client that writes its archive inside the requested pack destination.",why:"pm will not read a package-manager artifact outside the isolated directory created for this install."});return t}function me(e,n){if(typeof e!="object"||e===null||Array.isArray(e))return;const t=e;if(!(typeof t.filename!="string"||t.filename.trim().length===0))return{...n===void 0?{}:{key:n},filename:t.filename,...typeof t.name=="string"?{name:t.name}:{},...typeof t.version=="string"?{version:t.version}:{}}}function fe(e){return(Array.isArray(e)?e.map(t=>({value:t})):typeof e=="object"&&e!==null?Object.entries(e).map(([t,a])=>({key:t,value:a})):[]).flatMap(({key:t,value:a})=>{const i=me(a,t);return i?[i]:[]})}function he(e,n){const t=n?.trim().toLowerCase(),a=t?e.filter(o=>{const s=o.name?.trim().toLowerCase();return s!==void 0?s===t:o.key?.trim().toLowerCase()===t}):[];if(a.length===1)return a[0];if(e.length!==1)return;const i=e[0],r=i.name??i.key;return t&&r!==void 0&&r.trim().toLowerCase()!==t?void 0:i}function C(e,n,t){let a;try{a=JSON.parse(e)}catch{const o=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s.length>0).at(-1);if(!o)throw new d("npm pack did not report a tarball filename.",p.GENERIC_FAILURE);return{tarball:N(n,o)}}const i=fe(a),r=he(i,t);if(!r)throw new d("npm pack --json returned an unsupported or ambiguous package receipt.",p.GENERIC_FAILURE,{code:"npm_pack_json_shape_unsupported",required:"Use an npm client that returns an array of package receipts or an object keyed by package name, with exactly one requested package entry containing filename.",why:`Well-formed JSON contained ${i.length} usable package receipt(s), but pm could not select ${t??"one package"} deterministically.`});return{tarball:N(n,r.filename),package:r.name??r.key,version:r.version}}async function L(e){return U(e,_)}async function U(e,n){const t=await A(e.spec);if(t){if((await l.stat(t)).isFile()&&I(t))return w(t);const o=c.join(t,"package.json"),s=await m(o)?JSON.parse(await l.readFile(o,"utf8")):{};return{directory:await g(t,e.input),package:typeof s.name=="string"?s.name:void 0,version:typeof s.version=="string"?s.version:void 0,cleanup:async()=>{}}}oe(e.spec);const a=await l.mkdtemp(c.join(k.tmpdir(),"pm-npm-package-source-")),i=c.join(a,"pack");await l.mkdir(i,{recursive:!0});try{const r=await $(e.spec),o=await n(["pack",r,"--json","--pack-destination",i]),s=C(o,i,ie(e.spec));if(!await m(s.tarball))throw new d("npm pack did not create its reported package archive.",p.GENERIC_FAILURE,{code:"npm_package_archive_missing",required:"Retry the npm package install with a healthy registry and writable temporary directory.",why:"The package manager reported a tarball filename that was absent before validation, so pm cannot safely extract or install it."});const u=await w(s.tarball);return{directory:u.directory,package:s.package??u.package,version:s.version??u.version,cleanup:async()=>{try{await u.cleanup()}finally{await l.rm(a,{recursive:!0,force:!0})}}}}catch(r){await l.rm(a,{recursive:!0,force:!0});const o=de(e.spec,r);throw o||r}}function I(e){const n=e.toLowerCase();return n.endsWith(".tgz")||n.endsWith(".tar.gz")}function h(e){throw new d(e,p.USAGE,{code:"local_package_archive_unsafe",required:"Use a bounded npm .tgz or .tar.gz archive with one package/ root and no links or escaping paths.",why:"Package archives are untrusted input and must be validated before any entry reaches the filesystem."})}function R(e,n,t){if(e.meta)return;t.entries+=1,t.entries>n.maxEntries&&h(`Local package archive exceeds the ${n.maxEntries} entry limit.`);const a=e.path,i=a.split("/");(a.includes("\\")||a.startsWith("/")||/^[A-Za-z]:/u.test(a)||i.some(r=>r===".."))&&h(`Local package archive contains an escaping path: "${a}".`),i[0]!=="package"&&h(`Local package archive entry "${a}" is outside the required package/ root.`),(e.type==="SymbolicLink"||e.type==="Link")&&h(`Local package archive link "${a}" is not supported.`),e.type!=="File"&&e.type!=="OldFile"&&e.type!=="Directory"&&h(`Local package archive entry "${a}" uses unsupported type "${e.type}".`),e.size>n.maxEntryBytes&&h(`Local package archive entry "${a}" exceeds the ${n.maxEntryBytes} byte entry limit.`),t.expandedBytes+=e.size,t.expandedBytes>n.maxExpandedBytes&&h(`Local package archive exceeds the ${n.maxExpandedBytes} expanded byte limit.`),a==="package/package.json"&&(t.packageJsonEntries+=1)}async function w(e,n=Y){(await l.stat(e)).size>n.maxArchiveBytes&&h(`Local package archive exceeds the ${n.maxArchiveBytes} archive byte limit.`);const a=await l.mkdtemp(c.join(k.tmpdir(),"pm-local-package-archive-")),i=c.join(a,"extract");await l.mkdir(i,{recursive:!0});const r={entries:0,expandedBytes:0,packageJsonEntries:0};let o;try{if(await K({file:e,strict:!0,maxDecompressionRatio:100,onReadEntry:M=>{if(o===void 0)try{R(M,n,r)}catch(B){o=B}}}),o!==void 0)throw o;r.packageJsonEntries!==1&&h(`Local package archive must contain exactly one package/package.json entry; found ${r.packageJsonEntries}.`),await H({file:e,cwd:i,strict:!0,preservePaths:!1,preserveOwner:!1,noMtime:!0,unlink:!0,maxDepth:64,maxDecompressionRatio:100});const s=c.join(i,"package"),u=c.join(s,"package.json"),f=JSON.parse(await l.readFile(u,"utf8"));return await O(s),{directory:await g(s,e),package:typeof f.name=="string"?f.name:void 0,version:typeof f.version=="string"?f.version:void 0,cleanup:async()=>{await l.rm(a,{recursive:!0,force:!0})}}}catch(s){throw await l.rm(a,{recursive:!0,force:!0}),s}}async function O(e,n=_){const t=c.join(e,"package.json");if(!await m(t))return;let a;try{a=JSON.parse(await l.readFile(t,"utf8"))}catch{return}if(typeof a!="object"||a===null)return;const i=a,r=W(i),o=G(i);if(r.length===0&&!o)return;const s={...a};delete s.devDependencies;const u={...s};F(u),await l.writeFile(t,`${JSON.stringify(u,null,2)}
|
|
4
|
-
`,"utf8");try{await Promise.all([l.rm(c.join(e,"package-lock.json"),{force:!0}),l.rm(c.join(e,"npm-shrinkwrap.json"),{force:!0})]),r.length>0&&await n(["install","--ignore-scripts","--no-audit","--fund=false","--package-lock=false","--no-save","--omit=peer","--"],e),o&&await
|
|
5
|
-
`,"utf8")}}function
|
|
1
|
+
import{execFile as X}from"node:child_process";import l from"node:fs/promises";import x from"node:os";import c from"node:path";import{Readable as Z,Writable as Q}from"node:stream";import{pipeline as Y}from"node:stream/promises";import{fileURLToPath as ee}from"node:url";import{promisify as te}from"node:util";import{createGunzip as ne}from"node:zlib";import _ from"npm-package-arg";import{extract as ae,Parser as re}from"tar";import{collectPackageExtensionDirectories as ie}from"../../core/packages/manifest.js";import{resolvePmPackageRootFromModule as oe}from"../../core/packages/root.js";import{pathExists as h}from"../../core/fs/fs-utils.js";import{isPathWithinDirectory as se}from"../../core/fs/path-utils.js";import{EXIT_CODE as u}from"../../core/shared/constants.js";import{PmCliError as p}from"../../core/shared/errors.js";import{listBundledPackageAliases as ce}from"./bundled-catalog.js";const L=te(X),k="@unbrained/pm-cli",le={maxArchiveBytes:64*1024*1024,maxEntries:4096,maxExpandedBytes:256*1024*1024,maxEntryBytes:64*1024*1024},N=100;let E;async function pe(e,n=process.cwd()){const t=e.trim();if(!/^(@[^/\\\s]+\/[^/\\\s]+|[^@/\\\s][^/\\\s]*)$/u.test(t))return null;let a=c.resolve(n);for(;;){const i=c.join(a,"node_modules",...t.split("/")),r=c.join(i,"package.json");if(await h(r))try{const s=JSON.parse(await l.readFile(r,"utf8"));if(s.name===t)return{package:t,...typeof s.version=="string"?{version:s.version}:{},directory:i}}catch{return null}const o=c.dirname(a);if(o===a)return null;a=o}}function P(e,n,t){const a=e.split("/").map(g=>g.trim()).filter(g=>g.length>0);if(a.length<2)return null;const i=a[0],r=a[1].replace(/\.git$/i,"");if(i.length===0||r.length===0)return null;const o=a.slice(2);let s,d;return o[0]==="tree"&&o.length>=2?(s=o[1],d=o.slice(2).join("/")):o.length>0&&(d=o.join("/")),typeof t=="string"&&t.trim().length>0&&(s=t.trim()),{kind:"github",input:n,owner:i,repo:r,repository:`https://github.com/${i}/${r}.git`,ref:s,subpath:d&&d.length>0?d:void 0}}function de(e,n,t){const a=e.slice(4).trim();if(a.length===0)throw new p('npm package source must include a package spec after "npm:".',u.USAGE);if(n)throw new p('Options "--gh/--github" cannot be combined with npm: package sources.',u.USAGE);if(t)throw new p('Option "--ref" cannot be combined with npm: package sources.',u.USAGE);return{kind:"npm",input:e,spec:a}}function Qe(e,n={}){const t=e.trim();if(t.length===0)throw new p("Extension source is required for --install.",u.USAGE);const a=typeof n.ref=="string"&&n.ref.trim().length>0?n.ref.trim():void 0;if(t.startsWith("npm:"))return de(t,n.forceGithub===!0,a);const i=(()=>{try{const o=new URL(t);if(o.hostname!=="github.com")return null;const s=o.pathname.replace(/^\/+/,"");return P(s,t,a)}catch{return null}})();if(i)return i;const r=t.startsWith("github.com/")?t.slice(11):null;if(r){const o=P(r,t,a);if(!o)throw new p(`Invalid GitHub source "${t}".`,u.USAGE);return o}if(n.forceGithub){const o=P(t,t,a);if(!o)throw new p(`Invalid GitHub shorthand "${t}".`,u.USAGE);return o}if(/^https?:\/\//i.test(t))throw new p(`Unsupported extension source URL "${t}". Supported remote source host: github.com.`,u.USAGE);return{kind:"local",input:t,absolute_path:c.resolve(process.cwd(),t)}}async function C(e,n=L,t){try{return((await n("git",e,{encoding:"utf8",timeout:t})).stdout??"").trim()}catch(a){const i=typeof a=="object"&&a!==null&&"stderr"in a?String(a.stderr):"",r=i.trim().length>0?i.trim():a instanceof Error?a.message:String(a);throw new p(`Git command failed: git ${e.join(" ")}
|
|
2
|
+
${r}`,u.GENERIC_FAILURE)}}function ue(e=process.platform){return e==="win32"?"npm.cmd":"npm"}function me(e=process.platform){return e==="win32"}async function A(e,n,t=L,a=process.platform,i=process.env){const r=ue(a),o=Object.fromEntries(Object.entries(i).filter(([s])=>s.toLowerCase()!=="npm_config_allow_scripts"));o.NPM_CONFIG_ALLOW_SCRIPTS="";try{return((await t(r,e,{cwd:n,encoding:"utf8",env:o,shell:me(a)})).stdout??"").trim()}catch(s){const d=typeof s=="object"&&s!==null&&"stderr"in s?String(s.stderr):"",g=d.trim().length>0?d.trim():s instanceof Error?s.message:String(s);throw new p(`npm command failed: ${r} ${e.join(" ")}
|
|
3
|
+
${g}`,u.GENERIC_FAILURE)}}function S(e){const n=e.trim(),t=n.includes("@file:")?n.slice(0,n.lastIndexOf("@file:")):n;return t.startsWith("@")?t.match(/^(@[^/@\s]+\/[^/@\s]+)/)?.[1]??t:t.match(/^([^/@\s]+)/)?.[1]??t}const fe=/^(?:(?:github|gitlab|bitbucket|gist):|git(?:\+[a-z]+)?:|[a-z][a-z0-9+.-]*:\/\/|[\w.-]+@[\w.-]+:)/iu;function he(e){if(!U(e)){try{const n=_(e.trim());if((n.type==="git"||n.type==="remote")&&!n.name)return}catch{}return S(e)}}function ge(e){const n=e.trim();let t;try{t=_(n)}catch{return}if(!(t.type!=="git"||t.name||fe.test(n)))throw new p(`npm:${n} names no local directory here, and npm would read it as a git repository.`,u.USAGE,{code:"npm_source_shorthand_ambiguous",required:"Spell the source explicitly: npm:./<path> for a local directory, or npm:github:<owner>/<repo> for a repository.",why:"A bare owner/repo npm spec means a local directory when one exists and a git host otherwise, so pm refuses to guess which code to install."})}function U(e){const n="@file:",t=e.lastIndexOf(n);return t>0&&e.slice(0,t).trim().length>0&&e.slice(t+n.length).trim().length>0}function ye(e){const t=(e instanceof Error?e.message:String(e)).toLowerCase();return t.includes("npm err! code e404")||t.includes("404 not found")||t.includes("is not in this registry")}function we(e){const t=(e instanceof Error?e.message:String(e)).toLowerCase();return ye(e)||t.includes("not found")}function ke(e){const n=e.trim().toLowerCase();return n.startsWith("@unbrained/pm-")||n.startsWith("pm-")}function be(e){const n=S(e),t=ke(n),a=n.replace(/^.*\//,""),i=t?`github.com/unbraind/${a}`:void 0,r=i?`pm package install --project ${i}`:void 0;return{message:t?`npm package "${e}" was not found in the registry. If this is an unpublished first-party pm package, install its GitHub repository instead.`:`npm package "${e}" was not found in the registry.`,context:{code:"npm_package_not_found",required:"Use an install source that exists, or publish the npm package before installing it with npm:<name>.",why:"Classifying npm 404s avoids repeated registry retries and gives agents a deterministic fallback path.",examples:r?[r,"pm package catalog --project --json"]:[`npm view ${n}`,"pm package catalog --project --json"],nextSteps:r?[`Try ${r} if the repository exists.`,"Use pm package catalog --project --json to inspect bundled package aliases before installing."]:[`Verify ${n} exists in the npm registry and that you have access to it.`,"Use pm package catalog --project --json to inspect bundled package aliases before installing."],recovery:{attempted_command:`pm install --project npm:${e}`,normalized_args:["install","--project",`npm:${e}`],...i&&r?{fallback_candidates:[{source:i,command:r,reason:"canonical first-party GitHub repository fallback for unpublished pm packages"}],next_best_command:r}:{}}}}}function ve(e,n){if(!we(n))return null;const t=be(e);return new p(t.message,u.NOT_FOUND,t.context)}async function I(e){if(c.isAbsolute(e)||e.startsWith(".")||e.startsWith("..")){const n=c.resolve(process.cwd(),e);return await h(n)?n:null}try{const n=new URL(e);if(n.protocol==="file:"){const t=ee(n);return await h(t)?t:null}}catch{}if(!/^[a-z][a-z0-9+.-]*:/i.test(e)){const n=c.resolve(process.cwd(),e);if(await h(n))return n}return null}async function O(e){const n=await I(e);if(n)return n;const t=xe(e);return t!==e?t:(/^[a-z][a-z0-9+.-]*:/i.test(e),e)}function xe(e,n=process.cwd()){const t="@file:",a=e.lastIndexOf(t);if(!U(e))return e;const i=e.slice(0,a),r=e.slice(a+t.length);if(r.startsWith("//")&&!r.startsWith("///"))return e;if(!r.startsWith("/"))return`${i}@${c.resolve(n,r)}`;let o;try{o=decodeURIComponent(new URL(`file:${r}`).pathname)}catch{return e}const s=/^\/[A-Za-z]:/.test(o)?o.slice(1):o;return`${i}@${s}`}function R(e,n){const t=c.resolve(e,n),a=c.relative(e,t);if(a.length===0||a===".."||a.startsWith(`..${c.sep}`)||c.isAbsolute(a))throw new p("npm pack reported a package archive outside its isolated destination.",u.GENERIC_FAILURE,{code:"npm_package_archive_unsafe",required:"Retry with a trusted npm client that writes its archive inside the requested pack destination.",why:"pm will not read a package-manager artifact outside the isolated directory created for this install."});return t}function _e(e,n){if(typeof e!="object"||e===null||Array.isArray(e))return;const t=e;if(!(typeof t.filename!="string"||t.filename.trim().length===0))return{...n===void 0?{}:{key:n},filename:t.filename,...typeof t.name=="string"?{name:t.name}:{},...typeof t.version=="string"?{version:t.version}:{}}}function Ee(e){return(Array.isArray(e)?e.map(t=>({value:t})):typeof e=="object"&&e!==null?Object.entries(e).map(([t,a])=>({key:t,value:a})):[]).flatMap(({key:t,value:a})=>{const i=_e(a,t);return i?[i]:[]})}function Pe(e,n){const t=n?.trim().toLowerCase(),a=t?e.filter(o=>{const s=o.name?.trim().toLowerCase();return s!==void 0?s===t:o.key?.trim().toLowerCase()===t}):[];if(a.length===1)return a[0];if(e.length!==1)return;const i=e[0],r=i.name??i.key;return t&&r!==void 0&&r.trim().toLowerCase()!==t?void 0:i}function G(e,n,t){let a;try{a=JSON.parse(e)}catch{const o=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s.length>0).at(-1);if(!o)throw new p("npm pack did not report a tarball filename.",u.GENERIC_FAILURE);return{tarball:R(n,o)}}const i=Ee(a),r=Pe(i,t);if(!r)throw new p("npm pack --json returned an unsupported or ambiguous package receipt.",u.GENERIC_FAILURE,{code:"npm_pack_json_shape_unsupported",required:"Use an npm client that returns an array of package receipts or an object keyed by package name, with exactly one requested package entry containing filename.",why:`Well-formed JSON contained ${i.length} usable package receipt(s), but pm could not select ${t??"one package"} deterministically.`});return{tarball:R(n,r.filename),package:r.name??r.key,version:r.version}}async function z(e){return F(e,A)}async function F(e,n){const t=await I(e.spec);if(t){if((await l.stat(t)).isFile()&&D(t))return b(t);const o=c.join(t,"package.json"),s=await h(o)?JSON.parse(await l.readFile(o,"utf8")):{};return{directory:await w(t,e.input),package:typeof s.name=="string"?s.name:void 0,version:typeof s.version=="string"?s.version:void 0,cleanup:async()=>{}}}ge(e.spec);const a=await l.mkdtemp(c.join(x.tmpdir(),"pm-npm-package-source-")),i=c.join(a,"pack");await l.mkdir(i,{recursive:!0});try{const r=await O(e.spec),o=await n(["pack",r,"--json","--pack-destination",i]),s=G(o,i,he(e.spec));if(!await h(s.tarball))throw new p("npm pack did not create its reported package archive.",u.GENERIC_FAILURE,{code:"npm_package_archive_missing",required:"Retry the npm package install with a healthy registry and writable temporary directory.",why:"The package manager reported a tarball filename that was absent before validation, so pm cannot safely extract or install it."});const d=await b(s.tarball);return{directory:d.directory,package:s.package??d.package,version:s.version??d.version,cleanup:async()=>{try{await d.cleanup()}finally{await l.rm(a,{recursive:!0,force:!0})}}}}catch(r){await l.rm(a,{recursive:!0,force:!0});const o=ve(e.spec,r);throw o||r}}function D(e){const n=e.toLowerCase();return n.endsWith(".tgz")||n.endsWith(".tar.gz")}function f(e){throw new p(e,u.USAGE,{code:"local_package_archive_unsafe",required:"Use a bounded npm .tgz or .tar.gz archive with one package/ root and no links or escaping paths.",why:"Package archives are untrusted input and must be validated before any entry reaches the filesystem."})}function Ae(e,n){(e.type==="SymbolicLink"||e.type==="Link")&&f(`Local package archive link "${n}" is not supported.`),e.type!=="File"&&e.type!=="OldFile"&&e.type!=="Directory"&&f(`Local package archive entry "${n}" uses unsupported type "${e.type}".`),(e.header.linkpath||e.extended?.linkpath||e.globalExtended?.linkpath)&&f(`Local package archive entry "${n}" names a link target but is not a link.`)}function W(e,n,t){t.entries+=1,t.entries>n.maxEntries&&f(`Local package archive exceeds the ${n.maxEntries} entry limit.`);const a=e.path,i=a.split("/");(a.includes("\\")||a.startsWith("/")||/^[A-Za-z]:/u.test(a)||i.some(r=>r===".."))&&f(`Local package archive contains an escaping path: "${a}".`),i[0]!=="package"&&f(`Local package archive entry "${a}" is outside the required package/ root.`),Ae(e,a),e.size>n.maxEntryBytes&&f(`Local package archive entry "${a}" exceeds the ${n.maxEntryBytes} byte entry limit.`),t.expandedBytes+=e.size,t.expandedBytes>n.maxExpandedBytes&&f(`Local package archive exceeds the ${n.maxExpandedBytes} expanded byte limit.`),a==="package/package.json"&&(t.packageJsonEntries+=1)}async function Se(e,n){const t=await l.open(e,"r");try{const{size:a}=await t.stat();a>n&&f(`Local package archive exceeds the ${n} archive byte limit.`);const i=new Uint8Array(a+1);let r=0,o;do({bytesRead:o}=await t.read(i,r,i.length-r,r)),r+=o;while(o>0&&r<i.length);return r!==a&&f("Local package archive changed while it was being read."),i.subarray(0,r)}finally{await t.close()}}function je(e){let n=e.length;for(;n>0&&e[n-1]===0;)n-=1;return n}async function $e(e,n){(e[0]!==31||e[1]!==139)&&f("Local package archive is not gzip-compressed; npm package archives are gzip .tgz files.");const t=N,a=`Local package archive exceeds the ${t}x decompression ratio.`,i={entries:0,expandedBytes:0,packageJsonEntries:0},r=new re({strict:!0});let o=0,s=0,d=0;const g=()=>{try{return r.next()}catch(m){return f(`Local package archive is not a valid tar archive (${String(m)}).`)}},j=()=>{for(let m=g();m!==void 0;m=g())m.type==="entry"&&W(m.entry,n,i),m.type==="end"&&(d=r.position)},K=m=>{const $=o;o+=m.length,o>e.length*t&&f(a);const y=je(m);y>0&&(s=$+y),r.push(m),j()},v=ne();try{await Y(Z.from([e]),v,new Q({write(m,$,y){try{K(m),y()}catch(V){y(V)}}}))}catch(m){if(m instanceof p)throw m;f(`Local package archive is not one complete gzip stream (${String(m)}).`)}return r.end(),j(),e.subarray(v.bytesWritten).every(m=>m===0)||f("Local package archive has data after its gzip stream."),o>v.bytesWritten*t&&f(a),s>d&&f("Local package archive has tar data after its end of archive, which would not be installed."),{packageJsonEntries:i.packageJsonEntries}}async function b(e,n=le){const t=await Se(e,n.maxArchiveBytes),a=await $e(t,n),i=await l.mkdtemp(c.join(x.tmpdir(),"pm-local-package-archive-")),r=c.join(i,"extract");await l.mkdir(r,{recursive:!0});try{a.packageJsonEntries!==1&&f(`Local package archive must contain exactly one package/package.json entry; found ${a.packageJsonEntries}.`),await ae({input:t,file:e,cwd:r,strict:!0,preservePaths:!1,preserveOwner:!1,noMtime:!0,unlink:!0,maxDepth:64,maxDecompressionRatio:N});const o=c.join(r,"package"),s=c.join(o,"package.json"),d=JSON.parse(await l.readFile(s,"utf8"));return await M(o),{directory:await w(o,e),package:typeof d.name=="string"?d.name:void 0,version:typeof d.version=="string"?d.version:void 0,cleanup:async()=>{await l.rm(i,{recursive:!0,force:!0})}}}catch(o){throw await l.rm(i,{recursive:!0,force:!0}),o}}async function M(e,n=A){const t=c.join(e,"package.json");if(!await h(t))return;let a;try{a=JSON.parse(await l.readFile(t,"utf8"))}catch{return}if(typeof a!="object"||a===null)return;const i=a,r=H(i),o=J(i);if(r.length===0&&!o)return;const s={...a};delete s.devDependencies;const d={...s};T(d),await l.writeFile(t,`${JSON.stringify(d,null,2)}
|
|
4
|
+
`,"utf8");try{await Promise.all([l.rm(c.join(e,"package-lock.json"),{force:!0}),l.rm(c.join(e,"npm-shrinkwrap.json"),{force:!0})]),r.length>0&&await n(["install","--ignore-scripts","--no-audit","--fund=false","--package-lock=false","--no-save","--omit=peer","--"],e),o&&await q(e)}finally{await l.writeFile(t,`${JSON.stringify(s,null,2)}
|
|
5
|
+
`,"utf8")}}function J(e){for(const n of[e.dependencies,e.optionalDependencies,e.peerDependencies])if(typeof n=="object"&&n!==null&&k in n)return!0;return!1}function T(e){for(const n of["dependencies","optionalDependencies","peerDependencies"]){const t=e[n];if(typeof t!="object"||t===null)continue;const a={...t};delete a[k],Object.keys(a).length===0?delete e[n]:e[n]=a}}async function q(e){const n=oe(import.meta.url,["../../.."]),[t,a]=k.split("/"),i=c.join(e,"node_modules",t),r=c.join(i,a);await l.mkdir(i,{recursive:!0}),await l.rm(r,{recursive:!0,force:!0}),await l.symlink(n,r,B(process.platform))}function B(e){return e==="win32"?"junction":"dir"}function Le(e,n){if(e.startsWith("-"))throw new p(`Extension runtime dependency name "${e}" is unsafe because npm could interpret it as a command-line option.`,u.USAGE,{code:"extension_dependency_name_unsafe",required:"Use a valid npm package name that does not begin with a dash.",why:"Extension manifests are untrusted input and dependency names must never become npm options."});if([...n].some(a=>{const i=a.charCodeAt(0);return i<=31||i===127||"&|;()`\"'".includes(a)}))throw new p(`Extension runtime dependency "${e}" has an unsafe version specifier.`,u.USAGE,{code:"extension_dependency_version_unsafe",required:"Use an npm version, range, dist-tag, URL, or file specifier without shell metacharacters.",why:"npm.cmd requires a command shell on Windows, so untrusted shell metacharacters cannot be forwarded."});try{_.resolve(e,n)}catch{throw new p(`Extension runtime dependency "${e}@${n}" is not a valid npm dependency specifier.`,u.USAGE,{code:"extension_dependency_spec_invalid",required:"Use a valid npm package name and npm-supported version, range, dist-tag, URL, or file specifier.",why:"Only grammar-validated dependency specs may be written to the isolated runtime install manifest."})}return`${e}@${n}`}function H(e){const n=new Map;for(const t of[e.dependencies,e.optionalDependencies,e.peerDependencies])if(!(typeof t!="object"||t===null))for(const[a,i]of Object.entries(t)){if(a===k||typeof i!="string"||i.trim().length===0||n.has(a))continue;const r=i.trim();n.set(a,Le(a,r))}return[...n.values()]}async function w(e,n){const t=await ie(e);if(t.length===1)return t[0];if(t.length>1){const a=t.map(i=>c.relative(e,i).replaceAll(c.sep,"/")).sort((i,r)=>i.localeCompare(r));throw new p(`Package source "${n}" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${a.join(", ")}`,u.USAGE)}throw new p(`Unable to locate a pm extension manifest in package source "${n}". Package installs currently activate only extension resources, so add package.json pm.extensions or an extensions/ directory. Metadata-only resources like pm.docs/pm.examples are catalog metadata and do not activate commands.`,u.USAGE)}async function Ne(e,n){const t=[];n.subpath&&(t.push(n.subpath),t.push(c.posix.join(".agents/pm/extensions",n.subpath)),t.push(c.posix.join(".custom/pm-extensions",n.subpath)),t.push(c.posix.join(".custom/pm-extension",n.subpath)));for(const i of t){const r=c.resolve(e,i);if(se(e,r)&&await h(c.join(r,"manifest.json")))return{directory:r,resolved_subpath:i}}if(await h(c.join(e,"manifest.json")))return{directory:e,resolved_subpath:"."};const a=await w(e,n.input);return{directory:a,resolved_subpath:c.relative(e,a).replaceAll(c.sep,"/")}}function Ce(e){const n=e.trim();return n.length===0||n.startsWith(".")||n.startsWith("~")?!1:n.startsWith("@")?n.split("/").length===2:!n.includes("/")&&!n.includes("\\")}async function Ue(e){const n=`Local extension source does not exist: "${e.absolute_path}".`,t=e.input.trim();if(!Ce(t))return new p(n,u.NOT_FOUND);let a=[];try{const r=process.env.PM_CLI_PACKAGE_ROOT,o=typeof r=="string"&&r.trim().length>0?c.resolve(r.trim()):"";E?.key!==o&&(E={key:o,aliases:await ce()}),a=E.aliases}catch{}const i=[`Retry with pm package install npm:${t} if the package is published to npm.`,`Or inspect bundled packages with pm package catalog --project --json before installing by alias. Known aliases (blank means none found): ${a.join(", ")}`];return new p(`${n} "${t}" did not match a local directory, bundled package alias, or bundled package name; if you meant an npm package, install it as "npm:${t}".`,u.NOT_FOUND,{code:"local_source_not_found_bare_name",required:`Use "npm:${t}" for npm registry packages, a bundled catalog alias, or an existing local directory path.`,why:"Bare names resolve as local paths only after bundled aliases, so unmatched names need an explicit npm: source.",examples:[`pm package install npm:${t}`,"pm package catalog --project --json"],nextSteps:i,recovery:{attempted_command:`pm install ${t}`,normalized_args:["install",t],next_best_command:`pm package install npm:${t}`}})}async function Ye(e){if(e.kind==="local"){let a;try{a=await l.stat(e.absolute_path)}catch{throw await Ue(e)}if(a.isFile()&&D(e.absolute_path)){const r=await b(e.absolute_path);return{source:e,directory:r.directory,source_root:c.dirname(r.directory),resolved_subpath:c.relative(c.dirname(r.directory),r.directory).replaceAll(c.sep,"/"),npm_package:r.package,npm_version:r.version,cleanup:r.cleanup}}if(!a.isDirectory())throw new p(`Local extension source must be a directory or npm .tgz/.tar.gz archive: "${e.absolute_path}".`,u.USAGE);const i=await w(e.absolute_path,e.input);return{source:e,directory:i,source_root:e.absolute_path}}if(e.kind==="npm"){const a=await z(e);return{source:e,directory:a.directory,source_root:c.dirname(a.directory),cleanup:a.cleanup,resolved_subpath:c.relative(c.dirname(a.directory),a.directory).replaceAll(c.sep,"/"),npm_package:a.package,npm_version:a.version}}const n=await l.mkdtemp(c.join(x.tmpdir(),"pm-extension-source-")),t=["clone","--depth","1"];e.ref&&t.push("--branch",e.ref),t.push(e.repository,n);try{await C(t);const a=await C(["-C",n,"rev-parse","HEAD"]),i=await Ne(n,e);return{source:e,directory:i.directory,source_root:n,resolved_subpath:i.resolved_subpath,commit:a,cleanup:async()=>{await l.rm(n,{recursive:!0,force:!0})}}}catch(a){throw await l.rm(n,{recursive:!0,force:!0}),a}}async function et(e,n){if(!await h(e)||!await h(n))return!1;const[t,a]=await Promise.all([l.realpath(e),l.realpath(n)]);return t===a}const tt={extractLocalPackageArchive:b,validateLocalPackageArchiveEntry:W,installNpmPackageRuntimeDependencies:M,npmPackageNameFromSpec:S,parsePackedNpmPackage:G,resolveNpmSourceDirectoryWithRunner:F,resolveNpmSourceDirectory:z,resolveNpmPackSpec:O,findInstalledNpmPackageCandidate:pe,resolvePackageExtensionDirectory:w,runtimeDependencyInstallSpecs:H,hasHostedPmCliDependency:J,removeHostedPmCliDependency:T,linkHostedPmCliDependency:q,resolveDirectorySymlinkType:B,runNpmCommand:A};export{tt as _testOnlyInstallSources,et as areDirectoriesEquivalent,be as buildNpmNotFoundRecovery,pe as findInstalledNpmPackageCandidate,ye as isNpmNotFoundError,we as isNpmPackNotFoundError,xe as normalizeNpmLocalFileAliasSpec,Qe as parseExtensionInstallSource,Ye as resolveInstallSource,ue as resolveNpmCommandName,C as runGitCommand,me as shouldRunNpmCommandInShell,ve as wrapNpmPackResolutionError};
|
|
6
6
|
//# sourceMappingURL=install-sources.js.map
|
package/marketplace.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"pm","owner":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"description":"Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.","version":"2026.12.
|
|
1
|
+
{"name":"pm","owner":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"description":"Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.","version":"2026.12.2","plugins":[{"name":"pm-claude","source":"./plugins/pm-claude","description":"Native pm CLI integration for Claude Code — 32 MCP tools, 14 workflow skills with slash invocations, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.","version":"2026.12.2","author":{"name":"unbrained","url":"https://github.com/unbraind/pm-cli"},"homepage":"https://github.com/unbraind/pm-cli","repository":"https://github.com/unbraind/pm-cli","license":"MIT","keywords":["pm-cli","project-management","mcp","tasks","agents","workflows","git-native","task-tracker","ai"],"category":"productivity"}]}
|