@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,8 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
runUpdateMany
|
|
3
|
+
} from "./chunk-3KPNOZOH.js";
|
|
4
|
+
import {
|
|
5
|
+
runConfig,
|
|
6
|
+
runUpgrade
|
|
7
|
+
} from "./chunk-5S6IZXK7.js";
|
|
8
|
+
import {
|
|
9
|
+
runAggregate,
|
|
10
|
+
runGet,
|
|
11
|
+
runGraph,
|
|
12
|
+
runSearch
|
|
13
|
+
} from "./chunk-NTS2RKHN.js";
|
|
6
14
|
import {
|
|
7
15
|
resolveStartTaskInProgressStatus,
|
|
8
16
|
runClaim,
|
|
@@ -16,110 +24,21 @@ import {
|
|
|
16
24
|
runTest,
|
|
17
25
|
runTestAll,
|
|
18
26
|
runValidate
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
runDocs
|
|
22
|
-
} from "./chunk-D5XHO4Q7.js";
|
|
23
|
-
import {
|
|
24
|
-
runCopy
|
|
25
|
-
} from "./chunk-NNANAWFH.js";
|
|
26
|
-
import {
|
|
27
|
-
runFocus
|
|
28
|
-
} from "./chunk-OWP6QFBV.js";
|
|
29
|
-
import {
|
|
30
|
-
runDelete
|
|
31
|
-
} from "./chunk-W5E2UUSH.js";
|
|
32
|
-
import {
|
|
33
|
-
runAppend
|
|
34
|
-
} from "./chunk-G6MYGULG.js";
|
|
35
|
-
import {
|
|
36
|
-
runProfileApply,
|
|
37
|
-
runProfileLint,
|
|
38
|
-
runProfileList,
|
|
39
|
-
runProfileShow
|
|
40
|
-
} from "./chunk-TZAE66GQ.js";
|
|
41
|
-
import {
|
|
42
|
-
runNotes
|
|
43
|
-
} from "./chunk-LSOWTLEM.js";
|
|
44
|
-
import {
|
|
45
|
-
runLearnings
|
|
46
|
-
} from "./chunk-6DYOZS6C.js";
|
|
47
|
-
import {
|
|
48
|
-
runFiles,
|
|
49
|
-
runFilesDiscover
|
|
50
|
-
} from "./chunk-66MKH7SZ.js";
|
|
51
|
-
import {
|
|
52
|
-
runCloseMany
|
|
53
|
-
} from "./chunk-RXPQ5Q23.js";
|
|
54
|
-
import {
|
|
55
|
-
runUpdateMany
|
|
56
|
-
} from "./chunk-XWBD6DSR.js";
|
|
57
|
-
import {
|
|
58
|
-
runRestore
|
|
59
|
-
} from "./chunk-5HGZKQUL.js";
|
|
27
|
+
} from "./chunk-JBW2S2C6.js";
|
|
60
28
|
import {
|
|
61
29
|
runUpdate
|
|
62
|
-
} from "./chunk-
|
|
63
|
-
import {
|
|
64
|
-
runPlan
|
|
65
|
-
} from "./chunk-XXLXJL7V.js";
|
|
66
|
-
import {
|
|
67
|
-
assertHistoryCompactTarget,
|
|
68
|
-
runHistoryCompact,
|
|
69
|
-
runHistoryCompactBulk
|
|
70
|
-
} from "./chunk-37DRDP2B.js";
|
|
71
|
-
import {
|
|
72
|
-
runComments
|
|
73
|
-
} from "./chunk-RGMWJLXF.js";
|
|
74
|
-
import {
|
|
75
|
-
runConfig,
|
|
76
|
-
runUpgrade
|
|
77
|
-
} from "./chunk-ADXDCAKP.js";
|
|
30
|
+
} from "./chunk-P24ZU5QV.js";
|
|
78
31
|
import {
|
|
79
32
|
SCAFFOLD_CAPABILITIES,
|
|
80
33
|
runExtension,
|
|
81
34
|
runInit
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import {
|
|
84
|
-
runSchemaAddField,
|
|
85
|
-
runSchemaAddStatus,
|
|
86
|
-
runSchemaAddType,
|
|
87
|
-
runSchemaApplyPreset,
|
|
88
|
-
runSchemaInferTypes,
|
|
89
|
-
runSchemaList,
|
|
90
|
-
runSchemaListFields,
|
|
91
|
-
runSchemaRemoveField,
|
|
92
|
-
runSchemaRemoveStatus,
|
|
93
|
-
runSchemaRemoveType,
|
|
94
|
-
runSchemaShow,
|
|
95
|
-
runSchemaShowField,
|
|
96
|
-
runSchemaShowStatus
|
|
97
|
-
} from "./chunk-2XOSFSTH.js";
|
|
98
|
-
import {
|
|
99
|
-
runAggregate,
|
|
100
|
-
runGet,
|
|
101
|
-
runGraph,
|
|
102
|
-
runSearch
|
|
103
|
-
} from "./chunk-GKPCTQYG.js";
|
|
104
|
-
import {
|
|
105
|
-
runDeps
|
|
106
|
-
} from "./chunk-3QDR6ZLU.js";
|
|
35
|
+
} from "./chunk-ZF52NVRT.js";
|
|
107
36
|
import {
|
|
108
37
|
runActivity,
|
|
109
38
|
runContext,
|
|
110
39
|
runHistory,
|
|
111
40
|
runNext
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import {
|
|
114
|
-
runList
|
|
115
|
-
} from "./chunk-AXRT7K5V.js";
|
|
116
|
-
import {
|
|
117
|
-
runHistoryRedact
|
|
118
|
-
} from "./chunk-X5YCTFKT.js";
|
|
119
|
-
import {
|
|
120
|
-
resolveRegisteredSearchProvider,
|
|
121
|
-
resolveRegisteredVectorStoreAdapter
|
|
122
|
-
} from "./chunk-CYCJBU3I.js";
|
|
41
|
+
} from "./chunk-AR24KW26.js";
|
|
123
42
|
import {
|
|
124
43
|
REINDEX_LOCK_ID,
|
|
125
44
|
buildSearchCorpus,
|
|
@@ -142,7 +61,32 @@ import {
|
|
|
142
61
|
resolveSettingsWithSemanticRuntimeDefaults,
|
|
143
62
|
resolveVectorStores,
|
|
144
63
|
writeVectorizationStatusLedger
|
|
145
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-N2TEEOXJ.js";
|
|
65
|
+
import {
|
|
66
|
+
assertHistoryCompactTarget,
|
|
67
|
+
runHistoryCompact,
|
|
68
|
+
runHistoryCompactBulk
|
|
69
|
+
} from "./chunk-NPEYH6CE.js";
|
|
70
|
+
import {
|
|
71
|
+
assertHistoryRepairTarget,
|
|
72
|
+
runHistoryRepair,
|
|
73
|
+
runHistoryRepairAll
|
|
74
|
+
} from "./chunk-A3GAQLBH.js";
|
|
75
|
+
import {
|
|
76
|
+
runLearnings
|
|
77
|
+
} from "./chunk-FQO5THHM.js";
|
|
78
|
+
import {
|
|
79
|
+
runNotes
|
|
80
|
+
} from "./chunk-UU6EP25G.js";
|
|
81
|
+
import {
|
|
82
|
+
runPlan
|
|
83
|
+
} from "./chunk-ZUCBPXNA.js";
|
|
84
|
+
import {
|
|
85
|
+
runProfileApply,
|
|
86
|
+
runProfileLint,
|
|
87
|
+
runProfileList,
|
|
88
|
+
runProfileShow
|
|
89
|
+
} from "./chunk-AGEBQRBG.js";
|
|
146
90
|
import {
|
|
147
91
|
ACTIVITY_FLAG_CONTRACTS,
|
|
148
92
|
AGGREGATE_FLAG_CONTRACTS,
|
|
@@ -175,19 +119,83 @@ import {
|
|
|
175
119
|
UPDATE_FLAG_CONTRACTS,
|
|
176
120
|
UPDATE_MANY_FLAG_CONTRACTS,
|
|
177
121
|
toCompletionFlagString
|
|
178
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-EEECAV5M.js";
|
|
123
|
+
import {
|
|
124
|
+
runSchemaAddField,
|
|
125
|
+
runSchemaAddStatus,
|
|
126
|
+
runSchemaAddType,
|
|
127
|
+
runSchemaApplyPreset,
|
|
128
|
+
runSchemaInferTypes,
|
|
129
|
+
runSchemaList,
|
|
130
|
+
runSchemaListFields,
|
|
131
|
+
runSchemaRemoveField,
|
|
132
|
+
runSchemaRemoveStatus,
|
|
133
|
+
runSchemaRemoveType,
|
|
134
|
+
runSchemaShow,
|
|
135
|
+
runSchemaShowField,
|
|
136
|
+
runSchemaShowStatus
|
|
137
|
+
} from "./chunk-MQOSMBWV.js";
|
|
138
|
+
import {
|
|
139
|
+
runComments
|
|
140
|
+
} from "./chunk-EVAN5VJA.js";
|
|
179
141
|
import {
|
|
180
142
|
runCreate
|
|
181
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-3QNUDDY2.js";
|
|
144
|
+
import {
|
|
145
|
+
projectMutationResult
|
|
146
|
+
} from "./chunk-7B7IHMLH.js";
|
|
147
|
+
import {
|
|
148
|
+
runCopy
|
|
149
|
+
} from "./chunk-OKPZDH43.js";
|
|
150
|
+
import {
|
|
151
|
+
runFocus
|
|
152
|
+
} from "./chunk-XDWXPG2E.js";
|
|
153
|
+
import {
|
|
154
|
+
runDelete
|
|
155
|
+
} from "./chunk-RX53WHFI.js";
|
|
156
|
+
import {
|
|
157
|
+
runDeps
|
|
158
|
+
} from "./chunk-EAV3P54W.js";
|
|
159
|
+
import {
|
|
160
|
+
runDocs
|
|
161
|
+
} from "./chunk-Q6JPYR7I.js";
|
|
162
|
+
import {
|
|
163
|
+
runFiles,
|
|
164
|
+
runFilesDiscover
|
|
165
|
+
} from "./chunk-IXG5CMBR.js";
|
|
166
|
+
import {
|
|
167
|
+
resolveRegisteredSearchProvider,
|
|
168
|
+
resolveRegisteredVectorStoreAdapter
|
|
169
|
+
} from "./chunk-CYCJBU3I.js";
|
|
170
|
+
import {
|
|
171
|
+
runAppend
|
|
172
|
+
} from "./chunk-OKWJUL6F.js";
|
|
182
173
|
import {
|
|
183
174
|
parseTags
|
|
184
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-A5EQPNV7.js";
|
|
185
176
|
import {
|
|
186
|
-
|
|
187
|
-
} from "./chunk-
|
|
177
|
+
runCloseMany
|
|
178
|
+
} from "./chunk-4PSJVGRE.js";
|
|
179
|
+
import {
|
|
180
|
+
runList
|
|
181
|
+
} from "./chunk-YIC5NGXF.js";
|
|
182
|
+
import {
|
|
183
|
+
createQueryFingerprint,
|
|
184
|
+
decodeQueryCursorState,
|
|
185
|
+
paginateQueryRows
|
|
186
|
+
} from "./chunk-QYGK2XQ3.js";
|
|
188
187
|
import {
|
|
189
188
|
runClose
|
|
190
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-VQOG2ETB.js";
|
|
190
|
+
import {
|
|
191
|
+
runRestore
|
|
192
|
+
} from "./chunk-FQODDTE7.js";
|
|
193
|
+
import {
|
|
194
|
+
getItemAt
|
|
195
|
+
} from "./chunk-A4FVWFZY.js";
|
|
196
|
+
import {
|
|
197
|
+
runHistoryRedact
|
|
198
|
+
} from "./chunk-RWAIRGBC.js";
|
|
191
199
|
import {
|
|
192
200
|
acquireLock,
|
|
193
201
|
appendHistoryEntry,
|
|
@@ -210,11 +218,12 @@ import {
|
|
|
210
218
|
setActiveExtensionRegistrations,
|
|
211
219
|
setActiveExtensionRenderers,
|
|
212
220
|
setActiveExtensionServices
|
|
213
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-RLLOZAM2.js";
|
|
214
222
|
import {
|
|
215
223
|
BUILTIN_ITEM_TYPE_VALUES,
|
|
216
224
|
EXIT_CODE,
|
|
217
225
|
PmCliError,
|
|
226
|
+
RelationshipGraph,
|
|
218
227
|
STATUS_VALUES,
|
|
219
228
|
activateExtensions,
|
|
220
229
|
asRecordClone,
|
|
@@ -226,6 +235,7 @@ import {
|
|
|
226
235
|
createEmptyExtensionRegistrationRegistry,
|
|
227
236
|
createEmptyExtensionRendererRegistry,
|
|
228
237
|
createEmptyExtensionServiceRegistry,
|
|
238
|
+
createRelationshipKindRegistry,
|
|
229
239
|
deactivateExtensions,
|
|
230
240
|
getHistoryPath,
|
|
231
241
|
getSettingsPath,
|
|
@@ -238,10 +248,10 @@ import {
|
|
|
238
248
|
resolveRuntimeStatusRegistry,
|
|
239
249
|
toNonEmptyStringOrUndefined,
|
|
240
250
|
writeFileAtomic
|
|
241
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-WCBB6VI3.js";
|
|
242
252
|
|
|
243
253
|
// dist/sdk/runtime.js
|
|
244
|
-
import
|
|
254
|
+
import path5 from "node:path";
|
|
245
255
|
|
|
246
256
|
// dist/core/output/query-summary.js
|
|
247
257
|
!(function() {
|
|
@@ -313,6 +323,761 @@ function memoizeWorkspaceExtensionRegistrations(cacheKey, loadRegistrations) {
|
|
|
313
323
|
return registrations;
|
|
314
324
|
}
|
|
315
325
|
|
|
326
|
+
// dist/sdk/relationship-history.js
|
|
327
|
+
import { constants } from "node:fs";
|
|
328
|
+
import { lstat, mkdir, open } from "node:fs/promises";
|
|
329
|
+
import path from "node:path";
|
|
330
|
+
!(function() {
|
|
331
|
+
try {
|
|
332
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
333
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b00bbd6d-eb0d-5fbf-8f87-456d479e7807");
|
|
334
|
+
} catch (e2) {
|
|
335
|
+
}
|
|
336
|
+
})();
|
|
337
|
+
function requiredText(value, field) {
|
|
338
|
+
if (typeof value !== "string" || value.trim().length === 0)
|
|
339
|
+
throw new TypeError(`Relationship event ${field} must be non-empty`);
|
|
340
|
+
return value.trim();
|
|
341
|
+
}
|
|
342
|
+
function edgeIdentity(edge, registry) {
|
|
343
|
+
const definition = registry.require(edge.kind);
|
|
344
|
+
const endpoints = definition.direction === "undirected" ? [edge.source, edge.target].sort().join("\0") : `${edge.source}\0${edge.target}`;
|
|
345
|
+
return `${definition.kind}\0${endpoints}`;
|
|
346
|
+
}
|
|
347
|
+
function freezeEdge(edge) {
|
|
348
|
+
return Object.freeze({
|
|
349
|
+
...edge,
|
|
350
|
+
...edge.payload === void 0 ? {} : { payload: Object.freeze(structuredClone(edge.payload)) }
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
function assertCardinality(candidate, excludeRelationshipId, registry, indexes) {
|
|
354
|
+
const definition = registry.require(candidate.kind);
|
|
355
|
+
const outgoingOwner = indexes.outgoingOne.get(`${definition.kind}\0${candidate.source}`);
|
|
356
|
+
if (outgoingOwner !== void 0 && outgoingOwner !== excludeRelationshipId)
|
|
357
|
+
throw new TypeError(`Relationship outgoing cardinality exceeded for ${definition.kind}`);
|
|
358
|
+
const incomingOwner = indexes.incomingOne.get(`${definition.kind}\0${candidate.target}`);
|
|
359
|
+
if (incomingOwner !== void 0 && incomingOwner !== excludeRelationshipId)
|
|
360
|
+
throw new TypeError(`Relationship incoming cardinality exceeded for ${definition.kind}`);
|
|
361
|
+
const identity = edgeIdentity(candidate, registry);
|
|
362
|
+
const identityOwner = indexes.identities.get(identity);
|
|
363
|
+
if (identityOwner !== void 0 && identityOwner !== excludeRelationshipId)
|
|
364
|
+
throw new TypeError(`Relationship edge already active: ${identity}`);
|
|
365
|
+
}
|
|
366
|
+
function replayEvents(events) {
|
|
367
|
+
const active = /* @__PURE__ */ new Map();
|
|
368
|
+
for (const event of events) {
|
|
369
|
+
if (event.action === "remove")
|
|
370
|
+
active.delete(event.relationshipId);
|
|
371
|
+
else
|
|
372
|
+
active.set(event.relationshipId, event.edge);
|
|
373
|
+
}
|
|
374
|
+
return active;
|
|
375
|
+
}
|
|
376
|
+
function normalizeEventHeader(input, currentVersion, eventIds) {
|
|
377
|
+
if (input.expectedVersion !== void 0 && input.expectedVersion !== currentVersion)
|
|
378
|
+
throw new TypeError(`Relationship event version conflict: expected ${input.expectedVersion}, current ${currentVersion}`);
|
|
379
|
+
const eventId = requiredText(input.eventId, "eventId");
|
|
380
|
+
if (eventIds.has(eventId))
|
|
381
|
+
throw new TypeError(`Relationship event already exists: ${eventId}`);
|
|
382
|
+
if (input.action !== "add" && input.action !== "remove" && input.action !== "supersede")
|
|
383
|
+
throw new TypeError(`Unknown relationship event action: ${input.action}`);
|
|
384
|
+
if (!Number.isFinite(Date.parse(input.timestamp)))
|
|
385
|
+
throw new TypeError("Relationship event timestamp must be valid");
|
|
386
|
+
return {
|
|
387
|
+
eventId,
|
|
388
|
+
relationshipId: requiredText(input.relationshipId, "relationshipId"),
|
|
389
|
+
author: requiredText(input.author, "author"),
|
|
390
|
+
timestamp: new Date(input.timestamp).toISOString()
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function resolveMutationEdge(input, relationshipId, active, nodes, registry, indexes) {
|
|
394
|
+
const isActive = active.has(relationshipId);
|
|
395
|
+
if (input.action === "add" && isActive)
|
|
396
|
+
throw new TypeError(`Relationship is already active: ${relationshipId}`);
|
|
397
|
+
if (input.action !== "add" && !isActive)
|
|
398
|
+
throw new TypeError(`Relationship is not active: ${relationshipId}`);
|
|
399
|
+
if (input.action === "remove")
|
|
400
|
+
return void 0;
|
|
401
|
+
if (!input.edge)
|
|
402
|
+
throw new TypeError(`Relationship ${input.action} event requires an edge`);
|
|
403
|
+
const source = typeof input.edge.source === "string" ? input.edge.source.trim() : "";
|
|
404
|
+
const target = typeof input.edge.target === "string" ? input.edge.target.trim() : "";
|
|
405
|
+
if (!nodes.has(source) || !nodes.has(target))
|
|
406
|
+
throw new TypeError(`Relationship endpoint not found: ${source} -> ${target}`);
|
|
407
|
+
const canonical = new RelationshipGraph([source, target], [input.edge], registry).edges()[0];
|
|
408
|
+
assertCardinality(canonical, relationshipId, registry, indexes);
|
|
409
|
+
return freezeEdge(canonical);
|
|
410
|
+
}
|
|
411
|
+
var RelationshipEventLog = class {
|
|
412
|
+
#nodes;
|
|
413
|
+
#registry;
|
|
414
|
+
#events = [];
|
|
415
|
+
#eventIds = /* @__PURE__ */ new Set();
|
|
416
|
+
#active = /* @__PURE__ */ new Map();
|
|
417
|
+
#cardinalityIndexes = {
|
|
418
|
+
identities: /* @__PURE__ */ new Map(),
|
|
419
|
+
outgoingOne: /* @__PURE__ */ new Map(),
|
|
420
|
+
incomingOne: /* @__PURE__ */ new Map()
|
|
421
|
+
};
|
|
422
|
+
/** Create an empty relationship ledger for a fixed node universe. */
|
|
423
|
+
constructor(nodes, options = {}) {
|
|
424
|
+
this.#nodes = new Set([...nodes].filter((node) => typeof node === "string").map((node) => node.trim()).filter(Boolean));
|
|
425
|
+
this.#registry = options.registry ?? createRelationshipKindRegistry();
|
|
426
|
+
}
|
|
427
|
+
/** Current append sequence. */
|
|
428
|
+
get version() {
|
|
429
|
+
return this.#events.length;
|
|
430
|
+
}
|
|
431
|
+
/** Return an immutable copy of the full event stream. */
|
|
432
|
+
events() {
|
|
433
|
+
return Object.freeze([...this.#events]);
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Iterate a stable event prefix in immutable, bounded batches. Consumers can
|
|
437
|
+
* build streaming projections without copying or exposing the mutable ledger.
|
|
438
|
+
* `fromVersion === toVersion + 1` is the intentional empty checkpoint range;
|
|
439
|
+
* larger watermarks are rejected as invalid for the selected prefix.
|
|
440
|
+
*/
|
|
441
|
+
*stream(options = {}) {
|
|
442
|
+
const fromVersion = options.fromVersion ?? 1;
|
|
443
|
+
const toVersion = options.toVersion ?? this.version;
|
|
444
|
+
const batchSize = options.batchSize ?? 100;
|
|
445
|
+
if (!Number.isInteger(fromVersion) || fromVersion < 1)
|
|
446
|
+
throw new TypeError("Relationship event stream fromVersion must be positive");
|
|
447
|
+
if (!Number.isInteger(toVersion) || toVersion < 0 || toVersion > this.version)
|
|
448
|
+
throw new TypeError(`Relationship event stream toVersion out of range: ${toVersion}`);
|
|
449
|
+
if (!Number.isInteger(batchSize) || batchSize < 1)
|
|
450
|
+
throw new TypeError("Relationship event stream batchSize must be positive");
|
|
451
|
+
if (fromVersion > toVersion + 1)
|
|
452
|
+
throw new TypeError("Relationship event stream fromVersion exceeds the selected prefix");
|
|
453
|
+
for (let offset = fromVersion - 1; offset < toVersion; offset += batchSize) {
|
|
454
|
+
yield Object.freeze(this.#events.slice(offset, Math.min(offset + batchSize, toVersion)));
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
/** Fold a selected immutable event prefix into caller-owned domain state. */
|
|
458
|
+
project(initialState, reducer, options = {}) {
|
|
459
|
+
if (typeof reducer !== "function")
|
|
460
|
+
throw new TypeError("Relationship event projection requires a reducer");
|
|
461
|
+
let state = initialState;
|
|
462
|
+
let processed = 0;
|
|
463
|
+
let finalEvent;
|
|
464
|
+
for (const batch of this.stream({ ...options, batchSize: 256 })) {
|
|
465
|
+
for (const event of batch) {
|
|
466
|
+
state = reducer(state, event);
|
|
467
|
+
processed += 1;
|
|
468
|
+
finalEvent = event;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return Object.freeze({
|
|
472
|
+
state,
|
|
473
|
+
version: finalEvent?.sequence ?? Math.max(0, (options.fromVersion ?? 1) - 1),
|
|
474
|
+
processed,
|
|
475
|
+
...finalEvent === void 0 ? {} : { asOf: finalEvent.timestamp }
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
/** Add one active relationship to constant-time validation indexes. */
|
|
479
|
+
#indexActive(relationshipId, edge) {
|
|
480
|
+
const definition = this.#registry.require(edge.kind);
|
|
481
|
+
this.#cardinalityIndexes.identities.set(edgeIdentity(edge, this.#registry), relationshipId);
|
|
482
|
+
if (definition.outgoing === "one")
|
|
483
|
+
this.#cardinalityIndexes.outgoingOne.set(`${definition.kind}\0${edge.source}`, relationshipId);
|
|
484
|
+
if (definition.incoming === "one")
|
|
485
|
+
this.#cardinalityIndexes.incomingOne.set(`${definition.kind}\0${edge.target}`, relationshipId);
|
|
486
|
+
}
|
|
487
|
+
/** Remove one superseded or deleted relationship from validation indexes. */
|
|
488
|
+
#unindexActive(edge) {
|
|
489
|
+
const definition = this.#registry.require(edge.kind);
|
|
490
|
+
this.#cardinalityIndexes.identities.delete(edgeIdentity(edge, this.#registry));
|
|
491
|
+
if (definition.outgoing === "one")
|
|
492
|
+
this.#cardinalityIndexes.outgoingOne.delete(`${definition.kind}\0${edge.source}`);
|
|
493
|
+
if (definition.incoming === "one")
|
|
494
|
+
this.#cardinalityIndexes.incomingOne.delete(`${definition.kind}\0${edge.target}`);
|
|
495
|
+
}
|
|
496
|
+
/** Validate and append one attributable relationship mutation. */
|
|
497
|
+
append(input) {
|
|
498
|
+
const header = normalizeEventHeader(input, this.version, this.#eventIds);
|
|
499
|
+
const previous = this.#active.get(header.relationshipId);
|
|
500
|
+
const edge = resolveMutationEdge(input, header.relationshipId, this.#active, this.#nodes, this.#registry, this.#cardinalityIndexes);
|
|
501
|
+
const event = Object.freeze({
|
|
502
|
+
eventId: header.eventId,
|
|
503
|
+
relationshipId: header.relationshipId,
|
|
504
|
+
action: input.action,
|
|
505
|
+
...edge === void 0 ? {} : { edge },
|
|
506
|
+
author: header.author,
|
|
507
|
+
timestamp: header.timestamp,
|
|
508
|
+
...input.reason?.trim() ? { reason: input.reason.trim() } : {},
|
|
509
|
+
sequence: this.version + 1
|
|
510
|
+
});
|
|
511
|
+
this.#events.push(event);
|
|
512
|
+
this.#eventIds.add(header.eventId);
|
|
513
|
+
if (previous)
|
|
514
|
+
this.#unindexActive(previous);
|
|
515
|
+
if (input.action === "remove")
|
|
516
|
+
this.#active.delete(header.relationshipId);
|
|
517
|
+
else {
|
|
518
|
+
this.#active.set(header.relationshipId, edge);
|
|
519
|
+
this.#indexActive(header.relationshipId, edge);
|
|
520
|
+
}
|
|
521
|
+
return event;
|
|
522
|
+
}
|
|
523
|
+
/** Materialize an exact point-in-time graph without mutating the ledger. */
|
|
524
|
+
snapshot(options = {}) {
|
|
525
|
+
if (options.atVersion !== void 0 && options.atTimestamp !== void 0)
|
|
526
|
+
throw new TypeError("Relationship snapshot accepts one target");
|
|
527
|
+
let included;
|
|
528
|
+
if (options.atTimestamp !== void 0) {
|
|
529
|
+
const timestamp = Date.parse(options.atTimestamp);
|
|
530
|
+
if (!Number.isFinite(timestamp))
|
|
531
|
+
throw new TypeError("Relationship snapshot timestamp must be valid");
|
|
532
|
+
let lastIndex = -1;
|
|
533
|
+
for (let index = this.#events.length - 1; index >= 0; index -= 1) {
|
|
534
|
+
if (Date.parse(this.#events[index].timestamp) > timestamp)
|
|
535
|
+
continue;
|
|
536
|
+
lastIndex = index;
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
included = lastIndex === -1 ? [] : this.#events.slice(0, lastIndex + 1);
|
|
540
|
+
} else {
|
|
541
|
+
const version = options.atVersion ?? this.version;
|
|
542
|
+
if (!Number.isInteger(version) || version < 0 || version > this.version)
|
|
543
|
+
throw new TypeError(`Relationship snapshot version out of range: ${version}`);
|
|
544
|
+
included = this.#events.slice(0, version);
|
|
545
|
+
}
|
|
546
|
+
const active = replayEvents(included);
|
|
547
|
+
const graph2 = new RelationshipGraph(this.#nodes, active.values(), this.#registry);
|
|
548
|
+
return Object.freeze({
|
|
549
|
+
version: included.length,
|
|
550
|
+
...included.at(-1) ? { asOf: included.at(-1).timestamp } : {},
|
|
551
|
+
edges: graph2.edges(),
|
|
552
|
+
graph: graph2
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
/** Page the immutable event stream with a cursor bound to this log version. */
|
|
556
|
+
page(options) {
|
|
557
|
+
if (!Number.isInteger(options.limit) || options.limit < 1)
|
|
558
|
+
throw new TypeError("Relationship event page limit must be positive");
|
|
559
|
+
const fingerprint = createQueryFingerprint("relationship-events", {
|
|
560
|
+
order: "append-sequence"
|
|
561
|
+
});
|
|
562
|
+
const snapshot = options.cursor === void 0 ? this.version : Number(decodeQueryCursorState(options.cursor, fingerprint).snapshot);
|
|
563
|
+
if (!Number.isSafeInteger(snapshot) || snapshot < 0 || snapshot > this.version)
|
|
564
|
+
throw new TypeError("Relationship event cursor snapshot version is invalid");
|
|
565
|
+
const page = paginateQueryRows(this.#events.slice(0, snapshot), {
|
|
566
|
+
cursor: options.cursor,
|
|
567
|
+
fingerprint,
|
|
568
|
+
limit: options.limit,
|
|
569
|
+
readId: (event) => event.eventId,
|
|
570
|
+
snapshot: String(snapshot)
|
|
571
|
+
});
|
|
572
|
+
return {
|
|
573
|
+
version: snapshot,
|
|
574
|
+
events: page.rows,
|
|
575
|
+
hasMore: page.has_more,
|
|
576
|
+
...page.next_cursor ? { nextCursor: page.next_cursor } : {}
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
var RELATIONSHIP_STORE_LOCK_ID = "relationship-event-store";
|
|
581
|
+
var RELATIONSHIP_NOFOLLOW_FLAG = constants.O_NOFOLLOW;
|
|
582
|
+
function acquireRelationshipStoreLock(pmRoot) {
|
|
583
|
+
return acquireLock(pmRoot, RELATIONSHIP_STORE_LOCK_ID, 30, `relationship-store:${process.pid}`, false, false, 3e3);
|
|
584
|
+
}
|
|
585
|
+
async function resolveRelationshipEventStorePath(pmRoot, relativePath = "relationships/events.jsonl") {
|
|
586
|
+
const root = path.resolve(pmRoot);
|
|
587
|
+
const target = path.resolve(root, relativePath);
|
|
588
|
+
const relative = path.relative(root, target);
|
|
589
|
+
if (relative.length === 0)
|
|
590
|
+
throw new TypeError("Relationship event path must name a file within the tracker root");
|
|
591
|
+
if (relative === ".." || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative))
|
|
592
|
+
throw new TypeError("Relationship event path must stay within the tracker root");
|
|
593
|
+
await mkdir(root, { recursive: true });
|
|
594
|
+
const rootStats = await lstat(root);
|
|
595
|
+
if (rootStats.isSymbolicLink())
|
|
596
|
+
throw new TypeError("Relationship event tracker root must not be a symbolic link");
|
|
597
|
+
let current = root;
|
|
598
|
+
for (const segment of relative.split(path.sep)) {
|
|
599
|
+
current = path.join(current, segment);
|
|
600
|
+
try {
|
|
601
|
+
if ((await lstat(current)).isSymbolicLink())
|
|
602
|
+
throw new TypeError("Relationship event path must not contain symbolic links");
|
|
603
|
+
} catch (error) {
|
|
604
|
+
if (error.code === "ENOENT")
|
|
605
|
+
break;
|
|
606
|
+
throw error;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return target;
|
|
610
|
+
}
|
|
611
|
+
async function loadRelationshipEventLog(target, nodes, registry) {
|
|
612
|
+
const log = new RelationshipEventLog(nodes, { registry });
|
|
613
|
+
let raw;
|
|
614
|
+
let handle;
|
|
615
|
+
try {
|
|
616
|
+
handle = await open(target, constants.O_RDONLY | RELATIONSHIP_NOFOLLOW_FLAG);
|
|
617
|
+
raw = await handle.readFile("utf8");
|
|
618
|
+
} catch (error) {
|
|
619
|
+
if (error.code === "ENOENT")
|
|
620
|
+
return log;
|
|
621
|
+
throw error;
|
|
622
|
+
} finally {
|
|
623
|
+
await handle?.close();
|
|
624
|
+
}
|
|
625
|
+
const lines = raw.split("\n");
|
|
626
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
627
|
+
const line = lines[index].trim();
|
|
628
|
+
if (!line)
|
|
629
|
+
continue;
|
|
630
|
+
let stored;
|
|
631
|
+
try {
|
|
632
|
+
stored = JSON.parse(line);
|
|
633
|
+
} catch {
|
|
634
|
+
throw new TypeError(`Invalid relationship event JSONL at line ${index + 1}`);
|
|
635
|
+
}
|
|
636
|
+
if (stored.sequence !== log.version + 1)
|
|
637
|
+
throw new TypeError(`Invalid relationship event sequence at line ${index + 1}`);
|
|
638
|
+
log.append({
|
|
639
|
+
eventId: stored.eventId,
|
|
640
|
+
relationshipId: stored.relationshipId,
|
|
641
|
+
action: stored.action,
|
|
642
|
+
...stored.edge === void 0 ? {} : { edge: stored.edge },
|
|
643
|
+
author: stored.author,
|
|
644
|
+
timestamp: stored.timestamp,
|
|
645
|
+
...stored.reason === void 0 ? {} : { reason: stored.reason },
|
|
646
|
+
expectedVersion: log.version
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
return log;
|
|
650
|
+
}
|
|
651
|
+
var RelationshipEventStore = class _RelationshipEventStore {
|
|
652
|
+
#pmRoot;
|
|
653
|
+
#nodes;
|
|
654
|
+
#registry;
|
|
655
|
+
#path;
|
|
656
|
+
#log;
|
|
657
|
+
constructor(options, nodes, target, log) {
|
|
658
|
+
this.#pmRoot = options.pmRoot;
|
|
659
|
+
this.#nodes = nodes;
|
|
660
|
+
this.#registry = options.registry;
|
|
661
|
+
this.#path = target;
|
|
662
|
+
this.#log = log;
|
|
663
|
+
}
|
|
664
|
+
/** Open and validate an existing stream or create an empty store view. */
|
|
665
|
+
static async open(options) {
|
|
666
|
+
const nodes = Object.freeze([...options.nodes]);
|
|
667
|
+
const target = await resolveRelationshipEventStorePath(options.pmRoot, options.relativePath);
|
|
668
|
+
const release2 = await acquireRelationshipStoreLock(options.pmRoot);
|
|
669
|
+
try {
|
|
670
|
+
await resolveRelationshipEventStorePath(options.pmRoot, target);
|
|
671
|
+
const log = await loadRelationshipEventLog(target, nodes, options.registry);
|
|
672
|
+
return new _RelationshipEventStore(options, nodes, target, log);
|
|
673
|
+
} finally {
|
|
674
|
+
await release2();
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
/** Absolute JSONL path, exposed for diagnostics and backup tooling. */
|
|
678
|
+
get path() {
|
|
679
|
+
return this.#path;
|
|
680
|
+
}
|
|
681
|
+
/** Refresh from durable history and return the current validated append sequence. */
|
|
682
|
+
async currentVersion() {
|
|
683
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
684
|
+
return this.#log.version;
|
|
685
|
+
}
|
|
686
|
+
/** Append one event after refreshing under the shared workspace lock. */
|
|
687
|
+
async append(input) {
|
|
688
|
+
const release2 = await acquireRelationshipStoreLock(this.#pmRoot);
|
|
689
|
+
try {
|
|
690
|
+
const target = await resolveRelationshipEventStorePath(this.#pmRoot, this.#path);
|
|
691
|
+
const refreshed = await loadRelationshipEventLog(target, this.#nodes, this.#registry);
|
|
692
|
+
const event = refreshed.append(input);
|
|
693
|
+
await mkdir(path.dirname(target), { recursive: true });
|
|
694
|
+
await resolveRelationshipEventStorePath(this.#pmRoot, target);
|
|
695
|
+
const handle = await open(target, constants.O_APPEND | constants.O_CREAT | constants.O_WRONLY | RELATIONSHIP_NOFOLLOW_FLAG);
|
|
696
|
+
try {
|
|
697
|
+
await handle.appendFile(`${JSON.stringify(event)}
|
|
698
|
+
`, "utf8");
|
|
699
|
+
} finally {
|
|
700
|
+
await handle.close();
|
|
701
|
+
}
|
|
702
|
+
this.#log = refreshed;
|
|
703
|
+
return event;
|
|
704
|
+
} finally {
|
|
705
|
+
await release2();
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
/** Refresh from durable history and materialize an exact validated snapshot. */
|
|
709
|
+
async snapshot(options = {}) {
|
|
710
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
711
|
+
return this.#log.snapshot(options);
|
|
712
|
+
}
|
|
713
|
+
/** Refresh from durable history and page immutable events. */
|
|
714
|
+
async page(options) {
|
|
715
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
716
|
+
return this.#log.page(options);
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Refresh once under the shared store lock, then stream a coherent immutable
|
|
720
|
+
* prefix without holding the writer lock while the consumer processes batches.
|
|
721
|
+
*/
|
|
722
|
+
async *stream(options = {}) {
|
|
723
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
724
|
+
yield* this.#log.stream(options);
|
|
725
|
+
}
|
|
726
|
+
/** Refresh once and fold a coherent durable prefix into application state. */
|
|
727
|
+
async project(initialState, reducer, options = {}) {
|
|
728
|
+
this.#log = await this.#refreshFromDurableHistory();
|
|
729
|
+
return this.#log.project(initialState, reducer, options);
|
|
730
|
+
}
|
|
731
|
+
/** Serialize a durable refresh with writers so readers never observe a torn JSONL tail. */
|
|
732
|
+
async #refreshFromDurableHistory() {
|
|
733
|
+
const release2 = await acquireRelationshipStoreLock(this.#pmRoot);
|
|
734
|
+
try {
|
|
735
|
+
const target = await resolveRelationshipEventStorePath(this.#pmRoot, this.#path);
|
|
736
|
+
return await loadRelationshipEventLog(target, this.#nodes, this.#registry);
|
|
737
|
+
} finally {
|
|
738
|
+
await release2();
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
// dist/sdk/workspace-transaction.js
|
|
744
|
+
import { mkdir as mkdir2, readFile } from "node:fs/promises";
|
|
745
|
+
import path2 from "node:path";
|
|
746
|
+
!(function() {
|
|
747
|
+
try {
|
|
748
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
749
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2f31b5a8-1462-545e-aa55-8e8f09f511b5");
|
|
750
|
+
} catch (e2) {
|
|
751
|
+
}
|
|
752
|
+
})();
|
|
753
|
+
var WorkspaceTransactionInterruptedError = class extends Error {
|
|
754
|
+
/** Create one explicit crash-boundary interruption. */
|
|
755
|
+
constructor(message = "Workspace transaction interrupted") {
|
|
756
|
+
super(message);
|
|
757
|
+
this.name = "WorkspaceTransactionInterruptedError";
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
var WORKSPACE_TRANSACTION_LOCK_ID = "sdk-workspace-transaction";
|
|
761
|
+
var TRANSACTION_ID_PATTERN = /^[a-zA-Z0-9._-]+$/;
|
|
762
|
+
var DEFAULT_LOCK_TTL_SECONDS = 30;
|
|
763
|
+
var DEFAULT_LOCK_WAIT_MS = 3e3;
|
|
764
|
+
function requiredIdentifier(value, label) {
|
|
765
|
+
if (typeof value !== "string")
|
|
766
|
+
throw new TypeError(`${label} must be a string`);
|
|
767
|
+
const normalized = value.trim();
|
|
768
|
+
if (!normalized || !TRANSACTION_ID_PATTERN.test(normalized))
|
|
769
|
+
throw new TypeError(`${label} must match [a-zA-Z0-9._-]+`);
|
|
770
|
+
return normalized;
|
|
771
|
+
}
|
|
772
|
+
function requiredText2(value, label) {
|
|
773
|
+
if (typeof value !== "string")
|
|
774
|
+
throw new TypeError(`${label} must be a string`);
|
|
775
|
+
const normalized = value.trim();
|
|
776
|
+
if (!normalized)
|
|
777
|
+
throw new TypeError(`${label} must be non-empty`);
|
|
778
|
+
return normalized;
|
|
779
|
+
}
|
|
780
|
+
function positiveInteger(value, fallback, label) {
|
|
781
|
+
const resolved = value ?? fallback;
|
|
782
|
+
if (!Number.isInteger(resolved) || resolved <= 0)
|
|
783
|
+
throw new TypeError(`${label} must be a positive integer`);
|
|
784
|
+
return resolved;
|
|
785
|
+
}
|
|
786
|
+
function journalPath(pmRoot, transactionId) {
|
|
787
|
+
return path2.join(pmRoot, "transactions", "sdk", `${transactionId}.json`);
|
|
788
|
+
}
|
|
789
|
+
async function writeJournal(pmRoot, journal) {
|
|
790
|
+
journal.updatedAt = nowIso();
|
|
791
|
+
const target = journalPath(pmRoot, journal.transactionId);
|
|
792
|
+
await mkdir2(path2.dirname(target), { recursive: true });
|
|
793
|
+
await writeFileAtomic(target, `${JSON.stringify(journal, null, 2)}
|
|
794
|
+
`);
|
|
795
|
+
}
|
|
796
|
+
function hasValidJournalMetadata(journal) {
|
|
797
|
+
return Number.isInteger(journal.attempt) && typeof journal.author === "string" && typeof journal.createdAt === "string" && typeof journal.updatedAt === "string";
|
|
798
|
+
}
|
|
799
|
+
function createResultMap(source) {
|
|
800
|
+
return Object.assign(/* @__PURE__ */ Object.create(null), source);
|
|
801
|
+
}
|
|
802
|
+
function cloneJournalValue(value, label) {
|
|
803
|
+
try {
|
|
804
|
+
const serialized = JSON.stringify(value, (_key, nestedValue) => {
|
|
805
|
+
if (typeof nestedValue === "number" && !Number.isFinite(nestedValue))
|
|
806
|
+
throw new TypeError(`${label} contains a non-finite number`);
|
|
807
|
+
if (nestedValue === void 0 || typeof nestedValue === "function" || typeof nestedValue === "symbol")
|
|
808
|
+
throw new TypeError(`${label} contains a non-JSON value`);
|
|
809
|
+
return nestedValue;
|
|
810
|
+
});
|
|
811
|
+
return JSON.parse(serialized);
|
|
812
|
+
} catch (error) {
|
|
813
|
+
throw new TypeError(`${label} must be JSON serializable`, { cause: error });
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
function cloneOptionalJournalValue(value, label) {
|
|
817
|
+
return value === void 0 ? void 0 : cloneJournalValue(value, label);
|
|
818
|
+
}
|
|
819
|
+
function setJournalEntry(target, stepId, value, label) {
|
|
820
|
+
const cloned = cloneOptionalJournalValue(value, label);
|
|
821
|
+
if (cloned === void 0)
|
|
822
|
+
delete target[stepId];
|
|
823
|
+
else
|
|
824
|
+
target[stepId] = cloned;
|
|
825
|
+
}
|
|
826
|
+
function isJournalMap(value) {
|
|
827
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
828
|
+
}
|
|
829
|
+
function hasUniqueKnownStepIds(value, stepIds) {
|
|
830
|
+
return Array.isArray(value) && new Set(value).size === value.length && value.every((stepId) => typeof stepId === "string" && stepIds.includes(stepId));
|
|
831
|
+
}
|
|
832
|
+
function hasValidJournalLifecycle(journal, stepIds) {
|
|
833
|
+
if (!hasUniqueKnownStepIds(journal.startedStepIds, stepIds) || !hasUniqueKnownStepIds(journal.completedStepIds, stepIds) || !isJournalMap(journal.results) || !isJournalMap(journal.compensationData))
|
|
834
|
+
return false;
|
|
835
|
+
const startedStepIds = journal.startedStepIds;
|
|
836
|
+
const started = new Set(startedStepIds);
|
|
837
|
+
const completedStepIds = journal.completedStepIds;
|
|
838
|
+
const completed = new Set(completedStepIds);
|
|
839
|
+
if (Object.keys(journal.compensationData).some((stepId) => !started.has(stepId)) || Object.keys(journal.results).some((stepId) => !completed.has(stepId)))
|
|
840
|
+
return false;
|
|
841
|
+
if (journal.status === "committed")
|
|
842
|
+
return stepIds.every((stepId) => completed.has(stepId));
|
|
843
|
+
return journal.status !== "compensated" || completed.size === 0 && started.size === 0;
|
|
844
|
+
}
|
|
845
|
+
function parseJournal(raw, transactionId, stepIds) {
|
|
846
|
+
let parsed;
|
|
847
|
+
try {
|
|
848
|
+
parsed = JSON.parse(raw);
|
|
849
|
+
} catch {
|
|
850
|
+
throw new TypeError(`Workspace transaction ${transactionId} journal is invalid JSON`);
|
|
851
|
+
}
|
|
852
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
853
|
+
throw new TypeError(`Workspace transaction ${transactionId} journal is invalid`);
|
|
854
|
+
const journal = parsed;
|
|
855
|
+
const identityMatches = journal.schemaVersion === 1 && journal.transactionId === transactionId;
|
|
856
|
+
const stepsMatch = Array.isArray(journal.stepIds) && journal.stepIds.length === stepIds.length && journal.stepIds.every((stepId, index) => stepId === stepIds[index]);
|
|
857
|
+
const lifecycleMatches = hasValidJournalLifecycle(journal, stepIds);
|
|
858
|
+
const metadataMatches = hasValidJournalMetadata(journal);
|
|
859
|
+
const statusMatches = [
|
|
860
|
+
"applying",
|
|
861
|
+
"compensating",
|
|
862
|
+
"compensated",
|
|
863
|
+
"committed"
|
|
864
|
+
].includes(String(journal.status));
|
|
865
|
+
if (!identityMatches || !stepsMatch || !lifecycleMatches || !metadataMatches || !statusMatches)
|
|
866
|
+
throw new TypeError(`Workspace transaction ${transactionId} journal does not match the supplied plan`);
|
|
867
|
+
return {
|
|
868
|
+
...journal,
|
|
869
|
+
results: createResultMap(journal.results),
|
|
870
|
+
compensationData: createResultMap(journal.compensationData)
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
async function prepareJournalForApply(options, transactionId, author, stepIds, existing) {
|
|
874
|
+
let journal = existing;
|
|
875
|
+
const recovered = journal !== void 0;
|
|
876
|
+
if (journal?.status === "compensating")
|
|
877
|
+
await compensateAppliedSteps(options, journal);
|
|
878
|
+
if (journal === void 0 || journal.status === "compensated") {
|
|
879
|
+
const timestamp = nowIso();
|
|
880
|
+
journal = {
|
|
881
|
+
schemaVersion: 1,
|
|
882
|
+
transactionId,
|
|
883
|
+
author,
|
|
884
|
+
status: "applying",
|
|
885
|
+
attempt: (journal?.attempt ?? 0) + 1,
|
|
886
|
+
createdAt: journal?.createdAt ?? timestamp,
|
|
887
|
+
updatedAt: timestamp,
|
|
888
|
+
stepIds,
|
|
889
|
+
startedStepIds: [],
|
|
890
|
+
completedStepIds: [],
|
|
891
|
+
results: createResultMap(),
|
|
892
|
+
compensationData: createResultMap()
|
|
893
|
+
};
|
|
894
|
+
await writeJournal(options.pmRoot, journal);
|
|
895
|
+
await emitTransition(options, journal, "prepared");
|
|
896
|
+
}
|
|
897
|
+
return { journal, recovered };
|
|
898
|
+
}
|
|
899
|
+
async function applyPreparedTransaction(options, journal, recovered) {
|
|
900
|
+
try {
|
|
901
|
+
await discoverAppliedSteps(journal, options.steps);
|
|
902
|
+
await writeJournal(options.pmRoot, journal);
|
|
903
|
+
const completed = new Set(journal.completedStepIds);
|
|
904
|
+
const started = new Set(journal.startedStepIds);
|
|
905
|
+
for (const step of options.steps) {
|
|
906
|
+
if (completed.has(step.id))
|
|
907
|
+
continue;
|
|
908
|
+
const inspection = await step.inspect();
|
|
909
|
+
let result = cloneOptionalJournalValue(inspection.result, `Step ${step.id} result`);
|
|
910
|
+
if (inspection.state !== "applied") {
|
|
911
|
+
const compensationData = await step.prepareCompensation?.();
|
|
912
|
+
setJournalEntry(journal.compensationData, step.id, compensationData, `Step ${step.id} compensation data`);
|
|
913
|
+
started.add(step.id);
|
|
914
|
+
journal.startedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => started.has(stepId));
|
|
915
|
+
await writeJournal(options.pmRoot, journal);
|
|
916
|
+
const appliedResult = await step.apply();
|
|
917
|
+
result = cloneOptionalJournalValue(appliedResult, `Step ${step.id} result`);
|
|
918
|
+
}
|
|
919
|
+
await emitTransition(options, journal, "step_applied", step.id);
|
|
920
|
+
completed.add(step.id);
|
|
921
|
+
journal.completedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => completed.has(stepId));
|
|
922
|
+
setJournalEntry(journal.results, step.id, result, `Step ${step.id} result`);
|
|
923
|
+
await writeJournal(options.pmRoot, journal);
|
|
924
|
+
await emitTransition(options, journal, "step_recorded", step.id);
|
|
925
|
+
}
|
|
926
|
+
await emitTransition(options, journal, "committing");
|
|
927
|
+
journal.status = "committed";
|
|
928
|
+
await writeJournal(options.pmRoot, journal);
|
|
929
|
+
await emitTransition(options, journal, "committed");
|
|
930
|
+
return {
|
|
931
|
+
transactionId: journal.transactionId,
|
|
932
|
+
status: "committed",
|
|
933
|
+
recovered,
|
|
934
|
+
results: createResultMap(journal.results)
|
|
935
|
+
};
|
|
936
|
+
} catch (error) {
|
|
937
|
+
if (error instanceof WorkspaceTransactionInterruptedError || journal.status === "committed")
|
|
938
|
+
throw error;
|
|
939
|
+
try {
|
|
940
|
+
await compensateAppliedSteps(options, journal);
|
|
941
|
+
} catch (compensationError) {
|
|
942
|
+
throw new AggregateError([error, compensationError], `Workspace transaction failed and compensation failed: ${String(compensationError)}`, { cause: compensationError });
|
|
943
|
+
}
|
|
944
|
+
throw error;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
async function loadJournal(pmRoot, transactionId, stepIds) {
|
|
948
|
+
try {
|
|
949
|
+
return parseJournal(await readFile(journalPath(pmRoot, transactionId), "utf8"), transactionId, stepIds);
|
|
950
|
+
} catch (error) {
|
|
951
|
+
if (error !== null && typeof error === "object" && "code" in error && error.code === "ENOENT")
|
|
952
|
+
return void 0;
|
|
953
|
+
throw error;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
async function emitTransition(options, journal, transition, stepId) {
|
|
957
|
+
await options.onTransition?.({
|
|
958
|
+
transactionId: journal.transactionId,
|
|
959
|
+
attempt: journal.attempt,
|
|
960
|
+
transition,
|
|
961
|
+
...stepId === void 0 ? {} : { stepId }
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
async function discoverAppliedSteps(journal, steps) {
|
|
965
|
+
const completed = /* @__PURE__ */ new Set();
|
|
966
|
+
const results = createResultMap();
|
|
967
|
+
for (const step of steps) {
|
|
968
|
+
const inspection = await step.inspect();
|
|
969
|
+
if (inspection.state === "applied") {
|
|
970
|
+
completed.add(step.id);
|
|
971
|
+
setJournalEntry(results, step.id, inspection.result, `Step ${step.id} result`);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
journal.results = results;
|
|
975
|
+
journal.completedStepIds = steps.map((step) => step.id).filter((stepId) => completed.has(stepId));
|
|
976
|
+
}
|
|
977
|
+
async function compensateAppliedSteps(options, journal) {
|
|
978
|
+
journal.status = "compensating";
|
|
979
|
+
await writeJournal(options.pmRoot, journal);
|
|
980
|
+
await emitTransition(options, journal, "compensating");
|
|
981
|
+
const completed = new Set(journal.completedStepIds);
|
|
982
|
+
const started = new Set(journal.startedStepIds);
|
|
983
|
+
for (const step of [...options.steps].reverse()) {
|
|
984
|
+
if (!started.has(step.id) && !completed.has(step.id))
|
|
985
|
+
continue;
|
|
986
|
+
let shouldCompensate;
|
|
987
|
+
try {
|
|
988
|
+
shouldCompensate = started.has(step.id) && (await step.inspect()).state === "applied";
|
|
989
|
+
} catch {
|
|
990
|
+
shouldCompensate = started.has(step.id);
|
|
991
|
+
}
|
|
992
|
+
if (shouldCompensate) {
|
|
993
|
+
await emitTransition(options, journal, "step_compensating", step.id);
|
|
994
|
+
await step.compensate(journal.compensationData[step.id]);
|
|
995
|
+
}
|
|
996
|
+
completed.delete(step.id);
|
|
997
|
+
started.delete(step.id);
|
|
998
|
+
journal.completedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => completed.has(stepId));
|
|
999
|
+
journal.startedStepIds = options.steps.map((candidate) => candidate.id).filter((stepId) => started.has(stepId));
|
|
1000
|
+
delete journal.results[step.id];
|
|
1001
|
+
delete journal.compensationData[step.id];
|
|
1002
|
+
await writeJournal(options.pmRoot, journal);
|
|
1003
|
+
await emitTransition(options, journal, "step_compensated", step.id);
|
|
1004
|
+
}
|
|
1005
|
+
journal.status = "compensated";
|
|
1006
|
+
await writeJournal(options.pmRoot, journal);
|
|
1007
|
+
await emitTransition(options, journal, "compensated");
|
|
1008
|
+
}
|
|
1009
|
+
async function commitWorkspaceTransaction(options) {
|
|
1010
|
+
const pmRoot = requiredText2(options.pmRoot, "Transaction pmRoot");
|
|
1011
|
+
const transactionId = requiredIdentifier(options.transactionId, "Transaction id");
|
|
1012
|
+
const author = requiredText2(options.author, "Transaction author");
|
|
1013
|
+
const lockTtlSeconds = positiveInteger(options.lockTtlSeconds, DEFAULT_LOCK_TTL_SECONDS, "Transaction lock TTL");
|
|
1014
|
+
const lockWaitMs = positiveInteger(options.lockWaitMs, DEFAULT_LOCK_WAIT_MS, "Transaction lock wait");
|
|
1015
|
+
const steps = [...options.steps];
|
|
1016
|
+
if (steps.length === 0)
|
|
1017
|
+
throw new TypeError("Workspace transaction requires at least one step");
|
|
1018
|
+
const stepIds = steps.map((step) => {
|
|
1019
|
+
const stepId = requiredIdentifier(step.id, "Transaction step id");
|
|
1020
|
+
if (stepId !== step.id)
|
|
1021
|
+
throw new TypeError("Transaction step id must not contain surrounding whitespace");
|
|
1022
|
+
return stepId;
|
|
1023
|
+
});
|
|
1024
|
+
if (new Set(stepIds).size !== stepIds.length)
|
|
1025
|
+
throw new TypeError("Workspace transaction step ids must be unique");
|
|
1026
|
+
const stableOptions = {
|
|
1027
|
+
...options,
|
|
1028
|
+
pmRoot,
|
|
1029
|
+
transactionId,
|
|
1030
|
+
author,
|
|
1031
|
+
steps,
|
|
1032
|
+
lockTtlSeconds,
|
|
1033
|
+
lockWaitMs
|
|
1034
|
+
};
|
|
1035
|
+
const release2 = await acquireLock(pmRoot, WORKSPACE_TRANSACTION_LOCK_ID, lockTtlSeconds, author, false, false, lockWaitMs);
|
|
1036
|
+
try {
|
|
1037
|
+
const existing = await loadJournal(pmRoot, transactionId, stepIds);
|
|
1038
|
+
const recovered = existing !== void 0;
|
|
1039
|
+
if (existing?.status === "committed")
|
|
1040
|
+
return {
|
|
1041
|
+
transactionId,
|
|
1042
|
+
status: "committed",
|
|
1043
|
+
recovered: true,
|
|
1044
|
+
results: createResultMap(existing.results)
|
|
1045
|
+
};
|
|
1046
|
+
const prepared = await prepareJournalForApply(stableOptions, transactionId, author, stepIds, existing);
|
|
1047
|
+
return await applyPreparedTransaction(stableOptions, prepared.journal, recovered || prepared.recovered);
|
|
1048
|
+
} finally {
|
|
1049
|
+
await release2();
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
// dist/sdk/extension-command-context.js
|
|
1054
|
+
!(function() {
|
|
1055
|
+
try {
|
|
1056
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1057
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "585e7742-2560-53a5-96a2-c1374b583b98");
|
|
1058
|
+
} catch (e2) {
|
|
1059
|
+
}
|
|
1060
|
+
})();
|
|
1061
|
+
function createExtensionCommandSdk(pmRoot, client) {
|
|
1062
|
+
return {
|
|
1063
|
+
client,
|
|
1064
|
+
getItemAt: (id, target) => getItemAt(id, target, { pmRoot }),
|
|
1065
|
+
openRelationshipEventStore: (options) => {
|
|
1066
|
+
const registry = createRelationshipKindRegistry();
|
|
1067
|
+
for (const definition of options.definitions) {
|
|
1068
|
+
registry.register(definition);
|
|
1069
|
+
}
|
|
1070
|
+
return RelationshipEventStore.open({
|
|
1071
|
+
pmRoot,
|
|
1072
|
+
nodes: options.nodes,
|
|
1073
|
+
registry,
|
|
1074
|
+
...options.relativePath === void 0 ? {} : { relativePath: options.relativePath }
|
|
1075
|
+
});
|
|
1076
|
+
},
|
|
1077
|
+
commitWorkspaceTransaction: (options) => commitWorkspaceTransaction({ ...options, pmRoot })
|
|
1078
|
+
};
|
|
1079
|
+
}
|
|
1080
|
+
|
|
316
1081
|
// dist/cli/commands/init-agent-guidance.js
|
|
317
1082
|
!(function() {
|
|
318
1083
|
try {
|
|
@@ -335,7 +1100,7 @@ function memoizeWorkspaceExtensionRegistrations(cacheKey, loadRegistrations) {
|
|
|
335
1100
|
!(function() {
|
|
336
1101
|
try {
|
|
337
1102
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
338
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
1103
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9c53751c-01db-59ad-a024-b761d4b08030");
|
|
339
1104
|
} catch (e2) {
|
|
340
1105
|
}
|
|
341
1106
|
})();
|
|
@@ -380,6 +1145,7 @@ function actionGlobalOptions(args) {
|
|
|
380
1145
|
return {
|
|
381
1146
|
json: true,
|
|
382
1147
|
quiet: true,
|
|
1148
|
+
author: readRuntimeString(args, "author"),
|
|
383
1149
|
path: readRuntimeString(args, "path"),
|
|
384
1150
|
noExtensions: args.noExtensions === true || args.no_extensions === true,
|
|
385
1151
|
noPager: true
|
|
@@ -1241,8 +2007,8 @@ async function commitImportedItem(params) {
|
|
|
1241
2007
|
}
|
|
1242
2008
|
|
|
1243
2009
|
// dist/cli/commands/guide.js
|
|
1244
|
-
import { readFile } from "node:fs/promises";
|
|
1245
|
-
import
|
|
2010
|
+
import { readFile as readFile2 } from "node:fs/promises";
|
|
2011
|
+
import path3 from "node:path";
|
|
1246
2012
|
|
|
1247
2013
|
// dist/cli/guide-topics.js
|
|
1248
2014
|
!(function() {
|
|
@@ -1692,7 +2458,7 @@ async function renderGuideDocs(topic, depth, packageRoot) {
|
|
|
1692
2458
|
const contentMode = includeContent ? depth === "deep" ? "full" : "excerpt" : "none";
|
|
1693
2459
|
const docs2 = [];
|
|
1694
2460
|
for (const doc of topic.docs) {
|
|
1695
|
-
const absolutePath =
|
|
2461
|
+
const absolutePath = path3.resolve(packageRoot, doc.path);
|
|
1696
2462
|
if (!includeContent) {
|
|
1697
2463
|
docs2.push({
|
|
1698
2464
|
path: doc.path,
|
|
@@ -1707,7 +2473,7 @@ async function renderGuideDocs(topic, depth, packageRoot) {
|
|
|
1707
2473
|
continue;
|
|
1708
2474
|
}
|
|
1709
2475
|
try {
|
|
1710
|
-
const rawContent = await
|
|
2476
|
+
const rawContent = await readFile2(absolutePath, "utf8");
|
|
1711
2477
|
if (depth === "deep") {
|
|
1712
2478
|
const normalized = normalizeLineEndings(rawContent).trimEnd();
|
|
1713
2479
|
docs2.push({
|
|
@@ -4400,7 +5166,7 @@ function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansion = fal
|
|
|
4400
5166
|
|
|
4401
5167
|
// dist/cli/commands/reindex.js
|
|
4402
5168
|
import fs from "node:fs/promises";
|
|
4403
|
-
import
|
|
5169
|
+
import path4 from "node:path";
|
|
4404
5170
|
!(function() {
|
|
4405
5171
|
try {
|
|
4406
5172
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
@@ -4469,7 +5235,7 @@ async function hydrateDocuments(pmRoot, candidates, schema2, warnings, itemIds)
|
|
|
4469
5235
|
body: parsed.body
|
|
4470
5236
|
});
|
|
4471
5237
|
} catch {
|
|
4472
|
-
warnings.push(`item_list_item_read_failed:${
|
|
5238
|
+
warnings.push(`item_list_item_read_failed:${path4.relative(pmRoot, candidate.item_path)}`);
|
|
4473
5239
|
hydrated.push({
|
|
4474
5240
|
metadata: candidate.metadata,
|
|
4475
5241
|
body: ""
|
|
@@ -4939,8 +5705,8 @@ async function runSemanticReindex(params) {
|
|
|
4939
5705
|
};
|
|
4940
5706
|
}
|
|
4941
5707
|
async function writeReindexArtifacts(params) {
|
|
4942
|
-
const manifestPath =
|
|
4943
|
-
const embeddingsPath =
|
|
5708
|
+
const manifestPath = path4.join(params.pmRoot, MANIFEST_PATH);
|
|
5709
|
+
const embeddingsPath = path4.join(params.pmRoot, EMBEDDINGS_PATH);
|
|
4944
5710
|
const keywordCorpusFields = resolveSearchCorpusFields(params.settings);
|
|
4945
5711
|
const embeddingsLines = params.documentsForKeywordArtifacts.map((document) => JSON.stringify(buildKeywordRecord(document, params.mode, keywordCorpusFields))).join("\n");
|
|
4946
5712
|
emitReindexProgress(params.progressEnabled, "writing keyword artifacts");
|
|
@@ -5004,8 +5770,8 @@ async function runReindex(options, global2) {
|
|
|
5004
5770
|
emitReindexProgress(progressEnabled, `loaded_items=${metadataDocuments.length}`);
|
|
5005
5771
|
const generatedAt = nowIso();
|
|
5006
5772
|
const manifest = buildReindexManifest(mode, generatedAt, metadataDocuments);
|
|
5007
|
-
const manifestPath =
|
|
5008
|
-
const embeddingsPath =
|
|
5773
|
+
const manifestPath = path4.join(pmRoot, MANIFEST_PATH);
|
|
5774
|
+
const embeddingsPath = path4.join(pmRoot, EMBEDDINGS_PATH);
|
|
5009
5775
|
let documentsForKeywordArtifacts = mode === "keyword" ? await hydrateDocuments(pmRoot, documentCandidates, settings.schema, reindexWarnings) : metadataDocuments;
|
|
5010
5776
|
const semanticWarnings = [];
|
|
5011
5777
|
let vectorizationLedgerEntries = {};
|
|
@@ -5095,14 +5861,15 @@ async function runReindex(options, global2) {
|
|
|
5095
5861
|
!(function() {
|
|
5096
5862
|
try {
|
|
5097
5863
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5098
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5864
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "24d809ae-5fa7-5634-bf07-98a909167346");
|
|
5099
5865
|
} catch (e2) {
|
|
5100
5866
|
}
|
|
5101
5867
|
})();
|
|
5868
|
+
var ACTIVE_EXTENSION_HOST_CONTEXT = /* @__PURE__ */ Symbol("pm.active-extension-host-context");
|
|
5102
5869
|
function splitFullClientMutationOptions(options) {
|
|
5103
5870
|
return { fullChangedFields: true, options };
|
|
5104
5871
|
}
|
|
5105
|
-
var PmClient = class {
|
|
5872
|
+
var PmClient = class _PmClient {
|
|
5106
5873
|
defaults;
|
|
5107
5874
|
/** Create a client with workspace, author, and extension-loading defaults. */
|
|
5108
5875
|
constructor(options = {}) {
|
|
@@ -5113,6 +5880,12 @@ var PmClient = class {
|
|
|
5113
5880
|
...options.noExtensions === void 0 ? {} : { noExtensions: options.noExtensions }
|
|
5114
5881
|
};
|
|
5115
5882
|
}
|
|
5883
|
+
/** Create a native-action client that reuses an extension host's active schema context. */
|
|
5884
|
+
static forActiveExtensionHost(options) {
|
|
5885
|
+
const client = new _PmClient({ ...options, noExtensions: true });
|
|
5886
|
+
client.defaults[ACTIVE_EXTENSION_HOST_CONTEXT] = true;
|
|
5887
|
+
return client;
|
|
5888
|
+
}
|
|
5116
5889
|
/** Run any native or extension-contributed action through the SDK dispatcher. */
|
|
5117
5890
|
run(action, args = {}) {
|
|
5118
5891
|
return runAction({ ...this.defaults, ...args, action });
|
|
@@ -5814,8 +6587,8 @@ function upgrade(target, options = {}, clientOptions = {}) {
|
|
|
5814
6587
|
}
|
|
5815
6588
|
function buildWorkspaceExtensionRegistrationsCacheKey(pmRoot, settings, cwd) {
|
|
5816
6589
|
return JSON.stringify([
|
|
5817
|
-
|
|
5818
|
-
|
|
6590
|
+
path5.resolve(pmRoot),
|
|
6591
|
+
path5.resolve(cwd ?? process.cwd()),
|
|
5819
6592
|
settings.extensions.enabled,
|
|
5820
6593
|
settings.extensions.disabled,
|
|
5821
6594
|
settings.extensions.policy
|
|
@@ -5935,7 +6708,11 @@ async function dispatchActiveExtensionAction(action, args, options, global2, act
|
|
|
5935
6708
|
args: readRuntimeStringArray(options.args ?? args.args),
|
|
5936
6709
|
options: extensionOptionsFromArgs(args, options),
|
|
5937
6710
|
global: global2,
|
|
5938
|
-
pm_root: active.pmRoot
|
|
6711
|
+
pm_root: active.pmRoot,
|
|
6712
|
+
sdk: createExtensionCommandSdk(active.pmRoot, PmClient.forActiveExtensionHost({
|
|
6713
|
+
pmRoot: active.pmRoot,
|
|
6714
|
+
author: typeof global2.author === "string" && global2.author.trim() ? global2.author.trim() : "pm-extension"
|
|
6715
|
+
}))
|
|
5939
6716
|
});
|
|
5940
6717
|
if (!handlerResult.handled) {
|
|
5941
6718
|
const suffix = handlerResult.warnings.length > 0 ? ` (${handlerResult.warnings.join(", ")})` : "";
|
|
@@ -6102,6 +6879,9 @@ async function runAction(args) {
|
|
|
6102
6879
|
const explicitCwd = readRuntimeString(resolved.args, "cwd");
|
|
6103
6880
|
const resolutionCwd = explicitCwd ?? process.cwd();
|
|
6104
6881
|
try {
|
|
6882
|
+
if (args[ACTIVE_EXTENSION_HOST_CONTEXT] === true) {
|
|
6883
|
+
return await dispatchAction(resolved.action, resolved.args, global2, null);
|
|
6884
|
+
}
|
|
6105
6885
|
return await withActiveExtensions(global2, explicitCwd, resolutionCwd, (activeExtensions) => dispatchAction(resolved.action, resolved.args, global2, activeExtensions));
|
|
6106
6886
|
} finally {
|
|
6107
6887
|
if (invalidateWorkspaceContractsCache) {
|
|
@@ -6562,6 +7342,11 @@ async function loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
|
|
|
6562
7342
|
}
|
|
6563
7343
|
|
|
6564
7344
|
export {
|
|
7345
|
+
RelationshipEventLog,
|
|
7346
|
+
RelationshipEventStore,
|
|
7347
|
+
WorkspaceTransactionInterruptedError,
|
|
7348
|
+
commitWorkspaceTransaction,
|
|
7349
|
+
createExtensionCommandSdk,
|
|
6565
7350
|
clearWorkspaceContractsCache,
|
|
6566
7351
|
readStringOption,
|
|
6567
7352
|
readBooleanOption,
|
|
@@ -6674,4 +7459,4 @@ export {
|
|
|
6674
7459
|
readRequiredString,
|
|
6675
7460
|
runAction
|
|
6676
7461
|
};
|
|
6677
|
-
//# sourceMappingURL=chunk-
|
|
7462
|
+
//# sourceMappingURL=chunk-3EZZTFL2.js.map
|