@unbrained/pm-cli 2026.7.13 → 2026.7.14
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 +28 -0
- package/dist/cli/commands/aggregate.d.ts +1 -1
- package/dist/cli/commands/aggregate.js +18 -6
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/context.d.ts +16 -1
- package/dist/cli/commands/context.js +98 -16
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -1
- package/dist/cli/commands/create.js +11 -7
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/deps.d.ts +6 -96
- package/dist/cli/commands/deps.js +4 -214
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/docs.d.ts +2 -44
- package/dist/cli/commands/docs.js +8 -13
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/files.d.ts +6 -134
- package/dist/cli/commands/files.js +4 -294
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/get.js +15 -2
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/list.js +5 -6
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.d.ts +3 -1
- package/dist/cli/commands/next.js +77 -20
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/update-many.js +6 -3
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.js +14 -7
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +1 -1
- package/dist/cli/commands/validate.js +32 -35
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/main.d.ts +2 -14
- package/dist/cli/main.js +27 -8
- package/dist/cli/main.js.map +1 -1
- package/dist/cli-bundle/chunks/append-DYQWQK2J.js +11 -0
- package/dist/cli-bundle/chunks/{append-2FS6MVG7.js → append-PVZJDM6J.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-J2WAWP4U.js → chunk-2FNWQXZ2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YFGYDZRP.js → chunk-2GA3NK35.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-XFEIASAC.js → chunk-2QIQGYPW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3WCGYH5Q.js → chunk-3CMRNVTO.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-3HKUXVKV.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-VDAZPPRU.js → chunk-3I3LRT2G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3P3RFJIQ.js → chunk-3TL7WOEF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4SHJ5JS3.js → chunk-44LNIULG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QFOAWBOB.js → chunk-4DY4KPQI.js} +11 -10
- package/dist/cli-bundle/chunks/{chunk-QFOAWBOB.js.map → chunk-4DY4KPQI.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BVCF4ULV.js → chunk-4RXTMU57.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-XMI2TRY5.js → chunk-4WREH7RT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JYUGUXFW.js → chunk-5CT5BW6E.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NA5SBIB4.js → chunk-5URI7TPJ.js} +44 -44
- package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QGH6WL6L.js → chunk-655STMGA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DGKBWCMA.js → chunk-6IIVBC56.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SRQLQUO6.js → chunk-6MHSBDGD.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-SRQLQUO6.js.map → chunk-6MHSBDGD.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D4GPNYYP.js → chunk-6OTZMORS.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JVRVXO6M.js → chunk-6PKA3SJQ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-2PR4ZTRO.js → chunk-6TTOHMTB.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-2PR4ZTRO.js.map → chunk-6TTOHMTB.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-6X5MZ5R2.js +9 -0
- package/dist/cli-bundle/chunks/chunk-76UBY2EE.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-ZS2KPCJN.js → chunk-7QDSYUMF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-Z7TFPIJ6.js → chunk-7TQMR6LK.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-AHA4POA6.js → chunk-ABRCOSDC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XY3CC3EM.js → chunk-AFWZRL7M.js} +59 -53
- package/dist/cli-bundle/chunks/chunk-AFWZRL7M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KQJVTQVK.js → chunk-ANSJHDOZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OMT4NO7T.js → chunk-B5DZYTT3.js} +113 -24
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-B7SWOIP6.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-D2LXG7WX.js → chunk-BN62TO2S.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-BN62TO2S.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZTSV7P2T.js → chunk-BPD26E3P.js} +357 -42
- package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RKGFUC4O.js → chunk-CDJYP7OQ.js} +36 -14
- package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-VLFLRFJP.js → chunk-CIOZ376P.js} +20 -13
- package/dist/cli-bundle/chunks/chunk-CIOZ376P.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HXTCZSAI.js → chunk-DBZVUJTK.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2QNOWOIB.js → chunk-DO5RGJXT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-MKONZ4UO.js → chunk-DRNJPEPQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-XDT2PSXA.js → chunk-DVOLZJ3C.js} +12 -11
- package/dist/cli-bundle/chunks/{chunk-XDT2PSXA.js.map → chunk-DVOLZJ3C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-H36FXA7B.js → chunk-DYEX6NFH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-G3IB5GTD.js → chunk-E2WC6S4P.js} +15 -11
- package/dist/cli-bundle/chunks/chunk-E2WC6S4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GAJ7U7B4.js → chunk-ERL2YFJ2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FPEYOFEF.js → chunk-F7PSHRNO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-UH7OLT6F.js → chunk-FDSBDNYE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DGJF32JF.js → chunk-FIGXOCEQ.js} +66 -21
- package/dist/cli-bundle/chunks/chunk-FIGXOCEQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RQAY7C5T.js → chunk-FJZDA6MS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-B4TVNGRX.js → chunk-FO7GMJKG.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-FRQ63VPB.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-UTYNQ2WH.js → chunk-FS6UM5WH.js} +48 -27
- package/dist/cli-bundle/chunks/chunk-FS6UM5WH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-U252II47.js → chunk-FTQLW4JD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TNGLCRKS.js → chunk-GSEADLRH.js} +1821 -1809
- package/dist/cli-bundle/chunks/chunk-GSEADLRH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TGG7YGMC.js → chunk-GXXC7QSK.js} +53 -47
- package/dist/cli-bundle/chunks/chunk-GXXC7QSK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGD4VZXH.js → chunk-H2QBAKLQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CJVQ4XIG.js → chunk-HAMLIWAF.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-56DX6QYG.js → chunk-HL7V2PHX.js} +19 -13
- package/dist/cli-bundle/chunks/chunk-HL7V2PHX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7QOIQTPB.js → chunk-HLHSQ5CA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-AHC7J6XD.js → chunk-IA3YFTXT.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-5ZCVF4WF.js → chunk-IAPHYPRL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OCSQWIOW.js → chunk-IFZA4VB5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6O2HJENY.js → chunk-IGED7NH2.js} +61 -48
- package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RPCCQDG2.js → chunk-ILLUE5DI.js} +36 -14
- package/dist/cli-bundle/chunks/chunk-ILLUE5DI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4WMFM77X.js → chunk-J4NZOP3I.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-57JVERX3.js → chunk-JAF4TUQ7.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-JAF4TUQ7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MTNKSSSO.js → chunk-JL7WZ4O2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AZ52LTCY.js → chunk-K7WNZ7KD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2OLSXXIV.js → chunk-KADLSPIU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RQKORMM4.js → chunk-KB726FMH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WKSFBBZT.js → chunk-L24HCJFC.js} +114 -25
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LDO24J5I.js → chunk-LWTIRS3Y.js} +365 -43
- package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TZTQ4TVV.js → chunk-M6ASXYCU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WDDOAU7Z.js → chunk-M7EWN4TF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-327DSGW2.js → chunk-MD6ULIPJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OKDBHOON.js → chunk-MKL4CP2I.js} +61 -48
- package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M52DG2QJ.js → chunk-MQZ3PLCF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GQ2CQNGI.js → chunk-N3CMP4NI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J7SBFUZC.js → chunk-NAQYVWSQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-U2GMYP3L.js → chunk-NKW36AMT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5WEYOVZ7.js → chunk-OBDLEQG5.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-OBDLEQG5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VL4LYTJN.js → chunk-OI4S4KCI.js} +18 -12
- package/dist/cli-bundle/chunks/chunk-OI4S4KCI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FCVVMAEX.js → chunk-P6MYFH6K.js} +60 -22
- package/dist/cli-bundle/chunks/chunk-P6MYFH6K.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FTQQAPRX.js → chunk-PHKP3AGR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-WVUXNIYO.js → chunk-Q37E63AM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JVXV7ANV.js → chunk-Q7E6OYZK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WVUYATII.js → chunk-QABYZYLU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QRRUGIJN.js → chunk-QASRVKUQ.js} +45 -45
- package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-L4262MFB.js → chunk-QK2ZN6UL.js} +14 -5
- package/dist/cli-bundle/chunks/{chunk-L4262MFB.js.map → chunk-QK2ZN6UL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7TQPV7HR.js → chunk-QSPARJWF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GTKILM6F.js → chunk-QZ7LT3XE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-L3VKY6R6.js → chunk-RA5AIAMP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BJS27ALI.js → chunk-RGXD5JJR.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-TSEPW2P6.js → chunk-RMF3IOYQ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-QXYKH56X.js → chunk-T4BRCB6Z.js} +1894 -1875
- package/dist/cli-bundle/chunks/chunk-T4BRCB6Z.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TGGTXC52.js → chunk-TH7U4KLY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LP4UATP6.js → chunk-TWLDBKQU.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OTZ3C2NE.js → chunk-TZ2PSLLT.js} +49 -28
- package/dist/cli-bundle/chunks/chunk-TZ2PSLLT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UK222BHQ.js → chunk-TZRTLMWM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6E6S2X6S.js → chunk-UB2QYSTO.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-S6CXUSYC.js → chunk-UGTVWL3E.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-BNS6QHTZ.js → chunk-UJ4HJYWL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BYVOEJPQ.js → chunk-UKUIIBDW.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SGDBVR7X.js → chunk-UVBA6F5A.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DZRZMBBF.js → chunk-VJTAEIPC.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-74PWVJON.js → chunk-W6HZ55JO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HR2MQAO5.js → chunk-WD6MSYMP.js} +13 -4
- package/dist/cli-bundle/chunks/{chunk-HR2MQAO5.js.map → chunk-WD6MSYMP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P7IFURWH.js → chunk-WPAWZW7S.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-36LEOWSX.js → chunk-WQUEHPZB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FCKJF7G2.js → chunk-WRKB56FC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KR5EHAN4.js → chunk-X3GYR4P2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J567OZJY.js → chunk-X6BVXQ52.js} +16 -12
- package/dist/cli-bundle/chunks/chunk-X6BVXQ52.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-Y72FV7RM.js +178 -0
- package/dist/cli-bundle/chunks/chunk-Y72FV7RM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OWW2KXOV.js → chunk-YQYG2V23.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G2SCT7BC.js → chunk-YVKE5ZDM.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QHIN4UTF.js → chunk-ZAYYDNB3.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZHBI2AP7.js +9 -0
- package/dist/cli-bundle/chunks/chunk-ZNP64HOW.js +175 -0
- package/dist/cli-bundle/chunks/chunk-ZNP64HOW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GNVBUNJQ.js → chunk-ZTRBSABY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PY32KGQU.js → chunk-ZUKSZVBW.js} +5 -5
- package/dist/cli-bundle/chunks/{close-CU56F47E.js → close-LZECOMHO.js} +5 -5
- package/dist/cli-bundle/chunks/close-RI4JQQHU.js +12 -0
- package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +21 -0
- package/dist/cli-bundle/chunks/{close-many-ZQ2WP67J.js → close-many-ZHI6A5TN.js} +12 -12
- package/dist/cli-bundle/chunks/comments-35M273DN.js +13 -0
- package/dist/cli-bundle/chunks/{comments-UDUMKXL6.js → comments-AJWRTFZ5.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-VFHECFBV.js → copy-GMXYKBXT.js} +4 -4
- package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +9 -0
- package/dist/cli-bundle/chunks/create-F53OBTOU.js +27 -0
- package/dist/cli-bundle/chunks/{create-CE2X3SGF.js → create-HU4Q7RJX.js} +11 -9
- package/dist/cli-bundle/chunks/{delete-2JXQCHHT.js → delete-GSDZLTRC.js} +4 -4
- package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +10 -0
- package/dist/cli-bundle/chunks/deps-U57I7EAK.js +16 -0
- package/dist/cli-bundle/chunks/{deps-FPXNLO6C.js → deps-WWB7P2GT.js} +7 -4
- package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +14 -0
- package/dist/cli-bundle/chunks/{docs-AMAR4OHU.js → docs-MQIY2ZQS.js} +7 -7
- package/dist/cli-bundle/chunks/files-TBZD7V6H.js +18 -0
- package/dist/cli-bundle/chunks/{files-JFHN7DYM.js → files-TTY6N2AV.js} +7 -7
- package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +10 -0
- package/dist/cli-bundle/chunks/{focus-QFN2RRZ7.js → focus-XT6YVFFX.js} +5 -5
- package/dist/cli-bundle/chunks/{history-compact-G34XMABV.js → history-compact-KKVUWB4V.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-SAHT5D46.js → history-compact-M7GHYVFN.js} +8 -8
- package/dist/cli-bundle/chunks/{history-redact-IFJDNKLZ.js → history-redact-3DVZOILD.js} +6 -6
- package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-NXLQTCVN.js → history-repair-ITDUMK4N.js} +8 -8
- package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +18 -0
- package/dist/cli-bundle/chunks/{learnings-5CZKAMBS.js → learnings-FGO3NSFW.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +13 -0
- package/dist/cli-bundle/chunks/notes-BSD53H2W.js +13 -0
- package/dist/cli-bundle/chunks/{notes-POMK37UI.js → notes-NQ6RXVW6.js} +7 -7
- package/dist/cli-bundle/chunks/{plan-YBNYNT3A.js → plan-2NNEO46V.js} +10 -10
- package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +24 -0
- package/dist/cli-bundle/chunks/{profile-JNKSU6EQ.js → profile-AAQUU6T3.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-A2WPVG6I.js → profile-U725ATWZ.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-UG4ZA5AU.js → register-list-query-BUWCYHBT.js} +14 -13
- package/dist/cli-bundle/chunks/{register-list-query-UG4ZA5AU.js.map → register-list-query-BUWCYHBT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-list-query-KJULL4W3.js → register-list-query-KTZ6AGE7.js} +16 -15
- package/dist/cli-bundle/chunks/{register-list-query-KJULL4W3.js.map → register-list-query-KTZ6AGE7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-3OXYXBKH.js → register-mutation-4FMGJJF7.js} +29 -29
- package/dist/cli-bundle/chunks/{register-mutation-WK265BM7.js → register-mutation-UELYYOR7.js} +29 -29
- package/dist/cli-bundle/chunks/{register-operations-C5SQH3FJ.js → register-operations-ISUX6LY5.js} +33 -29
- package/dist/cli-bundle/chunks/{register-operations-C5SQH3FJ.js.map → register-operations-ISUX6LY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-FH3PBHYN.js → register-operations-JVW24J2Y.js} +35 -31
- package/dist/cli-bundle/chunks/{register-operations-FH3PBHYN.js.map → register-operations-JVW24J2Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-CCK7CJVR.js → register-setup-5XNGKJ22.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-CPZBGSOJ.js → register-setup-ZTNY6S7R.js} +15 -15
- package/dist/cli-bundle/chunks/restore-66GLMHIX.js +14 -0
- package/dist/cli-bundle/chunks/{restore-IVS5XGYR.js → restore-B3BAB6X2.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-P2MF23JO.js → schema-LZNUYHDB.js} +6 -6
- package/dist/cli-bundle/chunks/schema-LZNUYHDB.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-R3U2REY4.js → schema-U7IM2DXV.js} +6 -6
- package/dist/cli-bundle/chunks/schema-U7IM2DXV.js.map +1 -0
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +21 -0
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-YBIQESMH.js → update-Q3UCILNR.js} +12 -12
- package/dist/cli-bundle/chunks/update-Q3UCILNR.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-F3CIV5SQ.js → update-many-75K57FS3.js} +19 -19
- package/dist/cli-bundle/chunks/update-many-75K57FS3.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-U42YA445.js +30 -0
- package/dist/cli-bundle/chunks/update-many-U42YA445.js.map +7 -0
- package/dist/cli-bundle/main.js +39 -16
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +56 -53
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +115 -55
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/extensions/command-hook-context.d.ts +40 -0
- package/dist/core/extensions/command-hook-context.js +14 -0
- package/dist/core/extensions/command-hook-context.js.map +1 -0
- package/dist/core/extensions/index.d.ts +1 -0
- package/dist/core/extensions/index.js +4 -3
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/item/parse.d.ts +2 -0
- package/dist/core/item/parse.js +11 -2
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/store/paths.d.ts +2 -0
- package/dist/core/store/paths.js +10 -2
- package/dist/core/store/paths.js.map +1 -1
- package/dist/mcp/tool-definitions.js +12 -2
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/context-packing.d.ts +114 -0
- package/dist/sdk/context-packing.js +219 -0
- package/dist/sdk/context-packing.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +1 -1
- package/dist/sdk/context-relevance.js +4 -2
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/context-usage.d.ts +79 -0
- package/dist/sdk/context-usage.js +193 -0
- package/dist/sdk/context-usage.js.map +1 -0
- package/dist/sdk/dependencies.d.ts +145 -0
- package/dist/sdk/dependencies.js +327 -0
- package/dist/sdk/dependencies.js.map +1 -0
- package/dist/sdk/docs.d.ts +48 -0
- package/dist/sdk/docs.js +15 -0
- package/dist/sdk/docs.js.map +1 -0
- package/dist/sdk/files.d.ts +135 -0
- package/dist/sdk/files.js +320 -0
- package/dist/sdk/files.js.map +1 -0
- package/dist/sdk/index.d.ts +6 -0
- package/dist/sdk/index.js +8 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/{cli/commands → sdk}/linked-artifacts.d.ts +11 -5
- package/dist/{cli/commands → sdk}/linked-artifacts.js +49 -25
- package/dist/sdk/linked-artifacts.js.map +1 -0
- package/dist/sdk/runtime.d.ts +4 -4
- package/dist/sdk/runtime.js +7 -4
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/workspace.js +3 -2
- package/dist/sdk/workspace.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/CONFIGURATION.md +1 -0
- package/docs/PR_REVIEW_LOOP.md +21 -11
- package/docs/SDK.md +94 -0
- 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/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli/commands/linked-artifacts.js.map +0 -1
- package/dist/cli-bundle/chunks/append-CTKFDEAX.js +0 -11
- package/dist/cli-bundle/chunks/chunk-56DX6QYG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57JVERX3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5WEYOVZ7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6O2HJENY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CCAGZCZK.js +0 -17
- package/dist/cli-bundle/chunks/chunk-CCAGZCZK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-D2LXG7WX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DGJF32JF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FCVVMAEX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FUOK7JZ6.js +0 -14
- package/dist/cli-bundle/chunks/chunk-FUOK7JZ6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G3IB5GTD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J567OZJY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LDO24J5I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NA5SBIB4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OKDBHOON.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OMT4NO7T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OTZ3C2NE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QRRUGIJN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QXYKH56X.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RKGFUC4O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RPCCQDG2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TGG7YGMC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TNGLCRKS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UTYNQ2WH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VL4LYTJN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VLFLRFJP.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WKSFBBZT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XY3CC3EM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZTSV7P2T.js.map +0 -1
- package/dist/cli-bundle/chunks/close-BWM7FTF4.js +0 -12
- package/dist/cli-bundle/chunks/close-many-AUHTVFUQ.js +0 -21
- package/dist/cli-bundle/chunks/comments-7D5VPBZI.js +0 -13
- package/dist/cli-bundle/chunks/copy-QJ6ZVWZV.js +0 -9
- package/dist/cli-bundle/chunks/create-FGMTTYOI.js +0 -25
- package/dist/cli-bundle/chunks/delete-L2GMMMPR.js +0 -10
- package/dist/cli-bundle/chunks/deps-KTFI4RWD.js +0 -13
- package/dist/cli-bundle/chunks/docs-VNURA275.js +0 -14
- package/dist/cli-bundle/chunks/files-UNFPZLTG.js +0 -18
- package/dist/cli-bundle/chunks/focus-MI2UHBP4.js +0 -10
- package/dist/cli-bundle/chunks/history-redact-VAHGBUHI.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-DDYQXR43.js +0 -18
- package/dist/cli-bundle/chunks/learnings-VWJEKHEO.js +0 -13
- package/dist/cli-bundle/chunks/notes-NGVJJJQO.js +0 -13
- package/dist/cli-bundle/chunks/plan-U6SQJUFI.js +0 -24
- package/dist/cli-bundle/chunks/restore-AX6ZMGHZ.js +0 -14
- package/dist/cli-bundle/chunks/update-XYHF3YZF.js +0 -21
- package/dist/cli-bundle/chunks/update-many-5HKVHFUL.js +0 -30
- /package/dist/cli-bundle/chunks/{append-CTKFDEAX.js.map → append-DYQWQK2J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-2FS6MVG7.js.map → append-PVZJDM6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J2WAWP4U.js.map → chunk-2FNWQXZ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YFGYDZRP.js.map → chunk-2GA3NK35.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XFEIASAC.js.map → chunk-2QIQGYPW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3WCGYH5Q.js.map → chunk-3CMRNVTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-BWM7FTF4.js.map → chunk-3HKUXVKV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VDAZPPRU.js.map → chunk-3I3LRT2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3P3RFJIQ.js.map → chunk-3TL7WOEF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4SHJ5JS3.js.map → chunk-44LNIULG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BVCF4ULV.js.map → chunk-4RXTMU57.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XMI2TRY5.js.map → chunk-4WREH7RT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JYUGUXFW.js.map → chunk-5CT5BW6E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QGH6WL6L.js.map → chunk-655STMGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DGKBWCMA.js.map → chunk-6IIVBC56.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D4GPNYYP.js.map → chunk-6OTZMORS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVRVXO6M.js.map → chunk-6PKA3SJQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-AUHTVFUQ.js.map → chunk-6X5MZ5R2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-CU56F47E.js.map → chunk-76UBY2EE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZS2KPCJN.js.map → chunk-7QDSYUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z7TFPIJ6.js.map → chunk-7TQMR6LK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AHA4POA6.js.map → chunk-ABRCOSDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KQJVTQVK.js.map → chunk-ANSJHDOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZQ2WP67J.js.map → chunk-B7SWOIP6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HXTCZSAI.js.map → chunk-DBZVUJTK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2QNOWOIB.js.map → chunk-DO5RGJXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MKONZ4UO.js.map → chunk-DRNJPEPQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H36FXA7B.js.map → chunk-DYEX6NFH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GAJ7U7B4.js.map → chunk-ERL2YFJ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FPEYOFEF.js.map → chunk-F7PSHRNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UH7OLT6F.js.map → chunk-FDSBDNYE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RQAY7C5T.js.map → chunk-FJZDA6MS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B4TVNGRX.js.map → chunk-FO7GMJKG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-UDUMKXL6.js.map → chunk-FRQ63VPB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U252II47.js.map → chunk-FTQLW4JD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGD4VZXH.js.map → chunk-H2QBAKLQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CJVQ4XIG.js.map → chunk-HAMLIWAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7QOIQTPB.js.map → chunk-HLHSQ5CA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AHC7J6XD.js.map → chunk-IA3YFTXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5ZCVF4WF.js.map → chunk-IAPHYPRL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OCSQWIOW.js.map → chunk-IFZA4VB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4WMFM77X.js.map → chunk-J4NZOP3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MTNKSSSO.js.map → chunk-JL7WZ4O2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZ52LTCY.js.map → chunk-K7WNZ7KD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2OLSXXIV.js.map → chunk-KADLSPIU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RQKORMM4.js.map → chunk-KB726FMH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZTQ4TVV.js.map → chunk-M6ASXYCU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WDDOAU7Z.js.map → chunk-M7EWN4TF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-327DSGW2.js.map → chunk-MD6ULIPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M52DG2QJ.js.map → chunk-MQZ3PLCF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GQ2CQNGI.js.map → chunk-N3CMP4NI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J7SBFUZC.js.map → chunk-NAQYVWSQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U2GMYP3L.js.map → chunk-NKW36AMT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FTQQAPRX.js.map → chunk-PHKP3AGR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WVUXNIYO.js.map → chunk-Q37E63AM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVXV7ANV.js.map → chunk-Q7E6OYZK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WVUYATII.js.map → chunk-QABYZYLU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7TQPV7HR.js.map → chunk-QSPARJWF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GTKILM6F.js.map → chunk-QZ7LT3XE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L3VKY6R6.js.map → chunk-RA5AIAMP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BJS27ALI.js.map → chunk-RGXD5JJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TSEPW2P6.js.map → chunk-RMF3IOYQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TGGTXC52.js.map → chunk-TH7U4KLY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LP4UATP6.js.map → chunk-TWLDBKQU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UK222BHQ.js.map → chunk-TZRTLMWM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6E6S2X6S.js.map → chunk-UB2QYSTO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-S6CXUSYC.js.map → chunk-UGTVWL3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BNS6QHTZ.js.map → chunk-UJ4HJYWL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BYVOEJPQ.js.map → chunk-UKUIIBDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SGDBVR7X.js.map → chunk-UVBA6F5A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DZRZMBBF.js.map → chunk-VJTAEIPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-74PWVJON.js.map → chunk-W6HZ55JO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P7IFURWH.js.map → chunk-WPAWZW7S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-36LEOWSX.js.map → chunk-WQUEHPZB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FCKJF7G2.js.map → chunk-WRKB56FC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KR5EHAN4.js.map → chunk-X3GYR4P2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OWW2KXOV.js.map → chunk-YQYG2V23.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G2SCT7BC.js.map → chunk-YVKE5ZDM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QHIN4UTF.js.map → chunk-ZAYYDNB3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-7D5VPBZI.js.map → chunk-ZHBI2AP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GNVBUNJQ.js.map → chunk-ZTRBSABY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PY32KGQU.js.map → chunk-ZUKSZVBW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-VFHECFBV.js.map → close-LZECOMHO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-QJ6ZVWZV.js.map → close-RI4JQQHU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-FGMTTYOI.js.map → close-many-LY2XJ52M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-CE2X3SGF.js.map → close-many-ZHI6A5TN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-L2GMMMPR.js.map → comments-35M273DN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-2JXQCHHT.js.map → comments-AJWRTFZ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-FPXNLO6C.js.map → copy-GMXYKBXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-KTFI4RWD.js.map → copy-NPYM7M7U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-VNURA275.js.map → create-F53OBTOU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-AMAR4OHU.js.map → create-HU4Q7RJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-JFHN7DYM.js.map → delete-GSDZLTRC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-UNFPZLTG.js.map → delete-ODRWJWAM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-MI2UHBP4.js.map → deps-U57I7EAK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-QFN2RRZ7.js.map → deps-WWB7P2GT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-SAHT5D46.js.map → docs-G7N4E2JO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-G34XMABV.js.map → docs-MQIY2ZQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-VAHGBUHI.js.map → files-TBZD7V6H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IFJDNKLZ.js.map → files-TTY6N2AV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-DDYQXR43.js.map → focus-U5TRVCRS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-NXLQTCVN.js.map → focus-XT6YVFFX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-5CZKAMBS.js.map → history-compact-KKVUWB4V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-VWJEKHEO.js.map → history-compact-M7GHYVFN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-POMK37UI.js.map → history-redact-3DVZOILD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-NGVJJJQO.js.map → history-redact-JIHZLHDP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-YBNYNT3A.js.map → history-repair-ITDUMK4N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-U6SQJUFI.js.map → history-repair-NAFCHLH7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-JNKSU6EQ.js.map → learnings-FGO3NSFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-A2WPVG6I.js.map → learnings-SONGPSHI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-AX6ZMGHZ.js.map → notes-BSD53H2W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-IVS5XGYR.js.map → notes-NQ6RXVW6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-R3U2REY4.js.map → plan-2NNEO46V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-P2MF23JO.js.map → plan-AWLYGBNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-YBIQESMH.js.map → profile-AAQUU6T3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-XYHF3YZF.js.map → profile-U725ATWZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-3OXYXBKH.js.map → register-mutation-4FMGJJF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-mutation-WK265BM7.js.map → register-mutation-UELYYOR7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-CCK7CJVR.js.map → register-setup-5XNGKJ22.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-CPZBGSOJ.js.map → register-setup-ZTNY6S7R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-5HKVHFUL.js.map → restore-66GLMHIX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-F3CIV5SQ.js.map → restore-B3BAB6X2.js.map} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ContextRelevanceSurface } from "./context-relevance.js";
|
|
2
|
+
/** One propensity row disclosed when context or next serves a candidate. */
|
|
3
|
+
export interface ContextUsageServingRow {
|
|
4
|
+
/** Served item identifier. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** One-based scorer rank. */
|
|
7
|
+
rank: number;
|
|
8
|
+
/** Whether the packer included the item. */
|
|
9
|
+
included: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Append-only serving or subsequent-touch event. */
|
|
12
|
+
export type ContextUsageEvent = {
|
|
13
|
+
kind: "serve";
|
|
14
|
+
at: string;
|
|
15
|
+
author: string;
|
|
16
|
+
surface: ContextRelevanceSurface;
|
|
17
|
+
profile: string;
|
|
18
|
+
rows: ContextUsageServingRow[];
|
|
19
|
+
} | {
|
|
20
|
+
kind: "touch";
|
|
21
|
+
at: string;
|
|
22
|
+
author: string;
|
|
23
|
+
item_id: string;
|
|
24
|
+
intent: string;
|
|
25
|
+
};
|
|
26
|
+
/** Runtime controls for the bounded derived ledger. */
|
|
27
|
+
export interface ContextUsageLedgerOptions {
|
|
28
|
+
/** Tracker root containing the runtime directory. */
|
|
29
|
+
pmRoot: string;
|
|
30
|
+
/** Disable all reads and writes with zero filesystem work. */
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
/** Maximum retained event rows. */
|
|
33
|
+
maxEvents?: number;
|
|
34
|
+
/** Retention horizon in days. */
|
|
35
|
+
retentionDays?: number;
|
|
36
|
+
/** Deterministic timestamp override. */
|
|
37
|
+
now?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Decayed per-item affinity derived for one author. */
|
|
40
|
+
export interface ContextUsageAffinity {
|
|
41
|
+
/** Normalized affinity by item id. */
|
|
42
|
+
affinity: Record<string, number>;
|
|
43
|
+
/** Number of eligible served-then-touched judgments. */
|
|
44
|
+
positive_judgments: number;
|
|
45
|
+
/** Number of retained serving events inspected. */
|
|
46
|
+
serving_events: number;
|
|
47
|
+
}
|
|
48
|
+
/** Records a propensity-complete context/next serving event. */
|
|
49
|
+
export declare function recordContextUsageServing(options: ContextUsageLedgerOptions & {
|
|
50
|
+
author: string;
|
|
51
|
+
surface: ContextRelevanceSurface;
|
|
52
|
+
profile: string;
|
|
53
|
+
rows: ContextUsageServingRow[];
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
/** Records one subsequent item read or mutation outcome. */
|
|
56
|
+
export declare function recordContextUsageTouch(options: ContextUsageLedgerOptions & {
|
|
57
|
+
author: string;
|
|
58
|
+
itemId: string;
|
|
59
|
+
intent: string;
|
|
60
|
+
}): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Records mutation outcomes as one append and one optional compaction pass.
|
|
63
|
+
*/
|
|
64
|
+
export declare function recordContextUsageTouches(options: ContextUsageLedgerOptions & {
|
|
65
|
+
/** Stable caller identity used to isolate affinity. */
|
|
66
|
+
author: string;
|
|
67
|
+
/** Item identifiers affected by the completed command. */
|
|
68
|
+
itemIds: readonly string[];
|
|
69
|
+
/** Command or workflow intent associated with the touches. */
|
|
70
|
+
intent: string;
|
|
71
|
+
}): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Derives decayed served-then-touched affinity. A small exploration floor keeps
|
|
74
|
+
* ignored and unseen items eligible, preventing a popularity feedback lock-in.
|
|
75
|
+
*/
|
|
76
|
+
export declare function readContextUsageAffinity(options: ContextUsageLedgerOptions & {
|
|
77
|
+
author: string;
|
|
78
|
+
horizonHours?: number;
|
|
79
|
+
}): Promise<ContextUsageAffinity>;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/context-usage
|
|
3
|
+
*
|
|
4
|
+
* Privacy-minimal, derived context-usage feedback primitives. The JSONL ledger
|
|
5
|
+
* contains only item ids, timestamps, authors, ranks, profiles, and command
|
|
6
|
+
* intents; it never enters item history and is safe to delete or rebuild.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2f1439c6-25a5-526f-a491-d50ee348463f")}catch(e){}}();
|
|
10
|
+
import { randomUUID } from "node:crypto";
|
|
11
|
+
import { appendFile, mkdir, readFile, rename, stat, writeFile, } from "node:fs/promises";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
import { acquireLock } from "../core/lock/lock.js";
|
|
14
|
+
const DEFAULT_MAX_EVENTS = 2_048;
|
|
15
|
+
const DEFAULT_RETENTION_DAYS = 30;
|
|
16
|
+
const DAY_MS = 86_400_000;
|
|
17
|
+
const DEFAULT_COMPACTION_BYTES = 262_144;
|
|
18
|
+
const CONTEXT_USAGE_LOCK_ID = "context-usage-ledger";
|
|
19
|
+
function ledgerPath(pmRoot) {
|
|
20
|
+
return path.join(pmRoot, "runtime", "context-usage.jsonl");
|
|
21
|
+
}
|
|
22
|
+
function resolveNow(options) {
|
|
23
|
+
const iso = options.now ?? new Date().toISOString();
|
|
24
|
+
const ms = Date.parse(iso);
|
|
25
|
+
if (!Number.isFinite(ms))
|
|
26
|
+
throw new TypeError("Context usage now must be a valid timestamp");
|
|
27
|
+
return { iso: new Date(ms).toISOString(), ms };
|
|
28
|
+
}
|
|
29
|
+
async function readEvents(options) {
|
|
30
|
+
try {
|
|
31
|
+
const text = await readFile(ledgerPath(options.pmRoot), "utf8");
|
|
32
|
+
const events = text
|
|
33
|
+
.split("\n")
|
|
34
|
+
.filter(Boolean)
|
|
35
|
+
.flatMap((line) => {
|
|
36
|
+
try {
|
|
37
|
+
return [JSON.parse(line)];
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const maxEvents = options.maxEvents ?? DEFAULT_MAX_EVENTS;
|
|
44
|
+
const retentionDays = options.retentionDays ?? DEFAULT_RETENTION_DAYS;
|
|
45
|
+
const cutoff = resolveNow(options).ms - retentionDays * DAY_MS;
|
|
46
|
+
return events
|
|
47
|
+
.filter((entry) => Date.parse(entry.at) >= cutoff)
|
|
48
|
+
.slice(-maxEvents);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function appendEvents(options, events) {
|
|
55
|
+
const maxEvents = options.maxEvents ?? DEFAULT_MAX_EVENTS;
|
|
56
|
+
const retentionDays = options.retentionDays ?? DEFAULT_RETENTION_DAYS;
|
|
57
|
+
if (!Number.isInteger(maxEvents) ||
|
|
58
|
+
maxEvents < 1 ||
|
|
59
|
+
!Number.isFinite(retentionDays) ||
|
|
60
|
+
retentionDays <= 0) {
|
|
61
|
+
throw new TypeError("Context usage retention requires positive maxEvents and retentionDays");
|
|
62
|
+
}
|
|
63
|
+
const target = ledgerPath(options.pmRoot);
|
|
64
|
+
const runtimeDirectory = path.dirname(target);
|
|
65
|
+
const releaseLock = await acquireLock(options.pmRoot, CONTEXT_USAGE_LOCK_ID, 30, `context-usage:${process.pid}`, false, false, 3_000);
|
|
66
|
+
try {
|
|
67
|
+
await mkdir(runtimeDirectory, { recursive: true });
|
|
68
|
+
await appendFile(target, events.map((event) => `${JSON.stringify(event)}\n`).join(""), "utf8");
|
|
69
|
+
const customBounds = options.maxEvents !== undefined || options.retentionDays !== undefined;
|
|
70
|
+
if (!customBounds && (await stat(target)).size <= DEFAULT_COMPACTION_BYTES)
|
|
71
|
+
return;
|
|
72
|
+
const retained = await readEvents(options);
|
|
73
|
+
const temporary = `${target}.${process.pid}.${randomUUID()}.tmp`;
|
|
74
|
+
await writeFile(temporary, `${retained.map((entry) => JSON.stringify(entry)).join("\n")}\n`, "utf8");
|
|
75
|
+
await rename(temporary, target);
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
await releaseLock();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async function appendEvent(options, event) {
|
|
82
|
+
await appendEvents(options, [event]);
|
|
83
|
+
}
|
|
84
|
+
/** Records a propensity-complete context/next serving event. */
|
|
85
|
+
export async function recordContextUsageServing(options) {
|
|
86
|
+
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false)
|
|
87
|
+
return;
|
|
88
|
+
if (!options.author.trim() ||
|
|
89
|
+
options.rows.some((row) => !row.id.trim() || !Number.isInteger(row.rank) || row.rank < 1)) {
|
|
90
|
+
throw new TypeError("Context usage serving requires an author and valid ranked rows");
|
|
91
|
+
}
|
|
92
|
+
await appendEvent(options, {
|
|
93
|
+
kind: "serve",
|
|
94
|
+
at: resolveNow(options).iso,
|
|
95
|
+
author: options.author.trim(),
|
|
96
|
+
surface: options.surface,
|
|
97
|
+
profile: options.profile.trim() || "balanced",
|
|
98
|
+
rows: options.rows,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/** Records one subsequent item read or mutation outcome. */
|
|
102
|
+
export async function recordContextUsageTouch(options) {
|
|
103
|
+
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false)
|
|
104
|
+
return;
|
|
105
|
+
if (!options.author.trim() ||
|
|
106
|
+
!options.itemId.trim() ||
|
|
107
|
+
!options.intent.trim()) {
|
|
108
|
+
throw new TypeError("Context usage touch requires author, itemId, and intent");
|
|
109
|
+
}
|
|
110
|
+
await appendEvent(options, {
|
|
111
|
+
kind: "touch",
|
|
112
|
+
at: resolveNow(options).iso,
|
|
113
|
+
author: options.author.trim(),
|
|
114
|
+
item_id: options.itemId.trim(),
|
|
115
|
+
intent: options.intent.trim(),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Records mutation outcomes as one append and one optional compaction pass.
|
|
120
|
+
*/
|
|
121
|
+
export async function recordContextUsageTouches(options) {
|
|
122
|
+
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false || options.itemIds.length === 0)
|
|
123
|
+
return;
|
|
124
|
+
const author = options.author.trim();
|
|
125
|
+
const intent = options.intent.trim();
|
|
126
|
+
if (!author || !intent) {
|
|
127
|
+
throw new TypeError("Context usage touch requires author and intent");
|
|
128
|
+
}
|
|
129
|
+
const itemIds = new Set();
|
|
130
|
+
for (const itemId of options.itemIds) {
|
|
131
|
+
if (typeof itemId !== "string") {
|
|
132
|
+
throw new TypeError("Context usage touch requires string itemIds");
|
|
133
|
+
}
|
|
134
|
+
const trimmedId = itemId.trim();
|
|
135
|
+
if (!trimmedId)
|
|
136
|
+
throw new TypeError("Context usage touch requires non-empty itemId");
|
|
137
|
+
itemIds.add(trimmedId);
|
|
138
|
+
}
|
|
139
|
+
const at = resolveNow(options).iso;
|
|
140
|
+
const events = [...itemIds].map((itemId) => ({ kind: "touch", at, author, item_id: itemId, intent }));
|
|
141
|
+
await appendEvents(options, events);
|
|
142
|
+
}
|
|
143
|
+
function findTouchTimeInHorizon(touches, itemId, servedAt, horizonMs) {
|
|
144
|
+
return touches.find(({ entry, time }) => entry.item_id === itemId && time >= servedAt && time - servedAt <= horizonMs)?.time;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Derives decayed served-then-touched affinity. A small exploration floor keeps
|
|
148
|
+
* ignored and unseen items eligible, preventing a popularity feedback lock-in.
|
|
149
|
+
*/
|
|
150
|
+
export async function readContextUsageAffinity(options) {
|
|
151
|
+
if (process.env.PM_CONTEXT_USAGE_DISABLED === "1" || options.enabled === false)
|
|
152
|
+
return { affinity: {}, positive_judgments: 0, serving_events: 0 };
|
|
153
|
+
const events = await readEvents(options);
|
|
154
|
+
const now = resolveNow(options).ms;
|
|
155
|
+
const horizonMs = (options.horizonHours ?? 24) * 3_600_000;
|
|
156
|
+
if (!Number.isFinite(horizonMs) || horizonMs <= 0)
|
|
157
|
+
throw new TypeError("Context usage horizonHours must be positive");
|
|
158
|
+
const author = options.author.trim();
|
|
159
|
+
const touches = events
|
|
160
|
+
.filter((event) => event.kind === "touch" && event.author === author)
|
|
161
|
+
.map((entry) => ({ entry, time: Date.parse(entry.at) }));
|
|
162
|
+
const scores = new Map();
|
|
163
|
+
let servingEvents = 0;
|
|
164
|
+
let positiveJudgments = 0;
|
|
165
|
+
for (const event of events) {
|
|
166
|
+
if (event.kind !== "serve" || event.author !== author)
|
|
167
|
+
continue;
|
|
168
|
+
servingEvents += 1;
|
|
169
|
+
const servedAt = Date.parse(event.at);
|
|
170
|
+
for (const row of event.rows) {
|
|
171
|
+
if (!row.included)
|
|
172
|
+
continue;
|
|
173
|
+
const touchTime = findTouchTimeInHorizon(touches, row.id, servedAt, horizonMs);
|
|
174
|
+
if (touchTime === undefined)
|
|
175
|
+
continue;
|
|
176
|
+
positiveJudgments += 1;
|
|
177
|
+
const ageDays = Math.max(0, (now - touchTime) / DAY_MS);
|
|
178
|
+
scores.set(row.id, (scores.get(row.id) ?? 0) + Math.exp(-ageDays / 14));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const maximum = Math.max(0, ...scores.values());
|
|
182
|
+
const affinity = Object.fromEntries([...scores.entries()].map(([id, score]) => [
|
|
183
|
+
id,
|
|
184
|
+
0.05 + 0.95 * (maximum > 0 ? score / maximum : 0),
|
|
185
|
+
]));
|
|
186
|
+
return {
|
|
187
|
+
affinity,
|
|
188
|
+
positive_judgments: positiveJudgments,
|
|
189
|
+
serving_events: servingEvents,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=context-usage.js.map
|
|
193
|
+
//# debugId=2f1439c6-25a5-526f-a491-d50ee348463f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-usage.js","sources":["sdk/context-usage.ts"],"sourceRoot":"/","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"],"names":[],"mappings":"AAAA;;;;;;GAMG;;;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAuDnD,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,MAAM,GAAG,UAAU,CAAC;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K,CAAC,EAAE,EAAE,CAAC;QACzC,EAAE;QACF,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;KAClD,CAAC,CACH,CAAC;IACF,OAAO;QACL,QAAQ;QACR,kBAAkB,EAAE,iBAAiB;QACrC,cAAc,EAAE,aAAa;KAC9B,CAAC;AACJ,CAAC","debugId":"2f1439c6-25a5-526f-a491-d50ee348463f"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { GlobalOptions } from "../core/shared/command-types.js";
|
|
2
|
+
import type { Dependency, ItemStatus, ItemType } from "../types/index.js";
|
|
3
|
+
/** Supported values accepted by the deps format contract. */
|
|
4
|
+
export declare const DEPS_FORMAT_VALUES: readonly ["tree", "graph"];
|
|
5
|
+
/** Restricts deps format values accepted by command, SDK, and storage contracts. */
|
|
6
|
+
export type DepsFormat = (typeof DEPS_FORMAT_VALUES)[number];
|
|
7
|
+
/** Supported values accepted by the deps collapse contract. */
|
|
8
|
+
export declare const DEPS_COLLAPSE_VALUES: readonly ["none", "repeated"];
|
|
9
|
+
/** Restricts deps collapse mode values accepted by command, SDK, and storage contracts. */
|
|
10
|
+
export type DepsCollapseMode = (typeof DEPS_COLLAPSE_VALUES)[number];
|
|
11
|
+
/** Documents the deps command options payload exchanged by command, SDK, and package integrations. */
|
|
12
|
+
export interface DepsCommandOptions {
|
|
13
|
+
/** Value that configures or reports format for this contract. */
|
|
14
|
+
format?: string;
|
|
15
|
+
/** Value that configures or reports max depth for this contract. */
|
|
16
|
+
maxDepth?: string | number;
|
|
17
|
+
/** Value that configures or reports collapse for this contract. */
|
|
18
|
+
collapse?: string;
|
|
19
|
+
/** Value that configures or reports summary for this contract. */
|
|
20
|
+
summary?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Minimal item shape inspected by dependency-reference governance. */
|
|
23
|
+
export interface DependencyReferenceHolder {
|
|
24
|
+
/** Stable item identifier. */
|
|
25
|
+
id: string;
|
|
26
|
+
/** Lifecycle status used to separate actionable work from historical debt. */
|
|
27
|
+
status: ItemStatus;
|
|
28
|
+
/** Optional hierarchy parent reference. */
|
|
29
|
+
parent?: string;
|
|
30
|
+
/** Optional legacy scalar blocker reference. */
|
|
31
|
+
blocked_by?: string;
|
|
32
|
+
/** Structured dependency edges. */
|
|
33
|
+
dependencies?: Dependency[];
|
|
34
|
+
}
|
|
35
|
+
/** Storage surface that contributed a normalized dependency reference. */
|
|
36
|
+
export type DependencyReferenceSource = "parent" | "blocked_by" | "dependency";
|
|
37
|
+
/** One normalized dependency reference whose target is absent from the tracker. */
|
|
38
|
+
export interface DanglingDependencyReference {
|
|
39
|
+
/** Item that owns the reference. */
|
|
40
|
+
holder_id: string;
|
|
41
|
+
/** Missing referenced item id or legacy sentinel. */
|
|
42
|
+
target_id: string;
|
|
43
|
+
/** Relationship field or dependency kind. */
|
|
44
|
+
kind: string;
|
|
45
|
+
/** Storage surface that owns the reference and determines its remediation. */
|
|
46
|
+
source: DependencyReferenceSource;
|
|
47
|
+
/** Current lifecycle status of the holder. */
|
|
48
|
+
holder_status: ItemStatus;
|
|
49
|
+
/** Whether the holder is terminal and therefore historical, non-actionable debt. */
|
|
50
|
+
legacy_terminal: boolean;
|
|
51
|
+
/** Whether the target is the pre-structured-dependency `no-active-blocker` sentinel. */
|
|
52
|
+
no_active_blocker_sentinel: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** Actionable and historical partitions returned by dependency-reference governance. */
|
|
55
|
+
export interface DanglingDependencyReferenceSummary {
|
|
56
|
+
/** Missing references held by active items; these may affect scheduling and should gate validation. */
|
|
57
|
+
active: DanglingDependencyReference[];
|
|
58
|
+
/** Missing references held only by terminal items; retained as informational history debt. */
|
|
59
|
+
legacy_terminal: DanglingDependencyReference[];
|
|
60
|
+
/** Legacy sentinel rows across active and terminal holders, called out separately from typo-like ids. */
|
|
61
|
+
no_active_blocker_sentinels: DanglingDependencyReference[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Classify missing hierarchy and dependency targets without mutating their holders.
|
|
65
|
+
*
|
|
66
|
+
* Consumers provide the workspace's terminal-status predicate so custom lifecycle
|
|
67
|
+
* schemas receive the same active-versus-historical behavior as the built-in
|
|
68
|
+
* closed/canceled statuses.
|
|
69
|
+
*/
|
|
70
|
+
export declare function collectDanglingDependencyReferences(items: readonly DependencyReferenceHolder[], isTerminal?: (status: ItemStatus) => boolean): DanglingDependencyReferenceSummary;
|
|
71
|
+
/** Documents the deps tree node payload exchanged by command, SDK, and package integrations. */
|
|
72
|
+
export interface DepsTreeNode {
|
|
73
|
+
/** Stable identifier used to reference this record across commands and storage. */
|
|
74
|
+
id: string;
|
|
75
|
+
/** Value that configures or reports title for this contract. */
|
|
76
|
+
title?: string;
|
|
77
|
+
/** Schema type that determines the shape and validation rules for this value. */
|
|
78
|
+
type?: ItemType;
|
|
79
|
+
/** Lifecycle state reported for status. */
|
|
80
|
+
status?: ItemStatus;
|
|
81
|
+
/** Value that configures or reports via for this contract. */
|
|
82
|
+
via?: string;
|
|
83
|
+
/** Value that configures or reports missing for this contract. */
|
|
84
|
+
missing: boolean;
|
|
85
|
+
/** Value that configures or reports cycle for this contract. */
|
|
86
|
+
cycle: boolean;
|
|
87
|
+
/** Value that configures or reports truncated for this contract. */
|
|
88
|
+
truncated?: boolean;
|
|
89
|
+
/** Value that configures or reports collapsed for this contract. */
|
|
90
|
+
collapsed?: boolean;
|
|
91
|
+
/** Value that configures or reports dependencies for this contract. */
|
|
92
|
+
dependencies: DepsTreeNode[];
|
|
93
|
+
}
|
|
94
|
+
/** Documents the deps graph node payload exchanged by command, SDK, and package integrations. */
|
|
95
|
+
export interface DepsGraphNode {
|
|
96
|
+
/** Stable identifier used to reference this record across commands and storage. */
|
|
97
|
+
id: string;
|
|
98
|
+
/** Value that configures or reports title for this contract. */
|
|
99
|
+
title?: string;
|
|
100
|
+
/** Schema type that determines the shape and validation rules for this value. */
|
|
101
|
+
type?: ItemType;
|
|
102
|
+
/** Lifecycle state reported for status. */
|
|
103
|
+
status?: ItemStatus;
|
|
104
|
+
/** Value that configures or reports missing for this contract. */
|
|
105
|
+
missing: boolean;
|
|
106
|
+
}
|
|
107
|
+
/** Documents the deps graph edge payload exchanged by command, SDK, and package integrations. */
|
|
108
|
+
export interface DepsGraphEdge {
|
|
109
|
+
/** Value that configures or reports from for this contract. */
|
|
110
|
+
from: string;
|
|
111
|
+
/** Value that configures or reports to for this contract. */
|
|
112
|
+
to: string;
|
|
113
|
+
/** Value that configures or reports kind for this contract. */
|
|
114
|
+
kind: string;
|
|
115
|
+
}
|
|
116
|
+
/** Documents the deps graph result payload exchanged by command, SDK, and package integrations. */
|
|
117
|
+
export interface DepsGraphResult {
|
|
118
|
+
/** Value that configures or reports root id for this contract. */
|
|
119
|
+
root_id: string;
|
|
120
|
+
/** Value that configures or reports nodes for this contract. */
|
|
121
|
+
nodes: DepsGraphNode[];
|
|
122
|
+
/** Value that configures or reports edges for this contract. */
|
|
123
|
+
edges: DepsGraphEdge[];
|
|
124
|
+
/** Value that configures or reports missing ids for this contract. */
|
|
125
|
+
missing_ids: string[];
|
|
126
|
+
}
|
|
127
|
+
/** Documents the deps result payload exchanged by command, SDK, and package integrations. */
|
|
128
|
+
export interface DepsResult {
|
|
129
|
+
/** Stable identifier used to reference this record across commands and storage. */
|
|
130
|
+
id: string;
|
|
131
|
+
/** Value that configures or reports format for this contract. */
|
|
132
|
+
format: DepsFormat;
|
|
133
|
+
/** Number of node entries represented by this result. */
|
|
134
|
+
node_count: number;
|
|
135
|
+
/** Number of edge entries represented by this result. */
|
|
136
|
+
edge_count: number;
|
|
137
|
+
/** Number of missing entries represented by this result. */
|
|
138
|
+
missing_count: number;
|
|
139
|
+
/** Value that configures or reports tree for this contract. */
|
|
140
|
+
tree?: DepsTreeNode;
|
|
141
|
+
/** Value that configures or reports graph for this contract. */
|
|
142
|
+
graph?: DepsGraphResult;
|
|
143
|
+
}
|
|
144
|
+
/** Implements run deps for the public runtime surface of this module. */
|
|
145
|
+
export declare function runDeps(id: string, options: DepsCommandOptions, global: GlobalOptions): Promise<DepsResult>;
|