@unbrained/pm-cli 2026.6.16 → 2026.6.17
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/CHANGELOG.md +18 -0
- package/dist/cli/commands/completion.js +96 -10
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/create.d.ts +2 -0
- package/dist/cli/commands/create.js +34 -13
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +2 -1
- package/dist/cli/commands/init.js +14 -61
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/lifecycle-transitions.d.ts +23 -0
- package/dist/cli/commands/lifecycle-transitions.js +41 -0
- package/dist/cli/commands/lifecycle-transitions.js.map +1 -0
- package/dist/cli/commands/linked-artifacts.d.ts +5 -0
- package/dist/cli/commands/linked-artifacts.js +18 -4
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/recurrence-parsers.d.ts +9 -0
- package/dist/cli/commands/recurrence-parsers.js +19 -2
- package/dist/cli/commands/recurrence-parsers.js.map +1 -1
- package/dist/cli/commands/repeatable-metadata-parsers.js +28 -4
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
- package/dist/cli/commands/scheduling-shortcuts.d.ts +43 -0
- package/dist/cli/commands/scheduling-shortcuts.js +87 -0
- package/dist/cli/commands/scheduling-shortcuts.js.map +1 -0
- package/dist/cli/commands/schema.d.ts +134 -2
- package/dist/cli/commands/schema.js +482 -3
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/update.js +19 -5
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/help-content.js +26 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.d.ts +19 -0
- package/dist/cli/main.js +40 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-mutation.js +168 -62
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +103 -2
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-PZYSZA26.js +18 -0
- package/dist/cli-bundle/chunks/{activity-MJGTX4LO.js → activity-SFM4THAU.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-OUGCDFNC.js → aggregate-Y5ADDKBM.js} +10 -10
- package/dist/cli-bundle/chunks/{aggregate-MH3GROKB.js → aggregate-YTAUQLRW.js} +10 -10
- package/dist/cli-bundle/chunks/{append-VCRUG2W6.js → append-4M7OVV7M.js} +8 -8
- package/dist/cli-bundle/chunks/{append-2Q4BPUBW.js → append-HSPK4L4V.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-F2GC6L3N.js → chunk-26BM6YLO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ILHLIA47.js → chunk-2C6FU3D3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-B5Q7XC4K.js → chunk-2OPYLXDO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CBMETQ2U.js → chunk-2S46FKLB.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-MJZUZ2QE.js → chunk-2TMKMTEI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-M23HXJL3.js → chunk-2VH7DFSJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BJWTFOZM.js → chunk-3ENF4NO4.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-7EILPFMA.js → chunk-3GR2HTYY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-764O7EUA.js → chunk-3R3FYCBV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-G3CEIXTV.js → chunk-3UKJX3RP.js} +27 -15
- package/dist/cli-bundle/chunks/chunk-3UKJX3RP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js +83 -0
- package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4VLB4JH2.js → chunk-5FDYWOJT.js} +4 -3
- package/dist/cli-bundle/chunks/{chunk-WZCQVABQ.js → chunk-5XGWFUW2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-667XI4UJ.js → chunk-6BD77FGL.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-KZYVTOG5.js → chunk-6HF6CIY2.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-XLNNCKTN.js → chunk-6PBPD4MN.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-Z3MUNQRV.js → chunk-6VFUEGOA.js} +4 -3
- package/dist/cli-bundle/chunks/{chunk-HDIDUME4.js → chunk-AAOXSPAE.js} +19 -67
- package/dist/cli-bundle/chunks/chunk-AAOXSPAE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-O46LTCXQ.js → chunk-AJCQ5GT6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7ZGKNHUL.js → chunk-ALTGYHN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PZD7WPUC.js → chunk-AOJQL33L.js} +28 -16
- package/dist/cli-bundle/chunks/chunk-AOJQL33L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SY4PZWIZ.js → chunk-AXLDUGXA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YGRPBFMA.js → chunk-BITCVGHT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UUKORJSN.js → chunk-CGQTFWYI.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LV5FFQ7M.js → chunk-CHM2VFVL.js} +3 -1
- package/dist/cli-bundle/chunks/{chunk-7AGIXLNK.js → chunk-COVLE33A.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SY4GKIWT.js → chunk-DDNBWH4W.js} +91 -20
- package/dist/cli-bundle/chunks/chunk-DDNBWH4W.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2JEGCDYT.js → chunk-F5MSD5HE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NIQHNDBZ.js → chunk-FAXB6F6R.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-7K2MXFMX.js → chunk-FPDK5BZQ.js} +15 -14
- package/dist/cli-bundle/chunks/chunk-FPDK5BZQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3XOXWOGA.js → chunk-FPY2TOFI.js} +125 -9
- package/dist/cli-bundle/chunks/chunk-FPY2TOFI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TIRZIQRP.js → chunk-G2MOUCTU.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-F7WSO5UX.js → chunk-G57RHEGP.js} +33 -4
- package/dist/cli-bundle/chunks/chunk-G57RHEGP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GAVE4MYM.js → chunk-IROHIK2T.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZJRDVYZI.js → chunk-JZHL4E3Q.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-4KBK4BA3.js → chunk-KA22USXD.js} +14 -13
- package/dist/cli-bundle/chunks/chunk-KA22USXD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KQ3LAMDO.js → chunk-KBC4O7SY.js} +18 -66
- package/dist/cli-bundle/chunks/chunk-KBC4O7SY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UBMCSJXX.js → chunk-KCAGIH6K.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-656HPQPO.js → chunk-KO3VM5GS.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-OY3P2I6B.js → chunk-LNH5Q32E.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GQ4JKNMV.js → chunk-LORM3M2I.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OCTQJP42.js → chunk-M4AVU7VC.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-3WAULYOY.js → chunk-MIBX6ZRN.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FXNT5LPX.js → chunk-MMF2E3FM.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-AERT7KT3.js → chunk-MORZOR7W.js} +21 -8
- package/dist/cli-bundle/chunks/chunk-MORZOR7W.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IMQG4VR3.js → chunk-MUTUZ2HD.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-7L5VOUYP.js → chunk-OGXEBTX3.js} +32 -3
- package/dist/cli-bundle/chunks/{chunk-7L5VOUYP.js.map → chunk-OGXEBTX3.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NCIBNERT.js → chunk-OOIH6J5T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-II7OGE3V.js → chunk-OSBJPPX3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HPELHUTG.js → chunk-PJS3WDO2.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-6NQXMGYU.js → chunk-QGPE2H6Z.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-ASM4DVRW.js → chunk-QVTFFLR2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FTAZLAR7.js → chunk-QW2F6ARZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A576QZDL.js → chunk-QXC3LWB7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6BV7ENQL.js → chunk-QXMXRPX5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SPYPC5CB.js → chunk-R4AKUPKI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UAR2VNCK.js → chunk-RASR23HV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YXTLI4XP.js → chunk-SCDCNGCV.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-2IUJBMKS.js → chunk-SCS5PVAA.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-KTVETP66.js → chunk-SJCMTOEU.js} +3 -1
- package/dist/cli-bundle/chunks/{chunk-L6FJPOT4.js → chunk-SO2ES46D.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-GYMG7AG6.js → chunk-TBV33CB4.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js +86 -0
- package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OLTYNVJR.js → chunk-TWBDDVIF.js} +20 -7
- package/dist/cli-bundle/chunks/chunk-TWBDDVIF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XNOY7TCB.js → chunk-UGUJ2UOR.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-E6J2PEK6.js → chunk-UN6P3IJ4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZONXMSVB.js → chunk-V2GYOMEX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T5VU7ROQ.js → chunk-VF3KQGNY.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RKKIH2ZQ.js → chunk-VHG6LUKR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-H6EH6ENJ.js → chunk-VXHMQDXA.js} +126 -10
- package/dist/cli-bundle/chunks/chunk-VXHMQDXA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-G2YVUY7I.js → chunk-VXRFAE7W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q5RLUCP3.js → chunk-WQRL4COW.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-IQVB3YDD.js → chunk-XESAPVZ4.js} +99 -21
- package/dist/cli-bundle/chunks/chunk-XESAPVZ4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TUB3DZAZ.js → chunk-YLAW3FZN.js} +5 -5
- package/dist/cli-bundle/chunks/{claim-NEO7AGWH.js → claim-WGAWJCPY.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-4APLUXJW.js → claim-ZI6P4LMU.js} +10 -10
- package/dist/cli-bundle/chunks/close-I7PRQ5G7.js +13 -0
- package/dist/cli-bundle/chunks/{close-3QABBNGU.js → close-JMVVSIQE.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-MIZLTYGL.js → close-many-IKPJXVOZ.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-Q7Y5AHQI.js → close-many-TXABDCSJ.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-DAIQPOMU.js → comments-RLWR2S7W.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-IWFSVM4P.js → comments-YAMXKHUX.js} +10 -10
- package/dist/cli-bundle/chunks/{config-PXTMAYV3.js → config-7ICYC2WU.js} +47 -9
- package/dist/cli-bundle/chunks/config-7ICYC2WU.js.map +7 -0
- package/dist/cli-bundle/chunks/{config-IOJELD6O.js → config-NGWN3EXC.js} +48 -10
- package/dist/cli-bundle/chunks/config-NGWN3EXC.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-QHJSCJW4.js → context-K6QAHN5H.js} +13 -13
- package/dist/cli-bundle/chunks/{context-XZS2VFKU.js → context-VGXOOAH2.js} +13 -13
- package/dist/cli-bundle/chunks/{contracts-B7U4OJTV.js → contracts-KJGY2AQA.js} +51 -11
- package/dist/cli-bundle/chunks/contracts-KJGY2AQA.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-NSBVLXQ3.js → contracts-KMA6OJY7.js} +50 -10
- package/dist/cli-bundle/chunks/{contracts-B7U4OJTV.js.map → contracts-KMA6OJY7.js.map} +7 -1
- package/dist/cli-bundle/chunks/{copy-Q64T5FD4.js → copy-Q2PPU4AY.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-SG34LCMU.js → copy-SC6UF3PI.js} +7 -7
- package/dist/cli-bundle/chunks/{create-IPAX2SNL.js → create-76FE7JVF.js} +14 -14
- package/dist/cli-bundle/chunks/create-RTRFW6RE.js +30 -0
- package/dist/cli-bundle/chunks/{delete-VH3L7DZ6.js → delete-T6DJSUJI.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-TLXR7LJ2.js → delete-XFUX533E.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-J3HBBLDB.js → deps-5GWMMS6D.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-XV6JJ6IN.js → deps-MCCU633S.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-GWDEB7JH.js → docs-HE3HCQ4S.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-RCLNSKID.js → docs-SXMOABHR.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-7KO2NX2A.js → extension-E23K4QRR.js} +5 -5
- package/dist/cli-bundle/chunks/{extension-5RN65LHT.js → extension-PMD3XMLN.js} +5 -5
- package/dist/cli-bundle/chunks/{files-3TCQHUHA.js → files-2RSWGPEU.js} +9 -9
- package/dist/cli-bundle/chunks/{files-5FDUPSEA.js → files-ZWFJFWBK.js} +9 -9
- package/dist/cli-bundle/chunks/{focus-HQXBYPKM.js → focus-KTTB3P3F.js} +8 -8
- package/dist/cli-bundle/chunks/{focus-7AQMNRSU.js → focus-ZMDP4FEL.js} +8 -8
- package/dist/cli-bundle/chunks/{gc-5B6ABL3Z.js → gc-BXIAKLAH.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-2FGKYRJ4.js → gc-C7K6JNUO.js} +3 -3
- package/dist/cli-bundle/chunks/{get-FUMVOJQD.js → get-AZQLC4NO.js} +11 -11
- package/dist/cli-bundle/chunks/{get-H5BZTW4A.js → get-I65HTAWO.js} +11 -11
- package/dist/cli-bundle/chunks/{health-JSVOR6B4.js → health-3MFFPQVZ.js} +13 -13
- package/dist/cli-bundle/chunks/{health-LE2ZQGSM.js → health-MYZEOCLI.js} +13 -13
- package/dist/cli-bundle/chunks/{history-QO4JVJJP.js → history-73Z6OBFZ.js} +10 -10
- package/dist/cli-bundle/chunks/history-BIPHVUMF.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-ID74DOUI.js → history-compact-24VQ63A3.js} +11 -11
- package/dist/cli-bundle/chunks/{history-compact-SDFRPZ4V.js → history-compact-UIAR2OI4.js} +11 -11
- package/dist/cli-bundle/chunks/{history-redact-Z4P5MM3G.js → history-redact-7YCXEWJD.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-WZZ6GZ2Z.js +21 -0
- package/dist/cli-bundle/chunks/{history-repair-CKE7GLZR.js → history-repair-4NOFFG2W.js} +12 -12
- package/dist/cli-bundle/chunks/{history-repair-ANHEYWKF.js → history-repair-GQN2X4TR.js} +12 -12
- package/dist/cli-bundle/chunks/init-K34V4PZR.js +20 -0
- package/dist/cli-bundle/chunks/{init-K6MSMB37.js → init-TDEDNVMM.js} +10 -9
- package/dist/cli-bundle/chunks/{learnings-VIS3NOQV.js → learnings-TV2CTGJ3.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-YYNB64GN.js → learnings-U67FTXPB.js} +10 -10
- package/dist/cli-bundle/chunks/{list-UHMA3N2K.js → list-MSHYOCFU.js} +10 -10
- package/dist/cli-bundle/chunks/{list-7UE44A2R.js → list-VV57WGUD.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-IN3UMA7W.js → notes-EUANWWKD.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-2HRMV67I.js → notes-GYVNDAL4.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-PAWCCAPW.js → plan-4LF4AV63.js} +14 -14
- package/dist/cli-bundle/chunks/{plan-I3SVH7FV.js → plan-W27O6DBS.js} +14 -14
- package/dist/cli-bundle/chunks/{register-list-query-OTIK4DVA.js → register-list-query-BXLEHJ7L.js} +18 -18
- package/dist/cli-bundle/chunks/{register-list-query-N7Z7RTDM.js → register-list-query-C2MS3BVQ.js} +18 -18
- package/dist/cli-bundle/chunks/{register-mutation-UFZK6Q57.js → register-mutation-6UCOEQ6L.js} +179 -74
- package/dist/cli-bundle/chunks/register-mutation-6UCOEQ6L.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-XFORLS6D.js → register-mutation-HE73PREP.js} +180 -75
- package/dist/cli-bundle/chunks/register-mutation-HE73PREP.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-6ZCLKRBG.js → register-operations-L6C32FDA.js} +89 -31
- package/dist/cli-bundle/chunks/{register-operations-6ZCLKRBG.js.map → register-operations-L6C32FDA.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-ITE7JTH3.js → register-operations-QQEHEX4P.js} +90 -32
- package/dist/cli-bundle/chunks/{register-operations-ITE7JTH3.js.map → register-operations-QQEHEX4P.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-7RKGE4BQ.js → register-setup-A7N4PNT3.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-7UKEFKT6.js → register-setup-WHG3NBP6.js} +15 -15
- package/dist/cli-bundle/chunks/{restore-NNVPBBVJ.js → restore-TSWSULYY.js} +11 -11
- package/dist/cli-bundle/chunks/restore-XQXICL3V.js +19 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js +91 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js.map +7 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js +88 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js.map +1 -0
- package/dist/cli-bundle/chunks/{schema-3YKCQ3VO.js → schema-7U7JUYGK.js} +779 -10
- package/dist/cli-bundle/chunks/schema-7U7JUYGK.js.map +1 -0
- package/dist/cli-bundle/chunks/{schema-3HCLXCFX.js → schema-TSBYSEMW.js} +792 -9
- package/dist/cli-bundle/chunks/schema-TSBYSEMW.js.map +7 -0
- package/dist/cli-bundle/chunks/{search-NQ42NC6A.js → search-OXLSQKHP.js} +11 -11
- package/dist/cli-bundle/chunks/{search-V7PZ2ICH.js → search-T3TOFLOQ.js} +11 -11
- package/dist/cli-bundle/chunks/{stats-7KD4PJC5.js → stats-5CLG22YZ.js} +8 -8
- package/dist/cli-bundle/chunks/{stats-GRHO6RFB.js → stats-XEMUXS42.js} +8 -8
- package/dist/cli-bundle/chunks/{telemetry-TRRYZXWT.js → telemetry-23OPBBZT.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-H5GLXNG5.js → telemetry-I3D7XZ55.js} +4 -4
- package/dist/cli-bundle/chunks/{test-6CZNIIGA.js → test-AROS3LIV.js} +15 -14
- package/dist/cli-bundle/chunks/{test-7GVQ3VMN.js → test-CECIMKOA.js} +15 -14
- package/dist/cli-bundle/chunks/{test-all-ODVADHV6.js → test-all-4DEQPIXH.js} +17 -16
- package/dist/cli-bundle/chunks/{test-all-ODVADHV6.js.map → test-all-4DEQPIXH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-3LF2OZD2.js → test-all-6RO6X3SM.js} +15 -14
- package/dist/cli-bundle/chunks/{test-all-3LF2OZD2.js.map → test-all-6RO6X3SM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-LYT6ZTNQ.js → test-runs-AAXVFWKH.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-RVP6VWN7.js → test-runs-LYBQSYRC.js} +5 -5
- package/dist/cli-bundle/chunks/update-MIWEJC76.js +24 -0
- package/dist/cli-bundle/chunks/update-P7I5YSRB.js +28 -0
- package/dist/cli-bundle/chunks/{update-many-XSEQJ24X.js → update-many-5B4HLVBK.js} +23 -23
- package/dist/cli-bundle/chunks/{update-many-FCU6RKTO.js → update-many-G2QOVZSB.js} +23 -23
- package/dist/cli-bundle/chunks/{upgrade-FOB5LHO5.js → upgrade-GFIDL62L.js} +5 -5
- package/dist/cli-bundle/chunks/{upgrade-A6TL3INC.js → upgrade-QUQYL7D3.js} +5 -5
- package/dist/cli-bundle/chunks/{validate-EHL3MI2V.js → validate-ADDZBMM3.js} +20 -19
- package/dist/cli-bundle/chunks/{validate-EHL3MI2V.js.map → validate-ADDZBMM3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-7BLDG3AT.js → validate-MAS3H6ZP.js} +22 -21
- package/dist/cli-bundle/chunks/{validate-7BLDG3AT.js.map → validate-MAS3H6ZP.js.map} +1 -1
- package/dist/cli-bundle/main.js +61 -19
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/config/nested-settings.js +40 -2
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/item/parse.d.ts +32 -0
- package/dist/core/item/parse.js +61 -2
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/schema/fields-file.d.ts +94 -0
- package/dist/core/schema/fields-file.js +317 -0
- package/dist/core/schema/fields-file.js.map +1 -0
- package/dist/core/schema/type-inference.d.ts +34 -0
- package/dist/core/schema/type-inference.js +97 -0
- package/dist/core/schema/type-inference.js.map +1 -0
- package/dist/core/schema/type-presets.d.ts +30 -0
- package/dist/core/schema/type-presets.js +96 -0
- package/dist/core/schema/type-presets.js.map +1 -0
- package/dist/core/store/front-matter-cache.d.ts +13 -0
- package/dist/core/store/front-matter-cache.js +21 -11
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/mcp/server.js +51 -4
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +49 -8
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +5 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +46 -5
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +3 -0
- package/dist/sdk/cli-contracts.js +76 -3
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/docs/COMMANDS.md +35 -3
- package/docs/CONFIGURATION.md +83 -0
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-5P2KQCTH.js +0 -18
- package/dist/cli-bundle/chunks/chunk-3XOXWOGA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4KBK4BA3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7K2MXFMX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AERT7KT3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-F7WSO5UX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G3CEIXTV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-H6EH6ENJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HDIDUME4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IQVB3YDD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KQ3LAMDO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OLTYNVJR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PZD7WPUC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SY4GKIWT.js.map +0 -1
- package/dist/cli-bundle/chunks/close-ILMZR3D7.js +0 -13
- package/dist/cli-bundle/chunks/config-IOJELD6O.js.map +0 -1
- package/dist/cli-bundle/chunks/config-PXTMAYV3.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-NSBVLXQ3.js.map +0 -7
- package/dist/cli-bundle/chunks/create-F5HZX2S4.js +0 -30
- package/dist/cli-bundle/chunks/history-SSXGGTVZ.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-VBH44Y7F.js +0 -21
- package/dist/cli-bundle/chunks/init-7FBQO77A.js +0 -19
- package/dist/cli-bundle/chunks/register-mutation-UFZK6Q57.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-XFORLS6D.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-XXXLQ2XC.js +0 -19
- package/dist/cli-bundle/chunks/schema-3HCLXCFX.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-3YKCQ3VO.js.map +0 -1
- package/dist/cli-bundle/chunks/update-MPGM6SBE.js +0 -28
- package/dist/cli-bundle/chunks/update-UN75XW3C.js +0 -24
- /package/dist/cli-bundle/chunks/{activity-5P2KQCTH.js.map → activity-PZYSZA26.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-MJGTX4LO.js.map → activity-SFM4THAU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-OUGCDFNC.js.map → aggregate-Y5ADDKBM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-MH3GROKB.js.map → aggregate-YTAUQLRW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-VCRUG2W6.js.map → append-4M7OVV7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-2Q4BPUBW.js.map → append-HSPK4L4V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F2GC6L3N.js.map → chunk-26BM6YLO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ILHLIA47.js.map → chunk-2C6FU3D3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B5Q7XC4K.js.map → chunk-2OPYLXDO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CBMETQ2U.js.map → chunk-2S46FKLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MJZUZ2QE.js.map → chunk-2TMKMTEI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M23HXJL3.js.map → chunk-2VH7DFSJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BJWTFOZM.js.map → chunk-3ENF4NO4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7EILPFMA.js.map → chunk-3GR2HTYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-764O7EUA.js.map → chunk-3R3FYCBV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4VLB4JH2.js.map → chunk-5FDYWOJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WZCQVABQ.js.map → chunk-5XGWFUW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-667XI4UJ.js.map → chunk-6BD77FGL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KZYVTOG5.js.map → chunk-6HF6CIY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XLNNCKTN.js.map → chunk-6PBPD4MN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z3MUNQRV.js.map → chunk-6VFUEGOA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O46LTCXQ.js.map → chunk-AJCQ5GT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7ZGKNHUL.js.map → chunk-ALTGYHN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SY4PZWIZ.js.map → chunk-AXLDUGXA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YGRPBFMA.js.map → chunk-BITCVGHT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UUKORJSN.js.map → chunk-CGQTFWYI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LV5FFQ7M.js.map → chunk-CHM2VFVL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7AGIXLNK.js.map → chunk-COVLE33A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2JEGCDYT.js.map → chunk-F5MSD5HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NIQHNDBZ.js.map → chunk-FAXB6F6R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TIRZIQRP.js.map → chunk-G2MOUCTU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GAVE4MYM.js.map → chunk-IROHIK2T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZJRDVYZI.js.map → chunk-JZHL4E3Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UBMCSJXX.js.map → chunk-KCAGIH6K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-656HPQPO.js.map → chunk-KO3VM5GS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OY3P2I6B.js.map → chunk-LNH5Q32E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GQ4JKNMV.js.map → chunk-LORM3M2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OCTQJP42.js.map → chunk-M4AVU7VC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3WAULYOY.js.map → chunk-MIBX6ZRN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FXNT5LPX.js.map → chunk-MMF2E3FM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IMQG4VR3.js.map → chunk-MUTUZ2HD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NCIBNERT.js.map → chunk-OOIH6J5T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-II7OGE3V.js.map → chunk-OSBJPPX3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HPELHUTG.js.map → chunk-PJS3WDO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6NQXMGYU.js.map → chunk-QGPE2H6Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ASM4DVRW.js.map → chunk-QVTFFLR2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FTAZLAR7.js.map → chunk-QW2F6ARZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A576QZDL.js.map → chunk-QXC3LWB7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6BV7ENQL.js.map → chunk-QXMXRPX5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SPYPC5CB.js.map → chunk-R4AKUPKI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UAR2VNCK.js.map → chunk-RASR23HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YXTLI4XP.js.map → chunk-SCDCNGCV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2IUJBMKS.js.map → chunk-SCS5PVAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KTVETP66.js.map → chunk-SJCMTOEU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L6FJPOT4.js.map → chunk-SO2ES46D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GYMG7AG6.js.map → chunk-TBV33CB4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XNOY7TCB.js.map → chunk-UGUJ2UOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E6J2PEK6.js.map → chunk-UN6P3IJ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZONXMSVB.js.map → chunk-V2GYOMEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T5VU7ROQ.js.map → chunk-VF3KQGNY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RKKIH2ZQ.js.map → chunk-VHG6LUKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G2YVUY7I.js.map → chunk-VXRFAE7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q5RLUCP3.js.map → chunk-WQRL4COW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TUB3DZAZ.js.map → chunk-YLAW3FZN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-NEO7AGWH.js.map → claim-WGAWJCPY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-4APLUXJW.js.map → claim-ZI6P4LMU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-ILMZR3D7.js.map → close-I7PRQ5G7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3QABBNGU.js.map → close-JMVVSIQE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-MIZLTYGL.js.map → close-many-IKPJXVOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-Q7Y5AHQI.js.map → close-many-TXABDCSJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-DAIQPOMU.js.map → comments-RLWR2S7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-IWFSVM4P.js.map → comments-YAMXKHUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-QHJSCJW4.js.map → context-K6QAHN5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-XZS2VFKU.js.map → context-VGXOOAH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-Q64T5FD4.js.map → copy-Q2PPU4AY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-SG34LCMU.js.map → copy-SC6UF3PI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-IPAX2SNL.js.map → create-76FE7JVF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-F5HZX2S4.js.map → create-RTRFW6RE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-VH3L7DZ6.js.map → delete-T6DJSUJI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-TLXR7LJ2.js.map → delete-XFUX533E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-J3HBBLDB.js.map → deps-5GWMMS6D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XV6JJ6IN.js.map → deps-MCCU633S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GWDEB7JH.js.map → docs-HE3HCQ4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RCLNSKID.js.map → docs-SXMOABHR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-7KO2NX2A.js.map → extension-E23K4QRR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-5RN65LHT.js.map → extension-PMD3XMLN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-3TCQHUHA.js.map → files-2RSWGPEU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-5FDUPSEA.js.map → files-ZWFJFWBK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-HQXBYPKM.js.map → focus-KTTB3P3F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-7AQMNRSU.js.map → focus-ZMDP4FEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-5B6ABL3Z.js.map → gc-BXIAKLAH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2FGKYRJ4.js.map → gc-C7K6JNUO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-FUMVOJQD.js.map → get-AZQLC4NO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-H5BZTW4A.js.map → get-I65HTAWO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-JSVOR6B4.js.map → health-3MFFPQVZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-LE2ZQGSM.js.map → health-MYZEOCLI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-QO4JVJJP.js.map → history-73Z6OBFZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SSXGGTVZ.js.map → history-BIPHVUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-ID74DOUI.js.map → history-compact-24VQ63A3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-SDFRPZ4V.js.map → history-compact-UIAR2OI4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-Z4P5MM3G.js.map → history-redact-7YCXEWJD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-VBH44Y7F.js.map → history-redact-WZZ6GZ2Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-CKE7GLZR.js.map → history-repair-4NOFFG2W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-ANHEYWKF.js.map → history-repair-GQN2X4TR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-7FBQO77A.js.map → init-K34V4PZR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-K6MSMB37.js.map → init-TDEDNVMM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-VIS3NOQV.js.map → learnings-TV2CTGJ3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-YYNB64GN.js.map → learnings-U67FTXPB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-UHMA3N2K.js.map → list-MSHYOCFU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-7UE44A2R.js.map → list-VV57WGUD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-IN3UMA7W.js.map → notes-EUANWWKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2HRMV67I.js.map → notes-GYVNDAL4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-PAWCCAPW.js.map → plan-4LF4AV63.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-I3SVH7FV.js.map → plan-W27O6DBS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-OTIK4DVA.js.map → register-list-query-BXLEHJ7L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-list-query-N7Z7RTDM.js.map → register-list-query-C2MS3BVQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-7RKGE4BQ.js.map → register-setup-A7N4PNT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-7UKEFKT6.js.map → register-setup-WHG3NBP6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-NNVPBBVJ.js.map → restore-TSWSULYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-XXXLQ2XC.js.map → restore-XQXICL3V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-NQ42NC6A.js.map → search-OXLSQKHP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-V7PZ2ICH.js.map → search-T3TOFLOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-7KD4PJC5.js.map → stats-5CLG22YZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-GRHO6RFB.js.map → stats-XEMUXS42.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-TRRYZXWT.js.map → telemetry-23OPBBZT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-H5GLXNG5.js.map → telemetry-I3D7XZ55.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-6CZNIIGA.js.map → test-AROS3LIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-7GVQ3VMN.js.map → test-CECIMKOA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-LYT6ZTNQ.js.map → test-runs-AAXVFWKH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-RVP6VWN7.js.map → test-runs-LYBQSYRC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-UN75XW3C.js.map → update-MIWEJC76.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-MPGM6SBE.js.map → update-P7I5YSRB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-XSEQJ24X.js.map → update-many-5B4HLVBK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-FCU6RKTO.js.map → update-many-G2QOVZSB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-FOB5LHO5.js.map → upgrade-GFIDL62L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-A6TL3INC.js.map → upgrade-QUQYL7D3.js.map} +0 -0
|
@@ -14,6 +14,19 @@ export interface CachedDocumentCandidate {
|
|
|
14
14
|
item_format: ItemFormat;
|
|
15
15
|
item_path: string;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Decide whether a freshly parsed document candidate should replace the one
|
|
19
|
+
* already recorded for the same item id when both an explicit-format file and a
|
|
20
|
+
* fallback-format file exist (e.g. `pm-x.toon` and `pm-x.md`). An explicit
|
|
21
|
+
* `preferredFormat` wins; otherwise `toon` wins over any non-toon format.
|
|
22
|
+
*
|
|
23
|
+
* This is a pure decision so the winner is fully deterministic regardless of the
|
|
24
|
+
* order in which the concurrent per-file reads resolve — the inline call site
|
|
25
|
+
* populates the map as each async read completes, so without a pure rule the
|
|
26
|
+
* branch taken (and thus its coverage) would race. Keep this exported and
|
|
27
|
+
* unit-tested across every format combination.
|
|
28
|
+
*/
|
|
29
|
+
export declare function shouldReplaceCachedDocumentCandidate(existingFormat: ItemFormat, candidateFormat: ItemFormat, preferredFormat: ItemFormat | undefined): boolean;
|
|
17
30
|
export interface ListCacheOptions {
|
|
18
31
|
/**
|
|
19
32
|
* When false, item bodies are neither loaded from nor written to the separate
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="84a26eb8-27af-512b-9684-edc8f9c77970")}catch(e){}}();
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
@@ -127,6 +127,24 @@ async function persistCache(cachePath, envelope) {
|
|
|
127
127
|
await fs.mkdir(path.dirname(cachePath), { recursive: true });
|
|
128
128
|
await writeFileAtomic(cachePath, JSON.stringify(envelope));
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Decide whether a freshly parsed document candidate should replace the one
|
|
132
|
+
* already recorded for the same item id when both an explicit-format file and a
|
|
133
|
+
* fallback-format file exist (e.g. `pm-x.toon` and `pm-x.md`). An explicit
|
|
134
|
+
* `preferredFormat` wins; otherwise `toon` wins over any non-toon format.
|
|
135
|
+
*
|
|
136
|
+
* This is a pure decision so the winner is fully deterministic regardless of the
|
|
137
|
+
* order in which the concurrent per-file reads resolve — the inline call site
|
|
138
|
+
* populates the map as each async read completes, so without a pure rule the
|
|
139
|
+
* branch taken (and thus its coverage) would race. Keep this exported and
|
|
140
|
+
* unit-tested across every format combination.
|
|
141
|
+
*/
|
|
142
|
+
export function shouldReplaceCachedDocumentCandidate(existingFormat, candidateFormat, preferredFormat) {
|
|
143
|
+
if (preferredFormat) {
|
|
144
|
+
return candidateFormat === preferredFormat && existingFormat !== preferredFormat;
|
|
145
|
+
}
|
|
146
|
+
return candidateFormat === "toon" && existingFormat !== "toon";
|
|
147
|
+
}
|
|
130
148
|
function appendWarning(warnings, warning) {
|
|
131
149
|
if (warnings && !warnings.includes(warning)) {
|
|
132
150
|
warnings.push(warning);
|
|
@@ -266,17 +284,9 @@ export async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, t
|
|
|
266
284
|
item_format: itemFormat,
|
|
267
285
|
item_path: filePath,
|
|
268
286
|
};
|
|
269
|
-
if (!existing) {
|
|
287
|
+
if (!existing || shouldReplaceCachedDocumentCandidate(existing.itemFormat, itemFormat, preferredFormat)) {
|
|
270
288
|
documentsById.set(metadata.id, { candidate, itemFormat });
|
|
271
289
|
}
|
|
272
|
-
else {
|
|
273
|
-
const shouldReplace = preferredFormat
|
|
274
|
-
? itemFormat === preferredFormat && existing.itemFormat !== preferredFormat
|
|
275
|
-
: itemFormat === "toon" && existing.itemFormat !== "toon";
|
|
276
|
-
if (shouldReplace) {
|
|
277
|
-
documentsById.set(metadata.id, { candidate, itemFormat });
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
290
|
}
|
|
281
291
|
catch {
|
|
282
292
|
appendWarning(warnings, `item_list_item_read_failed:${folder}/${file}`);
|
|
@@ -347,4 +357,4 @@ export async function listAllDocumentsCachedLight(pmRoot, preferredFormat, typeT
|
|
|
347
357
|
}));
|
|
348
358
|
}
|
|
349
359
|
//# sourceMappingURL=front-matter-cache.js.map
|
|
350
|
-
//# debugId=
|
|
360
|
+
//# debugId=84a26eb8-27af-512b-9684-edc8f9c77970
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"front-matter-cache.js","sources":["core/store/front-matter-cache.ts"],"sourceRoot":"/","sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { createHash } from \"node:crypto\";\nimport { getActiveExtensionRegistrations, hasActiveOnReadHooks, runActiveOnReadHooks } from \"../extensions/index.js\";\nimport { collectRegisteredItemFieldNames } from \"../extensions/item-fields.js\";\nimport { parseItemDocument } from \"../item/item-format.js\";\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { ITEM_FILE_EXTENSIONS, getItemFormatFromPath } from \"./paths.js\";\nimport type { ItemDocument, ItemFormat, ItemMetadata, ItemType, RuntimeSchemaSettings } from \"../../types/index.js\";\n\nconst CACHE_VERSION = 6;\nconst CACHE_FILENAME = \"metadata-cache.json\";\nconst BODY_CACHE_FILENAME = \"metadata-cache-bodies.json\";\nconst COLLECTIONS_CACHE_FILENAME = \"metadata-cache-collections.json\";\n\n/**\n * Heavy \"collection\" front-matter fields. These arrays dominate the on-disk cache\n * (e.g. a single item's comment thread can be hundreds of KB) yet the hot list path\n * (`pm list`, stats, deps, activity, calendar, close) never reads them. They are\n * stored in a separate collections cache that is parsed only when a caller opts in\n * (`includeCollections`), keeping the always-loaded light cache an order of magnitude\n * smaller and its JSON.parse correspondingly cheaper.\n */\nexport const HEAVY_METADATA_KEYS = [\n \"comments\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"tests\",\n \"test_runs\",\n \"docs\",\n] as const;\n\nfunction resolveActiveExtensionFieldNames(): readonly string[] {\n return collectRegisteredItemFieldNames(getActiveExtensionRegistrations());\n}\n\ninterface StatSignature {\n mtime_ms: number;\n ctime_ms: number;\n size: number;\n}\n\ninterface CachedEntry extends StatSignature {\n metadata: ItemMetadata;\n body_length: number;\n}\n\ninterface CachedBody extends StatSignature {\n body: string;\n}\n\ninterface CachedCollections extends StatSignature {\n collections: Record<string, unknown>;\n}\n\ninterface CacheEnvelope {\n version: number;\n context_fingerprint: string;\n entries: Record<string, CachedEntry>;\n}\n\ninterface BodyCacheEnvelope {\n version: number;\n context_fingerprint: string;\n bodies: Record<string, CachedBody>;\n}\n\ninterface CollectionsCacheEnvelope {\n version: number;\n context_fingerprint: string;\n collections: Record<string, CachedCollections>;\n}\n\n/**\n * Split parsed front-matter into the light scalar/small fields (everything except the\n * heavy collection arrays) and the heavy collection fields. Only keys that are actually\n * present are moved, so an item without comments stays without comments in both tiers.\n */\nfunction splitHeavyMetadata(metadata: ItemMetadata): {\n light: ItemMetadata;\n heavy: Record<string, unknown>;\n} {\n const light = { ...metadata } as Record<string, unknown>;\n const heavy: Record<string, unknown> = {};\n for (const key of HEAVY_METADATA_KEYS) {\n if (key in light) {\n heavy[key] = light[key];\n delete light[key];\n }\n }\n return { light: light as ItemMetadata, heavy };\n}\n\n/**\n * Recombine light metadata with cached heavy collection fields. Key order differs from\n * the on-disk document, but every downstream hash/serialization canonicalizes and\n * sorts keys (`stableStringify`), so the merged record is byte-identical once hashed.\n */\nfunction mergeHeavyMetadata(light: ItemMetadata, heavy: Record<string, unknown> | undefined): ItemMetadata {\n if (!heavy || Object.keys(heavy).length === 0) {\n return light;\n }\n return { ...light, ...heavy } as ItemMetadata;\n}\n\nexport interface CachedDocumentCandidate {\n metadata: ItemMetadata;\n body?: string;\n item_format: ItemFormat;\n item_path: string;\n}\n\nfunction computeContextFingerprint(\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n schema: RuntimeSchemaSettings | undefined,\n extensionFieldNames: readonly string[],\n): string {\n const hash = createHash(\"sha256\");\n hash.update(`format:${preferredFormat ?? \"default\"}`);\n const sortedTypes = Object.entries(typeToFolder)\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([type, folder]) => `${type}=${folder}`)\n .join(\",\");\n hash.update(`|types:${sortedTypes}`);\n if (schema) {\n hash.update(`|schema:${JSON.stringify(schema)}`);\n }\n if (extensionFieldNames.length > 0) {\n hash.update(`|extension_fields:${extensionFieldNames.join(\",\")}`);\n }\n return hash.digest(\"hex\").slice(0, 16);\n}\n\nfunction getCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", CACHE_FILENAME);\n}\n\nfunction getBodyCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", BODY_CACHE_FILENAME);\n}\n\nfunction getCollectionsCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", COLLECTIONS_CACHE_FILENAME);\n}\n\nasync function loadCache(pmRoot: string): Promise<CacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as CacheEnvelope;\n if (parsed.version !== CACHE_VERSION || typeof parsed.entries !== \"object\" || parsed.entries === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nasync function loadBodyCache(pmRoot: string): Promise<BodyCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getBodyCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as BodyCacheEnvelope;\n if (parsed.version !== CACHE_VERSION || typeof parsed.bodies !== \"object\" || parsed.bodies === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nasync function loadCollectionsCache(pmRoot: string): Promise<CollectionsCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getCollectionsCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as CollectionsCacheEnvelope;\n if (parsed.version !== CACHE_VERSION || typeof parsed.collections !== \"object\" || parsed.collections === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nasync function persistCache(\n cachePath: string,\n envelope: CacheEnvelope | BodyCacheEnvelope | CollectionsCacheEnvelope,\n): Promise<void> {\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n await writeFileAtomic(cachePath, JSON.stringify(envelope));\n}\n\nfunction appendWarning(warnings: string[] | undefined, warning: string): void {\n if (warnings && !warnings.includes(warning)) {\n warnings.push(warning);\n }\n}\n\nfunction statMatches(signature: StatSignature, mtimeMs: number, ctimeMs: number, size: number): boolean {\n return signature.mtime_ms === mtimeMs && signature.ctime_ms === ctimeMs && signature.size === size;\n}\n\nexport interface ListCacheOptions {\n /**\n * When false, item bodies are neither loaded from nor written to the separate\n * body cache. Metadata-only callers (`pm list`, stats, deps, activity, …) skip\n * the large body cache entirely; only body consumers (search/reindex) pay for it.\n */\n includeBody?: boolean;\n /**\n * When false, heavy collection fields (comments/notes/learnings/files/tests/\n * test_runs/docs) are neither loaded from nor written to the separate collections\n * cache, and are absent from the returned metadata. Light-only callers (`pm list`\n * compact, stats, deps, activity, calendar, close) skip the large collections cache\n * entirely. Defaults to true so any caller that does read those fields stays correct.\n */\n includeCollections?: boolean;\n}\n\n/**\n * List all item documents using a persistent on-disk metadata cache.\n *\n * Metadata and bodies are stored in two separate cache files so the hot path\n * (`pm list` and friends, which discard bodies) never loads or rewrites the much\n * larger body payload. Each file is rewritten only when its contents actually\n * change, and per-file onRead hooks are dispatched only when an extension\n * registers one. Only files whose mtime/ctime/size changed since the last run are\n * re-parsed.\n */\nexport async function listAllDocumentCandidatesCached(\n pmRoot: string,\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n warnings: string[] | undefined,\n schema: RuntimeSchemaSettings | undefined,\n options: ListCacheOptions = {},\n): Promise<CachedDocumentCandidate[]> {\n const includeBody = options.includeBody !== false;\n const includeCollections = options.includeCollections !== false;\n const extensionFieldNames = resolveActiveExtensionFieldNames();\n const contextFingerprint = computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames);\n\n const existingCache = await loadCache(pmRoot);\n const previousEntries: Record<string, CachedEntry> =\n existingCache && existingCache.context_fingerprint === contextFingerprint ? existingCache.entries : {};\n\n const existingBodyCache = includeBody ? await loadBodyCache(pmRoot) : null;\n const previousBodies: Record<string, CachedBody> =\n existingBodyCache && existingBodyCache.context_fingerprint === contextFingerprint ? existingBodyCache.bodies : {};\n\n const existingCollectionsCache = includeCollections ? await loadCollectionsCache(pmRoot) : null;\n const previousCollections: Record<string, CachedCollections> =\n existingCollectionsCache && existingCollectionsCache.context_fingerprint === contextFingerprint\n ? existingCollectionsCache.collections\n : {};\n\n const entries = Object.entries(typeToFolder) as Array<[ItemType, string]>;\n const dirResults = await Promise.all(\n entries.map(async ([, folder]) => {\n const dirPath = path.join(pmRoot, folder);\n try {\n const files = await fs.readdir(dirPath);\n return { folder, dirPath, files };\n } catch (error: unknown) {\n if (typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code !== \"ENOENT\") {\n appendWarning(warnings, `item_list_directory_read_failed:${folder}`);\n }\n return { folder, dirPath, files: [] as string[] };\n }\n }),\n );\n\n const dispatchReadHooks = hasActiveOnReadHooks();\n const newEntries: Record<string, CachedEntry> = {};\n const newBodies: Record<string, CachedBody> = {};\n const newCollections: Record<string, CachedCollections> = {};\n const documentsById = new Map<string, { candidate: CachedDocumentCandidate; itemFormat: ItemFormat }>();\n let metadataMiss = false;\n let bodyMiss = false;\n let collectionsMiss = false;\n\n const parseTasks: Array<Promise<void>> = [];\n\n for (const { folder, dirPath, files } of dirResults) {\n for (const file of files) {\n if (!ITEM_FILE_EXTENSIONS.some((ext) => file.toLowerCase().endsWith(ext))) {\n continue;\n }\n const filePath = path.join(dirPath, file);\n const relativePath = path.relative(pmRoot, filePath);\n\n parseTasks.push(\n (async () => {\n try {\n const stat = await fs.stat(filePath);\n const mtimeMs = stat.mtimeMs;\n const ctimeMs = stat.ctimeMs;\n const { size } = stat;\n const itemFormat = getItemFormatFromPath(filePath) as ItemFormat;\n\n // Preserve onRead hook semantics even when served from cache, but only\n // when an extension actually observes reads. Surface hook warnings so\n // read-hook failures are not silently hidden.\n if (dispatchReadHooks) {\n for (const warning of await runActiveOnReadHooks({ path: filePath, scope: \"project\" })) {\n appendWarning(warnings, warning);\n }\n }\n\n const cachedEntry = previousEntries[relativePath];\n const metadataCached = cachedEntry !== undefined && statMatches(cachedEntry, mtimeMs, ctimeMs, size);\n const cachedBody = previousBodies[relativePath];\n const bodyCached = cachedBody !== undefined && statMatches(cachedBody, mtimeMs, ctimeMs, size);\n const cachedCollections = previousCollections[relativePath];\n const collectionsCached =\n cachedCollections !== undefined && statMatches(cachedCollections, mtimeMs, ctimeMs, size);\n\n const needRead =\n !metadataCached || (includeBody && !bodyCached) || (includeCollections && !collectionsCached);\n let lightMetadata: ItemMetadata;\n let heavyMetadata: Record<string, unknown> | undefined;\n let bodyLength: number;\n let body: string | undefined;\n\n if (needRead) {\n const raw = await fs.readFile(filePath, \"utf8\");\n const parsed = parseItemDocument(raw, {\n format: itemFormat,\n schema,\n extensionFieldNames,\n onWarning: (w) => appendWarning(warnings, w),\n });\n const split = splitHeavyMetadata(parsed.metadata);\n lightMetadata = metadataCached ? cachedEntry.metadata : split.light;\n bodyLength = metadataCached ? cachedEntry.body_length : parsed.body.length;\n body = includeBody ? parsed.body : undefined;\n if (includeCollections) {\n heavyMetadata = collectionsCached ? cachedCollections.collections : split.heavy;\n }\n if (!metadataCached) {\n metadataMiss = true;\n }\n if (includeBody && !bodyCached) {\n bodyMiss = true;\n }\n if (includeCollections && !collectionsCached) {\n collectionsMiss = true;\n }\n } else {\n lightMetadata = cachedEntry.metadata;\n bodyLength = cachedEntry.body_length;\n body = includeBody ? cachedBody.body : undefined;\n heavyMetadata = includeCollections && cachedCollections ? cachedCollections.collections : undefined;\n }\n\n newEntries[relativePath] = {\n mtime_ms: mtimeMs,\n ctime_ms: ctimeMs,\n size,\n metadata: lightMetadata,\n body_length: bodyLength,\n };\n if (includeBody && body !== undefined) {\n newBodies[relativePath] = { mtime_ms: mtimeMs, ctime_ms: ctimeMs, size, body };\n }\n if (includeCollections && heavyMetadata !== undefined) {\n newCollections[relativePath] = { mtime_ms: mtimeMs, ctime_ms: ctimeMs, size, collections: heavyMetadata };\n }\n\n const metadata = includeCollections ? mergeHeavyMetadata(lightMetadata, heavyMetadata) : lightMetadata;\n const existing = documentsById.get(metadata.id);\n const candidate: CachedDocumentCandidate = {\n metadata,\n body,\n item_format: itemFormat,\n item_path: filePath,\n };\n if (!existing) {\n documentsById.set(metadata.id, { candidate, itemFormat });\n } else {\n const shouldReplace = preferredFormat\n ? itemFormat === preferredFormat && existing.itemFormat !== preferredFormat\n : itemFormat === \"toon\" && existing.itemFormat !== \"toon\";\n if (shouldReplace) {\n documentsById.set(metadata.id, { candidate, itemFormat });\n }\n }\n } catch {\n appendWarning(warnings, `item_list_item_read_failed:${folder}/${file}`);\n }\n })(),\n );\n }\n }\n\n await Promise.all(parseTasks);\n\n // Rewrite a cache file only when its contents changed: any re-parsed (missing or\n // stale) entry, or a different set of keys (additions/deletions).\n const metadataDirty = metadataMiss || Object.keys(previousEntries).length !== Object.keys(newEntries).length;\n if (metadataDirty || existingCache === null || existingCache.context_fingerprint !== contextFingerprint) {\n await persistCache(getCachePath(pmRoot), {\n version: CACHE_VERSION,\n context_fingerprint: contextFingerprint,\n entries: newEntries,\n }).catch(() => {});\n }\n\n if (includeBody) {\n const bodyDirty = bodyMiss || Object.keys(previousBodies).length !== Object.keys(newBodies).length;\n if (bodyDirty || existingBodyCache === null || existingBodyCache.context_fingerprint !== contextFingerprint) {\n await persistCache(getBodyCachePath(pmRoot), {\n version: CACHE_VERSION,\n context_fingerprint: contextFingerprint,\n bodies: newBodies,\n }).catch(() => {});\n }\n }\n\n if (includeCollections) {\n const collectionsDirty =\n collectionsMiss || Object.keys(previousCollections).length !== Object.keys(newCollections).length;\n if (\n collectionsDirty ||\n existingCollectionsCache === null ||\n existingCollectionsCache.context_fingerprint !== contextFingerprint\n ) {\n await persistCache(getCollectionsCachePath(pmRoot), {\n version: CACHE_VERSION,\n context_fingerprint: contextFingerprint,\n collections: newCollections,\n }).catch(() => {});\n }\n }\n\n return [...documentsById.values()]\n .sort((left, right) => left.candidate.metadata.id.localeCompare(right.candidate.metadata.id))\n .map((entry) => entry.candidate);\n}\n\nexport async function listAllDocumentsCached(\n pmRoot: string,\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n warnings: string[] | undefined,\n schema: RuntimeSchemaSettings | undefined,\n): Promise<ItemDocument[]> {\n const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, {\n includeBody: false,\n });\n return candidates.map((candidate) => ({\n metadata: candidate.metadata,\n body: candidate.body ?? \"\",\n }));\n}\n\n/**\n * Light variant of {@link listAllDocumentsCached}: returns metadata WITHOUT the heavy\n * collection fields (comments/notes/learnings/files/tests/test_runs/docs), skipping the\n * large collections cache entirely. Only safe for callers that read just the light\n * scalar/small fields (id/title/status/type/priority/parent/tags/dates/dependencies/…).\n */\nexport async function listAllDocumentsCachedLight(\n pmRoot: string,\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n warnings: string[] | undefined,\n schema: RuntimeSchemaSettings | undefined,\n): Promise<ItemDocument[]> {\n const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, {\n includeBody: false,\n includeCollections: false,\n });\n return candidates.map((candidate) => ({\n metadata: candidate.metadata,\n body: candidate.body ?? \"\",\n }));\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACrH,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGzE,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAC7C,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AACzD,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,CAA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YAAoC,EACpC,QAA8B,EAC9B,MAAyC;IAEzC,MAAM,UAAU,GAAG,MAAM,+BAA+B,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;QAChH,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;IACH,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,EAAE;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAc,EACd,eAAuC,EACvC,YAAoC,EACpC,QAA8B,EAC9B,MAAyC;IAEzC,MAAM,UAAU,GAAG,MAAM,+BAA+B,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;QAChH,WAAW,EAAE,KAAK;QAClB,kBAAkB,EAAE,KAAK;KAC1B,CAAC,CAAC;IACH,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,EAAE;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC","debugId":"0b313ee5-78cb-5aa7-a288-d41e3ad6ecf8"}
|
|
1
|
+
{"version":3,"file":"front-matter-cache.js","sources":["core/store/front-matter-cache.ts"],"sourceRoot":"/","sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { createHash } from \"node:crypto\";\nimport { getActiveExtensionRegistrations, hasActiveOnReadHooks, runActiveOnReadHooks } from \"../extensions/index.js\";\nimport { collectRegisteredItemFieldNames } from \"../extensions/item-fields.js\";\nimport { parseItemDocument } from \"../item/item-format.js\";\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { ITEM_FILE_EXTENSIONS, getItemFormatFromPath } from \"./paths.js\";\nimport type { ItemDocument, ItemFormat, ItemMetadata, ItemType, RuntimeSchemaSettings } from \"../../types/index.js\";\n\nconst CACHE_VERSION = 6;\nconst CACHE_FILENAME = \"metadata-cache.json\";\nconst BODY_CACHE_FILENAME = \"metadata-cache-bodies.json\";\nconst COLLECTIONS_CACHE_FILENAME = \"metadata-cache-collections.json\";\n\n/**\n * Heavy \"collection\" front-matter fields. These arrays dominate the on-disk cache\n * (e.g. a single item's comment thread can be hundreds of KB) yet the hot list path\n * (`pm list`, stats, deps, activity, calendar, close) never reads them. They are\n * stored in a separate collections cache that is parsed only when a caller opts in\n * (`includeCollections`), keeping the always-loaded light cache an order of magnitude\n * smaller and its JSON.parse correspondingly cheaper.\n */\nexport const HEAVY_METADATA_KEYS = [\n \"comments\",\n \"notes\",\n \"learnings\",\n \"files\",\n \"tests\",\n \"test_runs\",\n \"docs\",\n] as const;\n\nfunction resolveActiveExtensionFieldNames(): readonly string[] {\n return collectRegisteredItemFieldNames(getActiveExtensionRegistrations());\n}\n\ninterface StatSignature {\n mtime_ms: number;\n ctime_ms: number;\n size: number;\n}\n\ninterface CachedEntry extends StatSignature {\n metadata: ItemMetadata;\n body_length: number;\n}\n\ninterface CachedBody extends StatSignature {\n body: string;\n}\n\ninterface CachedCollections extends StatSignature {\n collections: Record<string, unknown>;\n}\n\ninterface CacheEnvelope {\n version: number;\n context_fingerprint: string;\n entries: Record<string, CachedEntry>;\n}\n\ninterface BodyCacheEnvelope {\n version: number;\n context_fingerprint: string;\n bodies: Record<string, CachedBody>;\n}\n\ninterface CollectionsCacheEnvelope {\n version: number;\n context_fingerprint: string;\n collections: Record<string, CachedCollections>;\n}\n\n/**\n * Split parsed front-matter into the light scalar/small fields (everything except the\n * heavy collection arrays) and the heavy collection fields. Only keys that are actually\n * present are moved, so an item without comments stays without comments in both tiers.\n */\nfunction splitHeavyMetadata(metadata: ItemMetadata): {\n light: ItemMetadata;\n heavy: Record<string, unknown>;\n} {\n const light = { ...metadata } as Record<string, unknown>;\n const heavy: Record<string, unknown> = {};\n for (const key of HEAVY_METADATA_KEYS) {\n if (key in light) {\n heavy[key] = light[key];\n delete light[key];\n }\n }\n return { light: light as ItemMetadata, heavy };\n}\n\n/**\n * Recombine light metadata with cached heavy collection fields. Key order differs from\n * the on-disk document, but every downstream hash/serialization canonicalizes and\n * sorts keys (`stableStringify`), so the merged record is byte-identical once hashed.\n */\nfunction mergeHeavyMetadata(light: ItemMetadata, heavy: Record<string, unknown> | undefined): ItemMetadata {\n if (!heavy || Object.keys(heavy).length === 0) {\n return light;\n }\n return { ...light, ...heavy } as ItemMetadata;\n}\n\nexport interface CachedDocumentCandidate {\n metadata: ItemMetadata;\n body?: string;\n item_format: ItemFormat;\n item_path: string;\n}\n\nfunction computeContextFingerprint(\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n schema: RuntimeSchemaSettings | undefined,\n extensionFieldNames: readonly string[],\n): string {\n const hash = createHash(\"sha256\");\n hash.update(`format:${preferredFormat ?? \"default\"}`);\n const sortedTypes = Object.entries(typeToFolder)\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([type, folder]) => `${type}=${folder}`)\n .join(\",\");\n hash.update(`|types:${sortedTypes}`);\n if (schema) {\n hash.update(`|schema:${JSON.stringify(schema)}`);\n }\n if (extensionFieldNames.length > 0) {\n hash.update(`|extension_fields:${extensionFieldNames.join(\",\")}`);\n }\n return hash.digest(\"hex\").slice(0, 16);\n}\n\nfunction getCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", CACHE_FILENAME);\n}\n\nfunction getBodyCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", BODY_CACHE_FILENAME);\n}\n\nfunction getCollectionsCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", COLLECTIONS_CACHE_FILENAME);\n}\n\nasync function loadCache(pmRoot: string): Promise<CacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as CacheEnvelope;\n if (parsed.version !== CACHE_VERSION || typeof parsed.entries !== \"object\" || parsed.entries === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nasync function loadBodyCache(pmRoot: string): Promise<BodyCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getBodyCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as BodyCacheEnvelope;\n if (parsed.version !== CACHE_VERSION || typeof parsed.bodies !== \"object\" || parsed.bodies === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nasync function loadCollectionsCache(pmRoot: string): Promise<CollectionsCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getCollectionsCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as CollectionsCacheEnvelope;\n if (parsed.version !== CACHE_VERSION || typeof parsed.collections !== \"object\" || parsed.collections === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nasync function persistCache(\n cachePath: string,\n envelope: CacheEnvelope | BodyCacheEnvelope | CollectionsCacheEnvelope,\n): Promise<void> {\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n await writeFileAtomic(cachePath, JSON.stringify(envelope));\n}\n\n/**\n * Decide whether a freshly parsed document candidate should replace the one\n * already recorded for the same item id when both an explicit-format file and a\n * fallback-format file exist (e.g. `pm-x.toon` and `pm-x.md`). An explicit\n * `preferredFormat` wins; otherwise `toon` wins over any non-toon format.\n *\n * This is a pure decision so the winner is fully deterministic regardless of the\n * order in which the concurrent per-file reads resolve — the inline call site\n * populates the map as each async read completes, so without a pure rule the\n * branch taken (and thus its coverage) would race. Keep this exported and\n * unit-tested across every format combination.\n */\nexport function shouldReplaceCachedDocumentCandidate(\n existingFormat: ItemFormat,\n candidateFormat: ItemFormat,\n preferredFormat: ItemFormat | undefined,\n): boolean {\n if (preferredFormat) {\n return candidateFormat === preferredFormat && existingFormat !== preferredFormat;\n }\n return candidateFormat === \"toon\" && existingFormat !== \"toon\";\n}\n\nfunction appendWarning(warnings: string[] | undefined, warning: string): void {\n if (warnings && !warnings.includes(warning)) {\n warnings.push(warning);\n }\n}\n\nfunction statMatches(signature: StatSignature, mtimeMs: number, ctimeMs: number, size: number): boolean {\n return signature.mtime_ms === mtimeMs && signature.ctime_ms === ctimeMs && signature.size === size;\n}\n\nexport interface ListCacheOptions {\n /**\n * When false, item bodies are neither loaded from nor written to the separate\n * body cache. Metadata-only callers (`pm list`, stats, deps, activity, …) skip\n * the large body cache entirely; only body consumers (search/reindex) pay for it.\n */\n includeBody?: boolean;\n /**\n * When false, heavy collection fields (comments/notes/learnings/files/tests/\n * test_runs/docs) are neither loaded from nor written to the separate collections\n * cache, and are absent from the returned metadata. Light-only callers (`pm list`\n * compact, stats, deps, activity, calendar, close) skip the large collections cache\n * entirely. Defaults to true so any caller that does read those fields stays correct.\n */\n includeCollections?: boolean;\n}\n\n/**\n * List all item documents using a persistent on-disk metadata cache.\n *\n * Metadata and bodies are stored in two separate cache files so the hot path\n * (`pm list` and friends, which discard bodies) never loads or rewrites the much\n * larger body payload. Each file is rewritten only when its contents actually\n * change, and per-file onRead hooks are dispatched only when an extension\n * registers one. Only files whose mtime/ctime/size changed since the last run are\n * re-parsed.\n */\nexport async function listAllDocumentCandidatesCached(\n pmRoot: string,\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n warnings: string[] | undefined,\n schema: RuntimeSchemaSettings | undefined,\n options: ListCacheOptions = {},\n): Promise<CachedDocumentCandidate[]> {\n const includeBody = options.includeBody !== false;\n const includeCollections = options.includeCollections !== false;\n const extensionFieldNames = resolveActiveExtensionFieldNames();\n const contextFingerprint = computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames);\n\n const existingCache = await loadCache(pmRoot);\n const previousEntries: Record<string, CachedEntry> =\n existingCache && existingCache.context_fingerprint === contextFingerprint ? existingCache.entries : {};\n\n const existingBodyCache = includeBody ? await loadBodyCache(pmRoot) : null;\n const previousBodies: Record<string, CachedBody> =\n existingBodyCache && existingBodyCache.context_fingerprint === contextFingerprint ? existingBodyCache.bodies : {};\n\n const existingCollectionsCache = includeCollections ? await loadCollectionsCache(pmRoot) : null;\n const previousCollections: Record<string, CachedCollections> =\n existingCollectionsCache && existingCollectionsCache.context_fingerprint === contextFingerprint\n ? existingCollectionsCache.collections\n : {};\n\n const entries = Object.entries(typeToFolder) as Array<[ItemType, string]>;\n const dirResults = await Promise.all(\n entries.map(async ([, folder]) => {\n const dirPath = path.join(pmRoot, folder);\n try {\n const files = await fs.readdir(dirPath);\n return { folder, dirPath, files };\n } catch (error: unknown) {\n if (typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code !== \"ENOENT\") {\n appendWarning(warnings, `item_list_directory_read_failed:${folder}`);\n }\n return { folder, dirPath, files: [] as string[] };\n }\n }),\n );\n\n const dispatchReadHooks = hasActiveOnReadHooks();\n const newEntries: Record<string, CachedEntry> = {};\n const newBodies: Record<string, CachedBody> = {};\n const newCollections: Record<string, CachedCollections> = {};\n const documentsById = new Map<string, { candidate: CachedDocumentCandidate; itemFormat: ItemFormat }>();\n let metadataMiss = false;\n let bodyMiss = false;\n let collectionsMiss = false;\n\n const parseTasks: Array<Promise<void>> = [];\n\n for (const { folder, dirPath, files } of dirResults) {\n for (const file of files) {\n if (!ITEM_FILE_EXTENSIONS.some((ext) => file.toLowerCase().endsWith(ext))) {\n continue;\n }\n const filePath = path.join(dirPath, file);\n const relativePath = path.relative(pmRoot, filePath);\n\n parseTasks.push(\n (async () => {\n try {\n const stat = await fs.stat(filePath);\n const mtimeMs = stat.mtimeMs;\n const ctimeMs = stat.ctimeMs;\n const { size } = stat;\n const itemFormat = getItemFormatFromPath(filePath) as ItemFormat;\n\n // Preserve onRead hook semantics even when served from cache, but only\n // when an extension actually observes reads. Surface hook warnings so\n // read-hook failures are not silently hidden.\n if (dispatchReadHooks) {\n for (const warning of await runActiveOnReadHooks({ path: filePath, scope: \"project\" })) {\n appendWarning(warnings, warning);\n }\n }\n\n const cachedEntry = previousEntries[relativePath];\n const metadataCached = cachedEntry !== undefined && statMatches(cachedEntry, mtimeMs, ctimeMs, size);\n const cachedBody = previousBodies[relativePath];\n const bodyCached = cachedBody !== undefined && statMatches(cachedBody, mtimeMs, ctimeMs, size);\n const cachedCollections = previousCollections[relativePath];\n const collectionsCached =\n cachedCollections !== undefined && statMatches(cachedCollections, mtimeMs, ctimeMs, size);\n\n const needRead =\n !metadataCached || (includeBody && !bodyCached) || (includeCollections && !collectionsCached);\n let lightMetadata: ItemMetadata;\n let heavyMetadata: Record<string, unknown> | undefined;\n let bodyLength: number;\n let body: string | undefined;\n\n if (needRead) {\n const raw = await fs.readFile(filePath, \"utf8\");\n const parsed = parseItemDocument(raw, {\n format: itemFormat,\n schema,\n extensionFieldNames,\n onWarning: (w) => appendWarning(warnings, w),\n });\n const split = splitHeavyMetadata(parsed.metadata);\n lightMetadata = metadataCached ? cachedEntry.metadata : split.light;\n bodyLength = metadataCached ? cachedEntry.body_length : parsed.body.length;\n body = includeBody ? parsed.body : undefined;\n if (includeCollections) {\n heavyMetadata = collectionsCached ? cachedCollections.collections : split.heavy;\n }\n if (!metadataCached) {\n metadataMiss = true;\n }\n if (includeBody && !bodyCached) {\n bodyMiss = true;\n }\n if (includeCollections && !collectionsCached) {\n collectionsMiss = true;\n }\n } else {\n lightMetadata = cachedEntry.metadata;\n bodyLength = cachedEntry.body_length;\n body = includeBody ? cachedBody.body : undefined;\n heavyMetadata = includeCollections && cachedCollections ? cachedCollections.collections : undefined;\n }\n\n newEntries[relativePath] = {\n mtime_ms: mtimeMs,\n ctime_ms: ctimeMs,\n size,\n metadata: lightMetadata,\n body_length: bodyLength,\n };\n if (includeBody && body !== undefined) {\n newBodies[relativePath] = { mtime_ms: mtimeMs, ctime_ms: ctimeMs, size, body };\n }\n if (includeCollections && heavyMetadata !== undefined) {\n newCollections[relativePath] = { mtime_ms: mtimeMs, ctime_ms: ctimeMs, size, collections: heavyMetadata };\n }\n\n const metadata = includeCollections ? mergeHeavyMetadata(lightMetadata, heavyMetadata) : lightMetadata;\n const existing = documentsById.get(metadata.id);\n const candidate: CachedDocumentCandidate = {\n metadata,\n body,\n item_format: itemFormat,\n item_path: filePath,\n };\n if (!existing || shouldReplaceCachedDocumentCandidate(existing.itemFormat, itemFormat, preferredFormat)) {\n documentsById.set(metadata.id, { candidate, itemFormat });\n }\n } catch {\n appendWarning(warnings, `item_list_item_read_failed:${folder}/${file}`);\n }\n })(),\n );\n }\n }\n\n await Promise.all(parseTasks);\n\n // Rewrite a cache file only when its contents changed: any re-parsed (missing or\n // stale) entry, or a different set of keys (additions/deletions).\n const metadataDirty = metadataMiss || Object.keys(previousEntries).length !== Object.keys(newEntries).length;\n if (metadataDirty || existingCache === null || existingCache.context_fingerprint !== contextFingerprint) {\n await persistCache(getCachePath(pmRoot), {\n version: CACHE_VERSION,\n context_fingerprint: contextFingerprint,\n entries: newEntries,\n }).catch(() => {});\n }\n\n if (includeBody) {\n const bodyDirty = bodyMiss || Object.keys(previousBodies).length !== Object.keys(newBodies).length;\n if (bodyDirty || existingBodyCache === null || existingBodyCache.context_fingerprint !== contextFingerprint) {\n await persistCache(getBodyCachePath(pmRoot), {\n version: CACHE_VERSION,\n context_fingerprint: contextFingerprint,\n bodies: newBodies,\n }).catch(() => {});\n }\n }\n\n if (includeCollections) {\n const collectionsDirty =\n collectionsMiss || Object.keys(previousCollections).length !== Object.keys(newCollections).length;\n if (\n collectionsDirty ||\n existingCollectionsCache === null ||\n existingCollectionsCache.context_fingerprint !== contextFingerprint\n ) {\n await persistCache(getCollectionsCachePath(pmRoot), {\n version: CACHE_VERSION,\n context_fingerprint: contextFingerprint,\n collections: newCollections,\n }).catch(() => {});\n }\n }\n\n return [...documentsById.values()]\n .sort((left, right) => left.candidate.metadata.id.localeCompare(right.candidate.metadata.id))\n .map((entry) => entry.candidate);\n}\n\nexport async function listAllDocumentsCached(\n pmRoot: string,\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n warnings: string[] | undefined,\n schema: RuntimeSchemaSettings | undefined,\n): Promise<ItemDocument[]> {\n const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, {\n includeBody: false,\n });\n return candidates.map((candidate) => ({\n metadata: candidate.metadata,\n body: candidate.body ?? \"\",\n }));\n}\n\n/**\n * Light variant of {@link listAllDocumentsCached}: returns metadata WITHOUT the heavy\n * collection fields (comments/notes/learnings/files/tests/test_runs/docs), skipping the\n * large collections cache entirely. Only safe for callers that read just the light\n * scalar/small fields (id/title/status/type/priority/parent/tags/dates/dependencies/…).\n */\nexport async function listAllDocumentsCachedLight(\n pmRoot: string,\n preferredFormat: ItemFormat | undefined,\n typeToFolder: Record<string, string>,\n warnings: string[] | undefined,\n schema: RuntimeSchemaSettings | undefined,\n): Promise<ItemDocument[]> {\n const candidates = await listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, {\n includeBody: false,\n includeCollections: false,\n });\n return candidates.map((candidate) => ({\n metadata: candidate.metadata,\n body: candidate.body ?? \"\",\n }));\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,+BAA+B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACrH,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGzE,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,cAAc,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AAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAc,EACd,eAAuC,EACvC,YAAoC,EACpC,QAA8B,EAC9B,MAAyC;IAEzC,MAAM,UAAU,GAAG,MAAM,+BAA+B,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;QAChH,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;IACH,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,EAAE;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAc,EACd,eAAuC,EACvC,YAAoC,EACpC,QAA8B,EAC9B,MAAyC;IAEzC,MAAM,UAAU,GAAG,MAAM,+BAA+B,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;QAChH,WAAW,EAAE,KAAK;QAClB,kBAAkB,EAAE,KAAK;KAC1B,CAAC,CAAC;IACH,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,EAAE;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC","debugId":"84a26eb8-27af-512b-9684-edc8f9c77970"}
|
package/dist/mcp/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4304a5af-f678-52e6-8caf-37ef0af19ca5")}catch(e){}}();
|
|
4
4
|
import { realpathSync } from "node:fs";
|
|
5
5
|
import readline from "node:readline";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -21,7 +21,7 @@ import { normalizeListOptions, normalizeUpdateOptions } from "../cli/registratio
|
|
|
21
21
|
import { UPDATE_COMMANDER_STRING_OPTION_CONTRACTS } from "../sdk/cli-contracts/commander-mutation-options.js";
|
|
22
22
|
import { clearWorkspaceContractsCache } from "../sdk/runtime.js";
|
|
23
23
|
import { TOOLS } from "./tool-definitions.js";
|
|
24
|
-
import { runActivity, runAggregate, runAppend, runClaim, runClose, runCloseMany, runComments, runContracts, runContext, runCreate, runCopy, runFocus, runConfig, runDelete, runDeps, runDocs, runExtension, runFiles, runFilesDiscover, runGc, runGet, runHealth, runHistory, runHistoryCompact, runHistoryRedact, runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget, runInit, runLearnings, runList, runNotes, runPlan, runRelease, runSchemaAddStatus, runSchemaAddType, runSchemaList, runSchemaRemoveStatus, runSchemaRemoveType, runSchemaShow, runSchemaShowStatus, runSearch, runStats, runTelemetry, runTest, runTestAll, runUpdate, runUpdateMany, runUpgrade, runValidate, } from "../cli/commands/index.js";
|
|
24
|
+
import { runActivity, runAggregate, runAppend, runClaim, runClose, runCloseMany, runComments, runContracts, runContext, runCreate, runCopy, runFocus, runConfig, runDelete, runDeps, runDocs, runExtension, runFiles, runFilesDiscover, runGc, runGet, runHealth, runHistory, runHistoryCompact, runHistoryRedact, runHistoryRepair, runHistoryRepairAll, assertHistoryRepairTarget, runInit, runLearnings, runList, runNotes, runPlan, runRelease, runSchemaAddStatus, runSchemaAddType, runSchemaAddField, runSchemaApplyPreset, runSchemaInferTypes, runSchemaList, runSchemaListFields, runSchemaRemoveStatus, runSchemaRemoveType, runSchemaRemoveField, runSchemaShow, runSchemaShowField, runSchemaShowStatus, runSearch, runStats, runTelemetry, runTest, runTestAll, runUpdate, runUpdateMany, runUpgrade, runValidate, } from "../cli/commands/index.js";
|
|
25
25
|
const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
26
26
|
function resolvePmPackageRoot() {
|
|
27
27
|
return fileURLToPath(new URL("../..", import.meta.url));
|
|
@@ -728,11 +728,44 @@ async function runAction(args) {
|
|
|
728
728
|
if (normalizedSubcommand === "show-status") {
|
|
729
729
|
return runSchemaShowStatus(schemaName, global);
|
|
730
730
|
}
|
|
731
|
+
if (normalizedSubcommand === "list-fields") {
|
|
732
|
+
return runSchemaListFields(global);
|
|
733
|
+
}
|
|
734
|
+
if (normalizedSubcommand === "show-field") {
|
|
735
|
+
return runSchemaShowField(schemaName, global);
|
|
736
|
+
}
|
|
731
737
|
if (normalizedSubcommand === "remove-type") {
|
|
732
738
|
return runSchemaRemoveType(schemaName, { author: schemaAuthor, force: schemaForce }, global);
|
|
733
739
|
}
|
|
740
|
+
if (normalizedSubcommand === "remove-field") {
|
|
741
|
+
return runSchemaRemoveField(schemaName, { author: schemaAuthor, force: schemaForce }, global);
|
|
742
|
+
}
|
|
743
|
+
if (normalizedSubcommand === "apply-preset") {
|
|
744
|
+
const presetSource = readString(args, "typePreset") ?? readString(options, "typePreset");
|
|
745
|
+
return runSchemaApplyPreset(presetSource, { author: schemaAuthor, force: schemaForce }, global);
|
|
746
|
+
}
|
|
734
747
|
const aliasSource = args.alias ?? options.alias;
|
|
735
748
|
const aliases = aliasSource === undefined ? undefined : readStringArray(aliasSource);
|
|
749
|
+
if (normalizedSubcommand === "add-field") {
|
|
750
|
+
const commandsSource = args.commands ?? options.commands;
|
|
751
|
+
const commands = commandsSource === undefined ? undefined : readStringArray(commandsSource);
|
|
752
|
+
const requiredTypesSource = args.requiredTypes ?? options.requiredTypes;
|
|
753
|
+
const requiredTypes = requiredTypesSource === undefined ? undefined : readStringArray(requiredTypesSource);
|
|
754
|
+
return runSchemaAddField(schemaName, {
|
|
755
|
+
type: readString(args, "fieldType") ?? readString(options, "fieldType"),
|
|
756
|
+
commands,
|
|
757
|
+
description: readString(args, "description") ?? readString(options, "description"),
|
|
758
|
+
cliFlag: readString(args, "cliFlag") ?? readString(options, "cliFlag"),
|
|
759
|
+
alias: aliases,
|
|
760
|
+
required: args.required === true || options.required === true,
|
|
761
|
+
requiredOnCreate: args.requiredOnCreate === true || options.requiredOnCreate === true,
|
|
762
|
+
// allow_unset defaults true; only an explicit false disables it.
|
|
763
|
+
allowUnset: !(args.allowUnset === false || options.allowUnset === false),
|
|
764
|
+
requiredTypes,
|
|
765
|
+
author: schemaAuthor,
|
|
766
|
+
force: schemaForce,
|
|
767
|
+
}, global);
|
|
768
|
+
}
|
|
736
769
|
if (normalizedSubcommand === "add-status") {
|
|
737
770
|
const roleSource = args.role ?? options.role;
|
|
738
771
|
const roles = roleSource === undefined ? undefined : readStringArray(roleSource);
|
|
@@ -764,7 +797,21 @@ async function runAction(args) {
|
|
|
764
797
|
return runSchemaRemoveStatus(schemaName, { author: schemaAuthor, force: schemaForce }, global);
|
|
765
798
|
}
|
|
766
799
|
if (normalizedSubcommand !== "add-type") {
|
|
767
|
-
throw new PmCliError(`Unknown pm schema subcommand "${subcommand}". Allowed: add-type, remove-type, add-status, remove-status, list, show, show-status`, 64);
|
|
800
|
+
throw new PmCliError(`Unknown pm schema subcommand "${subcommand}". Allowed: add-type, remove-type, add-status, remove-status, add-field, remove-field, list-fields, show-field, apply-preset, list, show, show-status`, 64);
|
|
801
|
+
}
|
|
802
|
+
if (args.infer === true || options.infer === true) {
|
|
803
|
+
const minCountSource = args.minCount ?? options.minCount;
|
|
804
|
+
const minCount = typeof minCountSource === "number"
|
|
805
|
+
? minCountSource
|
|
806
|
+
: typeof minCountSource === "string" && minCountSource.trim().length > 0
|
|
807
|
+
? Number(minCountSource)
|
|
808
|
+
: undefined;
|
|
809
|
+
return runSchemaInferTypes({
|
|
810
|
+
minCount,
|
|
811
|
+
apply: args.apply === true || options.apply === true,
|
|
812
|
+
author: schemaAuthor,
|
|
813
|
+
force: schemaForce,
|
|
814
|
+
}, global);
|
|
768
815
|
}
|
|
769
816
|
return runSchemaAddType(schemaName, {
|
|
770
817
|
description: readString(args, "description") ?? readString(options, "description"),
|
|
@@ -1029,4 +1076,4 @@ if (isInvokedAsMcpMainModule(process.argv[1], import.meta.url)) {
|
|
|
1029
1076
|
}
|
|
1030
1077
|
/* c8 ignore stop */
|
|
1031
1078
|
//# sourceMappingURL=server.js.map
|
|
1032
|
-
//# debugId=
|
|
1079
|
+
//# debugId=4304a5af-f678-52e6-8caf-37ef0af19ca5
|