@unbrained/pm-cli 2026.7.1 → 2026.7.2
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 +6 -0
- package/dist/cli/commander-usage.d.ts +2 -0
- package/dist/cli/commander-usage.js +58 -47
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.js +102 -79
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +278 -243
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +89 -68
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.js +157 -129
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +50 -42
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/config.d.ts +2 -0
- package/dist/cli/commands/config.js +443 -879
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.js +365 -287
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +352 -238
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +46 -39
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/dedupe-merge.js +88 -69
- package/dist/cli/commands/dedupe-merge.js.map +1 -1
- package/dist/cli/commands/get.js +114 -81
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +17 -0
- package/dist/cli/commands/health.js +446 -307
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.js +209 -140
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.js +162 -119
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +120 -85
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init.d.ts +8 -2
- package/dist/cli/commands/init.js +263 -162
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.js +152 -102
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.js +49 -32
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/plan.js +373 -298
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/recurrence-parsers.js +43 -25
- package/dist/cli/commands/recurrence-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +21 -5
- package/dist/cli/commands/reindex.js +345 -205
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +8 -7
- package/dist/cli/commands/restore.js +105 -69
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +33 -30
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +10 -2
- package/dist/cli/commands/search.js +503 -470
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/telemetry.js +98 -87
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/test-all.js +237 -168
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -5
- package/dist/cli/commands/test.js +424 -344
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +57 -42
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -1
- package/dist/cli/commands/update.js +738 -671
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +18 -1
- package/dist/cli/commands/validate.js +466 -343
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +399 -357
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/main.d.ts +47 -0
- package/dist/cli/main.js +428 -341
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration-gates.js +22 -45
- package/dist/cli/migration-gates.js.map +1 -1
- package/dist/cli/register-list-query.js +94 -105
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +400 -416
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +86 -66
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +120 -101
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js → activity-CUC4JY3U.js} +9 -9
- package/dist/cli-bundle/chunks/activity-WEIEMM73.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-JTEF4BP7.js → aggregate-DKUTRY6R.js} +108 -84
- package/dist/cli-bundle/chunks/aggregate-DKUTRY6R.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js → aggregate-SW5PNGCS.js} +107 -83
- package/dist/cli-bundle/chunks/{aggregate-SDF7DUOD.js.map → aggregate-SW5PNGCS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{append-QCFJSDFL.js → append-H32VOR2Y.js} +6 -6
- package/dist/cli-bundle/chunks/{append-LOVPGVPT.js → append-UBM632FK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-RLDHZHQS.js → chunk-2227673O.js} +158 -114
- package/dist/cli-bundle/chunks/chunk-2227673O.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js → chunk-2ASNV4DH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js → chunk-2CHRYUXL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NWMZWYYB.js → chunk-2KWL5NPW.js} +42 -27
- package/dist/cli-bundle/chunks/chunk-2KWL5NPW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NFDPYAIP.js → chunk-36UGKF4O.js} +21 -29
- package/dist/cli-bundle/chunks/chunk-36UGKF4O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js → chunk-3AZUFQK6.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js → chunk-3LCUASYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js → chunk-3Q2HBMTI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IPYBJWTE.js → chunk-4NUOWFBT.js} +109 -72
- package/dist/cli-bundle/chunks/chunk-4NUOWFBT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js → chunk-55XRYWEG.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js → chunk-5GVTFFTC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BDTISOSD.js → chunk-5PGBHRY3.js} +41 -26
- package/dist/cli-bundle/chunks/chunk-5PGBHRY3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YITK2PJ6.js → chunk-66Z3X7ZG.js} +261 -161
- package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUHHPVVS.js → chunk-6ITZLD4T.js} +712 -612
- package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-V3NOKJF2.js → chunk-6YCYF2AI.js} +262 -162
- package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BZCEN4JA.js → chunk-6ZMBJRDJ.js} +492 -403
- package/dist/cli-bundle/chunks/chunk-6ZMBJRDJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CF7RL6FR.js → chunk-7MYWF4ZX.js} +110 -73
- package/dist/cli-bundle/chunks/chunk-7MYWF4ZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RVUALSJF.js → chunk-7NSPKJUS.js} +356 -285
- package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4DSGXSBL.js → chunk-7TH5NMVB.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZETXE4SE.js → chunk-7W4H4K26.js} +713 -613
- package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js → chunk-A6VOGKBA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js → chunk-AIAIXG7I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js → chunk-AJEBCRIY.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js → chunk-BTX5MIQF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js → chunk-BVZZN2LH.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js → chunk-CYBDUHNO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js → chunk-CZPVDLD2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3VGN2UWE.js → chunk-EMPGXBUF.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-EMPGXBUF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JPECA746.js → chunk-EUKTMRN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2466X6E4.js → chunk-FFOQHGNH.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js → chunk-GFMSLORL.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js → chunk-GRRG3MCT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js → chunk-H4GRLYJS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js → chunk-HQTPRV4D.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-7R4QEMZZ.js → chunk-I66WE2HE.js} +354 -283
- package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js → chunk-IEEJQCZ4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js → chunk-IG5JYZGU.js} +390 -312
- package/dist/cli-bundle/chunks/{chunk-JMP4E6D7.js.map → chunk-IG5JYZGU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js → chunk-JMK5GCK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js → chunk-JXAUVO6X.js} +258 -169
- package/dist/cli-bundle/chunks/{chunk-3K2M5OYU.js.map → chunk-JXAUVO6X.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js → chunk-K2VYLVX4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js → chunk-KCO2EAN5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js → chunk-KIYCOJ63.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js → chunk-KLXF7NCC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js → chunk-KN3URLKS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js → chunk-LRKMWUUV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js → chunk-LTRAF2D7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VARHOHYV.js → chunk-MNBPX5JS.js} +55 -36
- package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js → chunk-MRD4T5LF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js → chunk-N2JSWVWG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js → chunk-N3QCJS4M.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-JSU5P7VS.js → chunk-NRZS637N.js} +258 -169
- package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js → chunk-OTUJZKGI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5CGRF3L5.js → chunk-Q6K2OACU.js} +153 -90
- package/dist/cli-bundle/chunks/chunk-Q6K2OACU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3XZCOZ5J.js → chunk-Q6NXOHS6.js} +391 -313
- package/dist/cli-bundle/chunks/chunk-Q6NXOHS6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js → chunk-QH3FSKRJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4XOIEKSD.js → chunk-RM37OPYK.js} +56 -37
- package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js → chunk-S62UANU7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RMMQ74TG.js → chunk-SPM2XLWI.js} +37 -28
- package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js → chunk-SYNKD3ZG.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-FFMQB7WR.js → chunk-SYVUU7EK.js} +493 -404
- package/dist/cli-bundle/chunks/chunk-SYVUU7EK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UYUYDGIB.js → chunk-TPOFWBMY.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OTUHB4HS.js → chunk-TTHCEV5Q.js} +92 -77
- package/dist/cli-bundle/chunks/chunk-TTHCEV5Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js → chunk-U2BEEM2X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KNPEF7QG.js → chunk-UGLU6Q2I.js} +91 -76
- package/dist/cli-bundle/chunks/chunk-UGLU6Q2I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js → chunk-UT73HUPC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js → chunk-UTSH5GWX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-IZBR4NRW.js → chunk-UWKEJMZU.js} +157 -113
- package/dist/cli-bundle/chunks/chunk-UWKEJMZU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3S2KT7NG.js → chunk-W47SML5B.js} +152 -89
- package/dist/cli-bundle/chunks/chunk-W47SML5B.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RGEMWD6Q.js → chunk-WJAMWAHZ.js} +157 -118
- package/dist/cli-bundle/chunks/chunk-WJAMWAHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JWXRETDF.js → chunk-XCHUVHKU.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-55SNVXRQ.js → chunk-XEWQKDYZ.js} +626 -484
- package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TP5Q5ZD3.js → chunk-XTHQWXVC.js} +158 -119
- package/dist/cli-bundle/chunks/chunk-XTHQWXVC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js → chunk-XWGEMNBR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js → chunk-Y4NRKBFW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2D4HATP2.js → chunk-YLZZ6T54.js} +38 -29
- package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js → chunk-YPKFV2JR.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js → chunk-ZNHEYCDD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js → chunk-ZNT7KEWE.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js → claim-SENTPZBN.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js → claim-Z7MEQCBT.js} +8 -8
- package/dist/cli-bundle/chunks/{close-TQYAAFJP.js → close-424MX4CU.js} +7 -7
- package/dist/cli-bundle/chunks/close-YCWQQPDS.js +14 -0
- package/dist/cli-bundle/chunks/{close-many-LDRVEQY2.js → close-many-2IV4J2TR.js} +102 -81
- package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-BG5QQIDQ.js → close-many-SWY34BII.js} +101 -80
- package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js → comments-4FGNTSNV.js} +8 -8
- package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js → comments-7YS5MY5X.js} +8 -8
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js +1062 -0
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js.map +1 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js +1072 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js → context-LHVKJSPJ.js} +12 -12
- package/dist/cli-bundle/chunks/{context-B6275WPX.js → context-ZQY54JNS.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-HN7ABKLP.js → contracts-CP2EZJC7.js} +320 -199
- package/dist/cli-bundle/chunks/contracts-CP2EZJC7.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-W4FZVVD6.js → contracts-FIZLMP7O.js} +321 -200
- package/dist/cli-bundle/chunks/contracts-FIZLMP7O.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-DEM4DATS.js → copy-GYNQQPW2.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js → copy-TLW7JTQT.js} +5 -5
- package/dist/cli-bundle/chunks/{create-RLRJMRTM.js → create-VSKYSOCD.js} +12 -12
- package/dist/cli-bundle/chunks/create-XTMAPS7I.js +28 -0
- package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js → delete-4W5JYCEG.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js → delete-ANTOTI2I.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js → deps-HPPE6MJN.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js → deps-ZQZN54EZ.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-GYZNVS26.js → docs-RPOVFMP3.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-26S44RXU.js → docs-XJNYBJGE.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js → eval-DM6JBZTS.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js → eval-RFBI5FGS.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js → extension-B3YY4WY5.js} +11 -11
- package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js → extension-TTSEFQTS.js} +11 -11
- package/dist/cli-bundle/chunks/{files-NQHEXUZD.js → files-5D65CHGE.js} +7 -7
- package/dist/cli-bundle/chunks/{files-MBNICQFM.js → files-GPIG77EN.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-XZW5423D.js → focus-C3PEJV2C.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js → focus-ZHN7WIGX.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js → gc-D4JQ6OWN.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js → gc-VZIXDL32.js} +3 -3
- package/dist/cli-bundle/chunks/{get-DSDEKJ3L.js → get-GIBRUUOP.js} +121 -81
- package/dist/cli-bundle/chunks/get-GIBRUUOP.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-A7MAOHCU.js → get-IOVAN6RU.js} +120 -80
- package/dist/cli-bundle/chunks/get-IOVAN6RU.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-3IPFLKXB.js → health-L2U3AFKV.js} +437 -265
- package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-GZXGBZ36.js → health-MM7AWXYF.js} +436 -264
- package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +7 -0
- package/dist/cli-bundle/chunks/history-DD7L7BNL.js +18 -0
- package/dist/cli-bundle/chunks/{history-NERDJNUB.js → history-IL7XCEX2.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-HR7BB4LR.js → history-compact-HALOTOU7.js} +214 -135
- package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-compact-2WRZ2WK4.js → history-compact-MV25P7DM.js} +213 -134
- package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js → history-redact-VYCWQFK7.js} +9 -9
- package/dist/cli-bundle/chunks/{history-repair-XA3LC4GA.js → history-repair-44MODPQF.js} +124 -84
- package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-LCMOS45X.js → history-repair-CPNAOCNF.js} +123 -83
- package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +7 -0
- package/dist/cli-bundle/chunks/{init-64XDLQJB.js → init-F27NHENZ.js} +12 -12
- package/dist/cli-bundle/chunks/init-HHVQQP6C.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js → learnings-HJVDQIGY.js} +8 -8
- package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js → learnings-XSFSUUWK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-G5Y65VF6.js → list-HPMEKCAA.js} +8 -8
- package/dist/cli-bundle/chunks/{list-DNBJVO3E.js → list-VMPWTURB.js} +8 -8
- package/dist/cli-bundle/chunks/{next-BCERKDUR.js → next-ETXF2ZCN.js} +59 -37
- package/dist/cli-bundle/chunks/next-ETXF2ZCN.js.map +7 -0
- package/dist/cli-bundle/chunks/{next-FYTQF6HG.js → next-QM6YJIIS.js} +60 -38
- package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js → notes-GDZIKGR6.js} +8 -8
- package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js → notes-WDDBPC4D.js} +8 -8
- package/dist/cli-bundle/chunks/{plan-RKZHQVXR.js → plan-BGDR73Z6.js} +373 -279
- package/dist/cli-bundle/chunks/plan-BGDR73Z6.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-4WXEQCTN.js → plan-C5IMM335.js} +372 -278
- package/dist/cli-bundle/chunks/plan-C5IMM335.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-QLER5ENE.js → profile-CCOKZ2IQ.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-4OMM32CD.js → profile-HUCENIEQ.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-7LV46VAU.js → register-list-query-ROSNIL52.js} +80 -83
- package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-SNG5PGA4.js → register-list-query-XN4ZRHSV.js} +79 -82
- package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-ENNDUAZG.js → register-mutation-CFSB2MS3.js} +403 -382
- package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KK7PHYYU.js → register-mutation-KRLAHEL2.js} +402 -381
- package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-HZ6XERQG.js → register-operations-4PASGJDB.js} +112 -93
- package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-C6OWLDSH.js → register-operations-MBN4KGUM.js} +113 -94
- package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-P67EMBDJ.js → register-setup-VIAWYFP5.js} +129 -104
- package/dist/cli-bundle/chunks/register-setup-VIAWYFP5.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-ZKJ53RS7.js → register-setup-ZCGKHDKL.js} +128 -103
- package/dist/cli-bundle/chunks/register-setup-ZCGKHDKL.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js → restore-4CBWUMCX.js} +9 -9
- package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js → scheduling-shortcuts-6VFKNKCM.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js → scheduling-shortcuts-ERHCVTEM.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-73HR2OJW.js → schema-TDGK6N3I.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js → schema-UE5KKAUX.js} +7 -7
- package/dist/cli-bundle/chunks/{search-KILGT37L.js → search-FP7MEU4S.js} +10 -10
- package/dist/cli-bundle/chunks/{search-AXPXKZER.js → search-K4CFLQ5S.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js → stats-NJJCALEZ.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js → stats-XT6QRKQY.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-GAHHQTOS.js → telemetry-5SQ5UDXC.js} +84 -70
- package/dist/cli-bundle/chunks/telemetry-5SQ5UDXC.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-BZUF6H7G.js → telemetry-HVXFZA2U.js} +85 -71
- package/dist/cli-bundle/chunks/telemetry-HVXFZA2U.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-ACD52Z3S.js → test-UFSJ5YIO.js} +15 -15
- package/dist/cli-bundle/chunks/{test-PWDIZ255.js → test-YCDAUBWF.js} +15 -15
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js +427 -0
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js +430 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-runs-UXIXPDKU.js → test-runs-FK5E75AA.js} +185 -147
- package/dist/cli-bundle/chunks/test-runs-FK5E75AA.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-PLRAZEFW.js → test-runs-H4TGWGRN.js} +184 -146
- package/dist/cli-bundle/chunks/test-runs-H4TGWGRN.js.map +7 -0
- package/dist/cli-bundle/chunks/update-MTCFES6X.js +24 -0
- package/dist/cli-bundle/chunks/{update-KFX2SIAC.js → update-Y5WQVT5O.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js → update-many-6YAYYRLE.js} +82 -67
- package/dist/cli-bundle/chunks/{update-many-Z5GJS5LC.js.map → update-many-6YAYYRLE.js.map} +2 -2
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js → update-many-JTKKSA7Y.js} +83 -68
- package/dist/cli-bundle/chunks/{update-many-RNSBX2TA.js.map → update-many-JTKKSA7Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js → upgrade-DTAHZ236.js} +11 -11
- package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js → upgrade-JUDU7YL4.js} +11 -11
- package/dist/cli-bundle/chunks/{validate-MTUVL5VC.js → validate-732RWS5W.js} +440 -320
- package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-X5W76YJL.js → validate-W7H5TEDC.js} +441 -321
- package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +1 -0
- package/dist/cli-bundle/main.js +945 -812
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/config/nested-settings.js +89 -67
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/governance/metadata-coverage.js +20 -28
- package/dist/core/governance/metadata-coverage.js.map +1 -1
- package/dist/core/history/drift-scan.js +93 -81
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/item-type-definition.js +14 -14
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/type-registry.js +87 -82
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/output/mutation-projection.js +42 -26
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +34 -28
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +64 -37
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.js +32 -17
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.js +31 -28
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/sentry/instrument.js +54 -43
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +239 -153
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.js +33 -26
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings.js +247 -203
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/test/background-runs.js +189 -160
- package/dist/core/test/background-runs.js.map +1 -1
- package/package.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
- package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
- package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VGN2UWE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4DSGXSBL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BDTISOSD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CF7RL6FR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IPYBJWTE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZBR4NRW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KNPEF7QG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NFDPYAIP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NWMZWYYB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OTUHB4HS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RLDHZHQS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UYUYDGIB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-V3NOKJF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YITK2PJ6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +0 -1
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +0 -14
- package/dist/cli-bundle/chunks/close-many-BG5QQIDQ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-LDRVEQY2.js.map +0 -1
- package/dist/cli-bundle/chunks/config-DMSU64QO.js +0 -1541
- package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +0 -7
- package/dist/cli-bundle/chunks/config-QH2DICD6.js +0 -1531
- package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +0 -1
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +0 -28
- package/dist/cli-bundle/chunks/get-A7MAOHCU.js.map +0 -7
- package/dist/cli-bundle/chunks/get-DSDEKJ3L.js.map +0 -1
- package/dist/cli-bundle/chunks/health-3IPFLKXB.js.map +0 -1
- package/dist/cli-bundle/chunks/health-GZXGBZ36.js.map +0 -7
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-2WRZ2WK4.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-HR7BB4LR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-LCMOS45X.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-XA3LC4GA.js.map +0 -1
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +0 -22
- package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +0 -7
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-4WXEQCTN.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-RKZHQVXR.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-C6OWLDSH.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-HZ6XERQG.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +0 -17
- package/dist/cli-bundle/chunks/telemetry-BZUF6H7G.js.map +0 -1
- package/dist/cli-bundle/chunks/telemetry-GAHHQTOS.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js +0 -358
- package/dist/cli-bundle/chunks/test-all-L2MDDUCA.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js +0 -361
- package/dist/cli-bundle/chunks/test-all-RBZ6DLU2.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +0 -7
- package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +0 -1
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +0 -24
- package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-DBLQVIP6.js.map → activity-CUC4JY3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-AW6XVFH6.js.map → activity-WEIEMM73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-QCFJSDFL.js.map → append-H32VOR2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LOVPGVPT.js.map → append-UBM632FK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SLMUGTK3.js.map → chunk-2ASNV4DH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UZIWVBE6.js.map → chunk-2CHRYUXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NU2UEROZ.js.map → chunk-3AZUFQK6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LB6TP6MC.js.map → chunk-3LCUASYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HPPFYYOV.js.map → chunk-3Q2HBMTI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W4ULYO7Z.js.map → chunk-55XRYWEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HXTQJXWT.js.map → chunk-5GVTFFTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-64HNBBFQ.js.map → chunk-A6VOGKBA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WYDHYJPO.js.map → chunk-AIAIXG7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CWFNTKQJ.js.map → chunk-AJEBCRIY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NOLPZMSV.js.map → chunk-BTX5MIQF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RH5ZBYFD.js.map → chunk-BVZZN2LH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-27BXPBAY.js.map → chunk-CYBDUHNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7FPBAQS.js.map → chunk-CZPVDLD2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPECA746.js.map → chunk-EUKTMRN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2466X6E4.js.map → chunk-FFOQHGNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JLM7BHI7.js.map → chunk-GFMSLORL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SDR5J34Q.js.map → chunk-GRRG3MCT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ326ZKX.js.map → chunk-H4GRLYJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OGXLACHC.js.map → chunk-HQTPRV4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BHO33VBQ.js.map → chunk-IEEJQCZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4DUVCVLZ.js.map → chunk-JMK5GCK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AXIDKKAT.js.map → chunk-K2VYLVX4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EJUDVUYZ.js.map → chunk-KCO2EAN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6AQZPVHQ.js.map → chunk-KIYCOJ63.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZRP4VG5U.js.map → chunk-KLXF7NCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCWF6IYD.js.map → chunk-KN3URLKS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N74UMG5H.js.map → chunk-LRKMWUUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AVEE5EHK.js.map → chunk-LTRAF2D7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJYK2T43.js.map → chunk-MRD4T5LF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G7I7DEZA.js.map → chunk-N2JSWVWG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5QFDBI4F.js.map → chunk-N3QCJS4M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4A3BJ675.js.map → chunk-OTUJZKGI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HZZEHPRG.js.map → chunk-QH3FSKRJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKZAN7BD.js.map → chunk-S62UANU7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3J6JRJ3I.js.map → chunk-SYNKD3ZG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L5OEFZQG.js.map → chunk-U2BEEM2X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVMTBV6V.js.map → chunk-UT73HUPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VICZWYGZ.js.map → chunk-UTSH5GWX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MDPEOIGN.js.map → chunk-XWGEMNBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HYTGA6GI.js.map → chunk-Y4NRKBFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22WKIL3H.js.map → chunk-YPKFV2JR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDPTYJIM.js.map → chunk-ZNHEYCDD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MAUKX7JC.js.map → chunk-ZNT7KEWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-T3GCKV7C.js.map → claim-SENTPZBN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-EMQLYPRW.js.map → claim-Z7MEQCBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-TQYAAFJP.js.map → close-424MX4CU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-E6ZZGCJY.js.map → close-YCWQQPDS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-YUXJRZPQ.js.map → comments-4FGNTSNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-QCKR2YY2.js.map → comments-7YS5MY5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OCZ3FJ4Z.js.map → context-LHVKJSPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-B6275WPX.js.map → context-ZQY54JNS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-DEM4DATS.js.map → copy-GYNQQPW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-BTJOSKKT.js.map → copy-TLW7JTQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-RLRJMRTM.js.map → create-VSKYSOCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-OH3BDGBB.js.map → create-XTMAPS7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-LSVHAB4Y.js.map → delete-4W5JYCEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-BHK7VB2Z.js.map → delete-ANTOTI2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XHYXWEPT.js.map → deps-HPPE6MJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-4UDFJRUA.js.map → deps-ZQZN54EZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GYZNVS26.js.map → docs-RPOVFMP3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-26S44RXU.js.map → docs-XJNYBJGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PGRVIJQU.js.map → eval-DM6JBZTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-UYF3ZPVO.js.map → eval-RFBI5FGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CPSLJQVE.js.map → extension-B3YY4WY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CXJ6RELI.js.map → extension-TTSEFQTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-NQHEXUZD.js.map → files-5D65CHGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-MBNICQFM.js.map → files-GPIG77EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XZW5423D.js.map → focus-C3PEJV2C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DWYIG7GU.js.map → focus-ZHN7WIGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-LPVMKJQJ.js.map → gc-D4JQ6OWN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-7GQYOS2G.js.map → gc-VZIXDL32.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-WSZHY3PN.js.map → history-DD7L7BNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-NERDJNUB.js.map → history-IL7XCEX2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-MP6CH7U5.js.map → history-redact-IX4YEWMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-O3NBCNWC.js.map → history-redact-VYCWQFK7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-64XDLQJB.js.map → init-F27NHENZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-PAX32BJA.js.map → init-HHVQQP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LPKCSJX7.js.map → learnings-HJVDQIGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-JR6MA5TI.js.map → learnings-XSFSUUWK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-G5Y65VF6.js.map → list-HPMEKCAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DNBJVO3E.js.map → list-VMPWTURB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2BMU3VVQ.js.map → notes-GDZIKGR6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-6KTGO2OJ.js.map → notes-WDDBPC4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-QLER5ENE.js.map → profile-CCOKZ2IQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-4OMM32CD.js.map → profile-HUCENIEQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-4MHZFJ2E.js.map → restore-4CBWUMCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-YALDGTQR.js.map → restore-5UEAGG3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-LB6DOLRL.js.map → scheduling-shortcuts-6VFKNKCM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-UTOYKLXQ.js.map → scheduling-shortcuts-ERHCVTEM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-73HR2OJW.js.map → schema-TDGK6N3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U6LJKSIR.js.map → schema-UE5KKAUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KILGT37L.js.map → search-FP7MEU4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-AXPXKZER.js.map → search-K4CFLQ5S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-PSYVVTNZ.js.map → stats-NJJCALEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-W5KNVJWQ.js.map → stats-XT6QRKQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-ACD52Z3S.js.map → test-UFSJ5YIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PWDIZ255.js.map → test-YCDAUBWF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-AMRSOIWP.js.map → update-MTCFES6X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-KFX2SIAC.js.map → update-Y5WQVT5O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-HAK6JG2O.js.map → upgrade-DTAHZ236.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-BRL6KCOJ.js.map → upgrade-JUDU7YL4.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-registry.js","sources":["core/item/type-registry.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/item/type-registry\n *\n * Defines item parsing, formatting, and lifecycle helpers for Type Registry.\n */\nimport { TYPE_TO_FOLDER } from \"../shared/constants.js\";\nimport type { ExtensionRegistrationRegistry } from \"../extensions/loader.js\";\nimport type {\n ItemTypeCommandOptionPolicy,\n ItemTypeDefinition,\n ItemTypeOptionDefinition,\n PmSettings,\n} from \"../../types/index.js\";\nimport { ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport {\n normalizeItemTypeDefinition as normalizeSharedItemTypeDefinition,\n normalizeItemTypeStringList,\n strictPolicyCommand,\n} from \"./item-type-definition.js\";\n\nexport const DEFAULT_REQUIRED_CREATE_FIELDS = [\n \"title\",\n \"description\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"author\",\n \"message\",\n \"assignee\",\n] as const;\n\nexport const DEFAULT_REQUIRED_CREATE_REPEATABLES = [\"dep\", \"comment\", \"note\", \"learning\", \"file\", \"test\", \"doc\"] as const;\n\n/**\n * Restricts command option policy command values accepted by command, SDK, and storage contracts.\n */\nexport type CommandOptionPolicyCommand = \"create\" | \"update\";\n\n// Keep aligned with cli/commands/shared-unset-fields.ts. This core registry\n// cannot import CLI unset metadata without creating a core -> CLI dependency.\nconst COMMON_MUTATION_COMMAND_OPTION_KEYS = [\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"definitionOfReady\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"whyNow\",\n \"assignee\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blockedBy\",\n \"blockedReason\",\n \"unblockNote\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"reproSteps\",\n \"resolution\",\n \"expectedResult\",\n \"actualResult\",\n \"affectedVersion\",\n \"fixedVersion\",\n \"component\",\n \"regression\",\n \"customerImpact\",\n] as const;\n\nconst CREATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"type\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n ...COMMON_MUTATION_COMMAND_OPTION_KEYS,\n \"author\",\n \"message\",\n \"dep\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n] as const;\n\nconst UPDATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"body\",\n \"status\",\n \"closeReason\",\n \"priority\",\n \"type\",\n \"tags\",\n ...COMMON_MUTATION_COMMAND_OPTION_KEYS,\n \"author\",\n \"message\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n \"allowAuditUpdate\",\n \"force\",\n] as const;\n\nconst SHARED_COMMAND_OPTION_ALIASES: Record<string, string> = {\n \"close-reason\": \"closeReason\",\n close_reason: \"closeReason\",\n \"estimated-minutes\": \"estimatedMinutes\",\n estimated_minutes: \"estimatedMinutes\",\n estimate: \"estimatedMinutes\",\n \"acceptance-criteria\": \"acceptanceCriteria\",\n acceptance_criteria: \"acceptanceCriteria\",\n ac: \"acceptanceCriteria\",\n \"definition-of-ready\": \"definitionOfReady\",\n definition_of_ready: \"definitionOfReady\",\n rank: \"order\",\n \"why-now\": \"whyNow\",\n why_now: \"whyNow\",\n \"blocked-by\": \"blockedBy\",\n blocked_by: \"blockedBy\",\n \"blocked-reason\": \"blockedReason\",\n blocked_reason: \"blockedReason\",\n \"unblock-note\": \"unblockNote\",\n unblock_note: \"unblockNote\",\n \"repro-steps\": \"reproSteps\",\n repro_steps: \"reproSteps\",\n \"expected-result\": \"expectedResult\",\n expected_result: \"expectedResult\",\n \"actual-result\": \"actualResult\",\n actual_result: \"actualResult\",\n \"affected-version\": \"affectedVersion\",\n affected_version: \"affectedVersion\",\n \"fixed-version\": \"fixedVersion\",\n fixed_version: \"fixedVersion\",\n \"customer-impact\": \"customerImpact\",\n customer_impact: \"customerImpact\",\n \"type-option\": \"typeOption\",\n type_option: \"typeOption\",\n type_options: \"typeOption\",\n};\n\nconst CREATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n};\n\nconst UPDATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n \"allow-audit-update\": \"allowAuditUpdate\",\n allow_audit_update: \"allowAuditUpdate\",\n};\n\nconst CREATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n type: \"--type\",\n status: \"--status\",\n priority: \"--priority\",\n tags: \"--tags\",\n body: \"--body\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n author: \"--author\",\n message: \"--message\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n dep: \"--dep\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n};\n\nconst UPDATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n body: \"--body\",\n status: \"--status\",\n closeReason: \"--close-reason\",\n priority: \"--priority\",\n type: \"--type\",\n tags: \"--tags\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n allowAuditUpdate: \"--allow-audit-update\",\n author: \"--author\",\n message: \"--message\",\n force: \"--force\",\n};\n\n/**\n * Documents the command option policy state payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandOptionPolicyState {\n required: string[];\n hidden: string[];\n disabled: string[];\n errors: string[];\n}\n\n/**\n * Documents the resolved item type definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ResolvedItemTypeDefinition {\n name: string;\n /** Optional human description carried from the type definition. */\n description?: string;\n folder: string;\n aliases: string[];\n /** Optional per-type status applied at create time when `--status` is omitted. */\n default_status?: string;\n required_create_fields: string[];\n required_create_repeatables: string[];\n options: ItemTypeOptionDefinition[];\n command_option_policies: ItemTypeCommandOptionPolicy[];\n}\n\n/**\n * Documents the item type registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeRegistry {\n types: string[];\n folders: string[];\n type_to_folder: Record<string, string>;\n by_type: Record<string, ResolvedItemTypeDefinition>;\n alias_to_type: Record<string, string>;\n}\n\nfunction normalizeCommandOptionToken(value: string): string {\n return value.trim().replace(/^--+/, \"\").toLowerCase();\n}\n\nfunction commandOptionKeys(command: CommandOptionPolicyCommand): readonly string[] {\n return command === \"create\" ? CREATE_COMMAND_OPTION_KEYS : UPDATE_COMMAND_OPTION_KEYS;\n}\n\nfunction commandOptionAliases(command: CommandOptionPolicyCommand): Record<string, string> {\n return command === \"create\" ? CREATE_COMMAND_OPTION_ALIASES : UPDATE_COMMAND_OPTION_ALIASES;\n}\n\n/**\n * Implements canonicalize command option key for the public runtime surface of this module.\n */\nexport function canonicalizeCommandOptionKey(\n command: CommandOptionPolicyCommand,\n rawOption: string,\n): string | undefined {\n const normalizedToken = normalizeCommandOptionToken(rawOption);\n if (normalizedToken.length === 0) {\n return undefined;\n }\n const aliased = commandOptionAliases(command)[normalizedToken];\n if (aliased) {\n return aliased;\n }\n return commandOptionKeys(command).find((candidate) => candidate.toLowerCase() === normalizedToken);\n}\n\n/**\n * Implements command option flag label for the public runtime surface of this module.\n */\nexport function commandOptionFlagLabel(command: CommandOptionPolicyCommand, optionKey: string): string {\n const labels = command === \"create\" ? CREATE_COMMAND_OPTION_FLAG_LABELS : UPDATE_COMMAND_OPTION_FLAG_LABELS;\n return labels[optionKey] ?? `--${optionKey.replace(/([A-Z])/g, \"-$1\").toLowerCase()}`;\n}\n\n/**\n * Implements to default folder for the public runtime surface of this module.\n */\nexport function toDefaultFolder(name: string): string {\n const normalized = toSlugToken(name);\n if (normalized.length === 0) {\n return \"items\";\n }\n return normalized.endsWith(\"s\") ? normalized : `${normalized}s`;\n}\n\nfunction toSlugToken(value: string): string {\n const trimmed = value.trim().toLowerCase();\n let slug = \"\";\n let pendingDash = false;\n for (const character of trimmed) {\n const code = character.charCodeAt(0);\n const isAlpha = code >= 97 && code <= 122;\n const isDigit = code >= 48 && code <= 57;\n if (isAlpha || isDigit) {\n if (pendingDash && slug.length > 0) {\n slug += \"-\";\n }\n slug += character;\n pendingDash = false;\n continue;\n }\n if (slug.length > 0) {\n pendingDash = true;\n }\n }\n return slug;\n}\n\n// Runtime registry consumes untrusted extension/file definitions, so it uses the\n// strict policy-command resolver (trim + lowercase, reject non-create/update). All\n// other normalization is single-sourced from ./item-type-definition.ts (pm-v798).\nfunction normalizeTypeDefinition(definition: ItemTypeDefinition): ItemTypeDefinition | null {\n return normalizeSharedItemTypeDefinition(definition, { resolvePolicyCommand: strictPolicyCommand });\n}\n\nfunction coerceTypeDefinitionFromUnknown(raw: unknown): ItemTypeDefinition | null {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return null;\n }\n const record = raw as Record<string, unknown>;\n const name = typeof record.name === \"string\" ? record.name : \"\";\n if (name.trim().length === 0) {\n return null;\n }\n const folder = typeof record.folder === \"string\" ? record.folder : undefined;\n const description = typeof record.description === \"string\" ? record.description : undefined;\n const defaultStatus = typeof record.default_status === \"string\" ? record.default_status : undefined;\n const aliases = Array.isArray(record.aliases) ? record.aliases.filter((value): value is string => typeof value === \"string\") : undefined;\n const requiredCreateFields = Array.isArray(record.required_create_fields)\n ? record.required_create_fields.filter((value): value is string => typeof value === \"string\")\n : undefined;\n const requiredCreateRepeatables = Array.isArray(record.required_create_repeatables)\n ? record.required_create_repeatables.filter((value): value is string => typeof value === \"string\")\n : undefined;\n let options: ItemTypeOptionDefinition[] | undefined;\n if (Array.isArray(record.options)) {\n options = [];\n for (const entry of record.options) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const optionRecord = entry as Record<string, unknown>;\n if (typeof optionRecord.key !== \"string\") {\n continue;\n }\n options.push({\n key: optionRecord.key,\n values: Array.isArray(optionRecord.values)\n ? optionRecord.values.filter((value): value is string => typeof value === \"string\")\n : [],\n required: optionRecord.required === undefined ? undefined : Boolean(optionRecord.required),\n aliases: Array.isArray(optionRecord.aliases)\n ? optionRecord.aliases.filter((value): value is string => typeof value === \"string\")\n : undefined,\n description: typeof optionRecord.description === \"string\" ? optionRecord.description : undefined,\n });\n }\n }\n let commandOptionPolicies: ItemTypeCommandOptionPolicy[] | undefined;\n if (Array.isArray(record.command_option_policies)) {\n commandOptionPolicies = [];\n for (const entry of record.command_option_policies) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const policyRecord = entry as Record<string, unknown>;\n if (typeof policyRecord.command !== \"string\" || typeof policyRecord.option !== \"string\") {\n continue;\n }\n const normalizedCommand = policyRecord.command.trim().toLowerCase();\n if (normalizedCommand !== \"create\" && normalizedCommand !== \"update\") {\n continue;\n }\n commandOptionPolicies.push({\n command: normalizedCommand,\n option: policyRecord.option,\n required: policyRecord.required === undefined ? undefined : Boolean(policyRecord.required),\n visible: policyRecord.visible === undefined ? undefined : Boolean(policyRecord.visible),\n enabled: policyRecord.enabled === undefined ? undefined : Boolean(policyRecord.enabled),\n });\n }\n }\n return {\n name,\n description,\n default_status: defaultStatus,\n folder,\n aliases,\n required_create_fields: requiredCreateFields,\n required_create_repeatables: requiredCreateRepeatables,\n options,\n command_option_policies: commandOptionPolicies,\n };\n}\n\nfunction applyTypeDefinitions(\n source: ItemTypeDefinition[],\n target: Map<string, ResolvedItemTypeDefinition>,\n): void {\n for (const rawDefinition of source) {\n const normalizedDefinition = normalizeTypeDefinition(rawDefinition);\n if (!normalizedDefinition) {\n continue;\n }\n const lowerName = normalizedDefinition.name.toLowerCase();\n const existing = target.get(lowerName);\n const keepName = existing?.name ?? normalizedDefinition.name;\n const folder = normalizedDefinition.folder ?? existing?.folder ?? toDefaultFolder(keepName);\n const aliases = normalizeItemTypeStringList([\n ...(existing?.aliases ?? []),\n ...(normalizedDefinition.aliases ?? []),\n ]);\n const requiredCreateFields = normalizedDefinition.required_create_fields\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields)\n : existing?.required_create_fields ?? [];\n const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables)\n : existing?.required_create_repeatables ?? [];\n const options = normalizedDefinition.options\n ? normalizedDefinition.options\n : existing?.options\n ? [...existing.options]\n : [];\n const commandOptionPolicies = normalizedDefinition.command_option_policies\n ? normalizedDefinition.command_option_policies\n : existing?.command_option_policies\n ? [...existing.command_option_policies]\n : [];\n const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;\n const description = normalizedDefinition.description ?? existing?.description;\n target.set(lowerName, {\n name: keepName,\n ...(description ? { description } : {}),\n ...(defaultStatus ? { default_status: defaultStatus } : {}),\n folder,\n aliases,\n required_create_fields: requiredCreateFields,\n required_create_repeatables: requiredCreateRepeatables,\n options,\n command_option_policies: commandOptionPolicies,\n });\n }\n}\n\nfunction collectExtensionTypeDefinitions(registrations: ExtensionRegistrationRegistry | null | undefined): ItemTypeDefinition[] {\n if (!registrations) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const registration of registrations.item_types ?? []) {\n const typeDefinitionsRaw = (registration as { types?: unknown[] }).types;\n if (!Array.isArray(typeDefinitionsRaw)) {\n continue;\n }\n for (const rawDefinition of typeDefinitionsRaw) {\n const normalized = coerceTypeDefinitionFromUnknown(rawDefinition);\n if (normalized) {\n definitions.push(normalized);\n }\n }\n }\n return definitions;\n}\n\n/**\n * Implements resolve item type registry for the public runtime surface of this module.\n */\nexport function resolveItemTypeRegistry(\n settings: PmSettings,\n extensionRegistrations: ExtensionRegistrationRegistry | null | undefined = null,\n): ItemTypeRegistry {\n const byLowerName = new Map<string, ResolvedItemTypeDefinition>();\n for (const builtin of ITEM_TYPE_VALUES) {\n byLowerName.set(builtin.toLowerCase(), {\n name: builtin,\n folder: TYPE_TO_FOLDER[builtin],\n aliases: [],\n required_create_fields: [...DEFAULT_REQUIRED_CREATE_FIELDS],\n required_create_repeatables: [...DEFAULT_REQUIRED_CREATE_REPEATABLES],\n options: [],\n command_option_policies: [],\n });\n }\n\n applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName);\n applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName);\n\n const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));\n const byType: Record<string, ResolvedItemTypeDefinition> = {};\n const aliasToType: Record<string, string> = {};\n const typeToFolder: Record<string, string> = {};\n for (const definition of definitions) {\n byType[definition.name] = definition;\n typeToFolder[definition.name] = definition.folder;\n aliasToType[definition.name.toLowerCase()] = definition.name;\n for (const alias of definition.aliases) {\n aliasToType[alias.toLowerCase()] = definition.name;\n }\n }\n const folders = [...new Set(definitions.map((definition) => definition.folder))].sort((left, right) => left.localeCompare(right));\n return {\n types: definitions.map((definition) => definition.name),\n folders,\n type_to_folder: typeToFolder,\n by_type: byType,\n alias_to_type: aliasToType,\n };\n}\n\n/**\n * Implements resolve type name for the public runtime surface of this module.\n */\nexport function resolveTypeName(rawType: string | undefined, registry: ItemTypeRegistry): string | undefined {\n if (rawType === undefined) {\n return undefined;\n }\n return registry.alias_to_type[rawType.trim().toLowerCase()];\n}\n\n/**\n * Implements resolve type definition for the public runtime surface of this module.\n */\nexport function resolveTypeDefinition(\n typeName: string | undefined,\n registry: ItemTypeRegistry,\n): ResolvedItemTypeDefinition | undefined {\n const resolvedName = resolveTypeName(typeName, registry);\n if (!resolvedName) {\n return undefined;\n }\n return registry.by_type[resolvedName];\n}\n\n/**\n * Implements resolve command option policy state for the public runtime surface of this module.\n */\nexport function resolveCommandOptionPolicyState(\n typeDefinition: ResolvedItemTypeDefinition,\n command: CommandOptionPolicyCommand,\n baseRequiredOptions: Iterable<string>,\n): CommandOptionPolicyState {\n const errors: string[] = [];\n const required = new Set<string>();\n const hidden = new Set<string>();\n const disabled = new Set<string>();\n\n for (const rawBase of baseRequiredOptions) {\n const canonical = canonicalizeCommandOptionKey(command, rawBase);\n if (!canonical) {\n errors.push(\n `Unsupported base required option \"${rawBase}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n required.add(canonical);\n }\n\n for (const policy of typeDefinition.command_option_policies) {\n if (policy.command !== command) {\n continue;\n }\n const canonical = canonicalizeCommandOptionKey(command, policy.option);\n if (!canonical) {\n errors.push(\n `Unsupported command_option_policies option \"${policy.option}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n if (policy.required !== undefined) {\n if (policy.required) {\n required.add(canonical);\n } else {\n required.delete(canonical);\n }\n }\n if (policy.visible !== undefined) {\n if (policy.visible) {\n hidden.delete(canonical);\n } else {\n hidden.add(canonical);\n }\n }\n if (policy.enabled !== undefined) {\n if (policy.enabled) {\n disabled.delete(canonical);\n } else {\n disabled.add(canonical);\n }\n }\n }\n\n for (const option of required) {\n if (disabled.has(option)) {\n errors.push(\n `Option \"${option}\" cannot be both required and disabled for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n }\n }\n\n return {\n required: [...required],\n hidden: [...hidden].sort((left, right) => left.localeCompare(right)),\n disabled: [...disabled].sort((left, right) => left.localeCompare(right)),\n errors,\n };\n}\n\n/**\n * Implements validate type options for the public runtime surface of this module.\n */\nexport function validateTypeOptions(\n typeName: string,\n rawTypeOptions: Record<string, string> | undefined,\n registry: ItemTypeRegistry,\n): { normalized: Record<string, string> | undefined; errors: string[] } {\n const typeDefinition = resolveTypeDefinition(typeName, registry);\n if (!typeDefinition) {\n return {\n normalized: undefined,\n errors: [`Unknown type \"${typeName}\"`],\n };\n }\n const errors: string[] = [];\n const optionByAlias = new Map<string, ItemTypeOptionDefinition>();\n for (const option of typeDefinition.options) {\n optionByAlias.set(option.key.toLowerCase(), option);\n for (const alias of option.aliases ?? []) {\n optionByAlias.set(alias.toLowerCase(), option);\n }\n }\n\n const normalized: Record<string, string> = {};\n for (const [rawKey, rawValue] of Object.entries(rawTypeOptions ?? {})) {\n const trimmedKey = rawKey.trim();\n const trimmedValue = rawValue.trim();\n if (trimmedKey.length === 0) {\n errors.push(\"type option keys must not be empty\");\n continue;\n }\n if (trimmedValue.length === 0) {\n errors.push(`type option \"${trimmedKey}\" must not be empty`);\n continue;\n }\n const optionDefinition = optionByAlias.get(trimmedKey.toLowerCase());\n if (!optionDefinition) {\n const allowed = typeDefinition.options.map((option) => option.key).join(\", \");\n errors.push(\n typeDefinition.options.length > 0\n ? `Unknown type option \"${trimmedKey}\" for type \"${typeDefinition.name}\". Allowed: ${allowed}`\n : `Type \"${typeDefinition.name}\" does not define any configurable type options`,\n );\n continue;\n }\n const allowedValues = optionDefinition.values;\n let resolvedValue = trimmedValue;\n if (allowedValues.length > 0) {\n const valueLookup = new Map(allowedValues.map((value) => [value.toLowerCase(), value]));\n const canonical = valueLookup.get(trimmedValue.toLowerCase());\n if (!canonical) {\n errors.push(\n `Invalid value \"${trimmedValue}\" for type option \"${optionDefinition.key}\". Allowed: ${allowedValues.join(\", \")}`,\n );\n continue;\n }\n resolvedValue = canonical;\n }\n normalized[optionDefinition.key] = resolvedValue;\n }\n\n for (const option of typeDefinition.options) {\n if (option.required && !(option.key in normalized)) {\n errors.push(`Missing required type option \"${option.key}\" for type \"${typeDefinition.name}\"`);\n }\n }\n\n const sortedKeys = Object.keys(normalized).sort((left, right) => left.localeCompare(right));\n if (sortedKeys.length === 0) {\n return {\n normalized: undefined,\n errors,\n };\n }\n return {\n normalized: Object.fromEntries(sortedKeys.map((key) => [key, normalized[key]])),\n errors,\n };\n}\n"],"names":[],"mapp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,iCAAiC,MAAM,CAAC,GAAG,eAAe,cAAc,CAAC,IAAI,GAAG,CAAC,CAAC;QAChG,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5F,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;YACL,UAAU,EAAE,SAAS;YACrB,MAAM;SACP,CAAC;IACJ,CAAC;IACD,OAAO;QACL,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/E,MAAM;KACP,CAAC;AACJ,CAAC","debugId":"aca609de-d881-5f34-804f-ed3daa6aab2a"}
|
|
1
|
+
{"version":3,"file":"type-registry.js","sources":["core/item/type-registry.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/item/type-registry\n *\n * Defines item parsing, formatting, and lifecycle helpers for Type Registry.\n */\nimport { TYPE_TO_FOLDER } from \"../shared/constants.js\";\nimport type { ExtensionRegistrationRegistry } from \"../extensions/loader.js\";\nimport type {\n ItemTypeCommandOptionPolicy,\n ItemTypeDefinition,\n ItemTypeOptionDefinition,\n PmSettings,\n} from \"../../types/index.js\";\nimport { ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport {\n normalizeItemTypeDefinition as normalizeSharedItemTypeDefinition,\n normalizeItemTypeStringList,\n strictPolicyCommand,\n} from \"./item-type-definition.js\";\n\nexport const DEFAULT_REQUIRED_CREATE_FIELDS = [\n \"title\",\n \"description\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"author\",\n \"message\",\n \"assignee\",\n] as const;\n\nexport const DEFAULT_REQUIRED_CREATE_REPEATABLES = [\"dep\", \"comment\", \"note\", \"learning\", \"file\", \"test\", \"doc\"] as const;\n\n/**\n * Restricts command option policy command values accepted by command, SDK, and storage contracts.\n */\nexport type CommandOptionPolicyCommand = \"create\" | \"update\";\n\n// Keep aligned with cli/commands/shared-unset-fields.ts. This core registry\n// cannot import CLI unset metadata without creating a core -> CLI dependency.\nconst COMMON_MUTATION_COMMAND_OPTION_KEYS = [\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"definitionOfReady\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"whyNow\",\n \"assignee\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blockedBy\",\n \"blockedReason\",\n \"unblockNote\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"reproSteps\",\n \"resolution\",\n \"expectedResult\",\n \"actualResult\",\n \"affectedVersion\",\n \"fixedVersion\",\n \"component\",\n \"regression\",\n \"customerImpact\",\n] as const;\n\nconst CREATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"type\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n ...COMMON_MUTATION_COMMAND_OPTION_KEYS,\n \"author\",\n \"message\",\n \"dep\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n] as const;\n\nconst UPDATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"body\",\n \"status\",\n \"closeReason\",\n \"priority\",\n \"type\",\n \"tags\",\n ...COMMON_MUTATION_COMMAND_OPTION_KEYS,\n \"author\",\n \"message\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n \"allowAuditUpdate\",\n \"force\",\n] as const;\n\nconst SHARED_COMMAND_OPTION_ALIASES: Record<string, string> = {\n \"close-reason\": \"closeReason\",\n close_reason: \"closeReason\",\n \"estimated-minutes\": \"estimatedMinutes\",\n estimated_minutes: \"estimatedMinutes\",\n estimate: \"estimatedMinutes\",\n \"acceptance-criteria\": \"acceptanceCriteria\",\n acceptance_criteria: \"acceptanceCriteria\",\n ac: \"acceptanceCriteria\",\n \"definition-of-ready\": \"definitionOfReady\",\n definition_of_ready: \"definitionOfReady\",\n rank: \"order\",\n \"why-now\": \"whyNow\",\n why_now: \"whyNow\",\n \"blocked-by\": \"blockedBy\",\n blocked_by: \"blockedBy\",\n \"blocked-reason\": \"blockedReason\",\n blocked_reason: \"blockedReason\",\n \"unblock-note\": \"unblockNote\",\n unblock_note: \"unblockNote\",\n \"repro-steps\": \"reproSteps\",\n repro_steps: \"reproSteps\",\n \"expected-result\": \"expectedResult\",\n expected_result: \"expectedResult\",\n \"actual-result\": \"actualResult\",\n actual_result: \"actualResult\",\n \"affected-version\": \"affectedVersion\",\n affected_version: \"affectedVersion\",\n \"fixed-version\": \"fixedVersion\",\n fixed_version: \"fixedVersion\",\n \"customer-impact\": \"customerImpact\",\n customer_impact: \"customerImpact\",\n \"type-option\": \"typeOption\",\n type_option: \"typeOption\",\n type_options: \"typeOption\",\n};\n\nconst CREATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n};\n\nconst UPDATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n \"allow-audit-update\": \"allowAuditUpdate\",\n allow_audit_update: \"allowAuditUpdate\",\n};\n\nconst CREATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n type: \"--type\",\n status: \"--status\",\n priority: \"--priority\",\n tags: \"--tags\",\n body: \"--body\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n author: \"--author\",\n message: \"--message\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n dep: \"--dep\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n};\n\nconst UPDATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n body: \"--body\",\n status: \"--status\",\n closeReason: \"--close-reason\",\n priority: \"--priority\",\n type: \"--type\",\n tags: \"--tags\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n allowAuditUpdate: \"--allow-audit-update\",\n author: \"--author\",\n message: \"--message\",\n force: \"--force\",\n};\n\n/**\n * Documents the command option policy state payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandOptionPolicyState {\n required: string[];\n hidden: string[];\n disabled: string[];\n errors: string[];\n}\n\n/**\n * Documents the resolved item type definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ResolvedItemTypeDefinition {\n name: string;\n /** Optional human description carried from the type definition. */\n description?: string;\n folder: string;\n aliases: string[];\n /** Optional per-type status applied at create time when `--status` is omitted. */\n default_status?: string;\n required_create_fields: string[];\n required_create_repeatables: string[];\n options: ItemTypeOptionDefinition[];\n command_option_policies: ItemTypeCommandOptionPolicy[];\n}\n\n/**\n * Documents the item type registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeRegistry {\n types: string[];\n folders: string[];\n type_to_folder: Record<string, string>;\n by_type: Record<string, ResolvedItemTypeDefinition>;\n alias_to_type: Record<string, string>;\n}\n\nfunction normalizeCommandOptionToken(value: string): string {\n return value.trim().replace(/^--+/, \"\").toLowerCase();\n}\n\nfunction commandOptionKeys(command: CommandOptionPolicyCommand): readonly string[] {\n return command === \"create\" ? CREATE_COMMAND_OPTION_KEYS : UPDATE_COMMAND_OPTION_KEYS;\n}\n\nfunction commandOptionAliases(command: CommandOptionPolicyCommand): Record<string, string> {\n return command === \"create\" ? CREATE_COMMAND_OPTION_ALIASES : UPDATE_COMMAND_OPTION_ALIASES;\n}\n\n/**\n * Implements canonicalize command option key for the public runtime surface of this module.\n */\nexport function canonicalizeCommandOptionKey(\n command: CommandOptionPolicyCommand,\n rawOption: string,\n): string | undefined {\n const normalizedToken = normalizeCommandOptionToken(rawOption);\n if (normalizedToken.length === 0) {\n return undefined;\n }\n const aliased = commandOptionAliases(command)[normalizedToken];\n if (aliased) {\n return aliased;\n }\n return commandOptionKeys(command).find((candidate) => candidate.toLowerCase() === normalizedToken);\n}\n\n/**\n * Implements command option flag label for the public runtime surface of this module.\n */\nexport function commandOptionFlagLabel(command: CommandOptionPolicyCommand, optionKey: string): string {\n const labels = command === \"create\" ? CREATE_COMMAND_OPTION_FLAG_LABELS : UPDATE_COMMAND_OPTION_FLAG_LABELS;\n return labels[optionKey] ?? `--${optionKey.replace(/([A-Z])/g, \"-$1\").toLowerCase()}`;\n}\n\n/**\n * Implements to default folder for the public runtime surface of this module.\n */\nexport function toDefaultFolder(name: string): string {\n const normalized = toSlugToken(name);\n if (normalized.length === 0) {\n return \"items\";\n }\n return normalized.endsWith(\"s\") ? normalized : `${normalized}s`;\n}\n\nfunction toSlugToken(value: string): string {\n const trimmed = value.trim().toLowerCase();\n let slug = \"\";\n let pendingDash = false;\n for (const character of trimmed) {\n const code = character.charCodeAt(0);\n const isAlpha = code >= 97 && code <= 122;\n const isDigit = code >= 48 && code <= 57;\n if (isAlpha || isDigit) {\n if (pendingDash && slug.length > 0) {\n slug += \"-\";\n }\n slug += character;\n pendingDash = false;\n continue;\n }\n if (slug.length > 0) {\n pendingDash = true;\n }\n }\n return slug;\n}\n\n// Runtime registry consumes untrusted extension/file definitions, so it uses the\n// strict policy-command resolver (trim + lowercase, reject non-create/update). All\n// other normalization is single-sourced from ./item-type-definition.ts (pm-v798).\nfunction normalizeTypeDefinition(definition: ItemTypeDefinition): ItemTypeDefinition | null {\n return normalizeSharedItemTypeDefinition(definition, { resolvePolicyCommand: strictPolicyCommand });\n}\n\nfunction readStringArray(record: Record<string, unknown>, key: string): string[] | undefined {\n const value = record[key];\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === \"string\") : undefined;\n}\n\nfunction coerceOptionDefinitionFromUnknown(raw: unknown): ItemTypeOptionDefinition | null {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return null;\n }\n const optionRecord = raw as Record<string, unknown>;\n if (typeof optionRecord.key !== \"string\") {\n return null;\n }\n return {\n key: optionRecord.key,\n values: readStringArray(optionRecord, \"values\") ?? [],\n required: optionRecord.required === undefined ? undefined : Boolean(optionRecord.required),\n aliases: readStringArray(optionRecord, \"aliases\"),\n description: typeof optionRecord.description === \"string\" ? optionRecord.description : undefined,\n };\n}\n\nfunction coerceCommandOptionPolicyFromUnknown(raw: unknown): ItemTypeCommandOptionPolicy | null {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return null;\n }\n const policyRecord = raw as Record<string, unknown>;\n if (typeof policyRecord.command !== \"string\" || typeof policyRecord.option !== \"string\") {\n return null;\n }\n const normalizedCommand = policyRecord.command.trim().toLowerCase();\n if (normalizedCommand !== \"create\" && normalizedCommand !== \"update\") {\n return null;\n }\n return {\n command: normalizedCommand,\n option: policyRecord.option,\n required: policyRecord.required === undefined ? undefined : Boolean(policyRecord.required),\n visible: policyRecord.visible === undefined ? undefined : Boolean(policyRecord.visible),\n enabled: policyRecord.enabled === undefined ? undefined : Boolean(policyRecord.enabled),\n };\n}\n\nfunction coerceOptionDefinitionsFromRecord(record: Record<string, unknown>): ItemTypeOptionDefinition[] | undefined {\n if (!Array.isArray(record.options)) {\n return undefined;\n }\n return record.options\n .map((entry) => coerceOptionDefinitionFromUnknown(entry))\n .filter((entry): entry is ItemTypeOptionDefinition => entry !== null);\n}\n\nfunction coerceCommandOptionPoliciesFromRecord(record: Record<string, unknown>): ItemTypeCommandOptionPolicy[] | undefined {\n if (!Array.isArray(record.command_option_policies)) {\n return undefined;\n }\n return record.command_option_policies\n .map((entry) => coerceCommandOptionPolicyFromUnknown(entry))\n .filter((entry): entry is ItemTypeCommandOptionPolicy => entry !== null);\n}\n\nfunction coerceTypeDefinitionFromUnknown(raw: unknown): ItemTypeDefinition | null {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return null;\n }\n const record = raw as Record<string, unknown>;\n const name = typeof record.name === \"string\" ? record.name : \"\";\n if (name.trim().length === 0) {\n return null;\n }\n const folder = typeof record.folder === \"string\" ? record.folder : undefined;\n const description = typeof record.description === \"string\" ? record.description : undefined;\n const defaultStatus = typeof record.default_status === \"string\" ? record.default_status : undefined;\n return {\n name,\n description,\n default_status: defaultStatus,\n folder,\n aliases: readStringArray(record, \"aliases\"),\n required_create_fields: readStringArray(record, \"required_create_fields\"),\n required_create_repeatables: readStringArray(record, \"required_create_repeatables\"),\n options: coerceOptionDefinitionsFromRecord(record),\n command_option_policies: coerceCommandOptionPoliciesFromRecord(record),\n };\n}\n\nfunction resolveDefinitionRequiredCreateFields(\n normalizedDefinition: ItemTypeDefinition,\n existing: ResolvedItemTypeDefinition | undefined,\n): string[] {\n return normalizedDefinition.required_create_fields\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields)\n : existing?.required_create_fields ?? [];\n}\n\nfunction resolveDefinitionRequiredCreateRepeatables(\n normalizedDefinition: ItemTypeDefinition,\n existing: ResolvedItemTypeDefinition | undefined,\n): string[] {\n return normalizedDefinition.required_create_repeatables\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables)\n : existing?.required_create_repeatables ?? [];\n}\n\nfunction resolveDefinitionOptions(\n normalizedDefinition: ItemTypeDefinition,\n existing: ResolvedItemTypeDefinition | undefined,\n): ItemTypeOptionDefinition[] {\n return normalizedDefinition.options ? normalizedDefinition.options : existing?.options ? [...existing.options] : [];\n}\n\nfunction resolveDefinitionCommandOptionPolicies(\n normalizedDefinition: ItemTypeDefinition,\n existing: ResolvedItemTypeDefinition | undefined,\n): ItemTypeCommandOptionPolicy[] {\n return normalizedDefinition.command_option_policies\n ? normalizedDefinition.command_option_policies\n : existing?.command_option_policies\n ? [...existing.command_option_policies]\n : [];\n}\n\nfunction applyTypeDefinitions(\n source: ItemTypeDefinition[],\n target: Map<string, ResolvedItemTypeDefinition>,\n): void {\n for (const rawDefinition of source) {\n const normalizedDefinition = normalizeTypeDefinition(rawDefinition);\n if (!normalizedDefinition) {\n continue;\n }\n const lowerName = normalizedDefinition.name.toLowerCase();\n const existing = target.get(lowerName);\n const keepName = existing?.name ?? normalizedDefinition.name;\n const folder = normalizedDefinition.folder ?? existing?.folder ?? toDefaultFolder(keepName);\n const aliases = normalizeItemTypeStringList([\n ...(existing?.aliases ?? []),\n ...(normalizedDefinition.aliases ?? []),\n ]);\n const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;\n const description = normalizedDefinition.description ?? existing?.description;\n target.set(lowerName, {\n name: keepName,\n ...(description ? { description } : {}),\n ...(defaultStatus ? { default_status: defaultStatus } : {}),\n folder,\n aliases,\n required_create_fields: resolveDefinitionRequiredCreateFields(normalizedDefinition, existing),\n required_create_repeatables: resolveDefinitionRequiredCreateRepeatables(normalizedDefinition, existing),\n options: resolveDefinitionOptions(normalizedDefinition, existing),\n command_option_policies: resolveDefinitionCommandOptionPolicies(normalizedDefinition, existing),\n });\n }\n}\n\nfunction collectExtensionTypeDefinitions(registrations: ExtensionRegistrationRegistry | null | undefined): ItemTypeDefinition[] {\n if (!registrations) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const registration of registrations.item_types ?? []) {\n const typeDefinitionsRaw = (registration as { types?: unknown[] }).types;\n if (!Array.isArray(typeDefinitionsRaw)) {\n continue;\n }\n for (const rawDefinition of typeDefinitionsRaw) {\n const normalized = coerceTypeDefinitionFromUnknown(rawDefinition);\n if (normalized) {\n definitions.push(normalized);\n }\n }\n }\n return definitions;\n}\n\n/**\n * Implements resolve item type registry for the public runtime surface of this module.\n */\nexport function resolveItemTypeRegistry(\n settings: PmSettings,\n extensionRegistrations: ExtensionRegistrationRegistry | null | undefined = null,\n): ItemTypeRegistry {\n const byLowerName = new Map<string, ResolvedItemTypeDefinition>();\n for (const builtin of ITEM_TYPE_VALUES) {\n byLowerName.set(builtin.toLowerCase(), {\n name: builtin,\n folder: TYPE_TO_FOLDER[builtin],\n aliases: [],\n required_create_fields: [...DEFAULT_REQUIRED_CREATE_FIELDS],\n required_create_repeatables: [...DEFAULT_REQUIRED_CREATE_REPEATABLES],\n options: [],\n command_option_policies: [],\n });\n }\n\n applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName);\n applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName);\n\n const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));\n const byType: Record<string, ResolvedItemTypeDefinition> = {};\n const aliasToType: Record<string, string> = {};\n const typeToFolder: Record<string, string> = {};\n for (const definition of definitions) {\n byType[definition.name] = definition;\n typeToFolder[definition.name] = definition.folder;\n aliasToType[definition.name.toLowerCase()] = definition.name;\n for (const alias of definition.aliases) {\n aliasToType[alias.toLowerCase()] = definition.name;\n }\n }\n const folders = [...new Set(definitions.map((definition) => definition.folder))].sort((left, right) => left.localeCompare(right));\n return {\n types: definitions.map((definition) => definition.name),\n folders,\n type_to_folder: typeToFolder,\n by_type: byType,\n alias_to_type: aliasToType,\n };\n}\n\n/**\n * Implements resolve type name for the public runtime surface of this module.\n */\nexport function resolveTypeName(rawType: string | undefined, registry: ItemTypeRegistry): string | undefined {\n if (rawType === undefined) {\n return undefined;\n }\n return registry.alias_to_type[rawType.trim().toLowerCase()];\n}\n\n/**\n * Implements resolve type definition for the public runtime surface of this module.\n */\nexport function resolveTypeDefinition(\n typeName: string | undefined,\n registry: ItemTypeRegistry,\n): ResolvedItemTypeDefinition | undefined {\n const resolvedName = resolveTypeName(typeName, registry);\n if (!resolvedName) {\n return undefined;\n }\n return registry.by_type[resolvedName];\n}\n\n/**\n * Implements resolve command option policy state for the public runtime surface of this module.\n */\nexport function resolveCommandOptionPolicyState(\n typeDefinition: ResolvedItemTypeDefinition,\n command: CommandOptionPolicyCommand,\n baseRequiredOptions: Iterable<string>,\n): CommandOptionPolicyState {\n const errors: string[] = [];\n const required = new Set<string>();\n const hidden = new Set<string>();\n const disabled = new Set<string>();\n\n for (const rawBase of baseRequiredOptions) {\n const canonical = canonicalizeCommandOptionKey(command, rawBase);\n if (!canonical) {\n errors.push(\n `Unsupported base required option \"${rawBase}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n required.add(canonical);\n }\n\n for (const policy of typeDefinition.command_option_policies) {\n if (policy.command !== command) {\n continue;\n }\n const canonical = canonicalizeCommandOptionKey(command, policy.option);\n if (!canonical) {\n errors.push(\n `Unsupported command_option_policies option \"${policy.option}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n if (policy.required !== undefined) {\n if (policy.required) {\n required.add(canonical);\n } else {\n required.delete(canonical);\n }\n }\n if (policy.visible !== undefined) {\n if (policy.visible) {\n hidden.delete(canonical);\n } else {\n hidden.add(canonical);\n }\n }\n if (policy.enabled !== undefined) {\n if (policy.enabled) {\n disabled.delete(canonical);\n } else {\n disabled.add(canonical);\n }\n }\n }\n\n for (const option of required) {\n if (disabled.has(option)) {\n errors.push(\n `Option \"${option}\" cannot be both required and disabled for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n }\n }\n\n return {\n required: [...required],\n hidden: [...hidden].sort((left, right) => left.localeCompare(right)),\n disabled: [...disabled].sort((left, right) => left.localeCompare(right)),\n errors,\n };\n}\n\n/**\n * Implements validate type options for the public runtime surface of this module.\n */\nexport function validateTypeOptions(\n typeName: string,\n rawTypeOptions: Record<string, string> | undefined,\n registry: ItemTypeRegistry,\n): { normalized: Record<string, string> | undefined; errors: string[] } {\n const typeDefinition = resolveTypeDefinition(typeName, registry);\n if (!typeDefinition) {\n return {\n normalized: undefined,\n errors: [`Unknown type \"${typeName}\"`],\n };\n }\n const errors: string[] = [];\n const optionByAlias = new Map<string, ItemTypeOptionDefinition>();\n for (const option of typeDefinition.options) {\n optionByAlias.set(option.key.toLowerCase(), option);\n for (const alias of option.aliases ?? []) {\n optionByAlias.set(alias.toLowerCase(), option);\n }\n }\n\n const normalized: Record<string, string> = {};\n for (const [rawKey, rawValue] of Object.entries(rawTypeOptions ?? {})) {\n const trimmedKey = rawKey.trim();\n const trimmedValue = rawValue.trim();\n if (trimmedKey.length === 0) {\n errors.push(\"type option keys must not be empty\");\n continue;\n }\n if (trimmedValue.length === 0) {\n errors.push(`type option \"${trimmedKey}\" must not be empty`);\n continue;\n }\n const optionDefinition = optionByAlias.get(trimmedKey.toLowerCase());\n if (!optionDefinition) {\n const allowed = typeDefinition.options.map((option) => option.key).join(\", \");\n errors.push(\n typeDefinition.options.length > 0\n ? `Unknown type option \"${trimmedKey}\" for type \"${typeDefinition.name}\". Allowed: ${allowed}`\n : `Type \"${typeDefinition.name}\" does not define any configurable type options`,\n );\n continue;\n }\n const allowedValues = optionDefinition.values;\n let resolvedValue = trimmedValue;\n if (allowedValues.length > 0) {\n const valueLookup = new Map(allowedValues.map((value) => [value.toLowerCase(), value]));\n const canonical = valueLookup.get(trimmedValue.toLowerCase());\n if (!canonical) {\n errors.push(\n `Invalid value \"${trimmedValue}\" for type option \"${optionDefinition.key}\". Allowed: ${allowedValues.join(\", \")}`,\n );\n continue;\n }\n resolvedValue = canonical;\n }\n normalized[optionDefinition.key] = resolvedValue;\n }\n\n for (const option of typeDefinition.options) {\n if (option.required && !(option.key in normalized)) {\n errors.push(`Missing required type option \"${option.key}\" for type \"${typeDefinition.name}\"`);\n }\n }\n\n const sortedKeys = Object.keys(normalized).sort((left, right) => left.localeCompare(right));\n if (sortedKeys.length === 0) {\n return {\n normalized: undefined,\n errors,\n };\n }\n return {\n normalized: Object.fromEntries(sortedKeys.map((key) => [key, normalized[key]])),\n errors,\n };\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;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AC,OAAO,EAAE,CAAC;QAC5C,IAAI,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC;YACnD,MAAM,CAAC,IAAI,CAAC,iCAAiC,MAAM,CAAC,GAAG,eAAe,cAAc,CAAC,IAAI,GAAG,CAAC,CAAC;QAChG,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5F,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;YACL,UAAU,EAAE,SAAS;YACrB,MAAM;SACP,CAAC;IACJ,CAAC;IACD,OAAO;QACL,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/E,MAAM;KACP,CAAC;AACJ,CAAC","debugId":"5d1396d8-5493-51c2-9b51-4b57073f85da"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* MCP server, and returns the original reference unchanged when nothing is compacted.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
!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]="
|
|
22
|
+
!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]="31ecd51a-b5e0-503b-b488-4e6a12815ffe")}catch(e){}}();
|
|
23
23
|
const CHANGED_FIELDS_KEY = "changed_fields";
|
|
24
24
|
const CHANGED_FIELD_COUNT_KEY = "changed_field_count";
|
|
25
25
|
const ROWS_KEY = "rows";
|
|
@@ -60,17 +60,48 @@ function replaceRows(envelope, rows) {
|
|
|
60
60
|
projected[ROWS_KEY] = rows;
|
|
61
61
|
return projected;
|
|
62
62
|
}
|
|
63
|
+
function projectIdOnlyResult(result) {
|
|
64
|
+
if (!isPlainObject(result) || !isPlainObject(result.item)) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
const id = typeof result.item.id === "string" ? result.item.id : undefined;
|
|
68
|
+
const status = typeof result.item.status === "string" ? result.item.status : undefined;
|
|
69
|
+
if (!id) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return status ? { id, status } : { id };
|
|
73
|
+
}
|
|
74
|
+
function compactUpdateManyRows(envelope) {
|
|
75
|
+
const rows = isUpdateManyMutationEnvelope(envelope) ? envelope[ROWS_KEY] : undefined;
|
|
76
|
+
if (!Array.isArray(rows)) {
|
|
77
|
+
return { projected: envelope, changed: false };
|
|
78
|
+
}
|
|
79
|
+
let rowsChanged = false;
|
|
80
|
+
const nextRows = rows.map((row) => {
|
|
81
|
+
if (!isPlainObject(row)) {
|
|
82
|
+
return row;
|
|
83
|
+
}
|
|
84
|
+
const compactedRow = compactOwnChangedFields(row);
|
|
85
|
+
if (compactedRow) {
|
|
86
|
+
rowsChanged = true;
|
|
87
|
+
return compactedRow;
|
|
88
|
+
}
|
|
89
|
+
return row;
|
|
90
|
+
});
|
|
91
|
+
return rowsChanged
|
|
92
|
+
? { projected: replaceRows(envelope, nextRows), changed: true }
|
|
93
|
+
: { projected: envelope, changed: false };
|
|
94
|
+
}
|
|
63
95
|
/**
|
|
64
96
|
* Returns a copy of a mutation result with the envelope `changed_fields` arrays
|
|
65
97
|
* replaced by `changed_field_count` when compact mode is requested. Inputs that are
|
|
66
98
|
* not a mutation envelope (or full mode) are returned unchanged (same reference).
|
|
67
99
|
*/
|
|
68
100
|
export function projectMutationResult(result, options = {}) {
|
|
69
|
-
if (options.idOnly === true
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return status ? { id, status } : { id };
|
|
101
|
+
if (options.idOnly === true) {
|
|
102
|
+
const idOnly = projectIdOnlyResult(result);
|
|
103
|
+
if (idOnly !== null) {
|
|
104
|
+
return idOnly;
|
|
74
105
|
}
|
|
75
106
|
}
|
|
76
107
|
const mode = options.changedFields ?? "full";
|
|
@@ -84,27 +115,12 @@ export function projectMutationResult(result, options = {}) {
|
|
|
84
115
|
projected = compactedTop;
|
|
85
116
|
changed = true;
|
|
86
117
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const nextRows = rows.map((row) => {
|
|
92
|
-
if (!isPlainObject(row)) {
|
|
93
|
-
return row;
|
|
94
|
-
}
|
|
95
|
-
const compactedRow = compactOwnChangedFields(row);
|
|
96
|
-
if (compactedRow) {
|
|
97
|
-
rowsChanged = true;
|
|
98
|
-
return compactedRow;
|
|
99
|
-
}
|
|
100
|
-
return row;
|
|
101
|
-
});
|
|
102
|
-
if (rowsChanged) {
|
|
103
|
-
projected = replaceRows(projected, nextRows);
|
|
104
|
-
changed = true;
|
|
105
|
-
}
|
|
118
|
+
const rowProjection = compactUpdateManyRows(projected);
|
|
119
|
+
if (rowProjection.changed) {
|
|
120
|
+
projected = rowProjection.projected;
|
|
121
|
+
changed = true;
|
|
106
122
|
}
|
|
107
123
|
return changed ? projected : result;
|
|
108
124
|
}
|
|
109
125
|
//# sourceMappingURL=mutation-projection.js.map
|
|
110
|
-
//# debugId=
|
|
126
|
+
//# debugId=31ecd51a-b5e0-503b-b488-4e6a12815ffe
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-projection.js","sources":["core/output/mutation-projection.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared projection helper for mutation command results.\n *\n * Mutation commands (create/update/close/append/update-many) return a result\n * envelope that carries a `changed_fields` string array. On create this array simply\n * re-lists every field the command just set, which the item echo above it already\n * shows, so for high-volume agent loops it is ~50% redundant payload. This helper\n * lets the CLI (`--no-changed-fields`) and the MCP agent path trim that array down\n * to a deterministic `changed_field_count` without losing mutation evidence.\n *\n * Compaction is deliberately scoped to the mutation envelope only:\n * - the envelope's own top-level `changed_fields` (create/update/close/append), and\n * - `rows[*].changed_fields` (update-many reports its delta per row).\n * It does NOT recurse into arbitrary nested objects, so unrelated payloads that\n * legitimately carry `changed_fields` (for example `pm history --diff` entries, or a\n * custom runtime metadata field) are left untouched.\n *\n * The helper is pure and side-effect free, reused by both the output layer and the\n * MCP server, and returns the original reference unchanged when nothing is compacted.\n */\n\n/** Controls whether mutation output keeps full changed fields or compact counts. */\nexport type ChangedFieldsMode = \"full\" | \"compact\";\n\n/**\n * Documents the mutation projection options payload exchanged by command, SDK, and package integrations.\n */\nexport interface MutationProjectionOptions {\n /** Defaults to \"full\" (unchanged output). \"compact\" drops the array, keeping a count. */\n changedFields?: ChangedFieldsMode;\n /** Return only id/status for single-item mutation envelopes. */\n idOnly?: boolean;\n}\n\nconst CHANGED_FIELDS_KEY = \"changed_fields\";\nconst CHANGED_FIELD_COUNT_KEY = \"changed_field_count\";\nconst ROWS_KEY = \"rows\";\nconst UPDATE_MANY_MUTATION_MODES = new Set([\"apply\", \"rollback\"]);\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\n\n/** Replace a single envelope's own top-level `changed_fields` array with a count. */\nfunction compactOwnChangedFields(envelope: Record<string, unknown>): Record<string, unknown> | null {\n const changedFields = envelope[CHANGED_FIELDS_KEY];\n if (!Array.isArray(changedFields)) {\n return null;\n }\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n for (const [key, value] of Object.entries(envelope)) {\n if (key !== CHANGED_FIELDS_KEY) {\n projected[key] = value;\n }\n }\n projected[CHANGED_FIELD_COUNT_KEY] = changedFields.length;\n return projected;\n}\n\nfunction isMutationEnvelope(value: Record<string, unknown>): boolean {\n return \"item\" in value && Array.isArray(value[CHANGED_FIELDS_KEY]);\n}\n\nfunction isUpdateManyMutationEnvelope(value: Record<string, unknown>): boolean {\n return (\n typeof value.mode === \"string\" &&\n UPDATE_MANY_MUTATION_MODES.has(value.mode) &&\n Array.isArray(value[ROWS_KEY])\n );\n}\n\nfunction replaceRows(envelope: Record<string, unknown>, rows: unknown[]): Record<string, unknown> {\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n Object.assign(projected, envelope);\n projected[ROWS_KEY] = rows;\n return projected;\n}\n\n/**\n * Returns a copy of a mutation result with the envelope `changed_fields` arrays\n * replaced by `changed_field_count` when compact mode is requested. Inputs that are\n * not a mutation envelope (or full mode) are returned unchanged (same reference).\n */\nexport function projectMutationResult(result: unknown, options: MutationProjectionOptions = {}): unknown {\n if (options.idOnly === true
|
|
1
|
+
{"version":3,"file":"mutation-projection.js","sources":["core/output/mutation-projection.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared projection helper for mutation command results.\n *\n * Mutation commands (create/update/close/append/update-many) return a result\n * envelope that carries a `changed_fields` string array. On create this array simply\n * re-lists every field the command just set, which the item echo above it already\n * shows, so for high-volume agent loops it is ~50% redundant payload. This helper\n * lets the CLI (`--no-changed-fields`) and the MCP agent path trim that array down\n * to a deterministic `changed_field_count` without losing mutation evidence.\n *\n * Compaction is deliberately scoped to the mutation envelope only:\n * - the envelope's own top-level `changed_fields` (create/update/close/append), and\n * - `rows[*].changed_fields` (update-many reports its delta per row).\n * It does NOT recurse into arbitrary nested objects, so unrelated payloads that\n * legitimately carry `changed_fields` (for example `pm history --diff` entries, or a\n * custom runtime metadata field) are left untouched.\n *\n * The helper is pure and side-effect free, reused by both the output layer and the\n * MCP server, and returns the original reference unchanged when nothing is compacted.\n */\n\n/** Controls whether mutation output keeps full changed fields or compact counts. */\nexport type ChangedFieldsMode = \"full\" | \"compact\";\n\n/**\n * Documents the mutation projection options payload exchanged by command, SDK, and package integrations.\n */\nexport interface MutationProjectionOptions {\n /** Defaults to \"full\" (unchanged output). \"compact\" drops the array, keeping a count. */\n changedFields?: ChangedFieldsMode;\n /** Return only id/status for single-item mutation envelopes. */\n idOnly?: boolean;\n}\n\nconst CHANGED_FIELDS_KEY = \"changed_fields\";\nconst CHANGED_FIELD_COUNT_KEY = \"changed_field_count\";\nconst ROWS_KEY = \"rows\";\nconst UPDATE_MANY_MUTATION_MODES = new Set([\"apply\", \"rollback\"]);\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\n\n/** Replace a single envelope's own top-level `changed_fields` array with a count. */\nfunction compactOwnChangedFields(envelope: Record<string, unknown>): Record<string, unknown> | null {\n const changedFields = envelope[CHANGED_FIELDS_KEY];\n if (!Array.isArray(changedFields)) {\n return null;\n }\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n for (const [key, value] of Object.entries(envelope)) {\n if (key !== CHANGED_FIELDS_KEY) {\n projected[key] = value;\n }\n }\n projected[CHANGED_FIELD_COUNT_KEY] = changedFields.length;\n return projected;\n}\n\nfunction isMutationEnvelope(value: Record<string, unknown>): boolean {\n return \"item\" in value && Array.isArray(value[CHANGED_FIELDS_KEY]);\n}\n\nfunction isUpdateManyMutationEnvelope(value: Record<string, unknown>): boolean {\n return (\n typeof value.mode === \"string\" &&\n UPDATE_MANY_MUTATION_MODES.has(value.mode) &&\n Array.isArray(value[ROWS_KEY])\n );\n}\n\nfunction replaceRows(envelope: Record<string, unknown>, rows: unknown[]): Record<string, unknown> {\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n Object.assign(projected, envelope);\n projected[ROWS_KEY] = rows;\n return projected;\n}\n\nfunction projectIdOnlyResult(result: unknown): unknown | null {\n if (!isPlainObject(result) || !isPlainObject(result.item)) {\n return null;\n }\n const id = typeof result.item.id === \"string\" ? result.item.id : undefined;\n const status = typeof result.item.status === \"string\" ? result.item.status : undefined;\n if (!id) {\n return null;\n }\n return status ? { id, status } : { id };\n}\n\nfunction compactUpdateManyRows(envelope: Record<string, unknown>): { projected: Record<string, unknown>; changed: boolean } {\n const rows = isUpdateManyMutationEnvelope(envelope) ? envelope[ROWS_KEY] : undefined;\n if (!Array.isArray(rows)) {\n return { projected: envelope, changed: false };\n }\n let rowsChanged = false;\n const nextRows = rows.map((row) => {\n if (!isPlainObject(row)) {\n return row;\n }\n const compactedRow = compactOwnChangedFields(row);\n if (compactedRow) {\n rowsChanged = true;\n return compactedRow;\n }\n return row;\n });\n return rowsChanged\n ? { projected: replaceRows(envelope, nextRows), changed: true }\n : { projected: envelope, changed: false };\n}\n\n/**\n * Returns a copy of a mutation result with the envelope `changed_fields` arrays\n * replaced by `changed_field_count` when compact mode is requested. Inputs that are\n * not a mutation envelope (or full mode) are returned unchanged (same reference).\n */\nexport function projectMutationResult(result: unknown, options: MutationProjectionOptions = {}): unknown {\n if (options.idOnly === true) {\n const idOnly = projectIdOnlyResult(result);\n if (idOnly !== null) {\n return idOnly;\n }\n }\n\n const mode = options.changedFields ?? \"full\";\n if (mode === \"full\" || !isPlainObject(result)) {\n return result;\n }\n\n let changed = false;\n let projected: Record<string, unknown> = result;\n\n const compactedTop = isMutationEnvelope(result) ? compactOwnChangedFields(result) : null;\n if (compactedTop !== null) {\n projected = compactedTop;\n changed = true;\n }\n\n const rowProjection = compactUpdateManyRows(projected);\n if (rowProjection.changed) {\n projected = rowProjection.projected;\n changed = true;\n }\n\n return changed ? projected : result;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;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CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YACpB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,IAAI,MAAM,CAAC;IAC7C,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,SAAS,GAA4B,MAAM,CAAC;IAEhD,MAAM,YAAY,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACzF,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,SAAS,GAAG,YAAY,CAAC;QACzB,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IAED,MAAM,aAAa,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;QAC1B,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC;QACpC,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;AACtC,CAAC","debugId":"31ecd51a-b5e0-503b-b488-4e6a12815ffe"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Resolves configurable schema, fields, statuses, and workflows for Runtime Schema.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
7
|
+
!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]="2e0d9a45-3807-55dd-9071-2b4f4ef9207a")}catch(e){}}();
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { pathExists, readFileIfExists, writeFileAtomic } from "../fs/fs-utils.js";
|
|
10
10
|
import { DEFAULT_STATUS_DEFINITIONS, DEFAULT_WORKFLOW_DEFINITION } from "../shared/constants.js";
|
|
@@ -89,6 +89,31 @@ function normalizeRuntimeWorkflow(workflow) {
|
|
|
89
89
|
canceled_status: normalizeStatusId(workflow?.canceled_status),
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
+
function appendTypeWorkflowPair(record, pair) {
|
|
93
|
+
if (!Array.isArray(pair) || pair.length !== 2) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const from = normalizeStatusToken(pair[0]);
|
|
97
|
+
const to = normalizeStatusToken(pair[1]);
|
|
98
|
+
if (from.length === 0 || to.length === 0) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (record.pairs.some((candidate) => candidate[0] === from && candidate[1] === to)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
record.pairs.push([from, to]);
|
|
105
|
+
}
|
|
106
|
+
function normalizedTypeWorkflowEntry(entry) {
|
|
107
|
+
const rawType = typeof entry?.type === "string" ? entry.type.trim() : "";
|
|
108
|
+
if (rawType.length === 0 || !Array.isArray(entry?.allowed_transitions)) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const record = { type: rawType, pairs: [], denyAll: entry.allowed_transitions.length === 0 };
|
|
112
|
+
for (const pair of entry.allowed_transitions) {
|
|
113
|
+
appendTypeWorkflowPair(record, pair);
|
|
114
|
+
}
|
|
115
|
+
return { typeKey: rawType.toLowerCase(), record };
|
|
116
|
+
}
|
|
92
117
|
function normalizeTypeWorkflowDefinitions(workflows) {
|
|
93
118
|
if (!Array.isArray(workflows) || workflows.length === 0) {
|
|
94
119
|
return undefined;
|
|
@@ -105,35 +130,16 @@ function normalizeTypeWorkflowDefinitions(workflows) {
|
|
|
105
130
|
// typo would start failing every update for that type under strict enforcement.
|
|
106
131
|
const byTypeKey = new Map();
|
|
107
132
|
for (const entry of workflows) {
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
133
|
+
const normalized = normalizedTypeWorkflowEntry(entry);
|
|
134
|
+
if (normalized === null) {
|
|
110
135
|
continue;
|
|
111
136
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const pairs = entry.allowed_transitions;
|
|
117
|
-
const record = byTypeKey.get(typeKey) ?? { type: rawType, pairs: [], denyAll: false };
|
|
118
|
-
// Only an explicitly empty array signals an intentional deny-all.
|
|
119
|
-
if (pairs.length === 0) {
|
|
120
|
-
record.denyAll = true;
|
|
121
|
-
}
|
|
122
|
-
for (const pair of pairs) {
|
|
123
|
-
if (!Array.isArray(pair) || pair.length !== 2) {
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
const from = normalizeStatusToken(pair[0]);
|
|
127
|
-
const to = normalizeStatusToken(pair[1]);
|
|
128
|
-
if (from.length === 0 || to.length === 0) {
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
if (record.pairs.some((candidate) => candidate[0] === from && candidate[1] === to)) {
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
record.pairs.push([from, to]);
|
|
137
|
+
const record = byTypeKey.get(normalized.typeKey) ?? normalized.record;
|
|
138
|
+
record.denyAll ||= normalized.record.denyAll;
|
|
139
|
+
for (const pair of normalized.record.pairs) {
|
|
140
|
+
appendTypeWorkflowPair(record, pair);
|
|
135
141
|
}
|
|
136
|
-
byTypeKey.set(typeKey, record);
|
|
142
|
+
byTypeKey.set(normalized.typeKey, record);
|
|
137
143
|
}
|
|
138
144
|
const normalized = [];
|
|
139
145
|
for (const record of byTypeKey.values()) {
|
|
@@ -635,4 +641,4 @@ export function statusIsTerminal(status, registry) {
|
|
|
635
641
|
return registry.terminal_statuses.has(normalized);
|
|
636
642
|
}
|
|
637
643
|
//# sourceMappingURL=runtime-schema.js.map
|
|
638
|
-
//# debugId=
|
|
644
|
+
//# debugId=2e0d9a45-3807-55dd-9071-2b4f4ef9207a
|