@unbrained/pm-cli 2026.7.14 → 2026.7.15
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 +48 -0
- package/README.md +14 -11
- package/dist/cli/argv-utils.d.ts +1 -4
- package/dist/cli/argv-utils.js +3 -13
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +6 -4
- package/dist/cli/bootstrap-args.js +51 -16
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/bundle-integrity.d.ts +49 -0
- package/dist/cli/bundle-integrity.js +111 -0
- package/dist/cli/bundle-integrity.js.map +1 -0
- package/dist/cli/commands/completion.js +7 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +6 -163
- package/dist/cli/commands/config.js +4 -1133
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +2 -4
- package/dist/cli/commands/context.js +10 -85
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +3 -2
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +2 -91
- package/dist/cli/commands/extension/describe.js +4 -142
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +2 -36
- package/dist/cli/commands/extension/scaffold.js +4 -2435
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -28
- package/dist/cli/commands/extension/shared.js +4 -130
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -400
- package/dist/cli/commands/extension.js +4 -2183
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +6 -56
- package/dist/cli/commands/gc.js +4 -270
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +18 -5
- package/dist/cli/commands/get.js +117 -58
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +6 -184
- package/dist/cli/commands/health.js +4 -1747
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +4 -139
- package/dist/cli/commands/history-compact.js +5 -510
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +8 -120
- package/dist/cli/commands/history-redact.js +6 -581
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +7 -89
- package/dist/cli/commands/history-repair.js +5 -257
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/history.d.ts +1 -2
- package/dist/cli/commands/history.js +6 -48
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +3 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +6 -113
- package/dist/cli/commands/init-agent-guidance.js +4 -431
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +6 -181
- package/dist/cli/commands/init.js +4 -690
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/next.js +3 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/profile.d.ts +4 -174
- package/dist/cli/commands/profile.js +4 -425
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +4 -19
- package/dist/cli/commands/restore.js +9 -158
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -507
- package/dist/cli/commands/schema.js +5 -1254
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/test.d.ts +2 -4
- package/dist/cli/commands/test.js +7 -97
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +9 -249
- package/dist/cli/commands/validate.js +9 -2150
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/extension-command-help.js +18 -4
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.js +3 -3
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +20 -30
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +11 -3
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +3 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +782 -0
- package/dist/cli-bundle/chunks/{append-PVZJDM6J.js → append-OJQFUQ4T.js} +5 -5
- package/dist/cli-bundle/chunks/append-UZVHUO74.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js → chunk-2IFFUZLC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js → chunk-2JKGO6QX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js → chunk-2NCIPMQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js → chunk-2VPAVL7O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js → chunk-2WSE6PO2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js → chunk-34L5OT3Y.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js → chunk-3AUGG2DP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js → chunk-3CLU2XZO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-N3CMP4NI.js → chunk-3S5QVM5H.js} +43 -7
- package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js +64 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js → chunk-3WM75PWC.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js +121 -0
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5URI7TPJ.js → chunk-4XQ3BDV4.js} +281 -164
- package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js → chunk-5JLUII3O.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-MKL4CP2I.js → chunk-5ZSLZLDN.js} +631 -246
- package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Q37E63AM.js → chunk-6CFNAVTF.js} +21 -141
- package/dist/cli-bundle/chunks/chunk-6CFNAVTF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js → chunk-6N2VXVTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js → chunk-6S3YSUYG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZUKSZVBW.js → chunk-7B67ZL4N.js} +8 -7
- package/dist/cli-bundle/chunks/chunk-7B67ZL4N.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IA3YFTXT.js → chunk-7PIWCHTW.js} +11 -13
- package/dist/cli-bundle/chunks/chunk-7PIWCHTW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BPD26E3P.js → chunk-7Z4LKRS4.js} +291 -81
- package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js → chunk-AHVTB5I5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js → chunk-APRVSW2O.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js → chunk-B7PE22W6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js → chunk-BCOFWYW4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js → chunk-BEP7WJA2.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js +1114 -0
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js → chunk-BSEQUTQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js.map → chunk-BSEQUTQP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js → chunk-CRVF2JDM.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js → chunk-DM4H7FP4.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-DUT67M43.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-44LNIULG.js → chunk-DYH63FX7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LWTIRS3Y.js → chunk-E2OJMKML.js} +306 -82
- package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js → chunk-EAB64KLB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js → chunk-EACOH7AU.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js → chunk-EH2OPHBI.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js.map → chunk-EH2OPHBI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js → chunk-EJEXHTY5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js → chunk-EYLCSJAI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-655STMGA.js → chunk-FMBNM2EN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js → chunk-FNSPG7MU.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-5CT5BW6E.js → chunk-GM5QHQU6.js} +46 -40
- package/dist/cli-bundle/chunks/chunk-GM5QHQU6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FTQLW4JD.js → chunk-GOSLKLFE.js} +418 -24
- package/dist/cli-bundle/chunks/chunk-GOSLKLFE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KB726FMH.js → chunk-H2Z3FYXQ.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js +162 -0
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2QIQGYPW.js → chunk-H5APFTHZ.js} +53 -10
- package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js +118 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZAYYDNB3.js → chunk-HO4KXD6I.js} +22 -142
- package/dist/cli-bundle/chunks/chunk-HO4KXD6I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js → chunk-HYB5AZ63.js} +203 -62
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js.map → chunk-HYB5AZ63.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js → chunk-IA5FKNII.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JL7WZ4O2.js → chunk-IG3SWA4A.js} +33 -9
- package/dist/cli-bundle/chunks/chunk-IG3SWA4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js → chunk-IJIICKVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IGED7NH2.js → chunk-ILX33QXL.js} +668 -251
- package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UGTVWL3E.js → chunk-INU6DKT5.js} +47 -41
- package/dist/cli-bundle/chunks/chunk-INU6DKT5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UB2QYSTO.js → chunk-J5AOEGDC.js} +26 -18
- package/dist/cli-bundle/chunks/chunk-J5AOEGDC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4DY4KPQI.js → chunk-J6364LFM.js} +1330 -937
- package/dist/cli-bundle/chunks/chunk-J6364LFM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DVOLZJ3C.js → chunk-J6EY5V4N.js} +1295 -939
- package/dist/cli-bundle/chunks/chunk-J6EY5V4N.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js +1097 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js → chunk-JOUQZENX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-J4NZOP3I.js → chunk-JXQUXVMI.js} +9 -8
- package/dist/cli-bundle/chunks/chunk-JXQUXVMI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js → chunk-JYFOV7FC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js → chunk-K2X6U4UA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6OTZMORS.js → chunk-K3WII2ME.js} +27 -27
- package/dist/cli-bundle/chunks/chunk-K3WII2ME.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js → chunk-KG44YSKD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js → chunk-KPMKHGEA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QASRVKUQ.js → chunk-LPYWLWDS.js} +257 -163
- package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RGXD5JJR.js → chunk-LSG2U345.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-LSG2U345.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MIQDDLB5.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js → chunk-NLDFBC6J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js → chunk-NP22ERDF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js → chunk-NU3IMIEA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js → chunk-NVPZIJVR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js → chunk-ODALILG3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CDJYP7OQ.js → chunk-ONG5V5CI.js} +190 -63
- package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js → chunk-ONREO4ST.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js +61 -0
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js → chunk-P74IZQ7A.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js +172 -0
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js → chunk-PGY23YTC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js → chunk-PMOSXADO.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-PNTULOGU.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js → chunk-Q7A43DS4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js → chunk-QEHQ2GVG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js → chunk-QIPLHNP7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js → chunk-QKECXBBG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js.map → chunk-QKECXBBG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js → chunk-QKJGPFAF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F7PSHRNO.js → chunk-QKXHFPYM.js} +27 -10
- package/dist/cli-bundle/chunks/chunk-QKXHFPYM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js → chunk-RLCHOOHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js → chunk-RMLWNPH2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js → chunk-RRM5JYJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js → chunk-S6MQESFR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js → chunk-SDQLJWBO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js → chunk-SELVXEZK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DYEX6NFH.js → chunk-TD3LVC7D.js} +438 -23
- package/dist/cli-bundle/chunks/chunk-TD3LVC7D.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js → chunk-TKOVBP6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js → chunk-TQSZFPIS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js → chunk-TSMHDIW4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js → chunk-UFXU44HV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js → chunk-ULTHRDBP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js → chunk-UMOPHQSU.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js.map → chunk-UMOPHQSU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js → chunk-UOHFKBUV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PHKP3AGR.js → chunk-UWQHLMEB.js} +35 -18
- package/dist/cli-bundle/chunks/chunk-UWQHLMEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6TTOHMTB.js → chunk-UXONS674.js} +45 -112
- package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js → chunk-UY2ACEMF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6PKA3SJQ.js → chunk-WQPUU7XD.js} +19 -28
- package/dist/cli-bundle/chunks/chunk-WQPUU7XD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7TQMR6LK.js → chunk-WT3ZEOGH.js} +70 -20
- package/dist/cli-bundle/chunks/chunk-WT3ZEOGH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js → chunk-WUJQK4YV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js → chunk-XSJUSQAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MHSBDGD.js → chunk-XXXF6PAQ.js} +50 -117
- package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js → chunk-YAQEBNY7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7QDSYUMF.js → chunk-YAROI3PD.js} +44 -21
- package/dist/cli-bundle/chunks/chunk-YAROI3PD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js → chunk-YBLZ2VE7.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js → chunk-YCQET3OT.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YUSOJDWM.js +9 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +58 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js → chunk-ZI6VQWQ7.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +68 -0
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-LZECOMHO.js → close-CWODTPKG.js} +5 -5
- package/dist/cli-bundle/chunks/close-W6LI2PKM.js +12 -0
- package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js → close-many-CQFUY7MR.js} +15 -13
- package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +23 -0
- package/dist/cli-bundle/chunks/comments-E3TNTK24.js +13 -0
- package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js → comments-WGLHR7LB.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js → copy-LXVDXH7B.js} +4 -4
- package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +9 -0
- package/dist/cli-bundle/chunks/{create-F53OBTOU.js → create-J5U6ND4K.js} +9 -9
- package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js → create-LBVCYMEG.js} +9 -9
- package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js → delete-PMJBNY5G.js} +4 -4
- package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +10 -0
- package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js → deps-JZ7TMVCB.js} +7 -4
- package/dist/cli-bundle/chunks/{deps-U57I7EAK.js → deps-OA26IS25.js} +7 -4
- package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js → docs-FEWB2DQB.js} +6 -6
- package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +14 -0
- package/dist/cli-bundle/chunks/{files-TBZD7V6H.js → files-6YFBJRBG.js} +6 -6
- package/dist/cli-bundle/chunks/{files-TTY6N2AV.js → files-EFIWKFTM.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js → focus-4QJR7FOQ.js} +5 -5
- package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js → history-compact-CKRPDTJN.js} +6 -10
- package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +16 -0
- package/dist/cli-bundle/chunks/history-redact-BB3TGDAE.js +15 -0
- package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js → history-redact-D225BHOZ.js} +5 -6
- package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js → history-repair-RQXKQHL4.js} +6 -8
- package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js → learnings-JLNLCOL5.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +13 -0
- package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +13 -0
- package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js → notes-GB47XXQQ.js} +7 -7
- package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +24 -0
- package/dist/cli-bundle/chunks/{plan-2NNEO46V.js → plan-VDCJ2PCN.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js → profile-FAU7NZML.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-U725ATWZ.js → profile-IVXQEL3D.js} +10 -10
- package/dist/cli-bundle/chunks/{register-list-query-BUWCYHBT.js → register-list-query-DKA3EH5D.js} +22 -19
- package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-KTZ6AGE7.js → register-list-query-UL4UKBBN.js} +23 -20
- package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js → register-mutation-ARFHRW55.js} +36 -32
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js.map → register-mutation-ARFHRW55.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-4FMGJJF7.js → register-mutation-RBBJ52DK.js} +37 -33
- package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js → register-operations-ZIBBRSED.js} +41 -39
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js.map → register-operations-ZIBBRSED.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js → register-operations-ZUJ5JWPE.js} +39 -37
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js.map → register-operations-ZUJ5JWPE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js → register-setup-BCVLFEYS.js} +29 -17
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js.map → register-setup-BCVLFEYS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js → register-setup-TDCGWIOS.js} +19 -18
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js.map → register-setup-TDCGWIOS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js → restore-25DLT2Q2.js} +6 -6
- package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +14 -0
- package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js → schema-FNU3WE4O.js} +7 -6
- package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js → schema-NBCM3RAD.js} +7 -6
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js +21 -0
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-Q3UCILNR.js → update-XHSIAIXE.js} +12 -12
- package/dist/cli-bundle/chunks/update-XHSIAIXE.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +32 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +36 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js.map +1 -0
- package/dist/cli-bundle/main.js +826 -43
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/cli-bundle/sdk-runtime.js +70 -57
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +876 -74
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/history/projection.d.ts +39 -0
- package/dist/core/history/projection.js +164 -0
- package/dist/core/history/projection.js.map +1 -0
- package/dist/core/history/read.d.ts +3 -0
- package/dist/core/history/read.js +55 -0
- package/dist/core/history/read.js.map +1 -0
- package/dist/core/output/output-control.d.ts +18 -0
- package/dist/core/output/output-control.js +26 -0
- package/dist/core/output/output-control.js.map +1 -0
- package/dist/core/output/output.js +20 -8
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/sentry/helpers.js +10 -2
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/errors.d.ts +11 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/tool-definitions.js +5 -5
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/author-attribution.d.ts +35 -0
- package/dist/sdk/author-attribution.js +118 -0
- package/dist/sdk/author-attribution.js.map +1 -0
- package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -0
- package/dist/sdk/cli-contracts/command-aliases.js +17 -0
- package/dist/sdk/cli-contracts/command-aliases.js.map +1 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +6 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +21 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +3 -3
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +3 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/cli-program.d.ts +8 -0
- package/dist/sdk/cli-program.js +39 -0
- package/dist/sdk/cli-program.js.map +1 -0
- package/dist/sdk/command-line.d.ts +11 -0
- package/dist/sdk/command-line.js +40 -0
- package/dist/sdk/command-line.js.map +1 -0
- package/dist/sdk/config.d.ts +163 -0
- package/dist/sdk/config.js +1087 -0
- package/dist/sdk/config.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +21 -0
- package/dist/sdk/context-relevance.js +70 -2
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/dependencies.d.ts +15 -2
- package/dist/sdk/dependencies.js +97 -8
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.d.ts +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.js +12 -12
- package/dist/sdk/extension/bundled-catalog.js.map +1 -0
- package/dist/sdk/extension/concurrency.d.ts +7 -0
- package/dist/sdk/extension/concurrency.js +26 -0
- package/dist/sdk/extension/concurrency.js.map +1 -0
- package/dist/sdk/extension/describe.d.ts +91 -0
- package/dist/sdk/extension/describe.js +144 -0
- package/dist/sdk/extension/describe.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/doctor.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/doctor.js +7 -7
- package/dist/sdk/extension/doctor.js.map +1 -0
- package/dist/sdk/extension/install-runtime.d.ts +26 -0
- package/dist/sdk/extension/install-runtime.js +269 -0
- package/dist/sdk/extension/install-runtime.js.map +1 -0
- package/dist/sdk/extension/install-snapshot.d.ts +23 -0
- package/dist/sdk/extension/install-snapshot.js +66 -0
- package/dist/sdk/extension/install-snapshot.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/install-sources.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/install-sources.js +15 -12
- package/dist/sdk/extension/install-sources.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/managed-state.js +6 -6
- package/dist/sdk/extension/managed-state.js.map +1 -0
- package/dist/sdk/extension/scaffold.d.ts +36 -0
- package/dist/sdk/extension/scaffold.js +2436 -0
- package/dist/sdk/extension/scaffold.js.map +1 -0
- package/dist/sdk/extension/shared.d.ts +28 -0
- package/dist/sdk/extension/shared.js +140 -0
- package/dist/sdk/extension/shared.js.map +1 -0
- package/dist/sdk/extension/update-check.d.ts +15 -0
- package/dist/sdk/extension/update-check.js +68 -0
- package/dist/sdk/extension/update-check.js.map +1 -0
- package/dist/sdk/extension.d.ts +367 -0
- package/dist/sdk/extension.js +2174 -0
- package/dist/sdk/extension.js.map +1 -0
- package/dist/sdk/governance/gc.d.ts +56 -0
- package/dist/sdk/governance/gc.js +276 -0
- package/dist/sdk/governance/gc.js.map +1 -0
- package/dist/sdk/governance/health.d.ts +187 -0
- package/dist/sdk/governance/health.js +1796 -0
- package/dist/sdk/governance/health.js.map +1 -0
- package/dist/sdk/governance/validate.d.ts +255 -0
- package/dist/sdk/governance/validate.js +2175 -0
- package/dist/sdk/governance/validate.js.map +1 -0
- package/dist/sdk/history-compact.d.ts +142 -0
- package/dist/sdk/history-compact.js +508 -0
- package/dist/sdk/history-compact.js.map +1 -0
- package/dist/sdk/history-mcp.d.ts +17 -0
- package/dist/sdk/history-mcp.js +68 -0
- package/dist/sdk/history-mcp.js.map +1 -0
- package/dist/sdk/history-read.d.ts +31 -0
- package/dist/sdk/history-read.js +58 -0
- package/dist/sdk/history-read.js.map +1 -0
- package/dist/sdk/history-redact.d.ts +120 -0
- package/dist/sdk/history-redact.js +577 -0
- package/dist/sdk/history-redact.js.map +1 -0
- package/dist/sdk/history-repair.d.ts +89 -0
- package/dist/sdk/history-repair.js +263 -0
- package/dist/sdk/history-repair.js.map +1 -0
- package/dist/sdk/index.d.ts +25 -1
- package/dist/sdk/index.js +27 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/init-agent-guidance.d.ts +113 -0
- package/dist/sdk/init-agent-guidance.js +437 -0
- package/dist/sdk/init-agent-guidance.js.map +1 -0
- package/dist/sdk/init.d.ts +186 -0
- package/dist/sdk/init.js +733 -0
- package/dist/sdk/init.js.map +1 -0
- package/dist/sdk/invocation-author.d.ts +2 -0
- package/dist/sdk/invocation-author.js +39 -0
- package/dist/sdk/invocation-author.js.map +1 -0
- package/dist/sdk/item-children.d.ts +45 -0
- package/dist/sdk/item-children.js +75 -0
- package/dist/sdk/item-children.js.map +1 -0
- package/dist/sdk/item-schedule.d.ts +26 -0
- package/dist/sdk/item-schedule.js +28 -0
- package/dist/sdk/item-schedule.js.map +1 -0
- package/dist/sdk/output.d.ts +7 -0
- package/dist/sdk/output.js +11 -0
- package/dist/sdk/output.js.map +1 -0
- package/dist/sdk/pagination.d.ts +4 -1
- package/dist/sdk/pagination.js +13 -5
- package/dist/sdk/pagination.js.map +1 -1
- package/dist/sdk/profile.d.ts +176 -0
- package/dist/sdk/profile.js +431 -0
- package/dist/sdk/profile.js.map +1 -0
- package/dist/sdk/relationship-analytics.d.ts +108 -0
- package/dist/sdk/relationship-analytics.js +292 -0
- package/dist/sdk/relationship-analytics.js.map +1 -0
- package/dist/sdk/relationship-context.d.ts +67 -0
- package/dist/sdk/relationship-context.js +207 -0
- package/dist/sdk/relationship-context.js.map +1 -0
- package/dist/sdk/relationship-history.d.ts +109 -0
- package/dist/sdk/relationship-history.js +401 -0
- package/dist/sdk/relationship-history.js.map +1 -0
- package/dist/sdk/relationships.d.ts +145 -0
- package/dist/sdk/relationships.js +551 -0
- package/dist/sdk/relationships.js.map +1 -0
- package/dist/sdk/runtime-input.d.ts +10 -0
- package/dist/sdk/runtime-input.js +60 -0
- package/dist/sdk/runtime-input.js.map +1 -0
- package/dist/sdk/runtime.d.ts +31 -8
- package/dist/sdk/runtime.js +61 -57
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/schema.d.ts +507 -0
- package/dist/sdk/schema.js +1269 -0
- package/dist/sdk/schema.js.map +1 -0
- package/dist/{cli/commands → sdk}/templates.d.ts +1 -1
- package/dist/{cli/commands → sdk}/templates.js +9 -9
- package/dist/sdk/templates.js.map +1 -0
- package/dist/{cli/commands → sdk}/test/linked-command-detection.d.ts +10 -2
- package/dist/sdk/test/linked-command-detection.js +525 -0
- package/dist/sdk/test/linked-command-detection.js.map +1 -0
- package/docs/COMMANDS.md +58 -40
- package/docs/EXTENSIONS.md +10 -1
- package/docs/RELATIONSHIP_GRAPH.md +113 -0
- package/docs/RELEASING.md +2 -0
- package/docs/SDK.md +156 -9
- package/docs/SDK_CUSTOMIZATION_PRIMITIVES.md +79 -0
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +76 -16
- package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +8 -0
- 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/scripts/bundle-cli.mjs +66 -23
- package/dist/cli/commands/extension/bundled-catalog.js.map +0 -1
- package/dist/cli/commands/extension/doctor.js.map +0 -1
- package/dist/cli/commands/extension/install-sources.js.map +0 -1
- package/dist/cli/commands/extension/managed-state.js.map +0 -1
- package/dist/cli/commands/templates.js.map +0 -1
- package/dist/cli/commands/test/linked-command-detection.js +0 -248
- package/dist/cli/commands/test/linked-command-detection.js.map +0 -1
- package/dist/cli-bundle/chunks/append-DYQWQK2J.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js +0 -530
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2QIQGYPW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4DY4KPQI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js +0 -554
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CT5BW6E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6MHSBDGD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6OTZMORS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6PKA3SJQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6TTOHMTB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7QDSYUMF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7TQMR6LK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js +0 -312
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js +0 -858
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DVOLZJ3C.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DYEX6NFH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F7PSHRNO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js +0 -875
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FTQLW4JD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IA3YFTXT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J4NZOP3I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JL7WZ4O2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js +0 -309
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N3CMP4NI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PHKP3AGR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q37E63AM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGXD5JJR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UB2QYSTO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UGTVWL3E.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZAYYDNB3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZUKSZVBW.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RI4JQQHU.js +0 -12
- package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +0 -21
- package/dist/cli-bundle/chunks/comments-35M273DN.js +0 -13
- package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +0 -9
- package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +0 -10
- package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +0 -14
- package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-M7GHYVFN.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +0 -18
- package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +0 -13
- package/dist/cli-bundle/chunks/notes-BSD53H2W.js +0 -13
- package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +0 -24
- package/dist/cli-bundle/chunks/register-list-query-BUWCYHBT.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-KTZ6AGE7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-4FMGJJF7.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-66GLMHIX.js +0 -14
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +0 -21
- package/dist/cli-bundle/chunks/update-many-75K57FS3.js +0 -34
- package/dist/cli-bundle/chunks/update-many-U42YA445.js +0 -30
- /package/dist/cli-bundle/chunks/{append-PVZJDM6J.js.map → append-OJQFUQ4T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-DYQWQK2J.js.map → append-UZVHUO74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js.map → chunk-2IFFUZLC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js.map → chunk-2JKGO6QX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js.map → chunk-2NCIPMQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js.map → chunk-2VPAVL7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js.map → chunk-2WSE6PO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js.map → chunk-34L5OT3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js.map → chunk-3AUGG2DP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js.map → chunk-3CLU2XZO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js.map → chunk-3WM75PWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js.map → chunk-5JLUII3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js.map → chunk-6N2VXVTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js.map → chunk-6S3YSUYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js.map → chunk-AHVTB5I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js.map → chunk-APRVSW2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js.map → chunk-B7PE22W6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js.map → chunk-BCOFWYW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js.map → chunk-BEP7WJA2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js.map → chunk-CRVF2JDM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js.map → chunk-DM4H7FP4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-LZECOMHO.js.map → chunk-DUT67M43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44LNIULG.js.map → chunk-DYH63FX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js.map → chunk-EAB64KLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js.map → chunk-EACOH7AU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js.map → chunk-EJEXHTY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js.map → chunk-EYLCSJAI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-655STMGA.js.map → chunk-FMBNM2EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js.map → chunk-FNSPG7MU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KB726FMH.js.map → chunk-H2Z3FYXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js.map → chunk-IA5FKNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js.map → chunk-IJIICKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js.map → chunk-JOUQZENX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js.map → chunk-JYFOV7FC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js.map → chunk-K2X6U4UA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js.map → chunk-KG44YSKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js.map → chunk-KPMKHGEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js.map → chunk-MIQDDLB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js.map → chunk-NLDFBC6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js.map → chunk-NP22ERDF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js.map → chunk-NU3IMIEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js.map → chunk-NVPZIJVR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js.map → chunk-ODALILG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js.map → chunk-ONREO4ST.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js.map → chunk-P74IZQ7A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js.map → chunk-PGY23YTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js.map → chunk-PMOSXADO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RI4JQQHU.js.map → chunk-PNTULOGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js.map → chunk-Q7A43DS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js.map → chunk-QEHQ2GVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js.map → chunk-QIPLHNP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js.map → chunk-QKJGPFAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js.map → chunk-RLCHOOHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js.map → chunk-RMLWNPH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js.map → chunk-RRM5JYJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js.map → chunk-S6MQESFR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js.map → chunk-SDQLJWBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js.map → chunk-SELVXEZK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js.map → chunk-TKOVBP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js.map → chunk-TQSZFPIS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js.map → chunk-TSMHDIW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js.map → chunk-UFXU44HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js.map → chunk-ULTHRDBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js.map → chunk-UOHFKBUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js.map → chunk-UY2ACEMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js.map → chunk-WUJQK4YV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js.map → chunk-XSJUSQAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js.map → chunk-YAQEBNY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js.map → chunk-YBLZ2VE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js.map → chunk-YCQET3OT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-LY2XJ52M.js.map → chunk-YUSOJDWM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js.map → chunk-ZI6VQWQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js.map → close-CWODTPKG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-35M273DN.js.map → close-W6LI2PKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js.map → close-many-CQFUY7MR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NPYM7M7U.js.map → close-many-DLDDVSH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-F53OBTOU.js.map → comments-E3TNTK24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js.map → comments-WGLHR7LB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js.map → copy-LXVDXH7B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ODRWJWAM.js.map → copy-Q5ZJPUKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-U57I7EAK.js.map → create-J5U6ND4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js.map → create-LBVCYMEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js.map → delete-PMJBNY5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-G7N4E2JO.js.map → delete-WNHB3LYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TTY6N2AV.js.map → deps-JZ7TMVCB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TBZD7V6H.js.map → deps-OA26IS25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js.map → docs-FEWB2DQB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-U5TRVCRS.js.map → docs-HA2AIDBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-M7GHYVFN.js.map → files-6YFBJRBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js.map → files-EFIWKFTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js.map → focus-4QJR7FOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JIHZLHDP.js.map → focus-POIW5LTJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js.map → history-compact-CKRPDTJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-NAFCHLH7.js.map → history-compact-FWG2C7FZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-SONGPSHI.js.map → history-redact-BB3TGDAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js.map → history-redact-D225BHOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-BSD53H2W.js.map → history-repair-6GEAM7HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js.map → history-repair-RQXKQHL4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-2NNEO46V.js.map → learnings-JLNLCOL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-AWLYGBNV.js.map → learnings-RSNLSWDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-U725ATWZ.js.map → notes-2WDH6DXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js.map → notes-GB47XXQQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-66GLMHIX.js.map → plan-DOVI2VMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js.map → plan-VDCJ2PCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js.map → profile-FAU7NZML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js.map → profile-IVXQEL3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-Q3UCILNR.js.map → restore-25DLT2Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2XGHIVQ2.js.map → restore-YPMVUUEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-75K57FS3.js.map → schema-FNU3WE4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-U42YA445.js.map → schema-NBCM3RAD.js.map} +0 -0
- /package/dist/{cli/commands → sdk}/extension/managed-state.d.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../sdk/relationships.ts", "../../../../../../../../sdk/relationship-context.ts", "../../../../../../../../sdk/dependencies.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module sdk/relationships\n *\n * Provides the dependency-free relationship ontology and bounded graph-query\n * kernel shared by the SDK, CLI, MCP adapters, extensions, and non-PM apps.\n */\nimport type { Dependency, ItemMetadata } from \"../types/index.js\";\n\n/** Direction exposed by a relationship kind. */\nexport type RelationshipDirection = \"directed\" | \"undirected\";\n/** Cardinality constraint applied independently to outgoing and incoming edges. */\nexport type RelationshipCardinality = \"one\" | \"many\";\n/** Lifecycle policy for a relationship kind. */\nexport type RelationshipLifecycle = \"persistent\" | \"supersedable\" | \"ephemeral\";\n/** Direction in which an ordering edge contributes to execution precedence. */\nexport type RelationshipPrecedence =\n | \"source_before_target\"\n | \"target_before_source\";\n/** Endpoint that represents the structural parent for hierarchy kinds. */\nexport type RelationshipHierarchyDirection = \"source_parent\" | \"target_parent\";\n\n/** Versioned semantic definition for a built-in or application-defined edge kind. */\nexport interface RelationshipKindDefinition {\n /** Canonical, case-insensitive kind identifier. */\n kind: string;\n /** Whether traversing source to target has distinct meaning from the reverse. */\n direction: RelationshipDirection;\n /** Optional canonical kind used when traversing a directed edge in reverse. */\n inverse?: string;\n /** Whether the kind participates in execution-order cycle checks. */\n ordering: boolean;\n /** Execution direction for ordering kinds; defaults to source before target. */\n precedence?: RelationshipPrecedence;\n /** Whether the kind contributes to structural ancestry. */\n hierarchy: boolean;\n /** Endpoint that represents the parent; defaults to source for custom kinds. */\n hierarchyDirection?: RelationshipHierarchyDirection;\n /** Maximum logical outgoing edges of this kind from one node. */\n outgoing: RelationshipCardinality;\n /** Maximum logical incoming edges of this kind to one node. */\n incoming: RelationshipCardinality;\n /** Edge replacement and retention behavior. */\n lifecycle: RelationshipLifecycle;\n /** JSON Schema for optional application-owned payloads. */\n payloadSchema?: Readonly<Record<string, unknown>>;\n /** Legacy spellings normalized to this definition. */\n aliases?: readonly string[];\n /** Compatibility version of this semantic contract. */\n compatibilityVersion: number;\n /** Whether source and target may be the same node. */\n allowSelf: boolean;\n}\n\n/** One normalized relationship edge indexed by the graph kernel. */\nexport interface RelationshipEdge {\n /** Source node identifier. */\n source: string;\n /** Target node identifier. */\n target: string;\n /** Canonical relationship kind. */\n kind: string;\n /** Optional creation timestamp retained from storage. */\n createdAt?: string;\n /** Optional author retained from storage. */\n author?: string;\n /** Optional application-owned edge payload. */\n payload?: Readonly<Record<string, unknown>>;\n}\n\n/** Direction used by adjacency, closure, and path traversal. */\nexport type RelationshipTraversalDirection = \"outgoing\" | \"incoming\" | \"both\";\n\n/** Shared bounded-query controls. */\nexport interface RelationshipQueryOptions {\n /** Edge kinds to traverse after alias normalization. */\n kinds?: readonly string[];\n /** Traversal direction relative to each visited node. */\n direction?: RelationshipTraversalDirection;\n /** Maximum number of returned nodes, excluding the starting node. */\n limit?: number;\n /** Maximum traversal depth. */\n maxDepth?: number;\n /** Abort signal checked throughout traversal. */\n signal?: AbortSignal;\n}\n\n/** Cost and truncation metadata returned by every graph query. */\nexport interface RelationshipQueryMeta {\n /** Number of nodes removed from the traversal frontier. */\n visitedNodes: number;\n /** Number of candidate edges inspected. */\n inspectedEdges: number;\n /** Whether a configured bound stopped traversal. */\n truncated: boolean;\n /** Deterministic continuation cursor for the final returned node. */\n nextCursor?: string;\n}\n\n/** Generic bounded graph query result. */\nexport interface RelationshipQueryResult<T> {\n /** Deterministically ordered query value. */\n value: T;\n /** Explicit query work and truncation metadata. */\n meta: RelationshipQueryMeta;\n}\n\n/** Induced subgraph returned by bounded traversal. */\nexport interface RelationshipSubgraph {\n /** Deterministically ordered node identifiers. */\n nodes: string[];\n /** Deterministically ordered edges whose endpoints are both present. */\n edges: RelationshipEdge[];\n}\n\nconst BUILTIN_RELATIONSHIP_KINDS: readonly RelationshipKindDefinition[] = [\n {\n kind: \"blocked_by\",\n direction: \"directed\",\n inverse: \"blocks\",\n ordering: true,\n precedence: \"target_before_source\",\n hierarchy: false,\n outgoing: \"many\",\n incoming: \"many\",\n lifecycle: \"persistent\",\n aliases: [\"depends_on\"],\n compatibilityVersion: 1,\n allowSelf: false,\n },\n {\n kind: \"blocks\",\n direction: \"directed\",\n inverse: \"blocked_by\",\n ordering: true,\n precedence: \"source_before_target\",\n hierarchy: false,\n outgoing: \"many\",\n incoming: \"many\",\n lifecycle: \"persistent\",\n compatibilityVersion: 1,\n allowSelf: false,\n },\n {\n kind: \"parent\",\n direction: \"directed\",\n inverse: \"child\",\n ordering: false,\n hierarchy: true,\n hierarchyDirection: \"target_parent\",\n outgoing: \"one\",\n incoming: \"many\",\n lifecycle: \"supersedable\",\n aliases: [\"child_of\", \"epic\"],\n compatibilityVersion: 1,\n allowSelf: false,\n },\n {\n kind: \"child\",\n direction: \"directed\",\n inverse: \"parent\",\n ordering: false,\n hierarchy: true,\n hierarchyDirection: \"source_parent\",\n outgoing: \"many\",\n incoming: \"one\",\n lifecycle: \"supersedable\",\n aliases: [\"parent_child\", \"task\"],\n compatibilityVersion: 1,\n allowSelf: false,\n },\n {\n kind: \"related\",\n direction: \"undirected\",\n ordering: false,\n hierarchy: false,\n outgoing: \"many\",\n incoming: \"many\",\n lifecycle: \"persistent\",\n aliases: [\"related_to\"],\n compatibilityVersion: 1,\n allowSelf: false,\n },\n {\n kind: \"discovered_from\",\n direction: \"directed\",\n ordering: false,\n hierarchy: false,\n outgoing: \"many\",\n incoming: \"many\",\n lifecycle: \"persistent\",\n compatibilityVersion: 1,\n allowSelf: false,\n },\n {\n kind: \"incident_from\",\n direction: \"directed\",\n ordering: false,\n hierarchy: false,\n outgoing: \"many\",\n incoming: \"many\",\n lifecycle: \"persistent\",\n compatibilityVersion: 1,\n allowSelf: false,\n },\n {\n kind: \"supersedes\",\n direction: \"directed\",\n ordering: false,\n hierarchy: false,\n outgoing: \"many\",\n incoming: \"many\",\n lifecycle: \"supersedable\",\n compatibilityVersion: 1,\n allowSelf: false,\n },\n] as const;\n\nfunction normalizeKind(kind: string): string {\n return kind.trim().toLowerCase().replaceAll(\"-\", \"_\");\n}\n\nfunction normalizeInverseKind(inverse: string | undefined): string | undefined {\n if (inverse === undefined) return undefined;\n const normalized = normalizeKind(inverse);\n if (!/^[a-z][a-z0-9_]*$/.test(normalized))\n throw new TypeError(`Invalid inverse relationship kind: ${inverse}`);\n return normalized;\n}\n\nfunction freezeValue(value: unknown, visited = new Set<object>()): unknown {\n if (value === null || typeof value !== \"object\") return value;\n if (visited.has(value)) return value;\n visited.add(value);\n if (Array.isArray(value)) {\n for (const entry of value) freezeValue(entry, visited);\n return Object.freeze(value);\n }\n for (const entry of Object.values(value)) freezeValue(entry, visited);\n return Object.freeze(value);\n}\n\nfunction assertRelationshipPrecedence(\n definition: RelationshipKindDefinition,\n kind: string,\n): void {\n if (\n definition.precedence !== undefined &&\n definition.precedence !== \"source_before_target\" &&\n definition.precedence !== \"target_before_source\"\n )\n throw new TypeError(`Invalid relationship precedence for ${kind}`);\n if (!definition.ordering && definition.precedence !== undefined)\n throw new TypeError(\n `Non-ordering relationship kind cannot declare precedence: ${kind}`,\n );\n}\n\nfunction assertRelationshipHierarchyDirection(\n definition: RelationshipKindDefinition,\n kind: string,\n): void {\n if (\n definition.hierarchyDirection !== undefined &&\n definition.hierarchyDirection !== \"source_parent\" &&\n definition.hierarchyDirection !== \"target_parent\"\n )\n throw new TypeError(`Invalid relationship hierarchy direction for ${kind}`);\n if (!definition.hierarchy && definition.hierarchyDirection !== undefined)\n throw new TypeError(\n `Non-hierarchy relationship kind cannot declare hierarchy direction: ${kind}`,\n );\n}\n\n/** Mutable registry with immutable snapshots and collision-safe extension registration. */\nexport class RelationshipKindRegistry {\n readonly #definitions = new Map<string, RelationshipKindDefinition>();\n readonly #aliases = new Map<string, string>();\n\n /** Create a registry initialized with the stable built-in ontology by default. */\n public constructor(\n definitions: readonly RelationshipKindDefinition[] = BUILTIN_RELATIONSHIP_KINDS,\n ) {\n for (const definition of definitions) this.register(definition);\n }\n\n /** Register one definition after validating its identifier, version, and aliases. */\n public register(definition: RelationshipKindDefinition): this {\n const kind = normalizeKind(definition.kind);\n if (!/^[a-z][a-z0-9_]*$/.test(kind))\n throw new TypeError(`Invalid relationship kind: ${definition.kind}`);\n if (\n !Number.isInteger(definition.compatibilityVersion) ||\n definition.compatibilityVersion < 1\n )\n throw new TypeError(`Invalid compatibility version for ${kind}`);\n assertRelationshipPrecedence(definition, kind);\n assertRelationshipHierarchyDirection(definition, kind);\n if (this.#definitions.has(kind) || this.#aliases.has(kind))\n throw new TypeError(`Relationship kind already registered: ${kind}`);\n const inverse = normalizeInverseKind(definition.inverse);\n const aliases = [\n ...new Set((definition.aliases ?? []).map(normalizeKind)),\n ].sort();\n for (const alias of aliases) {\n if (!/^[a-z][a-z0-9_]*$/.test(alias))\n throw new TypeError(`Invalid relationship alias: ${alias}`);\n if (\n alias === kind ||\n this.#definitions.has(alias) ||\n this.#aliases.has(alias)\n )\n throw new TypeError(`Relationship alias already registered: ${alias}`);\n }\n const normalized = Object.freeze({\n ...definition,\n kind,\n inverse,\n aliases: Object.freeze(aliases),\n payloadSchema: definition.payloadSchema\n ? (freezeValue(structuredClone(definition.payloadSchema)) as Readonly<\n Record<string, unknown>\n >)\n : undefined,\n });\n this.#definitions.set(kind, normalized);\n for (const alias of aliases) this.#aliases.set(alias, kind);\n return this;\n }\n\n /** Resolve a canonical kind or compatibility alias. */\n public resolve(kind: unknown): RelationshipKindDefinition | undefined {\n if (typeof kind !== \"string\") return undefined;\n const normalized = normalizeKind(kind);\n return this.#definitions.get(this.#aliases.get(normalized) ?? normalized);\n }\n\n /** Resolve a kind or throw a precise error suitable for command adapters. */\n public require(kind: string): RelationshipKindDefinition {\n const definition = this.resolve(kind);\n if (!definition) throw new TypeError(`Unknown relationship kind: ${kind}`);\n return definition;\n }\n\n /** Return a deterministic immutable registry snapshot. */\n public list(): readonly RelationshipKindDefinition[] {\n return Object.freeze(\n [...this.#definitions.values()].sort((left, right) =>\n left.kind.localeCompare(right.kind),\n ),\n );\n }\n}\n\n/** Create a registry containing the built-in relationship ontology. */\nexport function createRelationshipKindRegistry(): RelationshipKindRegistry {\n return new RelationshipKindRegistry();\n}\n\nconst defaultRegistry = createRelationshipKindRegistry();\n\n/** Report whether a kind participates in execution-order cycle detection. */\nexport function isOrderingRelationshipKind(\n kind: string,\n registry: RelationshipKindRegistry = defaultRegistry,\n): boolean {\n return registry.resolve(kind)?.ordering === true;\n}\n\nfunction compareEdges(left: RelationshipEdge, right: RelationshipEdge): number {\n return (\n left.source.localeCompare(right.source) ||\n left.target.localeCompare(right.target) ||\n left.kind.localeCompare(right.kind)\n );\n}\n\nfunction normalizeRelationshipEdge(\n candidate: RelationshipEdge,\n nodes: ReadonlySet<string>,\n registry: RelationshipKindRegistry,\n): { edge: RelationshipEdge; identity: string } {\n const source =\n typeof candidate.source === \"string\" ? candidate.source.trim() : \"\";\n const target =\n typeof candidate.target === \"string\" ? candidate.target.trim() : \"\";\n const definition = registry.require(candidate.kind);\n if (!nodes.has(source) || !nodes.has(target))\n throw new TypeError(\n `Relationship endpoint not found: ${source} -> ${target}`,\n );\n if (source === target && !definition.allowSelf)\n throw new TypeError(\n `Self relationship is not allowed for ${definition.kind}`,\n );\n const edge = Object.freeze({\n ...candidate,\n source,\n target,\n kind: definition.kind,\n });\n const endpoints =\n definition.direction === \"undirected\"\n ? [source, target].sort().join(\"\\u0000\")\n : `${source}\\u0000${target}`;\n return { edge, identity: `${definition.kind}\\u0000${endpoints}` };\n}\n\nfunction appendIndexedEdge(\n index: Map<string, RelationshipEdge[]>,\n node: string,\n edge: RelationshipEdge,\n): void {\n const indexed = index.get(node);\n if (indexed) indexed.push(edge);\n else index.set(node, [edge]);\n}\n\nfunction normalizeNodeId(value: unknown): string {\n return typeof value === \"string\" ? value.trim() : \"\";\n}\n\nfunction resolveExistingNodeId(\n value: unknown,\n ids: ReadonlySet<string>,\n): string | undefined {\n const id = normalizeNodeId(value);\n return id && ids.has(id) ? id : undefined;\n}\n\nfunction reconstructPath(\n source: string,\n target: string,\n parents: ReadonlyMap<string, string>,\n): string[] {\n const path = [target];\n let cursor = target;\n while (cursor !== source) {\n cursor = parents.get(cursor)!;\n path.push(cursor);\n }\n return path.reverse();\n}\n\n/** Build an immutable, deterministic in-memory relationship index. */\nexport class RelationshipGraph {\n readonly #registry: RelationshipKindRegistry;\n readonly #nodes: Set<string>;\n readonly #nodeSnapshot: readonly string[];\n readonly #edges: readonly RelationshipEdge[];\n readonly #outgoing = new Map<string, RelationshipEdge[]>();\n readonly #incoming = new Map<string, RelationshipEdge[]>();\n\n /** Validate and index nodes and edges without reading tracker storage. */\n public constructor(\n nodes: Iterable<string>,\n edges: Iterable<RelationshipEdge>,\n registry: RelationshipKindRegistry = defaultRegistry,\n ) {\n this.#registry = registry;\n this.#nodes = new Set(\n [...nodes]\n .filter((id): id is string => typeof id === \"string\")\n .map((id) => id.trim())\n .filter(Boolean),\n );\n this.#nodeSnapshot = Object.freeze([...this.#nodes].sort());\n const deduped = new Map<string, RelationshipEdge>();\n for (const candidate of edges) {\n const { edge, identity } = normalizeRelationshipEdge(\n candidate,\n this.#nodes,\n registry,\n );\n deduped.set(identity, edge);\n }\n this.#edges = Object.freeze([...deduped.values()].sort(compareEdges));\n for (const edge of this.#edges) {\n appendIndexedEdge(this.#outgoing, edge.source, edge);\n appendIndexedEdge(this.#incoming, edge.target, edge);\n if (registry.require(edge.kind).direction === \"undirected\") {\n appendIndexedEdge(this.#outgoing, edge.target, edge);\n appendIndexedEdge(this.#incoming, edge.source, edge);\n }\n }\n }\n\n /** Build the graph directly from item metadata, including hierarchy and legacy blocker fields. */\n public static fromItems(\n items: readonly Pick<\n ItemMetadata,\n \"id\" | \"parent\" | \"blocked_by\" | \"dependencies\"\n >[],\n registry: RelationshipKindRegistry = defaultRegistry,\n ): RelationshipGraph {\n const ids = new Set(\n items.map((item) => normalizeNodeId(item.id)).filter(Boolean),\n );\n const edges: RelationshipEdge[] = [];\n for (const item of items) {\n const source = normalizeNodeId(item.id);\n if (!source) continue;\n const parent = resolveExistingNodeId(item.parent, ids);\n if (parent) edges.push({ source, target: parent, kind: \"parent\" });\n const blockedBy = resolveExistingNodeId(item.blocked_by, ids);\n if (blockedBy)\n edges.push({\n source,\n target: blockedBy,\n kind: \"blocked_by\",\n });\n for (const dependency of item.dependencies ?? []) {\n const dependencyId = resolveExistingNodeId(dependency.id, ids);\n if (dependencyId && registry.resolve(dependency.kind))\n edges.push({\n source,\n target: dependencyId,\n kind: dependency.kind,\n createdAt: dependency.created_at,\n author: dependency.author,\n });\n }\n }\n return new RelationshipGraph(ids, edges, registry);\n }\n\n /** Return the deterministic immutable edge snapshot. */\n public edges(): readonly RelationshipEdge[] {\n return this.#edges;\n }\n\n /** Return the deterministic immutable edges incident to one node. */\n public incidentEdges(id: string): readonly RelationshipEdge[] {\n this.#assertNode(id);\n // Preserve empty fallbacks for legacy indexes and JSON-derived graph state.\n const outgoing = this.#outgoing.get(id) ?? [];\n const incoming = this.#incoming.get(id) ?? [];\n if (outgoing.length === 0) return Object.freeze([...incoming]);\n if (incoming.length === 0) return Object.freeze([...outgoing]);\n const edges: RelationshipEdge[] = [];\n let outgoingIndex = 0;\n let incomingIndex = 0;\n while (outgoingIndex < outgoing.length || incomingIndex < incoming.length) {\n const outgoingEdge = outgoing[outgoingIndex];\n const incomingEdge = incoming[incomingIndex];\n const edge =\n outgoingEdge === undefined\n ? incomingEdge!\n : incomingEdge === undefined ||\n compareEdges(outgoingEdge, incomingEdge) <= 0\n ? outgoingEdge\n : incomingEdge;\n if (edges.at(-1) !== edge) edges.push(edge);\n if (outgoingEdge === edge) outgoingIndex += 1;\n if (incomingEdge === edge) incomingIndex += 1;\n }\n return Object.freeze(edges);\n }\n\n /** Return the deterministic immutable node snapshot. */\n public nodes(): readonly string[] {\n return this.#nodeSnapshot;\n }\n\n #assertNode(id: string): void {\n if (!this.#nodes.has(id))\n throw new TypeError(`Relationship node not found: ${id}`);\n }\n\n #matchesKinds(\n edge: RelationshipEdge,\n kinds: ReadonlySet<string> | undefined,\n ): boolean {\n if (!kinds) return true;\n const definition = this.#registry.require(edge.kind);\n return (\n kinds.has(edge.kind) ||\n (definition.inverse !== undefined && kinds.has(definition.inverse))\n );\n }\n\n #neighbors(\n id: string,\n direction: RelationshipTraversalDirection,\n kinds: ReadonlySet<string> | undefined,\n ): { id: string; edge: RelationshipEdge }[] {\n const candidates = [\n ...(direction === \"incoming\" ? [] : (this.#outgoing.get(id) ?? [])),\n ...(direction === \"outgoing\" ? [] : (this.#incoming.get(id) ?? [])),\n ];\n return [...new Set(candidates)]\n .filter((edge) => this.#matchesKinds(edge, kinds))\n .map((edge) => ({\n id: edge.source === id ? edge.target : edge.source,\n edge,\n }))\n .sort(\n (left, right) =>\n left.id.localeCompare(right.id) ||\n compareEdges(left.edge, right.edge),\n );\n }\n\n /** Return one-hop adjacent node identifiers. */\n public adjacency(\n id: string,\n options: RelationshipQueryOptions = {},\n ): RelationshipQueryResult<string[]> {\n this.#assertNode(id);\n options.signal?.throwIfAborted();\n const kinds = options.kinds\n ? new Set(options.kinds.map((kind) => this.#registry.require(kind).kind))\n : undefined;\n const rows = this.#neighbors(id, options.direction ?? \"outgoing\", kinds);\n const limit = options.limit ?? Number.POSITIVE_INFINITY;\n const uniqueNeighbors = [...new Set(rows.map((row) => row.id))];\n const value = uniqueNeighbors.slice(0, limit);\n return {\n value,\n meta: {\n visitedNodes: 1,\n inspectedEdges: rows.length,\n truncated: value.length < uniqueNeighbors.length,\n nextCursor: value.at(-1),\n },\n };\n }\n\n /** Return bounded transitive closure in breadth-first discovery order. */\n public closure(\n id: string,\n options: RelationshipQueryOptions = {},\n ): RelationshipQueryResult<string[]> {\n this.#assertNode(id);\n const kinds = options.kinds\n ? new Set(options.kinds.map((kind) => this.#registry.require(kind).kind))\n : undefined;\n const direction = options.direction ?? \"outgoing\";\n const limit = options.limit ?? Number.POSITIVE_INFINITY;\n const maxDepth = options.maxDepth ?? Number.POSITIVE_INFINITY;\n const seen = new Set([id]);\n const value: string[] = [];\n const queue = [{ id, depth: 0 }];\n let visitedNodes = 0;\n let inspectedEdges = 0;\n let truncated = false;\n traversal: for (let index = 0; index < queue.length; index += 1) {\n options.signal?.throwIfAborted();\n const current = queue[index]!;\n visitedNodes += 1;\n const neighbors = this.#neighbors(current.id, direction, kinds);\n inspectedEdges += neighbors.length;\n if (current.depth >= maxDepth) {\n if (neighbors.some((neighbor) => !seen.has(neighbor.id)))\n truncated = true;\n continue;\n }\n for (const neighbor of neighbors) {\n if (seen.has(neighbor.id)) continue;\n if (value.length >= limit) {\n truncated = true;\n break traversal;\n }\n seen.add(neighbor.id);\n value.push(neighbor.id);\n queue.push({ id: neighbor.id, depth: current.depth + 1 });\n }\n }\n return {\n value,\n meta: {\n visitedNodes,\n inspectedEdges,\n truncated,\n nextCursor: value.at(-1),\n },\n };\n }\n\n /** Return a deterministic shortest path, or an empty array when disconnected. */\n public shortestPath(\n source: string,\n target: string,\n options: RelationshipQueryOptions = {},\n ): RelationshipQueryResult<string[]> {\n this.#assertNode(source);\n this.#assertNode(target);\n if (source === target)\n return {\n value: [source],\n meta: { visitedNodes: 1, inspectedEdges: 0, truncated: false },\n };\n const kinds = options.kinds\n ? new Set(options.kinds.map((kind) => this.#registry.require(kind).kind))\n : undefined;\n const direction = options.direction ?? \"outgoing\";\n const maxDepth = options.maxDepth ?? Number.POSITIVE_INFINITY;\n const queue = [{ id: source, depth: 0 }];\n const parents = new Map<string, string>();\n const seen = new Set([source]);\n let visitedNodes = 0;\n let inspectedEdges = 0;\n let truncated = false;\n for (let index = 0; index < queue.length; index += 1) {\n options.signal?.throwIfAborted();\n const current = queue[index]!;\n visitedNodes += 1;\n const neighbors = this.#neighbors(current.id, direction, kinds);\n inspectedEdges += neighbors.length;\n if (current.depth >= maxDepth) {\n if (neighbors.some((neighbor) => !seen.has(neighbor.id)))\n truncated = true;\n continue;\n }\n for (const neighbor of neighbors) {\n if (seen.has(neighbor.id)) continue;\n parents.set(neighbor.id, current.id);\n if (neighbor.id === target)\n return {\n value: reconstructPath(source, target, parents),\n meta: { visitedNodes, inspectedEdges, truncated: false },\n };\n seen.add(neighbor.id);\n queue.push({ id: neighbor.id, depth: current.depth + 1 });\n }\n }\n return {\n value: [],\n meta: { visitedNodes, inspectedEdges, truncated },\n };\n }\n\n /** Return the induced subgraph over a bounded closure including the root. */\n public subgraph(\n id: string,\n options: RelationshipQueryOptions = {},\n ): RelationshipQueryResult<RelationshipSubgraph> {\n const closure = this.closure(id, options);\n const nodes = [id, ...closure.value].sort();\n const included = new Set(nodes);\n const kinds = options.kinds\n ? new Set(options.kinds.map((kind) => this.#registry.require(kind).kind))\n : undefined;\n const edges = new Set<RelationshipEdge>();\n for (const node of nodes) {\n for (const edge of this.#outgoing.get(node) ?? []) {\n if (\n included.has(edge.source) &&\n included.has(edge.target) &&\n this.#matchesKinds(edge, kinds)\n )\n edges.add(edge);\n }\n }\n return {\n value: {\n nodes,\n edges: [...edges].sort(compareEdges),\n },\n meta: closure.meta,\n };\n }\n}\n\n/** Convert one stored dependency into the public relationship edge contract. */\nexport function dependencyToRelationship(\n source: string,\n dependency: Dependency,\n registry: RelationshipKindRegistry = defaultRegistry,\n): RelationshipEdge {\n return {\n source,\n target: dependency.id,\n kind: registry.require(dependency.kind).kind,\n createdAt: dependency.created_at,\n author: dependency.author,\n };\n}\n", "/**\n * @module sdk/relationship-context\n *\n * Assembles one explainable, cursorable, token-bounded relationship context\n * packet for agents, custom tools, and presentation-layer adapters.\n */\nimport {\n createQueryFingerprint,\n encodeQueryCursor,\n resolveQueryCursorStart,\n} from \"./pagination.js\";\nimport {\n RelationshipGraph,\n RelationshipKindRegistry,\n createRelationshipKindRegistry,\n type RelationshipEdge,\n type RelationshipTraversalDirection,\n} from \"./relationships.js\";\n\n/** Caller-owned compact node details joined into graph context. */\nexport interface RelationshipContextNodeDetails {\n /** Stable graph node identifier. */\n id: string;\n /** Optional display title. */\n title?: string;\n /** Optional lifecycle status. */\n status?: string;\n /** Optional evidence pointers such as files, tests, or history ids. */\n evidence?: readonly string[];\n}\n\n/** One selected graph-context node with explainable inclusion. */\nexport interface RelationshipContextNode extends RelationshipContextNodeDetails {\n /** Shortest bounded distance from the root. */\n distance: number;\n /** Concise deterministic reasons the node was selected. */\n reasons: string[];\n}\n\n/** Controls for bounded graph-context assembly. */\nexport interface RelationshipContextOptions {\n /** Traversal direction relative to each visited node. */\n direction?: RelationshipTraversalDirection;\n /** Optional registered kind filter. */\n kinds?: readonly string[];\n /** Maximum traversal depth. */\n maxDepth?: number;\n /** Maximum nodes returned in this page. */\n nodeLimit?: number;\n /** Maximum edges returned in this page. */\n edgeLimit?: number;\n /** Maximum estimated output tokens charged to rows and edges. */\n tokenBudget?: number;\n /** Opaque continuation from an equivalent query. */\n cursor?: string;\n /** Registry used to explain custom relationship semantics. */\n registry?: RelationshipKindRegistry;\n /** Abort signal checked during traversal. */\n signal?: AbortSignal;\n}\n\n/** Explainable graph context packet. */\nexport interface RelationshipContextResult {\n /** Root node details. */\n root: RelationshipContextNodeDetails;\n /** Bounded related-node page. */\n nodes: RelationshipContextNode[];\n /** Bounded edges whose endpoints are present in the packet. */\n edges: RelationshipEdge[];\n /** Root evidence pointers promoted for immediate consumption. */\n evidence: string[];\n /** Completeness, continuation, and cost envelope. */\n meta: {\n exact: true;\n truncated: boolean;\n nodeLimit: number;\n edgeLimit: number;\n tokenBudget: number;\n usedTokens: number;\n visitedNodes: number;\n inspectedEdges: number;\n omittedNodes: number;\n omittedEdges: number;\n nextCursor?: string;\n };\n}\n\ninterface DiscoveredNode {\n id: string;\n distance: number;\n}\n\nconst tokenEncoder = new TextEncoder();\n\nfunction positiveInteger(\n value: number | undefined,\n fallback: number,\n field: string,\n): number {\n const resolved = value ?? fallback;\n if (!Number.isInteger(resolved) || resolved < 1)\n throw new TypeError(`Relationship context ${field} must be positive`);\n return resolved;\n}\n\nfunction estimateTokens(value: unknown): number {\n return Math.max(\n 1,\n Math.ceil(tokenEncoder.encode(JSON.stringify(value)).byteLength / 4),\n );\n}\n\nfunction explainDirectEdge(\n edge: RelationshipEdge,\n root: string,\n node: string,\n registry: RelationshipKindRegistry,\n): string {\n const definition = registry.require(edge.kind);\n if (definition.ordering) {\n // Legacy and JSON-parsed definitions may predate explicit precedence.\n const sourceFirst =\n (definition.precedence ?? \"source_before_target\") ===\n \"source_before_target\";\n const before = sourceFirst ? edge.source : edge.target;\n return node === before ? \"prerequisite\" : \"dependent\";\n }\n if (definition.hierarchy) {\n // Legacy and JSON-parsed definitions may predate explicit hierarchy direction.\n const sourceIsParent =\n (definition.hierarchyDirection ?? \"source_parent\") === \"source_parent\";\n const parent = sourceIsParent ? edge.source : edge.target;\n return node === parent ? \"ancestor\" : \"descendant\";\n }\n if (edge.kind === \"discovered_from\" || edge.kind === \"incident_from\")\n return \"provenance\";\n return \"related\";\n}\n\nfunction directReasons(\n rootEdges: readonly RelationshipEdge[],\n root: string,\n node: string,\n registry: RelationshipKindRegistry,\n): string[] {\n const reasons = rootEdges\n .filter(\n (edge) =>\n (edge.source === root && edge.target === node) ||\n (edge.target === root && edge.source === node),\n )\n .map((edge) => explainDirectEdge(edge, root, node, registry));\n return [...new Set(reasons)].sort();\n}\n\nfunction discoverNodes(\n graph: RelationshipGraph,\n root: string,\n options: RelationshipContextOptions,\n): {\n rows: DiscoveredNode[];\n visitedNodes: number;\n inspectedEdges: number;\n depthTruncated: boolean;\n} {\n const direction = options.direction ?? \"both\";\n const maxDepth = options.maxDepth ?? 3;\n if (!Number.isInteger(maxDepth) || maxDepth < 0)\n throw new TypeError(\"Relationship context maxDepth must be non-negative\");\n const seen = new Set([root]);\n const queue = [{ id: root, distance: 0 }];\n const rows: DiscoveredNode[] = [];\n let inspectedEdges = 0;\n let depthTruncated = false;\n for (let index = 0; index < queue.length; index += 1) {\n options.signal?.throwIfAborted();\n const current = queue[index]!;\n if (current.distance >= maxDepth && depthTruncated) continue;\n const adjacent = graph.adjacency(current.id, {\n direction,\n kinds: options.kinds,\n signal: options.signal,\n });\n inspectedEdges += adjacent.meta.inspectedEdges;\n if (current.distance >= maxDepth) {\n if (adjacent.value.some((id) => !seen.has(id))) depthTruncated = true;\n continue;\n }\n for (const id of adjacent.value) {\n if (seen.has(id)) continue;\n seen.add(id);\n const row = { id, distance: current.distance + 1 };\n rows.push(row);\n queue.push(row);\n }\n }\n rows.sort(\n (left, right) =>\n left.distance - right.distance || left.id.localeCompare(right.id),\n );\n return {\n rows,\n visitedNodes: queue.length,\n inspectedEdges,\n depthTruncated,\n };\n}\n\nfunction selectContextNodes(params: {\n candidates: readonly DiscoveredNode[];\n details: ReadonlyMap<string, RelationshipContextNodeDetails>;\n graph: RelationshipGraph;\n rootId: string;\n registry: RelationshipKindRegistry;\n nodeLimit: number;\n tokenBudget: number;\n initialTokens: number;\n}): { nodes: RelationshipContextNode[]; usedTokens: number } {\n const nodes: RelationshipContextNode[] = [];\n let usedTokens = params.initialTokens;\n const rootEdges = params.graph.incidentEdges(params.rootId);\n for (const candidate of params.candidates) {\n if (nodes.length >= params.nodeLimit) break;\n const node: RelationshipContextNode = {\n ...(params.details.get(candidate.id) ?? { id: candidate.id }),\n distance: candidate.distance,\n reasons:\n candidate.distance === 1\n ? directReasons(\n rootEdges,\n params.rootId,\n candidate.id,\n params.registry,\n )\n : [`reachable at depth ${candidate.distance}`],\n };\n const cost = estimateTokens(node);\n if (usedTokens + cost > params.tokenBudget) break;\n nodes.push(node);\n usedTokens += cost;\n }\n if (params.candidates.length > 0 && nodes.length === 0)\n throw new TypeError(\"Relationship context tokenBudget cannot fit one node\");\n return { nodes, usedTokens };\n}\n\nfunction selectContextEdges(params: {\n graph: RelationshipGraph;\n included: ReadonlySet<string>;\n edgeLimit: number;\n tokenBudget: number;\n initialTokens: number;\n}): {\n edges: RelationshipEdge[];\n usedTokens: number;\n candidateCount: number;\n} {\n const candidates = params.graph\n .edges()\n .filter(\n (edge) =>\n params.included.has(edge.source) && params.included.has(edge.target),\n );\n const edges: RelationshipEdge[] = [];\n let usedTokens = params.initialTokens;\n for (const edge of candidates) {\n if (edges.length >= params.edgeLimit) break;\n const cost = estimateTokens(edge);\n if (usedTokens + cost > params.tokenBudget) break;\n edges.push(edge);\n usedTokens += cost;\n }\n return { edges, usedTokens, candidateCount: candidates.length };\n}\n\n/** Build one deterministic bounded graph-context packet with continuation. */\nexport function buildRelationshipContext(\n graph: RelationshipGraph,\n rootId: string,\n details: readonly RelationshipContextNodeDetails[],\n options: RelationshipContextOptions = {},\n): RelationshipContextResult {\n if (!graph.nodes().includes(rootId))\n throw new TypeError(`Relationship node not found: ${rootId}`);\n const nodeLimit = positiveInteger(options.nodeLimit, 20, \"nodeLimit\");\n const edgeLimit = positiveInteger(options.edgeLimit, 40, \"edgeLimit\");\n const tokenBudget = positiveInteger(options.tokenBudget, 1200, \"tokenBudget\");\n const registry = options.registry ?? createRelationshipKindRegistry();\n const byId = new Map(details.map((detail) => [detail.id, detail]));\n const rootDetails: RelationshipContextNodeDetails = byId.get(rootId) ?? {\n id: rootId,\n };\n const { evidence: rootEvidence = [], ...root } = rootDetails;\n const evidence = [...rootEvidence];\n const discovery = discoverNodes(graph, rootId, options);\n const fingerprint = createQueryFingerprint(\"relationship-context\", {\n rootId,\n direction: options.direction ?? \"both\",\n kinds: [...(options.kinds ?? [])].sort(),\n maxDepth: options.maxDepth ?? 3,\n });\n const pageStart = resolveQueryCursorStart(\n discovery.rows,\n options.cursor,\n fingerprint,\n ({ id }) => id,\n );\n const candidates = discovery.rows.slice(pageStart);\n const initialTokens = estimateTokens(root) + estimateTokens(evidence);\n if (initialTokens > tokenBudget)\n throw new TypeError(\n \"Relationship context tokenBudget cannot fit root and evidence\",\n );\n const nodeSelection = selectContextNodes({\n candidates,\n details: byId,\n graph,\n rootId,\n registry,\n nodeLimit,\n tokenBudget,\n initialTokens,\n });\n const { nodes } = nodeSelection;\n\n const included = new Set([rootId, ...nodes.map(({ id }) => id)]);\n const edgeSelection = selectContextEdges({\n graph,\n included,\n edgeLimit,\n tokenBudget,\n initialTokens: nodeSelection.usedTokens,\n });\n const { edges, usedTokens } = edgeSelection;\n\n const consumed = pageStart + nodes.length;\n const hasMoreNodes = consumed < discovery.rows.length;\n const lastNode = nodes.at(-1);\n const omittedEdges = edgeSelection.candidateCount - edges.length;\n const truncated =\n discovery.depthTruncated || hasMoreNodes || omittedEdges > 0;\n return {\n root,\n nodes,\n edges,\n evidence,\n meta: {\n exact: true,\n truncated,\n nodeLimit,\n edgeLimit,\n tokenBudget,\n usedTokens,\n visitedNodes: discovery.visitedNodes,\n inspectedEdges: discovery.inspectedEdges,\n omittedNodes: discovery.rows.length - consumed,\n omittedEdges,\n ...(hasMoreNodes && lastNode\n ? {\n nextCursor: encodeQueryCursor(\n fingerprint,\n lastNode.id,\n consumed - 1,\n ),\n }\n : {}),\n },\n };\n}\n", "/**\n * @module sdk/dependencies\n *\n * Implements the pm deps command surface and its agent-facing runtime behavior.\n */\nimport { getActiveExtensionRegistrations } from \"../core/extensions/index.js\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { resolveItemTypeRegistry } from \"../core/item/type-registry.js\";\nimport { isTerminalStatus } from \"../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry } from \"../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { listAllItemMetadataLight } from \"../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport type {\n Dependency,\n ItemMetadata,\n ItemStatus,\n ItemType,\n} from \"../types/index.js\";\nimport {\n buildRelationshipContext,\n type RelationshipContextResult,\n} from \"./relationship-context.js\";\nimport { RelationshipGraph } from \"./relationships.js\";\n\n/** Supported values accepted by the deps format contract. */\nexport const DEPS_FORMAT_VALUES = [\"tree\", \"graph\", \"context\"] as const;\n/** Restricts deps format values accepted by command, SDK, and storage contracts. */\nexport type DepsFormat = (typeof DEPS_FORMAT_VALUES)[number];\n/** Supported values accepted by the deps collapse contract. */\nexport const DEPS_COLLAPSE_VALUES = [\"none\", \"repeated\"] as const;\n/** Restricts deps collapse mode values accepted by command, SDK, and storage contracts. */\nexport type DepsCollapseMode = (typeof DEPS_COLLAPSE_VALUES)[number];\n\n/** Documents the deps command options payload exchanged by command, SDK, and package integrations. */\nexport interface DepsCommandOptions {\n /** Value that configures or reports format for this contract. */\n format?: string;\n /** Value that configures or reports max depth for this contract. */\n maxDepth?: string | number;\n /** Value that configures or reports collapse for this contract. */\n collapse?: string;\n /** Value that configures or reports summary for this contract. */\n summary?: boolean;\n /** Maximum graph-context nodes returned. */\n nodeLimit?: string | number;\n /** Maximum graph-context edges returned. */\n edgeLimit?: string | number;\n /** Maximum estimated graph-context output tokens. */\n tokenBudget?: string | number;\n /** Opaque continuation cursor for graph-context output. */\n cursor?: string;\n}\n\ninterface IndexedItem {\n id: string;\n title: string;\n type: ItemType;\n status: ItemStatus;\n dependencies: IndexedDependency[];\n}\n\ninterface IndexedDependency {\n id: string;\n kind: string;\n}\n\n/** Minimal item shape inspected by dependency-reference governance. */\nexport interface DependencyReferenceHolder {\n /** Stable item identifier. */\n id: string;\n /** Lifecycle status used to separate actionable work from historical debt. */\n status: ItemStatus;\n /** Optional hierarchy parent reference. */\n parent?: string;\n /** Optional legacy scalar blocker reference. */\n blocked_by?: string;\n /** Structured dependency edges. */\n dependencies?: Dependency[];\n}\n\n/** Storage surface that contributed a normalized dependency reference. */\nexport type DependencyReferenceSource = \"parent\" | \"blocked_by\" | \"dependency\";\n\n/** One normalized dependency reference whose target is absent from the tracker. */\nexport interface DanglingDependencyReference {\n /** Item that owns the reference. */\n holder_id: string;\n /** Missing referenced item id or legacy sentinel. */\n target_id: string;\n /** Relationship field or dependency kind. */\n kind: string;\n /** Storage surface that owns the reference and determines its remediation. */\n source: DependencyReferenceSource;\n /** Current lifecycle status of the holder. */\n holder_status: ItemStatus;\n /** Whether the holder is terminal and therefore historical, non-actionable debt. */\n legacy_terminal: boolean;\n /** Whether the target is the pre-structured-dependency `no-active-blocker` sentinel. */\n no_active_blocker_sentinel: boolean;\n}\n\n/** Actionable and historical partitions returned by dependency-reference governance. */\nexport interface DanglingDependencyReferenceSummary {\n /** Missing references held by active items; these may affect scheduling and should gate validation. */\n active: DanglingDependencyReference[];\n /** Missing references held only by terminal items; retained as informational history debt. */\n legacy_terminal: DanglingDependencyReference[];\n /** Legacy sentinel rows across active and terminal holders, called out separately from typo-like ids. */\n no_active_blocker_sentinels: DanglingDependencyReference[];\n}\n\n/** Normalize a decoded reference target and reject empty legacy placeholders. */\nfunction normalizeDependencyReferenceTarget(target: unknown): string | undefined {\n if (typeof target !== \"string\") return undefined;\n const normalized = target.trim();\n if (!normalized || [\"none\", \"null\", \"n/a\", \"na\"].includes(normalized.toLowerCase())) return undefined;\n return normalized;\n}\n\n/** Normalize a graph target while removing the historical no-blocker marker. */\nfunction normalizeDependencyGraphTarget(target: unknown): string | undefined {\n const normalized = normalizeDependencyReferenceTarget(target);\n return normalized?.toLowerCase() === \"no-active-blocker\" ? undefined : normalized;\n}\n\n/**\n * Classify missing hierarchy and dependency targets without mutating their holders.\n *\n * Consumers provide the workspace's terminal-status predicate so custom lifecycle\n * schemas receive the same active-versus-historical behavior as the built-in\n * closed/canceled statuses.\n */\nexport function collectDanglingDependencyReferences(\n items: readonly DependencyReferenceHolder[],\n isTerminal: (status: ItemStatus) => boolean = (status) =>\n status === \"closed\" || status === \"canceled\",\n): DanglingDependencyReferenceSummary {\n const knownIds = new Set(items.map((item) => item.id.trim().toLowerCase()));\n const rows = new Map<string, DanglingDependencyReference>();\n const addReference = (\n item: DependencyReferenceHolder,\n target: unknown,\n kind: string,\n source: DependencyReferenceSource,\n ): void => {\n const normalized = normalizeDependencyReferenceTarget(target);\n if (!normalized || knownIds.has(normalized.toLowerCase())) {\n return;\n }\n const row: DanglingDependencyReference = {\n holder_id: item.id,\n target_id: normalized,\n kind,\n source,\n holder_status: item.status,\n legacy_terminal: isTerminal(item.status),\n no_active_blocker_sentinel:\n normalized.toLowerCase() === \"no-active-blocker\",\n };\n rows.set(\n `${row.holder_id}::${row.target_id}::${row.kind}::${row.source}`,\n row,\n );\n };\n for (const item of items) {\n addReference(item, item.parent, \"parent\", \"parent\");\n addReference(item, item.blocked_by, \"blocked_by\", \"blocked_by\");\n for (const dependency of item.dependencies ?? []) {\n // Public SDK callers may supply legacy or JSON-decoded payloads that do\n // not yet satisfy the current structured dependency contract.\n if (typeof dependency !== \"object\" || dependency === null) {\n continue;\n }\n const legacyDependency = dependency as Partial<Dependency>;\n addReference(\n item,\n legacyDependency.id,\n typeof legacyDependency.kind === \"string\"\n ? legacyDependency.kind\n : \"related\",\n \"dependency\",\n );\n }\n }\n const sorted = [...rows.values()].sort(\n (left, right) =>\n left.holder_id.localeCompare(right.holder_id) ||\n left.target_id.localeCompare(right.target_id) ||\n left.kind.localeCompare(right.kind) ||\n left.source.localeCompare(right.source),\n );\n const legacyTerminal = sorted.filter((row) => row.legacy_terminal);\n return {\n active: sorted.filter((row) => !row.legacy_terminal),\n legacy_terminal: legacyTerminal,\n no_active_blocker_sentinels: sorted.filter(\n (row) => row.no_active_blocker_sentinel,\n ),\n };\n}\n\n/** Return unique real missing targets while excluding the legacy no-blocker sentinel. */\nfunction collectMissingDependencyTargetIds(\n dangling: DanglingDependencyReferenceSummary,\n): string[] {\n const targets = new Map<string, string>();\n for (const reference of [...dangling.active, ...dangling.legacy_terminal]) {\n if (reference.no_active_blocker_sentinel) continue;\n const target = reference.target_id.trim();\n const key = target.toLowerCase();\n if (!targets.has(key)) targets.set(key, target);\n }\n return [...targets.values()].sort((left, right) => left.localeCompare(right));\n}\n\n/** Documents the deps tree node payload exchanged by command, SDK, and package integrations. */\nexport interface DepsTreeNode {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Value that configures or reports title for this contract. */\n title?: string;\n /** Schema type that determines the shape and validation rules for this value. */\n type?: ItemType;\n /** Lifecycle state reported for status. */\n status?: ItemStatus;\n /** Value that configures or reports via for this contract. */\n via?: string;\n /** Value that configures or reports missing for this contract. */\n missing: boolean;\n /** Value that configures or reports cycle for this contract. */\n cycle: boolean;\n /** Value that configures or reports truncated for this contract. */\n truncated?: boolean;\n /** Value that configures or reports collapsed for this contract. */\n collapsed?: boolean;\n /** Value that configures or reports dependencies for this contract. */\n dependencies: DepsTreeNode[];\n}\n\n/** Documents the deps graph node payload exchanged by command, SDK, and package integrations. */\nexport interface DepsGraphNode {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Value that configures or reports title for this contract. */\n title?: string;\n /** Schema type that determines the shape and validation rules for this value. */\n type?: ItemType;\n /** Lifecycle state reported for status. */\n status?: ItemStatus;\n /** Value that configures or reports missing for this contract. */\n missing: boolean;\n}\n\n/** Documents the deps graph edge payload exchanged by command, SDK, and package integrations. */\nexport interface DepsGraphEdge {\n /** Value that configures or reports from for this contract. */\n from: string;\n /** Value that configures or reports to for this contract. */\n to: string;\n /** Value that configures or reports kind for this contract. */\n kind: string;\n}\n\n/** Documents the deps graph result payload exchanged by command, SDK, and package integrations. */\nexport interface DepsGraphResult {\n /** Value that configures or reports root id for this contract. */\n root_id: string;\n /** Value that configures or reports nodes for this contract. */\n nodes: DepsGraphNode[];\n /** Value that configures or reports edges for this contract. */\n edges: DepsGraphEdge[];\n /** Value that configures or reports missing ids for this contract. */\n missing_ids: string[];\n}\n\n/** Documents the deps result payload exchanged by command, SDK, and package integrations. */\nexport interface DepsResult {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Value that configures or reports format for this contract. */\n format: DepsFormat;\n /** Number of node entries represented by this result. */\n node_count: number;\n /** Number of edge entries represented by this result. */\n edge_count: number;\n /** Number of missing entries represented by this result. */\n missing_count: number;\n /** Value that configures or reports tree for this contract. */\n tree?: DepsTreeNode;\n /** Value that configures or reports graph for this contract. */\n graph?: DepsGraphResult;\n /** Explainable bounded graph-context projection. */\n context?: RelationshipContextResult;\n}\n\nfunction parseFormat(raw: string | undefined): DepsFormat {\n const candidate = raw?.trim().toLowerCase() ?? \"tree\";\n if ((DEPS_FORMAT_VALUES as readonly string[]).includes(candidate)) {\n return candidate as DepsFormat;\n }\n throw new PmCliError(\n `Invalid --format value \"${raw}\". Use \"tree\", \"graph\", or \"context\".`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction parsePositiveInteger(raw: string | number | undefined, flag: string): number | undefined {\n if (raw === undefined) return undefined;\n const value = typeof raw === \"number\" ? raw : Number(raw.trim());\n if (!Number.isInteger(value) || value < 1)\n throw new PmCliError(`Invalid --${flag} value \"${raw}\". Use a positive integer.`, EXIT_CODE.USAGE);\n return value;\n}\n\nfunction parseMaxDepth(raw: string | number | undefined): number | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = typeof raw === \"number\" ? raw : Number(raw.trim());\n if (!Number.isInteger(normalized) || normalized < 0) {\n throw new PmCliError(\n `Invalid --max-depth value \"${raw}\". Use a non-negative integer.`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized;\n}\n\nfunction parseCollapse(raw: string | undefined): DepsCollapseMode {\n const candidate = raw?.trim().toLowerCase() ?? \"none\";\n if ((DEPS_COLLAPSE_VALUES as readonly string[]).includes(candidate)) {\n return candidate as DepsCollapseMode;\n }\n throw new PmCliError(\n `Invalid --collapse value \"${raw}\". Use \"none\" or \"repeated\".`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction normalizeDependencies(\n dependencies: Dependency[] | undefined,\n): IndexedDependency[] {\n if (!dependencies || dependencies.length === 0) {\n return [];\n }\n const sorted = dependencies.map(({ id, kind }) => ({\n id: id.trim(),\n kind: kind.trim().toLowerCase(),\n })).sort((left, right) => {\n const byKind = left.kind.localeCompare(right.kind);\n if (byKind !== 0) return byKind;\n return left.id.localeCompare(right.id);\n });\n const deduped = new Map<string, IndexedDependency>();\n for (const dependency of sorted) {\n const key = `${dependency.kind.toLowerCase()}::${dependency.id.toLowerCase()}`;\n if (!deduped.has(key)) {\n deduped.set(key, { id: dependency.id, kind: dependency.kind });\n }\n }\n return [...deduped.values()];\n}\n\nfunction toIndexedItem(item: ItemMetadata): IndexedItem {\n return {\n id: item.id,\n title: item.title,\n type: item.type,\n status: item.status,\n dependencies: normalizeDependencies(item.dependencies),\n };\n}\n\nfunction toTreeNode(\n id: string,\n index: Map<string, IndexedItem>,\n lineage: Set<string>,\n maxDepth: number | undefined,\n collapse: DepsCollapseMode,\n expanded: Set<string>,\n depth = 0,\n via?: string,\n): DepsTreeNode {\n const lookupId = id.trim().toLowerCase();\n const item = index.get(lookupId);\n const baseNode: DepsTreeNode = {\n id: item?.id ?? id,\n title: item?.title,\n type: item?.type,\n status: item?.status,\n via,\n missing: !item,\n cycle: lineage.has(lookupId),\n dependencies: [],\n };\n if (!item || baseNode.cycle) {\n return baseNode;\n }\n if (maxDepth !== undefined && depth >= maxDepth) {\n if (item.dependencies.length > 0) {\n baseNode.truncated = true;\n }\n return baseNode;\n }\n if (collapse === \"repeated\" && expanded.has(lookupId)) {\n baseNode.collapsed = true;\n return baseNode;\n }\n if (collapse === \"repeated\") {\n expanded.add(lookupId);\n }\n const nextLineage = new Set(lineage);\n nextLineage.add(lookupId);\n baseNode.dependencies = item.dependencies.map((dependency) =>\n toTreeNode(\n dependency.id,\n index,\n nextLineage,\n maxDepth,\n collapse,\n expanded,\n depth + 1,\n dependency.kind,\n ),\n );\n return baseNode;\n}\n\nfunction mergeGraphNode(\n existing: DepsGraphNode | undefined,\n candidate: DepsGraphNode,\n): DepsGraphNode {\n if (!existing) {\n return candidate;\n }\n /* c8 ignore start -- defensive: mixed missing/non-missing duplicates only occur in malformed synthetic trees. */\n if (existing.missing && !candidate.missing) return candidate;\n /* c8 ignore stop */\n return {\n ...existing,\n title: existing.title ?? candidate.title,\n type: existing.type ?? candidate.type,\n status: existing.status ?? candidate.status,\n };\n}\n\nfunction toGraph(root: DepsTreeNode): DepsGraphResult {\n const nodesById = new Map<string, DepsGraphNode>();\n const edgesByKey = new Map<string, DepsGraphEdge>();\n\n const visit = (node: DepsTreeNode): void => {\n nodesById.set(\n node.id,\n mergeGraphNode(nodesById.get(node.id), {\n id: node.id,\n title: node.title,\n type: node.type,\n status: node.status,\n missing: node.missing,\n }),\n );\n for (const child of node.dependencies) {\n nodesById.set(\n child.id,\n mergeGraphNode(nodesById.get(child.id), {\n id: child.id,\n title: child.title,\n type: child.type,\n status: child.status,\n missing: child.missing,\n }),\n );\n /* c8 ignore start -- legacy malformed dependency payloads may omit kind/via. */\n const relationKind = child.via ?? \"related\";\n const edgeKey = `${node.id}::${child.id}::${relationKind}`;\n if (!edgesByKey.has(edgeKey)) {\n edgesByKey.set(edgeKey, {\n from: node.id,\n to: child.id,\n kind: relationKind,\n });\n }\n /* c8 ignore stop */\n if (!child.cycle) {\n visit(child);\n }\n }\n };\n\n visit(root);\n\n const nodes = [...nodesById.values()].sort((left, right) =>\n left.id.localeCompare(right.id),\n );\n const edges = [...edgesByKey.values()].sort((left, right) => {\n const byFrom = left.from.localeCompare(right.from);\n if (byFrom !== 0) return byFrom;\n const byTo = left.to.localeCompare(right.to);\n if (byTo !== 0) return byTo;\n return left.kind.localeCompare(right.kind);\n });\n const missingIds = nodes\n .filter((node) => node.missing)\n .map((node) => node.id);\n return {\n root_id: root.id,\n nodes,\n edges,\n missing_ids: missingIds,\n };\n}\n\n/** Count a dependency result without allocating its potentially exponential tree payload. */\nfunction countDependencyGraph(\n rootId: string,\n index: Map<string, IndexedItem>,\n maxDepth: number | undefined,\n): Pick<DepsResult, \"node_count\" | \"edge_count\" | \"missing_count\"> {\n const nodeIds = new Set<string>();\n const edgeKeys = new Set<string>();\n const missingIds = new Set<string>();\n const expanded = new Set<string>();\n const pending = [{ id: rootId, depth: 0 }];\n let pendingIndex = 0;\n while (pendingIndex < pending.length) {\n const current = pending[pendingIndex++]!;\n const lookupId = current.id.trim().toLowerCase();\n nodeIds.add(lookupId);\n const item = index.get(lookupId);\n if (!item) {\n missingIds.add(lookupId);\n continue;\n }\n if (maxDepth !== undefined && current.depth >= maxDepth) {\n continue;\n }\n if (expanded.has(lookupId)) {\n continue;\n }\n expanded.add(lookupId);\n for (const dependency of item.dependencies) {\n edgeKeys.add(\n `${lookupId}::${dependency.id.trim().toLowerCase()}::${dependency.kind}`,\n );\n pending.push({ id: dependency.id, depth: current.depth + 1 });\n }\n }\n return {\n node_count: nodeIds.size,\n edge_count: edgeKeys.size,\n missing_count: missingIds.size,\n };\n}\n\n/** Build the SDK-backed bounded relationship-context projection for deps. */\nexport function buildDepsRelationshipContext(\n rootId: string,\n items: readonly ItemMetadata[],\n options: Pick<DepsCommandOptions, \"maxDepth\" | \"nodeLimit\" | \"edgeLimit\" | \"tokenBudget\" | \"cursor\">,\n): RelationshipContextResult {\n const maxDepth = parseMaxDepth(options.maxDepth);\n const nodeLimit = parsePositiveInteger(options.nodeLimit, \"node-limit\");\n const edgeLimit = parsePositiveInteger(options.edgeLimit, \"edge-limit\");\n const tokenBudget = parsePositiveInteger(options.tokenBudget, \"token-budget\");\n const canonicalIds = new Map(items.map((item) => [item.id.trim().toLowerCase(), item.id.trim()]));\n const dangling = collectDanglingDependencyReferences(items);\n const missingIds = collectMissingDependencyTargetIds(dangling);\n const graphItems = items.map((item) => {\n const parent = normalizeDependencyGraphTarget(item.parent);\n const blocker = normalizeDependencyGraphTarget(item.blocked_by);\n const dependencies = (item.dependencies ?? []).flatMap((rawDependency) => {\n if (typeof rawDependency !== \"object\" || rawDependency === null) return [];\n const dependency = rawDependency as Partial<Dependency>;\n const target = normalizeDependencyGraphTarget(dependency.id);\n if (!target) return [];\n return [{\n id: canonicalIds.get(target.toLowerCase()) ?? target,\n kind: typeof dependency.kind === \"string\" ? dependency.kind : \"related\",\n }];\n });\n return {\n id: item.id,\n ...(parent ? { parent: canonicalIds.get(parent.toLowerCase()) ?? parent } : {}),\n ...(blocker ? { blocked_by: canonicalIds.get(blocker.toLowerCase()) ?? blocker } : {}),\n dependencies,\n };\n });\n return buildRelationshipContext(\n RelationshipGraph.fromItems([...graphItems, ...missingIds.map((id) => ({ id }))]),\n rootId,\n [\n ...items.map((item) => ({ id: item.id, title: item.title, status: item.status })),\n ...missingIds.map((id) => ({ id, title: `[missing] ${id}`, status: \"missing\" })),\n ],\n {\n ...(maxDepth === undefined ? {} : { maxDepth }),\n ...(nodeLimit === undefined ? {} : { nodeLimit }),\n ...(edgeLimit === undefined ? {} : { edgeLimit }),\n ...(tokenBudget === undefined ? {} : { tokenBudget }),\n ...(options.cursor?.trim() ? { cursor: options.cursor.trim() } : {}),\n },\n );\n}\n\n/** Implements run deps for the public runtime surface of this module. */\nexport async function runDeps(\n id: string,\n options: DepsCommandOptions,\n global: GlobalOptions,\n): Promise<DepsResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n const format = parseFormat(options.format);\n const maxDepth = parseMaxDepth(options.maxDepth);\n const collapse = parseCollapse(options.collapse);\n const summaryOnly = options.summary === true;\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(\n settings,\n getActiveExtensionRegistrations(),\n );\n const items = await listAllItemMetadataLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const index = new Map(\n items.map((item) => [item.id.trim().toLowerCase(), toIndexedItem(item)]),\n );\n const dangling = collectDanglingDependencyReferences(\n items,\n (status) => isTerminalStatus(status, statusRegistry),\n );\n for (const reference of [...dangling.active, ...dangling.legacy_terminal]) {\n const holder = index.get(reference.holder_id.trim().toLowerCase());\n const referenceKind = reference.kind.trim().toLowerCase();\n if (\n holder &&\n !holder.dependencies.some(\n (dependency) =>\n dependency.id.trim().toLowerCase() === reference.target_id.trim().toLowerCase() &&\n dependency.kind === referenceKind,\n )\n ) {\n holder.dependencies.push({ id: reference.target_id, kind: referenceKind });\n }\n }\n if (!index.has(id.trim().toLowerCase())) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n\n if (format === \"context\") {\n const canonicalId = index.get(id.trim().toLowerCase())!.id;\n const context = buildDepsRelationshipContext(canonicalId, items, options);\n return {\n id: canonicalId,\n format,\n node_count: context.nodes.length + 1,\n edge_count: context.edges.length,\n missing_count: collectMissingDependencyTargetIds(dangling).length,\n ...(summaryOnly ? {} : { context }),\n };\n }\n\n if (summaryOnly) {\n return {\n id,\n format,\n ...countDependencyGraph(id, index, maxDepth),\n };\n }\n\n const tree = toTreeNode(\n id,\n index,\n new Set<string>(),\n maxDepth,\n collapse,\n new Set<string>(),\n );\n const graph = toGraph(tree);\n const baseResult = {\n id,\n format,\n node_count: graph.nodes.length,\n edge_count: graph.edges.length,\n missing_count: graph.missing_ids.length,\n };\n if (format === \"tree\") {\n return {\n ...baseResult,\n tree,\n };\n }\n return {\n ...baseResult,\n graph,\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,IAAM,6BAAoE;EACxE;IACE,MAAM;IACN,WAAW;IACX,SAAS;IACT,UAAU;IACV,YAAY;IACZ,WAAW;IACX,UAAU;IACV,UAAU;IACV,WAAW;IACX,SAAS,CAAC,YAAY;IACtB,sBAAsB;IACtB,WAAW;;EAEb;IACE,MAAM;IACN,WAAW;IACX,SAAS;IACT,UAAU;IACV,YAAY;IACZ,WAAW;IACX,UAAU;IACV,UAAU;IACV,WAAW;IACX,sBAAsB;IACtB,WAAW;;EAEb;IACE,MAAM;IACN,WAAW;IACX,SAAS;IACT,UAAU;IACV,WAAW;IACX,oBAAoB;IACpB,UAAU;IACV,UAAU;IACV,WAAW;IACX,SAAS,CAAC,YAAY,MAAM;IAC5B,sBAAsB;IACtB,WAAW;;EAEb;IACE,MAAM;IACN,WAAW;IACX,SAAS;IACT,UAAU;IACV,WAAW;IACX,oBAAoB;IACpB,UAAU;IACV,UAAU;IACV,WAAW;IACX,SAAS,CAAC,gBAAgB,MAAM;IAChC,sBAAsB;IACtB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ACnB,CAAC,eACC,WAAW,GAAG,KAAI,EAAG,YAAW,MAAO,UAAU,UAAU,KAAI,EAAG,YAAW,KAC7E,WAAW,SAAS,aAAa,GAErC;AACA,aAAO,aAAa,KAAK,EAAE,IAAI,UAAU,WAAW,MAAM,cAAa,CAAE;IAC3E;EACF;AACA,MAAI,CAAC,MAAM,IAAI,GAAG,KAAI,EAAG,YAAW,CAAE,GAAG;AACvC,UAAM,IAAI,WAAW,QAAQ,EAAE,cAAc,UAAU,SAAS;EAClE;AAEA,MAAI,WAAW,WAAW;AACxB,UAAM,cAAc,MAAM,IAAI,GAAG,KAAI,EAAG,YAAW,CAAE,EAAG;AACxD,UAAM,UAAU,6BAA6B,aAAa,OAAO,OAAO;AACxE,WAAO;MACL,IAAI;MACJ;MACA,YAAY,QAAQ,MAAM,SAAS;MACnC,YAAY,QAAQ,MAAM;MAC1B,eAAe,kCAAkC,QAAQ,EAAE;MAC3D,GAAI,cAAc,CAAA,IAAK,EAAE,QAAO;;EAEpC;AAEA,MAAI,aAAa;AACf,WAAO;MACL;MACA;MACA,GAAG,qBAAqB,IAAI,OAAO,QAAQ;;EAE/C;AAEA,QAAM,OAAO,WACX,IACA,OACA,oBAAI,IAAG,GACP,UACA,UACA,oBAAI,IAAG,CAAU;AAEnB,QAAM,QAAQ,QAAQ,IAAI;AAC1B,QAAM,aAAa;IACjB;IACA;IACA,YAAY,MAAM,MAAM;IACxB,YAAY,MAAM,MAAM;IACxB,eAAe,MAAM,YAAY;;AAEnC,MAAI,WAAW,QAAQ;AACrB,WAAO;MACL,GAAG;MACH;;EAEJ;AACA,SAAO;IACL,GAAG;IACH;;AAEJ;",
|
|
6
|
+
"names": ["global"]
|
|
7
|
+
}
|
|
@@ -6003,7 +6003,7 @@ function statusIsTerminal(status, registry) {
|
|
|
6003
6003
|
!(function() {
|
|
6004
6004
|
try {
|
|
6005
6005
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
6006
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
6006
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c6a1b360-921c-5a84-b085-4c4e772c3b82");
|
|
6007
6007
|
} catch (e2) {
|
|
6008
6008
|
}
|
|
6009
6009
|
})();
|
|
@@ -6416,4 +6416,4 @@ export {
|
|
|
6416
6416
|
parseRegisteredItemFieldAssignments,
|
|
6417
6417
|
applyRegisteredItemFieldDefaultsAndValidation
|
|
6418
6418
|
};
|
|
6419
|
-
//# sourceMappingURL=chunk-
|
|
6419
|
+
//# sourceMappingURL=chunk-BSEQUTQP.js.map
|