@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
|
@@ -1,10 +1,13 @@
|
|
|
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]="09f8790c-5e80-5dab-92c7-b3cf333fcb58")}catch(e){}}();
|
|
3
3
|
import { pathExists, readFileIfExists, writeFileAtomic } from "../../core/fs/fs-utils.js";
|
|
4
4
|
import { acquireLock } from "../../core/lock/lock.js";
|
|
5
5
|
import { assertAliasesAvailable, assertTypeFolderAvailable, buildInvalidTypeHint, escapeForDoubleQuotes, normalizeAddTypeInput, parseItemTypesFile, removeItemType, serializeItemTypesFile, upsertItemType, } from "../../core/schema/item-types-file.js";
|
|
6
6
|
import { assertStatusTokensAvailable, BUILTIN_STATUS_IDS, normalizeAddStatusInput, normalizeStatusToken, parseStatusDefsFile, removeStatusDef, serializeStatusDefsFile, upsertStatusDef, } from "../../core/schema/status-defs-file.js";
|
|
7
|
-
import {
|
|
7
|
+
import { normalizeAddFieldInput, normalizeFieldKey, parseFieldsFile, removeField, serializeFieldsFile, upsertField, } from "../../core/schema/fields-file.js";
|
|
8
|
+
import { normalizeTypePresetName, resolveTypePresetDefinitions, TYPE_PRESET_NAMES, } from "../../core/schema/type-presets.js";
|
|
9
|
+
import { inferTypesFromTitles } from "../../core/schema/type-inference.js";
|
|
10
|
+
import { DEFAULT_RUNTIME_SCHEMA_FILE_PATHS, filePathForSchemaSection, normalizeRuntimeSchemaSettings, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, } from "../../core/schema/runtime-schema.js";
|
|
8
11
|
import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
|
|
9
12
|
import { listAllFrontMatterLight } from "../../core/store/item-store.js";
|
|
10
13
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
@@ -18,12 +21,18 @@ export const SCHEMA_SUBCOMMANDS = [
|
|
|
18
21
|
"remove-type",
|
|
19
22
|
"add-status",
|
|
20
23
|
"remove-status",
|
|
24
|
+
"add-field",
|
|
25
|
+
"remove-field",
|
|
26
|
+
"list-fields",
|
|
27
|
+
"show-field",
|
|
28
|
+
"apply-preset",
|
|
21
29
|
"list",
|
|
22
30
|
"show",
|
|
23
31
|
"show-status",
|
|
24
32
|
];
|
|
25
33
|
const SCHEMA_TYPES_LOCK_ID = "schema-types";
|
|
26
34
|
const SCHEMA_STATUSES_LOCK_ID = "schema-statuses";
|
|
35
|
+
const SCHEMA_FIELDS_LOCK_ID = "schema-fields";
|
|
27
36
|
function toAuthor(candidate, defaultAuthor) {
|
|
28
37
|
const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;
|
|
29
38
|
const trimmed = resolved.trim();
|
|
@@ -238,6 +247,26 @@ export async function runSchemaRemoveType(name, options, global) {
|
|
|
238
247
|
function statusesPathFor(pmRoot, schema) {
|
|
239
248
|
return filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses);
|
|
240
249
|
}
|
|
250
|
+
function fieldsPathFor(pmRoot, schema) {
|
|
251
|
+
return filePathForSchemaSection(pmRoot, schema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields);
|
|
252
|
+
}
|
|
253
|
+
function typesPathFor(pmRoot, schema) {
|
|
254
|
+
return filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
|
|
255
|
+
}
|
|
256
|
+
function toSchemaFieldSummary(field) {
|
|
257
|
+
return {
|
|
258
|
+
key: field.key,
|
|
259
|
+
type: field.type,
|
|
260
|
+
commands: [...field.commands],
|
|
261
|
+
cli_flag: `--${field.cli_flag}`,
|
|
262
|
+
cli_aliases: field.cli_aliases.map((alias) => `--${alias}`),
|
|
263
|
+
...(field.description ? { description: field.description } : {}),
|
|
264
|
+
required: field.required,
|
|
265
|
+
required_on_create: field.required_on_create,
|
|
266
|
+
allow_unset: field.allow_unset,
|
|
267
|
+
required_types: [...field.required_types],
|
|
268
|
+
};
|
|
269
|
+
}
|
|
241
270
|
export async function runSchemaAddStatus(id, options, global) {
|
|
242
271
|
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
243
272
|
await ensureInitialized(pmRoot);
|
|
@@ -509,6 +538,7 @@ async function loadSchemaInspectionContext(global) {
|
|
|
509
538
|
.map((definition) => definition.name.trim().toLowerCase())
|
|
510
539
|
.filter((name) => name.length > 0 && !extensionProvenance.has(name)));
|
|
511
540
|
return {
|
|
541
|
+
pmRoot,
|
|
512
542
|
typesPath,
|
|
513
543
|
statusesPath,
|
|
514
544
|
byType: registry.by_type,
|
|
@@ -536,6 +566,7 @@ export async function runSchemaList(global) {
|
|
|
536
566
|
}
|
|
537
567
|
}
|
|
538
568
|
const statusSummaries = buildSchemaStatusSummaries(context.schema);
|
|
569
|
+
const fieldSummaries = resolveRuntimeFieldRegistry(context.schema).definitions.map(toSchemaFieldSummary);
|
|
539
570
|
return {
|
|
540
571
|
action: "list",
|
|
541
572
|
builtin,
|
|
@@ -556,6 +587,12 @@ export async function runSchemaList(global) {
|
|
|
556
587
|
total: statusSummaries.builtin.length + statusSummaries.custom.length,
|
|
557
588
|
},
|
|
558
589
|
},
|
|
590
|
+
fields: {
|
|
591
|
+
custom: fieldSummaries,
|
|
592
|
+
counts: {
|
|
593
|
+
total: fieldSummaries.length,
|
|
594
|
+
},
|
|
595
|
+
},
|
|
559
596
|
file: {
|
|
560
597
|
path: context.typesPath,
|
|
561
598
|
},
|
|
@@ -603,6 +640,352 @@ export async function runSchemaShowStatus(id, global) {
|
|
|
603
640
|
generated_at: nowIso(),
|
|
604
641
|
};
|
|
605
642
|
}
|
|
643
|
+
export async function runSchemaAddField(key, options, global) {
|
|
644
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
645
|
+
await ensureInitialized(pmRoot);
|
|
646
|
+
let normalized;
|
|
647
|
+
try {
|
|
648
|
+
normalized = normalizeAddFieldInput({
|
|
649
|
+
key,
|
|
650
|
+
type: options.type,
|
|
651
|
+
commands: options.commands,
|
|
652
|
+
description: options.description,
|
|
653
|
+
cliFlag: options.cliFlag,
|
|
654
|
+
aliases: options.alias,
|
|
655
|
+
required: options.required,
|
|
656
|
+
requiredOnCreate: options.requiredOnCreate,
|
|
657
|
+
allowUnset: options.allowUnset,
|
|
658
|
+
requiredTypes: options.requiredTypes,
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
catch (error) {
|
|
662
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
663
|
+
}
|
|
664
|
+
const settings = await readSettings(pmRoot);
|
|
665
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
666
|
+
const fieldsPath = fieldsPathFor(pmRoot, schema);
|
|
667
|
+
const warnings = [];
|
|
668
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
669
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
670
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_FIELDS_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
671
|
+
let upsert;
|
|
672
|
+
try {
|
|
673
|
+
const previousRaw = await readFileIfExists(fieldsPath);
|
|
674
|
+
let parsed;
|
|
675
|
+
try {
|
|
676
|
+
parsed = parseFieldsFile(previousRaw);
|
|
677
|
+
}
|
|
678
|
+
catch (error) {
|
|
679
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
680
|
+
}
|
|
681
|
+
upsert = upsertField(parsed, normalized);
|
|
682
|
+
await writeFileAtomic(fieldsPath, serializeFieldsFile(upsert.file));
|
|
683
|
+
warnings.push(...(await runActiveOnWriteHooks({
|
|
684
|
+
path: fieldsPath,
|
|
685
|
+
scope: "project",
|
|
686
|
+
op: "schema:add-field",
|
|
687
|
+
})));
|
|
688
|
+
}
|
|
689
|
+
finally {
|
|
690
|
+
await releaseLock();
|
|
691
|
+
}
|
|
692
|
+
return {
|
|
693
|
+
action: "add-field",
|
|
694
|
+
registered: true,
|
|
695
|
+
replaced: upsert.replaced,
|
|
696
|
+
field: upsert.definition,
|
|
697
|
+
file: {
|
|
698
|
+
path: fieldsPath,
|
|
699
|
+
fields: upsert.file.fields.length,
|
|
700
|
+
},
|
|
701
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
702
|
+
generated_at: nowIso(),
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Counts items carrying a non-empty value for the custom field's metadata key.
|
|
707
|
+
* Advisory only (non-blocking) so remove-field can surface how many items would
|
|
708
|
+
* lose a managed column. Reuses the already-loaded settings (no disk re-read).
|
|
709
|
+
*/
|
|
710
|
+
async function countItemsUsingField(pmRoot, settings, schema, metadataKey) {
|
|
711
|
+
const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
712
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);
|
|
713
|
+
return items.filter((item) => {
|
|
714
|
+
const value = item[metadataKey];
|
|
715
|
+
if (value === undefined || value === null) {
|
|
716
|
+
return false;
|
|
717
|
+
}
|
|
718
|
+
if (Array.isArray(value)) {
|
|
719
|
+
return value.length > 0;
|
|
720
|
+
}
|
|
721
|
+
if (typeof value === "string") {
|
|
722
|
+
return value.trim().length > 0;
|
|
723
|
+
}
|
|
724
|
+
return true;
|
|
725
|
+
}).length;
|
|
726
|
+
}
|
|
727
|
+
export async function runSchemaRemoveField(key, options, global) {
|
|
728
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
729
|
+
await ensureInitialized(pmRoot);
|
|
730
|
+
const settings = await readSettings(pmRoot);
|
|
731
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
732
|
+
const fieldsPath = fieldsPathFor(pmRoot, schema);
|
|
733
|
+
const warnings = [];
|
|
734
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
735
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
736
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_FIELDS_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
737
|
+
let removal;
|
|
738
|
+
try {
|
|
739
|
+
const previousRaw = await readFileIfExists(fieldsPath);
|
|
740
|
+
let parsed;
|
|
741
|
+
try {
|
|
742
|
+
parsed = parseFieldsFile(previousRaw);
|
|
743
|
+
}
|
|
744
|
+
catch (error) {
|
|
745
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
746
|
+
}
|
|
747
|
+
try {
|
|
748
|
+
removal = removeField(parsed, key);
|
|
749
|
+
}
|
|
750
|
+
catch (error) {
|
|
751
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
752
|
+
}
|
|
753
|
+
if (removal.removed) {
|
|
754
|
+
const removedKey = normalizeFieldKey(removal.definition?.key ?? key);
|
|
755
|
+
const metadataKey = normalizeFieldKey(removal.definition?.metadata_key ?? removal.definition?.front_matter_key ?? removedKey);
|
|
756
|
+
if (metadataKey.length > 0) {
|
|
757
|
+
const usingField = await countItemsUsingField(pmRoot, settings, schema, metadataKey);
|
|
758
|
+
if (usingField > 0) {
|
|
759
|
+
warnings.push(`items_using_field:${usingField}`);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
await writeFileAtomic(fieldsPath, serializeFieldsFile(removal.file));
|
|
763
|
+
warnings.push(...(await runActiveOnWriteHooks({
|
|
764
|
+
path: fieldsPath,
|
|
765
|
+
scope: "project",
|
|
766
|
+
op: "schema:remove-field",
|
|
767
|
+
})));
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
finally {
|
|
771
|
+
await releaseLock();
|
|
772
|
+
}
|
|
773
|
+
return {
|
|
774
|
+
action: "remove-field",
|
|
775
|
+
removed: removal.removed,
|
|
776
|
+
...(removal.definition ? { field: removal.definition } : {}),
|
|
777
|
+
file: {
|
|
778
|
+
path: fieldsPath,
|
|
779
|
+
fields: removal.file.fields.length,
|
|
780
|
+
},
|
|
781
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
782
|
+
generated_at: nowIso(),
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
export async function runSchemaListFields(global) {
|
|
786
|
+
const context = await loadSchemaInspectionContext(global);
|
|
787
|
+
const fields = resolveRuntimeFieldRegistry(context.schema).definitions.map(toSchemaFieldSummary);
|
|
788
|
+
return {
|
|
789
|
+
action: "list-fields",
|
|
790
|
+
fields,
|
|
791
|
+
counts: {
|
|
792
|
+
total: fields.length,
|
|
793
|
+
},
|
|
794
|
+
file: {
|
|
795
|
+
path: fieldsPathFor(context.pmRoot, context.schema),
|
|
796
|
+
},
|
|
797
|
+
generated_at: nowIso(),
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
export async function runSchemaShowField(key, global) {
|
|
801
|
+
const fieldKey = normalizeFieldKey(key);
|
|
802
|
+
if (fieldKey.length === 0) {
|
|
803
|
+
throw new PmCliError("Field key must not be empty.", EXIT_CODE.USAGE);
|
|
804
|
+
}
|
|
805
|
+
const context = await loadSchemaInspectionContext(global);
|
|
806
|
+
const match = resolveRuntimeFieldRegistry(context.schema).by_key.get(fieldKey);
|
|
807
|
+
if (!match) {
|
|
808
|
+
throw new PmCliError(`Unknown custom field "${key}". Run pm schema list-fields to inspect registered fields, or pm schema add-field "${escapeForDoubleQuotes(key ?? "")}" to register it.`, EXIT_CODE.NOT_FOUND, { code: "unknown_field" });
|
|
809
|
+
}
|
|
810
|
+
return {
|
|
811
|
+
action: "show-field",
|
|
812
|
+
field: toSchemaFieldSummary(match),
|
|
813
|
+
file: {
|
|
814
|
+
path: fieldsPathFor(context.pmRoot, context.schema),
|
|
815
|
+
},
|
|
816
|
+
generated_at: nowIso(),
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
export async function runSchemaApplyPreset(preset, options, global) {
|
|
820
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
821
|
+
await ensureInitialized(pmRoot);
|
|
822
|
+
let presetName;
|
|
823
|
+
try {
|
|
824
|
+
const normalized = normalizeTypePresetName(preset);
|
|
825
|
+
if (normalized === undefined) {
|
|
826
|
+
throw new Error(`Type preset name is required. Allowed: ${TYPE_PRESET_NAMES.join(", ")}.`);
|
|
827
|
+
}
|
|
828
|
+
presetName = normalized;
|
|
829
|
+
}
|
|
830
|
+
catch (error) {
|
|
831
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
832
|
+
}
|
|
833
|
+
const settings = await readSettings(pmRoot);
|
|
834
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
835
|
+
const typesPath = typesPathFor(pmRoot, schema);
|
|
836
|
+
const warnings = [];
|
|
837
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
838
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
839
|
+
const registered = [];
|
|
840
|
+
const replaced = [];
|
|
841
|
+
let definitionsCount = 0;
|
|
842
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
843
|
+
try {
|
|
844
|
+
const previousRaw = await readFileIfExists(typesPath);
|
|
845
|
+
let parsed;
|
|
846
|
+
try {
|
|
847
|
+
parsed = parseItemTypesFile(previousRaw);
|
|
848
|
+
}
|
|
849
|
+
catch (error) {
|
|
850
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
851
|
+
}
|
|
852
|
+
let nextFile = parsed;
|
|
853
|
+
for (const normalized of resolveTypePresetDefinitions(presetName)) {
|
|
854
|
+
const upsert = upsertItemType(nextFile, normalized);
|
|
855
|
+
nextFile = upsert.file;
|
|
856
|
+
(upsert.replaced ? replaced : registered).push(upsert.definition.name);
|
|
857
|
+
}
|
|
858
|
+
definitionsCount = nextFile.definitions.length;
|
|
859
|
+
await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));
|
|
860
|
+
warnings.push(...(await runActiveOnWriteHooks({
|
|
861
|
+
path: typesPath,
|
|
862
|
+
scope: "project",
|
|
863
|
+
op: "schema:apply-preset",
|
|
864
|
+
})));
|
|
865
|
+
}
|
|
866
|
+
finally {
|
|
867
|
+
await releaseLock();
|
|
868
|
+
}
|
|
869
|
+
return {
|
|
870
|
+
action: "apply-preset",
|
|
871
|
+
preset: presetName,
|
|
872
|
+
registered,
|
|
873
|
+
replaced,
|
|
874
|
+
file: {
|
|
875
|
+
path: typesPath,
|
|
876
|
+
definitions: definitionsCount,
|
|
877
|
+
},
|
|
878
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
879
|
+
generated_at: nowIso(),
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
export async function runSchemaInferTypes(options, global) {
|
|
883
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
884
|
+
await ensureInitialized(pmRoot);
|
|
885
|
+
const settings = await readSettings(pmRoot);
|
|
886
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
887
|
+
const typesPath = typesPathFor(pmRoot, schema);
|
|
888
|
+
let minCount = 10;
|
|
889
|
+
if (options.minCount !== undefined) {
|
|
890
|
+
if (!Number.isInteger(options.minCount) || options.minCount < 1) {
|
|
891
|
+
throw new PmCliError("--min-count must be a positive integer (>= 1).", EXIT_CODE.USAGE);
|
|
892
|
+
}
|
|
893
|
+
minCount = options.minCount;
|
|
894
|
+
}
|
|
895
|
+
const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
896
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);
|
|
897
|
+
const titles = items.map((item) => (typeof item.title === "string" ? item.title : ""));
|
|
898
|
+
const candidates = inferTypesFromTitles(titles, { minCount });
|
|
899
|
+
const warnings = [];
|
|
900
|
+
const registered = [];
|
|
901
|
+
const replaced = [];
|
|
902
|
+
const skipped = [];
|
|
903
|
+
let definitionsCount;
|
|
904
|
+
// Dry-run preview by default: only --apply mutates schema/types.json.
|
|
905
|
+
if (!options.apply) {
|
|
906
|
+
let parsed;
|
|
907
|
+
try {
|
|
908
|
+
parsed = parseItemTypesFile(await readFileIfExists(typesPath));
|
|
909
|
+
}
|
|
910
|
+
catch (error) {
|
|
911
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
912
|
+
}
|
|
913
|
+
definitionsCount = parsed.definitions.length;
|
|
914
|
+
return {
|
|
915
|
+
action: "infer-types",
|
|
916
|
+
applied: false,
|
|
917
|
+
min_count: minCount,
|
|
918
|
+
candidates,
|
|
919
|
+
registered,
|
|
920
|
+
replaced,
|
|
921
|
+
skipped,
|
|
922
|
+
file: {
|
|
923
|
+
path: typesPath,
|
|
924
|
+
definitions: definitionsCount,
|
|
925
|
+
},
|
|
926
|
+
warnings,
|
|
927
|
+
generated_at: nowIso(),
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
931
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
932
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
933
|
+
try {
|
|
934
|
+
const previousRaw = await readFileIfExists(typesPath);
|
|
935
|
+
let parsed;
|
|
936
|
+
try {
|
|
937
|
+
parsed = parseItemTypesFile(previousRaw);
|
|
938
|
+
}
|
|
939
|
+
catch (error) {
|
|
940
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
941
|
+
}
|
|
942
|
+
let nextFile = parsed;
|
|
943
|
+
for (const candidate of candidates) {
|
|
944
|
+
if (candidate.shadows_builtin) {
|
|
945
|
+
skipped.push({ name: candidate.name, reason: "shadows_builtin" });
|
|
946
|
+
continue;
|
|
947
|
+
}
|
|
948
|
+
let normalized;
|
|
949
|
+
try {
|
|
950
|
+
normalized = normalizeAddTypeInput({ name: candidate.name });
|
|
951
|
+
}
|
|
952
|
+
catch {
|
|
953
|
+
// A title prefix that does not normalize to a valid type token (rare,
|
|
954
|
+
// given the inference pattern) is skipped rather than aborting the batch.
|
|
955
|
+
skipped.push({ name: candidate.name, reason: "invalid_type_token" });
|
|
956
|
+
continue;
|
|
957
|
+
}
|
|
958
|
+
const upsert = upsertItemType(nextFile, normalized);
|
|
959
|
+
nextFile = upsert.file;
|
|
960
|
+
(upsert.replaced ? replaced : registered).push(upsert.definition.name);
|
|
961
|
+
}
|
|
962
|
+
definitionsCount = nextFile.definitions.length;
|
|
963
|
+
await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));
|
|
964
|
+
warnings.push(...(await runActiveOnWriteHooks({
|
|
965
|
+
path: typesPath,
|
|
966
|
+
scope: "project",
|
|
967
|
+
op: "schema:infer-types",
|
|
968
|
+
})));
|
|
969
|
+
}
|
|
970
|
+
finally {
|
|
971
|
+
await releaseLock();
|
|
972
|
+
}
|
|
973
|
+
return {
|
|
974
|
+
action: "infer-types",
|
|
975
|
+
applied: true,
|
|
976
|
+
min_count: minCount,
|
|
977
|
+
candidates,
|
|
978
|
+
registered,
|
|
979
|
+
replaced,
|
|
980
|
+
skipped,
|
|
981
|
+
file: {
|
|
982
|
+
path: typesPath,
|
|
983
|
+
definitions: definitionsCount,
|
|
984
|
+
},
|
|
985
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
986
|
+
generated_at: nowIso(),
|
|
987
|
+
};
|
|
988
|
+
}
|
|
606
989
|
export function formatSchemaAddTypeHuman(result) {
|
|
607
990
|
const verb = result.replaced ? "Updated" : "Registered";
|
|
608
991
|
const aliasSuffix = result.type.aliases && result.type.aliases.length > 0 ? ` (aliases: ${result.type.aliases.join(", ")})` : "";
|
|
@@ -652,8 +1035,13 @@ export function formatSchemaListHuman(result) {
|
|
|
652
1035
|
}
|
|
653
1036
|
lines.push(`${label}: ${entries.map((entry) => entry.id).join(", ")}`);
|
|
654
1037
|
}
|
|
1038
|
+
lines.push(`custom fields: ${result.fields.counts.total} total`);
|
|
1039
|
+
if (result.fields.custom.length > 0) {
|
|
1040
|
+
lines.push(`fields: ${result.fields.custom.map((field) => `${field.key} (${field.type}, ${field.cli_flag})`).join(", ")}`);
|
|
1041
|
+
}
|
|
655
1042
|
lines.push(`Inspect one: pm schema show <Type>`);
|
|
656
1043
|
lines.push(`Inspect one status: pm schema show-status <status>`);
|
|
1044
|
+
lines.push(`Inspect one field: pm schema show-field <key>`);
|
|
657
1045
|
return lines.join("\n");
|
|
658
1046
|
}
|
|
659
1047
|
export function formatSchemaShowHuman(result) {
|
|
@@ -695,6 +1083,97 @@ export function formatSchemaShowStatusHuman(result) {
|
|
|
695
1083
|
}
|
|
696
1084
|
return parts.join("\n");
|
|
697
1085
|
}
|
|
1086
|
+
function formatFieldSummaryLine(field) {
|
|
1087
|
+
const flags = [];
|
|
1088
|
+
if (field.required) {
|
|
1089
|
+
flags.push("required");
|
|
1090
|
+
}
|
|
1091
|
+
if (field.required_on_create) {
|
|
1092
|
+
flags.push("required_on_create");
|
|
1093
|
+
}
|
|
1094
|
+
if (!field.allow_unset) {
|
|
1095
|
+
flags.push("no_unset");
|
|
1096
|
+
}
|
|
1097
|
+
const flagSuffix = flags.length > 0 ? ` [${flags.join(", ")}]` : "";
|
|
1098
|
+
return `${field.key} (${field.type}) ${field.cli_flag} commands=${field.commands.join("/")}${flagSuffix}`;
|
|
1099
|
+
}
|
|
1100
|
+
export function formatSchemaAddFieldHuman(result) {
|
|
1101
|
+
const verb = result.replaced ? "Updated" : "Registered";
|
|
1102
|
+
return `${verb} custom field "${result.field.key}" in ${result.file.path}. Use it: pm create "<title>" --${(result.field.cli_flag ?? result.field.key).replaceAll("_", "-")} <value>`;
|
|
1103
|
+
}
|
|
1104
|
+
export function formatSchemaRemoveFieldHuman(result) {
|
|
1105
|
+
if (!result.removed) {
|
|
1106
|
+
return `No custom field matched; nothing removed from ${result.file.path}.`;
|
|
1107
|
+
}
|
|
1108
|
+
const key = result.field?.key ?? "(unknown)";
|
|
1109
|
+
return `Removed custom field "${key}" from ${result.file.path}.`;
|
|
1110
|
+
}
|
|
1111
|
+
export function formatSchemaListFieldsHuman(result) {
|
|
1112
|
+
const lines = [`Custom fields: ${result.counts.total} total`];
|
|
1113
|
+
for (const field of result.fields) {
|
|
1114
|
+
lines.push(` ${formatFieldSummaryLine(field)}`);
|
|
1115
|
+
}
|
|
1116
|
+
lines.push(`Inspect one: pm schema show-field <key>`);
|
|
1117
|
+
return lines.join("\n");
|
|
1118
|
+
}
|
|
1119
|
+
export function formatSchemaShowFieldHuman(result) {
|
|
1120
|
+
const field = result.field;
|
|
1121
|
+
const parts = [
|
|
1122
|
+
`field: ${field.key}`,
|
|
1123
|
+
`type: ${field.type}`,
|
|
1124
|
+
`cli_flag: ${field.cli_flag}`,
|
|
1125
|
+
`commands: ${field.commands.join(", ")}`,
|
|
1126
|
+
];
|
|
1127
|
+
if (field.cli_aliases.length > 0) {
|
|
1128
|
+
parts.push(`cli_aliases: ${field.cli_aliases.join(", ")}`);
|
|
1129
|
+
}
|
|
1130
|
+
if (field.description) {
|
|
1131
|
+
parts.push(`description: ${field.description}`);
|
|
1132
|
+
}
|
|
1133
|
+
if (field.required) {
|
|
1134
|
+
parts.push(`required: true`);
|
|
1135
|
+
}
|
|
1136
|
+
if (field.required_on_create) {
|
|
1137
|
+
parts.push(`required_on_create: true`);
|
|
1138
|
+
}
|
|
1139
|
+
if (!field.allow_unset) {
|
|
1140
|
+
parts.push(`allow_unset: false`);
|
|
1141
|
+
}
|
|
1142
|
+
if (field.required_types.length > 0) {
|
|
1143
|
+
parts.push(`required_types: ${field.required_types.join(", ")}`);
|
|
1144
|
+
}
|
|
1145
|
+
return parts.join("\n");
|
|
1146
|
+
}
|
|
1147
|
+
export function formatSchemaApplyPresetHuman(result) {
|
|
1148
|
+
const registered = result.registered.length > 0 ? `registered: ${result.registered.join(", ")}` : "";
|
|
1149
|
+
const replaced = result.replaced.length > 0 ? `updated: ${result.replaced.join(", ")}` : "";
|
|
1150
|
+
const detail = [registered, replaced].filter((part) => part.length > 0).join("; ");
|
|
1151
|
+
return `Applied "${result.preset}" type preset to ${result.file.path}${detail.length > 0 ? ` (${detail})` : ""}.`;
|
|
1152
|
+
}
|
|
1153
|
+
export function formatSchemaInferTypesHuman(result) {
|
|
1154
|
+
if (result.candidates.length === 0) {
|
|
1155
|
+
return `No title-prefix conventions found with at least ${result.min_count} items. Lower the threshold with --min-count <n>.`;
|
|
1156
|
+
}
|
|
1157
|
+
const lines = result.applied
|
|
1158
|
+
? [`Inferred and registered custom types from title prefixes (min-count ${result.min_count}):`]
|
|
1159
|
+
: [`Inferred custom type candidates from title prefixes (min-count ${result.min_count}, dry-run):`];
|
|
1160
|
+
for (const candidate of result.candidates) {
|
|
1161
|
+
const note = candidate.shadows_builtin ? " [shadows built-in, skipped]" : "";
|
|
1162
|
+
lines.push(` ${candidate.name} <- "${candidate.prefix}" (${candidate.count} items)${note}`);
|
|
1163
|
+
}
|
|
1164
|
+
if (!result.applied) {
|
|
1165
|
+
lines.push(`Re-run with --apply to register the non-shadowing candidates.`);
|
|
1166
|
+
}
|
|
1167
|
+
else {
|
|
1168
|
+
if (result.registered.length > 0) {
|
|
1169
|
+
lines.push(`registered: ${result.registered.join(", ")}`);
|
|
1170
|
+
}
|
|
1171
|
+
if (result.replaced.length > 0) {
|
|
1172
|
+
lines.push(`updated: ${result.replaced.join(", ")}`);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
return lines.join("\n");
|
|
1176
|
+
}
|
|
698
1177
|
/* c8 ignore stop */
|
|
699
1178
|
/**
|
|
700
1179
|
* Re-export so register-mutation can surface the hint in usage examples
|
|
@@ -706,4 +1185,4 @@ export const _testOnlySchemaCommand = {
|
|
|
706
1185
|
workflowSlotsReferencing,
|
|
707
1186
|
};
|
|
708
1187
|
//# sourceMappingURL=schema.js.map
|
|
709
|
-
//# debugId=
|
|
1188
|
+
//# debugId=09f8790c-5e80-5dab-92c7-b3cf333fcb58
|