@unbrained/pm-cli 2026.7.18 → 2026.7.19
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 +2 -2
- package/CHANGELOG.md +17 -0
- package/dist/cli/commands/claim.js +6 -4
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/comments.js +5 -2
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/context.d.ts +10 -1
- package/dist/cli/commands/context.js +44 -6
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.js +15 -4
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/next.js +13 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/update.js +14 -3
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/error-guidance.js +23 -4
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +11 -0
- package/dist/cli/extension-command-help.js +62 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/main.d.ts +1 -0
- package/dist/cli/main.js +16 -11
- package/dist/cli/main.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +326 -350
- package/dist/cli-bundle/chunks/{append-5YF3TO7I.js → append-MBXHNWSX.js} +5 -5
- package/dist/cli-bundle/chunks/append-XUYF7NON.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-BIRYX32V.js → chunk-2UCG5H6B.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VE6ZSTQW.js → chunk-2XPDCXK5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-I3INI567.js → chunk-3EZZTFL2.js} +909 -124
- package/dist/cli-bundle/chunks/chunk-3EZZTFL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GLZKZON6.js → chunk-3HSRP6T2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XWBD6DSR.js → chunk-3KPNOZOH.js} +23 -23
- package/dist/cli-bundle/chunks/{chunk-MR4SHYR4.js → chunk-3QNUDDY2.js} +104 -23
- package/dist/cli-bundle/chunks/chunk-3QNUDDY2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SIPOACV5.js → chunk-46Z6FAVP.js} +888 -124
- package/dist/cli-bundle/chunks/chunk-46Z6FAVP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HO4DLBNK.js → chunk-4M6RZJXF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RXPQ5Q23.js → chunk-4PSJVGRE.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-ADXDCAKP.js → chunk-5S6IZXK7.js} +146 -32
- package/dist/cli-bundle/chunks/{chunk-IL5SPRMH.js.map → chunk-5S6IZXK7.js.map} +7 -1
- package/dist/cli-bundle/chunks/chunk-66SRNEBK.js +143 -0
- package/dist/cli-bundle/chunks/chunk-66SRNEBK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YFE7JHX3.js → chunk-6BNV3G6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-43UMFKCK.js → chunk-6V4T4RD3.js} +23 -23
- package/dist/cli-bundle/chunks/chunk-77XFQRTD.js +140 -0
- package/dist/cli-bundle/chunks/chunk-77XFQRTD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EHJFUOXL.js → chunk-7B7IHMLH.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-I7DIDUSP.js → chunk-7CHWLT2J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L6FVNR7X.js → chunk-A3GAQLBH.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-B57RJHBZ.js → chunk-A4FVWFZY.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-D52ZN3BF.js → chunk-A5EQPNV7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZAE66GQ.js → chunk-AGEBQRBG.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-WU3KAN6A.js → chunk-AQUNTB7G.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OGVTB5VO.js → chunk-AR24KW26.js} +237 -36
- package/dist/cli-bundle/chunks/chunk-AR24KW26.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XWYQ2LT4.js → chunk-BBGR4FKQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HTXXXF45.js → chunk-BDC4TW4B.js} +98 -24
- package/dist/cli-bundle/chunks/chunk-BDC4TW4B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2FUOXSRN.js → chunk-BFJP4VYC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-633PKXLT.js → chunk-BZKE2O5V.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XPUTSGJU.js → chunk-CZA2DXCV.js} +230 -36
- package/dist/cli-bundle/chunks/chunk-CZA2DXCV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KX62NMZC.js → chunk-D35WYXWC.js} +626 -5
- package/dist/cli-bundle/chunks/chunk-D35WYXWC.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-DOASIOQR.js +289 -0
- package/dist/cli-bundle/chunks/chunk-DOASIOQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L337QKWJ.js → chunk-DUDLSQFG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-BVLOMU6O.js → chunk-E7KBMWEF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3QDR6ZLU.js → chunk-EAV3P54W.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-3QDR6ZLU.js.map → chunk-EAV3P54W.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQXRZMFN.js → chunk-EEECAV5M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-35FHWD4C.js → chunk-EI3UIMZM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RGMWJLXF.js → chunk-EVAN5VJA.js} +8 -5
- package/dist/cli-bundle/chunks/{chunk-RGMWJLXF.js.map → chunk-EVAN5VJA.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PT7MCCGD.js → chunk-FIUTBFC6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7H5NNCJ5.js → chunk-FQF6VVPH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6DYOZS6C.js → chunk-FQO5THHM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5HGZKQUL.js → chunk-FQODDTE7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-67RO3H4N.js → chunk-G33XIMRT.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-D53RTYVI.js → chunk-GFZB5CLP.js} +20 -10
- package/dist/cli-bundle/chunks/chunk-GFZB5CLP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QWBKN3QC.js → chunk-GKCEEXMA.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-DG2EQRIH.js → chunk-GRDK25BN.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-FXFCFL73.js → chunk-H3YKUVDR.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-IL5SPRMH.js → chunk-IEMXESIS.js} +123 -16
- package/dist/cli-bundle/chunks/chunk-IEMXESIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ARGDWQ4J.js → chunk-IGBBTPM5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QPGQNLPI.js → chunk-IR3GOO6E.js} +3842 -4109
- package/dist/cli-bundle/chunks/chunk-IR3GOO6E.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FY4RLHSC.js → chunk-IRJ6F23W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-66MKH7SZ.js → chunk-IXG5CMBR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-F3VC3GOV.js → chunk-JBW2S2C6.js} +2090 -253
- package/dist/cli-bundle/chunks/chunk-JBW2S2C6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7UCY6DR5.js → chunk-JPWUZOMR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FVNWHUME.js → chunk-K2L6FZBX.js} +8 -8
- package/dist/cli-bundle/chunks/chunk-KGPLSHJD.js +286 -0
- package/dist/cli-bundle/chunks/chunk-KGPLSHJD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YQEZWI3R.js → chunk-KZ5AC6B5.js} +5 -3
- package/dist/cli-bundle/chunks/chunk-KZ5AC6B5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X2MGQMZO.js → chunk-LT5UWU7H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KH6QAHME.js → chunk-M4B4RK4J.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QRZNCRNA.js → chunk-MI3346YW.js} +377 -240
- package/dist/cli-bundle/chunks/chunk-MI3346YW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2XOSFSTH.js → chunk-MQOSMBWV.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-YIIIAKCE.js → chunk-MRXAHR4B.js} +28 -22
- package/dist/cli-bundle/chunks/chunk-MRXAHR4B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7R6UIHYY.js → chunk-N2TEEOXJ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NTRQLE2R.js → chunk-N7FCFJ76.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-37DRDP2B.js → chunk-NPEYH6CE.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-GKPCTQYG.js → chunk-NTS2RKHN.js} +3942 -4216
- package/dist/cli-bundle/chunks/chunk-NTS2RKHN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6VHUGVNP.js → chunk-ODEIDKGW.js} +2062 -246
- package/dist/cli-bundle/chunks/chunk-ODEIDKGW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2CXL335K.js → chunk-OK7VSX3N.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NNANAWFH.js → chunk-OKPZDH43.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-G6MYGULG.js → chunk-OKWJUL6F.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HPAYDSR2.js → chunk-P24ZU5QV.js} +27 -21
- package/dist/cli-bundle/chunks/chunk-P24ZU5QV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TGBTLGPX.js → chunk-Q4PSG2GV.js} +13 -4
- package/dist/cli-bundle/chunks/{chunk-TGBTLGPX.js.map → chunk-Q4PSG2GV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5UKQLQM2.js → chunk-Q5NHJ6RO.js} +6 -4
- package/dist/cli-bundle/chunks/chunk-Q5NHJ6RO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D5XHO4Q7.js → chunk-Q6JPYR7I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P22HGFFI.js → chunk-QFG4MB7P.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-P22HGFFI.js.map → chunk-QFG4MB7P.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IE5KRAKN.js → chunk-QQ77W23U.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-M7MVOKVV.js → chunk-QYGK2XQ3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-646MQXFW.js → chunk-RLLOZAM2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-646MQXFW.js.map → chunk-RLLOZAM2.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-X5YCTFKT.js → chunk-RWAIRGBC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-W5E2UUSH.js → chunk-RX53WHFI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-R5XTTZSJ.js → chunk-SBW7EQC4.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-TM5CIO3F.js → chunk-SGJB6PXA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DDFGYUCQ.js → chunk-STBCBDKF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-EX7OQT3Y.js → chunk-SUNZKVAH.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-EX7OQT3Y.js.map → chunk-SUNZKVAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-FHOBCGQO.js → chunk-SVAWG7EE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6O44IN44.js → chunk-T6MOTLOJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HSYV4ZYT.js → chunk-TELI67UP.js} +9 -6
- package/dist/cli-bundle/chunks/{chunk-HSYV4ZYT.js.map → chunk-TELI67UP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EWIT5WIC.js → chunk-U6RYD446.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-E4FXM2XB.js → chunk-UE7LK3RE.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-N33FD2UI.js → chunk-UNNCT5QY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2IPNL3DR.js → chunk-UOIFZ66L.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LSOWTLEM.js → chunk-UU6EP25G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HYTOJW2Q.js → chunk-UW6HCMP2.js} +15 -15
- package/dist/cli-bundle/chunks/{chunk-47HXN6RX.js → chunk-UWAQI3B7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YKFHF37B.js → chunk-V4QHAMI5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VAHZIPWS.js → chunk-VA3H7VVC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-XC2HEEOV.js → chunk-VFA5EIEN.js} +21 -11
- package/dist/cli-bundle/chunks/chunk-VFA5EIEN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TLWJP5BF.js → chunk-VQOG2ETB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-H5IOT54C.js → chunk-VSQE43NO.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-BDA35QG5.js → chunk-W6IEJXNC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WACRQ26A.js → chunk-WCBB6VI3.js} +637 -9
- package/dist/cli-bundle/chunks/chunk-WCBB6VI3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OWP6QFBV.js → chunk-XDWXPG2E.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CKX4WOPC.js → chunk-XKVHL3MB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WL3SS45P.js → chunk-XVB6BATY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NVZ6NVHJ.js → chunk-XXWDEQ6O.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ILVOOAT4.js → chunk-Y2VSGFT4.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-NCVT6XEL.js → chunk-YG56M3NE.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-AFGKSHAM.js → chunk-YGEA4CLH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-AXRT7K5V.js → chunk-YIC5NGXF.js} +11 -11
- package/dist/cli-bundle/chunks/{chunk-DHNG452T.js → chunk-ZF52NVRT.js} +396 -245
- package/dist/cli-bundle/chunks/chunk-ZF52NVRT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XXLXJL7V.js → chunk-ZUCBPXNA.js} +4 -4
- package/dist/cli-bundle/chunks/{close-X3CF6FQP.js → close-7NWA3GLA.js} +5 -5
- package/dist/cli-bundle/chunks/close-ZZCDDWJT.js +12 -0
- package/dist/cli-bundle/chunks/close-many-QCZHFCON.js +23 -0
- package/dist/cli-bundle/chunks/{close-many-J7A5EHOQ.js → close-many-YALQ7AXS.js} +14 -14
- package/dist/cli-bundle/chunks/comments-FMQNYPSZ.js +13 -0
- package/dist/cli-bundle/chunks/{comments-TMHMALA5.js → comments-SQIQ5WYR.js} +7 -7
- package/dist/cli-bundle/chunks/copy-GI3RCVZP.js +9 -0
- package/dist/cli-bundle/chunks/{copy-FWQA5OU4.js → copy-YDAMENCP.js} +4 -4
- package/dist/cli-bundle/chunks/{create-AQ5SIGZC.js → create-JSL6CXU3.js} +11 -9
- package/dist/cli-bundle/chunks/create-LXMLYJNM.js +29 -0
- package/dist/cli-bundle/chunks/delete-5DFAXJNI.js +10 -0
- package/dist/cli-bundle/chunks/{delete-YYYFOSEA.js → delete-IGVOZEU2.js} +4 -4
- package/dist/cli-bundle/chunks/{deps-NIIKXLPB.js → deps-BQAXUQAK.js} +6 -6
- package/dist/cli-bundle/chunks/{deps-MQ4ZIGZB.js → deps-CBPPSS6J.js} +6 -6
- package/dist/cli-bundle/chunks/docs-KCWPLQOV.js +14 -0
- package/dist/cli-bundle/chunks/{docs-53NUGMIQ.js → docs-NS2AZWCN.js} +7 -7
- package/dist/cli-bundle/chunks/{files-3PXGXYDB.js → files-PVWEPT5J.js} +7 -7
- package/dist/cli-bundle/chunks/{files-EGLKHD7O.js → files-XUUBQ76I.js} +7 -7
- package/dist/cli-bundle/chunks/focus-3EJVFI3D.js +10 -0
- package/dist/cli-bundle/chunks/{focus-SRPASFTN.js → focus-DHBHKK3E.js} +5 -5
- package/dist/cli-bundle/chunks/{history-compact-G4DULDCX.js → history-compact-3TNPYVFG.js} +6 -6
- package/dist/cli-bundle/chunks/history-compact-JHYVDYLW.js +16 -0
- package/dist/cli-bundle/chunks/{history-redact-IUSJ6X3E.js → history-redact-ELRL73XN.js} +4 -4
- package/dist/cli-bundle/chunks/{history-redact-THHGRQXV.js → history-redact-KKFDICCF.js} +4 -4
- package/dist/cli-bundle/chunks/{history-repair-LUQWRS7X.js → history-repair-J7WKZFAG.js} +6 -6
- package/dist/cli-bundle/chunks/history-repair-REMI7DDI.js +16 -0
- package/dist/cli-bundle/chunks/learnings-O6V5WDCV.js +13 -0
- package/dist/cli-bundle/chunks/{learnings-2MRNBFJF.js → learnings-X4D6JCCG.js} +7 -7
- package/dist/cli-bundle/chunks/{notes-73JWKWUD.js → notes-UQC6VS6N.js} +7 -7
- package/dist/cli-bundle/chunks/notes-ZSZREWZA.js +13 -0
- package/dist/cli-bundle/chunks/{plan-AZPMCG37.js → plan-5GKRBJJO.js} +12 -10
- package/dist/cli-bundle/chunks/plan-EZW2YDDY.js +26 -0
- package/dist/cli-bundle/chunks/{profile-AVCIIZID.js → profile-5PQAPCLF.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-LFYO3HHX.js → profile-CW4BD3FO.js} +10 -10
- package/dist/cli-bundle/chunks/{register-list-query-UKMF55FT.js → register-list-query-HTDQE6VI.js} +24 -24
- package/dist/cli-bundle/chunks/{register-list-query-MZUF2EEC.js → register-list-query-PHIPDFP2.js} +24 -24
- package/dist/cli-bundle/chunks/{register-mutation-T6RVNJC4.js → register-mutation-BLEWM5I6.js} +32 -32
- package/dist/cli-bundle/chunks/{register-mutation-2PBW2GEX.js → register-mutation-OTYHR7J6.js} +32 -32
- package/dist/cli-bundle/chunks/{register-operations-KHZYR6MG.js → register-operations-AMCUFYEW.js} +38 -40
- package/dist/cli-bundle/chunks/{register-operations-KHZYR6MG.js.map → register-operations-AMCUFYEW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-WPQ2LWZJ.js → register-operations-MRLHOZYR.js} +36 -38
- package/dist/cli-bundle/chunks/{register-operations-WPQ2LWZJ.js.map → register-operations-MRLHOZYR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-PGDNOXDQ.js → register-setup-N2FOSWAG.js} +15 -17
- package/dist/cli-bundle/chunks/{register-setup-PGDNOXDQ.js.map → register-setup-N2FOSWAG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-TDN7WAO6.js → register-setup-ZVKTDL4G.js} +17 -19
- package/dist/cli-bundle/chunks/{register-setup-TDN7WAO6.js.map → register-setup-ZVKTDL4G.js.map} +1 -1
- package/dist/cli-bundle/chunks/restore-A55MLFAI.js +14 -0
- package/dist/cli-bundle/chunks/{restore-E3PRGDN3.js → restore-HEQAG6EK.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-5JNFQFUW.js → schema-MAXAIHEC.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-TMIW4XZC.js → schema-Q5DAWJ2S.js} +6 -6
- package/dist/cli-bundle/chunks/update-5DTSCWVF.js +23 -0
- package/dist/cli-bundle/chunks/{update-SQYZA3ZW.js → update-DWFXXJKP.js} +15 -13
- package/dist/cli-bundle/chunks/update-many-6T4ZLZS7.js +34 -0
- package/dist/cli-bundle/chunks/update-many-MYRK6VBJ.js +38 -0
- package/dist/cli-bundle/main.js +152 -29
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/cli-bundle/sdk-runtime.js +72 -75
- package/dist/cli-bundle/sdk-testing.js +8 -8
- package/dist/cli-bundle/sdk.js +288 -642
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/core/extensions/activation-summary.d.ts +2 -0
- package/dist/core/extensions/activation-summary.js +7 -2
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +1 -1
- package/dist/core/extensions/capability-usage.js +5 -2
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-hook-runtime.js +3 -2
- package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
- package/dist/core/extensions/extension-registries.js +3 -2
- package/dist/core/extensions/extension-registries.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +38 -1
- package/dist/core/extensions/extension-types.js +3 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +36 -2
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/store/item-store.d.ts +4 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.d.ts +2 -0
- package/dist/core/store/paths.js +26 -3
- package/dist/core/store/paths.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/compose.d.ts +3 -0
- package/dist/sdk/compose.js +14 -2
- package/dist/sdk/compose.js.map +1 -1
- package/dist/sdk/dependencies.js +3 -3
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/sdk/extension-command-context.d.ts +10 -0
- package/dist/sdk/extension-command-context.js +30 -0
- package/dist/sdk/extension-command-context.js.map +1 -0
- package/dist/sdk/graph/assembly.js +14 -4
- package/dist/sdk/graph/assembly.js.map +1 -1
- package/dist/sdk/graph/index.d.ts +1 -0
- package/dist/sdk/graph/index.js +3 -2
- package/dist/sdk/graph/index.js.map +1 -1
- package/dist/sdk/graph/mutation-advisory.d.ts +20 -0
- package/dist/sdk/graph/mutation-advisory.js +80 -0
- package/dist/sdk/graph/mutation-advisory.js.map +1 -0
- package/dist/sdk/graph/run.d.ts +5 -1
- package/dist/sdk/graph/run.js +11 -3
- package/dist/sdk/graph/run.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -1
- package/dist/sdk/index.js +5 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/ownership-source.d.ts +2 -0
- package/dist/sdk/ownership-source.js +22 -0
- package/dist/sdk/ownership-source.js.map +1 -0
- package/dist/sdk/relationship-history.d.ts +38 -0
- package/dist/sdk/relationship-history.js +60 -2
- package/dist/sdk/relationship-history.js.map +1 -1
- package/dist/sdk/relationships.js +49 -8
- package/dist/sdk/relationships.js.map +1 -1
- package/dist/sdk/runtime-input.js +3 -2
- package/dist/sdk/runtime-input.js.map +1 -1
- package/dist/sdk/runtime.d.ts +2 -0
- package/dist/sdk/runtime.js +19 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/tracker-root-discovery.d.ts +6 -0
- package/dist/sdk/tracker-root-discovery.js +10 -0
- package/dist/sdk/tracker-root-discovery.js.map +1 -0
- package/dist/sdk/workspace-transaction.d.ts +83 -0
- package/dist/sdk/workspace-transaction.js +364 -0
- package/dist/sdk/workspace-transaction.js.map +1 -0
- package/docs/AGENT_UX_CONTRACTS.md +41 -0
- package/docs/EXTENSIONS.md +4 -4
- package/docs/README.md +1 -0
- package/docs/SDK.md +102 -1
- package/marketplace.json +2 -2
- package/package.json +1 -1
- 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-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/GAP_REPORT.md +31 -0
- package/packages/pm-vcs/README.md +62 -0
- package/packages/pm-vcs/extensions/vcs/index.ts +745 -0
- package/packages/pm-vcs/extensions/vcs/manifest.json +19 -0
- package/packages/pm-vcs/extensions/vcs/package.json +3 -0
- package/packages/pm-vcs/package.json +55 -0
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli-bundle/chunks/append-JHO5K6RP.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2BX74BAS.js +0 -125
- package/dist/cli-bundle/chunks/chunk-2BX74BAS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js +0 -672
- package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5UKQLQM2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6VHUGVNP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-74FKFFXO.js +0 -172
- package/dist/cli-bundle/chunks/chunk-74FKFFXO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ADXDCAKP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BAP7G3N2.js +0 -178
- package/dist/cli-bundle/chunks/chunk-BAP7G3N2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-D53RTYVI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DHNG452T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EY7ZE3TG.js +0 -1831
- package/dist/cli-bundle/chunks/chunk-EY7ZE3TG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-F3VC3GOV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FL4D53ND.js +0 -162
- package/dist/cli-bundle/chunks/chunk-FL4D53ND.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GKPCTQYG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HPAYDSR2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-I3INI567.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KX62NMZC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js +0 -662
- package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGVTB5VO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QPGQNLPI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QRZNCRNA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RC4UOUXA.js +0 -122
- package/dist/cli-bundle/chunks/chunk-RC4UOUXA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RTBX3C4C.js +0 -1841
- package/dist/cli-bundle/chunks/chunk-RTBX3C4C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SIPOACV5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WACRQ26A.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XC2HEEOV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XPUTSGJU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YIIIAKCE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YJSURTBB.js +0 -175
- package/dist/cli-bundle/chunks/chunk-YJSURTBB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YQEZWI3R.js.map +0 -7
- package/dist/cli-bundle/chunks/close-GPD7DTJV.js +0 -12
- package/dist/cli-bundle/chunks/close-many-NQLYGPYW.js +0 -23
- package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +0 -13
- package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +0 -9
- package/dist/cli-bundle/chunks/create-KOGQ3JKD.js +0 -27
- package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +0 -10
- package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +0 -14
- package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +0 -16
- package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +0 -13
- package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +0 -13
- package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +0 -24
- package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +0 -14
- package/dist/cli-bundle/chunks/update-XZJYS5X7.js +0 -21
- package/dist/cli-bundle/chunks/update-many-R24B3GBK.js +0 -36
- package/dist/cli-bundle/chunks/update-many-WQ3R3J6N.js +0 -32
- /package/dist/cli-bundle/chunks/{append-5YF3TO7I.js.map → append-MBXHNWSX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-JHO5K6RP.js.map → append-XUYF7NON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BIRYX32V.js.map → chunk-2UCG5H6B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VE6ZSTQW.js.map → chunk-2XPDCXK5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GLZKZON6.js.map → chunk-3HSRP6T2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XWBD6DSR.js.map → chunk-3KPNOZOH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HO4DLBNK.js.map → chunk-4M6RZJXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RXPQ5Q23.js.map → chunk-4PSJVGRE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFE7JHX3.js.map → chunk-6BNV3G6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-43UMFKCK.js.map → chunk-6V4T4RD3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EHJFUOXL.js.map → chunk-7B7IHMLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I7DIDUSP.js.map → chunk-7CHWLT2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L6FVNR7X.js.map → chunk-A3GAQLBH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B57RJHBZ.js.map → chunk-A4FVWFZY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D52ZN3BF.js.map → chunk-A5EQPNV7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZAE66GQ.js.map → chunk-AGEBQRBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WU3KAN6A.js.map → chunk-AQUNTB7G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XWYQ2LT4.js.map → chunk-BBGR4FKQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2FUOXSRN.js.map → chunk-BFJP4VYC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-633PKXLT.js.map → chunk-BZKE2O5V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L337QKWJ.js.map → chunk-DUDLSQFG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BVLOMU6O.js.map → chunk-E7KBMWEF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQXRZMFN.js.map → chunk-EEECAV5M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-35FHWD4C.js.map → chunk-EI3UIMZM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PT7MCCGD.js.map → chunk-FIUTBFC6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7H5NNCJ5.js.map → chunk-FQF6VVPH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6DYOZS6C.js.map → chunk-FQO5THHM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5HGZKQUL.js.map → chunk-FQODDTE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-67RO3H4N.js.map → chunk-G33XIMRT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QWBKN3QC.js.map → chunk-GKCEEXMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DG2EQRIH.js.map → chunk-GRDK25BN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FXFCFL73.js.map → chunk-H3YKUVDR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ARGDWQ4J.js.map → chunk-IGBBTPM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FY4RLHSC.js.map → chunk-IRJ6F23W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-66MKH7SZ.js.map → chunk-IXG5CMBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7UCY6DR5.js.map → chunk-JPWUZOMR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FVNWHUME.js.map → chunk-K2L6FZBX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X2MGQMZO.js.map → chunk-LT5UWU7H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KH6QAHME.js.map → chunk-M4B4RK4J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2XOSFSTH.js.map → chunk-MQOSMBWV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7R6UIHYY.js.map → chunk-N2TEEOXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NTRQLE2R.js.map → chunk-N7FCFJ76.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-37DRDP2B.js.map → chunk-NPEYH6CE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2CXL335K.js.map → chunk-OK7VSX3N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NNANAWFH.js.map → chunk-OKPZDH43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G6MYGULG.js.map → chunk-OKWJUL6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D5XHO4Q7.js.map → chunk-Q6JPYR7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IE5KRAKN.js.map → chunk-QQ77W23U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M7MVOKVV.js.map → chunk-QYGK2XQ3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X5YCTFKT.js.map → chunk-RWAIRGBC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W5E2UUSH.js.map → chunk-RX53WHFI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R5XTTZSJ.js.map → chunk-SBW7EQC4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TM5CIO3F.js.map → chunk-SGJB6PXA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDFGYUCQ.js.map → chunk-STBCBDKF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FHOBCGQO.js.map → chunk-SVAWG7EE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6O44IN44.js.map → chunk-T6MOTLOJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EWIT5WIC.js.map → chunk-U6RYD446.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E4FXM2XB.js.map → chunk-UE7LK3RE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N33FD2UI.js.map → chunk-UNNCT5QY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2IPNL3DR.js.map → chunk-UOIFZ66L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LSOWTLEM.js.map → chunk-UU6EP25G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYTOJW2Q.js.map → chunk-UW6HCMP2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-47HXN6RX.js.map → chunk-UWAQI3B7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YKFHF37B.js.map → chunk-V4QHAMI5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VAHZIPWS.js.map → chunk-VA3H7VVC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TLWJP5BF.js.map → chunk-VQOG2ETB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H5IOT54C.js.map → chunk-VSQE43NO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BDA35QG5.js.map → chunk-W6IEJXNC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OWP6QFBV.js.map → chunk-XDWXPG2E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CKX4WOPC.js.map → chunk-XKVHL3MB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WL3SS45P.js.map → chunk-XVB6BATY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NVZ6NVHJ.js.map → chunk-XXWDEQ6O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ILVOOAT4.js.map → chunk-Y2VSGFT4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NCVT6XEL.js.map → chunk-YG56M3NE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AFGKSHAM.js.map → chunk-YGEA4CLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXRT7K5V.js.map → chunk-YIC5NGXF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XXLXJL7V.js.map → chunk-ZUCBPXNA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-X3CF6FQP.js.map → close-7NWA3GLA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-GPD7DTJV.js.map → close-ZZCDDWJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-NQLYGPYW.js.map → close-many-QCZHFCON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-J7A5EHOQ.js.map → close-many-YALQ7AXS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-2AOZQ5D2.js.map → comments-FMQNYPSZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-TMHMALA5.js.map → comments-SQIQ5WYR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-N3LCQBMC.js.map → copy-GI3RCVZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-FWQA5OU4.js.map → copy-YDAMENCP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-AQ5SIGZC.js.map → create-JSL6CXU3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-KOGQ3JKD.js.map → create-LXMLYJNM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-6G3MBZ6S.js.map → delete-5DFAXJNI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-YYYFOSEA.js.map → delete-IGVOZEU2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-NIIKXLPB.js.map → deps-BQAXUQAK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-MQ4ZIGZB.js.map → deps-CBPPSS6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-OWRGDMNY.js.map → docs-KCWPLQOV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-53NUGMIQ.js.map → docs-NS2AZWCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-3PXGXYDB.js.map → files-PVWEPT5J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EGLKHD7O.js.map → files-XUUBQ76I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-KZLIA6WS.js.map → focus-3EJVFI3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-SRPASFTN.js.map → focus-DHBHKK3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-G4DULDCX.js.map → history-compact-3TNPYVFG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-HHIUOMZ7.js.map → history-compact-JHYVDYLW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IUSJ6X3E.js.map → history-redact-ELRL73XN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-THHGRQXV.js.map → history-redact-KKFDICCF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-LUQWRS7X.js.map → history-repair-J7WKZFAG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-KG7SWXI6.js.map → history-repair-REMI7DDI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-ZVHSALJY.js.map → learnings-O6V5WDCV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-2MRNBFJF.js.map → learnings-X4D6JCCG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-73JWKWUD.js.map → notes-UQC6VS6N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-BAKUL5DJ.js.map → notes-ZSZREWZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-AZPMCG37.js.map → plan-5GKRBJJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-LEAGLPGP.js.map → plan-EZW2YDDY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-AVCIIZID.js.map → profile-5PQAPCLF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-LFYO3HHX.js.map → profile-CW4BD3FO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-UKMF55FT.js.map → register-list-query-HTDQE6VI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-MZUF2EEC.js.map → register-list-query-PHIPDFP2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-T6RVNJC4.js.map → register-mutation-BLEWM5I6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-2PBW2GEX.js.map → register-mutation-OTYHR7J6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-KIUYTAEJ.js.map → restore-A55MLFAI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-E3PRGDN3.js.map → restore-HEQAG6EK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-5JNFQFUW.js.map → schema-MAXAIHEC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-TMIW4XZC.js.map → schema-Q5DAWJ2S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-XZJYS5X7.js.map → update-5DTSCWVF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-SQYZA3ZW.js.map → update-DWFXXJKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-WQ3R3J6N.js.map → update-many-6T4ZLZS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-R24B3GBK.js.map → update-many-MYRK6VBJ.js.map} +0 -0
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46a874f8-2610-5028-8e18-b40e6110f614")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
runUpdateMany
|
|
5
|
+
} from "./chunk-6V4T4RD3.js";
|
|
6
|
+
import {
|
|
7
|
+
runConfig,
|
|
8
|
+
runUpgrade
|
|
9
|
+
} from "./chunk-IEMXESIS.js";
|
|
10
|
+
import {
|
|
11
|
+
runAggregate,
|
|
12
|
+
runGet,
|
|
13
|
+
runGraph,
|
|
14
|
+
runSearch
|
|
15
|
+
} from "./chunk-IR3GOO6E.js";
|
|
8
16
|
import {
|
|
9
17
|
resolveStartTaskInProgressStatus,
|
|
10
18
|
runClaim,
|
|
@@ -18,110 +26,21 @@ import {
|
|
|
18
26
|
runTest,
|
|
19
27
|
runTestAll,
|
|
20
28
|
runValidate
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
runDocs
|
|
24
|
-
} from "./chunk-X2MGQMZO.js";
|
|
25
|
-
import {
|
|
26
|
-
runCopy
|
|
27
|
-
} from "./chunk-633PKXLT.js";
|
|
28
|
-
import {
|
|
29
|
-
runFocus
|
|
30
|
-
} from "./chunk-IE5KRAKN.js";
|
|
31
|
-
import {
|
|
32
|
-
runDelete
|
|
33
|
-
} from "./chunk-47HXN6RX.js";
|
|
34
|
-
import {
|
|
35
|
-
runAppend
|
|
36
|
-
} from "./chunk-67RO3H4N.js";
|
|
37
|
-
import {
|
|
38
|
-
runProfileApply,
|
|
39
|
-
runProfileLint,
|
|
40
|
-
runProfileList,
|
|
41
|
-
runProfileShow
|
|
42
|
-
} from "./chunk-HYTOJW2Q.js";
|
|
43
|
-
import {
|
|
44
|
-
runNotes
|
|
45
|
-
} from "./chunk-FY4RLHSC.js";
|
|
46
|
-
import {
|
|
47
|
-
runLearnings
|
|
48
|
-
} from "./chunk-6O44IN44.js";
|
|
49
|
-
import {
|
|
50
|
-
runFiles,
|
|
51
|
-
runFilesDiscover
|
|
52
|
-
} from "./chunk-AFGKSHAM.js";
|
|
53
|
-
import {
|
|
54
|
-
runCloseMany
|
|
55
|
-
} from "./chunk-EWIT5WIC.js";
|
|
56
|
-
import {
|
|
57
|
-
runUpdateMany
|
|
58
|
-
} from "./chunk-43UMFKCK.js";
|
|
59
|
-
import {
|
|
60
|
-
runRestore
|
|
61
|
-
} from "./chunk-7H5NNCJ5.js";
|
|
29
|
+
} from "./chunk-ODEIDKGW.js";
|
|
62
30
|
import {
|
|
63
31
|
runUpdate
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import {
|
|
66
|
-
runPlan
|
|
67
|
-
} from "./chunk-VE6ZSTQW.js";
|
|
68
|
-
import {
|
|
69
|
-
assertHistoryCompactTarget,
|
|
70
|
-
runHistoryCompact,
|
|
71
|
-
runHistoryCompactBulk
|
|
72
|
-
} from "./chunk-L337QKWJ.js";
|
|
73
|
-
import {
|
|
74
|
-
runComments
|
|
75
|
-
} from "./chunk-HSYV4ZYT.js";
|
|
76
|
-
import {
|
|
77
|
-
runConfig,
|
|
78
|
-
runUpgrade
|
|
79
|
-
} from "./chunk-IL5SPRMH.js";
|
|
32
|
+
} from "./chunk-MRXAHR4B.js";
|
|
80
33
|
import {
|
|
81
34
|
SCAFFOLD_CAPABILITIES,
|
|
82
35
|
runExtension,
|
|
83
36
|
runInit
|
|
84
|
-
} from "./chunk-
|
|
85
|
-
import {
|
|
86
|
-
runSchemaAddField,
|
|
87
|
-
runSchemaAddStatus,
|
|
88
|
-
runSchemaAddType,
|
|
89
|
-
runSchemaApplyPreset,
|
|
90
|
-
runSchemaInferTypes,
|
|
91
|
-
runSchemaList,
|
|
92
|
-
runSchemaListFields,
|
|
93
|
-
runSchemaRemoveField,
|
|
94
|
-
runSchemaRemoveStatus,
|
|
95
|
-
runSchemaRemoveType,
|
|
96
|
-
runSchemaShow,
|
|
97
|
-
runSchemaShowField,
|
|
98
|
-
runSchemaShowStatus
|
|
99
|
-
} from "./chunk-FXFCFL73.js";
|
|
100
|
-
import {
|
|
101
|
-
runAggregate,
|
|
102
|
-
runGet,
|
|
103
|
-
runGraph,
|
|
104
|
-
runSearch
|
|
105
|
-
} from "./chunk-QPGQNLPI.js";
|
|
106
|
-
import {
|
|
107
|
-
runDeps
|
|
108
|
-
} from "./chunk-EX7OQT3Y.js";
|
|
37
|
+
} from "./chunk-MI3346YW.js";
|
|
109
38
|
import {
|
|
110
39
|
runActivity,
|
|
111
40
|
runContext,
|
|
112
41
|
runHistory,
|
|
113
42
|
runNext
|
|
114
|
-
} from "./chunk-
|
|
115
|
-
import {
|
|
116
|
-
runList
|
|
117
|
-
} from "./chunk-NCVT6XEL.js";
|
|
118
|
-
import {
|
|
119
|
-
runHistoryRedact
|
|
120
|
-
} from "./chunk-KH6QAHME.js";
|
|
121
|
-
import {
|
|
122
|
-
resolveRegisteredSearchProvider,
|
|
123
|
-
resolveRegisteredVectorStoreAdapter
|
|
124
|
-
} from "./chunk-M3JN6FPW.js";
|
|
43
|
+
} from "./chunk-CZA2DXCV.js";
|
|
125
44
|
import {
|
|
126
45
|
REINDEX_LOCK_ID,
|
|
127
46
|
buildSearchCorpus,
|
|
@@ -144,7 +63,32 @@ import {
|
|
|
144
63
|
resolveSettingsWithSemanticRuntimeDefaults,
|
|
145
64
|
resolveVectorStores,
|
|
146
65
|
writeVectorizationStatusLedger
|
|
147
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-UE7LK3RE.js";
|
|
67
|
+
import {
|
|
68
|
+
assertHistoryCompactTarget,
|
|
69
|
+
runHistoryCompact,
|
|
70
|
+
runHistoryCompactBulk
|
|
71
|
+
} from "./chunk-DUDLSQFG.js";
|
|
72
|
+
import {
|
|
73
|
+
assertHistoryRepairTarget,
|
|
74
|
+
runHistoryRepair,
|
|
75
|
+
runHistoryRepairAll
|
|
76
|
+
} from "./chunk-SBW7EQC4.js";
|
|
77
|
+
import {
|
|
78
|
+
runLearnings
|
|
79
|
+
} from "./chunk-T6MOTLOJ.js";
|
|
80
|
+
import {
|
|
81
|
+
runNotes
|
|
82
|
+
} from "./chunk-IRJ6F23W.js";
|
|
83
|
+
import {
|
|
84
|
+
runPlan
|
|
85
|
+
} from "./chunk-2XPDCXK5.js";
|
|
86
|
+
import {
|
|
87
|
+
runProfileApply,
|
|
88
|
+
runProfileLint,
|
|
89
|
+
runProfileList,
|
|
90
|
+
runProfileShow
|
|
91
|
+
} from "./chunk-UW6HCMP2.js";
|
|
148
92
|
import {
|
|
149
93
|
ACTIVITY_FLAG_CONTRACTS,
|
|
150
94
|
AGGREGATE_FLAG_CONTRACTS,
|
|
@@ -177,19 +121,83 @@ import {
|
|
|
177
121
|
UPDATE_FLAG_CONTRACTS,
|
|
178
122
|
UPDATE_MANY_FLAG_CONTRACTS,
|
|
179
123
|
toCompletionFlagString
|
|
180
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-JPWUZOMR.js";
|
|
125
|
+
import {
|
|
126
|
+
runSchemaAddField,
|
|
127
|
+
runSchemaAddStatus,
|
|
128
|
+
runSchemaAddType,
|
|
129
|
+
runSchemaApplyPreset,
|
|
130
|
+
runSchemaInferTypes,
|
|
131
|
+
runSchemaList,
|
|
132
|
+
runSchemaListFields,
|
|
133
|
+
runSchemaRemoveField,
|
|
134
|
+
runSchemaRemoveStatus,
|
|
135
|
+
runSchemaRemoveType,
|
|
136
|
+
runSchemaShow,
|
|
137
|
+
runSchemaShowField,
|
|
138
|
+
runSchemaShowStatus
|
|
139
|
+
} from "./chunk-H3YKUVDR.js";
|
|
140
|
+
import {
|
|
141
|
+
runComments
|
|
142
|
+
} from "./chunk-TELI67UP.js";
|
|
181
143
|
import {
|
|
182
144
|
runCreate
|
|
183
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-BDC4TW4B.js";
|
|
146
|
+
import {
|
|
147
|
+
projectMutationResult
|
|
148
|
+
} from "./chunk-2UCG5H6B.js";
|
|
149
|
+
import {
|
|
150
|
+
runCopy
|
|
151
|
+
} from "./chunk-BZKE2O5V.js";
|
|
152
|
+
import {
|
|
153
|
+
runFocus
|
|
154
|
+
} from "./chunk-QQ77W23U.js";
|
|
155
|
+
import {
|
|
156
|
+
runDelete
|
|
157
|
+
} from "./chunk-UWAQI3B7.js";
|
|
158
|
+
import {
|
|
159
|
+
runDeps
|
|
160
|
+
} from "./chunk-SUNZKVAH.js";
|
|
161
|
+
import {
|
|
162
|
+
runDocs
|
|
163
|
+
} from "./chunk-LT5UWU7H.js";
|
|
164
|
+
import {
|
|
165
|
+
runFiles,
|
|
166
|
+
runFilesDiscover
|
|
167
|
+
} from "./chunk-YGEA4CLH.js";
|
|
168
|
+
import {
|
|
169
|
+
resolveRegisteredSearchProvider,
|
|
170
|
+
resolveRegisteredVectorStoreAdapter
|
|
171
|
+
} from "./chunk-M3JN6FPW.js";
|
|
172
|
+
import {
|
|
173
|
+
runAppend
|
|
174
|
+
} from "./chunk-G33XIMRT.js";
|
|
184
175
|
import {
|
|
185
176
|
parseTags
|
|
186
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-SVAWG7EE.js";
|
|
187
178
|
import {
|
|
188
|
-
|
|
189
|
-
} from "./chunk-
|
|
179
|
+
runCloseMany
|
|
180
|
+
} from "./chunk-U6RYD446.js";
|
|
181
|
+
import {
|
|
182
|
+
runList
|
|
183
|
+
} from "./chunk-YG56M3NE.js";
|
|
184
|
+
import {
|
|
185
|
+
createQueryFingerprint,
|
|
186
|
+
decodeQueryCursorState,
|
|
187
|
+
paginateQueryRows
|
|
188
|
+
} from "./chunk-UOIFZ66L.js";
|
|
190
189
|
import {
|
|
191
190
|
runClose
|
|
192
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-EI3UIMZM.js";
|
|
192
|
+
import {
|
|
193
|
+
runRestore
|
|
194
|
+
} from "./chunk-FQF6VVPH.js";
|
|
195
|
+
import {
|
|
196
|
+
getItemAt
|
|
197
|
+
} from "./chunk-VA3H7VVC.js";
|
|
198
|
+
import {
|
|
199
|
+
runHistoryRedact
|
|
200
|
+
} from "./chunk-M4B4RK4J.js";
|
|
193
201
|
import {
|
|
194
202
|
acquireLock,
|
|
195
203
|
appendHistoryEntry,
|
|
@@ -212,11 +220,12 @@ import {
|
|
|
212
220
|
setActiveExtensionRegistrations,
|
|
213
221
|
setActiveExtensionRenderers,
|
|
214
222
|
setActiveExtensionServices
|
|
215
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-QFG4MB7P.js";
|
|
216
224
|
import {
|
|
217
225
|
BUILTIN_ITEM_TYPE_VALUES,
|
|
218
226
|
EXIT_CODE,
|
|
219
227
|
PmCliError,
|
|
228
|
+
RelationshipGraph,
|
|
220
229
|
STATUS_VALUES,
|
|
221
230
|
activateExtensions,
|
|
222
231
|
asRecordClone,
|
|
@@ -228,6 +237,7 @@ import {
|
|
|
228
237
|
createEmptyExtensionRegistrationRegistry,
|
|
229
238
|
createEmptyExtensionRendererRegistry,
|
|
230
239
|
createEmptyExtensionServiceRegistry,
|
|
240
|
+
createRelationshipKindRegistry,
|
|
231
241
|
deactivateExtensions,
|
|
232
242
|
getHistoryPath,
|
|
233
243
|
getSettingsPath,
|
|
@@ -240,10 +250,10 @@ import {
|
|
|
240
250
|
resolveRuntimeStatusRegistry,
|
|
241
251
|
toNonEmptyStringOrUndefined,
|
|
242
252
|
writeFileAtomic
|
|
243
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-D35WYXWC.js";
|
|
244
254
|
|
|
245
255
|
// dist/sdk/runtime.js
|
|
246
|
-
import
|
|
256
|
+
import path5 from "node:path";
|
|
247
257
|
|
|
248
258
|
// dist/core/output/query-summary.js
|
|
249
259
|
function isRecord(value) {
|
|
@@ -301,6 +311,740 @@ function memoizeWorkspaceExtensionRegistrations(cacheKey, loadRegistrations) {
|
|
|
301
311
|
return registrations;
|
|
302
312
|
}
|
|
303
313
|
|
|
314
|
+
// dist/sdk/relationship-history.js
|
|
315
|
+
import { constants } from "node:fs";
|
|
316
|
+
import { lstat, mkdir, open } from "node:fs/promises";
|
|
317
|
+
import path from "node:path";
|
|
318
|
+
function requiredText(value, field) {
|
|
319
|
+
if (typeof value !== "string" || value.trim().length === 0)
|
|
320
|
+
throw new TypeError(`Relationship event ${field} must be non-empty`);
|
|
321
|
+
return value.trim();
|
|
322
|
+
}
|
|
323
|
+
function edgeIdentity(edge, registry) {
|
|
324
|
+
const definition = registry.require(edge.kind);
|
|
325
|
+
const endpoints = definition.direction === "undirected" ? [edge.source, edge.target].sort().join("\0") : `${edge.source}\0${edge.target}`;
|
|
326
|
+
return `${definition.kind}\0${endpoints}`;
|
|
327
|
+
}
|
|
328
|
+
function freezeEdge(edge) {
|
|
329
|
+
return Object.freeze({
|
|
330
|
+
...edge,
|
|
331
|
+
...edge.payload === void 0 ? {} : { payload: Object.freeze(structuredClone(edge.payload)) }
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
function assertCardinality(candidate, excludeRelationshipId, registry, indexes) {
|
|
335
|
+
const definition = registry.require(candidate.kind);
|
|
336
|
+
const outgoingOwner = indexes.outgoingOne.get(`${definition.kind}\0${candidate.source}`);
|
|
337
|
+
if (outgoingOwner !== void 0 && outgoingOwner !== excludeRelationshipId)
|
|
338
|
+
throw new TypeError(`Relationship outgoing cardinality exceeded for ${definition.kind}`);
|
|
339
|
+
const incomingOwner = indexes.incomingOne.get(`${definition.kind}\0${candidate.target}`);
|
|
340
|
+
if (incomingOwner !== void 0 && incomingOwner !== excludeRelationshipId)
|
|
341
|
+
throw new TypeError(`Relationship incoming cardinality exceeded for ${definition.kind}`);
|
|
342
|
+
const identity = edgeIdentity(candidate, registry);
|
|
343
|
+
const identityOwner = indexes.identities.get(identity);
|
|
344
|
+
if (identityOwner !== void 0 && identityOwner !== excludeRelationshipId)
|
|
345
|
+
throw new TypeError(`Relationship edge already active: ${identity}`);
|
|
346
|
+
}
|
|
347
|
+
function replayEvents(events) {
|
|
348
|
+
const active = /* @__PURE__ */ new Map();
|
|
349
|
+
for (const event of events) {
|
|
350
|
+
if (event.action === "remove")
|
|
351
|
+
active.delete(event.relationshipId);
|
|
352
|
+
else
|
|
353
|
+
active.set(event.relationshipId, event.edge);
|
|
354
|
+
}
|
|
355
|
+
return active;
|
|
356
|
+
}
|
|
357
|
+
function normalizeEventHeader(input, currentVersion, eventIds) {
|
|
358
|
+
if (input.expectedVersion !== void 0 && input.expectedVersion !== currentVersion)
|
|
359
|
+
throw new TypeError(`Relationship event version conflict: expected ${input.expectedVersion}, current ${currentVersion}`);
|
|
360
|
+
const eventId = requiredText(input.eventId, "eventId");
|
|
361
|
+
if (eventIds.has(eventId))
|
|
362
|
+
throw new TypeError(`Relationship event already exists: ${eventId}`);
|
|
363
|
+
if (input.action !== "add" && input.action !== "remove" && input.action !== "supersede")
|
|
364
|
+
throw new TypeError(`Unknown relationship event action: ${input.action}`);
|
|
365
|
+
if (!Number.isFinite(Date.parse(input.timestamp)))
|
|
366
|
+
throw new TypeError("Relationship event timestamp must be valid");
|
|
367
|
+
return {
|
|
368
|
+
eventId,
|
|
369
|
+
relationshipId: requiredText(input.relationshipId, "relationshipId"),
|
|
370
|
+
author: requiredText(input.author, "author"),
|
|
371
|
+
timestamp: new Date(input.timestamp).toISOString()
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
function resolveMutationEdge(input, relationshipId, active, nodes, registry, indexes) {
|
|
375
|
+
const isActive = active.has(relationshipId);
|
|
376
|
+
if (input.action === "add" && isActive)
|
|
377
|
+
throw new TypeError(`Relationship is already active: ${relationshipId}`);
|
|
378
|
+
if (input.action !== "add" && !isActive)
|
|
379
|
+
throw new TypeError(`Relationship is not active: ${relationshipId}`);
|
|
380
|
+
if (input.action === "remove")
|
|
381
|
+
return void 0;
|
|
382
|
+
if (!input.edge)
|
|
383
|
+
throw new TypeError(`Relationship ${input.action} event requires an edge`);
|
|
384
|
+
const source = typeof input.edge.source === "string" ? input.edge.source.trim() : "";
|
|
385
|
+
const target = typeof input.edge.target === "string" ? input.edge.target.trim() : "";
|
|
386
|
+
if (!nodes.has(source) || !nodes.has(target))
|
|
387
|
+
throw new TypeError(`Relationship endpoint not found: ${source} -> ${target}`);
|
|
388
|
+
const canonical = new RelationshipGraph([source, target], [input.edge], registry).edges()[0];
|
|
389
|
+
assertCardinality(canonical, relationshipId, registry, indexes);
|
|
390
|
+
return freezeEdge(canonical);
|
|
391
|
+
}
|
|
392
|
+
var RelationshipEventLog = class {
|
|
393
|
+
#nodes;
|
|
394
|
+
#registry;
|
|
395
|
+
#events = [];
|
|
396
|
+
#eventIds = /* @__PURE__ */ new Set();
|
|
397
|
+
#active = /* @__PURE__ */ new Map();
|
|
398
|
+
#cardinalityIndexes = {
|
|
399
|
+
identities: /* @__PURE__ */ new Map(),
|
|
400
|
+
outgoingOne: /* @__PURE__ */ new Map(),
|
|
401
|
+
incomingOne: /* @__PURE__ */ new Map()
|
|
402
|
+
};
|
|
403
|
+
/** Create an empty relationship ledger for a fixed node universe. */
|
|
404
|
+
constructor(nodes, options = {}) {
|
|
405
|
+
this.#nodes = new Set([...nodes].filter((node) => typeof node === "string").map((node) => node.trim()).filter(Boolean));
|
|
406
|
+
this.#registry = options.registry ?? createRelationshipKindRegistry();
|
|
407
|
+
}
|
|
408
|
+
/** Current append sequence. */
|
|
409
|
+
get version() {
|
|
410
|
+
return this.#events.length;
|
|
411
|
+
}
|
|
412
|
+
/** Return an immutable copy of the full event stream. */
|
|
413
|
+
events() {
|
|
414
|
+
return Object.freeze([...this.#events]);
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Iterate a stable event prefix in immutable, bounded batches. Consumers can
|
|
418
|
+
* build streaming projections without copying or exposing the mutable ledger.
|
|
419
|
+
* `fromVersion === toVersion + 1` is the intentional empty checkpoint range;
|
|
420
|
+
* larger watermarks are rejected as invalid for the selected prefix.
|
|
421
|
+
*/
|
|
422
|
+
*stream(options = {}) {
|
|
423
|
+
const fromVersion = options.fromVersion ?? 1;
|
|
424
|
+
const toVersion = options.toVersion ?? this.version;
|
|
425
|
+
const batchSize = options.batchSize ?? 100;
|
|
426
|
+
if (!Number.isInteger(fromVersion) || fromVersion < 1)
|
|
427
|
+
throw new TypeError("Relationship event stream fromVersion must be positive");
|
|
428
|
+
if (!Number.isInteger(toVersion) || toVersion < 0 || toVersion > this.version)
|
|
429
|
+
throw new TypeError(`Relationship event stream toVersion out of range: ${toVersion}`);
|
|
430
|
+
if (!Number.isInteger(batchSize) || batchSize < 1)
|
|
431
|
+
throw new TypeError("Relationship event stream batchSize must be positive");
|
|
432
|
+
if (fromVersion > toVersion + 1)
|
|
433
|
+
throw new TypeError("Relationship event stream fromVersion exceeds the selected prefix");
|
|
434
|
+
for (let offset = fromVersion - 1; offset < toVersion; offset += batchSize) {
|
|
435
|
+
yield Object.freeze(this.#events.slice(offset, Math.min(offset + batchSize, toVersion)));
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
/** Fold a selected immutable event prefix into caller-owned domain state. */
|
|
439
|
+
project(initialState, reducer, options = {}) {
|
|
440
|
+
if (typeof reducer !== "function")
|
|
441
|
+
throw new TypeError("Relationship event projection requires a reducer");
|
|
442
|
+
let state = initialState;
|
|
443
|
+
let processed = 0;
|
|
444
|
+
let finalEvent;
|
|
445
|
+
for (const batch of this.stream({ ...options, batchSize: 256 })) {
|
|
446
|
+
for (const event of batch) {
|
|
447
|
+
state = reducer(state, event);
|
|
448
|
+
processed += 1;
|
|
449
|
+
finalEvent = event;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return Object.freeze({
|
|
453
|
+
state,
|
|
454
|
+
version: finalEvent?.sequence ?? Math.max(0, (options.fromVersion ?? 1) - 1),
|
|
455
|
+
processed,
|
|
456
|
+
...finalEvent === void 0 ? {} : { asOf: finalEvent.timestamp }
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
/** Add one active relationship to constant-time validation indexes. */
|
|
460
|
+
#indexActive(relationshipId, edge) {
|
|
461
|
+
const definition = this.#registry.require(edge.kind);
|
|
462
|
+
this.#cardinalityIndexes.identities.set(edgeIdentity(edge, this.#registry), relationshipId);
|
|
463
|
+
if (definition.outgoing === "one")
|
|
464
|
+
this.#cardinalityIndexes.outgoingOne.set(`${definition.kind}\0${edge.source}`, relationshipId);
|
|
465
|
+
if (definition.incoming === "one")
|
|
466
|
+
this.#cardinalityIndexes.incomingOne.set(`${definition.kind}\0${edge.target}`, relationshipId);
|
|
467
|
+
}
|
|
468
|
+
/** Remove one superseded or deleted relationship from validation indexes. */
|
|
469
|
+
#unindexActive(edge) {
|
|
470
|
+
const definition = this.#registry.require(edge.kind);
|
|
471
|
+
this.#cardinalityIndexes.identities.delete(edgeIdentity(edge, this.#registry));
|
|
472
|
+
if (definition.outgoing === "one")
|
|
473
|
+
this.#cardinalityIndexes.outgoingOne.delete(`${definition.kind}\0${edge.source}`);
|
|
474
|
+
if (definition.incoming === "one")
|
|
475
|
+
this.#cardinalityIndexes.incomingOne.delete(`${definition.kind}\0${edge.target}`);
|
|
476
|
+
}
|
|
477
|
+
/** Validate and append one attributable relationship mutation. */
|
|
478
|
+
append(input) {
|
|
479
|
+
const header = normalizeEventHeader(input, this.version, this.#eventIds);
|
|
480
|
+
const previous = this.#active.get(header.relationshipId);
|
|
481
|
+
const edge = resolveMutationEdge(input, header.relationshipId, this.#active, this.#nodes, this.#registry, this.#cardinalityIndexes);
|
|
482
|
+
const event = Object.freeze({
|
|
483
|
+
eventId: header.eventId,
|
|
484
|
+
relationshipId: header.relationshipId,
|
|
485
|
+
action: input.action,
|
|
486
|
+
...edge === void 0 ? {} : { edge },
|
|
487
|
+
author: header.author,
|
|
488
|
+
timestamp: header.timestamp,
|
|
489
|
+
...input.reason?.trim() ? { reason: input.reason.trim() } : {},
|
|
490
|
+
sequence: this.version + 1
|
|
491
|
+
});
|
|
492
|
+
this.#events.push(event);
|
|
493
|
+
this.#eventIds.add(header.eventId);
|
|
494
|
+
if (previous)
|
|
495
|
+
this.#unindexActive(previous);
|
|
496
|
+
if (input.action === "remove")
|
|
497
|
+
this.#active.delete(header.relationshipId);
|
|
498
|
+
else {
|
|
499
|
+
this.#active.set(header.relationshipId, edge);
|
|
500
|
+
this.#indexActive(header.relationshipId, edge);
|
|
501
|
+
}
|
|
502
|
+
return event;
|
|
503
|
+
}
|
|
504
|
+
/** Materialize an exact point-in-time graph without mutating the ledger. */
|
|
505
|
+
snapshot(options = {}) {
|
|
506
|
+
if (options.atVersion !== void 0 && options.atTimestamp !== void 0)
|
|
507
|
+
throw new TypeError("Relationship snapshot accepts one target");
|
|
508
|
+
let included;
|
|
509
|
+
if (options.atTimestamp !== void 0) {
|
|
510
|
+
const timestamp = Date.parse(options.atTimestamp);
|
|
511
|
+
if (!Number.isFinite(timestamp))
|
|
512
|
+
throw new TypeError("Relationship snapshot timestamp must be valid");
|
|
513
|
+
let lastIndex = -1;
|
|
514
|
+
for (let index = this.#events.length - 1; index >= 0; index -= 1) {
|
|
515
|
+
if (Date.parse(this.#events[index].timestamp) > timestamp)
|
|
516
|
+
continue;
|
|
517
|
+
lastIndex = index;
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
included = lastIndex === -1 ? [] : this.#events.slice(0, lastIndex + 1);
|
|
521
|
+
} else {
|
|
522
|
+
const version = options.atVersion ?? this.version;
|
|
523
|
+
if (!Number.isInteger(version) || version < 0 || version > this.version)
|
|
524
|
+
throw new TypeError(`Relationship snapshot version out of range: ${version}`);
|
|
525
|
+
included = this.#events.slice(0, version);
|
|
526
|
+
}
|
|
527
|
+
const active = replayEvents(included);
|
|
528
|
+
const graph2 = new RelationshipGraph(this.#nodes, active.values(), this.#registry);
|
|
529
|
+
return Object.freeze({
|
|
530
|
+
version: included.length,
|
|
531
|
+
...included.at(-1) ? { asOf: included.at(-1).timestamp } : {},
|
|
532
|
+
edges: graph2.edges(),
|
|
533
|
+
graph: graph2
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
/** Page the immutable event stream with a cursor bound to this log version. */
|
|
537
|
+
page(options) {
|
|
538
|
+
if (!Number.isInteger(options.limit) || options.limit < 1)
|
|
539
|
+
throw new TypeError("Relationship event page limit must be positive");
|
|
540
|
+
const fingerprint = createQueryFingerprint("relationship-events", {
|
|
541
|
+
order: "append-sequence"
|
|
542
|
+
});
|
|
543
|
+
const snapshot = options.cursor === void 0 ? this.version : Number(decodeQueryCursorState(options.cursor, fingerprint).snapshot);
|
|
544
|
+
if (!Number.isSafeInteger(snapshot) || snapshot < 0 || snapshot > this.version)
|
|
545
|
+
throw new TypeError("Relationship event cursor snapshot version is invalid");
|
|
546
|
+
const page = paginateQueryRows(this.#events.slice(0, snapshot), {
|
|
547
|
+
cursor: options.cursor,
|
|
548
|
+
fingerprint,
|
|
549
|
+
limit: options.limit,
|
|
550
|
+
readId: (event) => event.eventId,
|
|
551
|
+
snapshot: String(snapshot)
|
|
552
|
+
});
|
|
553
|
+
return {
|
|
554
|
+
version: snapshot,
|
|
555
|
+
events: page.rows,
|
|
556
|
+
hasMore: page.has_more,
|
|
557
|
+
...page.next_cursor ? { nextCursor: page.next_cursor } : {}
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
var RELATIONSHIP_STORE_LOCK_ID = "relationship-event-store";
|
|
562
|
+
var RELATIONSHIP_NOFOLLOW_FLAG = constants.O_NOFOLLOW;
|
|
563
|
+
function acquireRelationshipStoreLock(pmRoot) {
|
|
564
|
+
return acquireLock(pmRoot, RELATIONSHIP_STORE_LOCK_ID, 30, `relationship-store:${process.pid}`, false, false, 3e3);
|
|
565
|
+
}
|
|
566
|
+
async function resolveRelationshipEventStorePath(pmRoot, relativePath = "relationships/events.jsonl") {
|
|
567
|
+
const root = path.resolve(pmRoot);
|
|
568
|
+
const target = path.resolve(root, relativePath);
|
|
569
|
+
const relative = path.relative(root, target);
|
|
570
|
+
if (relative.length === 0)
|
|
571
|
+
throw new TypeError("Relationship event path must name a file within the tracker root");
|
|
572
|
+
if (relative === ".." || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative))
|
|
573
|
+
throw new TypeError("Relationship event path must stay within the tracker root");
|
|
574
|
+
await mkdir(root, { recursive: true });
|
|
575
|
+
const rootStats = await lstat(root);
|
|
576
|
+
if (rootStats.isSymbolicLink())
|
|
577
|
+
throw new TypeError("Relationship event tracker root must not be a symbolic link");
|
|
578
|
+
let current = root;
|
|
579
|
+
for (const segment of relative.split(path.sep)) {
|
|
580
|
+
current = path.join(current, segment);
|
|
581
|
+
try {
|
|
582
|
+
if ((await lstat(current)).isSymbolicLink())
|
|
583
|
+
throw new TypeError("Relationship event path must not contain symbolic links");
|
|
584
|
+
} catch (error) {
|
|
585
|
+
if (error.code === "ENOENT")
|
|
586
|
+
break;
|
|
587
|
+
throw error;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return target;
|
|
591
|
+
}
|
|
592
|
+
async function loadRelationshipEventLog(target, nodes, registry) {
|
|
593
|
+
const log = new RelationshipEventLog(nodes, { registry });
|
|
594
|
+
let raw;
|
|
595
|
+
let handle;
|
|
596
|
+
try {
|
|
597
|
+
handle = await open(target, constants.O_RDONLY | RELATIONSHIP_NOFOLLOW_FLAG);
|
|
598
|
+
raw = await handle.readFile("utf8");
|
|
599
|
+
} catch (error) {
|
|
600
|
+
if (error.code === "ENOENT")
|
|
601
|
+
return log;
|
|
602
|
+
throw error;
|
|
603
|
+
} finally {
|
|
604
|
+
await handle?.close();
|
|
605
|
+
}
|
|
606
|
+
const lines = raw.split("\n");
|
|
607
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
608
|
+
const line = lines[index].trim();
|
|
609
|
+
if (!line)
|
|
610
|
+
continue;
|
|
611
|
+
let stored;
|
|
612
|
+
try {
|
|
613
|
+
stored = JSON.parse(line);
|
|
614
|
+
} catch {
|
|
615
|
+
throw new TypeError(`Invalid relationship event JSONL at line ${index + 1}`);
|
|
616
|
+
}
|
|
617
|
+
if (stored.sequence !== log.version + 1)
|
|
618
|
+
throw new TypeError(`Invalid relationship event sequence at line ${index + 1}`);
|
|
619
|
+
log.append({
|
|
620
|
+
eventId: stored.eventId,
|
|
621
|
+
relationshipId: stored.relationshipId,
|
|
622
|
+
action: stored.action,
|
|
623
|
+
...stored.edge === void 0 ? {} : { edge: stored.edge },
|
|
624
|
+
author: stored.author,
|
|
625
|
+
timestamp: stored.timestamp,
|
|
626
|
+
...stored.reason === void 0 ? {} : { reason: stored.reason },
|
|
627
|
+
expectedVersion: log.version
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
return log;
|
|
631
|
+
}
|
|
632
|
+
var RelationshipEventStore = class _RelationshipEventStore {
|
|
633
|
+
#pmRoot;
|
|
634
|
+
#nodes;
|
|
635
|
+
#registry;
|
|
636
|
+
#path;
|
|
637
|
+
#log;
|
|
638
|
+
constructor(options, nodes, target, log) {
|
|
639
|
+
this.#pmRoot = options.pmRoot;
|
|
640
|
+
this.#nodes = nodes;
|
|
641
|
+
this.#registry = options.registry;
|
|
642
|
+
this.#path = target;
|
|
643
|
+
this.#log = log;
|
|
644
|
+
}
|
|
645
|
+
/** Open and validate an existing stream or create an empty store view. */
|
|
646
|
+
static async open(options) {
|
|
647
|
+
const nodes = Object.freeze([...options.nodes]);
|
|
648
|
+
const target = await resolveRelationshipEventStorePath(options.pmRoot, options.relativePath);
|
|
649
|
+
const release2 = await acquireRelationshipStoreLock(options.pmRoot);
|
|
650
|
+
try {
|
|
651
|
+
await resolveRelationshipEventStorePath(options.pmRoot, target);
|
|
652
|
+
const log = await loadRelationshipEventLog(target, nodes, options.registry);
|
|
653
|
+
return new _RelationshipEventStore(options, nodes, target, log);
|
|
654
|
+
} finally {
|
|
655
|
+
await release2();
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
/** Absolute JSONL path, exposed for diagnostics and backup tooling. */
|
|
659
|
+
get path() {
|
|
660
|
+
return this.#path;
|
|
661
|
+
}
|
|
662
|
+
/** Refresh from durable history and return the current validated append sequence. */
|
|
663
|
+
async currentVersion() {
|
|
664
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
665
|
+
return this.#log.version;
|
|
666
|
+
}
|
|
667
|
+
/** Append one event after refreshing under the shared workspace lock. */
|
|
668
|
+
async append(input) {
|
|
669
|
+
const release2 = await acquireRelationshipStoreLock(this.#pmRoot);
|
|
670
|
+
try {
|
|
671
|
+
const target = await resolveRelationshipEventStorePath(this.#pmRoot, this.#path);
|
|
672
|
+
const refreshed = await loadRelationshipEventLog(target, this.#nodes, this.#registry);
|
|
673
|
+
const event = refreshed.append(input);
|
|
674
|
+
await mkdir(path.dirname(target), { recursive: true });
|
|
675
|
+
await resolveRelationshipEventStorePath(this.#pmRoot, target);
|
|
676
|
+
const handle = await open(target, constants.O_APPEND | constants.O_CREAT | constants.O_WRONLY | RELATIONSHIP_NOFOLLOW_FLAG);
|
|
677
|
+
try {
|
|
678
|
+
await handle.appendFile(`${JSON.stringify(event)}
|
|
679
|
+
`, "utf8");
|
|
680
|
+
} finally {
|
|
681
|
+
await handle.close();
|
|
682
|
+
}
|
|
683
|
+
this.#log = refreshed;
|
|
684
|
+
return event;
|
|
685
|
+
} finally {
|
|
686
|
+
await release2();
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
/** Refresh from durable history and materialize an exact validated snapshot. */
|
|
690
|
+
async snapshot(options = {}) {
|
|
691
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
692
|
+
return this.#log.snapshot(options);
|
|
693
|
+
}
|
|
694
|
+
/** Refresh from durable history and page immutable events. */
|
|
695
|
+
async page(options) {
|
|
696
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
697
|
+
return this.#log.page(options);
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Refresh once under the shared store lock, then stream a coherent immutable
|
|
701
|
+
* prefix without holding the writer lock while the consumer processes batches.
|
|
702
|
+
*/
|
|
703
|
+
async *stream(options = {}) {
|
|
704
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
705
|
+
yield* this.#log.stream(options);
|
|
706
|
+
}
|
|
707
|
+
/** Refresh once and fold a coherent durable prefix into application state. */
|
|
708
|
+
async project(initialState, reducer, options = {}) {
|
|
709
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
710
|
+
return this.#log.project(initialState, reducer, options);
|
|
711
|
+
}
|
|
712
|
+
/** Serialize a durable refresh with writers so readers never observe a torn JSONL tail. */
|
|
713
|
+
async #refreshFromDurableHistory() {
|
|
714
|
+
const release2 = await acquireRelationshipStoreLock(this.#pmRoot);
|
|
715
|
+
try {
|
|
716
|
+
const target = await resolveRelationshipEventStorePath(this.#pmRoot, this.#path);
|
|
717
|
+
return await loadRelationshipEventLog(target, this.#nodes, this.#registry);
|
|
718
|
+
} finally {
|
|
719
|
+
await release2();
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
// dist/sdk/workspace-transaction.js
|
|
725
|
+
import { mkdir as mkdir2, readFile } from "node:fs/promises";
|
|
726
|
+
import path2 from "node:path";
|
|
727
|
+
var WorkspaceTransactionInterruptedError = class extends Error {
|
|
728
|
+
/** Create one explicit crash-boundary interruption. */
|
|
729
|
+
constructor(message = "Workspace transaction interrupted") {
|
|
730
|
+
super(message);
|
|
731
|
+
this.name = "WorkspaceTransactionInterruptedError";
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
var WORKSPACE_TRANSACTION_LOCK_ID = "sdk-workspace-transaction";
|
|
735
|
+
var TRANSACTION_ID_PATTERN = /^[a-zA-Z0-9._-]+$/;
|
|
736
|
+
var DEFAULT_LOCK_TTL_SECONDS = 30;
|
|
737
|
+
var DEFAULT_LOCK_WAIT_MS = 3e3;
|
|
738
|
+
function requiredIdentifier(value, label) {
|
|
739
|
+
if (typeof value !== "string")
|
|
740
|
+
throw new TypeError(`${label} must be a string`);
|
|
741
|
+
const normalized = value.trim();
|
|
742
|
+
if (!normalized || !TRANSACTION_ID_PATTERN.test(normalized))
|
|
743
|
+
throw new TypeError(`${label} must match [a-zA-Z0-9._-]+`);
|
|
744
|
+
return normalized;
|
|
745
|
+
}
|
|
746
|
+
function requiredText2(value, label) {
|
|
747
|
+
if (typeof value !== "string")
|
|
748
|
+
throw new TypeError(`${label} must be a string`);
|
|
749
|
+
const normalized = value.trim();
|
|
750
|
+
if (!normalized)
|
|
751
|
+
throw new TypeError(`${label} must be non-empty`);
|
|
752
|
+
return normalized;
|
|
753
|
+
}
|
|
754
|
+
function positiveInteger(value, fallback, label) {
|
|
755
|
+
const resolved = value ?? fallback;
|
|
756
|
+
if (!Number.isInteger(resolved) || resolved <= 0)
|
|
757
|
+
throw new TypeError(`${label} must be a positive integer`);
|
|
758
|
+
return resolved;
|
|
759
|
+
}
|
|
760
|
+
function journalPath(pmRoot, transactionId) {
|
|
761
|
+
return path2.join(pmRoot, "transactions", "sdk", `${transactionId}.json`);
|
|
762
|
+
}
|
|
763
|
+
async function writeJournal(pmRoot, journal) {
|
|
764
|
+
journal.updatedAt = nowIso();
|
|
765
|
+
const target = journalPath(pmRoot, journal.transactionId);
|
|
766
|
+
await mkdir2(path2.dirname(target), { recursive: true });
|
|
767
|
+
await writeFileAtomic(target, `${JSON.stringify(journal, null, 2)}
|
|
768
|
+
`);
|
|
769
|
+
}
|
|
770
|
+
function hasValidJournalMetadata(journal) {
|
|
771
|
+
return Number.isInteger(journal.attempt) && typeof journal.author === "string" && typeof journal.createdAt === "string" && typeof journal.updatedAt === "string";
|
|
772
|
+
}
|
|
773
|
+
function createResultMap(source) {
|
|
774
|
+
return Object.assign(/* @__PURE__ */ Object.create(null), source);
|
|
775
|
+
}
|
|
776
|
+
function cloneJournalValue(value, label) {
|
|
777
|
+
try {
|
|
778
|
+
const serialized = JSON.stringify(value, (_key, nestedValue) => {
|
|
779
|
+
if (typeof nestedValue === "number" && !Number.isFinite(nestedValue))
|
|
780
|
+
throw new TypeError(`${label} contains a non-finite number`);
|
|
781
|
+
if (nestedValue === void 0 || typeof nestedValue === "function" || typeof nestedValue === "symbol")
|
|
782
|
+
throw new TypeError(`${label} contains a non-JSON value`);
|
|
783
|
+
return nestedValue;
|
|
784
|
+
});
|
|
785
|
+
return JSON.parse(serialized);
|
|
786
|
+
} catch (error) {
|
|
787
|
+
throw new TypeError(`${label} must be JSON serializable`, { cause: error });
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
function cloneOptionalJournalValue(value, label) {
|
|
791
|
+
return value === void 0 ? void 0 : cloneJournalValue(value, label);
|
|
792
|
+
}
|
|
793
|
+
function setJournalEntry(target, stepId, value, label) {
|
|
794
|
+
const cloned = cloneOptionalJournalValue(value, label);
|
|
795
|
+
if (cloned === void 0)
|
|
796
|
+
delete target[stepId];
|
|
797
|
+
else
|
|
798
|
+
target[stepId] = cloned;
|
|
799
|
+
}
|
|
800
|
+
function isJournalMap(value) {
|
|
801
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
802
|
+
}
|
|
803
|
+
function hasUniqueKnownStepIds(value, stepIds) {
|
|
804
|
+
return Array.isArray(value) && new Set(value).size === value.length && value.every((stepId) => typeof stepId === "string" && stepIds.includes(stepId));
|
|
805
|
+
}
|
|
806
|
+
function hasValidJournalLifecycle(journal, stepIds) {
|
|
807
|
+
if (!hasUniqueKnownStepIds(journal.startedStepIds, stepIds) || !hasUniqueKnownStepIds(journal.completedStepIds, stepIds) || !isJournalMap(journal.results) || !isJournalMap(journal.compensationData))
|
|
808
|
+
return false;
|
|
809
|
+
const startedStepIds = journal.startedStepIds;
|
|
810
|
+
const started = new Set(startedStepIds);
|
|
811
|
+
const completedStepIds = journal.completedStepIds;
|
|
812
|
+
const completed = new Set(completedStepIds);
|
|
813
|
+
if (Object.keys(journal.compensationData).some((stepId) => !started.has(stepId)) || Object.keys(journal.results).some((stepId) => !completed.has(stepId)))
|
|
814
|
+
return false;
|
|
815
|
+
if (journal.status === "committed")
|
|
816
|
+
return stepIds.every((stepId) => completed.has(stepId));
|
|
817
|
+
return journal.status !== "compensated" || completed.size === 0 && started.size === 0;
|
|
818
|
+
}
|
|
819
|
+
function parseJournal(raw, transactionId, stepIds) {
|
|
820
|
+
let parsed;
|
|
821
|
+
try {
|
|
822
|
+
parsed = JSON.parse(raw);
|
|
823
|
+
} catch {
|
|
824
|
+
throw new TypeError(`Workspace transaction ${transactionId} journal is invalid JSON`);
|
|
825
|
+
}
|
|
826
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
827
|
+
throw new TypeError(`Workspace transaction ${transactionId} journal is invalid`);
|
|
828
|
+
const journal = parsed;
|
|
829
|
+
const identityMatches = journal.schemaVersion === 1 && journal.transactionId === transactionId;
|
|
830
|
+
const stepsMatch = Array.isArray(journal.stepIds) && journal.stepIds.length === stepIds.length && journal.stepIds.every((stepId, index) => stepId === stepIds[index]);
|
|
831
|
+
const lifecycleMatches = hasValidJournalLifecycle(journal, stepIds);
|
|
832
|
+
const metadataMatches = hasValidJournalMetadata(journal);
|
|
833
|
+
const statusMatches = [
|
|
834
|
+
"applying",
|
|
835
|
+
"compensating",
|
|
836
|
+
"compensated",
|
|
837
|
+
"committed"
|
|
838
|
+
].includes(String(journal.status));
|
|
839
|
+
if (!identityMatches || !stepsMatch || !lifecycleMatches || !metadataMatches || !statusMatches)
|
|
840
|
+
throw new TypeError(`Workspace transaction ${transactionId} journal does not match the supplied plan`);
|
|
841
|
+
return {
|
|
842
|
+
...journal,
|
|
843
|
+
results: createResultMap(journal.results),
|
|
844
|
+
compensationData: createResultMap(journal.compensationData)
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
async function prepareJournalForApply(options, transactionId, author, stepIds, existing) {
|
|
848
|
+
let journal = existing;
|
|
849
|
+
const recovered = journal !== void 0;
|
|
850
|
+
if (journal?.status === "compensating")
|
|
851
|
+
await compensateAppliedSteps(options, journal);
|
|
852
|
+
if (journal === void 0 || journal.status === "compensated") {
|
|
853
|
+
const timestamp = nowIso();
|
|
854
|
+
journal = {
|
|
855
|
+
schemaVersion: 1,
|
|
856
|
+
transactionId,
|
|
857
|
+
author,
|
|
858
|
+
status: "applying",
|
|
859
|
+
attempt: (journal?.attempt ?? 0) + 1,
|
|
860
|
+
createdAt: journal?.createdAt ?? timestamp,
|
|
861
|
+
updatedAt: timestamp,
|
|
862
|
+
stepIds,
|
|
863
|
+
startedStepIds: [],
|
|
864
|
+
completedStepIds: [],
|
|
865
|
+
results: createResultMap(),
|
|
866
|
+
compensationData: createResultMap()
|
|
867
|
+
};
|
|
868
|
+
await writeJournal(options.pmRoot, journal);
|
|
869
|
+
await emitTransition(options, journal, "prepared");
|
|
870
|
+
}
|
|
871
|
+
return { journal, recovered };
|
|
872
|
+
}
|
|
873
|
+
async function applyPreparedTransaction(options, journal, recovered) {
|
|
874
|
+
try {
|
|
875
|
+
await discoverAppliedSteps(journal, options.steps);
|
|
876
|
+
await writeJournal(options.pmRoot, journal);
|
|
877
|
+
const completed = new Set(journal.completedStepIds);
|
|
878
|
+
const started = new Set(journal.startedStepIds);
|
|
879
|
+
for (const step of options.steps) {
|
|
880
|
+
if (completed.has(step.id))
|
|
881
|
+
continue;
|
|
882
|
+
const inspection = await step.inspect();
|
|
883
|
+
let result = cloneOptionalJournalValue(inspection.result, `Step ${step.id} result`);
|
|
884
|
+
if (inspection.state !== "applied") {
|
|
885
|
+
const compensationData = await step.prepareCompensation?.();
|
|
886
|
+
setJournalEntry(journal.compensationData, step.id, compensationData, `Step ${step.id} compensation data`);
|
|
887
|
+
started.add(step.id);
|
|
888
|
+
journal.startedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => started.has(stepId));
|
|
889
|
+
await writeJournal(options.pmRoot, journal);
|
|
890
|
+
const appliedResult = await step.apply();
|
|
891
|
+
result = cloneOptionalJournalValue(appliedResult, `Step ${step.id} result`);
|
|
892
|
+
}
|
|
893
|
+
await emitTransition(options, journal, "step_applied", step.id);
|
|
894
|
+
completed.add(step.id);
|
|
895
|
+
journal.completedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => completed.has(stepId));
|
|
896
|
+
setJournalEntry(journal.results, step.id, result, `Step ${step.id} result`);
|
|
897
|
+
await writeJournal(options.pmRoot, journal);
|
|
898
|
+
await emitTransition(options, journal, "step_recorded", step.id);
|
|
899
|
+
}
|
|
900
|
+
await emitTransition(options, journal, "committing");
|
|
901
|
+
journal.status = "committed";
|
|
902
|
+
await writeJournal(options.pmRoot, journal);
|
|
903
|
+
await emitTransition(options, journal, "committed");
|
|
904
|
+
return {
|
|
905
|
+
transactionId: journal.transactionId,
|
|
906
|
+
status: "committed",
|
|
907
|
+
recovered,
|
|
908
|
+
results: createResultMap(journal.results)
|
|
909
|
+
};
|
|
910
|
+
} catch (error) {
|
|
911
|
+
if (error instanceof WorkspaceTransactionInterruptedError || journal.status === "committed")
|
|
912
|
+
throw error;
|
|
913
|
+
try {
|
|
914
|
+
await compensateAppliedSteps(options, journal);
|
|
915
|
+
} catch (compensationError) {
|
|
916
|
+
throw new AggregateError([error, compensationError], `Workspace transaction failed and compensation failed: ${String(compensationError)}`, { cause: compensationError });
|
|
917
|
+
}
|
|
918
|
+
throw error;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
async function loadJournal(pmRoot, transactionId, stepIds) {
|
|
922
|
+
try {
|
|
923
|
+
return parseJournal(await readFile(journalPath(pmRoot, transactionId), "utf8"), transactionId, stepIds);
|
|
924
|
+
} catch (error) {
|
|
925
|
+
if (error !== null && typeof error === "object" && "code" in error && error.code === "ENOENT")
|
|
926
|
+
return void 0;
|
|
927
|
+
throw error;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
async function emitTransition(options, journal, transition, stepId) {
|
|
931
|
+
await options.onTransition?.({
|
|
932
|
+
transactionId: journal.transactionId,
|
|
933
|
+
attempt: journal.attempt,
|
|
934
|
+
transition,
|
|
935
|
+
...stepId === void 0 ? {} : { stepId }
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
async function discoverAppliedSteps(journal, steps) {
|
|
939
|
+
const completed = /* @__PURE__ */ new Set();
|
|
940
|
+
const results = createResultMap();
|
|
941
|
+
for (const step of steps) {
|
|
942
|
+
const inspection = await step.inspect();
|
|
943
|
+
if (inspection.state === "applied") {
|
|
944
|
+
completed.add(step.id);
|
|
945
|
+
setJournalEntry(results, step.id, inspection.result, `Step ${step.id} result`);
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
journal.results = results;
|
|
949
|
+
journal.completedStepIds = steps.map((step) => step.id).filter((stepId) => completed.has(stepId));
|
|
950
|
+
}
|
|
951
|
+
async function compensateAppliedSteps(options, journal) {
|
|
952
|
+
journal.status = "compensating";
|
|
953
|
+
await writeJournal(options.pmRoot, journal);
|
|
954
|
+
await emitTransition(options, journal, "compensating");
|
|
955
|
+
const completed = new Set(journal.completedStepIds);
|
|
956
|
+
const started = new Set(journal.startedStepIds);
|
|
957
|
+
for (const step of [...options.steps].reverse()) {
|
|
958
|
+
if (!started.has(step.id) && !completed.has(step.id))
|
|
959
|
+
continue;
|
|
960
|
+
let shouldCompensate;
|
|
961
|
+
try {
|
|
962
|
+
shouldCompensate = started.has(step.id) && (await step.inspect()).state === "applied";
|
|
963
|
+
} catch {
|
|
964
|
+
shouldCompensate = started.has(step.id);
|
|
965
|
+
}
|
|
966
|
+
if (shouldCompensate) {
|
|
967
|
+
await emitTransition(options, journal, "step_compensating", step.id);
|
|
968
|
+
await step.compensate(journal.compensationData[step.id]);
|
|
969
|
+
}
|
|
970
|
+
completed.delete(step.id);
|
|
971
|
+
started.delete(step.id);
|
|
972
|
+
journal.completedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => completed.has(stepId));
|
|
973
|
+
journal.startedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => started.has(stepId));
|
|
974
|
+
delete journal.results[step.id];
|
|
975
|
+
delete journal.compensationData[step.id];
|
|
976
|
+
await writeJournal(options.pmRoot, journal);
|
|
977
|
+
await emitTransition(options, journal, "step_compensated", step.id);
|
|
978
|
+
}
|
|
979
|
+
journal.status = "compensated";
|
|
980
|
+
await writeJournal(options.pmRoot, journal);
|
|
981
|
+
await emitTransition(options, journal, "compensated");
|
|
982
|
+
}
|
|
983
|
+
async function commitWorkspaceTransaction(options) {
|
|
984
|
+
const pmRoot = requiredText2(options.pmRoot, "Transaction pmRoot");
|
|
985
|
+
const transactionId = requiredIdentifier(options.transactionId, "Transaction id");
|
|
986
|
+
const author = requiredText2(options.author, "Transaction author");
|
|
987
|
+
const lockTtlSeconds = positiveInteger(options.lockTtlSeconds, DEFAULT_LOCK_TTL_SECONDS, "Transaction lock TTL");
|
|
988
|
+
const lockWaitMs = positiveInteger(options.lockWaitMs, DEFAULT_LOCK_WAIT_MS, "Transaction lock wait");
|
|
989
|
+
const steps = [...options.steps];
|
|
990
|
+
if (steps.length === 0)
|
|
991
|
+
throw new TypeError("Workspace transaction requires at least one step");
|
|
992
|
+
const stepIds = steps.map((step) => {
|
|
993
|
+
const stepId = requiredIdentifier(step.id, "Transaction step id");
|
|
994
|
+
if (stepId !== step.id)
|
|
995
|
+
throw new TypeError("Transaction step id must not contain surrounding whitespace");
|
|
996
|
+
return stepId;
|
|
997
|
+
});
|
|
998
|
+
if (new Set(stepIds).size !== stepIds.length)
|
|
999
|
+
throw new TypeError("Workspace transaction step ids must be unique");
|
|
1000
|
+
const stableOptions = {
|
|
1001
|
+
...options,
|
|
1002
|
+
pmRoot,
|
|
1003
|
+
transactionId,
|
|
1004
|
+
author,
|
|
1005
|
+
steps,
|
|
1006
|
+
lockTtlSeconds,
|
|
1007
|
+
lockWaitMs
|
|
1008
|
+
};
|
|
1009
|
+
const release2 = await acquireLock(pmRoot, WORKSPACE_TRANSACTION_LOCK_ID, lockTtlSeconds, author, false, false, lockWaitMs);
|
|
1010
|
+
try {
|
|
1011
|
+
const existing = await loadJournal(pmRoot, transactionId, stepIds);
|
|
1012
|
+
const recovered = existing !== void 0;
|
|
1013
|
+
if (existing?.status === "committed")
|
|
1014
|
+
return {
|
|
1015
|
+
transactionId,
|
|
1016
|
+
status: "committed",
|
|
1017
|
+
recovered: true,
|
|
1018
|
+
results: createResultMap(existing.results)
|
|
1019
|
+
};
|
|
1020
|
+
const prepared = await prepareJournalForApply(stableOptions, transactionId, author, stepIds, existing);
|
|
1021
|
+
return await applyPreparedTransaction(stableOptions, prepared.journal, recovered || prepared.recovered);
|
|
1022
|
+
} finally {
|
|
1023
|
+
await release2();
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
// dist/sdk/extension-command-context.js
|
|
1028
|
+
function createExtensionCommandSdk(pmRoot, client) {
|
|
1029
|
+
return {
|
|
1030
|
+
client,
|
|
1031
|
+
getItemAt: (id, target) => getItemAt(id, target, { pmRoot }),
|
|
1032
|
+
openRelationshipEventStore: (options) => {
|
|
1033
|
+
const registry = createRelationshipKindRegistry();
|
|
1034
|
+
for (const definition of options.definitions) {
|
|
1035
|
+
registry.register(definition);
|
|
1036
|
+
}
|
|
1037
|
+
return RelationshipEventStore.open({
|
|
1038
|
+
pmRoot,
|
|
1039
|
+
nodes: options.nodes,
|
|
1040
|
+
registry,
|
|
1041
|
+
...options.relativePath === void 0 ? {} : { relativePath: options.relativePath }
|
|
1042
|
+
});
|
|
1043
|
+
},
|
|
1044
|
+
commitWorkspaceTransaction: (options) => commitWorkspaceTransaction({ ...options, pmRoot })
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
|
|
304
1048
|
// dist/sdk/runtime-input.js
|
|
305
1049
|
function readRuntimeString(args, key) {
|
|
306
1050
|
const value = args[key];
|
|
@@ -343,6 +1087,7 @@ function actionGlobalOptions(args) {
|
|
|
343
1087
|
return {
|
|
344
1088
|
json: true,
|
|
345
1089
|
quiet: true,
|
|
1090
|
+
author: readRuntimeString(args, "author"),
|
|
346
1091
|
path: readRuntimeString(args, "path"),
|
|
347
1092
|
noExtensions: args.noExtensions === true || args.no_extensions === true,
|
|
348
1093
|
noPager: true
|
|
@@ -1176,8 +1921,8 @@ async function commitImportedItem(params) {
|
|
|
1176
1921
|
}
|
|
1177
1922
|
|
|
1178
1923
|
// dist/cli/commands/guide.js
|
|
1179
|
-
import { readFile } from "node:fs/promises";
|
|
1180
|
-
import
|
|
1924
|
+
import { readFile as readFile2 } from "node:fs/promises";
|
|
1925
|
+
import path3 from "node:path";
|
|
1181
1926
|
|
|
1182
1927
|
// dist/cli/guide-topics.js
|
|
1183
1928
|
function normalizeTopicToken(value) {
|
|
@@ -1613,7 +2358,7 @@ async function renderGuideDocs(topic, depth, packageRoot) {
|
|
|
1613
2358
|
const contentMode = includeContent ? depth === "deep" ? "full" : "excerpt" : "none";
|
|
1614
2359
|
const docs2 = [];
|
|
1615
2360
|
for (const doc of topic.docs) {
|
|
1616
|
-
const absolutePath =
|
|
2361
|
+
const absolutePath = path3.resolve(packageRoot, doc.path);
|
|
1617
2362
|
if (!includeContent) {
|
|
1618
2363
|
docs2.push({
|
|
1619
2364
|
path: doc.path,
|
|
@@ -1628,7 +2373,7 @@ async function renderGuideDocs(topic, depth, packageRoot) {
|
|
|
1628
2373
|
continue;
|
|
1629
2374
|
}
|
|
1630
2375
|
try {
|
|
1631
|
-
const rawContent = await
|
|
2376
|
+
const rawContent = await readFile2(absolutePath, "utf8");
|
|
1632
2377
|
if (depth === "deep") {
|
|
1633
2378
|
const normalized = normalizeLineEndings(rawContent).trimEnd();
|
|
1634
2379
|
docs2.push({
|
|
@@ -4314,7 +5059,7 @@ function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansion = fal
|
|
|
4314
5059
|
|
|
4315
5060
|
// dist/cli/commands/reindex.js
|
|
4316
5061
|
import fs from "node:fs/promises";
|
|
4317
|
-
import
|
|
5062
|
+
import path4 from "node:path";
|
|
4318
5063
|
var MANIFEST_PATH = "index/manifest.json";
|
|
4319
5064
|
var EMBEDDINGS_PATH = "search/embeddings.jsonl";
|
|
4320
5065
|
var EMBEDDING_MIGRATION_REINDEX_HINT = "Provider or model has changed since last index. Run pm reindex --mode semantic to rebuild.";
|
|
@@ -4376,7 +5121,7 @@ async function hydrateDocuments(pmRoot, candidates, schema2, warnings, itemIds)
|
|
|
4376
5121
|
body: parsed.body
|
|
4377
5122
|
});
|
|
4378
5123
|
} catch {
|
|
4379
|
-
warnings.push(`item_list_item_read_failed:${
|
|
5124
|
+
warnings.push(`item_list_item_read_failed:${path4.relative(pmRoot, candidate.item_path)}`);
|
|
4380
5125
|
hydrated.push({
|
|
4381
5126
|
metadata: candidate.metadata,
|
|
4382
5127
|
body: ""
|
|
@@ -4846,8 +5591,8 @@ async function runSemanticReindex(params) {
|
|
|
4846
5591
|
};
|
|
4847
5592
|
}
|
|
4848
5593
|
async function writeReindexArtifacts(params) {
|
|
4849
|
-
const manifestPath =
|
|
4850
|
-
const embeddingsPath =
|
|
5594
|
+
const manifestPath = path4.join(params.pmRoot, MANIFEST_PATH);
|
|
5595
|
+
const embeddingsPath = path4.join(params.pmRoot, EMBEDDINGS_PATH);
|
|
4851
5596
|
const keywordCorpusFields = resolveSearchCorpusFields(params.settings);
|
|
4852
5597
|
const embeddingsLines = params.documentsForKeywordArtifacts.map((document) => JSON.stringify(buildKeywordRecord(document, params.mode, keywordCorpusFields))).join("\n");
|
|
4853
5598
|
emitReindexProgress(params.progressEnabled, "writing keyword artifacts");
|
|
@@ -4911,8 +5656,8 @@ async function runReindex(options, global) {
|
|
|
4911
5656
|
emitReindexProgress(progressEnabled, `loaded_items=${metadataDocuments.length}`);
|
|
4912
5657
|
const generatedAt = nowIso();
|
|
4913
5658
|
const manifest = buildReindexManifest(mode, generatedAt, metadataDocuments);
|
|
4914
|
-
const manifestPath =
|
|
4915
|
-
const embeddingsPath =
|
|
5659
|
+
const manifestPath = path4.join(pmRoot, MANIFEST_PATH);
|
|
5660
|
+
const embeddingsPath = path4.join(pmRoot, EMBEDDINGS_PATH);
|
|
4916
5661
|
let documentsForKeywordArtifacts = mode === "keyword" ? await hydrateDocuments(pmRoot, documentCandidates, settings.schema, reindexWarnings) : metadataDocuments;
|
|
4917
5662
|
const semanticWarnings = [];
|
|
4918
5663
|
let vectorizationLedgerEntries = {};
|
|
@@ -4999,10 +5744,11 @@ async function runReindex(options, global) {
|
|
|
4999
5744
|
}
|
|
5000
5745
|
|
|
5001
5746
|
// dist/sdk/runtime.js
|
|
5747
|
+
var ACTIVE_EXTENSION_HOST_CONTEXT = /* @__PURE__ */ Symbol("pm.active-extension-host-context");
|
|
5002
5748
|
function splitFullClientMutationOptions(options) {
|
|
5003
5749
|
return { fullChangedFields: true, options };
|
|
5004
5750
|
}
|
|
5005
|
-
var PmClient = class {
|
|
5751
|
+
var PmClient = class _PmClient {
|
|
5006
5752
|
defaults;
|
|
5007
5753
|
/** Create a client with workspace, author, and extension-loading defaults. */
|
|
5008
5754
|
constructor(options = {}) {
|
|
@@ -5013,6 +5759,12 @@ var PmClient = class {
|
|
|
5013
5759
|
...options.noExtensions === void 0 ? {} : { noExtensions: options.noExtensions }
|
|
5014
5760
|
};
|
|
5015
5761
|
}
|
|
5762
|
+
/** Create a native-action client that reuses an extension host's active schema context. */
|
|
5763
|
+
static forActiveExtensionHost(options) {
|
|
5764
|
+
const client = new _PmClient({ ...options, noExtensions: true });
|
|
5765
|
+
client.defaults[ACTIVE_EXTENSION_HOST_CONTEXT] = true;
|
|
5766
|
+
return client;
|
|
5767
|
+
}
|
|
5016
5768
|
/** Run any native or extension-contributed action through the SDK dispatcher. */
|
|
5017
5769
|
run(action, args = {}) {
|
|
5018
5770
|
return runAction({ ...this.defaults, ...args, action });
|
|
@@ -5714,8 +6466,8 @@ function upgrade(target, options = {}, clientOptions = {}) {
|
|
|
5714
6466
|
}
|
|
5715
6467
|
function buildWorkspaceExtensionRegistrationsCacheKey(pmRoot, settings, cwd) {
|
|
5716
6468
|
return JSON.stringify([
|
|
5717
|
-
|
|
5718
|
-
|
|
6469
|
+
path5.resolve(pmRoot),
|
|
6470
|
+
path5.resolve(cwd ?? process.cwd()),
|
|
5719
6471
|
settings.extensions.enabled,
|
|
5720
6472
|
settings.extensions.disabled,
|
|
5721
6473
|
settings.extensions.policy
|
|
@@ -5835,7 +6587,11 @@ async function dispatchActiveExtensionAction(action, args, options, global, acti
|
|
|
5835
6587
|
args: readRuntimeStringArray(options.args ?? args.args),
|
|
5836
6588
|
options: extensionOptionsFromArgs(args, options),
|
|
5837
6589
|
global,
|
|
5838
|
-
pm_root: active.pmRoot
|
|
6590
|
+
pm_root: active.pmRoot,
|
|
6591
|
+
sdk: createExtensionCommandSdk(active.pmRoot, PmClient.forActiveExtensionHost({
|
|
6592
|
+
pmRoot: active.pmRoot,
|
|
6593
|
+
author: typeof global.author === "string" && global.author.trim() ? global.author.trim() : "pm-extension"
|
|
6594
|
+
}))
|
|
5839
6595
|
});
|
|
5840
6596
|
if (!handlerResult.handled) {
|
|
5841
6597
|
const suffix = handlerResult.warnings.length > 0 ? ` (${handlerResult.warnings.join(", ")})` : "";
|
|
@@ -6002,6 +6758,9 @@ async function runAction(args) {
|
|
|
6002
6758
|
const explicitCwd = readRuntimeString(resolved.args, "cwd");
|
|
6003
6759
|
const resolutionCwd = explicitCwd ?? process.cwd();
|
|
6004
6760
|
try {
|
|
6761
|
+
if (args[ACTIVE_EXTENSION_HOST_CONTEXT] === true) {
|
|
6762
|
+
return await dispatchAction(resolved.action, resolved.args, global, null);
|
|
6763
|
+
}
|
|
6005
6764
|
return await withActiveExtensions(global, explicitCwd, resolutionCwd, (activeExtensions) => dispatchAction(resolved.action, resolved.args, global, activeExtensions));
|
|
6006
6765
|
} finally {
|
|
6007
6766
|
if (invalidateWorkspaceContractsCache) {
|
|
@@ -6462,6 +7221,11 @@ async function loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
|
|
|
6462
7221
|
}
|
|
6463
7222
|
|
|
6464
7223
|
export {
|
|
7224
|
+
RelationshipEventLog,
|
|
7225
|
+
RelationshipEventStore,
|
|
7226
|
+
WorkspaceTransactionInterruptedError,
|
|
7227
|
+
commitWorkspaceTransaction,
|
|
7228
|
+
createExtensionCommandSdk,
|
|
6465
7229
|
clearWorkspaceContractsCache,
|
|
6466
7230
|
readStringOption,
|
|
6467
7231
|
readBooleanOption,
|
|
@@ -6574,6 +7338,6 @@ export {
|
|
|
6574
7338
|
readRequiredString,
|
|
6575
7339
|
runAction
|
|
6576
7340
|
};
|
|
6577
|
-
//# sourceMappingURL=chunk-
|
|
7341
|
+
//# sourceMappingURL=chunk-46Z6FAVP.js.map
|
|
6578
7342
|
|
|
6579
|
-
//# debugId=
|
|
7343
|
+
//# debugId=46a874f8-2610-5028-8e18-b40e6110f614
|