@unbrained/pm-cli 2026.6.24 → 2026.7.1
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/AGENTS.md +2 -0
- package/CHANGELOG.md +113 -1
- package/CONTRIBUTING.md +30 -0
- package/README.md +16 -3
- package/dist/cli/bootstrap-args.js +89 -79
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +3 -3
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.js +8 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +63 -62
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close.d.ts +2 -4
- package/dist/cli/commands/close.js +5 -17
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +158 -9
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +1 -1
- package/dist/cli/commands/config.js +2 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +31 -4
- package/dist/cli/commands/context.js +33 -10
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +48 -8
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -6
- package/dist/cli/commands/create.js +491 -587
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.js +59 -46
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +15 -0
- package/dist/cli/commands/extension/describe.js +48 -2
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +129 -75
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +37 -7
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/managed-state.js +101 -57
- package/dist/cli/commands/extension/managed-state.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +38 -8
- package/dist/cli/commands/extension/scaffold.js +1956 -242
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +28 -3
- package/dist/cli/commands/extension.js +1181 -880
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/item-filter-options.d.ts +63 -0
- package/dist/cli/commands/item-filter-options.js +10 -0
- package/dist/cli/commands/item-filter-options.js.map +1 -0
- package/dist/cli/commands/legacy-none-tokens.d.ts +14 -0
- package/dist/cli/commands/legacy-none-tokens.js +31 -2
- package/dist/cli/commands/legacy-none-tokens.js.map +1 -1
- package/dist/cli/commands/linked-artifacts.d.ts +7 -0
- package/dist/cli/commands/linked-artifacts.js +12 -2
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/list-filter-shared.js +55 -48
- package/dist/cli/commands/list-filter-shared.js.map +1 -1
- package/dist/cli/commands/list.d.ts +16 -39
- package/dist/cli/commands/list.js +127 -118
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.d.ts +98 -0
- package/dist/cli/commands/next.js +304 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/profile.d.ts +208 -0
- package/dist/cli/commands/profile.js +418 -0
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +12 -13
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -0
- package/dist/cli/commands/schema.js +9 -3
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +2 -39
- package/dist/cli/commands/search.js +196 -172
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/shared-unset-fields.d.ts +30 -0
- package/dist/cli/commands/shared-unset-fields.js +161 -0
- package/dist/cli/commands/shared-unset-fields.js.map +1 -0
- package/dist/cli/commands/stats.js +15 -3
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/test.js +115 -125
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -6
- package/dist/cli/commands/update.js +37 -232
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +20 -5
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/extension-command-options.js +48 -21
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +26 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.js +3 -3
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +27 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +42 -3
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +86 -2
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +67 -6
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +9 -1
- package/dist/cli/registration-helpers.js +149 -123
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +16 -0
- package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js → activity-DBLQVIP6.js} +9 -11
- package/dist/cli-bundle/chunks/{aggregate-63NWNIBR.js → aggregate-JTEF4BP7.js} +17 -18
- package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-YHCYX2EV.js → aggregate-SDF7DUOD.js} +16 -17
- package/dist/cli-bundle/chunks/aggregate-SDF7DUOD.js.map +7 -0
- package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js → append-LOVPGVPT.js} +8 -10
- package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js.map → append-LOVPGVPT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-PUKREFV5.js → append-QCFJSDFL.js} +10 -12
- package/dist/cli-bundle/chunks/{append-PUKREFV5.js.map → append-QCFJSDFL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js → chunk-22WKIL3H.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js.map → chunk-22WKIL3H.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js → chunk-2466X6E4.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js.map → chunk-2466X6E4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js → chunk-27BXPBAY.js} +3 -3
- package/dist/cli-bundle/chunks/{schema-QO5I4FBL.js → chunk-2D4HATP2.js} +136 -66
- package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-J7I4C5ZB.js → chunk-3J6JRJ3I.js} +153 -125
- package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OHDQNKJB.js → chunk-3K2M5OYU.js} +106 -34
- package/dist/cli-bundle/chunks/chunk-3K2M5OYU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XVYKWZNL.js → chunk-3S2KT7NG.js} +127 -127
- package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js → chunk-3VGN2UWE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N5B6WZC5.js → chunk-3XZCOZ5J.js} +115 -123
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4A3BJ675.js +799 -0
- package/dist/cli-bundle/chunks/chunk-4A3BJ675.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js → chunk-4DSGXSBL.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js.map → chunk-4DSGXSBL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js → chunk-4DUVCVLZ.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js.map → chunk-4DUVCVLZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IAP5KYBQ.js → chunk-4XOIEKSD.js} +563 -506
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-5LB7UGKE.js → chunk-55SNVXRQ.js} +79 -82
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-BFFO3AIB.js → chunk-5CGRF3L5.js} +128 -128
- package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JKL6HRMV.js → chunk-5QFDBI4F.js} +1260 -1046
- package/dist/cli-bundle/chunks/chunk-5QFDBI4F.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js → chunk-64HNBBFQ.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js.map → chunk-64HNBBFQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js +2444 -0
- package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js +17 -0
- package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VSAABFGQ.js → chunk-7R4QEMZZ.js} +1490 -734
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M6TUBOGW.js → chunk-A7FPBAQS.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-A7FPBAQS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GQYJEEFX.js → chunk-AVEE5EHK.js} +53 -54
- package/dist/cli-bundle/chunks/chunk-AVEE5EHK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js → chunk-AXIDKKAT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js → chunk-BDTISOSD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-C4C3EJCJ.js → chunk-BHO33VBQ.js} +509 -363
- package/dist/cli-bundle/chunks/chunk-BHO33VBQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6W3Y65PL.js → chunk-BZCEN4JA.js} +198 -177
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RRP6D345.js → chunk-CF7RL6FR.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-RRP6D345.js.map → chunk-CF7RL6FR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HC2S36NB.js → chunk-CWFNTKQJ.js} +154 -126
- package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CZVISY5A.js +87 -0
- package/dist/cli-bundle/chunks/chunk-CZVISY5A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js → chunk-DDPTYJIM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js → chunk-EJUDVUYZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js → chunk-EVMTBV6V.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RAWA3Y7O.js → chunk-FFMQB7WR.js} +199 -178
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js → chunk-G7I7DEZA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MEXZ5XUM.js → chunk-GJ326ZKX.js} +53 -54
- package/dist/cli-bundle/chunks/chunk-GJ326ZKX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js +119 -0
- package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OF7V47P3.js → chunk-HXTQJXWT.js} +2172 -2146
- package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js → chunk-HYTGA6GI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js → chunk-HZZEHPRG.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js +14 -0
- package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js → chunk-IJYK2T43.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js → chunk-IPYBJWTE.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js.map → chunk-IPYBJWTE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js → chunk-IZBR4NRW.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js.map → chunk-IZBR4NRW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js → chunk-JLM7BHI7.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js.map → chunk-JLM7BHI7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6EL7SW5C.js → chunk-JMP4E6D7.js} +114 -122
- package/dist/cli-bundle/chunks/chunk-JMP4E6D7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js → chunk-JPECA746.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KJZOSF7J.js → chunk-JSU5P7VS.js} +100 -35
- package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-55VEOYI3.js → chunk-JWXRETDF.js} +79 -82
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js → chunk-KNPEF7QG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js → chunk-L5OEFZQG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js → chunk-LB6TP6MC.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js.map → chunk-LB6TP6MC.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js → chunk-MAUKX7JC.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js.map → chunk-MAUKX7JC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SMXSDY7J.js → chunk-MDPEOIGN.js} +2221 -2172
- package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js → chunk-N74UMG5H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IXAZI443.js → chunk-NFDPYAIP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js → chunk-NKZAN7BD.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js +116 -0
- package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-L7UXKP2I.js → chunk-NU2UEROZ.js} +1257 -1029
- package/dist/cli-bundle/chunks/chunk-NU2UEROZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HBAEFWX3.js → chunk-NUHHPVVS.js} +65 -335
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js → chunk-NWMZWYYB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js → chunk-OGXLACHC.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js.map → chunk-OGXLACHC.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js +379 -0
- package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js → chunk-OTUHB4HS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ZLWRPBOW.js → chunk-QCWF6IYD.js} +510 -364
- package/dist/cli-bundle/chunks/chunk-QCWF6IYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PRVTGX64.js → chunk-RGEMWD6Q.js} +11 -23
- package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js +809 -0
- package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js → chunk-RLDHZHQS.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js.map → chunk-RLDHZHQS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{schema-C6QA367T.js → chunk-RMMQ74TG.js} +144 -67
- package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EYPINTFR.js → chunk-RVUALSJF.js} +1516 -753
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js +2468 -0
- package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js → chunk-SLMUGTK3.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SUREE24M.js → chunk-TP5Q5ZD3.js} +12 -24
- package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js → chunk-UYUYDGIB.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js.map → chunk-UYUYDGIB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js → chunk-UZIWVBE6.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js.map → chunk-UZIWVBE6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js → chunk-V3NOKJF2.js} +11 -13
- package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js.map → chunk-V3NOKJF2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XXKV4UWE.js → chunk-VARHOHYV.js} +571 -507
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AEACLRVH.js → chunk-VICZWYGZ.js} +18 -11
- package/dist/cli-bundle/chunks/chunk-VICZWYGZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js +382 -0
- package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js → chunk-W4ULYO7Z.js} +11 -13
- package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js.map → chunk-W4ULYO7Z.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js → chunk-WYDHYJPO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js → chunk-YITK2PJ6.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js.map → chunk-YITK2PJ6.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js +84 -0
- package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LNEDHJNQ.js → chunk-ZETXE4SE.js} +66 -329
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js → chunk-ZRP4VG5U.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js → claim-EMQLYPRW.js} +10 -12
- package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js.map → claim-EMQLYPRW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js → claim-T3GCKV7C.js} +8 -10
- package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js.map → claim-T3GCKV7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +14 -0
- package/dist/cli-bundle/chunks/{close-QHMVWM7M.js → close-TQYAAFJP.js} +7 -8
- package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js → close-many-BG5QQIDQ.js} +16 -18
- package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js.map → close-many-BG5QQIDQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js → close-many-LDRVEQY2.js} +18 -20
- package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js.map → close-many-LDRVEQY2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-5YM62D75.js → comments-QCKR2YY2.js} +11 -13
- package/dist/cli-bundle/chunks/{comments-5YM62D75.js.map → comments-QCKR2YY2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js → comments-YUXJRZPQ.js} +9 -11
- package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js.map → comments-YUXJRZPQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-NCNNWF6R.js → config-DMSU64QO.js} +18 -387
- package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +7 -0
- package/dist/cli-bundle/chunks/{config-SW3U7XP2.js → config-QH2DICD6.js} +18 -380
- package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +1 -0
- package/dist/cli-bundle/chunks/context-B6275WPX.js +46 -0
- package/dist/cli-bundle/chunks/context-OCZ3FJ4Z.js +42 -0
- package/dist/cli-bundle/chunks/{contracts-SY6PDFIK.js → contracts-HN7ABKLP.js} +72 -15
- package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-JXFGBOYT.js → contracts-W4FZVVD6.js} +72 -15
- package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js → copy-BTJOSKKT.js} +7 -11
- package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js.map → copy-BTJOSKKT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js → copy-DEM4DATS.js} +9 -13
- package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js.map → copy-DEM4DATS.js.map} +1 -1
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +28 -0
- package/dist/cli-bundle/chunks/{create-O4VONGPG.js → create-RLRJMRTM.js} +12 -14
- package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js → delete-BHK7VB2Z.js} +5 -7
- package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js.map → delete-BHK7VB2Z.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-724EQ6OS.js → delete-LSVHAB4Y.js} +7 -9
- package/dist/cli-bundle/chunks/{delete-724EQ6OS.js.map → delete-LSVHAB4Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js → deps-4UDFJRUA.js} +8 -11
- package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js.map → deps-4UDFJRUA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js → deps-XHYXWEPT.js} +6 -9
- package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js.map → deps-XHYXWEPT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js → docs-26S44RXU.js} +8 -9
- package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js.map → docs-26S44RXU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js → docs-GYZNVS26.js} +10 -11
- package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js.map → docs-GYZNVS26.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js → eval-PGRVIJQU.js} +12 -14
- package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js.map → eval-PGRVIJQU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js → eval-UYF3ZPVO.js} +10 -12
- package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js.map → eval-UYF3ZPVO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js → extension-CPSLJQVE.js} +12 -7
- package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js → extension-CXJ6RELI.js} +12 -7
- package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js → files-MBNICQFM.js} +9 -11
- package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js.map → files-MBNICQFM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{files-5BQWDRDT.js → files-NQHEXUZD.js} +11 -13
- package/dist/cli-bundle/chunks/{files-5BQWDRDT.js.map → files-NQHEXUZD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-RWGKD76E.js → focus-DWYIG7GU.js} +10 -14
- package/dist/cli-bundle/chunks/{focus-RWGKD76E.js.map → focus-DWYIG7GU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js → focus-XZW5423D.js} +8 -12
- package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js.map → focus-XZW5423D.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-BEJMQT64.js → gc-7GQYOS2G.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js → gc-LPVMKJQJ.js} +3 -3
- package/dist/cli-bundle/chunks/{get-LQG6PEVG.js → get-A7MAOHCU.js} +10 -13
- package/dist/cli-bundle/chunks/{get-LQG6PEVG.js.map → get-A7MAOHCU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-WVN75H42.js → get-DSDEKJ3L.js} +12 -15
- package/dist/cli-bundle/chunks/{get-WVN75H42.js.map → get-DSDEKJ3L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js → health-3IPFLKXB.js} +17 -17
- package/dist/cli-bundle/chunks/{health-P67NZ6TT.js → health-GZXGBZ36.js} +17 -17
- package/dist/cli-bundle/chunks/{history-RUKPKNY7.js → history-NERDJNUB.js} +8 -10
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +18 -0
- package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js → history-compact-2WRZ2WK4.js} +11 -14
- package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js.map → history-compact-2WRZ2WK4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js → history-compact-HR7BB4LR.js} +13 -16
- package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js.map → history-compact-HR7BB4LR.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js → history-redact-O3NBCNWC.js} +9 -11
- package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js → history-repair-LCMOS45X.js} +11 -14
- package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js.map → history-repair-LCMOS45X.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js → history-repair-XA3LC4GA.js} +13 -16
- package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js.map → history-repair-XA3LC4GA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{init-HBFGYS66.js → init-64XDLQJB.js} +12 -11
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js → learnings-JR6MA5TI.js} +9 -11
- package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js.map → learnings-JR6MA5TI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js → learnings-LPKCSJX7.js} +11 -13
- package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js.map → learnings-LPKCSJX7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{list-C7R33MD5.js → list-DNBJVO3E.js} +10 -10
- package/dist/cli-bundle/chunks/{list-DSN6UNFB.js → list-G5Y65VF6.js} +10 -10
- package/dist/cli-bundle/chunks/next-BCERKDUR.js +277 -0
- package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +7 -0
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js +274 -0
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js → notes-2BMU3VVQ.js} +9 -11
- package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js.map → notes-2BMU3VVQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js → notes-6KTGO2OJ.js} +11 -13
- package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js.map → notes-6KTGO2OJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js → plan-4WXEQCTN.js} +15 -18
- package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js.map → plan-4WXEQCTN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js → plan-RKZHQVXR.js} +17 -20
- package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js.map → plan-RKZHQVXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/profile-4OMM32CD.js +1235 -0
- package/dist/cli-bundle/chunks/profile-4OMM32CD.js.map +7 -0
- package/dist/cli-bundle/chunks/profile-QLER5ENE.js +1197 -0
- package/dist/cli-bundle/chunks/profile-QLER5ENE.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-OM3E2KMY.js → register-list-query-7LV46VAU.js} +45 -21
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-CCMHGZTF.js → register-list-query-SNG5PGA4.js} +44 -20
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-N3CDEGZU.js → register-mutation-ENNDUAZG.js} +106 -40
- package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UXTTWL6N.js → register-mutation-KK7PHYYU.js} +105 -39
- package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js → register-operations-C6OWLDSH.js} +32 -34
- package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js.map → register-operations-C6OWLDSH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js → register-operations-HZ6XERQG.js} +30 -32
- package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js.map → register-operations-HZ6XERQG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-G5LTSFYK.js → register-setup-P67EMBDJ.js} +68 -25
- package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-TWHKICM2.js → register-setup-ZKJ53RS7.js} +67 -24
- package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js → restore-4MHZFJ2E.js} +9 -11
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js → scheduling-shortcuts-LB6DOLRL.js} +14 -16
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js.map → scheduling-shortcuts-LB6DOLRL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js → scheduling-shortcuts-UTOYKLXQ.js} +12 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js.map → scheduling-shortcuts-UTOYKLXQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/schema-73HR2OJW.js +75 -0
- package/dist/cli-bundle/chunks/schema-U6LJKSIR.js +71 -0
- package/dist/cli-bundle/chunks/{search-2EI6EAXH.js → search-AXPXKZER.js} +10 -12
- package/dist/cli-bundle/chunks/{search-QBFBLQRO.js → search-KILGT37L.js} +10 -12
- package/dist/cli-bundle/chunks/{stats-TKC6CAKB.js → stats-PSYVVTNZ.js} +21 -13
- package/dist/cli-bundle/chunks/stats-PSYVVTNZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{stats-TCW2SZQG.js → stats-W5KNVJWQ.js} +20 -12
- package/dist/cli-bundle/chunks/stats-W5KNVJWQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js → telemetry-BZUF6H7G.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js → telemetry-GAHHQTOS.js} +4 -4
- package/dist/cli-bundle/chunks/test-ACD52Z3S.js +35 -0
- package/dist/cli-bundle/chunks/test-ACD52Z3S.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-NV2DRPUS.js → test-PWDIZ255.js} +15 -16
- package/dist/cli-bundle/chunks/test-PWDIZ255.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js → test-all-L2MDDUCA.js} +20 -22
- package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js.map → test-all-L2MDDUCA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-REW67LXT.js → test-all-RBZ6DLU2.js} +18 -20
- package/dist/cli-bundle/chunks/{test-all-REW67LXT.js.map → test-all-RBZ6DLU2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-PX73DMMI.js → test-runs-PLRAZEFW.js} +5 -6
- package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-runs-FQ5WNQLP.js → test-runs-UXIXPDKU.js} +6 -7
- package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +1 -0
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +24 -0
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js.map +7 -0
- package/dist/cli-bundle/chunks/update-KFX2SIAC.js +28 -0
- package/dist/cli-bundle/chunks/update-KFX2SIAC.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js → update-many-RNSBX2TA.js} +35 -36
- package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js.map → update-many-RNSBX2TA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js → update-many-Z5GJS5LC.js} +33 -34
- package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js.map → update-many-Z5GJS5LC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js → upgrade-BRL6KCOJ.js} +13 -8
- package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js.map → upgrade-BRL6KCOJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js → upgrade-HAK6JG2O.js} +11 -6
- package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js.map → upgrade-HAK6JG2O.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-HYZNIB6W.js → validate-MTUVL5VC.js} +38 -28
- package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-54SYJ7QW.js → validate-X5W76YJL.js} +39 -29
- package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +1 -0
- package/dist/cli-bundle/main.js +95 -724
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/config/positional-value.d.ts +2 -0
- package/dist/core/config/positional-value.js +2 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/extensions/activation-summary-markdown.d.ts +71 -0
- package/dist/core/extensions/activation-summary-markdown.js +151 -0
- package/dist/core/extensions/activation-summary-markdown.js.map +1 -0
- package/dist/core/extensions/activation-summary.d.ts +2 -0
- package/dist/core/extensions/activation-summary.js +3 -2
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +1 -1
- package/dist/core/extensions/capability-usage.js +4 -3
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-policy.d.ts +18 -3
- package/dist/core/extensions/extension-policy.js +116 -106
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/extension-registries.js +3 -2
- package/dist/core/extensions/extension-registries.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +21 -1
- package/dist/core/extensions/extension-types.js +3 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +439 -232
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/fs/fs-utils.js +27 -2
- package/dist/core/fs/fs-utils.js.map +1 -1
- package/dist/core/item/actionability.d.ts +57 -0
- package/dist/core/item/actionability.js +178 -0
- package/dist/core/item/actionability.js.map +1 -0
- package/dist/core/item/item-format.js +523 -410
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/type-registry.js +18 -45
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/profile/profile-describe.d.ts +64 -0
- package/dist/core/profile/profile-describe.js +83 -0
- package/dist/core/profile/profile-describe.js.map +1 -0
- package/dist/core/profile/profile-lint.d.ts +53 -0
- package/dist/core/profile/profile-lint.js +422 -0
- package/dist/core/profile/profile-lint.js.map +1 -0
- package/dist/core/profile/profile-plan.d.ts +145 -0
- package/dist/core/profile/profile-plan.js +0 -0
- package/dist/core/profile/profile-plan.js.map +1 -0
- package/dist/core/profile/profile-presets.d.ts +218 -0
- package/dist/core/profile/profile-presets.js +325 -0
- package/dist/core/profile/profile-presets.js.map +1 -0
- package/dist/core/schema/fields-file.js +25 -25
- package/dist/core/schema/fields-file.js.map +1 -1
- package/dist/core/schema/item-types-file.js +3 -3
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +4 -4
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.js +3 -3
- package/dist/core/schema/status-defs-file.js.map +1 -1
- package/dist/core/shared/serialization.js +83 -62
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/item-store.d.ts +1 -0
- package/dist/core/store/item-store.js +16 -8
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +4 -32
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +14 -14
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +50 -54
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +11 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/background-runs.js +3 -2
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/core/validate/linked-artifact-reference.d.ts +24 -0
- package/dist/core/validate/linked-artifact-reference.js +41 -0
- package/dist/core/validate/linked-artifact-reference.js.map +1 -0
- package/dist/mcp/server.js +540 -420
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +33 -2
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +15 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +3 -3
- package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +149 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +1514 -0
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -0
- package/dist/sdk/cli-contracts/string-lists.d.ts +14 -0
- package/dist/sdk/cli-contracts/string-lists.js +20 -0
- package/dist/sdk/cli-contracts/string-lists.js.map +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +51 -109
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +17 -0
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +54 -5
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +74 -0
- package/dist/sdk/cli-contracts/tool-schema.js +871 -0
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +13 -193
- package/dist/sdk/cli-contracts.js +5 -2277
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/compose.d.ts +11 -5
- package/dist/sdk/compose.js +240 -124
- package/dist/sdk/compose.js.map +1 -1
- package/dist/sdk/define.d.ts +14 -0
- package/dist/sdk/define.js +17 -2
- package/dist/sdk/define.js.map +1 -1
- package/dist/sdk/index.d.ts +14 -3
- package/dist/sdk/index.js +14 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +82 -2
- package/dist/sdk/testing.js +74 -3
- package/dist/sdk/testing.js.map +1 -1
- package/docs/AGENT_GUIDE.md +2 -0
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +37 -0
- package/docs/EXTENSIONS.md +12 -13
- package/docs/RELEASING.md +8 -4
- package/docs/SDK.md +184 -17
- package/docs/TESTING.md +12 -0
- package/docs/examples/policy-restricted-extension/README.md +6 -0
- package/docs/examples/policy-restricted-extension/index.ts +40 -0
- package/docs/examples/policy-restricted-extension/manifest.json +2 -2
- package/docs/examples/starter-extension/README.md +14 -2
- package/docs/examples/starter-extension/{index.js → index.ts} +51 -6
- package/docs/examples/starter-extension/manifest.json +2 -2
- package/package.json +20 -7
- package/packages/pm-beads/extensions/beads/index.ts +3 -3
- package/packages/pm-beads/extensions/beads/manifest.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +19 -7
- package/packages/pm-beads/extensions/beads/runtime.ts +155 -37
- package/packages/pm-calendar/extensions/calendar/index.ts +3 -3
- package/packages/pm-calendar/extensions/calendar/manifest.json +2 -2
- package/packages/pm-calendar/extensions/calendar/runtime.ts +2 -2
- package/packages/pm-command-kit/extensions/command-kit/index.ts +1 -1
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +2 -2
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +2 -2
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +1 -1
- package/packages/pm-kanban/README.md +97 -0
- package/packages/pm-kanban/extensions/kanban/index.ts +191 -0
- package/packages/pm-kanban/extensions/kanban/manifest.json +19 -0
- package/packages/pm-kanban/package.json +57 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +1 -1
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +1 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +2 -2
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -1
- package/packages/pm-templates/extensions/templates/index.ts +2 -2
- package/packages/pm-templates/extensions/templates/manifest.json +2 -2
- package/packages/pm-templates/extensions/templates/runtime.ts +1 -1
- package/packages/pm-todos/extensions/todos/index.ts +3 -3
- package/packages/pm-todos/extensions/todos/manifest.json +2 -2
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +19 -7
- package/packages/pm-todos/extensions/todos/runtime.ts +177 -43
- package/plugins/pm-claude/scripts/pm-mcp-server.mjs +2 -2
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +2 -2
- package/scripts/bundle-cli.mjs +1 -1
- package/dist/cli-bundle/chunks/activity-54TXGJ2T.js +0 -18
- package/dist/cli-bundle/chunks/aggregate-63NWNIBR.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-YHCYX2EV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6EL7SW5C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6W3Y65PL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AEACLRVH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B74BP6IS.js +0 -78
- package/dist/cli-bundle/chunks/chunk-B74BP6IS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BFFO3AIB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C4C3EJCJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EYPINTFR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js +0 -75
- package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GQYJEEFX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HBAEFWX3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HC2S36NB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IAP5KYBQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-INPHFO33.js +0 -764
- package/dist/cli-bundle/chunks/chunk-INPHFO33.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js +0 -86
- package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js +0 -115
- package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-J7I4C5ZB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JKL6HRMV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KJZOSF7J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-L7UXKP2I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LNEDHJNQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-M6TUBOGW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MEXZ5XUM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-N5B6WZC5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js +0 -761
- package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js +0 -83
- package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OF7V47P3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OHDQNKJB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js +0 -118
- package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PRVTGX64.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RAWA3Y7O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SMXSDY7J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SUREE24M.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js +0 -654
- package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VSAABFGQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XVYKWZNL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XXKV4UWE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZLWRPBOW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js +0 -657
- package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js.map +0 -7
- package/dist/cli-bundle/chunks/close-JEBZXONN.js +0 -15
- package/dist/cli-bundle/chunks/config-NCNNWF6R.js.map +0 -7
- package/dist/cli-bundle/chunks/config-SW3U7XP2.js.map +0 -1
- package/dist/cli-bundle/chunks/context-55VEOYI3.js.map +0 -1
- package/dist/cli-bundle/chunks/context-5LB7UGKE.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-JXFGBOYT.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-SY6PDFIK.js.map +0 -7
- package/dist/cli-bundle/chunks/create-CLSCHGJJ.js +0 -30
- package/dist/cli-bundle/chunks/history-ALTM2RRP.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-5YGLWUDH.js +0 -21
- package/dist/cli-bundle/chunks/init-C4CRHW22.js +0 -21
- package/dist/cli-bundle/chunks/register-list-query-CCMHGZTF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-OM3E2KMY.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-N3CDEGZU.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-UXTTWL6N.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-G5LTSFYK.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-TWHKICM2.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-LQHXBAY5.js +0 -19
- package/dist/cli-bundle/chunks/schema-C6QA367T.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-QO5I4FBL.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-TCW2SZQG.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-TKC6CAKB.js.map +0 -1
- package/dist/cli-bundle/chunks/test-WA6RZGM2.js +0 -36
- package/dist/cli-bundle/chunks/test-runs-FQ5WNQLP.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-PX73DMMI.js.map +0 -7
- package/dist/cli-bundle/chunks/update-BSKMQOYH.js +0 -28
- package/dist/cli-bundle/chunks/update-FIGYNQ2I.js +0 -24
- package/dist/cli-bundle/chunks/validate-54SYJ7QW.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-HYZNIB6W.js.map +0 -7
- package/docs/examples/policy-restricted-extension/index.js +0 -21
- package/packages/pm-beads/extensions/beads/index.js +0 -64
- package/packages/pm-beads/extensions/beads/runtime-loader.js +0 -86
- package/packages/pm-beads/extensions/beads/runtime.js +0 -482
- package/packages/pm-calendar/extensions/calendar/index.js +0 -150
- package/packages/pm-calendar/extensions/calendar/runtime.js +0 -126
- package/packages/pm-command-kit/extensions/command-kit/index.js +0 -181
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +0 -177
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +0 -153
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +0 -98
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +0 -294
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +0 -18
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +0 -124
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +0 -110
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +0 -258
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +0 -361
- package/packages/pm-templates/extensions/templates/index.js +0 -132
- package/packages/pm-templates/extensions/templates/runtime.js +0 -35
- package/packages/pm-todos/extensions/todos/index.js +0 -81
- package/packages/pm-todos/extensions/todos/runtime-loader.js +0 -86
- package/packages/pm-todos/extensions/todos/runtime.js +0 -545
- /package/dist/cli-bundle/chunks/{activity-54TXGJ2T.js.map → activity-AW6XVFH6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js.map → activity-DBLQVIP6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js.map → chunk-27BXPBAY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js.map → chunk-3VGN2UWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js.map → chunk-AXIDKKAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js.map → chunk-BDTISOSD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js.map → chunk-DDPTYJIM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js.map → chunk-EJUDVUYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js.map → chunk-EVMTBV6V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js.map → chunk-G7I7DEZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js.map → chunk-HYTGA6GI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js.map → chunk-HZZEHPRG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js.map → chunk-IJYK2T43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js.map → chunk-JPECA746.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js.map → chunk-KNPEF7QG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js.map → chunk-L5OEFZQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js.map → chunk-N74UMG5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IXAZI443.js.map → chunk-NFDPYAIP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js.map → chunk-NKZAN7BD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js.map → chunk-NWMZWYYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js.map → chunk-OTUHB4HS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js.map → chunk-SLMUGTK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js.map → chunk-WYDHYJPO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js.map → chunk-ZRP4VG5U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-JEBZXONN.js.map → close-E6ZZGCJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-QHMVWM7M.js.map → close-TQYAAFJP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-O4VONGPG.js.map → context-B6275WPX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-CLSCHGJJ.js.map → context-OCZ3FJ4Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js.map → create-OH3BDGBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js.map → create-RLRJMRTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-ALTM2RRP.js.map → extension-CPSLJQVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-RUKPKNY7.js.map → extension-CXJ6RELI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-BEJMQT64.js.map → gc-7GQYOS2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js.map → gc-LPVMKJQJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js.map → health-3IPFLKXB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-P67NZ6TT.js.map → health-GZXGBZ36.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js.map → history-NERDJNUB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-5YGLWUDH.js.map → history-WSZHY3PN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-C4CRHW22.js.map → history-redact-MP6CH7U5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-HBFGYS66.js.map → history-redact-O3NBCNWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-C7R33MD5.js.map → init-64XDLQJB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DSN6UNFB.js.map → init-PAX32BJA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js.map → list-DNBJVO3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-LQHXBAY5.js.map → list-G5Y65VF6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-2EI6EAXH.js.map → restore-4MHZFJ2E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-QBFBLQRO.js.map → restore-YALDGTQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-NV2DRPUS.js.map → schema-73HR2OJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-WA6RZGM2.js.map → schema-U6LJKSIR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-BSKMQOYH.js.map → search-AXPXKZER.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-FIGYNQ2I.js.map → search-KILGT37L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js.map → telemetry-BZUF6H7G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js.map → telemetry-GAHHQTOS.js.map} +0 -0
|
@@ -5,10 +5,11 @@ import crypto from "node:crypto";
|
|
|
5
5
|
!(function() {
|
|
6
6
|
try {
|
|
7
7
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
8
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
8
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4ba3885b-85fc-5941-bf52-6c70b2bb5c2a");
|
|
9
9
|
} catch (e2) {
|
|
10
10
|
}
|
|
11
11
|
})();
|
|
12
|
+
var WINDOWS_RENAME_RETRY_DELAYS_MS = [10, 25, 50, 100];
|
|
12
13
|
async function ensureDir(dirPath) {
|
|
13
14
|
await fs.mkdir(dirPath, { recursive: true });
|
|
14
15
|
}
|
|
@@ -38,6 +39,26 @@ async function writeFileAtomic(targetPath, contents) {
|
|
|
38
39
|
try {
|
|
39
40
|
await fs.rename(tempPath, targetPath);
|
|
40
41
|
} catch (error) {
|
|
42
|
+
if (process.platform === "win32" && (isErrno(error, "EPERM") || isErrno(error, "EBUSY"))) {
|
|
43
|
+
let lastError = error;
|
|
44
|
+
for (const delayMs of WINDOWS_RENAME_RETRY_DELAYS_MS) {
|
|
45
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
46
|
+
try {
|
|
47
|
+
await fs.rename(tempPath, targetPath);
|
|
48
|
+
return;
|
|
49
|
+
} catch (retryError) {
|
|
50
|
+
lastError = retryError;
|
|
51
|
+
if (!isErrno(retryError, "EPERM") && !isErrno(retryError, "EBUSY")) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
await fs.unlink(tempPath);
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
throw lastError;
|
|
61
|
+
}
|
|
41
62
|
if (isErrno(error, "EXDEV")) {
|
|
42
63
|
try {
|
|
43
64
|
await fs.copyFile(tempPath, targetPath);
|
|
@@ -156,7 +177,7 @@ function resolvePmCliVersion(metaUrl, fallbackRelativeSegments = []) {
|
|
|
156
177
|
!(function() {
|
|
157
178
|
try {
|
|
158
179
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
159
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
180
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "add4a412-10a4-5c04-b3a2-998cc74fdd38");
|
|
160
181
|
} catch (e2) {
|
|
161
182
|
}
|
|
162
183
|
})();
|
|
@@ -197,6 +218,7 @@ var KNOWN_EXTENSION_POLICY_SURFACES = [
|
|
|
197
218
|
"schema.itemfields",
|
|
198
219
|
"schema.itemtypes",
|
|
199
220
|
"schema.migrations",
|
|
221
|
+
"schema.profiles",
|
|
200
222
|
"parser.override",
|
|
201
223
|
"preflight.override",
|
|
202
224
|
"services.override",
|
|
@@ -641,6 +663,824 @@ function resolveTelemetryErrorCategory(errorCode) {
|
|
|
641
663
|
return "unknown";
|
|
642
664
|
}
|
|
643
665
|
|
|
666
|
+
// dist/types.js
|
|
667
|
+
!(function() {
|
|
668
|
+
try {
|
|
669
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
670
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "46812059-b93e-5599-a222-4ac0de6f4911");
|
|
671
|
+
} catch (e2) {
|
|
672
|
+
}
|
|
673
|
+
})();
|
|
674
|
+
var BUILTIN_ITEM_TYPE_VALUES = [
|
|
675
|
+
"Epic",
|
|
676
|
+
"Feature",
|
|
677
|
+
"Task",
|
|
678
|
+
"Chore",
|
|
679
|
+
"Issue",
|
|
680
|
+
"Decision",
|
|
681
|
+
"Event",
|
|
682
|
+
"Reminder",
|
|
683
|
+
"Milestone",
|
|
684
|
+
"Meeting",
|
|
685
|
+
"Plan"
|
|
686
|
+
];
|
|
687
|
+
var ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;
|
|
688
|
+
var STATUS_VALUES = [
|
|
689
|
+
"draft",
|
|
690
|
+
"open",
|
|
691
|
+
"in_progress",
|
|
692
|
+
"blocked",
|
|
693
|
+
"closed",
|
|
694
|
+
"canceled"
|
|
695
|
+
];
|
|
696
|
+
var RUNTIME_STATUS_ROLE_VALUES = [
|
|
697
|
+
"draft",
|
|
698
|
+
"active",
|
|
699
|
+
"blocked",
|
|
700
|
+
"terminal",
|
|
701
|
+
"terminal_done",
|
|
702
|
+
"terminal_canceled",
|
|
703
|
+
"default_open",
|
|
704
|
+
"default_close",
|
|
705
|
+
"default_cancel"
|
|
706
|
+
];
|
|
707
|
+
var RUNTIME_FIELD_TYPE_VALUES = ["string", "number", "boolean", "string_array"];
|
|
708
|
+
var RUNTIME_FIELD_COMMAND_VALUES = ["create", "update", "update_many", "list", "search", "calendar", "context"];
|
|
709
|
+
var RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = ["allow", "warn", "reject"];
|
|
710
|
+
var DEPENDENCY_KIND_VALUES = [
|
|
711
|
+
"blocks",
|
|
712
|
+
"parent",
|
|
713
|
+
"child",
|
|
714
|
+
"parent_child",
|
|
715
|
+
"child_of",
|
|
716
|
+
"related",
|
|
717
|
+
"related_to",
|
|
718
|
+
"discovered_from",
|
|
719
|
+
"blocked_by",
|
|
720
|
+
"incident_from",
|
|
721
|
+
"epic",
|
|
722
|
+
"supersedes",
|
|
723
|
+
"task"
|
|
724
|
+
];
|
|
725
|
+
var SCOPE_VALUES = ["project", "global"];
|
|
726
|
+
var RISK_VALUES = ["low", "medium", "high", "critical"];
|
|
727
|
+
var ISSUE_SEVERITY_VALUES = ["low", "medium", "high", "critical"];
|
|
728
|
+
var CONFIDENCE_TEXT_VALUES = ["low", "medium", "high"];
|
|
729
|
+
var GOVERNANCE_PRESET_VALUES = ["minimal", "default", "strict", "custom"];
|
|
730
|
+
var RECURRENCE_FREQUENCY_VALUES = ["daily", "weekly", "monthly", "yearly"];
|
|
731
|
+
var RECURRENCE_WEEKDAY_VALUES = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
|
|
732
|
+
function weekdayOrderIndex(value) {
|
|
733
|
+
return RECURRENCE_WEEKDAY_VALUES.indexOf(value);
|
|
734
|
+
}
|
|
735
|
+
var PLAN_MODE_VALUES = [
|
|
736
|
+
"draft",
|
|
737
|
+
"research",
|
|
738
|
+
"review",
|
|
739
|
+
"approved",
|
|
740
|
+
"executing",
|
|
741
|
+
"paused",
|
|
742
|
+
"completed",
|
|
743
|
+
"superseded"
|
|
744
|
+
];
|
|
745
|
+
var PLAN_STEP_STATUS_VALUES = [
|
|
746
|
+
"pending",
|
|
747
|
+
"in_progress",
|
|
748
|
+
"completed",
|
|
749
|
+
"blocked",
|
|
750
|
+
"skipped",
|
|
751
|
+
"superseded"
|
|
752
|
+
];
|
|
753
|
+
var PLAN_HARNESS_VALUES = ["codex", "claude-code", "cursor", "generic"];
|
|
754
|
+
var PLAN_STEP_LINK_KIND_VALUES = [
|
|
755
|
+
"related",
|
|
756
|
+
"blocks",
|
|
757
|
+
"blocked_by",
|
|
758
|
+
"depends_on",
|
|
759
|
+
"discovered_from",
|
|
760
|
+
"implements",
|
|
761
|
+
"verifies",
|
|
762
|
+
"supersedes"
|
|
763
|
+
];
|
|
764
|
+
var CONTEXT_DEPTH_VALUES = ["brief", "standard", "deep", "full"];
|
|
765
|
+
var CONTEXT_SECTION_VALUES = [
|
|
766
|
+
"hierarchy",
|
|
767
|
+
"activity",
|
|
768
|
+
"progress",
|
|
769
|
+
"recently_created",
|
|
770
|
+
"unparented",
|
|
771
|
+
"blockers",
|
|
772
|
+
"files",
|
|
773
|
+
"workload",
|
|
774
|
+
"staleness",
|
|
775
|
+
"tests"
|
|
776
|
+
];
|
|
777
|
+
|
|
778
|
+
// dist/types/index.js
|
|
779
|
+
!(function() {
|
|
780
|
+
try {
|
|
781
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
782
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c57bc662-d60a-54b1-b2da-a7d9d7fde67a");
|
|
783
|
+
} catch (e2) {
|
|
784
|
+
}
|
|
785
|
+
})();
|
|
786
|
+
|
|
787
|
+
// dist/core/item/item-type-definition.js
|
|
788
|
+
!(function() {
|
|
789
|
+
try {
|
|
790
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
791
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "257435ee-2ef3-5736-a403-57d6265cf280");
|
|
792
|
+
} catch (e2) {
|
|
793
|
+
}
|
|
794
|
+
})();
|
|
795
|
+
function normalizeItemTypeStringList(values) {
|
|
796
|
+
return [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
797
|
+
}
|
|
798
|
+
function normalizeItemTypeOption(option) {
|
|
799
|
+
const key = option.key.trim();
|
|
800
|
+
if (key.length === 0) {
|
|
801
|
+
return null;
|
|
802
|
+
}
|
|
803
|
+
const aliases = normalizeItemTypeStringList(option.aliases);
|
|
804
|
+
const description = option.description?.trim();
|
|
805
|
+
return {
|
|
806
|
+
key,
|
|
807
|
+
values: normalizeItemTypeStringList(option.values),
|
|
808
|
+
required: option.required === true ? true : void 0,
|
|
809
|
+
aliases: aliases.length > 0 ? aliases : void 0,
|
|
810
|
+
description: description && description.length > 0 ? description : void 0
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
var keepPolicyCommand = (command) => command;
|
|
814
|
+
var strictPolicyCommand = (command) => {
|
|
815
|
+
const normalized = command.trim().toLowerCase();
|
|
816
|
+
return normalized === "create" || normalized === "update" ? normalized : null;
|
|
817
|
+
};
|
|
818
|
+
function normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand) {
|
|
819
|
+
const command = resolvePolicyCommand(policy.command);
|
|
820
|
+
if (command === null) {
|
|
821
|
+
return null;
|
|
822
|
+
}
|
|
823
|
+
const option = policy.option.trim();
|
|
824
|
+
if (option.length === 0) {
|
|
825
|
+
return null;
|
|
826
|
+
}
|
|
827
|
+
return {
|
|
828
|
+
command,
|
|
829
|
+
option,
|
|
830
|
+
required: policy.required,
|
|
831
|
+
visible: policy.visible,
|
|
832
|
+
enabled: policy.enabled
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function normalizeItemTypeCommandOptionPolicies(policies, resolvePolicyCommand) {
|
|
836
|
+
const dedupedByKey = /* @__PURE__ */ new Map();
|
|
837
|
+
for (const policy of policies ?? []) {
|
|
838
|
+
const normalized = normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand);
|
|
839
|
+
if (!normalized) {
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
dedupedByKey.set(`${normalized.command}:${normalized.option.toLowerCase()}`, normalized);
|
|
843
|
+
}
|
|
844
|
+
return [...dedupedByKey.values()].sort((left, right) => left.command === right.command ? left.option.localeCompare(right.option) : left.command.localeCompare(right.command));
|
|
845
|
+
}
|
|
846
|
+
function normalizeItemTypeDefinition(definition, options = {}) {
|
|
847
|
+
const resolvePolicyCommand = options.resolvePolicyCommand ?? keepPolicyCommand;
|
|
848
|
+
const name = definition.name.trim();
|
|
849
|
+
if (name.length === 0) {
|
|
850
|
+
return null;
|
|
851
|
+
}
|
|
852
|
+
const hasRequiredCreateFields = definition.required_create_fields !== void 0;
|
|
853
|
+
const hasRequiredCreateRepeatables = definition.required_create_repeatables !== void 0;
|
|
854
|
+
const hasOptions = definition.options !== void 0;
|
|
855
|
+
const hasCommandOptionPolicies = definition.command_option_policies !== void 0;
|
|
856
|
+
const folder = definition.folder?.trim();
|
|
857
|
+
const description = definition.description?.trim();
|
|
858
|
+
const defaultStatus = definition.default_status?.trim();
|
|
859
|
+
const aliases = normalizeItemTypeStringList(definition.aliases);
|
|
860
|
+
const normalizedOptions = (definition.options ?? []).map((option) => normalizeItemTypeOption(option)).filter((option) => option !== null).sort((left, right) => left.key.localeCompare(right.key));
|
|
861
|
+
const commandOptionPolicies = normalizeItemTypeCommandOptionPolicies(definition.command_option_policies, resolvePolicyCommand);
|
|
862
|
+
return {
|
|
863
|
+
name,
|
|
864
|
+
description: description && description.length > 0 ? description : void 0,
|
|
865
|
+
default_status: defaultStatus && defaultStatus.length > 0 ? defaultStatus : void 0,
|
|
866
|
+
folder: folder && folder.length > 0 ? folder : void 0,
|
|
867
|
+
aliases: aliases.length > 0 ? aliases : void 0,
|
|
868
|
+
required_create_fields: hasRequiredCreateFields ? normalizeItemTypeStringList(definition.required_create_fields) : void 0,
|
|
869
|
+
required_create_repeatables: hasRequiredCreateRepeatables ? normalizeItemTypeStringList(definition.required_create_repeatables) : void 0,
|
|
870
|
+
options: hasOptions ? normalizedOptions : void 0,
|
|
871
|
+
command_option_policies: hasCommandOptionPolicies ? commandOptionPolicies : void 0
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
// dist/core/item/type-registry.js
|
|
876
|
+
!(function() {
|
|
877
|
+
try {
|
|
878
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
879
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "aca609de-d881-5f34-804f-ed3daa6aab2a");
|
|
880
|
+
} catch (e2) {
|
|
881
|
+
}
|
|
882
|
+
})();
|
|
883
|
+
var DEFAULT_REQUIRED_CREATE_FIELDS = [
|
|
884
|
+
"title",
|
|
885
|
+
"description",
|
|
886
|
+
"status",
|
|
887
|
+
"priority",
|
|
888
|
+
"tags",
|
|
889
|
+
"body",
|
|
890
|
+
"deadline",
|
|
891
|
+
"estimatedMinutes",
|
|
892
|
+
"acceptanceCriteria",
|
|
893
|
+
"author",
|
|
894
|
+
"message",
|
|
895
|
+
"assignee"
|
|
896
|
+
];
|
|
897
|
+
var DEFAULT_REQUIRED_CREATE_REPEATABLES = ["dep", "comment", "note", "learning", "file", "test", "doc"];
|
|
898
|
+
var COMMON_MUTATION_COMMAND_OPTION_KEYS = [
|
|
899
|
+
"deadline",
|
|
900
|
+
"estimatedMinutes",
|
|
901
|
+
"acceptanceCriteria",
|
|
902
|
+
"definitionOfReady",
|
|
903
|
+
"order",
|
|
904
|
+
"goal",
|
|
905
|
+
"objective",
|
|
906
|
+
"value",
|
|
907
|
+
"impact",
|
|
908
|
+
"outcome",
|
|
909
|
+
"whyNow",
|
|
910
|
+
"assignee",
|
|
911
|
+
"parent",
|
|
912
|
+
"reviewer",
|
|
913
|
+
"risk",
|
|
914
|
+
"confidence",
|
|
915
|
+
"sprint",
|
|
916
|
+
"release",
|
|
917
|
+
"blockedBy",
|
|
918
|
+
"blockedReason",
|
|
919
|
+
"unblockNote",
|
|
920
|
+
"reporter",
|
|
921
|
+
"severity",
|
|
922
|
+
"environment",
|
|
923
|
+
"reproSteps",
|
|
924
|
+
"resolution",
|
|
925
|
+
"expectedResult",
|
|
926
|
+
"actualResult",
|
|
927
|
+
"affectedVersion",
|
|
928
|
+
"fixedVersion",
|
|
929
|
+
"component",
|
|
930
|
+
"regression",
|
|
931
|
+
"customerImpact"
|
|
932
|
+
];
|
|
933
|
+
var CREATE_COMMAND_OPTION_KEYS = [
|
|
934
|
+
"title",
|
|
935
|
+
"description",
|
|
936
|
+
"type",
|
|
937
|
+
"status",
|
|
938
|
+
"priority",
|
|
939
|
+
"tags",
|
|
940
|
+
"body",
|
|
941
|
+
...COMMON_MUTATION_COMMAND_OPTION_KEYS,
|
|
942
|
+
"author",
|
|
943
|
+
"message",
|
|
944
|
+
"dep",
|
|
945
|
+
"comment",
|
|
946
|
+
"note",
|
|
947
|
+
"learning",
|
|
948
|
+
"file",
|
|
949
|
+
"test",
|
|
950
|
+
"doc",
|
|
951
|
+
"reminder",
|
|
952
|
+
"event",
|
|
953
|
+
"typeOption",
|
|
954
|
+
"field"
|
|
955
|
+
];
|
|
956
|
+
var UPDATE_COMMAND_OPTION_KEYS = [
|
|
957
|
+
"title",
|
|
958
|
+
"description",
|
|
959
|
+
"body",
|
|
960
|
+
"status",
|
|
961
|
+
"closeReason",
|
|
962
|
+
"priority",
|
|
963
|
+
"type",
|
|
964
|
+
"tags",
|
|
965
|
+
...COMMON_MUTATION_COMMAND_OPTION_KEYS,
|
|
966
|
+
"author",
|
|
967
|
+
"message",
|
|
968
|
+
"comment",
|
|
969
|
+
"note",
|
|
970
|
+
"learning",
|
|
971
|
+
"file",
|
|
972
|
+
"test",
|
|
973
|
+
"doc",
|
|
974
|
+
"reminder",
|
|
975
|
+
"event",
|
|
976
|
+
"typeOption",
|
|
977
|
+
"field",
|
|
978
|
+
"allowAuditUpdate",
|
|
979
|
+
"force"
|
|
980
|
+
];
|
|
981
|
+
var SHARED_COMMAND_OPTION_ALIASES = {
|
|
982
|
+
"close-reason": "closeReason",
|
|
983
|
+
close_reason: "closeReason",
|
|
984
|
+
"estimated-minutes": "estimatedMinutes",
|
|
985
|
+
estimated_minutes: "estimatedMinutes",
|
|
986
|
+
estimate: "estimatedMinutes",
|
|
987
|
+
"acceptance-criteria": "acceptanceCriteria",
|
|
988
|
+
acceptance_criteria: "acceptanceCriteria",
|
|
989
|
+
ac: "acceptanceCriteria",
|
|
990
|
+
"definition-of-ready": "definitionOfReady",
|
|
991
|
+
definition_of_ready: "definitionOfReady",
|
|
992
|
+
rank: "order",
|
|
993
|
+
"why-now": "whyNow",
|
|
994
|
+
why_now: "whyNow",
|
|
995
|
+
"blocked-by": "blockedBy",
|
|
996
|
+
blocked_by: "blockedBy",
|
|
997
|
+
"blocked-reason": "blockedReason",
|
|
998
|
+
blocked_reason: "blockedReason",
|
|
999
|
+
"unblock-note": "unblockNote",
|
|
1000
|
+
unblock_note: "unblockNote",
|
|
1001
|
+
"repro-steps": "reproSteps",
|
|
1002
|
+
repro_steps: "reproSteps",
|
|
1003
|
+
"expected-result": "expectedResult",
|
|
1004
|
+
expected_result: "expectedResult",
|
|
1005
|
+
"actual-result": "actualResult",
|
|
1006
|
+
actual_result: "actualResult",
|
|
1007
|
+
"affected-version": "affectedVersion",
|
|
1008
|
+
affected_version: "affectedVersion",
|
|
1009
|
+
"fixed-version": "fixedVersion",
|
|
1010
|
+
fixed_version: "fixedVersion",
|
|
1011
|
+
"customer-impact": "customerImpact",
|
|
1012
|
+
customer_impact: "customerImpact",
|
|
1013
|
+
"type-option": "typeOption",
|
|
1014
|
+
type_option: "typeOption",
|
|
1015
|
+
type_options: "typeOption"
|
|
1016
|
+
};
|
|
1017
|
+
var CREATE_COMMAND_OPTION_ALIASES = {
|
|
1018
|
+
...SHARED_COMMAND_OPTION_ALIASES
|
|
1019
|
+
};
|
|
1020
|
+
var UPDATE_COMMAND_OPTION_ALIASES = {
|
|
1021
|
+
...SHARED_COMMAND_OPTION_ALIASES,
|
|
1022
|
+
"allow-audit-update": "allowAuditUpdate",
|
|
1023
|
+
allow_audit_update: "allowAuditUpdate"
|
|
1024
|
+
};
|
|
1025
|
+
var CREATE_COMMAND_OPTION_FLAG_LABELS = {
|
|
1026
|
+
title: "--title",
|
|
1027
|
+
description: "--description",
|
|
1028
|
+
type: "--type",
|
|
1029
|
+
status: "--status",
|
|
1030
|
+
priority: "--priority",
|
|
1031
|
+
tags: "--tags",
|
|
1032
|
+
body: "--body",
|
|
1033
|
+
deadline: "--deadline",
|
|
1034
|
+
estimatedMinutes: "--estimate/--estimated-minutes",
|
|
1035
|
+
acceptanceCriteria: "--acceptance-criteria/--ac",
|
|
1036
|
+
definitionOfReady: "--definition-of-ready",
|
|
1037
|
+
order: "--order/--rank",
|
|
1038
|
+
goal: "--goal",
|
|
1039
|
+
objective: "--objective",
|
|
1040
|
+
value: "--value",
|
|
1041
|
+
impact: "--impact",
|
|
1042
|
+
outcome: "--outcome",
|
|
1043
|
+
whyNow: "--why-now",
|
|
1044
|
+
author: "--author",
|
|
1045
|
+
message: "--message",
|
|
1046
|
+
assignee: "--assignee",
|
|
1047
|
+
parent: "--parent",
|
|
1048
|
+
reviewer: "--reviewer",
|
|
1049
|
+
risk: "--risk",
|
|
1050
|
+
confidence: "--confidence",
|
|
1051
|
+
sprint: "--sprint",
|
|
1052
|
+
release: "--release",
|
|
1053
|
+
blockedBy: "--blocked-by",
|
|
1054
|
+
blockedReason: "--blocked-reason",
|
|
1055
|
+
unblockNote: "--unblock-note",
|
|
1056
|
+
reporter: "--reporter",
|
|
1057
|
+
severity: "--severity",
|
|
1058
|
+
environment: "--environment",
|
|
1059
|
+
reproSteps: "--repro-steps",
|
|
1060
|
+
resolution: "--resolution",
|
|
1061
|
+
expectedResult: "--expected-result",
|
|
1062
|
+
actualResult: "--actual-result",
|
|
1063
|
+
affectedVersion: "--affected-version",
|
|
1064
|
+
fixedVersion: "--fixed-version",
|
|
1065
|
+
component: "--component",
|
|
1066
|
+
regression: "--regression",
|
|
1067
|
+
customerImpact: "--customer-impact",
|
|
1068
|
+
dep: "--dep",
|
|
1069
|
+
comment: "--comment",
|
|
1070
|
+
note: "--note",
|
|
1071
|
+
learning: "--learning",
|
|
1072
|
+
file: "--file",
|
|
1073
|
+
test: "--test",
|
|
1074
|
+
doc: "--doc",
|
|
1075
|
+
reminder: "--reminder",
|
|
1076
|
+
event: "--event",
|
|
1077
|
+
typeOption: "--type-option"
|
|
1078
|
+
};
|
|
1079
|
+
var UPDATE_COMMAND_OPTION_FLAG_LABELS = {
|
|
1080
|
+
title: "--title",
|
|
1081
|
+
description: "--description",
|
|
1082
|
+
body: "--body",
|
|
1083
|
+
status: "--status",
|
|
1084
|
+
closeReason: "--close-reason",
|
|
1085
|
+
priority: "--priority",
|
|
1086
|
+
type: "--type",
|
|
1087
|
+
tags: "--tags",
|
|
1088
|
+
deadline: "--deadline",
|
|
1089
|
+
estimatedMinutes: "--estimate/--estimated-minutes",
|
|
1090
|
+
acceptanceCriteria: "--acceptance-criteria/--ac",
|
|
1091
|
+
definitionOfReady: "--definition-of-ready",
|
|
1092
|
+
order: "--order/--rank",
|
|
1093
|
+
goal: "--goal",
|
|
1094
|
+
objective: "--objective",
|
|
1095
|
+
value: "--value",
|
|
1096
|
+
impact: "--impact",
|
|
1097
|
+
outcome: "--outcome",
|
|
1098
|
+
whyNow: "--why-now",
|
|
1099
|
+
assignee: "--assignee",
|
|
1100
|
+
parent: "--parent",
|
|
1101
|
+
reviewer: "--reviewer",
|
|
1102
|
+
risk: "--risk",
|
|
1103
|
+
confidence: "--confidence",
|
|
1104
|
+
sprint: "--sprint",
|
|
1105
|
+
release: "--release",
|
|
1106
|
+
blockedBy: "--blocked-by",
|
|
1107
|
+
blockedReason: "--blocked-reason",
|
|
1108
|
+
unblockNote: "--unblock-note",
|
|
1109
|
+
reporter: "--reporter",
|
|
1110
|
+
severity: "--severity",
|
|
1111
|
+
environment: "--environment",
|
|
1112
|
+
reproSteps: "--repro-steps",
|
|
1113
|
+
resolution: "--resolution",
|
|
1114
|
+
expectedResult: "--expected-result",
|
|
1115
|
+
actualResult: "--actual-result",
|
|
1116
|
+
affectedVersion: "--affected-version",
|
|
1117
|
+
fixedVersion: "--fixed-version",
|
|
1118
|
+
component: "--component",
|
|
1119
|
+
regression: "--regression",
|
|
1120
|
+
customerImpact: "--customer-impact",
|
|
1121
|
+
comment: "--comment",
|
|
1122
|
+
note: "--note",
|
|
1123
|
+
learning: "--learning",
|
|
1124
|
+
file: "--file",
|
|
1125
|
+
test: "--test",
|
|
1126
|
+
doc: "--doc",
|
|
1127
|
+
reminder: "--reminder",
|
|
1128
|
+
event: "--event",
|
|
1129
|
+
typeOption: "--type-option",
|
|
1130
|
+
allowAuditUpdate: "--allow-audit-update",
|
|
1131
|
+
author: "--author",
|
|
1132
|
+
message: "--message",
|
|
1133
|
+
force: "--force"
|
|
1134
|
+
};
|
|
1135
|
+
function normalizeCommandOptionToken(value) {
|
|
1136
|
+
return value.trim().replace(/^--+/, "").toLowerCase();
|
|
1137
|
+
}
|
|
1138
|
+
function commandOptionKeys(command) {
|
|
1139
|
+
return command === "create" ? CREATE_COMMAND_OPTION_KEYS : UPDATE_COMMAND_OPTION_KEYS;
|
|
1140
|
+
}
|
|
1141
|
+
function commandOptionAliases(command) {
|
|
1142
|
+
return command === "create" ? CREATE_COMMAND_OPTION_ALIASES : UPDATE_COMMAND_OPTION_ALIASES;
|
|
1143
|
+
}
|
|
1144
|
+
function canonicalizeCommandOptionKey(command, rawOption) {
|
|
1145
|
+
const normalizedToken = normalizeCommandOptionToken(rawOption);
|
|
1146
|
+
if (normalizedToken.length === 0) {
|
|
1147
|
+
return void 0;
|
|
1148
|
+
}
|
|
1149
|
+
const aliased = commandOptionAliases(command)[normalizedToken];
|
|
1150
|
+
if (aliased) {
|
|
1151
|
+
return aliased;
|
|
1152
|
+
}
|
|
1153
|
+
return commandOptionKeys(command).find((candidate) => candidate.toLowerCase() === normalizedToken);
|
|
1154
|
+
}
|
|
1155
|
+
function commandOptionFlagLabel(command, optionKey) {
|
|
1156
|
+
const labels = command === "create" ? CREATE_COMMAND_OPTION_FLAG_LABELS : UPDATE_COMMAND_OPTION_FLAG_LABELS;
|
|
1157
|
+
return labels[optionKey] ?? `--${optionKey.replace(/([A-Z])/g, "-$1").toLowerCase()}`;
|
|
1158
|
+
}
|
|
1159
|
+
function toDefaultFolder(name) {
|
|
1160
|
+
const normalized = toSlugToken(name);
|
|
1161
|
+
if (normalized.length === 0) {
|
|
1162
|
+
return "items";
|
|
1163
|
+
}
|
|
1164
|
+
return normalized.endsWith("s") ? normalized : `${normalized}s`;
|
|
1165
|
+
}
|
|
1166
|
+
function toSlugToken(value) {
|
|
1167
|
+
const trimmed = value.trim().toLowerCase();
|
|
1168
|
+
let slug = "";
|
|
1169
|
+
let pendingDash = false;
|
|
1170
|
+
for (const character of trimmed) {
|
|
1171
|
+
const code = character.charCodeAt(0);
|
|
1172
|
+
const isAlpha = code >= 97 && code <= 122;
|
|
1173
|
+
const isDigit = code >= 48 && code <= 57;
|
|
1174
|
+
if (isAlpha || isDigit) {
|
|
1175
|
+
if (pendingDash && slug.length > 0) {
|
|
1176
|
+
slug += "-";
|
|
1177
|
+
}
|
|
1178
|
+
slug += character;
|
|
1179
|
+
pendingDash = false;
|
|
1180
|
+
continue;
|
|
1181
|
+
}
|
|
1182
|
+
if (slug.length > 0) {
|
|
1183
|
+
pendingDash = true;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
return slug;
|
|
1187
|
+
}
|
|
1188
|
+
function normalizeTypeDefinition(definition) {
|
|
1189
|
+
return normalizeItemTypeDefinition(definition, { resolvePolicyCommand: strictPolicyCommand });
|
|
1190
|
+
}
|
|
1191
|
+
function coerceTypeDefinitionFromUnknown(raw) {
|
|
1192
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
1193
|
+
return null;
|
|
1194
|
+
}
|
|
1195
|
+
const record = raw;
|
|
1196
|
+
const name = typeof record.name === "string" ? record.name : "";
|
|
1197
|
+
if (name.trim().length === 0) {
|
|
1198
|
+
return null;
|
|
1199
|
+
}
|
|
1200
|
+
const folder = typeof record.folder === "string" ? record.folder : void 0;
|
|
1201
|
+
const description = typeof record.description === "string" ? record.description : void 0;
|
|
1202
|
+
const defaultStatus = typeof record.default_status === "string" ? record.default_status : void 0;
|
|
1203
|
+
const aliases = Array.isArray(record.aliases) ? record.aliases.filter((value) => typeof value === "string") : void 0;
|
|
1204
|
+
const requiredCreateFields = Array.isArray(record.required_create_fields) ? record.required_create_fields.filter((value) => typeof value === "string") : void 0;
|
|
1205
|
+
const requiredCreateRepeatables = Array.isArray(record.required_create_repeatables) ? record.required_create_repeatables.filter((value) => typeof value === "string") : void 0;
|
|
1206
|
+
let options;
|
|
1207
|
+
if (Array.isArray(record.options)) {
|
|
1208
|
+
options = [];
|
|
1209
|
+
for (const entry of record.options) {
|
|
1210
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
1211
|
+
continue;
|
|
1212
|
+
}
|
|
1213
|
+
const optionRecord = entry;
|
|
1214
|
+
if (typeof optionRecord.key !== "string") {
|
|
1215
|
+
continue;
|
|
1216
|
+
}
|
|
1217
|
+
options.push({
|
|
1218
|
+
key: optionRecord.key,
|
|
1219
|
+
values: Array.isArray(optionRecord.values) ? optionRecord.values.filter((value) => typeof value === "string") : [],
|
|
1220
|
+
required: optionRecord.required === void 0 ? void 0 : Boolean(optionRecord.required),
|
|
1221
|
+
aliases: Array.isArray(optionRecord.aliases) ? optionRecord.aliases.filter((value) => typeof value === "string") : void 0,
|
|
1222
|
+
description: typeof optionRecord.description === "string" ? optionRecord.description : void 0
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
let commandOptionPolicies;
|
|
1227
|
+
if (Array.isArray(record.command_option_policies)) {
|
|
1228
|
+
commandOptionPolicies = [];
|
|
1229
|
+
for (const entry of record.command_option_policies) {
|
|
1230
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
1231
|
+
continue;
|
|
1232
|
+
}
|
|
1233
|
+
const policyRecord = entry;
|
|
1234
|
+
if (typeof policyRecord.command !== "string" || typeof policyRecord.option !== "string") {
|
|
1235
|
+
continue;
|
|
1236
|
+
}
|
|
1237
|
+
const normalizedCommand = policyRecord.command.trim().toLowerCase();
|
|
1238
|
+
if (normalizedCommand !== "create" && normalizedCommand !== "update") {
|
|
1239
|
+
continue;
|
|
1240
|
+
}
|
|
1241
|
+
commandOptionPolicies.push({
|
|
1242
|
+
command: normalizedCommand,
|
|
1243
|
+
option: policyRecord.option,
|
|
1244
|
+
required: policyRecord.required === void 0 ? void 0 : Boolean(policyRecord.required),
|
|
1245
|
+
visible: policyRecord.visible === void 0 ? void 0 : Boolean(policyRecord.visible),
|
|
1246
|
+
enabled: policyRecord.enabled === void 0 ? void 0 : Boolean(policyRecord.enabled)
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
return {
|
|
1251
|
+
name,
|
|
1252
|
+
description,
|
|
1253
|
+
default_status: defaultStatus,
|
|
1254
|
+
folder,
|
|
1255
|
+
aliases,
|
|
1256
|
+
required_create_fields: requiredCreateFields,
|
|
1257
|
+
required_create_repeatables: requiredCreateRepeatables,
|
|
1258
|
+
options,
|
|
1259
|
+
command_option_policies: commandOptionPolicies
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
function applyTypeDefinitions(source, target) {
|
|
1263
|
+
for (const rawDefinition of source) {
|
|
1264
|
+
const normalizedDefinition = normalizeTypeDefinition(rawDefinition);
|
|
1265
|
+
if (!normalizedDefinition) {
|
|
1266
|
+
continue;
|
|
1267
|
+
}
|
|
1268
|
+
const lowerName = normalizedDefinition.name.toLowerCase();
|
|
1269
|
+
const existing = target.get(lowerName);
|
|
1270
|
+
const keepName = existing?.name ?? normalizedDefinition.name;
|
|
1271
|
+
const folder = normalizedDefinition.folder ?? existing?.folder ?? toDefaultFolder(keepName);
|
|
1272
|
+
const aliases = normalizeItemTypeStringList([
|
|
1273
|
+
...existing?.aliases ?? [],
|
|
1274
|
+
...normalizedDefinition.aliases ?? []
|
|
1275
|
+
]);
|
|
1276
|
+
const requiredCreateFields = normalizedDefinition.required_create_fields ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields) : existing?.required_create_fields ?? [];
|
|
1277
|
+
const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables) : existing?.required_create_repeatables ?? [];
|
|
1278
|
+
const options = normalizedDefinition.options ? normalizedDefinition.options : existing?.options ? [...existing.options] : [];
|
|
1279
|
+
const commandOptionPolicies = normalizedDefinition.command_option_policies ? normalizedDefinition.command_option_policies : existing?.command_option_policies ? [...existing.command_option_policies] : [];
|
|
1280
|
+
const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;
|
|
1281
|
+
const description = normalizedDefinition.description ?? existing?.description;
|
|
1282
|
+
target.set(lowerName, {
|
|
1283
|
+
name: keepName,
|
|
1284
|
+
...description ? { description } : {},
|
|
1285
|
+
...defaultStatus ? { default_status: defaultStatus } : {},
|
|
1286
|
+
folder,
|
|
1287
|
+
aliases,
|
|
1288
|
+
required_create_fields: requiredCreateFields,
|
|
1289
|
+
required_create_repeatables: requiredCreateRepeatables,
|
|
1290
|
+
options,
|
|
1291
|
+
command_option_policies: commandOptionPolicies
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
function collectExtensionTypeDefinitions(registrations) {
|
|
1296
|
+
if (!registrations) {
|
|
1297
|
+
return [];
|
|
1298
|
+
}
|
|
1299
|
+
const definitions = [];
|
|
1300
|
+
for (const registration of registrations.item_types ?? []) {
|
|
1301
|
+
const typeDefinitionsRaw = registration.types;
|
|
1302
|
+
if (!Array.isArray(typeDefinitionsRaw)) {
|
|
1303
|
+
continue;
|
|
1304
|
+
}
|
|
1305
|
+
for (const rawDefinition of typeDefinitionsRaw) {
|
|
1306
|
+
const normalized = coerceTypeDefinitionFromUnknown(rawDefinition);
|
|
1307
|
+
if (normalized) {
|
|
1308
|
+
definitions.push(normalized);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
return definitions;
|
|
1313
|
+
}
|
|
1314
|
+
function resolveItemTypeRegistry(settings, extensionRegistrations = null) {
|
|
1315
|
+
const byLowerName = /* @__PURE__ */ new Map();
|
|
1316
|
+
for (const builtin of ITEM_TYPE_VALUES) {
|
|
1317
|
+
byLowerName.set(builtin.toLowerCase(), {
|
|
1318
|
+
name: builtin,
|
|
1319
|
+
folder: TYPE_TO_FOLDER[builtin],
|
|
1320
|
+
aliases: [],
|
|
1321
|
+
required_create_fields: [...DEFAULT_REQUIRED_CREATE_FIELDS],
|
|
1322
|
+
required_create_repeatables: [...DEFAULT_REQUIRED_CREATE_REPEATABLES],
|
|
1323
|
+
options: [],
|
|
1324
|
+
command_option_policies: []
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName);
|
|
1328
|
+
applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName);
|
|
1329
|
+
const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));
|
|
1330
|
+
const byType = {};
|
|
1331
|
+
const aliasToType = {};
|
|
1332
|
+
const typeToFolder = {};
|
|
1333
|
+
for (const definition of definitions) {
|
|
1334
|
+
byType[definition.name] = definition;
|
|
1335
|
+
typeToFolder[definition.name] = definition.folder;
|
|
1336
|
+
aliasToType[definition.name.toLowerCase()] = definition.name;
|
|
1337
|
+
for (const alias of definition.aliases) {
|
|
1338
|
+
aliasToType[alias.toLowerCase()] = definition.name;
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
const folders = [...new Set(definitions.map((definition) => definition.folder))].sort((left, right) => left.localeCompare(right));
|
|
1342
|
+
return {
|
|
1343
|
+
types: definitions.map((definition) => definition.name),
|
|
1344
|
+
folders,
|
|
1345
|
+
type_to_folder: typeToFolder,
|
|
1346
|
+
by_type: byType,
|
|
1347
|
+
alias_to_type: aliasToType
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
function resolveTypeName(rawType, registry) {
|
|
1351
|
+
if (rawType === void 0) {
|
|
1352
|
+
return void 0;
|
|
1353
|
+
}
|
|
1354
|
+
return registry.alias_to_type[rawType.trim().toLowerCase()];
|
|
1355
|
+
}
|
|
1356
|
+
function resolveTypeDefinition(typeName, registry) {
|
|
1357
|
+
const resolvedName = resolveTypeName(typeName, registry);
|
|
1358
|
+
if (!resolvedName) {
|
|
1359
|
+
return void 0;
|
|
1360
|
+
}
|
|
1361
|
+
return registry.by_type[resolvedName];
|
|
1362
|
+
}
|
|
1363
|
+
function resolveCommandOptionPolicyState(typeDefinition, command, baseRequiredOptions) {
|
|
1364
|
+
const errors = [];
|
|
1365
|
+
const required = /* @__PURE__ */ new Set();
|
|
1366
|
+
const hidden = /* @__PURE__ */ new Set();
|
|
1367
|
+
const disabled = /* @__PURE__ */ new Set();
|
|
1368
|
+
for (const rawBase of baseRequiredOptions) {
|
|
1369
|
+
const canonical = canonicalizeCommandOptionKey(command, rawBase);
|
|
1370
|
+
if (!canonical) {
|
|
1371
|
+
errors.push(`Unsupported base required option "${rawBase}" for command "${command}" on type "${typeDefinition.name}"`);
|
|
1372
|
+
continue;
|
|
1373
|
+
}
|
|
1374
|
+
required.add(canonical);
|
|
1375
|
+
}
|
|
1376
|
+
for (const policy of typeDefinition.command_option_policies) {
|
|
1377
|
+
if (policy.command !== command) {
|
|
1378
|
+
continue;
|
|
1379
|
+
}
|
|
1380
|
+
const canonical = canonicalizeCommandOptionKey(command, policy.option);
|
|
1381
|
+
if (!canonical) {
|
|
1382
|
+
errors.push(`Unsupported command_option_policies option "${policy.option}" for command "${command}" on type "${typeDefinition.name}"`);
|
|
1383
|
+
continue;
|
|
1384
|
+
}
|
|
1385
|
+
if (policy.required !== void 0) {
|
|
1386
|
+
if (policy.required) {
|
|
1387
|
+
required.add(canonical);
|
|
1388
|
+
} else {
|
|
1389
|
+
required.delete(canonical);
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
if (policy.visible !== void 0) {
|
|
1393
|
+
if (policy.visible) {
|
|
1394
|
+
hidden.delete(canonical);
|
|
1395
|
+
} else {
|
|
1396
|
+
hidden.add(canonical);
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
if (policy.enabled !== void 0) {
|
|
1400
|
+
if (policy.enabled) {
|
|
1401
|
+
disabled.delete(canonical);
|
|
1402
|
+
} else {
|
|
1403
|
+
disabled.add(canonical);
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
for (const option of required) {
|
|
1408
|
+
if (disabled.has(option)) {
|
|
1409
|
+
errors.push(`Option "${option}" cannot be both required and disabled for command "${command}" on type "${typeDefinition.name}"`);
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
return {
|
|
1413
|
+
required: [...required],
|
|
1414
|
+
hidden: [...hidden].sort((left, right) => left.localeCompare(right)),
|
|
1415
|
+
disabled: [...disabled].sort((left, right) => left.localeCompare(right)),
|
|
1416
|
+
errors
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1419
|
+
function validateTypeOptions(typeName, rawTypeOptions, registry) {
|
|
1420
|
+
const typeDefinition = resolveTypeDefinition(typeName, registry);
|
|
1421
|
+
if (!typeDefinition) {
|
|
1422
|
+
return {
|
|
1423
|
+
normalized: void 0,
|
|
1424
|
+
errors: [`Unknown type "${typeName}"`]
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
const errors = [];
|
|
1428
|
+
const optionByAlias = /* @__PURE__ */ new Map();
|
|
1429
|
+
for (const option of typeDefinition.options) {
|
|
1430
|
+
optionByAlias.set(option.key.toLowerCase(), option);
|
|
1431
|
+
for (const alias of option.aliases ?? []) {
|
|
1432
|
+
optionByAlias.set(alias.toLowerCase(), option);
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
const normalized = {};
|
|
1436
|
+
for (const [rawKey, rawValue] of Object.entries(rawTypeOptions ?? {})) {
|
|
1437
|
+
const trimmedKey = rawKey.trim();
|
|
1438
|
+
const trimmedValue = rawValue.trim();
|
|
1439
|
+
if (trimmedKey.length === 0) {
|
|
1440
|
+
errors.push("type option keys must not be empty");
|
|
1441
|
+
continue;
|
|
1442
|
+
}
|
|
1443
|
+
if (trimmedValue.length === 0) {
|
|
1444
|
+
errors.push(`type option "${trimmedKey}" must not be empty`);
|
|
1445
|
+
continue;
|
|
1446
|
+
}
|
|
1447
|
+
const optionDefinition = optionByAlias.get(trimmedKey.toLowerCase());
|
|
1448
|
+
if (!optionDefinition) {
|
|
1449
|
+
const allowed = typeDefinition.options.map((option) => option.key).join(", ");
|
|
1450
|
+
errors.push(typeDefinition.options.length > 0 ? `Unknown type option "${trimmedKey}" for type "${typeDefinition.name}". Allowed: ${allowed}` : `Type "${typeDefinition.name}" does not define any configurable type options`);
|
|
1451
|
+
continue;
|
|
1452
|
+
}
|
|
1453
|
+
const allowedValues = optionDefinition.values;
|
|
1454
|
+
let resolvedValue = trimmedValue;
|
|
1455
|
+
if (allowedValues.length > 0) {
|
|
1456
|
+
const valueLookup = new Map(allowedValues.map((value) => [value.toLowerCase(), value]));
|
|
1457
|
+
const canonical = valueLookup.get(trimmedValue.toLowerCase());
|
|
1458
|
+
if (!canonical) {
|
|
1459
|
+
errors.push(`Invalid value "${trimmedValue}" for type option "${optionDefinition.key}". Allowed: ${allowedValues.join(", ")}`);
|
|
1460
|
+
continue;
|
|
1461
|
+
}
|
|
1462
|
+
resolvedValue = canonical;
|
|
1463
|
+
}
|
|
1464
|
+
normalized[optionDefinition.key] = resolvedValue;
|
|
1465
|
+
}
|
|
1466
|
+
for (const option of typeDefinition.options) {
|
|
1467
|
+
if (option.required && !(option.key in normalized)) {
|
|
1468
|
+
errors.push(`Missing required type option "${option.key}" for type "${typeDefinition.name}"`);
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
const sortedKeys = Object.keys(normalized).sort((left, right) => left.localeCompare(right));
|
|
1472
|
+
if (sortedKeys.length === 0) {
|
|
1473
|
+
return {
|
|
1474
|
+
normalized: void 0,
|
|
1475
|
+
errors
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
return {
|
|
1479
|
+
normalized: Object.fromEntries(sortedKeys.map((key) => [key, normalized[key]])),
|
|
1480
|
+
errors
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
|
|
644
1484
|
// dist/core/store/paths.js
|
|
645
1485
|
import { statSync } from "node:fs";
|
|
646
1486
|
import os from "node:os";
|
|
@@ -648,7 +1488,7 @@ import path4 from "node:path";
|
|
|
648
1488
|
!(function() {
|
|
649
1489
|
try {
|
|
650
1490
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
651
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
1491
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d46f24c7-aad0-58e5-b27e-ce9388964d8a");
|
|
652
1492
|
} catch (e2) {
|
|
653
1493
|
}
|
|
654
1494
|
})();
|
|
@@ -704,45 +1544,16 @@ function resolvePmRoot(cwd, cliPath) {
|
|
|
704
1544
|
const selected = PM_DIRNAME;
|
|
705
1545
|
return path4.resolve(cwd, selected);
|
|
706
1546
|
}
|
|
707
|
-
function resolveGlobalPmRoot(cwd) {
|
|
708
|
-
const envPath = process.env.PM_GLOBAL_PATH?.trim();
|
|
709
|
-
const selected = envPath && envPath.length > 0 ? envPath : path4.join(os.homedir(), ".pm-cli");
|
|
710
|
-
return path4.resolve(cwd, selected);
|
|
711
|
-
}
|
|
712
|
-
function getSettingsPath(pmRoot) {
|
|
713
|
-
return path4.join(pmRoot, SETTINGS_FILENAME);
|
|
714
|
-
}
|
|
715
|
-
function deriveDefaultTypeFolder(type) {
|
|
716
|
-
const normalized = toSlugToken(type);
|
|
717
|
-
if (normalized.length === 0) {
|
|
718
|
-
return "items";
|
|
719
|
-
}
|
|
720
|
-
return normalized.endsWith("s") ? normalized : `${normalized}s`;
|
|
721
|
-
}
|
|
722
|
-
function toSlugToken(value) {
|
|
723
|
-
const trimmed = value.trim().toLowerCase();
|
|
724
|
-
let slug = "";
|
|
725
|
-
let pendingDash = false;
|
|
726
|
-
for (const character of trimmed) {
|
|
727
|
-
const code = character.charCodeAt(0);
|
|
728
|
-
const isAlpha = code >= 97 && code <= 122;
|
|
729
|
-
const isDigit = code >= 48 && code <= 57;
|
|
730
|
-
if (isAlpha || isDigit) {
|
|
731
|
-
if (pendingDash && slug.length > 0) {
|
|
732
|
-
slug += "-";
|
|
733
|
-
}
|
|
734
|
-
slug += character;
|
|
735
|
-
pendingDash = false;
|
|
736
|
-
continue;
|
|
737
|
-
}
|
|
738
|
-
if (slug.length > 0) {
|
|
739
|
-
pendingDash = true;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
return slug;
|
|
1547
|
+
function resolveGlobalPmRoot(cwd) {
|
|
1548
|
+
const envPath = process.env.PM_GLOBAL_PATH?.trim();
|
|
1549
|
+
const selected = envPath && envPath.length > 0 ? envPath : path4.join(os.homedir(), ".pm-cli");
|
|
1550
|
+
return path4.resolve(cwd, selected);
|
|
1551
|
+
}
|
|
1552
|
+
function getSettingsPath(pmRoot) {
|
|
1553
|
+
return path4.join(pmRoot, SETTINGS_FILENAME);
|
|
743
1554
|
}
|
|
744
1555
|
function getTypeDirPath(pmRoot, type, typeToFolder = TYPE_TO_FOLDER) {
|
|
745
|
-
const folder = typeToFolder[type] ??
|
|
1556
|
+
const folder = typeToFolder[type] ?? toDefaultFolder(type);
|
|
746
1557
|
return path4.join(pmRoot, folder);
|
|
747
1558
|
}
|
|
748
1559
|
function getItemPath(pmRoot, type, id, itemFormat = "toon", typeToFolder = TYPE_TO_FOLDER) {
|
|
@@ -853,11 +1664,63 @@ function asRecordLoose(value) {
|
|
|
853
1664
|
return value;
|
|
854
1665
|
}
|
|
855
1666
|
|
|
1667
|
+
// dist/core/shared/levenshtein.js
|
|
1668
|
+
!(function() {
|
|
1669
|
+
try {
|
|
1670
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1671
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "99ae52e7-bf5e-51ab-a222-d6ffb82027ff");
|
|
1672
|
+
} catch (e2) {
|
|
1673
|
+
}
|
|
1674
|
+
})();
|
|
1675
|
+
function levenshteinDistanceWithinLimit(left, right, limit) {
|
|
1676
|
+
if (left === right) {
|
|
1677
|
+
return 0;
|
|
1678
|
+
}
|
|
1679
|
+
if (Math.abs(left.length - right.length) > limit) {
|
|
1680
|
+
return null;
|
|
1681
|
+
}
|
|
1682
|
+
const width = right.length + 1;
|
|
1683
|
+
const beforePrevious = new Array(width);
|
|
1684
|
+
const previous = new Array(width);
|
|
1685
|
+
const current = new Array(width);
|
|
1686
|
+
for (let column = 0; column < width; column += 1) {
|
|
1687
|
+
beforePrevious[column] = 0;
|
|
1688
|
+
previous[column] = column;
|
|
1689
|
+
}
|
|
1690
|
+
for (let row = 1; row <= left.length; row += 1) {
|
|
1691
|
+
current[0] = row;
|
|
1692
|
+
let rowMin = current[0];
|
|
1693
|
+
for (let column = 1; column <= right.length; column += 1) {
|
|
1694
|
+
const cost = left[row - 1] === right[column - 1] ? 0 : 1;
|
|
1695
|
+
const substitution = previous[column - 1] + cost;
|
|
1696
|
+
const insertion = current[column - 1] + 1;
|
|
1697
|
+
const deletion = previous[column] + 1;
|
|
1698
|
+
let candidate = Math.min(substitution, insertion, deletion);
|
|
1699
|
+
if (row > 1 && column > 1 && left[row - 1] === right[column - 2] && left[row - 2] === right[column - 1]) {
|
|
1700
|
+
candidate = Math.min(candidate, beforePrevious[column - 2] + 1);
|
|
1701
|
+
}
|
|
1702
|
+
current[column] = candidate;
|
|
1703
|
+
if (candidate < rowMin) {
|
|
1704
|
+
rowMin = candidate;
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
if (rowMin > limit) {
|
|
1708
|
+
return null;
|
|
1709
|
+
}
|
|
1710
|
+
for (let column = 0; column < width; column += 1) {
|
|
1711
|
+
beforePrevious[column] = previous[column];
|
|
1712
|
+
previous[column] = current[column];
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
const result = previous[right.length];
|
|
1716
|
+
return result <= limit ? result : null;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
856
1719
|
// dist/core/extensions/extension-registries.js
|
|
857
1720
|
!(function() {
|
|
858
1721
|
try {
|
|
859
1722
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
860
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
1723
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "dcfdfd88-3d2a-57c9-9873-d8d7d9cf339d");
|
|
861
1724
|
} catch (e2) {
|
|
862
1725
|
}
|
|
863
1726
|
})();
|
|
@@ -903,6 +1766,7 @@ function createEmptyExtensionRegistrationRegistry() {
|
|
|
903
1766
|
item_fields: [],
|
|
904
1767
|
item_types: [],
|
|
905
1768
|
migrations: [],
|
|
1769
|
+
profiles: [],
|
|
906
1770
|
importers: [],
|
|
907
1771
|
exporters: [],
|
|
908
1772
|
search_providers: [],
|
|
@@ -1404,58 +2268,6 @@ function isFlagDefaultValueCoercible(value, kind) {
|
|
|
1404
2268
|
return typeof value === "string" && ["true", "false", "1", "0"].includes(value.trim().toLowerCase());
|
|
1405
2269
|
}
|
|
1406
2270
|
|
|
1407
|
-
// dist/core/shared/levenshtein.js
|
|
1408
|
-
!(function() {
|
|
1409
|
-
try {
|
|
1410
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1411
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "99ae52e7-bf5e-51ab-a222-d6ffb82027ff");
|
|
1412
|
-
} catch (e2) {
|
|
1413
|
-
}
|
|
1414
|
-
})();
|
|
1415
|
-
function levenshteinDistanceWithinLimit(left, right, limit) {
|
|
1416
|
-
if (left === right) {
|
|
1417
|
-
return 0;
|
|
1418
|
-
}
|
|
1419
|
-
if (Math.abs(left.length - right.length) > limit) {
|
|
1420
|
-
return null;
|
|
1421
|
-
}
|
|
1422
|
-
const width = right.length + 1;
|
|
1423
|
-
const beforePrevious = new Array(width);
|
|
1424
|
-
const previous = new Array(width);
|
|
1425
|
-
const current = new Array(width);
|
|
1426
|
-
for (let column = 0; column < width; column += 1) {
|
|
1427
|
-
beforePrevious[column] = 0;
|
|
1428
|
-
previous[column] = column;
|
|
1429
|
-
}
|
|
1430
|
-
for (let row = 1; row <= left.length; row += 1) {
|
|
1431
|
-
current[0] = row;
|
|
1432
|
-
let rowMin = current[0];
|
|
1433
|
-
for (let column = 1; column <= right.length; column += 1) {
|
|
1434
|
-
const cost = left[row - 1] === right[column - 1] ? 0 : 1;
|
|
1435
|
-
const substitution = previous[column - 1] + cost;
|
|
1436
|
-
const insertion = current[column - 1] + 1;
|
|
1437
|
-
const deletion = previous[column] + 1;
|
|
1438
|
-
let candidate = Math.min(substitution, insertion, deletion);
|
|
1439
|
-
if (row > 1 && column > 1 && left[row - 1] === right[column - 2] && left[row - 2] === right[column - 1]) {
|
|
1440
|
-
candidate = Math.min(candidate, beforePrevious[column - 2] + 1);
|
|
1441
|
-
}
|
|
1442
|
-
current[column] = candidate;
|
|
1443
|
-
if (candidate < rowMin) {
|
|
1444
|
-
rowMin = candidate;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
if (rowMin > limit) {
|
|
1448
|
-
return null;
|
|
1449
|
-
}
|
|
1450
|
-
for (let column = 0; column < width; column += 1) {
|
|
1451
|
-
beforePrevious[column] = previous[column];
|
|
1452
|
-
previous[column] = current[column];
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
const result = previous[right.length];
|
|
1456
|
-
return result <= limit ? result : null;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
2271
|
// dist/core/extensions/item-field-types.js
|
|
1460
2272
|
!(function() {
|
|
1461
2273
|
try {
|
|
@@ -1714,7 +2526,7 @@ function parseLegacyExtensionCapabilityAliasWarning(warning) {
|
|
|
1714
2526
|
!(function() {
|
|
1715
2527
|
try {
|
|
1716
2528
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1717
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
2529
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "dbc43b74-6872-52c3-859a-64fe84c02b5b");
|
|
1718
2530
|
} catch (e2) {
|
|
1719
2531
|
}
|
|
1720
2532
|
})();
|
|
@@ -1827,34 +2639,15 @@ function collectExtensionPolicyOverrides(rawOverrides) {
|
|
|
1827
2639
|
}
|
|
1828
2640
|
return overridesByName;
|
|
1829
2641
|
}
|
|
1830
|
-
function
|
|
1831
|
-
const policy = settings.extensions.policy;
|
|
1832
|
-
const mode = normalizePolicyMode(policy?.mode);
|
|
1833
|
-
const trustMode = normalizePolicyTrustMode(policy?.trust_mode);
|
|
1834
|
-
const pmMaxVersionExceededMode2 = normalizePmMaxVersionExceededMode(policy?.pm_max_version_exceeded_mode);
|
|
1835
|
-
const requireProvenance = policy?.require_provenance === true;
|
|
1836
|
-
const trustedExtensions = normalizePolicyStringSet(policy?.trusted_extensions);
|
|
1837
|
-
const defaultSandboxProfile = normalizePolicySandboxProfile(policy?.default_sandbox_profile);
|
|
1838
|
-
const allowedExtensions = normalizePolicyStringSet(policy?.allowed_extensions);
|
|
1839
|
-
const blockedExtensions = normalizePolicyStringSet(policy?.blocked_extensions);
|
|
1840
|
-
const allowedCapabilities = normalizePolicyStringSet(policy?.allowed_capabilities);
|
|
1841
|
-
const blockedCapabilities = normalizePolicyStringSet(policy?.blocked_capabilities);
|
|
1842
|
-
const allowedSurfaces = normalizePolicySurfaceSet(policy?.allowed_surfaces);
|
|
1843
|
-
const blockedSurfaces = normalizePolicySurfaceSet(policy?.blocked_surfaces);
|
|
1844
|
-
const allowedCommands = normalizePolicyStringSet(policy?.allowed_commands);
|
|
1845
|
-
const blockedCommands = normalizePolicyStringSet(policy?.blocked_commands);
|
|
1846
|
-
const allowedActions = normalizePolicyStringSet(policy?.allowed_actions);
|
|
1847
|
-
const blockedActions = normalizePolicyStringSet(policy?.blocked_actions);
|
|
1848
|
-
const allowedServices = normalizePolicyStringSet(policy?.allowed_services);
|
|
1849
|
-
const blockedServices = normalizePolicyStringSet(policy?.blocked_services);
|
|
1850
|
-
const overridesByName = collectExtensionPolicyOverrides(policy?.extension_overrides);
|
|
2642
|
+
function collectExtensionPolicyWarnings(normalized) {
|
|
1851
2643
|
const warnings = [];
|
|
1852
|
-
|
|
2644
|
+
const sortedOverrides = [...normalized.overridesByName.values()].sort((left, right) => left.name.localeCompare(right.name));
|
|
2645
|
+
for (const capability of toSortedList([...normalized.allowedCapabilities, ...normalized.blockedCapabilities])) {
|
|
1853
2646
|
if (!isKnownExtensionCapability(capability)) {
|
|
1854
2647
|
warnings.push(`extension_policy_unknown_capability:${capability}`);
|
|
1855
2648
|
}
|
|
1856
2649
|
}
|
|
1857
|
-
for (const override of
|
|
2650
|
+
for (const override of sortedOverrides) {
|
|
1858
2651
|
for (const capability of toSortedList([...override.allowedCapabilities, ...override.blockedCapabilities])) {
|
|
1859
2652
|
if (!isKnownExtensionCapability(capability)) {
|
|
1860
2653
|
warnings.push(`extension_policy_unknown_capability:${override.name}:${capability}`);
|
|
@@ -1862,39 +2655,54 @@ function normalizeExtensionPolicy(settings) {
|
|
|
1862
2655
|
}
|
|
1863
2656
|
}
|
|
1864
2657
|
const knownSurfaces = new Set(KNOWN_EXTENSION_POLICY_SURFACES);
|
|
1865
|
-
for (const surface of toSortedList([...allowedSurfaces, ...blockedSurfaces])) {
|
|
2658
|
+
for (const surface of toSortedList([...normalized.allowedSurfaces, ...normalized.blockedSurfaces])) {
|
|
1866
2659
|
if (!knownSurfaces.has(surface)) {
|
|
1867
2660
|
warnings.push(`extension_policy_unknown_surface:${surface}`);
|
|
1868
2661
|
}
|
|
1869
2662
|
}
|
|
1870
|
-
for (const override of
|
|
2663
|
+
for (const override of sortedOverrides) {
|
|
1871
2664
|
for (const surface of toSortedList([...override.allowedSurfaces, ...override.blockedSurfaces])) {
|
|
1872
2665
|
if (!knownSurfaces.has(surface)) {
|
|
1873
2666
|
warnings.push(`extension_policy_unknown_surface:${override.name}:${surface}`);
|
|
1874
2667
|
}
|
|
1875
2668
|
}
|
|
1876
2669
|
}
|
|
2670
|
+
return [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
|
|
2671
|
+
}
|
|
2672
|
+
function normalizeExtensionPolicy(settings) {
|
|
2673
|
+
const policy = settings.extensions?.policy ?? {};
|
|
2674
|
+
const allowedCapabilities = normalizePolicyStringSet(policy.allowed_capabilities);
|
|
2675
|
+
const blockedCapabilities = normalizePolicyStringSet(policy.blocked_capabilities);
|
|
2676
|
+
const allowedSurfaces = normalizePolicySurfaceSet(policy.allowed_surfaces);
|
|
2677
|
+
const blockedSurfaces = normalizePolicySurfaceSet(policy.blocked_surfaces);
|
|
2678
|
+
const overridesByName = collectExtensionPolicyOverrides(policy.extension_overrides);
|
|
1877
2679
|
return {
|
|
1878
|
-
mode,
|
|
1879
|
-
trustMode,
|
|
1880
|
-
pmMaxVersionExceededMode:
|
|
1881
|
-
requireProvenance,
|
|
1882
|
-
trustedExtensions,
|
|
1883
|
-
defaultSandboxProfile,
|
|
1884
|
-
allowedExtensions,
|
|
1885
|
-
blockedExtensions,
|
|
2680
|
+
mode: normalizePolicyMode(policy.mode),
|
|
2681
|
+
trustMode: normalizePolicyTrustMode(policy.trust_mode),
|
|
2682
|
+
pmMaxVersionExceededMode: normalizePmMaxVersionExceededMode(policy.pm_max_version_exceeded_mode),
|
|
2683
|
+
requireProvenance: policy.require_provenance === true,
|
|
2684
|
+
trustedExtensions: normalizePolicyStringSet(policy.trusted_extensions),
|
|
2685
|
+
defaultSandboxProfile: normalizePolicySandboxProfile(policy.default_sandbox_profile),
|
|
2686
|
+
allowedExtensions: normalizePolicyStringSet(policy.allowed_extensions),
|
|
2687
|
+
blockedExtensions: normalizePolicyStringSet(policy.blocked_extensions),
|
|
1886
2688
|
allowedCapabilities,
|
|
1887
2689
|
blockedCapabilities,
|
|
1888
2690
|
allowedSurfaces,
|
|
1889
2691
|
blockedSurfaces,
|
|
1890
|
-
allowedCommands,
|
|
1891
|
-
blockedCommands,
|
|
1892
|
-
allowedActions,
|
|
1893
|
-
blockedActions,
|
|
1894
|
-
allowedServices,
|
|
1895
|
-
blockedServices,
|
|
2692
|
+
allowedCommands: normalizePolicyStringSet(policy.allowed_commands),
|
|
2693
|
+
blockedCommands: normalizePolicyStringSet(policy.blocked_commands),
|
|
2694
|
+
allowedActions: normalizePolicyStringSet(policy.allowed_actions),
|
|
2695
|
+
blockedActions: normalizePolicyStringSet(policy.blocked_actions),
|
|
2696
|
+
allowedServices: normalizePolicyStringSet(policy.allowed_services),
|
|
2697
|
+
blockedServices: normalizePolicyStringSet(policy.blocked_services),
|
|
1896
2698
|
overridesByName,
|
|
1897
|
-
warnings:
|
|
2699
|
+
warnings: collectExtensionPolicyWarnings({
|
|
2700
|
+
allowedCapabilities,
|
|
2701
|
+
blockedCapabilities,
|
|
2702
|
+
allowedSurfaces,
|
|
2703
|
+
blockedSurfaces,
|
|
2704
|
+
overridesByName
|
|
2705
|
+
})
|
|
1898
2706
|
};
|
|
1899
2707
|
}
|
|
1900
2708
|
function serializeExtensionPolicy(policy) {
|
|
@@ -2105,55 +2913,28 @@ function evaluateExtensionPolicyForExtension(policy, extension) {
|
|
|
2105
2913
|
if (policy.mode === "off" && policy.trustMode === "off") {
|
|
2106
2914
|
return { allowed: true, warning: null };
|
|
2107
2915
|
}
|
|
2916
|
+
const violations = [];
|
|
2108
2917
|
const reason = resolvePolicyExtensionReason(policy, extension);
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
const extensionEnforced = reason && policy.mode === "enforce";
|
|
2112
|
-
const trustEnforced = trustReason && policy.trustMode === "enforce";
|
|
2113
|
-
const sandboxEnforced = sandboxReason && policy.mode === "enforce";
|
|
2114
|
-
if (!reason && !trustReason && !sandboxReason) {
|
|
2115
|
-
return { allowed: true, warning: null };
|
|
2116
|
-
}
|
|
2117
|
-
if (extensionEnforced) {
|
|
2118
|
-
return {
|
|
2119
|
-
allowed: false,
|
|
2120
|
-
warning: buildPolicyWarning("blocked", "extension", extension, reason)
|
|
2121
|
-
};
|
|
2122
|
-
}
|
|
2123
|
-
if (trustEnforced) {
|
|
2124
|
-
return {
|
|
2125
|
-
allowed: false,
|
|
2126
|
-
warning: buildPolicyWarning("blocked", "trust", extension, trustReason)
|
|
2127
|
-
};
|
|
2918
|
+
if (reason) {
|
|
2919
|
+
violations.push({ reason, scope: "extension", mode: policy.mode });
|
|
2128
2920
|
}
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
warning: buildPolicyWarning("blocked", "extension", extension, sandboxReason)
|
|
2133
|
-
};
|
|
2921
|
+
const trustReason = resolvePolicyTrustReason(policy, extension);
|
|
2922
|
+
if (trustReason) {
|
|
2923
|
+
violations.push({ reason: trustReason, scope: "trust", mode: policy.trustMode });
|
|
2134
2924
|
}
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
warning: buildPolicyWarning("violation", "extension", extension, reason)
|
|
2139
|
-
};
|
|
2925
|
+
const sandboxReason = resolvePolicySandboxReason(policy, extension);
|
|
2926
|
+
if (sandboxReason) {
|
|
2927
|
+
violations.push({ reason: sandboxReason, scope: "extension", mode: policy.mode });
|
|
2140
2928
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
warning: buildPolicyWarning("violation", "trust", extension, trustReason)
|
|
2145
|
-
};
|
|
2929
|
+
const enforced = violations.find((violation) => violation.mode === "enforce");
|
|
2930
|
+
if (enforced) {
|
|
2931
|
+
return { allowed: false, warning: buildPolicyWarning("blocked", enforced.scope, extension, enforced.reason) };
|
|
2146
2932
|
}
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
warning: buildPolicyWarning("violation", "extension", extension, sandboxReason)
|
|
2151
|
-
};
|
|
2933
|
+
const warned = violations.find((violation) => violation.mode === "warn");
|
|
2934
|
+
if (warned) {
|
|
2935
|
+
return { allowed: true, warning: buildPolicyWarning("violation", warned.scope, extension, warned.reason) };
|
|
2152
2936
|
}
|
|
2153
|
-
return {
|
|
2154
|
-
allowed: true,
|
|
2155
|
-
warning: null
|
|
2156
|
-
};
|
|
2937
|
+
return { allowed: true, warning: null };
|
|
2157
2938
|
}
|
|
2158
2939
|
function evaluateExtensionPolicyForCapability(policy, extension, capability) {
|
|
2159
2940
|
if (policy.mode === "off") {
|
|
@@ -2168,19 +2949,15 @@ function evaluateExtensionPolicyForCapability(policy, extension, capability) {
|
|
|
2168
2949
|
warning: buildPolicyWarning(policy.mode === "warn" ? "violation" : "blocked", "capability", extension, reason, { capability: capability.trim().toLowerCase() })
|
|
2169
2950
|
};
|
|
2170
2951
|
}
|
|
2171
|
-
function
|
|
2172
|
-
if (policy.mode === "off") {
|
|
2173
|
-
return { allowed: true, warning: null };
|
|
2174
|
-
}
|
|
2952
|
+
function resolveRegistrationPolicyReason(policy, extension, surface, capability, detail) {
|
|
2175
2953
|
const capabilityReason = typeof capability === "string" ? resolvePolicyCapabilityReason(policy, extension, capability) : null;
|
|
2176
2954
|
const surfaceReason = resolvePolicySurfaceReason(policy, extension, surface);
|
|
2177
|
-
const commandReason =
|
|
2178
|
-
const actionReason =
|
|
2179
|
-
const serviceReason =
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
}
|
|
2955
|
+
const commandReason = detail.command ? resolvePolicyCommandReason(policy, extension, detail.command) : null;
|
|
2956
|
+
const actionReason = detail.action ? resolvePolicyActionReason(policy, extension, detail.action) : null;
|
|
2957
|
+
const serviceReason = detail.service ? resolvePolicyServiceReason(policy, extension, detail.service) : null;
|
|
2958
|
+
return capabilityReason ?? surfaceReason ?? commandReason ?? actionReason ?? serviceReason;
|
|
2959
|
+
}
|
|
2960
|
+
function buildRegistrationPolicyWarningDetails(method, surface, capability, detail) {
|
|
2184
2961
|
const warningDetails = {
|
|
2185
2962
|
method: normalizePolicyName(method).replace(/\s+/g, "_"),
|
|
2186
2963
|
surface
|
|
@@ -2188,16 +2965,27 @@ function evaluateExtensionPolicyForRegistration(policy, extension, surface, meth
|
|
|
2188
2965
|
if (capability) {
|
|
2189
2966
|
warningDetails.capability = capability;
|
|
2190
2967
|
}
|
|
2191
|
-
if (
|
|
2192
|
-
warningDetails.command = normalizeCommandName(
|
|
2968
|
+
if (detail.command) {
|
|
2969
|
+
warningDetails.command = normalizeCommandName(detail.command);
|
|
2970
|
+
}
|
|
2971
|
+
if (detail.action) {
|
|
2972
|
+
warningDetails.action = normalizePolicyName(detail.action).replace(/\s+/g, "-");
|
|
2973
|
+
}
|
|
2974
|
+
if (detail.service) {
|
|
2975
|
+
warningDetails.service = normalizePolicyName(detail.service);
|
|
2193
2976
|
}
|
|
2194
|
-
|
|
2195
|
-
|
|
2977
|
+
return warningDetails;
|
|
2978
|
+
}
|
|
2979
|
+
function evaluateExtensionPolicyForRegistration(policy, extension, surface, method, capability, details) {
|
|
2980
|
+
if (policy.mode === "off") {
|
|
2981
|
+
return { allowed: true, warning: null };
|
|
2196
2982
|
}
|
|
2197
|
-
|
|
2198
|
-
|
|
2983
|
+
const detail = details ?? {};
|
|
2984
|
+
const reason = resolveRegistrationPolicyReason(policy, extension, surface, capability, detail);
|
|
2985
|
+
if (!reason) {
|
|
2986
|
+
return { allowed: true, warning: null };
|
|
2199
2987
|
}
|
|
2200
|
-
const warning = buildPolicyWarning(policy.mode === "warn" ? "violation" : "blocked", "registration", extension, reason,
|
|
2988
|
+
const warning = buildPolicyWarning(policy.mode === "warn" ? "violation" : "blocked", "registration", extension, reason, buildRegistrationPolicyWarningDetails(method, surface, capability, detail));
|
|
2201
2989
|
return {
|
|
2202
2990
|
allowed: policy.mode === "warn",
|
|
2203
2991
|
warning
|
|
@@ -2208,7 +2996,7 @@ function evaluateExtensionPolicyForRegistration(policy, extension, surface, meth
|
|
|
2208
2996
|
!(function() {
|
|
2209
2997
|
try {
|
|
2210
2998
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
2211
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
2999
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c04aa899-5cba-5907-be3e-4db7c63b7f13");
|
|
2212
3000
|
} catch (e2) {
|
|
2213
3001
|
}
|
|
2214
3002
|
})();
|
|
@@ -2251,33 +3039,134 @@ function parseManifestEngines(value) {
|
|
|
2251
3039
|
}
|
|
2252
3040
|
return Object.keys(engines).length > 0 ? engines : void 0;
|
|
2253
3041
|
}
|
|
2254
|
-
function
|
|
2255
|
-
|
|
3042
|
+
function parseRequiredManifestString(candidate, field) {
|
|
3043
|
+
const value = candidate[field];
|
|
3044
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
2256
3045
|
return null;
|
|
2257
3046
|
}
|
|
2258
|
-
|
|
2259
|
-
|
|
3047
|
+
return value.trim();
|
|
3048
|
+
}
|
|
3049
|
+
function parseOptionalIntegerValue(value) {
|
|
3050
|
+
if (value === void 0 || value === null) {
|
|
3051
|
+
return void 0;
|
|
3052
|
+
}
|
|
3053
|
+
if (typeof value !== "number" || !Number.isInteger(value)) {
|
|
2260
3054
|
return null;
|
|
2261
3055
|
}
|
|
2262
|
-
|
|
3056
|
+
return value;
|
|
3057
|
+
}
|
|
3058
|
+
function parseOptionalBooleanValue(value) {
|
|
3059
|
+
if (value === void 0 || value === null) {
|
|
3060
|
+
return void 0;
|
|
3061
|
+
}
|
|
3062
|
+
if (typeof value !== "boolean") {
|
|
2263
3063
|
return null;
|
|
2264
3064
|
}
|
|
2265
|
-
|
|
3065
|
+
return value;
|
|
3066
|
+
}
|
|
3067
|
+
function parseManifestPriority(candidate) {
|
|
3068
|
+
const value = parseOptionalIntegerValue(candidate.priority);
|
|
3069
|
+
return value === void 0 ? DEFAULT_EXTENSION_PRIORITY : value;
|
|
3070
|
+
}
|
|
3071
|
+
function parseManifestSandboxProfile(candidate) {
|
|
3072
|
+
const value = candidate.sandbox_profile;
|
|
3073
|
+
if (value === void 0 || value === null) {
|
|
3074
|
+
return void 0;
|
|
3075
|
+
}
|
|
3076
|
+
if (typeof value !== "string") {
|
|
2266
3077
|
return null;
|
|
2267
3078
|
}
|
|
2268
|
-
|
|
2269
|
-
if (
|
|
2270
|
-
|
|
2271
|
-
return null;
|
|
2272
|
-
}
|
|
2273
|
-
priority = candidate.priority;
|
|
3079
|
+
const normalizedProfile = normalizePolicySandboxProfile(value);
|
|
3080
|
+
if (normalizedProfile !== value.trim().toLowerCase()) {
|
|
3081
|
+
return null;
|
|
2274
3082
|
}
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
3083
|
+
return normalizedProfile;
|
|
3084
|
+
}
|
|
3085
|
+
function optionalTrimmedString(value) {
|
|
3086
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
3087
|
+
}
|
|
3088
|
+
function parseManifestProvenance(value) {
|
|
3089
|
+
if (value === void 0 || value === null) {
|
|
3090
|
+
return void 0;
|
|
3091
|
+
}
|
|
3092
|
+
const provenanceRecord = asRecordLoose(value);
|
|
3093
|
+
if (!provenanceRecord) {
|
|
3094
|
+
return null;
|
|
3095
|
+
}
|
|
3096
|
+
const source = optionalTrimmedString(provenanceRecord.source);
|
|
3097
|
+
const signature = optionalTrimmedString(provenanceRecord.signature);
|
|
3098
|
+
const attestation = optionalTrimmedString(provenanceRecord.attestation);
|
|
3099
|
+
const verified = provenanceRecord.verified === void 0 || provenanceRecord.verified === null ? void 0 : typeof provenanceRecord.verified === "boolean" ? provenanceRecord.verified : null;
|
|
3100
|
+
if (verified === null) {
|
|
3101
|
+
return null;
|
|
3102
|
+
}
|
|
3103
|
+
return {
|
|
3104
|
+
...source ? { source } : {},
|
|
3105
|
+
...signature ? { signature } : {},
|
|
3106
|
+
...attestation ? { attestation } : {},
|
|
3107
|
+
...typeof verified === "boolean" ? { verified } : {}
|
|
3108
|
+
};
|
|
3109
|
+
}
|
|
3110
|
+
function parseManifestPermissions(value) {
|
|
3111
|
+
if (value === void 0 || value === null) {
|
|
3112
|
+
return void 0;
|
|
3113
|
+
}
|
|
3114
|
+
const permissionsRecord = asRecordLoose(value);
|
|
3115
|
+
if (!permissionsRecord) {
|
|
3116
|
+
return null;
|
|
3117
|
+
}
|
|
3118
|
+
const fsRead = parseOptionalBooleanValue(permissionsRecord.fs_read);
|
|
3119
|
+
const fsWrite = parseOptionalBooleanValue(permissionsRecord.fs_write);
|
|
3120
|
+
const network = parseOptionalBooleanValue(permissionsRecord.network);
|
|
3121
|
+
const envRead = parseOptionalBooleanValue(permissionsRecord.env_read);
|
|
3122
|
+
const envWrite = parseOptionalBooleanValue(permissionsRecord.env_write);
|
|
3123
|
+
const processSpawn = parseOptionalBooleanValue(permissionsRecord.process_spawn);
|
|
3124
|
+
if ([fsRead, fsWrite, network, envRead, envWrite, processSpawn].includes(null)) {
|
|
3125
|
+
return null;
|
|
3126
|
+
}
|
|
3127
|
+
return {
|
|
3128
|
+
...typeof fsRead === "boolean" ? { fs_read: fsRead } : {},
|
|
3129
|
+
...typeof fsWrite === "boolean" ? { fs_write: fsWrite } : {},
|
|
3130
|
+
...typeof network === "boolean" ? { network } : {},
|
|
3131
|
+
...typeof envRead === "boolean" ? { env_read: envRead } : {},
|
|
3132
|
+
...typeof envWrite === "boolean" ? { env_write: envWrite } : {},
|
|
3133
|
+
...typeof processSpawn === "boolean" ? { process_spawn: processSpawn } : {}
|
|
3134
|
+
};
|
|
3135
|
+
}
|
|
3136
|
+
function parseManifestCapabilities(value) {
|
|
3137
|
+
if (value === void 0 || value === null) {
|
|
3138
|
+
return { capabilities: [], legacy_aliases: [] };
|
|
3139
|
+
}
|
|
3140
|
+
if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) {
|
|
3141
|
+
return null;
|
|
3142
|
+
}
|
|
3143
|
+
const normalizedCapabilities = normalizeManifestCapabilities(value);
|
|
3144
|
+
return { capabilities: normalizedCapabilities.capabilities, legacy_aliases: normalizedCapabilities.legacy_aliases };
|
|
3145
|
+
}
|
|
3146
|
+
function parseManifestActivation(value) {
|
|
3147
|
+
if (value === void 0 || value === null) {
|
|
3148
|
+
return void 0;
|
|
3149
|
+
}
|
|
3150
|
+
const activationRecord = asRecordLoose(value);
|
|
3151
|
+
if (!activationRecord) {
|
|
3152
|
+
return null;
|
|
3153
|
+
}
|
|
3154
|
+
const rawCommands = activationRecord.commands;
|
|
3155
|
+
if (rawCommands === void 0 || rawCommands === null) {
|
|
3156
|
+
return void 0;
|
|
3157
|
+
}
|
|
3158
|
+
if (!Array.isArray(rawCommands) || rawCommands.some((entry) => typeof entry !== "string")) {
|
|
3159
|
+
return null;
|
|
3160
|
+
}
|
|
3161
|
+
const commands = [
|
|
3162
|
+
...new Set(rawCommands.map((entry) => normalizeCommandName(entry)).filter((entry) => entry.length > 0))
|
|
3163
|
+
].sort((left, right) => left.localeCompare(right));
|
|
3164
|
+
return commands.length > 0 ? { commands } : void 0;
|
|
3165
|
+
}
|
|
3166
|
+
function parseManifestMetadata(candidate) {
|
|
3167
|
+
const manifestVersion = parseOptionalIntegerValue(candidate.manifest_version);
|
|
3168
|
+
if (manifestVersion === null) {
|
|
3169
|
+
return null;
|
|
2281
3170
|
}
|
|
2282
3171
|
const pmMinVersion = parseOptionalManifestString(candidate, "pm_min_version");
|
|
2283
3172
|
if (pmMinVersion === null) {
|
|
@@ -2291,124 +3180,85 @@ function parseManifest(raw) {
|
|
|
2291
3180
|
if (engines === null) {
|
|
2292
3181
|
return null;
|
|
2293
3182
|
}
|
|
2294
|
-
|
|
2295
|
-
if (
|
|
2296
|
-
|
|
2297
|
-
return null;
|
|
2298
|
-
}
|
|
2299
|
-
trusted = candidate.trusted;
|
|
2300
|
-
}
|
|
2301
|
-
let sandboxProfile;
|
|
2302
|
-
if ("sandbox_profile" in candidate && candidate.sandbox_profile !== void 0 && candidate.sandbox_profile !== null) {
|
|
2303
|
-
if (typeof candidate.sandbox_profile !== "string") {
|
|
2304
|
-
return null;
|
|
2305
|
-
}
|
|
2306
|
-
const normalizedProfile = normalizePolicySandboxProfile(candidate.sandbox_profile);
|
|
2307
|
-
if (normalizedProfile !== candidate.sandbox_profile.trim().toLowerCase()) {
|
|
2308
|
-
return null;
|
|
2309
|
-
}
|
|
2310
|
-
sandboxProfile = normalizedProfile;
|
|
2311
|
-
}
|
|
2312
|
-
let provenance;
|
|
2313
|
-
if ("provenance" in candidate && candidate.provenance !== void 0 && candidate.provenance !== null) {
|
|
2314
|
-
const provenanceRecord = asRecordLoose(candidate.provenance);
|
|
2315
|
-
if (!provenanceRecord) {
|
|
2316
|
-
return null;
|
|
2317
|
-
}
|
|
2318
|
-
const source = typeof provenanceRecord.source === "string" && provenanceRecord.source.trim().length > 0 ? provenanceRecord.source.trim() : void 0;
|
|
2319
|
-
const signature = typeof provenanceRecord.signature === "string" && provenanceRecord.signature.trim().length > 0 ? provenanceRecord.signature.trim() : void 0;
|
|
2320
|
-
const attestation = typeof provenanceRecord.attestation === "string" && provenanceRecord.attestation.trim().length > 0 ? provenanceRecord.attestation.trim() : void 0;
|
|
2321
|
-
const verified = provenanceRecord.verified === void 0 || provenanceRecord.verified === null ? void 0 : typeof provenanceRecord.verified === "boolean" ? provenanceRecord.verified : null;
|
|
2322
|
-
if (verified === null) {
|
|
2323
|
-
return null;
|
|
2324
|
-
}
|
|
2325
|
-
provenance = {
|
|
2326
|
-
...source ? { source } : {},
|
|
2327
|
-
...signature ? { signature } : {},
|
|
2328
|
-
...attestation ? { attestation } : {},
|
|
2329
|
-
...typeof verified === "boolean" ? { verified } : {}
|
|
2330
|
-
};
|
|
2331
|
-
}
|
|
2332
|
-
let permissions;
|
|
2333
|
-
if ("permissions" in candidate && candidate.permissions !== void 0 && candidate.permissions !== null) {
|
|
2334
|
-
const permissionsRecord = asRecordLoose(candidate.permissions);
|
|
2335
|
-
if (!permissionsRecord) {
|
|
2336
|
-
return null;
|
|
2337
|
-
}
|
|
2338
|
-
const parseOptionalBoolean = (value) => {
|
|
2339
|
-
if (value === void 0 || value === null) {
|
|
2340
|
-
return void 0;
|
|
2341
|
-
}
|
|
2342
|
-
if (typeof value !== "boolean") {
|
|
2343
|
-
return null;
|
|
2344
|
-
}
|
|
2345
|
-
return value;
|
|
2346
|
-
};
|
|
2347
|
-
const fsRead = parseOptionalBoolean(permissionsRecord.fs_read);
|
|
2348
|
-
const fsWrite = parseOptionalBoolean(permissionsRecord.fs_write);
|
|
2349
|
-
const network = parseOptionalBoolean(permissionsRecord.network);
|
|
2350
|
-
const envRead = parseOptionalBoolean(permissionsRecord.env_read);
|
|
2351
|
-
const envWrite = parseOptionalBoolean(permissionsRecord.env_write);
|
|
2352
|
-
const processSpawn = parseOptionalBoolean(permissionsRecord.process_spawn);
|
|
2353
|
-
if ([fsRead, fsWrite, network, envRead, envWrite, processSpawn].includes(null)) {
|
|
2354
|
-
return null;
|
|
2355
|
-
}
|
|
2356
|
-
permissions = {
|
|
2357
|
-
...typeof fsRead === "boolean" ? { fs_read: fsRead } : {},
|
|
2358
|
-
...typeof fsWrite === "boolean" ? { fs_write: fsWrite } : {},
|
|
2359
|
-
...typeof network === "boolean" ? { network } : {},
|
|
2360
|
-
...typeof envRead === "boolean" ? { env_read: envRead } : {},
|
|
2361
|
-
...typeof envWrite === "boolean" ? { env_write: envWrite } : {},
|
|
2362
|
-
...typeof processSpawn === "boolean" ? { process_spawn: processSpawn } : {}
|
|
2363
|
-
};
|
|
2364
|
-
}
|
|
2365
|
-
let capabilities = [];
|
|
2366
|
-
let legacyCapabilityAliases = [];
|
|
2367
|
-
if ("capabilities" in candidate && candidate.capabilities !== void 0 && candidate.capabilities !== null) {
|
|
2368
|
-
if (!Array.isArray(candidate.capabilities) || candidate.capabilities.some((value) => typeof value !== "string")) {
|
|
2369
|
-
return null;
|
|
2370
|
-
}
|
|
2371
|
-
const normalizedCapabilities = normalizeManifestCapabilities(candidate.capabilities);
|
|
2372
|
-
capabilities = normalizedCapabilities.capabilities;
|
|
2373
|
-
legacyCapabilityAliases = normalizedCapabilities.legacy_aliases;
|
|
3183
|
+
const trusted = parseOptionalBooleanValue(candidate.trusted);
|
|
3184
|
+
if (trusted === null) {
|
|
3185
|
+
return null;
|
|
2374
3186
|
}
|
|
2375
|
-
|
|
2376
|
-
if (
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
}
|
|
3187
|
+
const sandboxProfile = parseManifestSandboxProfile(candidate);
|
|
3188
|
+
if (sandboxProfile === null) {
|
|
3189
|
+
return null;
|
|
3190
|
+
}
|
|
3191
|
+
const provenance = parseManifestProvenance(candidate.provenance);
|
|
3192
|
+
if (provenance === null) {
|
|
3193
|
+
return null;
|
|
3194
|
+
}
|
|
3195
|
+
const permissions = parseManifestPermissions(candidate.permissions);
|
|
3196
|
+
if (permissions === null) {
|
|
3197
|
+
return null;
|
|
3198
|
+
}
|
|
3199
|
+
const capabilities = parseManifestCapabilities(candidate.capabilities);
|
|
3200
|
+
if (capabilities === null) {
|
|
3201
|
+
return null;
|
|
3202
|
+
}
|
|
3203
|
+
const activation = parseManifestActivation(candidate.activation);
|
|
3204
|
+
if (activation === null) {
|
|
3205
|
+
return null;
|
|
2395
3206
|
}
|
|
2396
3207
|
return {
|
|
2397
|
-
name: candidate.name.trim(),
|
|
2398
|
-
version: candidate.version.trim(),
|
|
2399
|
-
entry: candidate.entry.trim(),
|
|
2400
|
-
priority,
|
|
2401
3208
|
manifest_version: manifestVersion,
|
|
2402
3209
|
pm_min_version: pmMinVersion,
|
|
2403
3210
|
pm_max_version: pmMaxVersion,
|
|
2404
3211
|
engines,
|
|
2405
3212
|
trusted,
|
|
2406
|
-
provenance,
|
|
2407
3213
|
sandbox_profile: sandboxProfile,
|
|
3214
|
+
provenance,
|
|
2408
3215
|
permissions,
|
|
2409
|
-
|
|
2410
|
-
capabilities,
|
|
2411
|
-
|
|
3216
|
+
capabilities: capabilities.capabilities,
|
|
3217
|
+
legacy_capability_aliases: capabilities.legacy_aliases,
|
|
3218
|
+
activation
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
function parseManifest(raw) {
|
|
3222
|
+
if (typeof raw !== "object" || raw === null) {
|
|
3223
|
+
return null;
|
|
3224
|
+
}
|
|
3225
|
+
const candidate = raw;
|
|
3226
|
+
const name = parseRequiredManifestString(candidate, "name");
|
|
3227
|
+
if (name === null) {
|
|
3228
|
+
return null;
|
|
3229
|
+
}
|
|
3230
|
+
const version = parseRequiredManifestString(candidate, "version");
|
|
3231
|
+
if (version === null) {
|
|
3232
|
+
return null;
|
|
3233
|
+
}
|
|
3234
|
+
const entry = parseRequiredManifestString(candidate, "entry");
|
|
3235
|
+
if (entry === null) {
|
|
3236
|
+
return null;
|
|
3237
|
+
}
|
|
3238
|
+
const priority = parseManifestPriority(candidate);
|
|
3239
|
+
if (priority === null) {
|
|
3240
|
+
return null;
|
|
3241
|
+
}
|
|
3242
|
+
const metadata = parseManifestMetadata(candidate);
|
|
3243
|
+
if (metadata === null) {
|
|
3244
|
+
return null;
|
|
3245
|
+
}
|
|
3246
|
+
return {
|
|
3247
|
+
name,
|
|
3248
|
+
version,
|
|
3249
|
+
entry,
|
|
3250
|
+
priority,
|
|
3251
|
+
manifest_version: metadata.manifest_version,
|
|
3252
|
+
pm_min_version: metadata.pm_min_version,
|
|
3253
|
+
pm_max_version: metadata.pm_max_version,
|
|
3254
|
+
engines: metadata.engines,
|
|
3255
|
+
trusted: metadata.trusted,
|
|
3256
|
+
provenance: metadata.provenance,
|
|
3257
|
+
sandbox_profile: metadata.sandbox_profile,
|
|
3258
|
+
permissions: metadata.permissions,
|
|
3259
|
+
activation: metadata.activation,
|
|
3260
|
+
capabilities: metadata.capabilities,
|
|
3261
|
+
legacy_capability_aliases: metadata.legacy_capability_aliases.length > 0 ? metadata.legacy_capability_aliases : void 0
|
|
2412
3262
|
};
|
|
2413
3263
|
}
|
|
2414
3264
|
function shouldEnable(name, enabled, disabled) {
|
|
@@ -2537,26 +3387,50 @@ async function scanExtensionLayer(layer, extensionsRoot, enabled, disabled, pmMa
|
|
|
2537
3387
|
}
|
|
2538
3388
|
return { diagnostics, warnings, candidates };
|
|
2539
3389
|
}
|
|
3390
|
+
function buildUnavailableExtensionScan(layer, directory, manifestPath, warning) {
|
|
3391
|
+
return {
|
|
3392
|
+
diagnostic: {
|
|
3393
|
+
layer,
|
|
3394
|
+
directory,
|
|
3395
|
+
manifest_path: manifestPath,
|
|
3396
|
+
name: null,
|
|
3397
|
+
version: null,
|
|
3398
|
+
entry: null,
|
|
3399
|
+
priority: null,
|
|
3400
|
+
entry_path: null,
|
|
3401
|
+
enabled: null,
|
|
3402
|
+
status: "warn"
|
|
3403
|
+
},
|
|
3404
|
+
warnings: [warning],
|
|
3405
|
+
candidate: null
|
|
3406
|
+
};
|
|
3407
|
+
}
|
|
3408
|
+
function collectScannedExtensionWarnings(layer, manifest, entryWithinDirectory, entryExists, pmVersionCompatibility, pmMaxVersionCompatibility) {
|
|
3409
|
+
const extensionWarnings = [];
|
|
3410
|
+
if (Array.isArray(manifest.legacy_capability_aliases) && manifest.legacy_capability_aliases.length > 0) {
|
|
3411
|
+
extensionWarnings.push(formatLegacyExtensionCapabilityAliasWarning(layer, manifest.name, manifest.legacy_capability_aliases));
|
|
3412
|
+
}
|
|
3413
|
+
for (const capability of collectUnknownExtensionCapabilities(manifest.capabilities)) {
|
|
3414
|
+
extensionWarnings.push(formatUnknownExtensionCapabilityWarning(layer, manifest.name, capability));
|
|
3415
|
+
}
|
|
3416
|
+
if (!entryWithinDirectory) {
|
|
3417
|
+
extensionWarnings.push(`extension_entry_outside_extension:${layer}:${manifest.name}`);
|
|
3418
|
+
} else if (!entryExists) {
|
|
3419
|
+
extensionWarnings.push(`extension_entry_missing:${layer}:${manifest.name}`);
|
|
3420
|
+
}
|
|
3421
|
+
if (pmVersionCompatibility.warning) {
|
|
3422
|
+
extensionWarnings.push(pmVersionCompatibility.warning);
|
|
3423
|
+
}
|
|
3424
|
+
if (pmMaxVersionCompatibility.warning) {
|
|
3425
|
+
extensionWarnings.push(pmMaxVersionCompatibility.warning);
|
|
3426
|
+
}
|
|
3427
|
+
return extensionWarnings;
|
|
3428
|
+
}
|
|
2540
3429
|
async function scanExtensionDirectory(layer, extensionsRoot, directory, enabled, disabled, managedSourcePackages, pmMaxVersionExceededMode2) {
|
|
2541
3430
|
const extensionDir = path5.join(extensionsRoot, directory);
|
|
2542
3431
|
const manifestPath = path5.join(extensionDir, "manifest.json");
|
|
2543
3432
|
if (!await pathExists(manifestPath)) {
|
|
2544
|
-
return {
|
|
2545
|
-
diagnostic: {
|
|
2546
|
-
layer,
|
|
2547
|
-
directory,
|
|
2548
|
-
manifest_path: manifestPath,
|
|
2549
|
-
name: null,
|
|
2550
|
-
version: null,
|
|
2551
|
-
entry: null,
|
|
2552
|
-
priority: null,
|
|
2553
|
-
entry_path: null,
|
|
2554
|
-
enabled: null,
|
|
2555
|
-
status: "warn"
|
|
2556
|
-
},
|
|
2557
|
-
warnings: [`extension_manifest_missing:${layer}:${directory}`],
|
|
2558
|
-
candidate: null
|
|
2559
|
-
};
|
|
3433
|
+
return buildUnavailableExtensionScan(layer, directory, manifestPath, `extension_manifest_missing:${layer}:${directory}`);
|
|
2560
3434
|
}
|
|
2561
3435
|
let manifest = null;
|
|
2562
3436
|
try {
|
|
@@ -2566,48 +3440,16 @@ async function scanExtensionDirectory(layer, extensionsRoot, directory, enabled,
|
|
|
2566
3440
|
manifest = null;
|
|
2567
3441
|
}
|
|
2568
3442
|
if (!manifest) {
|
|
2569
|
-
return {
|
|
2570
|
-
diagnostic: {
|
|
2571
|
-
layer,
|
|
2572
|
-
directory,
|
|
2573
|
-
manifest_path: manifestPath,
|
|
2574
|
-
name: null,
|
|
2575
|
-
version: null,
|
|
2576
|
-
entry: null,
|
|
2577
|
-
priority: null,
|
|
2578
|
-
entry_path: null,
|
|
2579
|
-
enabled: null,
|
|
2580
|
-
status: "warn"
|
|
2581
|
-
},
|
|
2582
|
-
warnings: [`extension_manifest_invalid:${layer}:${directory}`],
|
|
2583
|
-
candidate: null
|
|
2584
|
-
};
|
|
3443
|
+
return buildUnavailableExtensionScan(layer, directory, manifestPath, `extension_manifest_invalid:${layer}:${directory}`);
|
|
2585
3444
|
}
|
|
2586
3445
|
const entryPath = path5.resolve(extensionDir, manifest.entry);
|
|
2587
3446
|
const entryWithinDirectoryByPath = isPathWithinDirectory(extensionDir, entryPath);
|
|
2588
3447
|
const entryExists = entryWithinDirectoryByPath ? await pathExists(entryPath) : false;
|
|
2589
3448
|
const entryWithinDirectory = entryWithinDirectoryByPath && entryExists ? await isCanonicalPathWithinDirectory(extensionDir, entryPath) : entryWithinDirectoryByPath;
|
|
2590
3449
|
const enabledForLoad = shouldEnable(manifest.name, enabled, disabled);
|
|
2591
|
-
const extensionWarnings = [];
|
|
2592
|
-
if (Array.isArray(manifest.legacy_capability_aliases) && manifest.legacy_capability_aliases.length > 0) {
|
|
2593
|
-
extensionWarnings.push(formatLegacyExtensionCapabilityAliasWarning(layer, manifest.name, manifest.legacy_capability_aliases));
|
|
2594
|
-
}
|
|
2595
|
-
for (const capability of collectUnknownExtensionCapabilities(manifest.capabilities)) {
|
|
2596
|
-
extensionWarnings.push(formatUnknownExtensionCapabilityWarning(layer, manifest.name, capability));
|
|
2597
|
-
}
|
|
2598
|
-
if (!entryWithinDirectory) {
|
|
2599
|
-
extensionWarnings.push(`extension_entry_outside_extension:${layer}:${manifest.name}`);
|
|
2600
|
-
} else if (!entryExists) {
|
|
2601
|
-
extensionWarnings.push(`extension_entry_missing:${layer}:${manifest.name}`);
|
|
2602
|
-
}
|
|
2603
3450
|
const pmVersionCompatibility = await evaluatePmMinVersionCompatibility(layer, manifest);
|
|
2604
|
-
if (pmVersionCompatibility.warning) {
|
|
2605
|
-
extensionWarnings.push(pmVersionCompatibility.warning);
|
|
2606
|
-
}
|
|
2607
3451
|
const pmMaxVersionCompatibility = await evaluatePmMaxVersionCompatibility(layer, manifest, pmMaxVersionExceededMode2);
|
|
2608
|
-
|
|
2609
|
-
extensionWarnings.push(pmMaxVersionCompatibility.warning);
|
|
2610
|
-
}
|
|
3452
|
+
const extensionWarnings = collectScannedExtensionWarnings(layer, manifest, entryWithinDirectory, entryExists, pmVersionCompatibility, pmMaxVersionCompatibility);
|
|
2611
3453
|
const extensionReady = entryWithinDirectory && entryExists && pmVersionCompatibility.allowed && pmMaxVersionCompatibility.allowed;
|
|
2612
3454
|
const sourcePackage = managedSourcePackages.get(`directory:${directory}`) ?? managedSourcePackages.get(`name:${manifest.name}`);
|
|
2613
3455
|
return {
|
|
@@ -3195,6 +4037,86 @@ function validateMigrationDefinition(definition) {
|
|
|
3195
4037
|
throw new TypeError("registerMigration definition.run must be a function when provided");
|
|
3196
4038
|
}
|
|
3197
4039
|
}
|
|
4040
|
+
var PROJECT_PROFILE_DIMENSIONS = [
|
|
4041
|
+
"types",
|
|
4042
|
+
"statuses",
|
|
4043
|
+
"fields",
|
|
4044
|
+
"workflows",
|
|
4045
|
+
"config",
|
|
4046
|
+
"templates",
|
|
4047
|
+
"packages"
|
|
4048
|
+
];
|
|
4049
|
+
function validateProjectProfileEntryShape(dimension, index, entry) {
|
|
4050
|
+
const at = `registerProfile profile.${dimension}[${index}]`;
|
|
4051
|
+
if (dimension === "types") {
|
|
4052
|
+
if (entry.name !== void 0 && typeof entry.name !== "string") {
|
|
4053
|
+
throw new TypeError(`${at}.name must be a string when provided`);
|
|
4054
|
+
}
|
|
4055
|
+
return;
|
|
4056
|
+
}
|
|
4057
|
+
if (dimension === "workflows") {
|
|
4058
|
+
if (typeof entry.type !== "string") {
|
|
4059
|
+
throw new TypeError(`${at}.type must be a string`);
|
|
4060
|
+
}
|
|
4061
|
+
if (!Array.isArray(entry.allowed_transitions)) {
|
|
4062
|
+
throw new TypeError(`${at}.allowed_transitions must be an array`);
|
|
4063
|
+
}
|
|
4064
|
+
for (const [pairIndex, pair] of entry.allowed_transitions.entries()) {
|
|
4065
|
+
if (!Array.isArray(pair)) {
|
|
4066
|
+
throw new TypeError(`${at}.allowed_transitions[${pairIndex}] must be a [from, to] array`);
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
return;
|
|
4070
|
+
}
|
|
4071
|
+
if (dimension === "templates") {
|
|
4072
|
+
if (typeof entry.name !== "string") {
|
|
4073
|
+
throw new TypeError(`${at}.name must be a string`);
|
|
4074
|
+
}
|
|
4075
|
+
if (typeof entry.options !== "object" || entry.options === null || Array.isArray(entry.options)) {
|
|
4076
|
+
throw new TypeError(`${at}.options must be an object`);
|
|
4077
|
+
}
|
|
4078
|
+
return;
|
|
4079
|
+
}
|
|
4080
|
+
if (dimension === "packages") {
|
|
4081
|
+
if (typeof entry.spec !== "string") {
|
|
4082
|
+
throw new TypeError(`${at}.spec must be a string`);
|
|
4083
|
+
}
|
|
4084
|
+
}
|
|
4085
|
+
}
|
|
4086
|
+
function validateProjectProfileDefinition(profile) {
|
|
4087
|
+
const record = asRegistrationRecord("registerProfile profile", profile);
|
|
4088
|
+
assertNonEmptyString("registerProfile profile.name", record.name);
|
|
4089
|
+
assertNonEmptyString("registerProfile profile.title", record.title);
|
|
4090
|
+
if (record.summary !== void 0 && typeof record.summary !== "string") {
|
|
4091
|
+
throw new TypeError("registerProfile profile.summary must be a string when provided");
|
|
4092
|
+
}
|
|
4093
|
+
for (const dimension of PROJECT_PROFILE_DIMENSIONS) {
|
|
4094
|
+
const value = record[dimension];
|
|
4095
|
+
if (value === void 0) {
|
|
4096
|
+
continue;
|
|
4097
|
+
}
|
|
4098
|
+
if (!Array.isArray(value)) {
|
|
4099
|
+
throw new TypeError(`registerProfile profile.${dimension} must be an array when provided`);
|
|
4100
|
+
}
|
|
4101
|
+
for (const [index, entry] of value.entries()) {
|
|
4102
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
4103
|
+
throw new TypeError(`registerProfile profile.${dimension}[${index}] must be an object`);
|
|
4104
|
+
}
|
|
4105
|
+
validateProjectProfileEntryShape(dimension, index, entry);
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4108
|
+
}
|
|
4109
|
+
function applyProjectProfileDefaults(profile) {
|
|
4110
|
+
if (profile.summary === void 0) {
|
|
4111
|
+
profile.summary = "";
|
|
4112
|
+
}
|
|
4113
|
+
for (const dimension of PROJECT_PROFILE_DIMENSIONS) {
|
|
4114
|
+
if (profile[dimension] === void 0) {
|
|
4115
|
+
profile[dimension] = [];
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
return profile;
|
|
4119
|
+
}
|
|
3198
4120
|
function attachRuntimeDefinition(entry, runtimeDefinition) {
|
|
3199
4121
|
Object.defineProperty(entry, "runtime_definition", {
|
|
3200
4122
|
value: runtimeDefinition,
|
|
@@ -3277,69 +4199,70 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
|
|
|
3277
4199
|
received: sanitizeRegistrationValue(received),
|
|
3278
4200
|
hint
|
|
3279
4201
|
});
|
|
3280
|
-
const
|
|
3281
|
-
|
|
3282
|
-
if (
|
|
3283
|
-
|
|
3284
|
-
if (normalizedCommand2.length === 0) {
|
|
3285
|
-
throw createRegistrationValidationError("registerCommand requires a non-empty command name", registerCommandTrace("override", commandOrDefinition, 'registerCommand("<command>", (context) => unknown)', commandOrDefinition, "Provide a non-empty command path as the first argument."));
|
|
3286
|
-
}
|
|
3287
|
-
if (typeof override !== "function") {
|
|
3288
|
-
const trace = registerCommandTrace("override", normalizedCommand2, 'registerCommand("<command>", (context) => unknown)', { command: commandOrDefinition, override }, "Provide a function as the second registerCommand argument.");
|
|
3289
|
-
throw createRegistrationValidationError(`registerCommand requires an override function when command name is provided (command="${normalizedCommand2}", registration_index=${trace.registration_index})`, trace);
|
|
3290
|
-
}
|
|
3291
|
-
if (!allowRegistration("commands.override", "registerCommand", "commands", { command: normalizedCommand2 })) {
|
|
3292
|
-
return;
|
|
3293
|
-
}
|
|
3294
|
-
commands.overrides.push({
|
|
3295
|
-
layer: extension.layer,
|
|
3296
|
-
name: extension.name,
|
|
3297
|
-
command: normalizedCommand2,
|
|
3298
|
-
run: override
|
|
3299
|
-
});
|
|
3300
|
-
return;
|
|
3301
|
-
}
|
|
3302
|
-
if (typeof commandOrDefinition !== "object" || commandOrDefinition === null) {
|
|
3303
|
-
throw createRegistrationValidationError("registerCommand requires a command definition object", registerCommandTrace("definition", void 0, "{ name: string; run: (context) => unknown; }", commandOrDefinition, 'Use registerCommand({ name: "command path", run: (context) => ... }).'));
|
|
4202
|
+
const registerCommandOverride = (command, override) => {
|
|
4203
|
+
const normalizedCommand = normalizeCommandName(command);
|
|
4204
|
+
if (normalizedCommand.length === 0) {
|
|
4205
|
+
throw createRegistrationValidationError("registerCommand requires a non-empty command name", registerCommandTrace("override", command, 'registerCommand("<command>", (context) => unknown)', command, "Provide a non-empty command path as the first argument."));
|
|
3304
4206
|
}
|
|
3305
|
-
if (typeof
|
|
3306
|
-
|
|
4207
|
+
if (typeof override !== "function") {
|
|
4208
|
+
const trace = registerCommandTrace("override", normalizedCommand, 'registerCommand("<command>", (context) => unknown)', { command, override }, "Provide a function as the second registerCommand argument.");
|
|
4209
|
+
throw createRegistrationValidationError(`registerCommand requires an override function when command name is provided (command="${normalizedCommand}", registration_index=${trace.registration_index})`, trace);
|
|
3307
4210
|
}
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
throw createRegistrationValidationError("registerCommand requires a non-empty command definition name", registerCommandTrace("definition", commandOrDefinition.name, "{ name: string; run: (context) => unknown; }", commandOrDefinition, "Ensure command definition.name contains a non-empty command path."));
|
|
4211
|
+
if (!allowRegistration("commands.override", "registerCommand", "commands", { command: normalizedCommand })) {
|
|
4212
|
+
return;
|
|
3311
4213
|
}
|
|
3312
|
-
|
|
3313
|
-
|
|
4214
|
+
commands.overrides.push({
|
|
4215
|
+
layer: extension.layer,
|
|
4216
|
+
name: extension.name,
|
|
4217
|
+
command: normalizedCommand,
|
|
4218
|
+
run: override
|
|
4219
|
+
});
|
|
4220
|
+
};
|
|
4221
|
+
const resolveCommandDefinitionRunHandler = (definition, normalizedCommand) => {
|
|
4222
|
+
const runHandler = typeof definition.run === "function" ? definition.run : void 0;
|
|
4223
|
+
const legacyHandler = typeof definition.handler === "function" ? definition.handler : void 0;
|
|
3314
4224
|
if (!runHandler && legacyHandler) {
|
|
3315
4225
|
activationWarnings.push(`extension_command_definition_legacy_handler_alias:${extension.layer}:${extension.name}:${normalizedCommand}`);
|
|
3316
4226
|
}
|
|
3317
|
-
|
|
4227
|
+
return runHandler ?? legacyHandler;
|
|
4228
|
+
};
|
|
4229
|
+
const registerCommandDefinition = (definition) => {
|
|
4230
|
+
if (typeof definition !== "object" || definition === null) {
|
|
4231
|
+
throw createRegistrationValidationError("registerCommand requires a command definition object", registerCommandTrace("definition", void 0, "{ name: string; run: (context) => unknown; }", definition, 'Use registerCommand({ name: "command path", run: (context) => ... }).'));
|
|
4232
|
+
}
|
|
4233
|
+
if (typeof definition.name !== "string") {
|
|
4234
|
+
throw createRegistrationValidationError("registerCommand requires a command definition name", registerCommandTrace("definition", void 0, "{ name: string; run: (context) => unknown; }", definition, "Set command definition.name to a non-empty string command path."));
|
|
4235
|
+
}
|
|
4236
|
+
const normalizedCommand = normalizeCommandName(definition.name);
|
|
4237
|
+
if (normalizedCommand.length === 0) {
|
|
4238
|
+
throw createRegistrationValidationError("registerCommand requires a non-empty command definition name", registerCommandTrace("definition", definition.name, "{ name: string; run: (context) => unknown; }", definition, "Ensure command definition.name contains a non-empty command path."));
|
|
4239
|
+
}
|
|
4240
|
+
const resolvedHandler = resolveCommandDefinitionRunHandler(definition, normalizedCommand);
|
|
3318
4241
|
if (typeof resolvedHandler !== "function") {
|
|
3319
|
-
const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; }",
|
|
4242
|
+
const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; }", definition, "Define command definition.run as a function.");
|
|
3320
4243
|
throw createRegistrationValidationError(`registerCommand requires a command definition run handler (command="${normalizedCommand}", registration_index=${trace.registration_index})`, trace);
|
|
3321
4244
|
}
|
|
3322
4245
|
try {
|
|
3323
|
-
assertOptionalStringField("registerCommand definition.action",
|
|
3324
|
-
assertOptionalStringField("registerCommand definition.description",
|
|
3325
|
-
assertOptionalStringField("registerCommand definition.intent",
|
|
3326
|
-
const action = resolveCommandDefinitionAction(normalizedCommand,
|
|
4246
|
+
assertOptionalStringField("registerCommand definition.action", definition.action);
|
|
4247
|
+
assertOptionalStringField("registerCommand definition.description", definition.description);
|
|
4248
|
+
assertOptionalStringField("registerCommand definition.intent", definition.intent);
|
|
4249
|
+
const action = resolveCommandDefinitionAction(normalizedCommand, definition.action);
|
|
3327
4250
|
if (!allowRegistration("commands.handler", "registerCommand", "commands", { command: normalizedCommand, action })) {
|
|
3328
4251
|
return;
|
|
3329
4252
|
}
|
|
3330
|
-
const description =
|
|
3331
|
-
const intent =
|
|
3332
|
-
const examples = normalizeOptionalStringArrayField("registerCommand definition.examples",
|
|
3333
|
-
const failureHints = normalizeOptionalStringArrayField("registerCommand definition.failure_hints",
|
|
3334
|
-
const argumentsDefinition = normalizeCommandDefinitionArguments(
|
|
3335
|
-
if (
|
|
4253
|
+
const description = definition.description?.trim();
|
|
4254
|
+
const intent = definition.intent?.trim();
|
|
4255
|
+
const examples = normalizeOptionalStringArrayField("registerCommand definition.examples", definition.examples);
|
|
4256
|
+
const failureHints = normalizeOptionalStringArrayField("registerCommand definition.failure_hints", definition.failure_hints);
|
|
4257
|
+
const argumentsDefinition = normalizeCommandDefinitionArguments(definition.arguments);
|
|
4258
|
+
if (definition.flags !== void 0) {
|
|
3336
4259
|
assertExtensionCapability(extension, "schema", "registerCommand flags");
|
|
3337
|
-
validateFlagDefinitions(
|
|
4260
|
+
validateFlagDefinitions(definition.flags);
|
|
3338
4261
|
registrations.flags.push({
|
|
3339
4262
|
layer: extension.layer,
|
|
3340
4263
|
name: extension.name,
|
|
3341
4264
|
target_command: normalizedCommand,
|
|
3342
|
-
flags: normalizeRegistrationRecordList("registerCommand definition.flags",
|
|
4265
|
+
flags: normalizeRegistrationRecordList("registerCommand definition.flags", definition.flags)
|
|
3343
4266
|
});
|
|
3344
4267
|
}
|
|
3345
4268
|
const registration = {
|
|
@@ -3361,7 +4284,7 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
|
|
|
3361
4284
|
registrations.commands.push(registration);
|
|
3362
4285
|
} catch (error) {
|
|
3363
4286
|
const reason = formatUnknownError(error);
|
|
3364
|
-
const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; action?: string; arguments?: object[]; flags?: object[]; }",
|
|
4287
|
+
const trace = registerCommandTrace("definition", normalizedCommand, "{ name: string; run: (context) => unknown; action?: string; arguments?: object[]; flags?: object[]; }", definition, "Use schema-style metadata (action/arguments/flags/examples/intent) with valid values.");
|
|
3365
4288
|
throw createRegistrationValidationError(`registerCommand definition metadata invalid (command="${normalizedCommand}", registration_index=${trace.registration_index}): ${reason}`, trace);
|
|
3366
4289
|
}
|
|
3367
4290
|
commands.handlers.push({
|
|
@@ -3371,6 +4294,14 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
|
|
|
3371
4294
|
run: resolvedHandler
|
|
3372
4295
|
});
|
|
3373
4296
|
};
|
|
4297
|
+
const registerCommand = (commandOrDefinition, override) => {
|
|
4298
|
+
assertExtensionCapability(extension, "commands", "registerCommand");
|
|
4299
|
+
if (typeof commandOrDefinition === "string") {
|
|
4300
|
+
registerCommandOverride(commandOrDefinition, override);
|
|
4301
|
+
return;
|
|
4302
|
+
}
|
|
4303
|
+
registerCommandDefinition(commandOrDefinition);
|
|
4304
|
+
};
|
|
3374
4305
|
const registerParser = (command, override) => {
|
|
3375
4306
|
assertExtensionCapability(extension, "parser", "registerParser");
|
|
3376
4307
|
if (!allowRegistration("parser.override", "registerParser", "parser")) {
|
|
@@ -3496,6 +4427,19 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
|
|
|
3496
4427
|
definition: normalizeRegistrationRecord("registerMigration definition", definition)
|
|
3497
4428
|
}, runtimeDefinition));
|
|
3498
4429
|
};
|
|
4430
|
+
const registerProfile = (profile) => {
|
|
4431
|
+
assertExtensionCapability(extension, "schema", "registerProfile");
|
|
4432
|
+
if (!allowRegistration("schema.profiles", "registerProfile", "schema")) {
|
|
4433
|
+
return;
|
|
4434
|
+
}
|
|
4435
|
+
const snapshot = cloneRuntimeRegistrationValue(profile);
|
|
4436
|
+
validateProjectProfileDefinition(snapshot);
|
|
4437
|
+
registrations.profiles.push({
|
|
4438
|
+
layer: extension.layer,
|
|
4439
|
+
name: extension.name,
|
|
4440
|
+
profile: applyProjectProfileDefaults(snapshot)
|
|
4441
|
+
});
|
|
4442
|
+
};
|
|
3499
4443
|
const applyImportExportCommandMetadata = (method, commandPath, options) => {
|
|
3500
4444
|
if (options === void 0) {
|
|
3501
4445
|
return;
|
|
@@ -3694,6 +4638,7 @@ function createExtensionApi(extension, hooks, commands, parsers, preflight, serv
|
|
|
3694
4638
|
registerItemFields,
|
|
3695
4639
|
registerItemTypes,
|
|
3696
4640
|
registerMigration,
|
|
4641
|
+
registerProfile,
|
|
3697
4642
|
registerRenderer,
|
|
3698
4643
|
registerImporter,
|
|
3699
4644
|
registerExporter,
|
|
@@ -3719,6 +4664,7 @@ function getRegistrationCounts(registrations) {
|
|
|
3719
4664
|
item_fields: itemFieldCount,
|
|
3720
4665
|
item_types: itemTypeCount,
|
|
3721
4666
|
migrations: registrations.migrations.length,
|
|
4667
|
+
profiles: registrations.profiles.length,
|
|
3722
4668
|
importers: registrations.importers.length,
|
|
3723
4669
|
exporters: registrations.exporters.length,
|
|
3724
4670
|
search_providers: registrations.search_providers.length,
|
|
@@ -3903,7 +4849,7 @@ async function activateExtensions(loadResult) {
|
|
|
3903
4849
|
!(function() {
|
|
3904
4850
|
try {
|
|
3905
4851
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3906
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
4852
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7cc05bac-f673-59a1-9d51-64361cf5a939");
|
|
3907
4853
|
} catch (e2) {
|
|
3908
4854
|
}
|
|
3909
4855
|
})();
|
|
@@ -3951,6 +4897,7 @@ function attributeCapabilityUsage(activation) {
|
|
|
3951
4897
|
record(registrations.item_fields, "schema");
|
|
3952
4898
|
record(registrations.item_types, "schema");
|
|
3953
4899
|
record(registrations.migrations, "schema");
|
|
4900
|
+
record(registrations.profiles, "schema");
|
|
3954
4901
|
record(registrations.importers, "importers");
|
|
3955
4902
|
record(registrations.exporters, "importers");
|
|
3956
4903
|
record(registrations.search_providers, "search");
|
|
@@ -4214,163 +5161,42 @@ function runActiveRendererOverride(format, result) {
|
|
|
4214
5161
|
}
|
|
4215
5162
|
function buildServiceContext(service, payload) {
|
|
4216
5163
|
return {
|
|
4217
|
-
service,
|
|
4218
|
-
command: activeCommandContext?.command,
|
|
4219
|
-
args: activeCommandContext ? [...activeCommandContext.args] : [],
|
|
4220
|
-
options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
|
|
4221
|
-
global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
|
|
4222
|
-
pm_root: activeCommandContext?.pm_root,
|
|
4223
|
-
payload
|
|
4224
|
-
};
|
|
4225
|
-
}
|
|
4226
|
-
async function runActiveServiceOverride(service, payload) {
|
|
4227
|
-
if (!activeExtensionServices) {
|
|
4228
|
-
return {
|
|
4229
|
-
handled: false,
|
|
4230
|
-
result: payload,
|
|
4231
|
-
warnings: []
|
|
4232
|
-
};
|
|
4233
|
-
}
|
|
4234
|
-
return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));
|
|
4235
|
-
}
|
|
4236
|
-
function runActiveServiceOverrideSync(service, payload) {
|
|
4237
|
-
if (!activeExtensionServices) {
|
|
4238
|
-
return {
|
|
4239
|
-
handled: false,
|
|
4240
|
-
result: payload,
|
|
4241
|
-
warnings: []
|
|
4242
|
-
};
|
|
4243
|
-
}
|
|
4244
|
-
return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
|
|
4245
|
-
}
|
|
4246
|
-
|
|
4247
|
-
// dist/types.js
|
|
4248
|
-
!(function() {
|
|
4249
|
-
try {
|
|
4250
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
4251
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "46812059-b93e-5599-a222-4ac0de6f4911");
|
|
4252
|
-
} catch (e2) {
|
|
4253
|
-
}
|
|
4254
|
-
})();
|
|
4255
|
-
var BUILTIN_ITEM_TYPE_VALUES = [
|
|
4256
|
-
"Epic",
|
|
4257
|
-
"Feature",
|
|
4258
|
-
"Task",
|
|
4259
|
-
"Chore",
|
|
4260
|
-
"Issue",
|
|
4261
|
-
"Decision",
|
|
4262
|
-
"Event",
|
|
4263
|
-
"Reminder",
|
|
4264
|
-
"Milestone",
|
|
4265
|
-
"Meeting",
|
|
4266
|
-
"Plan"
|
|
4267
|
-
];
|
|
4268
|
-
var ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;
|
|
4269
|
-
var STATUS_VALUES = [
|
|
4270
|
-
"draft",
|
|
4271
|
-
"open",
|
|
4272
|
-
"in_progress",
|
|
4273
|
-
"blocked",
|
|
4274
|
-
"closed",
|
|
4275
|
-
"canceled"
|
|
4276
|
-
];
|
|
4277
|
-
var RUNTIME_STATUS_ROLE_VALUES = [
|
|
4278
|
-
"draft",
|
|
4279
|
-
"active",
|
|
4280
|
-
"blocked",
|
|
4281
|
-
"terminal",
|
|
4282
|
-
"terminal_done",
|
|
4283
|
-
"terminal_canceled",
|
|
4284
|
-
"default_open",
|
|
4285
|
-
"default_close",
|
|
4286
|
-
"default_cancel"
|
|
4287
|
-
];
|
|
4288
|
-
var RUNTIME_FIELD_TYPE_VALUES = ["string", "number", "boolean", "string_array"];
|
|
4289
|
-
var RUNTIME_FIELD_COMMAND_VALUES = ["create", "update", "update_many", "list", "search", "calendar", "context"];
|
|
4290
|
-
var RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = ["allow", "warn", "reject"];
|
|
4291
|
-
var DEPENDENCY_KIND_VALUES = [
|
|
4292
|
-
"blocks",
|
|
4293
|
-
"parent",
|
|
4294
|
-
"child",
|
|
4295
|
-
"parent_child",
|
|
4296
|
-
"child_of",
|
|
4297
|
-
"related",
|
|
4298
|
-
"related_to",
|
|
4299
|
-
"discovered_from",
|
|
4300
|
-
"blocked_by",
|
|
4301
|
-
"incident_from",
|
|
4302
|
-
"epic",
|
|
4303
|
-
"supersedes",
|
|
4304
|
-
"task"
|
|
4305
|
-
];
|
|
4306
|
-
var SCOPE_VALUES = ["project", "global"];
|
|
4307
|
-
var RISK_VALUES = ["low", "medium", "high", "critical"];
|
|
4308
|
-
var ISSUE_SEVERITY_VALUES = ["low", "medium", "high", "critical"];
|
|
4309
|
-
var CONFIDENCE_TEXT_VALUES = ["low", "medium", "high"];
|
|
4310
|
-
var GOVERNANCE_PRESET_VALUES = ["minimal", "default", "strict", "custom"];
|
|
4311
|
-
var RECURRENCE_FREQUENCY_VALUES = ["daily", "weekly", "monthly", "yearly"];
|
|
4312
|
-
var RECURRENCE_WEEKDAY_VALUES = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
|
|
4313
|
-
function weekdayOrderIndex(value) {
|
|
4314
|
-
return RECURRENCE_WEEKDAY_VALUES.indexOf(value);
|
|
5164
|
+
service,
|
|
5165
|
+
command: activeCommandContext?.command,
|
|
5166
|
+
args: activeCommandContext ? [...activeCommandContext.args] : [],
|
|
5167
|
+
options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},
|
|
5168
|
+
global: activeCommandContext?.global ? { ...activeCommandContext.global } : void 0,
|
|
5169
|
+
pm_root: activeCommandContext?.pm_root,
|
|
5170
|
+
payload
|
|
5171
|
+
};
|
|
4315
5172
|
}
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
"completed",
|
|
4324
|
-
"superseded"
|
|
4325
|
-
];
|
|
4326
|
-
var PLAN_STEP_STATUS_VALUES = [
|
|
4327
|
-
"pending",
|
|
4328
|
-
"in_progress",
|
|
4329
|
-
"completed",
|
|
4330
|
-
"blocked",
|
|
4331
|
-
"skipped",
|
|
4332
|
-
"superseded"
|
|
4333
|
-
];
|
|
4334
|
-
var PLAN_HARNESS_VALUES = ["codex", "claude-code", "cursor", "generic"];
|
|
4335
|
-
var PLAN_STEP_LINK_KIND_VALUES = [
|
|
4336
|
-
"related",
|
|
4337
|
-
"blocks",
|
|
4338
|
-
"blocked_by",
|
|
4339
|
-
"depends_on",
|
|
4340
|
-
"discovered_from",
|
|
4341
|
-
"implements",
|
|
4342
|
-
"verifies",
|
|
4343
|
-
"supersedes"
|
|
4344
|
-
];
|
|
4345
|
-
var CONTEXT_DEPTH_VALUES = ["brief", "standard", "deep", "full"];
|
|
4346
|
-
var CONTEXT_SECTION_VALUES = [
|
|
4347
|
-
"hierarchy",
|
|
4348
|
-
"activity",
|
|
4349
|
-
"progress",
|
|
4350
|
-
"recently_created",
|
|
4351
|
-
"unparented",
|
|
4352
|
-
"blockers",
|
|
4353
|
-
"files",
|
|
4354
|
-
"workload",
|
|
4355
|
-
"staleness",
|
|
4356
|
-
"tests"
|
|
4357
|
-
];
|
|
4358
|
-
|
|
4359
|
-
// dist/types/index.js
|
|
4360
|
-
!(function() {
|
|
4361
|
-
try {
|
|
4362
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
4363
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c57bc662-d60a-54b1-b2da-a7d9d7fde67a");
|
|
4364
|
-
} catch (e2) {
|
|
5173
|
+
async function runActiveServiceOverride(service, payload) {
|
|
5174
|
+
if (!activeExtensionServices) {
|
|
5175
|
+
return {
|
|
5176
|
+
handled: false,
|
|
5177
|
+
result: payload,
|
|
5178
|
+
warnings: []
|
|
5179
|
+
};
|
|
4365
5180
|
}
|
|
4366
|
-
|
|
5181
|
+
return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));
|
|
5182
|
+
}
|
|
5183
|
+
function runActiveServiceOverrideSync(service, payload) {
|
|
5184
|
+
if (!activeExtensionServices) {
|
|
5185
|
+
return {
|
|
5186
|
+
handled: false,
|
|
5187
|
+
result: payload,
|
|
5188
|
+
warnings: []
|
|
5189
|
+
};
|
|
5190
|
+
}
|
|
5191
|
+
return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
|
|
5192
|
+
}
|
|
4367
5193
|
|
|
4368
5194
|
// dist/core/schema/runtime-schema.js
|
|
4369
5195
|
import path6 from "node:path";
|
|
4370
5196
|
!(function() {
|
|
4371
5197
|
try {
|
|
4372
5198
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
4373
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5199
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d3baeeb6-0912-515f-95c1-735d3849fed4");
|
|
4374
5200
|
} catch (e2) {
|
|
4375
5201
|
}
|
|
4376
5202
|
})();
|
|
@@ -4529,7 +5355,7 @@ function normalizeRuntimeFieldDefinition(definition) {
|
|
|
4529
5355
|
function normalizeRuntimeSchemaSettings(schema) {
|
|
4530
5356
|
const files = {
|
|
4531
5357
|
...DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
4532
|
-
...schema?.files
|
|
5358
|
+
...schema?.files
|
|
4533
5359
|
};
|
|
4534
5360
|
const statusesSource = schema?.statuses && schema.statuses.length > 0 ? schema.statuses : DEFAULT_RUNTIME_STATUS_DEFINITIONS;
|
|
4535
5361
|
const normalizedStatuses = (() => {
|
|
@@ -4794,7 +5620,7 @@ async function loadRuntimeSchemaFromOptionalFiles(pmRoot, schema) {
|
|
|
4794
5620
|
fields: [...normalizedSchema.fields, ...loadedFields ?? []],
|
|
4795
5621
|
workflow: {
|
|
4796
5622
|
...normalizedSchema.workflow,
|
|
4797
|
-
...loadedWorkflow
|
|
5623
|
+
...loadedWorkflow
|
|
4798
5624
|
},
|
|
4799
5625
|
type_workflows: [...normalizedSchema.type_workflows ?? [], ...loadedTypeWorkflows ?? []]
|
|
4800
5626
|
});
|
|
@@ -4956,7 +5782,7 @@ import crypto2 from "node:crypto";
|
|
|
4956
5782
|
!(function() {
|
|
4957
5783
|
try {
|
|
4958
5784
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
4959
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5785
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "bb00ffab-139c-512c-ac1f-2535f77a1f86");
|
|
4960
5786
|
} catch (e2) {
|
|
4961
5787
|
}
|
|
4962
5788
|
})();
|
|
@@ -5006,74 +5832,73 @@ function sortObjectKeys(value) {
|
|
|
5006
5832
|
function stableStringify(value) {
|
|
5007
5833
|
return JSON.stringify(sortObjectKeys(value));
|
|
5008
5834
|
}
|
|
5009
|
-
function
|
|
5010
|
-
|
|
5011
|
-
|
|
5835
|
+
function hasUnmatchedEquivalent(leftValue, rightValues, matchedIndexes, equals) {
|
|
5836
|
+
for (let index = 0; index < rightValues.length; index += 1) {
|
|
5837
|
+
if (matchedIndexes.has(index)) {
|
|
5838
|
+
continue;
|
|
5839
|
+
}
|
|
5840
|
+
if (equals(leftValue, rightValues[index])) {
|
|
5841
|
+
matchedIndexes.add(index);
|
|
5842
|
+
return true;
|
|
5843
|
+
}
|
|
5012
5844
|
}
|
|
5013
|
-
|
|
5014
|
-
|
|
5845
|
+
return false;
|
|
5846
|
+
}
|
|
5847
|
+
function compareRegExpValues(left, right) {
|
|
5848
|
+
if (!(left instanceof RegExp || right instanceof RegExp)) {
|
|
5849
|
+
return void 0;
|
|
5015
5850
|
}
|
|
5016
|
-
|
|
5017
|
-
|
|
5851
|
+
return left instanceof RegExp && right instanceof RegExp && left.toString() === right.toString();
|
|
5852
|
+
}
|
|
5853
|
+
function compareDateValues(left, right) {
|
|
5854
|
+
if (!(left instanceof Date || right instanceof Date)) {
|
|
5855
|
+
return void 0;
|
|
5018
5856
|
}
|
|
5019
|
-
|
|
5020
|
-
|
|
5857
|
+
return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();
|
|
5858
|
+
}
|
|
5859
|
+
function compareSetValues(left, right) {
|
|
5860
|
+
if (!(left instanceof Set || right instanceof Set)) {
|
|
5861
|
+
return void 0;
|
|
5021
5862
|
}
|
|
5022
|
-
if (left instanceof Set
|
|
5023
|
-
|
|
5024
|
-
return false;
|
|
5025
|
-
}
|
|
5026
|
-
const rightValues = [...right];
|
|
5027
|
-
const matched = /* @__PURE__ */ new Set();
|
|
5028
|
-
for (const leftValue of left) {
|
|
5029
|
-
let found = false;
|
|
5030
|
-
for (let index = 0; index < rightValues.length; index += 1) {
|
|
5031
|
-
if (matched.has(index)) {
|
|
5032
|
-
continue;
|
|
5033
|
-
}
|
|
5034
|
-
if (stableValueEquals(leftValue, rightValues[index])) {
|
|
5035
|
-
matched.add(index);
|
|
5036
|
-
found = true;
|
|
5037
|
-
break;
|
|
5038
|
-
}
|
|
5039
|
-
}
|
|
5040
|
-
if (!found) {
|
|
5041
|
-
return false;
|
|
5042
|
-
}
|
|
5043
|
-
}
|
|
5044
|
-
return true;
|
|
5863
|
+
if (!(left instanceof Set && right instanceof Set) || left.size !== right.size) {
|
|
5864
|
+
return false;
|
|
5045
5865
|
}
|
|
5046
|
-
|
|
5047
|
-
|
|
5866
|
+
const rightValues = [...right];
|
|
5867
|
+
const matched = /* @__PURE__ */ new Set();
|
|
5868
|
+
for (const leftValue of left) {
|
|
5869
|
+
if (!hasUnmatchedEquivalent(leftValue, rightValues, matched, stableValueEquals)) {
|
|
5048
5870
|
return false;
|
|
5049
5871
|
}
|
|
5050
|
-
const rightEntries = [...right.entries()];
|
|
5051
|
-
const matched = /* @__PURE__ */ new Set();
|
|
5052
|
-
for (const [leftKey, leftValue] of left.entries()) {
|
|
5053
|
-
let found = false;
|
|
5054
|
-
for (let index = 0; index < rightEntries.length; index += 1) {
|
|
5055
|
-
if (matched.has(index)) {
|
|
5056
|
-
continue;
|
|
5057
|
-
}
|
|
5058
|
-
const [rightKey, rightValue] = rightEntries[index];
|
|
5059
|
-
if (stableValueEquals(leftKey, rightKey) && stableValueEquals(leftValue, rightValue)) {
|
|
5060
|
-
matched.add(index);
|
|
5061
|
-
found = true;
|
|
5062
|
-
break;
|
|
5063
|
-
}
|
|
5064
|
-
}
|
|
5065
|
-
if (!found) {
|
|
5066
|
-
return false;
|
|
5067
|
-
}
|
|
5068
|
-
}
|
|
5069
|
-
return true;
|
|
5070
5872
|
}
|
|
5071
|
-
|
|
5072
|
-
|
|
5873
|
+
return true;
|
|
5874
|
+
}
|
|
5875
|
+
function compareMapValues(left, right) {
|
|
5876
|
+
if (!(left instanceof Map || right instanceof Map)) {
|
|
5877
|
+
return void 0;
|
|
5878
|
+
}
|
|
5879
|
+
if (!(left instanceof Map && right instanceof Map) || left.size !== right.size) {
|
|
5880
|
+
return false;
|
|
5881
|
+
}
|
|
5882
|
+
const rightEntries = [...right.entries()];
|
|
5883
|
+
const matched = /* @__PURE__ */ new Set();
|
|
5884
|
+
for (const [leftKey, leftValue] of left.entries()) {
|
|
5885
|
+
const leftEntry = [leftKey, leftValue];
|
|
5886
|
+
if (!hasUnmatchedEquivalent(leftEntry, rightEntries, matched, ([candidateKey, candidateValue], [rightKey, rightValue]) => stableValueEquals(candidateKey, rightKey) && stableValueEquals(candidateValue, rightValue))) {
|
|
5073
5887
|
return false;
|
|
5074
5888
|
}
|
|
5075
|
-
return left.every((value, index) => stableValueEquals(value, right[index]));
|
|
5076
5889
|
}
|
|
5890
|
+
return true;
|
|
5891
|
+
}
|
|
5892
|
+
function compareArrayValues(left, right) {
|
|
5893
|
+
if (!(Array.isArray(left) || Array.isArray(right))) {
|
|
5894
|
+
return void 0;
|
|
5895
|
+
}
|
|
5896
|
+
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
|
|
5897
|
+
return false;
|
|
5898
|
+
}
|
|
5899
|
+
return left.every((value, index) => stableValueEquals(value, right[index]));
|
|
5900
|
+
}
|
|
5901
|
+
function comparePlainObjectValues(left, right) {
|
|
5077
5902
|
const leftKeys = Object.keys(left).sort((a, b) => a.localeCompare(b));
|
|
5078
5903
|
const rightKeys = Object.keys(right).sort((a, b) => a.localeCompare(b));
|
|
5079
5904
|
if (leftKeys.length !== rightKeys.length) {
|
|
@@ -5090,6 +5915,28 @@ function stableValueEquals(left, right) {
|
|
|
5090
5915
|
}
|
|
5091
5916
|
return true;
|
|
5092
5917
|
}
|
|
5918
|
+
var SPECIALIZED_STABLE_VALUE_COMPARISONS = [
|
|
5919
|
+
compareRegExpValues,
|
|
5920
|
+
compareDateValues,
|
|
5921
|
+
compareSetValues,
|
|
5922
|
+
compareMapValues,
|
|
5923
|
+
compareArrayValues
|
|
5924
|
+
];
|
|
5925
|
+
function stableValueEquals(left, right) {
|
|
5926
|
+
if (Object.is(left, right)) {
|
|
5927
|
+
return true;
|
|
5928
|
+
}
|
|
5929
|
+
if (left === null || right === null || typeof left !== "object" || typeof right !== "object") {
|
|
5930
|
+
return false;
|
|
5931
|
+
}
|
|
5932
|
+
for (const compare of SPECIALIZED_STABLE_VALUE_COMPARISONS) {
|
|
5933
|
+
const result = compare(left, right);
|
|
5934
|
+
if (result !== void 0) {
|
|
5935
|
+
return result;
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5938
|
+
return comparePlainObjectValues(left, right);
|
|
5939
|
+
}
|
|
5093
5940
|
function sha256Hex(value) {
|
|
5094
5941
|
return crypto2.createHash("sha256").update(value, "utf8").digest("hex");
|
|
5095
5942
|
}
|
|
@@ -5449,94 +6296,6 @@ function validateSettings(raw) {
|
|
|
5449
6296
|
return { success: true, data: result.value };
|
|
5450
6297
|
}
|
|
5451
6298
|
|
|
5452
|
-
// dist/core/item/item-type-definition.js
|
|
5453
|
-
!(function() {
|
|
5454
|
-
try {
|
|
5455
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5456
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "257435ee-2ef3-5736-a403-57d6265cf280");
|
|
5457
|
-
} catch (e2) {
|
|
5458
|
-
}
|
|
5459
|
-
})();
|
|
5460
|
-
function normalizeItemTypeStringList(values) {
|
|
5461
|
-
return [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
5462
|
-
}
|
|
5463
|
-
function normalizeItemTypeOption(option) {
|
|
5464
|
-
const key = option.key.trim();
|
|
5465
|
-
if (key.length === 0) {
|
|
5466
|
-
return null;
|
|
5467
|
-
}
|
|
5468
|
-
const aliases = normalizeItemTypeStringList(option.aliases);
|
|
5469
|
-
const description = option.description?.trim();
|
|
5470
|
-
return {
|
|
5471
|
-
key,
|
|
5472
|
-
values: normalizeItemTypeStringList(option.values),
|
|
5473
|
-
required: option.required === true ? true : void 0,
|
|
5474
|
-
aliases: aliases.length > 0 ? aliases : void 0,
|
|
5475
|
-
description: description && description.length > 0 ? description : void 0
|
|
5476
|
-
};
|
|
5477
|
-
}
|
|
5478
|
-
var keepPolicyCommand = (command) => command;
|
|
5479
|
-
var strictPolicyCommand = (command) => {
|
|
5480
|
-
const normalized = command.trim().toLowerCase();
|
|
5481
|
-
return normalized === "create" || normalized === "update" ? normalized : null;
|
|
5482
|
-
};
|
|
5483
|
-
function normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand) {
|
|
5484
|
-
const command = resolvePolicyCommand(policy.command);
|
|
5485
|
-
if (command === null) {
|
|
5486
|
-
return null;
|
|
5487
|
-
}
|
|
5488
|
-
const option = policy.option.trim();
|
|
5489
|
-
if (option.length === 0) {
|
|
5490
|
-
return null;
|
|
5491
|
-
}
|
|
5492
|
-
return {
|
|
5493
|
-
command,
|
|
5494
|
-
option,
|
|
5495
|
-
required: policy.required,
|
|
5496
|
-
visible: policy.visible,
|
|
5497
|
-
enabled: policy.enabled
|
|
5498
|
-
};
|
|
5499
|
-
}
|
|
5500
|
-
function normalizeItemTypeCommandOptionPolicies(policies, resolvePolicyCommand) {
|
|
5501
|
-
const dedupedByKey = /* @__PURE__ */ new Map();
|
|
5502
|
-
for (const policy of policies ?? []) {
|
|
5503
|
-
const normalized = normalizeItemTypeCommandOptionPolicy(policy, resolvePolicyCommand);
|
|
5504
|
-
if (!normalized) {
|
|
5505
|
-
continue;
|
|
5506
|
-
}
|
|
5507
|
-
dedupedByKey.set(`${normalized.command}:${normalized.option.toLowerCase()}`, normalized);
|
|
5508
|
-
}
|
|
5509
|
-
return [...dedupedByKey.values()].sort((left, right) => left.command === right.command ? left.option.localeCompare(right.option) : left.command.localeCompare(right.command));
|
|
5510
|
-
}
|
|
5511
|
-
function normalizeItemTypeDefinition(definition, options = {}) {
|
|
5512
|
-
const resolvePolicyCommand = options.resolvePolicyCommand ?? keepPolicyCommand;
|
|
5513
|
-
const name = definition.name.trim();
|
|
5514
|
-
if (name.length === 0) {
|
|
5515
|
-
return null;
|
|
5516
|
-
}
|
|
5517
|
-
const hasRequiredCreateFields = definition.required_create_fields !== void 0;
|
|
5518
|
-
const hasRequiredCreateRepeatables = definition.required_create_repeatables !== void 0;
|
|
5519
|
-
const hasOptions = definition.options !== void 0;
|
|
5520
|
-
const hasCommandOptionPolicies = definition.command_option_policies !== void 0;
|
|
5521
|
-
const folder = definition.folder?.trim();
|
|
5522
|
-
const description = definition.description?.trim();
|
|
5523
|
-
const defaultStatus = definition.default_status?.trim();
|
|
5524
|
-
const aliases = normalizeItemTypeStringList(definition.aliases);
|
|
5525
|
-
const normalizedOptions = (definition.options ?? []).map((option) => normalizeItemTypeOption(option)).filter((option) => option !== null).sort((left, right) => left.key.localeCompare(right.key));
|
|
5526
|
-
const commandOptionPolicies = normalizeItemTypeCommandOptionPolicies(definition.command_option_policies, resolvePolicyCommand);
|
|
5527
|
-
return {
|
|
5528
|
-
name,
|
|
5529
|
-
description: description && description.length > 0 ? description : void 0,
|
|
5530
|
-
default_status: defaultStatus && defaultStatus.length > 0 ? defaultStatus : void 0,
|
|
5531
|
-
folder: folder && folder.length > 0 ? folder : void 0,
|
|
5532
|
-
aliases: aliases.length > 0 ? aliases : void 0,
|
|
5533
|
-
required_create_fields: hasRequiredCreateFields ? normalizeItemTypeStringList(definition.required_create_fields) : void 0,
|
|
5534
|
-
required_create_repeatables: hasRequiredCreateRepeatables ? normalizeItemTypeStringList(definition.required_create_repeatables) : void 0,
|
|
5535
|
-
options: hasOptions ? normalizedOptions : void 0,
|
|
5536
|
-
command_option_policies: hasCommandOptionPolicies ? commandOptionPolicies : void 0
|
|
5537
|
-
};
|
|
5538
|
-
}
|
|
5539
|
-
|
|
5540
6299
|
// dist/core/validate/estimate-defaults.js
|
|
5541
6300
|
!(function() {
|
|
5542
6301
|
try {
|
|
@@ -5687,7 +6446,7 @@ function clearSettingsReadCache(pmRoot) {
|
|
|
5687
6446
|
!(function() {
|
|
5688
6447
|
try {
|
|
5689
6448
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5690
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
6449
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "76965ca9-e890-5aa2-a7ca-22f8d179dd5c");
|
|
5691
6450
|
} catch (e2) {
|
|
5692
6451
|
}
|
|
5693
6452
|
})();
|
|
@@ -6160,19 +6919,19 @@ function mergeSettings(settings) {
|
|
|
6160
6919
|
...settings,
|
|
6161
6920
|
item_format: settings.item_format === "json_markdown" ? "toon" : settings.item_format ?? defaults.item_format,
|
|
6162
6921
|
locks: { ...defaults.locks, ...settings.locks },
|
|
6163
|
-
checkpoints: { ...defaults.checkpoints, ...settings.checkpoints
|
|
6922
|
+
checkpoints: { ...defaults.checkpoints, ...settings.checkpoints },
|
|
6164
6923
|
output: { ...defaults.output, ...settings.output },
|
|
6165
6924
|
history: {
|
|
6166
6925
|
...defaults.history,
|
|
6167
|
-
...settings.history
|
|
6926
|
+
...settings.history,
|
|
6168
6927
|
compact_policy: {
|
|
6169
6928
|
...defaults.history.compact_policy,
|
|
6170
|
-
...settings.history?.compact_policy
|
|
6929
|
+
...settings.history?.compact_policy
|
|
6171
6930
|
}
|
|
6172
6931
|
},
|
|
6173
6932
|
validation: {
|
|
6174
6933
|
...defaults.validation,
|
|
6175
|
-
...settings.validation
|
|
6934
|
+
...settings.validation,
|
|
6176
6935
|
parent_reference: governance.parent_reference,
|
|
6177
6936
|
metadata_profile: governance.metadata_profile,
|
|
6178
6937
|
metadata_required_fields: normalizeValidationMetadataRequiredFields(settings.validation?.metadata_required_fields),
|
|
@@ -6208,7 +6967,7 @@ function mergeSettings(settings) {
|
|
|
6208
6967
|
stale_threshold_days: settings.context?.stale_threshold_days ?? defaults.context.stale_threshold_days,
|
|
6209
6968
|
sections: {
|
|
6210
6969
|
...defaults.context.sections,
|
|
6211
|
-
...settings.context?.sections
|
|
6970
|
+
...settings.context?.sections
|
|
6212
6971
|
}
|
|
6213
6972
|
},
|
|
6214
6973
|
extensions: {
|
|
@@ -6222,13 +6981,13 @@ function mergeSettings(settings) {
|
|
|
6222
6981
|
mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(settings.search?.mutation_refresh_policy),
|
|
6223
6982
|
query_expansion: {
|
|
6224
6983
|
...defaults.search.query_expansion,
|
|
6225
|
-
...settings.search?.query_expansion
|
|
6984
|
+
...settings.search?.query_expansion,
|
|
6226
6985
|
enabled: normalizeSearchQueryExpansionEnabled(settings.search?.query_expansion?.enabled),
|
|
6227
6986
|
provider: normalizeSearchQueryExpansionProvider(settings.search?.query_expansion?.provider)
|
|
6228
6987
|
},
|
|
6229
6988
|
rerank: {
|
|
6230
6989
|
...defaults.search.rerank,
|
|
6231
|
-
...settings.search?.rerank
|
|
6990
|
+
...settings.search?.rerank,
|
|
6232
6991
|
enabled: normalizeSearchRerankEnabled(settings.search?.rerank?.enabled),
|
|
6233
6992
|
model: normalizeSearchRerankModel(settings.search?.rerank?.model),
|
|
6234
6993
|
top_k: normalizeSearchRerankTopK(settings.search?.rerank?.top_k)
|
|
@@ -6300,13 +7059,13 @@ function serializeSettings(settings, options = {}) {
|
|
|
6300
7059
|
mutation_refresh_policy: normalizeSearchMutationRefreshPolicy(baseSettings.search?.mutation_refresh_policy),
|
|
6301
7060
|
query_expansion: {
|
|
6302
7061
|
...SETTINGS_DEFAULTS.search.query_expansion,
|
|
6303
|
-
...baseSettings.search?.query_expansion
|
|
7062
|
+
...baseSettings.search?.query_expansion,
|
|
6304
7063
|
enabled: normalizeSearchQueryExpansionEnabled(baseSettings.search?.query_expansion?.enabled),
|
|
6305
7064
|
provider: normalizeSearchQueryExpansionProvider(baseSettings.search?.query_expansion?.provider)
|
|
6306
7065
|
},
|
|
6307
7066
|
rerank: {
|
|
6308
7067
|
...SETTINGS_DEFAULTS.search.rerank,
|
|
6309
|
-
...baseSettings.search?.rerank
|
|
7068
|
+
...baseSettings.search?.rerank,
|
|
6310
7069
|
enabled: normalizeSearchRerankEnabled(baseSettings.search?.rerank?.enabled),
|
|
6311
7070
|
model: normalizeSearchRerankModel(baseSettings.search?.rerank?.model),
|
|
6312
7071
|
top_k: normalizeSearchRerankTopK(baseSettings.search?.rerank?.top_k)
|
|
@@ -6318,7 +7077,7 @@ function serializeSettings(settings, options = {}) {
|
|
|
6318
7077
|
stale_threshold_days: baseSettings.context?.stale_threshold_days ?? SETTINGS_DEFAULTS.context.stale_threshold_days,
|
|
6319
7078
|
sections: {
|
|
6320
7079
|
...SETTINGS_DEFAULTS.context.sections,
|
|
6321
|
-
...baseSettings.context?.sections
|
|
7080
|
+
...baseSettings.context?.sections
|
|
6322
7081
|
}
|
|
6323
7082
|
},
|
|
6324
7083
|
extensions: {
|
|
@@ -6330,8 +7089,8 @@ function serializeSettings(settings, options = {}) {
|
|
|
6330
7089
|
...baseSettings.vector_store,
|
|
6331
7090
|
adapter: baseSettings.vector_store?.adapter ?? SETTINGS_DEFAULTS.vector_store.adapter,
|
|
6332
7091
|
collection_name: normalizeVectorStoreCollectionName(baseSettings.vector_store?.collection_name),
|
|
6333
|
-
qdrant: { ...baseSettings.vector_store?.qdrant
|
|
6334
|
-
lancedb: { ...baseSettings.vector_store?.lancedb
|
|
7092
|
+
qdrant: { ...baseSettings.vector_store?.qdrant },
|
|
7093
|
+
lancedb: { ...baseSettings.vector_store?.lancedb }
|
|
6335
7094
|
}
|
|
6336
7095
|
};
|
|
6337
7096
|
const ordered = orderObject({
|
|
@@ -6632,6 +7391,33 @@ export {
|
|
|
6632
7391
|
EMPTY_CANONICAL_DOCUMENT,
|
|
6633
7392
|
EXIT_CODE,
|
|
6634
7393
|
resolveTelemetryErrorCategory,
|
|
7394
|
+
BUILTIN_ITEM_TYPE_VALUES,
|
|
7395
|
+
STATUS_VALUES,
|
|
7396
|
+
RUNTIME_STATUS_ROLE_VALUES,
|
|
7397
|
+
RUNTIME_FIELD_TYPE_VALUES,
|
|
7398
|
+
RUNTIME_FIELD_COMMAND_VALUES,
|
|
7399
|
+
DEPENDENCY_KIND_VALUES,
|
|
7400
|
+
SCOPE_VALUES,
|
|
7401
|
+
RISK_VALUES,
|
|
7402
|
+
ISSUE_SEVERITY_VALUES,
|
|
7403
|
+
CONFIDENCE_TEXT_VALUES,
|
|
7404
|
+
RECURRENCE_FREQUENCY_VALUES,
|
|
7405
|
+
RECURRENCE_WEEKDAY_VALUES,
|
|
7406
|
+
weekdayOrderIndex,
|
|
7407
|
+
PLAN_MODE_VALUES,
|
|
7408
|
+
PLAN_STEP_STATUS_VALUES,
|
|
7409
|
+
PLAN_HARNESS_VALUES,
|
|
7410
|
+
PLAN_STEP_LINK_KIND_VALUES,
|
|
7411
|
+
CONTEXT_DEPTH_VALUES,
|
|
7412
|
+
CONTEXT_SECTION_VALUES,
|
|
7413
|
+
canonicalizeCommandOptionKey,
|
|
7414
|
+
commandOptionFlagLabel,
|
|
7415
|
+
toDefaultFolder,
|
|
7416
|
+
resolveItemTypeRegistry,
|
|
7417
|
+
resolveTypeName,
|
|
7418
|
+
resolveTypeDefinition,
|
|
7419
|
+
resolveCommandOptionPolicyState,
|
|
7420
|
+
validateTypeOptions,
|
|
6635
7421
|
ITEM_FILE_EXTENSIONS,
|
|
6636
7422
|
resolvePmRoot,
|
|
6637
7423
|
resolveGlobalPmRoot,
|
|
@@ -6701,29 +7487,6 @@ export {
|
|
|
6701
7487
|
runActiveRendererOverride,
|
|
6702
7488
|
runActiveServiceOverride,
|
|
6703
7489
|
runActiveServiceOverrideSync,
|
|
6704
|
-
BUILTIN_ITEM_TYPE_VALUES,
|
|
6705
|
-
ITEM_TYPE_VALUES,
|
|
6706
|
-
STATUS_VALUES,
|
|
6707
|
-
RUNTIME_STATUS_ROLE_VALUES,
|
|
6708
|
-
RUNTIME_FIELD_TYPE_VALUES,
|
|
6709
|
-
RUNTIME_FIELD_COMMAND_VALUES,
|
|
6710
|
-
DEPENDENCY_KIND_VALUES,
|
|
6711
|
-
SCOPE_VALUES,
|
|
6712
|
-
RISK_VALUES,
|
|
6713
|
-
ISSUE_SEVERITY_VALUES,
|
|
6714
|
-
CONFIDENCE_TEXT_VALUES,
|
|
6715
|
-
RECURRENCE_FREQUENCY_VALUES,
|
|
6716
|
-
RECURRENCE_WEEKDAY_VALUES,
|
|
6717
|
-
weekdayOrderIndex,
|
|
6718
|
-
PLAN_MODE_VALUES,
|
|
6719
|
-
PLAN_STEP_STATUS_VALUES,
|
|
6720
|
-
PLAN_HARNESS_VALUES,
|
|
6721
|
-
PLAN_STEP_LINK_KIND_VALUES,
|
|
6722
|
-
CONTEXT_DEPTH_VALUES,
|
|
6723
|
-
CONTEXT_SECTION_VALUES,
|
|
6724
|
-
normalizeItemTypeStringList,
|
|
6725
|
-
strictPolicyCommand,
|
|
6726
|
-
normalizeItemTypeDefinition,
|
|
6727
7490
|
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
6728
7491
|
DEFAULT_RUNTIME_STATUS_DEFINITIONS,
|
|
6729
7492
|
normalizeRuntimeSchemaSettings,
|
|
@@ -6746,4 +7509,4 @@ export {
|
|
|
6746
7509
|
readSettings,
|
|
6747
7510
|
writeSettings
|
|
6748
7511
|
};
|
|
6749
|
-
//# sourceMappingURL=chunk-
|
|
7512
|
+
//# sourceMappingURL=chunk-RVUALSJF.js.map
|