@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,178 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
acquireLock
|
|
3
|
-
} from "./chunk-646MQXFW.js";
|
|
4
|
-
|
|
5
|
-
// dist/sdk/context-usage.js
|
|
6
|
-
import { randomUUID } from "node:crypto";
|
|
7
|
-
import { appendFile, mkdir, readFile, rename, stat, writeFile } from "node:fs/promises";
|
|
8
|
-
import path from "node:path";
|
|
9
|
-
!(function() {
|
|
10
|
-
try {
|
|
11
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
12
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2f1439c6-25a5-526f-a491-d50ee348463f");
|
|
13
|
-
} catch (e2) {
|
|
14
|
-
}
|
|
15
|
-
})();
|
|
16
|
-
var DEFAULT_MAX_EVENTS = 2048;
|
|
17
|
-
var DEFAULT_RETENTION_DAYS = 30;
|
|
18
|
-
var DAY_MS = 864e5;
|
|
19
|
-
var DEFAULT_COMPACTION_BYTES = 262144;
|
|
20
|
-
var CONTEXT_USAGE_LOCK_ID = "context-usage-ledger";
|
|
21
|
-
function ledgerPath(pmRoot) {
|
|
22
|
-
return path.join(pmRoot, "runtime", "context-usage.jsonl");
|
|
23
|
-
}
|
|
24
|
-
function resolveNow(options) {
|
|
25
|
-
const iso = options.now ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
26
|
-
const ms = Date.parse(iso);
|
|
27
|
-
if (!Number.isFinite(ms))
|
|
28
|
-
throw new TypeError("Context usage now must be a valid timestamp");
|
|
29
|
-
return { iso: new Date(ms).toISOString(), ms };
|
|
30
|
-
}
|
|
31
|
-
async function readEvents(options) {
|
|
32
|
-
try {
|
|
33
|
-
const text = await readFile(ledgerPath(options.pmRoot), "utf8");
|
|
34
|
-
const events = text.split("\n").filter(Boolean).flatMap((line) => {
|
|
35
|
-
try {
|
|
36
|
-
return [JSON.parse(line)];
|
|
37
|
-
} catch {
|
|
38
|
-
return [];
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const maxEvents = options.maxEvents ?? DEFAULT_MAX_EVENTS;
|
|
42
|
-
const retentionDays = options.retentionDays ?? DEFAULT_RETENTION_DAYS;
|
|
43
|
-
const cutoff = resolveNow(options).ms - retentionDays * DAY_MS;
|
|
44
|
-
return events.filter((entry) => Date.parse(entry.at) >= cutoff).slice(-maxEvents);
|
|
45
|
-
} catch {
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
async function appendEvents(options, events) {
|
|
50
|
-
const maxEvents = options.maxEvents ?? DEFAULT_MAX_EVENTS;
|
|
51
|
-
const retentionDays = options.retentionDays ?? DEFAULT_RETENTION_DAYS;
|
|
52
|
-
if (!Number.isInteger(maxEvents) || maxEvents < 1 || !Number.isFinite(retentionDays) || retentionDays <= 0) {
|
|
53
|
-
throw new TypeError("Context usage retention requires positive maxEvents and retentionDays");
|
|
54
|
-
}
|
|
55
|
-
const target = ledgerPath(options.pmRoot);
|
|
56
|
-
const runtimeDirectory = path.dirname(target);
|
|
57
|
-
const releaseLock = await acquireLock(options.pmRoot, CONTEXT_USAGE_LOCK_ID, 30, `context-usage:${process.pid}`, false, false, 3e3);
|
|
58
|
-
try {
|
|
59
|
-
await mkdir(runtimeDirectory, { recursive: true });
|
|
60
|
-
await appendFile(target, events.map((event) => `${JSON.stringify(event)}
|
|
61
|
-
`).join(""), "utf8");
|
|
62
|
-
const customBounds = options.maxEvents !== void 0 || options.retentionDays !== void 0;
|
|
63
|
-
if (!customBounds && (await stat(target)).size <= DEFAULT_COMPACTION_BYTES)
|
|
64
|
-
return;
|
|
65
|
-
const retained = await readEvents(options);
|
|
66
|
-
const temporary = `${target}.${process.pid}.${randomUUID()}.tmp`;
|
|
67
|
-
await writeFile(temporary, `${retained.map((entry) => JSON.stringify(entry)).join("\n")}
|
|
68
|
-
`, "utf8");
|
|
69
|
-
await rename(temporary, target);
|
|
70
|
-
} finally {
|
|
71
|
-
await releaseLock();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async function appendEvent(options, event) {
|
|
75
|
-
await appendEvents(options, [event]);
|
|
76
|
-
}
|
|
77
|
-
async function recordContextUsageServing(options) {
|
|
78
|
-
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false)
|
|
79
|
-
return;
|
|
80
|
-
if (!options.author.trim() || options.rows.some((row) => !row.id.trim() || !Number.isInteger(row.rank) || row.rank < 1)) {
|
|
81
|
-
throw new TypeError("Context usage serving requires an author and valid ranked rows");
|
|
82
|
-
}
|
|
83
|
-
await appendEvent(options, {
|
|
84
|
-
kind: "serve",
|
|
85
|
-
at: resolveNow(options).iso,
|
|
86
|
-
author: options.author.trim(),
|
|
87
|
-
surface: options.surface,
|
|
88
|
-
profile: options.profile.trim() || "balanced",
|
|
89
|
-
rows: options.rows
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
async function recordContextUsageTouch(options) {
|
|
93
|
-
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false)
|
|
94
|
-
return;
|
|
95
|
-
if (!options.author.trim() || !options.itemId.trim() || !options.intent.trim()) {
|
|
96
|
-
throw new TypeError("Context usage touch requires author, itemId, and intent");
|
|
97
|
-
}
|
|
98
|
-
await appendEvent(options, {
|
|
99
|
-
kind: "touch",
|
|
100
|
-
at: resolveNow(options).iso,
|
|
101
|
-
author: options.author.trim(),
|
|
102
|
-
item_id: options.itemId.trim(),
|
|
103
|
-
intent: options.intent.trim()
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
async function recordContextUsageTouches(options) {
|
|
107
|
-
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false || options.itemIds.length === 0)
|
|
108
|
-
return;
|
|
109
|
-
const author = options.author.trim();
|
|
110
|
-
const intent = options.intent.trim();
|
|
111
|
-
if (!author || !intent) {
|
|
112
|
-
throw new TypeError("Context usage touch requires author and intent");
|
|
113
|
-
}
|
|
114
|
-
const itemIds = /* @__PURE__ */ new Set();
|
|
115
|
-
for (const itemId of options.itemIds) {
|
|
116
|
-
if (typeof itemId !== "string") {
|
|
117
|
-
throw new TypeError("Context usage touch requires string itemIds");
|
|
118
|
-
}
|
|
119
|
-
const trimmedId = itemId.trim();
|
|
120
|
-
if (!trimmedId)
|
|
121
|
-
throw new TypeError("Context usage touch requires non-empty itemId");
|
|
122
|
-
itemIds.add(trimmedId);
|
|
123
|
-
}
|
|
124
|
-
const at = resolveNow(options).iso;
|
|
125
|
-
const events = [...itemIds].map((itemId) => ({ kind: "touch", at, author, item_id: itemId, intent }));
|
|
126
|
-
await appendEvents(options, events);
|
|
127
|
-
}
|
|
128
|
-
function findTouchTimeInHorizon(touches, itemId, servedAt, horizonMs) {
|
|
129
|
-
return touches.find(({ entry, time }) => entry.item_id === itemId && time >= servedAt && time - servedAt <= horizonMs)?.time;
|
|
130
|
-
}
|
|
131
|
-
async function readContextUsageAffinity(options) {
|
|
132
|
-
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false)
|
|
133
|
-
return { affinity: {}, positive_judgments: 0, serving_events: 0 };
|
|
134
|
-
const events = await readEvents(options);
|
|
135
|
-
const now = resolveNow(options).ms;
|
|
136
|
-
const horizonMs = (options.horizonHours ?? 24) * 36e5;
|
|
137
|
-
if (!Number.isFinite(horizonMs) || horizonMs <= 0)
|
|
138
|
-
throw new TypeError("Context usage horizonHours must be positive");
|
|
139
|
-
const author = options.author.trim();
|
|
140
|
-
const touches = events.filter((event) => event.kind === "touch" && event.author === author).map((entry) => ({ entry, time: Date.parse(entry.at) }));
|
|
141
|
-
const scores = /* @__PURE__ */ new Map();
|
|
142
|
-
let servingEvents = 0;
|
|
143
|
-
let positiveJudgments = 0;
|
|
144
|
-
for (const event of events) {
|
|
145
|
-
if (event.kind !== "serve" || event.author !== author)
|
|
146
|
-
continue;
|
|
147
|
-
servingEvents += 1;
|
|
148
|
-
const servedAt = Date.parse(event.at);
|
|
149
|
-
for (const row of event.rows) {
|
|
150
|
-
if (!row.included)
|
|
151
|
-
continue;
|
|
152
|
-
const touchTime = findTouchTimeInHorizon(touches, row.id, servedAt, horizonMs);
|
|
153
|
-
if (touchTime === void 0)
|
|
154
|
-
continue;
|
|
155
|
-
positiveJudgments += 1;
|
|
156
|
-
const ageDays = Math.max(0, (now - touchTime) / DAY_MS);
|
|
157
|
-
scores.set(row.id, (scores.get(row.id) ?? 0) + Math.exp(-ageDays / 14));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
const maximum = Math.max(0, ...scores.values());
|
|
161
|
-
const affinity = Object.fromEntries([...scores.entries()].map(([id, score]) => [
|
|
162
|
-
id,
|
|
163
|
-
0.05 + 0.95 * (maximum > 0 ? score / maximum : 0)
|
|
164
|
-
]));
|
|
165
|
-
return {
|
|
166
|
-
affinity,
|
|
167
|
-
positive_judgments: positiveJudgments,
|
|
168
|
-
serving_events: servingEvents
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export {
|
|
173
|
-
recordContextUsageServing,
|
|
174
|
-
recordContextUsageTouch,
|
|
175
|
-
recordContextUsageTouches,
|
|
176
|
-
readContextUsageAffinity
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=chunk-BAP7G3N2.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../sdk/context-usage.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module sdk/context-usage\n *\n * Privacy-minimal, derived context-usage feedback primitives. The JSONL ledger\n * contains only item ids, timestamps, authors, ranks, profiles, and command\n * intents; it never enters item history and is safe to delete or rebuild.\n */\nimport { randomUUID } from \"node:crypto\";\nimport {\n appendFile,\n mkdir,\n readFile,\n rename,\n stat,\n writeFile,\n} from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { acquireLock } from \"../core/lock/lock.js\";\nimport type { ContextRelevanceSurface } from \"./context-relevance.js\";\n\n/** One propensity row disclosed when context or next serves a candidate. */\nexport interface ContextUsageServingRow {\n /** Served item identifier. */\n id: string;\n /** One-based scorer rank. */\n rank: number;\n /** Whether the packer included the item. */\n included: boolean;\n}\n\n/** Append-only serving or subsequent-touch event. */\nexport type ContextUsageEvent =\n | {\n kind: \"serve\";\n at: string;\n author: string;\n surface: ContextRelevanceSurface;\n profile: string;\n rows: ContextUsageServingRow[];\n }\n | {\n kind: \"touch\";\n at: string;\n author: string;\n item_id: string;\n intent: string;\n };\n\n/** Runtime controls for the bounded derived ledger. */\nexport interface ContextUsageLedgerOptions {\n /** Tracker root containing the runtime directory. */\n pmRoot: string;\n /** Disable all reads and writes with zero filesystem work. */\n enabled?: boolean;\n /** Maximum retained event rows. */\n maxEvents?: number;\n /** Retention horizon in days. */\n retentionDays?: number;\n /** Deterministic timestamp override. */\n now?: string;\n}\n\n/** Decayed per-item affinity derived for one author. */\nexport interface ContextUsageAffinity {\n /** Normalized affinity by item id. */\n affinity: Record<string, number>;\n /** Number of eligible served-then-touched judgments. */\n positive_judgments: number;\n /** Number of retained serving events inspected. */\n serving_events: number;\n}\n\nconst DEFAULT_MAX_EVENTS = 2_048;\nconst DEFAULT_RETENTION_DAYS = 30;\nconst DAY_MS = 86_400_000;\nconst DEFAULT_COMPACTION_BYTES = 262_144;\nconst CONTEXT_USAGE_LOCK_ID = \"context-usage-ledger\";\n\nfunction ledgerPath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", \"context-usage.jsonl\");\n}\n\nfunction resolveNow(options: ContextUsageLedgerOptions): {\n iso: string;\n ms: number;\n} {\n const iso = options.now ?? new Date().toISOString();\n const ms = Date.parse(iso);\n if (!Number.isFinite(ms))\n throw new TypeError(\"Context usage now must be a valid timestamp\");\n return { iso: new Date(ms).toISOString(), ms };\n}\n\nasync function readEvents(\n options: ContextUsageLedgerOptions,\n): Promise<ContextUsageEvent[]> {\n try {\n const text = await readFile(ledgerPath(options.pmRoot), \"utf8\");\n const events = text\n .split(\"\\n\")\n .filter(Boolean)\n .flatMap((line) => {\n try {\n return [JSON.parse(line) as ContextUsageEvent];\n } catch {\n return [];\n }\n });\n const maxEvents = options.maxEvents ?? DEFAULT_MAX_EVENTS;\n const retentionDays = options.retentionDays ?? DEFAULT_RETENTION_DAYS;\n const cutoff = resolveNow(options).ms - retentionDays * DAY_MS;\n return events\n .filter((entry) => Date.parse(entry.at) >= cutoff)\n .slice(-maxEvents);\n } catch {\n return [];\n }\n}\n\nasync function appendEvents(\n options: ContextUsageLedgerOptions,\n events: readonly ContextUsageEvent[],\n): Promise<void> {\n const maxEvents = options.maxEvents ?? DEFAULT_MAX_EVENTS;\n const retentionDays = options.retentionDays ?? DEFAULT_RETENTION_DAYS;\n if (\n !Number.isInteger(maxEvents) ||\n maxEvents < 1 ||\n !Number.isFinite(retentionDays) ||\n retentionDays <= 0\n ) {\n throw new TypeError(\n \"Context usage retention requires positive maxEvents and retentionDays\",\n );\n }\n const target = ledgerPath(options.pmRoot);\n const runtimeDirectory = path.dirname(target);\n const releaseLock = await acquireLock(\n options.pmRoot,\n CONTEXT_USAGE_LOCK_ID,\n 30,\n `context-usage:${process.pid}`,\n false,\n false,\n 3_000,\n );\n try {\n await mkdir(runtimeDirectory, { recursive: true });\n await appendFile(target, events.map((event) => `${JSON.stringify(event)}\\n`).join(\"\"), \"utf8\");\n const customBounds =\n options.maxEvents !== undefined || options.retentionDays !== undefined;\n if (!customBounds && (await stat(target)).size <= DEFAULT_COMPACTION_BYTES)\n return;\n const retained = await readEvents(options);\n const temporary = `${target}.${process.pid}.${randomUUID()}.tmp`;\n await writeFile(\n temporary,\n `${retained.map((entry) => JSON.stringify(entry)).join(\"\\n\")}\\n`,\n \"utf8\",\n );\n await rename(temporary, target);\n } finally {\n await releaseLock();\n }\n}\n\nasync function appendEvent(\n options: ContextUsageLedgerOptions,\n event: ContextUsageEvent,\n): Promise<void> {\n await appendEvents(options, [event]);\n}\n\n/** Records a propensity-complete context/next serving event. */\nexport async function recordContextUsageServing(\n options: ContextUsageLedgerOptions & {\n author: string;\n surface: ContextRelevanceSurface;\n profile: string;\n rows: ContextUsageServingRow[];\n },\n): Promise<void> {\n if (process.env.PM_CONTEXT_USAGE_DISABLED === \"1\" || options.enabled === false) return;\n if (\n !options.author.trim() ||\n options.rows.some(\n (row) => !row.id.trim() || !Number.isInteger(row.rank) || row.rank < 1,\n )\n ) {\n throw new TypeError(\n \"Context usage serving requires an author and valid ranked rows\",\n );\n }\n await appendEvent(options, {\n kind: \"serve\",\n at: resolveNow(options).iso,\n author: options.author.trim(),\n surface: options.surface,\n profile: options.profile.trim() || \"balanced\",\n rows: options.rows,\n });\n}\n\n/** Records one subsequent item read or mutation outcome. */\nexport async function recordContextUsageTouch(\n options: ContextUsageLedgerOptions & {\n author: string;\n itemId: string;\n intent: string;\n },\n): Promise<void> {\n if (process.env.PM_CONTEXT_USAGE_DISABLED === \"1\" || options.enabled === false) return;\n if (\n !options.author.trim() ||\n !options.itemId.trim() ||\n !options.intent.trim()\n ) {\n throw new TypeError(\n \"Context usage touch requires author, itemId, and intent\",\n );\n }\n await appendEvent(options, {\n kind: \"touch\",\n at: resolveNow(options).iso,\n author: options.author.trim(),\n item_id: options.itemId.trim(),\n intent: options.intent.trim(),\n });\n}\n\n/**\n * Records mutation outcomes as one append and one optional compaction pass.\n */\nexport async function recordContextUsageTouches(\n options: ContextUsageLedgerOptions & {\n /** Stable caller identity used to isolate affinity. */\n author: string;\n /** Item identifiers affected by the completed command. */\n itemIds: readonly string[];\n /** Command or workflow intent associated with the touches. */\n intent: string;\n },\n): Promise<void> {\n if (process.env.PM_CONTEXT_USAGE_DISABLED === \"1\" || options.enabled === false || options.itemIds.length === 0) return;\n const author = options.author.trim();\n const intent = options.intent.trim();\n if (!author || !intent) {\n throw new TypeError(\"Context usage touch requires author and intent\");\n }\n const itemIds = new Set<string>();\n for (const itemId of options.itemIds) {\n if (typeof itemId !== \"string\") {\n throw new TypeError(\"Context usage touch requires string itemIds\");\n }\n const trimmedId = itemId.trim();\n if (!trimmedId) throw new TypeError(\"Context usage touch requires non-empty itemId\");\n itemIds.add(trimmedId);\n }\n const at = resolveNow(options).iso;\n const events = [...itemIds].map(\n (itemId): ContextUsageEvent => ({ kind: \"touch\", at, author, item_id: itemId, intent }),\n );\n await appendEvents(options, events);\n}\n\nfunction findTouchTimeInHorizon(\n touches: readonly { entry: Extract<ContextUsageEvent, { kind: \"touch\" }>; time: number }[],\n itemId: string,\n servedAt: number,\n horizonMs: number,\n): number | undefined {\n return touches.find(({ entry, time }) =>\n entry.item_id === itemId && time >= servedAt && time - servedAt <= horizonMs\n )?.time;\n}\n\n/**\n * Derives decayed served-then-touched affinity. A small exploration floor keeps\n * ignored and unseen items eligible, preventing a popularity feedback lock-in.\n */\nexport async function readContextUsageAffinity(\n options: ContextUsageLedgerOptions & {\n author: string;\n horizonHours?: number;\n },\n): Promise<ContextUsageAffinity> {\n if (process.env.PM_CONTEXT_USAGE_DISABLED === \"1\" || options.enabled === false)\n return { affinity: {}, positive_judgments: 0, serving_events: 0 };\n const events = await readEvents(options);\n const now = resolveNow(options).ms;\n const horizonMs = (options.horizonHours ?? 24) * 3_600_000;\n if (!Number.isFinite(horizonMs) || horizonMs <= 0)\n throw new TypeError(\"Context usage horizonHours must be positive\");\n const author = options.author.trim();\n const touches = events\n .filter(\n (event): event is Extract<ContextUsageEvent, { kind: \"touch\" }> =>\n event.kind === \"touch\" && event.author === author,\n )\n .map((entry) => ({ entry, time: Date.parse(entry.at) }));\n const scores = new Map<string, number>();\n let servingEvents = 0;\n let positiveJudgments = 0;\n for (const event of events) {\n if (event.kind !== \"serve\" || event.author !== author) continue;\n servingEvents += 1;\n const servedAt = Date.parse(event.at);\n for (const row of event.rows) {\n if (!row.included) continue;\n const touchTime = findTouchTimeInHorizon(touches, row.id, servedAt, horizonMs);\n if (touchTime === undefined) continue;\n positiveJudgments += 1;\n const ageDays = Math.max(0, (now - touchTime) / DAY_MS);\n scores.set(row.id, (scores.get(row.id) ?? 0) + Math.exp(-ageDays / 14));\n }\n }\n const maximum = Math.max(0, ...scores.values());\n const affinity = Object.fromEntries(\n [...scores.entries()].map(([id, score]) => [\n id,\n 0.05 + 0.95 * (maximum > 0 ? score / maximum : 0),\n ]),\n );\n return {\n affinity,\n positive_judgments: positiveJudgments,\n serving_events: servingEvents,\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAOA,SAAS,kBAAkB;AAC3B,SACE,YACA,OACA,UACA,QACA,MACA,iB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