@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,31 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TYPE_PRESET_NAMES,
|
|
3
|
+
normalizeTypePresetName,
|
|
4
|
+
resolveTypePresetDefinitions
|
|
5
|
+
} from "./chunk-TEFEXQWI.js";
|
|
1
6
|
import {
|
|
2
7
|
assertAliasesAvailable,
|
|
3
8
|
assertTypeFolderAvailable,
|
|
4
9
|
buildInvalidTypeHint,
|
|
5
10
|
escapeForDoubleQuotes,
|
|
11
|
+
matchBuiltinTypeName,
|
|
6
12
|
normalizeAddTypeInput,
|
|
7
13
|
parseItemTypesFile,
|
|
8
14
|
removeItemType,
|
|
9
15
|
serializeItemTypesFile,
|
|
10
16
|
upsertItemType
|
|
11
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5FDYWOJT.js";
|
|
12
18
|
import {
|
|
13
19
|
acquireLock,
|
|
14
20
|
listAllFrontMatterLight
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-KA22USXD.js";
|
|
22
|
+
import "./chunk-5XGWFUW2.js";
|
|
23
|
+
import "./chunk-TBV33CB4.js";
|
|
18
24
|
import {
|
|
19
25
|
resolveItemTypeRegistry
|
|
20
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QXMXRPX5.js";
|
|
21
27
|
import {
|
|
22
28
|
nowIso
|
|
23
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-LNH5Q32E.js";
|
|
24
30
|
import {
|
|
25
31
|
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
26
32
|
DEFAULT_RUNTIME_STATUS_DEFINITIONS,
|
|
27
33
|
EXIT_CODE,
|
|
28
34
|
PmCliError,
|
|
35
|
+
RUNTIME_FIELD_COMMAND_VALUES,
|
|
36
|
+
RUNTIME_FIELD_TYPE_VALUES,
|
|
29
37
|
RUNTIME_STATUS_ROLE_VALUES,
|
|
30
38
|
filePathForSchemaSection,
|
|
31
39
|
getActiveExtensionRegistrations,
|
|
@@ -36,10 +44,11 @@ import {
|
|
|
36
44
|
readSettings,
|
|
37
45
|
resolveGovernanceKnobs,
|
|
38
46
|
resolvePmRoot,
|
|
47
|
+
resolveRuntimeFieldRegistry,
|
|
39
48
|
resolveRuntimeStatusRegistry,
|
|
40
49
|
runActiveOnWriteHooks,
|
|
41
50
|
writeFileAtomic
|
|
42
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-CHM2VFVL.js";
|
|
43
52
|
|
|
44
53
|
// dist/core/schema/status-defs-file.js
|
|
45
54
|
!(function() {
|
|
@@ -223,11 +232,321 @@ function assertStatusTokensAvailable(input, resolvedAliasToId) {
|
|
|
223
232
|
}
|
|
224
233
|
}
|
|
225
234
|
|
|
235
|
+
// dist/core/schema/fields-file.js
|
|
236
|
+
!(function() {
|
|
237
|
+
try {
|
|
238
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
239
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "01bca6b9-49d3-5785-9d18-8399a0aac293");
|
|
240
|
+
} catch (e2) {
|
|
241
|
+
}
|
|
242
|
+
})();
|
|
243
|
+
var RUNTIME_FIELD_TYPE_SET = new Set(RUNTIME_FIELD_TYPE_VALUES);
|
|
244
|
+
var RUNTIME_FIELD_COMMAND_SET = new Set(RUNTIME_FIELD_COMMAND_VALUES);
|
|
245
|
+
var BUILTIN_FIELD_KEYS = /* @__PURE__ */ new Set([
|
|
246
|
+
"id",
|
|
247
|
+
"title",
|
|
248
|
+
"type",
|
|
249
|
+
"status",
|
|
250
|
+
"priority",
|
|
251
|
+
"tags",
|
|
252
|
+
"assignee",
|
|
253
|
+
"parent",
|
|
254
|
+
"description",
|
|
255
|
+
"body",
|
|
256
|
+
"created_at",
|
|
257
|
+
"updated_at",
|
|
258
|
+
"closed_at",
|
|
259
|
+
"author",
|
|
260
|
+
"deadline",
|
|
261
|
+
"estimate",
|
|
262
|
+
"sprint",
|
|
263
|
+
"release",
|
|
264
|
+
"risk",
|
|
265
|
+
"confidence",
|
|
266
|
+
"reviewer",
|
|
267
|
+
"resolution",
|
|
268
|
+
"expected",
|
|
269
|
+
"actual"
|
|
270
|
+
]);
|
|
271
|
+
var DEFAULT_FIELD_COMMANDS = ["create", "update"];
|
|
272
|
+
function normalizeFieldKey(value) {
|
|
273
|
+
return typeof value === "string" ? value.trim().toLowerCase().replaceAll(/[\s-]+/g, "_") : "";
|
|
274
|
+
}
|
|
275
|
+
function normalizeCliToken(value) {
|
|
276
|
+
if (typeof value !== "string") {
|
|
277
|
+
return "";
|
|
278
|
+
}
|
|
279
|
+
const collapsed = value.trim().toLowerCase().replaceAll(/[\s_]+/g, "-");
|
|
280
|
+
return collapsed.startsWith("--") ? collapsed.slice(2) : collapsed;
|
|
281
|
+
}
|
|
282
|
+
function keyToDefaultCliFlag(key) {
|
|
283
|
+
return key.replaceAll("_", "-");
|
|
284
|
+
}
|
|
285
|
+
function dedupeCliTokens(values, exclude) {
|
|
286
|
+
const seen = /* @__PURE__ */ new Set();
|
|
287
|
+
for (const value of values) {
|
|
288
|
+
const token = normalizeCliToken(value);
|
|
289
|
+
if (token.length > 0 && token !== exclude) {
|
|
290
|
+
seen.add(token);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return [...seen].sort((left, right) => left.localeCompare(right));
|
|
294
|
+
}
|
|
295
|
+
function dedupeStringList(values) {
|
|
296
|
+
const seen = /* @__PURE__ */ new Set();
|
|
297
|
+
for (const value of values ?? []) {
|
|
298
|
+
const trimmed = value.trim();
|
|
299
|
+
if (trimmed.length > 0) {
|
|
300
|
+
seen.add(trimmed);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return [...seen].sort((left, right) => left.localeCompare(right));
|
|
304
|
+
}
|
|
305
|
+
function normalizeAddFieldInput(raw) {
|
|
306
|
+
const key = normalizeFieldKey(raw.key);
|
|
307
|
+
if (key.length === 0) {
|
|
308
|
+
throw new Error("Field key must not be empty.");
|
|
309
|
+
}
|
|
310
|
+
if (BUILTIN_FIELD_KEYS.has(key)) {
|
|
311
|
+
throw new Error(`Cannot define custom field "${key}": it shadows a built-in field. Built-in fields are reserved.`);
|
|
312
|
+
}
|
|
313
|
+
const typeCandidate = typeof raw.type === "string" && raw.type.trim().length > 0 ? raw.type.trim().toLowerCase() : "string";
|
|
314
|
+
if (!RUNTIME_FIELD_TYPE_SET.has(typeCandidate)) {
|
|
315
|
+
throw new Error(`Invalid field type "${raw.type}". Allowed: ${RUNTIME_FIELD_TYPE_VALUES.join(", ")}.`);
|
|
316
|
+
}
|
|
317
|
+
const type = typeCandidate;
|
|
318
|
+
let commands;
|
|
319
|
+
if (raw.commands === void 0) {
|
|
320
|
+
commands = [...DEFAULT_FIELD_COMMANDS];
|
|
321
|
+
} else {
|
|
322
|
+
const seen = /* @__PURE__ */ new Set();
|
|
323
|
+
const normalized = [];
|
|
324
|
+
for (const rawCommand of raw.commands) {
|
|
325
|
+
const command = rawCommand.trim().toLowerCase();
|
|
326
|
+
if (command.length === 0) {
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
if (!RUNTIME_FIELD_COMMAND_SET.has(command)) {
|
|
330
|
+
throw new Error(`Invalid field command "${rawCommand}". Allowed: ${RUNTIME_FIELD_COMMAND_VALUES.join(", ")}.`);
|
|
331
|
+
}
|
|
332
|
+
if (!seen.has(command)) {
|
|
333
|
+
seen.add(command);
|
|
334
|
+
normalized.push(command);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
commands = normalized.length > 0 ? normalized : [...DEFAULT_FIELD_COMMANDS];
|
|
338
|
+
}
|
|
339
|
+
const cliFlagToken = normalizeCliToken(raw.cliFlag);
|
|
340
|
+
const cliFlag = cliFlagToken.length > 0 && cliFlagToken !== keyToDefaultCliFlag(key) ? cliFlagToken : void 0;
|
|
341
|
+
const effectiveFlag = cliFlag ?? keyToDefaultCliFlag(key);
|
|
342
|
+
const cliAliases = dedupeCliTokens(raw.aliases ?? [], effectiveFlag);
|
|
343
|
+
const description = raw.description?.trim();
|
|
344
|
+
return {
|
|
345
|
+
key,
|
|
346
|
+
type,
|
|
347
|
+
commands,
|
|
348
|
+
description: description && description.length > 0 ? description : void 0,
|
|
349
|
+
cliFlag,
|
|
350
|
+
cliAliases,
|
|
351
|
+
required: raw.required === true,
|
|
352
|
+
requiredOnCreate: raw.requiredOnCreate === true,
|
|
353
|
+
// allow_unset defaults to true (omitted) and is only persisted when an
|
|
354
|
+
// operator explicitly disables it with --no-allow-unset (allowUnset === false).
|
|
355
|
+
allowUnset: raw.allowUnset !== false,
|
|
356
|
+
requiredTypes: dedupeStringList(raw.requiredTypes)
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
function selectFieldsArray(parsed) {
|
|
360
|
+
if (Array.isArray(parsed)) {
|
|
361
|
+
return parsed;
|
|
362
|
+
}
|
|
363
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
364
|
+
return void 0;
|
|
365
|
+
}
|
|
366
|
+
const record = parsed;
|
|
367
|
+
if (Array.isArray(record.fields)) {
|
|
368
|
+
return record.fields;
|
|
369
|
+
}
|
|
370
|
+
if (Array.isArray(record.definitions)) {
|
|
371
|
+
return record.definitions;
|
|
372
|
+
}
|
|
373
|
+
return void 0;
|
|
374
|
+
}
|
|
375
|
+
function extractFieldDefinitions(parsed) {
|
|
376
|
+
const candidate = selectFieldsArray(parsed);
|
|
377
|
+
if (!candidate) {
|
|
378
|
+
return [];
|
|
379
|
+
}
|
|
380
|
+
const definitions = [];
|
|
381
|
+
for (const entry of candidate) {
|
|
382
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
const record = entry;
|
|
386
|
+
if (typeof record.key !== "string" || record.key.trim().length === 0) {
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
389
|
+
definitions.push(record);
|
|
390
|
+
}
|
|
391
|
+
return definitions;
|
|
392
|
+
}
|
|
393
|
+
function parseFieldsFile(raw) {
|
|
394
|
+
if (raw === null || raw === void 0 || raw.trim().length === 0) {
|
|
395
|
+
return { fields: [] };
|
|
396
|
+
}
|
|
397
|
+
let parsed;
|
|
398
|
+
try {
|
|
399
|
+
parsed = JSON.parse(raw);
|
|
400
|
+
} catch {
|
|
401
|
+
throw new Error("schema/fields.json contains invalid JSON.");
|
|
402
|
+
}
|
|
403
|
+
return { fields: extractFieldDefinitions(parsed) };
|
|
404
|
+
}
|
|
405
|
+
function serializeFieldsFile(file) {
|
|
406
|
+
return `${JSON.stringify({ fields: file.fields }, null, 2)}
|
|
407
|
+
`;
|
|
408
|
+
}
|
|
409
|
+
function upsertField(file, input) {
|
|
410
|
+
const existing = file.fields.find((definition) => normalizeFieldKey(definition.key) === input.key);
|
|
411
|
+
const replaced = existing !== void 0;
|
|
412
|
+
const fields = file.fields.filter((definition) => normalizeFieldKey(definition.key) !== input.key);
|
|
413
|
+
const next = {
|
|
414
|
+
...existing ?? {},
|
|
415
|
+
key: input.key,
|
|
416
|
+
type: input.type,
|
|
417
|
+
commands: [...input.commands]
|
|
418
|
+
};
|
|
419
|
+
applyOptionalString(next, "description", input.description);
|
|
420
|
+
applyOptionalString(next, "cli_flag", input.cliFlag);
|
|
421
|
+
if (input.cliAliases.length > 0) {
|
|
422
|
+
next.cli_aliases = [...input.cliAliases];
|
|
423
|
+
} else {
|
|
424
|
+
delete next.cli_aliases;
|
|
425
|
+
}
|
|
426
|
+
applyBooleanFlag(next, "required", input.required);
|
|
427
|
+
applyBooleanFlag(next, "required_on_create", input.requiredOnCreate);
|
|
428
|
+
if (input.allowUnset === false) {
|
|
429
|
+
next.allow_unset = false;
|
|
430
|
+
} else {
|
|
431
|
+
delete next.allow_unset;
|
|
432
|
+
}
|
|
433
|
+
if (input.requiredTypes.length > 0) {
|
|
434
|
+
next.required_types = [...input.requiredTypes];
|
|
435
|
+
} else {
|
|
436
|
+
delete next.required_types;
|
|
437
|
+
}
|
|
438
|
+
fields.push(next);
|
|
439
|
+
fields.sort((left, right) => normalizeFieldKey(left.key).localeCompare(normalizeFieldKey(right.key)));
|
|
440
|
+
return {
|
|
441
|
+
file: { fields },
|
|
442
|
+
definition: next,
|
|
443
|
+
replaced
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
function removeField(file, key) {
|
|
447
|
+
const normalizedKey = normalizeFieldKey(key);
|
|
448
|
+
if (normalizedKey.length === 0) {
|
|
449
|
+
throw new Error("Field key must not be empty.");
|
|
450
|
+
}
|
|
451
|
+
const removed = [];
|
|
452
|
+
const fields = file.fields.filter((definition) => {
|
|
453
|
+
if (normalizeFieldKey(definition.key) === normalizedKey) {
|
|
454
|
+
removed.push(definition);
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
return true;
|
|
458
|
+
});
|
|
459
|
+
if (removed.length === 0) {
|
|
460
|
+
return { file: { fields }, removed: false };
|
|
461
|
+
}
|
|
462
|
+
return { file: { fields }, removed: true, definition: removed[0] };
|
|
463
|
+
}
|
|
464
|
+
function applyOptionalString(definition, key, value) {
|
|
465
|
+
const record = definition;
|
|
466
|
+
if (value !== void 0 && value.length > 0) {
|
|
467
|
+
record[key] = value;
|
|
468
|
+
} else {
|
|
469
|
+
delete record[key];
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function applyBooleanFlag(definition, key, value) {
|
|
473
|
+
const record = definition;
|
|
474
|
+
if (value) {
|
|
475
|
+
record[key] = true;
|
|
476
|
+
} else {
|
|
477
|
+
delete record[key];
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// dist/core/schema/type-inference.js
|
|
482
|
+
!(function() {
|
|
483
|
+
try {
|
|
484
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
485
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7ded2b63-46ff-5a7e-a47f-5a4488da1cae");
|
|
486
|
+
} catch (e2) {
|
|
487
|
+
}
|
|
488
|
+
})();
|
|
489
|
+
var PREFIX_PATTERN = /^([A-Za-z][A-Za-z0-9_-]*?)\s*[-:]\s+\S/;
|
|
490
|
+
function extractTitlePrefix(title) {
|
|
491
|
+
const match = PREFIX_PATTERN.exec(title.trim());
|
|
492
|
+
if (!match) {
|
|
493
|
+
return void 0;
|
|
494
|
+
}
|
|
495
|
+
const token = match[1];
|
|
496
|
+
if (token.length < 2) {
|
|
497
|
+
return void 0;
|
|
498
|
+
}
|
|
499
|
+
if (/^[A-Za-z]\d+$/.test(token)) {
|
|
500
|
+
return void 0;
|
|
501
|
+
}
|
|
502
|
+
return token.toLowerCase();
|
|
503
|
+
}
|
|
504
|
+
function prefixToTypeName(prefix) {
|
|
505
|
+
return prefix.split(/[-_]+/).filter((segment) => segment.length > 0).map((segment) => `${segment.slice(0, 1).toUpperCase()}${segment.slice(1).toLowerCase()}`).join("");
|
|
506
|
+
}
|
|
507
|
+
function inferTypesFromTitles(titles, options = {}) {
|
|
508
|
+
const minCount = typeof options.minCount === "number" && options.minCount > 0 ? Math.trunc(options.minCount) : 10;
|
|
509
|
+
const maxExamples = typeof options.maxExamples === "number" && options.maxExamples > 0 ? Math.trunc(options.maxExamples) : 3;
|
|
510
|
+
const byPrefix = /* @__PURE__ */ new Map();
|
|
511
|
+
for (const rawTitle of titles) {
|
|
512
|
+
const title = typeof rawTitle === "string" ? rawTitle.trim() : "";
|
|
513
|
+
if (title.length === 0) {
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
const prefix = extractTitlePrefix(title);
|
|
517
|
+
if (prefix === void 0) {
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
const bucket = byPrefix.get(prefix) ?? { count: 0, examples: [] };
|
|
521
|
+
bucket.count += 1;
|
|
522
|
+
if (bucket.examples.length < maxExamples) {
|
|
523
|
+
bucket.examples.push(title);
|
|
524
|
+
}
|
|
525
|
+
byPrefix.set(prefix, bucket);
|
|
526
|
+
}
|
|
527
|
+
const candidates = [];
|
|
528
|
+
for (const [prefix, bucket] of byPrefix.entries()) {
|
|
529
|
+
if (bucket.count < minCount) {
|
|
530
|
+
continue;
|
|
531
|
+
}
|
|
532
|
+
const name = prefixToTypeName(prefix);
|
|
533
|
+
candidates.push({
|
|
534
|
+
name,
|
|
535
|
+
prefix,
|
|
536
|
+
count: bucket.count,
|
|
537
|
+
examples: bucket.examples,
|
|
538
|
+
shadows_builtin: matchBuiltinTypeName(name) !== void 0
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
candidates.sort((left, right) => right.count - left.count || left.name.localeCompare(right.name));
|
|
542
|
+
return candidates;
|
|
543
|
+
}
|
|
544
|
+
|
|
226
545
|
// dist/cli/commands/schema.js
|
|
227
546
|
!(function() {
|
|
228
547
|
try {
|
|
229
548
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
230
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
549
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "09f8790c-5e80-5dab-92c7-b3cf333fcb58");
|
|
231
550
|
} catch (e2) {
|
|
232
551
|
}
|
|
233
552
|
})();
|
|
@@ -236,12 +555,18 @@ var SCHEMA_SUBCOMMANDS = [
|
|
|
236
555
|
"remove-type",
|
|
237
556
|
"add-status",
|
|
238
557
|
"remove-status",
|
|
558
|
+
"add-field",
|
|
559
|
+
"remove-field",
|
|
560
|
+
"list-fields",
|
|
561
|
+
"show-field",
|
|
562
|
+
"apply-preset",
|
|
239
563
|
"list",
|
|
240
564
|
"show",
|
|
241
565
|
"show-status"
|
|
242
566
|
];
|
|
243
567
|
var SCHEMA_TYPES_LOCK_ID = "schema-types";
|
|
244
568
|
var SCHEMA_STATUSES_LOCK_ID = "schema-statuses";
|
|
569
|
+
var SCHEMA_FIELDS_LOCK_ID = "schema-fields";
|
|
245
570
|
function toAuthor(candidate, defaultAuthor) {
|
|
246
571
|
const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;
|
|
247
572
|
const trimmed = resolved.trim();
|
|
@@ -410,6 +735,26 @@ async function runSchemaRemoveType(name, options, global2) {
|
|
|
410
735
|
function statusesPathFor(pmRoot, schema) {
|
|
411
736
|
return filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses);
|
|
412
737
|
}
|
|
738
|
+
function fieldsPathFor(pmRoot, schema) {
|
|
739
|
+
return filePathForSchemaSection(pmRoot, schema.files.fields, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.fields);
|
|
740
|
+
}
|
|
741
|
+
function typesPathFor(pmRoot, schema) {
|
|
742
|
+
return filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);
|
|
743
|
+
}
|
|
744
|
+
function toSchemaFieldSummary(field) {
|
|
745
|
+
return {
|
|
746
|
+
key: field.key,
|
|
747
|
+
type: field.type,
|
|
748
|
+
commands: [...field.commands],
|
|
749
|
+
cli_flag: `--${field.cli_flag}`,
|
|
750
|
+
cli_aliases: field.cli_aliases.map((alias) => `--${alias}`),
|
|
751
|
+
...field.description ? { description: field.description } : {},
|
|
752
|
+
required: field.required,
|
|
753
|
+
required_on_create: field.required_on_create,
|
|
754
|
+
allow_unset: field.allow_unset,
|
|
755
|
+
required_types: [...field.required_types]
|
|
756
|
+
};
|
|
757
|
+
}
|
|
413
758
|
async function runSchemaAddStatus(id, options, global2) {
|
|
414
759
|
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
415
760
|
await ensureInitialized(pmRoot);
|
|
@@ -645,6 +990,7 @@ async function loadSchemaInspectionContext(global2) {
|
|
|
645
990
|
const extensionProvenance = collectExtensionTypeProvenance();
|
|
646
991
|
const customNames = new Set((settings.item_types?.definitions ?? []).map((definition) => definition.name.trim().toLowerCase()).filter((name) => name.length > 0 && !extensionProvenance.has(name)));
|
|
647
992
|
return {
|
|
993
|
+
pmRoot,
|
|
648
994
|
typesPath,
|
|
649
995
|
statusesPath,
|
|
650
996
|
byType: registry.by_type,
|
|
@@ -670,6 +1016,7 @@ async function runSchemaList(global2) {
|
|
|
670
1016
|
}
|
|
671
1017
|
}
|
|
672
1018
|
const statusSummaries = buildSchemaStatusSummaries(context.schema);
|
|
1019
|
+
const fieldSummaries = resolveRuntimeFieldRegistry(context.schema).definitions.map(toSchemaFieldSummary);
|
|
673
1020
|
return {
|
|
674
1021
|
action: "list",
|
|
675
1022
|
builtin,
|
|
@@ -690,6 +1037,12 @@ async function runSchemaList(global2) {
|
|
|
690
1037
|
total: statusSummaries.builtin.length + statusSummaries.custom.length
|
|
691
1038
|
}
|
|
692
1039
|
},
|
|
1040
|
+
fields: {
|
|
1041
|
+
custom: fieldSummaries,
|
|
1042
|
+
counts: {
|
|
1043
|
+
total: fieldSummaries.length
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
693
1046
|
file: {
|
|
694
1047
|
path: context.typesPath
|
|
695
1048
|
},
|
|
@@ -736,6 +1089,331 @@ async function runSchemaShowStatus(id, global2) {
|
|
|
736
1089
|
generated_at: nowIso()
|
|
737
1090
|
};
|
|
738
1091
|
}
|
|
1092
|
+
async function runSchemaAddField(key, options, global2) {
|
|
1093
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
1094
|
+
await ensureInitialized(pmRoot);
|
|
1095
|
+
let normalized;
|
|
1096
|
+
try {
|
|
1097
|
+
normalized = normalizeAddFieldInput({
|
|
1098
|
+
key,
|
|
1099
|
+
type: options.type,
|
|
1100
|
+
commands: options.commands,
|
|
1101
|
+
description: options.description,
|
|
1102
|
+
cliFlag: options.cliFlag,
|
|
1103
|
+
aliases: options.alias,
|
|
1104
|
+
required: options.required,
|
|
1105
|
+
requiredOnCreate: options.requiredOnCreate,
|
|
1106
|
+
allowUnset: options.allowUnset,
|
|
1107
|
+
requiredTypes: options.requiredTypes
|
|
1108
|
+
});
|
|
1109
|
+
} catch (error) {
|
|
1110
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
1111
|
+
}
|
|
1112
|
+
const settings = await readSettings(pmRoot);
|
|
1113
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
1114
|
+
const fieldsPath = fieldsPathFor(pmRoot, schema);
|
|
1115
|
+
const warnings = [];
|
|
1116
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
1117
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
1118
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_FIELDS_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
1119
|
+
let upsert;
|
|
1120
|
+
try {
|
|
1121
|
+
const previousRaw = await readFileIfExists(fieldsPath);
|
|
1122
|
+
let parsed;
|
|
1123
|
+
try {
|
|
1124
|
+
parsed = parseFieldsFile(previousRaw);
|
|
1125
|
+
} catch (error) {
|
|
1126
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
1127
|
+
}
|
|
1128
|
+
upsert = upsertField(parsed, normalized);
|
|
1129
|
+
await writeFileAtomic(fieldsPath, serializeFieldsFile(upsert.file));
|
|
1130
|
+
warnings.push(...await runActiveOnWriteHooks({
|
|
1131
|
+
path: fieldsPath,
|
|
1132
|
+
scope: "project",
|
|
1133
|
+
op: "schema:add-field"
|
|
1134
|
+
}));
|
|
1135
|
+
} finally {
|
|
1136
|
+
await releaseLock();
|
|
1137
|
+
}
|
|
1138
|
+
return {
|
|
1139
|
+
action: "add-field",
|
|
1140
|
+
registered: true,
|
|
1141
|
+
replaced: upsert.replaced,
|
|
1142
|
+
field: upsert.definition,
|
|
1143
|
+
file: {
|
|
1144
|
+
path: fieldsPath,
|
|
1145
|
+
fields: upsert.file.fields.length
|
|
1146
|
+
},
|
|
1147
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
1148
|
+
generated_at: nowIso()
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
async function countItemsUsingField(pmRoot, settings, schema, metadataKey) {
|
|
1152
|
+
const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
1153
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);
|
|
1154
|
+
return items.filter((item) => {
|
|
1155
|
+
const value = item[metadataKey];
|
|
1156
|
+
if (value === void 0 || value === null) {
|
|
1157
|
+
return false;
|
|
1158
|
+
}
|
|
1159
|
+
if (Array.isArray(value)) {
|
|
1160
|
+
return value.length > 0;
|
|
1161
|
+
}
|
|
1162
|
+
if (typeof value === "string") {
|
|
1163
|
+
return value.trim().length > 0;
|
|
1164
|
+
}
|
|
1165
|
+
return true;
|
|
1166
|
+
}).length;
|
|
1167
|
+
}
|
|
1168
|
+
async function runSchemaRemoveField(key, options, global2) {
|
|
1169
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
1170
|
+
await ensureInitialized(pmRoot);
|
|
1171
|
+
const settings = await readSettings(pmRoot);
|
|
1172
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
1173
|
+
const fieldsPath = fieldsPathFor(pmRoot, schema);
|
|
1174
|
+
const warnings = [];
|
|
1175
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
1176
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
1177
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_FIELDS_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
1178
|
+
let removal;
|
|
1179
|
+
try {
|
|
1180
|
+
const previousRaw = await readFileIfExists(fieldsPath);
|
|
1181
|
+
let parsed;
|
|
1182
|
+
try {
|
|
1183
|
+
parsed = parseFieldsFile(previousRaw);
|
|
1184
|
+
} catch (error) {
|
|
1185
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
1186
|
+
}
|
|
1187
|
+
try {
|
|
1188
|
+
removal = removeField(parsed, key);
|
|
1189
|
+
} catch (error) {
|
|
1190
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
1191
|
+
}
|
|
1192
|
+
if (removal.removed) {
|
|
1193
|
+
const removedKey = normalizeFieldKey(removal.definition?.key ?? key);
|
|
1194
|
+
const metadataKey = normalizeFieldKey(removal.definition?.metadata_key ?? removal.definition?.front_matter_key ?? removedKey);
|
|
1195
|
+
if (metadataKey.length > 0) {
|
|
1196
|
+
const usingField = await countItemsUsingField(pmRoot, settings, schema, metadataKey);
|
|
1197
|
+
if (usingField > 0) {
|
|
1198
|
+
warnings.push(`items_using_field:${usingField}`);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
await writeFileAtomic(fieldsPath, serializeFieldsFile(removal.file));
|
|
1202
|
+
warnings.push(...await runActiveOnWriteHooks({
|
|
1203
|
+
path: fieldsPath,
|
|
1204
|
+
scope: "project",
|
|
1205
|
+
op: "schema:remove-field"
|
|
1206
|
+
}));
|
|
1207
|
+
}
|
|
1208
|
+
} finally {
|
|
1209
|
+
await releaseLock();
|
|
1210
|
+
}
|
|
1211
|
+
return {
|
|
1212
|
+
action: "remove-field",
|
|
1213
|
+
removed: removal.removed,
|
|
1214
|
+
...removal.definition ? { field: removal.definition } : {},
|
|
1215
|
+
file: {
|
|
1216
|
+
path: fieldsPath,
|
|
1217
|
+
fields: removal.file.fields.length
|
|
1218
|
+
},
|
|
1219
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
1220
|
+
generated_at: nowIso()
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
async function runSchemaListFields(global2) {
|
|
1224
|
+
const context = await loadSchemaInspectionContext(global2);
|
|
1225
|
+
const fields = resolveRuntimeFieldRegistry(context.schema).definitions.map(toSchemaFieldSummary);
|
|
1226
|
+
return {
|
|
1227
|
+
action: "list-fields",
|
|
1228
|
+
fields,
|
|
1229
|
+
counts: {
|
|
1230
|
+
total: fields.length
|
|
1231
|
+
},
|
|
1232
|
+
file: {
|
|
1233
|
+
path: fieldsPathFor(context.pmRoot, context.schema)
|
|
1234
|
+
},
|
|
1235
|
+
generated_at: nowIso()
|
|
1236
|
+
};
|
|
1237
|
+
}
|
|
1238
|
+
async function runSchemaShowField(key, global2) {
|
|
1239
|
+
const fieldKey = normalizeFieldKey(key);
|
|
1240
|
+
if (fieldKey.length === 0) {
|
|
1241
|
+
throw new PmCliError("Field key must not be empty.", EXIT_CODE.USAGE);
|
|
1242
|
+
}
|
|
1243
|
+
const context = await loadSchemaInspectionContext(global2);
|
|
1244
|
+
const match = resolveRuntimeFieldRegistry(context.schema).by_key.get(fieldKey);
|
|
1245
|
+
if (!match) {
|
|
1246
|
+
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" });
|
|
1247
|
+
}
|
|
1248
|
+
return {
|
|
1249
|
+
action: "show-field",
|
|
1250
|
+
field: toSchemaFieldSummary(match),
|
|
1251
|
+
file: {
|
|
1252
|
+
path: fieldsPathFor(context.pmRoot, context.schema)
|
|
1253
|
+
},
|
|
1254
|
+
generated_at: nowIso()
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
async function runSchemaApplyPreset(preset, options, global2) {
|
|
1258
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
1259
|
+
await ensureInitialized(pmRoot);
|
|
1260
|
+
let presetName;
|
|
1261
|
+
try {
|
|
1262
|
+
const normalized = normalizeTypePresetName(preset);
|
|
1263
|
+
if (normalized === void 0) {
|
|
1264
|
+
throw new Error(`Type preset name is required. Allowed: ${TYPE_PRESET_NAMES.join(", ")}.`);
|
|
1265
|
+
}
|
|
1266
|
+
presetName = normalized;
|
|
1267
|
+
} catch (error) {
|
|
1268
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);
|
|
1269
|
+
}
|
|
1270
|
+
const settings = await readSettings(pmRoot);
|
|
1271
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
1272
|
+
const typesPath = typesPathFor(pmRoot, schema);
|
|
1273
|
+
const warnings = [];
|
|
1274
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
1275
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
1276
|
+
const registered = [];
|
|
1277
|
+
const replaced = [];
|
|
1278
|
+
let definitionsCount = 0;
|
|
1279
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
1280
|
+
try {
|
|
1281
|
+
const previousRaw = await readFileIfExists(typesPath);
|
|
1282
|
+
let parsed;
|
|
1283
|
+
try {
|
|
1284
|
+
parsed = parseItemTypesFile(previousRaw);
|
|
1285
|
+
} catch (error) {
|
|
1286
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
1287
|
+
}
|
|
1288
|
+
let nextFile = parsed;
|
|
1289
|
+
for (const normalized of resolveTypePresetDefinitions(presetName)) {
|
|
1290
|
+
const upsert = upsertItemType(nextFile, normalized);
|
|
1291
|
+
nextFile = upsert.file;
|
|
1292
|
+
(upsert.replaced ? replaced : registered).push(upsert.definition.name);
|
|
1293
|
+
}
|
|
1294
|
+
definitionsCount = nextFile.definitions.length;
|
|
1295
|
+
await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));
|
|
1296
|
+
warnings.push(...await runActiveOnWriteHooks({
|
|
1297
|
+
path: typesPath,
|
|
1298
|
+
scope: "project",
|
|
1299
|
+
op: "schema:apply-preset"
|
|
1300
|
+
}));
|
|
1301
|
+
} finally {
|
|
1302
|
+
await releaseLock();
|
|
1303
|
+
}
|
|
1304
|
+
return {
|
|
1305
|
+
action: "apply-preset",
|
|
1306
|
+
preset: presetName,
|
|
1307
|
+
registered,
|
|
1308
|
+
replaced,
|
|
1309
|
+
file: {
|
|
1310
|
+
path: typesPath,
|
|
1311
|
+
definitions: definitionsCount
|
|
1312
|
+
},
|
|
1313
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
1314
|
+
generated_at: nowIso()
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
async function runSchemaInferTypes(options, global2) {
|
|
1318
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
1319
|
+
await ensureInitialized(pmRoot);
|
|
1320
|
+
const settings = await readSettings(pmRoot);
|
|
1321
|
+
const schema = normalizeRuntimeSchemaSettings(settings.schema);
|
|
1322
|
+
const typesPath = typesPathFor(pmRoot, schema);
|
|
1323
|
+
let minCount = 10;
|
|
1324
|
+
if (options.minCount !== void 0) {
|
|
1325
|
+
if (!Number.isInteger(options.minCount) || options.minCount < 1) {
|
|
1326
|
+
throw new PmCliError("--min-count must be a positive integer (>= 1).", EXIT_CODE.USAGE);
|
|
1327
|
+
}
|
|
1328
|
+
minCount = options.minCount;
|
|
1329
|
+
}
|
|
1330
|
+
const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
1331
|
+
const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);
|
|
1332
|
+
const titles = items.map((item) => typeof item.title === "string" ? item.title : "");
|
|
1333
|
+
const candidates = inferTypesFromTitles(titles, { minCount });
|
|
1334
|
+
const warnings = [];
|
|
1335
|
+
const registered = [];
|
|
1336
|
+
const replaced = [];
|
|
1337
|
+
const skipped = [];
|
|
1338
|
+
let definitionsCount;
|
|
1339
|
+
if (!options.apply) {
|
|
1340
|
+
let parsed;
|
|
1341
|
+
try {
|
|
1342
|
+
parsed = parseItemTypesFile(await readFileIfExists(typesPath));
|
|
1343
|
+
} catch (error) {
|
|
1344
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
1345
|
+
}
|
|
1346
|
+
definitionsCount = parsed.definitions.length;
|
|
1347
|
+
return {
|
|
1348
|
+
action: "infer-types",
|
|
1349
|
+
applied: false,
|
|
1350
|
+
min_count: minCount,
|
|
1351
|
+
candidates,
|
|
1352
|
+
registered,
|
|
1353
|
+
replaced,
|
|
1354
|
+
skipped,
|
|
1355
|
+
file: {
|
|
1356
|
+
path: typesPath,
|
|
1357
|
+
definitions: definitionsCount
|
|
1358
|
+
},
|
|
1359
|
+
warnings,
|
|
1360
|
+
generated_at: nowIso()
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
const author = toAuthor(options.author, settings.author_default);
|
|
1364
|
+
const governance = resolveGovernanceKnobs(settings);
|
|
1365
|
+
const releaseLock = await acquireLock(pmRoot, SCHEMA_TYPES_LOCK_ID, settings.locks.ttl_seconds, author, Boolean(options.force), governance.force_required_for_stale_lock);
|
|
1366
|
+
try {
|
|
1367
|
+
const previousRaw = await readFileIfExists(typesPath);
|
|
1368
|
+
let parsed;
|
|
1369
|
+
try {
|
|
1370
|
+
parsed = parseItemTypesFile(previousRaw);
|
|
1371
|
+
} catch (error) {
|
|
1372
|
+
throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);
|
|
1373
|
+
}
|
|
1374
|
+
let nextFile = parsed;
|
|
1375
|
+
for (const candidate of candidates) {
|
|
1376
|
+
if (candidate.shadows_builtin) {
|
|
1377
|
+
skipped.push({ name: candidate.name, reason: "shadows_builtin" });
|
|
1378
|
+
continue;
|
|
1379
|
+
}
|
|
1380
|
+
let normalized;
|
|
1381
|
+
try {
|
|
1382
|
+
normalized = normalizeAddTypeInput({ name: candidate.name });
|
|
1383
|
+
} catch {
|
|
1384
|
+
skipped.push({ name: candidate.name, reason: "invalid_type_token" });
|
|
1385
|
+
continue;
|
|
1386
|
+
}
|
|
1387
|
+
const upsert = upsertItemType(nextFile, normalized);
|
|
1388
|
+
nextFile = upsert.file;
|
|
1389
|
+
(upsert.replaced ? replaced : registered).push(upsert.definition.name);
|
|
1390
|
+
}
|
|
1391
|
+
definitionsCount = nextFile.definitions.length;
|
|
1392
|
+
await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));
|
|
1393
|
+
warnings.push(...await runActiveOnWriteHooks({
|
|
1394
|
+
path: typesPath,
|
|
1395
|
+
scope: "project",
|
|
1396
|
+
op: "schema:infer-types"
|
|
1397
|
+
}));
|
|
1398
|
+
} finally {
|
|
1399
|
+
await releaseLock();
|
|
1400
|
+
}
|
|
1401
|
+
return {
|
|
1402
|
+
action: "infer-types",
|
|
1403
|
+
applied: true,
|
|
1404
|
+
min_count: minCount,
|
|
1405
|
+
candidates,
|
|
1406
|
+
registered,
|
|
1407
|
+
replaced,
|
|
1408
|
+
skipped,
|
|
1409
|
+
file: {
|
|
1410
|
+
path: typesPath,
|
|
1411
|
+
definitions: definitionsCount
|
|
1412
|
+
},
|
|
1413
|
+
warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),
|
|
1414
|
+
generated_at: nowIso()
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
739
1417
|
function formatSchemaAddTypeHuman(result) {
|
|
740
1418
|
const verb = result.replaced ? "Updated" : "Registered";
|
|
741
1419
|
const aliasSuffix = result.type.aliases && result.type.aliases.length > 0 ? ` (aliases: ${result.type.aliases.join(", ")})` : "";
|
|
@@ -785,8 +1463,13 @@ function formatSchemaListHuman(result) {
|
|
|
785
1463
|
}
|
|
786
1464
|
lines.push(`${label}: ${entries.map((entry) => entry.id).join(", ")}`);
|
|
787
1465
|
}
|
|
1466
|
+
lines.push(`custom fields: ${result.fields.counts.total} total`);
|
|
1467
|
+
if (result.fields.custom.length > 0) {
|
|
1468
|
+
lines.push(`fields: ${result.fields.custom.map((field) => `${field.key} (${field.type}, ${field.cli_flag})`).join(", ")}`);
|
|
1469
|
+
}
|
|
788
1470
|
lines.push(`Inspect one: pm schema show <Type>`);
|
|
789
1471
|
lines.push(`Inspect one status: pm schema show-status <status>`);
|
|
1472
|
+
lines.push(`Inspect one field: pm schema show-field <key>`);
|
|
790
1473
|
return lines.join("\n");
|
|
791
1474
|
}
|
|
792
1475
|
function formatSchemaShowHuman(result) {
|
|
@@ -828,6 +1511,94 @@ function formatSchemaShowStatusHuman(result) {
|
|
|
828
1511
|
}
|
|
829
1512
|
return parts.join("\n");
|
|
830
1513
|
}
|
|
1514
|
+
function formatFieldSummaryLine(field) {
|
|
1515
|
+
const flags = [];
|
|
1516
|
+
if (field.required) {
|
|
1517
|
+
flags.push("required");
|
|
1518
|
+
}
|
|
1519
|
+
if (field.required_on_create) {
|
|
1520
|
+
flags.push("required_on_create");
|
|
1521
|
+
}
|
|
1522
|
+
if (!field.allow_unset) {
|
|
1523
|
+
flags.push("no_unset");
|
|
1524
|
+
}
|
|
1525
|
+
const flagSuffix = flags.length > 0 ? ` [${flags.join(", ")}]` : "";
|
|
1526
|
+
return `${field.key} (${field.type}) ${field.cli_flag} commands=${field.commands.join("/")}${flagSuffix}`;
|
|
1527
|
+
}
|
|
1528
|
+
function formatSchemaAddFieldHuman(result) {
|
|
1529
|
+
const verb = result.replaced ? "Updated" : "Registered";
|
|
1530
|
+
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>`;
|
|
1531
|
+
}
|
|
1532
|
+
function formatSchemaRemoveFieldHuman(result) {
|
|
1533
|
+
if (!result.removed) {
|
|
1534
|
+
return `No custom field matched; nothing removed from ${result.file.path}.`;
|
|
1535
|
+
}
|
|
1536
|
+
const key = result.field?.key ?? "(unknown)";
|
|
1537
|
+
return `Removed custom field "${key}" from ${result.file.path}.`;
|
|
1538
|
+
}
|
|
1539
|
+
function formatSchemaListFieldsHuman(result) {
|
|
1540
|
+
const lines = [`Custom fields: ${result.counts.total} total`];
|
|
1541
|
+
for (const field of result.fields) {
|
|
1542
|
+
lines.push(` ${formatFieldSummaryLine(field)}`);
|
|
1543
|
+
}
|
|
1544
|
+
lines.push(`Inspect one: pm schema show-field <key>`);
|
|
1545
|
+
return lines.join("\n");
|
|
1546
|
+
}
|
|
1547
|
+
function formatSchemaShowFieldHuman(result) {
|
|
1548
|
+
const field = result.field;
|
|
1549
|
+
const parts = [
|
|
1550
|
+
`field: ${field.key}`,
|
|
1551
|
+
`type: ${field.type}`,
|
|
1552
|
+
`cli_flag: ${field.cli_flag}`,
|
|
1553
|
+
`commands: ${field.commands.join(", ")}`
|
|
1554
|
+
];
|
|
1555
|
+
if (field.cli_aliases.length > 0) {
|
|
1556
|
+
parts.push(`cli_aliases: ${field.cli_aliases.join(", ")}`);
|
|
1557
|
+
}
|
|
1558
|
+
if (field.description) {
|
|
1559
|
+
parts.push(`description: ${field.description}`);
|
|
1560
|
+
}
|
|
1561
|
+
if (field.required) {
|
|
1562
|
+
parts.push(`required: true`);
|
|
1563
|
+
}
|
|
1564
|
+
if (field.required_on_create) {
|
|
1565
|
+
parts.push(`required_on_create: true`);
|
|
1566
|
+
}
|
|
1567
|
+
if (!field.allow_unset) {
|
|
1568
|
+
parts.push(`allow_unset: false`);
|
|
1569
|
+
}
|
|
1570
|
+
if (field.required_types.length > 0) {
|
|
1571
|
+
parts.push(`required_types: ${field.required_types.join(", ")}`);
|
|
1572
|
+
}
|
|
1573
|
+
return parts.join("\n");
|
|
1574
|
+
}
|
|
1575
|
+
function formatSchemaApplyPresetHuman(result) {
|
|
1576
|
+
const registered = result.registered.length > 0 ? `registered: ${result.registered.join(", ")}` : "";
|
|
1577
|
+
const replaced = result.replaced.length > 0 ? `updated: ${result.replaced.join(", ")}` : "";
|
|
1578
|
+
const detail = [registered, replaced].filter((part) => part.length > 0).join("; ");
|
|
1579
|
+
return `Applied "${result.preset}" type preset to ${result.file.path}${detail.length > 0 ? ` (${detail})` : ""}.`;
|
|
1580
|
+
}
|
|
1581
|
+
function formatSchemaInferTypesHuman(result) {
|
|
1582
|
+
if (result.candidates.length === 0) {
|
|
1583
|
+
return `No title-prefix conventions found with at least ${result.min_count} items. Lower the threshold with --min-count <n>.`;
|
|
1584
|
+
}
|
|
1585
|
+
const lines = result.applied ? [`Inferred and registered custom types from title prefixes (min-count ${result.min_count}):`] : [`Inferred custom type candidates from title prefixes (min-count ${result.min_count}, dry-run):`];
|
|
1586
|
+
for (const candidate of result.candidates) {
|
|
1587
|
+
const note = candidate.shadows_builtin ? " [shadows built-in, skipped]" : "";
|
|
1588
|
+
lines.push(` ${candidate.name} <- "${candidate.prefix}" (${candidate.count} items)${note}`);
|
|
1589
|
+
}
|
|
1590
|
+
if (!result.applied) {
|
|
1591
|
+
lines.push(`Re-run with --apply to register the non-shadowing candidates.`);
|
|
1592
|
+
} else {
|
|
1593
|
+
if (result.registered.length > 0) {
|
|
1594
|
+
lines.push(`registered: ${result.registered.join(", ")}`);
|
|
1595
|
+
}
|
|
1596
|
+
if (result.replaced.length > 0) {
|
|
1597
|
+
lines.push(`updated: ${result.replaced.join(", ")}`);
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
return lines.join("\n");
|
|
1601
|
+
}
|
|
831
1602
|
var _testOnlySchemaCommand = {
|
|
832
1603
|
toAuthor,
|
|
833
1604
|
workflowSlotsReferencing
|
|
@@ -836,19 +1607,31 @@ export {
|
|
|
836
1607
|
SCHEMA_SUBCOMMANDS,
|
|
837
1608
|
_testOnlySchemaCommand,
|
|
838
1609
|
buildInvalidTypeHint,
|
|
1610
|
+
formatSchemaAddFieldHuman,
|
|
839
1611
|
formatSchemaAddStatusHuman,
|
|
840
1612
|
formatSchemaAddTypeHuman,
|
|
1613
|
+
formatSchemaApplyPresetHuman,
|
|
1614
|
+
formatSchemaInferTypesHuman,
|
|
1615
|
+
formatSchemaListFieldsHuman,
|
|
841
1616
|
formatSchemaListHuman,
|
|
1617
|
+
formatSchemaRemoveFieldHuman,
|
|
842
1618
|
formatSchemaRemoveStatusHuman,
|
|
843
1619
|
formatSchemaRemoveTypeHuman,
|
|
1620
|
+
formatSchemaShowFieldHuman,
|
|
844
1621
|
formatSchemaShowHuman,
|
|
845
1622
|
formatSchemaShowStatusHuman,
|
|
1623
|
+
runSchemaAddField,
|
|
846
1624
|
runSchemaAddStatus,
|
|
847
1625
|
runSchemaAddType,
|
|
1626
|
+
runSchemaApplyPreset,
|
|
1627
|
+
runSchemaInferTypes,
|
|
848
1628
|
runSchemaList,
|
|
1629
|
+
runSchemaListFields,
|
|
1630
|
+
runSchemaRemoveField,
|
|
849
1631
|
runSchemaRemoveStatus,
|
|
850
1632
|
runSchemaRemoveType,
|
|
851
1633
|
runSchemaShow,
|
|
1634
|
+
runSchemaShowField,
|
|
852
1635
|
runSchemaShowStatus
|
|
853
1636
|
};
|
|
854
|
-
//# sourceMappingURL=schema-
|
|
1637
|
+
//# sourceMappingURL=schema-TSBYSEMW.js.map
|