@unbrained/pm-cli 2026.7.11 → 2026.7.12
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +36 -2
- package/README.md +0 -33
- package/dist/cli/commands/claim.d.ts +32 -1
- package/dist/cli/commands/claim.js +52 -15
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/completion.js +11 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/create.js +4 -65
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.js +3 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +18 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/legacy-none-tokens.d.ts +49 -1
- package/dist/cli/commands/legacy-none-tokens.js +73 -2
- package/dist/cli/commands/legacy-none-tokens.js.map +1 -1
- package/dist/cli/commands/next.d.ts +14 -2
- package/dist/cli/commands/next.js +39 -11
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +5 -0
- package/dist/cli/commands/plan.js +44 -2
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/update.js +7 -67
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +13 -1
- package/dist/cli/extension-command-help.js +79 -5
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/main.js +9 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +3 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +3 -2
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +24 -3
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli-bundle/chunks/append-RH3G5RAV.js +11 -0
- package/dist/cli-bundle/chunks/{append-464PHZ65.js → append-T5DTS4NU.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-YMP6AKGU.js → chunk-2XWRFOPR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-HT5P3WC6.js → chunk-2Z36LSAT.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-WQ5227PH.js → chunk-33O5P6KT.js} +135 -41
- package/dist/cli-bundle/chunks/chunk-33O5P6KT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DBV6QRYT.js → chunk-3KJ3FG5O.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AQLKMQQA.js → chunk-3M5BWYUA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GPBKJERW.js → chunk-3WASQS5G.js} +42 -6
- package/dist/cli-bundle/chunks/chunk-3WASQS5G.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-47CCRGRH.js → chunk-47TKJR3D.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YCSDMIQW.js → chunk-4MO4PPR2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WCRAUCJO.js → chunk-546WPG33.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-RLOWK5EQ.js → chunk-5754C5XS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7U5INZ2C.js → chunk-5V746BN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7324AI5M.js → chunk-66YL6RR5.js} +30 -20
- package/dist/cli-bundle/chunks/{chunk-7324AI5M.js.map → chunk-66YL6RR5.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZLQDOBZL.js → chunk-6OK5QSGH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ROH64TST.js → chunk-6XNMSLBT.js} +78 -72
- package/dist/cli-bundle/chunks/chunk-6XNMSLBT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2HNZKLHV.js → chunk-7SHFQB2A.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6APTSPP5.js → chunk-7SIWW7C3.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7HQQT6AT.js → chunk-7TYZTBEV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VTOQH22Y.js → chunk-A2HZUSEA.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-VTOQH22Y.js.map → chunk-A2HZUSEA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YCHJLOO2.js → chunk-A6AK7W5M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WBKZAO3P.js → chunk-A6AVSYRJ.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-L7C6RTGH.js → chunk-ACDIA6NP.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-AX3BJLPV.js → chunk-ACRC3HI4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QCKPSFII.js → chunk-AHIEDSW2.js} +30 -20
- package/dist/cli-bundle/chunks/{chunk-QCKPSFII.js.map → chunk-AHIEDSW2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-B6JBI7JX.js → chunk-ANLHBXAE.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-2KQG6L3J.js → chunk-AS62PEJE.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-OJ64VYGO.js → chunk-BAK2VLTQ.js} +62 -33
- package/dist/cli-bundle/chunks/chunk-BAK2VLTQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-J3EXRK2H.js → chunk-BLRO2POO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KDNZSVCK.js → chunk-CDR2A3VI.js} +15 -74
- package/dist/cli-bundle/chunks/chunk-CDR2A3VI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2WGV5WRW.js → chunk-DJI5IS46.js} +42 -20
- package/dist/cli-bundle/chunks/{chunk-2WGV5WRW.js.map → chunk-DJI5IS46.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VOXOXART.js → chunk-DLZ3RXAL.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-H6YDNW46.js → chunk-DNH44IKP.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QI5KTH6A.js → chunk-EBBROE54.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-GC5ME4ZU.js → chunk-FF523THY.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5OBMSBWX.js → chunk-FIZUJWXQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-HLBSL5KE.js → chunk-FVWQFTTW.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-YIWYD7TC.js → chunk-FVZEIWTL.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-E72ZO34Z.js → chunk-G6B5XGNV.js} +97 -32
- package/dist/cli-bundle/chunks/{chunk-E72ZO34Z.js.map → chunk-G6B5XGNV.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-4DC5XNMS.js → chunk-GFBV2254.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-OKZ35F3Y.js → chunk-GRB3TFOC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TZFULSN4.js → chunk-GVGFLZQS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RTG2LHQ7.js → chunk-HLZXQKGZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5F7UJHFY.js → chunk-HO6CDURZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MN2YMU55.js → chunk-HOE3UV3G.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XQLLRYOX.js → chunk-HRCJGQXL.js} +134 -40
- package/dist/cli-bundle/chunks/chunk-HRCJGQXL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-I535LTZ2.js → chunk-IS6M4ETF.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-K7HEURQ4.js → chunk-J2XEW4YL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GZNB5V5J.js → chunk-J2ZDZG4A.js} +44 -12
- package/dist/cli-bundle/chunks/chunk-J2ZDZG4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-O2Q7YQGO.js → chunk-J7XSQCJO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RA2LPP6E.js → chunk-JM4Z53DN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JR6FIX53.js → chunk-JNNPTGXR.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-I5VZGPS2.js → chunk-K7CGOZK5.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-B6OANV3G.js → chunk-KDH62ECD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LIY2ILWI.js → chunk-KXFY6AI4.js} +41 -5
- package/dist/cli-bundle/chunks/chunk-KXFY6AI4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NR7PTIR7.js → chunk-L23NAJHL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FCZ6WYSR.js → chunk-LEXFDABF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GP54I36Z.js → chunk-LNAGQRIL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DD2WZD6L.js → chunk-LU4Z7POS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FEVEIX53.js → chunk-LX265XY7.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-NJABR6EB.js → chunk-MQAGSAMS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MRMS62WQ.js → chunk-N4NKVLPY.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RY57ESL2.js → chunk-ND3MDD6L.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-Y476SA4V.js → chunk-NEJKKTCG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q3EW4RE5.js → chunk-NGL3X3XM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ENJDRDDP.js → chunk-NK54BSL7.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-KHQYX2QB.js → chunk-NN57FRRN.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VNCQ7SSG.js → chunk-NNRXTZ7Y.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-KZQHMDS6.js → chunk-NOIIRLCO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CTAPVM6C.js → chunk-O5ELBOEJ.js} +14 -73
- package/dist/cli-bundle/chunks/chunk-O5ELBOEJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K2PDZYUF.js → chunk-OC2CLNMS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SN7Q7M4U.js → chunk-OKUFGORG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZLWBLI5R.js → chunk-OOK6V7BF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DDEYJ3BH.js → chunk-OUQ4I6HC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-C4FIA5U6.js → chunk-OYCZDDUC.js} +61 -32
- package/dist/cli-bundle/chunks/chunk-OYCZDDUC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X7ZXLB3C.js → chunk-PDOJRPYR.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-HDNEQAHV.js → chunk-PHQPQNAT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FMFSUTTD.js → chunk-PTJ7NVUU.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-5URFS7C4.js → chunk-PUMGO764.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-RPZ57GQ7.js → chunk-QFCCN4JO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RAC2UXLT.js → chunk-QPWXNK56.js} +43 -11
- package/dist/cli-bundle/chunks/chunk-QPWXNK56.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-35YNX7RQ.js → chunk-QYIDXRRX.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-ITIUEWD5.js → chunk-RFDT674H.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2BUNV627.js → chunk-SJ2DADDH.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-MSPZSUKQ.js → chunk-SV7PEWKW.js} +41 -19
- package/dist/cli-bundle/chunks/{chunk-MSPZSUKQ.js.map → chunk-SV7PEWKW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZYDUOY54.js → chunk-TKD4NESJ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BU2CV5ZU.js → chunk-TMNQV4EK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GJNBKU6G.js → chunk-TWELUDDF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A3AIKEYC.js → chunk-TYCM65DJ.js} +78 -72
- package/dist/cli-bundle/chunks/chunk-TYCM65DJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Y5E6FCAL.js → chunk-U3S22BOJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MORRAQXQ.js → chunk-UAZ6W3H3.js} +91 -33
- package/dist/cli-bundle/chunks/chunk-UAZ6W3H3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2BKRMFGK.js → chunk-UFY4ETU6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EEUIIDWF.js → chunk-UGQENMKM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XK5CTXMB.js → chunk-UGSHP6SR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-2JWIRG4V.js → chunk-VF24O6TV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-PZBRTJ3Y.js → chunk-VLVTXEGG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-X6HT3FP3.js → chunk-VMGK6ESD.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-X6HT3FP3.js.map → chunk-VMGK6ESD.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NAGOH4YJ.js → chunk-VXUWCJS7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ETGRUM64.js → chunk-WBMARQCV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-L6C62S4V.js → chunk-WZDABROA.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-P63GUQK5.js → chunk-XG5GVZRX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6UWHAJEX.js → chunk-XGCPTS6L.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-XGUXU4IQ.js → chunk-Y44B5FBE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-C3QR2DPR.js → chunk-YP6DWEWQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TB6364F7.js → chunk-Z7XTVIN5.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-XSJZF3TO.js → chunk-ZEKVLV6P.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SNFLSFFH.js → chunk-ZFPOBSPC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RYASC6U3.js → chunk-ZUB725AA.js} +7 -7
- package/dist/cli-bundle/chunks/{close-A77IGXNC.js → close-CQHW3WMK.js} +5 -5
- package/dist/cli-bundle/chunks/close-ZZW5FLTB.js +12 -0
- package/dist/cli-bundle/chunks/{close-many-P2YOWN52.js → close-many-AR2YH3SJ.js} +12 -12
- package/dist/cli-bundle/chunks/close-many-IKCEGBLQ.js +21 -0
- package/dist/cli-bundle/chunks/comments-NV4SIY5Z.js +13 -0
- package/dist/cli-bundle/chunks/{comments-FNLKE3TW.js → comments-UV4HMI2K.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-U6H22S7E.js → copy-OUFWOHVG.js} +4 -4
- package/dist/cli-bundle/chunks/copy-X7HJFWIH.js +9 -0
- package/dist/cli-bundle/chunks/{create-HS64DHTL.js → create-QEDL4KKT.js} +9 -9
- package/dist/cli-bundle/chunks/create-R6MMMMJS.js +25 -0
- package/dist/cli-bundle/chunks/{delete-4XPF5XLP.js → delete-MJGZFDHZ.js} +4 -4
- package/dist/cli-bundle/chunks/delete-OOJRG4HF.js +10 -0
- package/dist/cli-bundle/chunks/{deps-TMOF765V.js → deps-4OP6Q76N.js} +4 -4
- package/dist/cli-bundle/chunks/{deps-R44LVZTU.js → deps-Y5X6NFT5.js} +4 -4
- package/dist/cli-bundle/chunks/docs-SILTBWSO.js +14 -0
- package/dist/cli-bundle/chunks/{docs-HN6QKGEU.js → docs-UKTQVUHS.js} +6 -6
- package/dist/cli-bundle/chunks/{files-RNFWG435.js → files-2QEI2V3C.js} +6 -6
- package/dist/cli-bundle/chunks/{files-NX4LNOPL.js → files-7OIKZPI3.js} +6 -6
- package/dist/cli-bundle/chunks/focus-3YC5LFCG.js +10 -0
- package/dist/cli-bundle/chunks/{focus-OBSDVVI7.js → focus-FFWH32BF.js} +5 -5
- package/dist/cli-bundle/chunks/{history-compact-RZMMFSTO.js → history-compact-AAA4W6LY.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-CKNRN637.js → history-compact-PIURAPW5.js} +8 -8
- package/dist/cli-bundle/chunks/history-redact-KWZ7LKQB.js +16 -0
- package/dist/cli-bundle/chunks/{history-redact-W7TTAEX2.js → history-redact-NTO74EIV.js} +6 -6
- package/dist/cli-bundle/chunks/history-repair-QWZJYYOJ.js +18 -0
- package/dist/cli-bundle/chunks/{history-repair-RGAQBOIS.js → history-repair-ROV5TD3L.js} +8 -8
- package/dist/cli-bundle/chunks/learnings-25TJCVON.js +13 -0
- package/dist/cli-bundle/chunks/{learnings-VDRTXWTF.js → learnings-3WJFJT7E.js} +7 -7
- package/dist/cli-bundle/chunks/{notes-UXXTI3J5.js → notes-FM53JJ5C.js} +7 -7
- package/dist/cli-bundle/chunks/notes-IAHGNCYQ.js +13 -0
- package/dist/cli-bundle/chunks/{plan-H3OPE2RP.js → plan-EJ4USP2S.js} +10 -10
- package/dist/cli-bundle/chunks/plan-WHV4H2RW.js +24 -0
- package/dist/cli-bundle/chunks/{profile-PFNN3CBJ.js → profile-SZQVKHUQ.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-FCZWT5LE.js → profile-TXE673DR.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-BGEGWQ6S.js → register-list-query-LSR2G2SJ.js} +16 -16
- package/dist/cli-bundle/chunks/{register-list-query-BGEGWQ6S.js.map → register-list-query-LSR2G2SJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-list-query-ODDZVR6N.js → register-list-query-S6I73L5W.js} +15 -15
- package/dist/cli-bundle/chunks/{register-list-query-ODDZVR6N.js.map → register-list-query-S6I73L5W.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-OAJXSNWK.js → register-mutation-77GYER52.js} +32 -32
- package/dist/cli-bundle/chunks/{register-mutation-OAJXSNWK.js.map → register-mutation-77GYER52.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-2APBEHTJ.js → register-mutation-A2SC3K5G.js} +31 -31
- package/dist/cli-bundle/chunks/{register-mutation-2APBEHTJ.js.map → register-mutation-A2SC3K5G.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-operations-3TYKCKEZ.js → register-operations-KSAIBSZH.js} +43 -33
- package/dist/cli-bundle/chunks/register-operations-KSAIBSZH.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-WKZSX4QP.js → register-operations-W6Z5LVI5.js} +42 -32
- package/dist/cli-bundle/chunks/register-operations-W6Z5LVI5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-HSVJDV3R.js → register-setup-KB5U3RES.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-KE5L3H7U.js → register-setup-ZG7YXPHJ.js} +15 -15
- package/dist/cli-bundle/chunks/{restore-MDNVYUDD.js → restore-F5HPTRBR.js} +6 -6
- package/dist/cli-bundle/chunks/restore-LN57EB5H.js +14 -0
- package/dist/cli-bundle/chunks/{schema-AJCAANMB.js → schema-3DKXA4KR.js} +6 -6
- package/dist/cli-bundle/chunks/{schema-2B37DMM2.js → schema-QLTOK23S.js} +6 -6
- package/dist/cli-bundle/chunks/update-2T5EWMXD.js +21 -0
- package/dist/cli-bundle/chunks/{update-ZCDGTSNL.js → update-IKMNH3W4.js} +12 -12
- package/dist/cli-bundle/chunks/{update-many-6E2DDBE4.js → update-many-3Q6Z2Q4Y.js} +19 -19
- package/dist/cli-bundle/chunks/update-many-OTAS4BWH.js +30 -0
- package/dist/cli-bundle/main.js +75 -20
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +63 -52
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +63 -54
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/extensions/item-fields.js +3 -3
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +29 -20
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/schema/fields-file.js +5 -3
- package/dist/core/schema/fields-file.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +12 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +14 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +18 -6
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/index.d.ts +3 -1
- package/dist/sdk/index.js +4 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +51 -1
- package/dist/sdk/runtime.js +91 -4
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/workspace.d.ts +15 -0
- package/dist/sdk/workspace.js +50 -0
- package/dist/sdk/workspace.js.map +1 -0
- package/docs/AGENT_GUIDE.md +1 -0
- package/docs/CHATGPT_CODEX_PLUGIN_IMPLEMENTATION.md +775 -0
- package/docs/CODEX_PLUGIN.md +11 -1
- package/docs/COMMANDS.md +3 -1
- package/docs/README.md +3 -0
- package/docs/SDK.md +204 -71
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +3 -0
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +3 -0
- package/packages/pm-todos/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli-bundle/chunks/append-425YGJMY.js +0 -11
- package/dist/cli-bundle/chunks/chunk-A3AIKEYC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-C4FIA5U6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CTAPVM6C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GPBKJERW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GZNB5V5J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KDNZSVCK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LIY2ILWI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MORRAQXQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OJ64VYGO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RAC2UXLT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ROH64TST.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WQ5227PH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XQLLRYOX.js.map +0 -1
- package/dist/cli-bundle/chunks/close-II7JKV32.js +0 -12
- package/dist/cli-bundle/chunks/close-many-FD46X4WK.js +0 -21
- package/dist/cli-bundle/chunks/comments-OAU2E7RK.js +0 -13
- package/dist/cli-bundle/chunks/copy-5MOERABQ.js +0 -9
- package/dist/cli-bundle/chunks/create-DOMKSBHN.js +0 -25
- package/dist/cli-bundle/chunks/delete-BMOQWZRQ.js +0 -10
- package/dist/cli-bundle/chunks/docs-J4OI4PWM.js +0 -14
- package/dist/cli-bundle/chunks/focus-7H5B4PKZ.js +0 -10
- package/dist/cli-bundle/chunks/history-redact-ZNS2QTMI.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-LQ5IU4ZX.js +0 -18
- package/dist/cli-bundle/chunks/learnings-AHMJNIQZ.js +0 -13
- package/dist/cli-bundle/chunks/notes-GJI26GJR.js +0 -13
- package/dist/cli-bundle/chunks/plan-ZHJH6VMF.js +0 -24
- package/dist/cli-bundle/chunks/register-operations-3TYKCKEZ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-WKZSX4QP.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-AR77QSO6.js +0 -14
- package/dist/cli-bundle/chunks/update-D3ZZ2V7Z.js +0 -21
- package/dist/cli-bundle/chunks/update-many-2Q2PRSSB.js +0 -30
- /package/dist/cli-bundle/chunks/{append-425YGJMY.js.map → append-RH3G5RAV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-464PHZ65.js.map → append-T5DTS4NU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YMP6AKGU.js.map → chunk-2XWRFOPR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HT5P3WC6.js.map → chunk-2Z36LSAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DBV6QRYT.js.map → chunk-3KJ3FG5O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AQLKMQQA.js.map → chunk-3M5BWYUA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-47CCRGRH.js.map → chunk-47TKJR3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YCSDMIQW.js.map → chunk-4MO4PPR2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WCRAUCJO.js.map → chunk-546WPG33.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RLOWK5EQ.js.map → chunk-5754C5XS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7U5INZ2C.js.map → chunk-5V746BN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZLQDOBZL.js.map → chunk-6OK5QSGH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2HNZKLHV.js.map → chunk-7SHFQB2A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6APTSPP5.js.map → chunk-7SIWW7C3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7HQQT6AT.js.map → chunk-7TYZTBEV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YCHJLOO2.js.map → chunk-A6AK7W5M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WBKZAO3P.js.map → chunk-A6AVSYRJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L7C6RTGH.js.map → chunk-ACDIA6NP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AX3BJLPV.js.map → chunk-ACRC3HI4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B6JBI7JX.js.map → chunk-ANLHBXAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2KQG6L3J.js.map → chunk-AS62PEJE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-J3EXRK2H.js.map → chunk-BLRO2POO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VOXOXART.js.map → chunk-DLZ3RXAL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H6YDNW46.js.map → chunk-DNH44IKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QI5KTH6A.js.map → chunk-EBBROE54.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GC5ME4ZU.js.map → chunk-FF523THY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5OBMSBWX.js.map → chunk-FIZUJWXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HLBSL5KE.js.map → chunk-FVWQFTTW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YIWYD7TC.js.map → chunk-FVZEIWTL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4DC5XNMS.js.map → chunk-GFBV2254.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OKZ35F3Y.js.map → chunk-GRB3TFOC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZFULSN4.js.map → chunk-GVGFLZQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RTG2LHQ7.js.map → chunk-HLZXQKGZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5F7UJHFY.js.map → chunk-HO6CDURZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MN2YMU55.js.map → chunk-HOE3UV3G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I535LTZ2.js.map → chunk-IS6M4ETF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K7HEURQ4.js.map → chunk-J2XEW4YL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-O2Q7YQGO.js.map → chunk-J7XSQCJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RA2LPP6E.js.map → chunk-JM4Z53DN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JR6FIX53.js.map → chunk-JNNPTGXR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I5VZGPS2.js.map → chunk-K7CGOZK5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B6OANV3G.js.map → chunk-KDH62ECD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NR7PTIR7.js.map → chunk-L23NAJHL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FCZ6WYSR.js.map → chunk-LEXFDABF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GP54I36Z.js.map → chunk-LNAGQRIL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DD2WZD6L.js.map → chunk-LU4Z7POS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FEVEIX53.js.map → chunk-LX265XY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NJABR6EB.js.map → chunk-MQAGSAMS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MRMS62WQ.js.map → chunk-N4NKVLPY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RY57ESL2.js.map → chunk-ND3MDD6L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y476SA4V.js.map → chunk-NEJKKTCG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q3EW4RE5.js.map → chunk-NGL3X3XM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ENJDRDDP.js.map → chunk-NK54BSL7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KHQYX2QB.js.map → chunk-NN57FRRN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VNCQ7SSG.js.map → chunk-NNRXTZ7Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KZQHMDS6.js.map → chunk-NOIIRLCO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K2PDZYUF.js.map → chunk-OC2CLNMS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SN7Q7M4U.js.map → chunk-OKUFGORG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZLWBLI5R.js.map → chunk-OOK6V7BF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DDEYJ3BH.js.map → chunk-OUQ4I6HC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X7ZXLB3C.js.map → chunk-PDOJRPYR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HDNEQAHV.js.map → chunk-PHQPQNAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FMFSUTTD.js.map → chunk-PTJ7NVUU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5URFS7C4.js.map → chunk-PUMGO764.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RPZ57GQ7.js.map → chunk-QFCCN4JO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-35YNX7RQ.js.map → chunk-QYIDXRRX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ITIUEWD5.js.map → chunk-RFDT674H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2BUNV627.js.map → chunk-SJ2DADDH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZYDUOY54.js.map → chunk-TKD4NESJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BU2CV5ZU.js.map → chunk-TMNQV4EK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJNBKU6G.js.map → chunk-TWELUDDF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y5E6FCAL.js.map → chunk-U3S22BOJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2BKRMFGK.js.map → chunk-UFY4ETU6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EEUIIDWF.js.map → chunk-UGQENMKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XK5CTXMB.js.map → chunk-UGSHP6SR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2JWIRG4V.js.map → chunk-VF24O6TV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PZBRTJ3Y.js.map → chunk-VLVTXEGG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NAGOH4YJ.js.map → chunk-VXUWCJS7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ETGRUM64.js.map → chunk-WBMARQCV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L6C62S4V.js.map → chunk-WZDABROA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P63GUQK5.js.map → chunk-XG5GVZRX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6UWHAJEX.js.map → chunk-XGCPTS6L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XGUXU4IQ.js.map → chunk-Y44B5FBE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-C3QR2DPR.js.map → chunk-YP6DWEWQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TB6364F7.js.map → chunk-Z7XTVIN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XSJZF3TO.js.map → chunk-ZEKVLV6P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SNFLSFFH.js.map → chunk-ZFPOBSPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RYASC6U3.js.map → chunk-ZUB725AA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-A77IGXNC.js.map → close-CQHW3WMK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-II7JKV32.js.map → close-ZZW5FLTB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-P2YOWN52.js.map → close-many-AR2YH3SJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-FD46X4WK.js.map → close-many-IKCEGBLQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-OAU2E7RK.js.map → comments-NV4SIY5Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-FNLKE3TW.js.map → comments-UV4HMI2K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-U6H22S7E.js.map → copy-OUFWOHVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-5MOERABQ.js.map → copy-X7HJFWIH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-HS64DHTL.js.map → create-QEDL4KKT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-DOMKSBHN.js.map → create-R6MMMMJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-4XPF5XLP.js.map → delete-MJGZFDHZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-BMOQWZRQ.js.map → delete-OOJRG4HF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-TMOF765V.js.map → deps-4OP6Q76N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-R44LVZTU.js.map → deps-Y5X6NFT5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-J4OI4PWM.js.map → docs-SILTBWSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-HN6QKGEU.js.map → docs-UKTQVUHS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-RNFWG435.js.map → files-2QEI2V3C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-NX4LNOPL.js.map → files-7OIKZPI3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-7H5B4PKZ.js.map → focus-3YC5LFCG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-OBSDVVI7.js.map → focus-FFWH32BF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-RZMMFSTO.js.map → history-compact-AAA4W6LY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-CKNRN637.js.map → history-compact-PIURAPW5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-ZNS2QTMI.js.map → history-redact-KWZ7LKQB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-W7TTAEX2.js.map → history-redact-NTO74EIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-LQ5IU4ZX.js.map → history-repair-QWZJYYOJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-RGAQBOIS.js.map → history-repair-ROV5TD3L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-AHMJNIQZ.js.map → learnings-25TJCVON.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-VDRTXWTF.js.map → learnings-3WJFJT7E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-UXXTI3J5.js.map → notes-FM53JJ5C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-GJI26GJR.js.map → notes-IAHGNCYQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-H3OPE2RP.js.map → plan-EJ4USP2S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-ZHJH6VMF.js.map → plan-WHV4H2RW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-PFNN3CBJ.js.map → profile-SZQVKHUQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-FCZWT5LE.js.map → profile-TXE673DR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-HSVJDV3R.js.map → register-setup-KB5U3RES.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-KE5L3H7U.js.map → register-setup-ZG7YXPHJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-MDNVYUDD.js.map → restore-F5HPTRBR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-AR77QSO6.js.map → restore-LN57EB5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-AJCAANMB.js.map → schema-3DKXA4KR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-2B37DMM2.js.map → schema-QLTOK23S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-D3ZZ2V7Z.js.map → update-2T5EWMXD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-ZCDGTSNL.js.map → update-IKMNH3W4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-6E2DDBE4.js.map → update-many-3Q6Z2Q4Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-2Q2PRSSB.js.map → update-many-OTAS4BWH.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
nowIso,
|
|
3
3
|
readSettings,
|
|
4
4
|
writeSettings
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NEJKKTCG.js";
|
|
6
6
|
import {
|
|
7
7
|
EXIT_CODE,
|
|
8
8
|
appendLineAtomic,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolvePmPackageRootFromModule,
|
|
12
12
|
resolveTelemetryErrorCategory,
|
|
13
13
|
writeFileAtomic
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-66YL6RR5.js";
|
|
15
15
|
|
|
16
16
|
// dist/core/telemetry/observability.js
|
|
17
17
|
!(function() {
|
|
@@ -1840,4 +1840,4 @@ export {
|
|
|
1840
1840
|
finishTelemetryCommand,
|
|
1841
1841
|
emitTelemetryErrorEvent
|
|
1842
1842
|
};
|
|
1843
|
-
//# sourceMappingURL=chunk-
|
|
1843
|
+
//# sourceMappingURL=chunk-UFY4ETU6.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
BUILTIN_ITEM_TYPE_VALUES,
|
|
5
5
|
toDefaultFolder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AHIEDSW2.js";
|
|
7
7
|
|
|
8
8
|
// dist/core/schema/item-types-file.js
|
|
9
9
|
var BUILTIN_NAME_LOOKUP = new Map(BUILTIN_ITEM_TYPE_VALUES.map((name) => [name.toLowerCase(), name]));
|
|
@@ -258,6 +258,6 @@ export {
|
|
|
258
258
|
buildInvalidTypeHint,
|
|
259
259
|
buildInvalidTypeError
|
|
260
260
|
};
|
|
261
|
-
//# sourceMappingURL=chunk-
|
|
261
|
+
//# sourceMappingURL=chunk-UGQENMKM.js.map
|
|
262
262
|
|
|
263
263
|
//# debugId=74723401-1f8b-51b4-ab46-a5cd94e0f9f2
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lintProjectProfile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MQAGSAMS.js";
|
|
4
4
|
import {
|
|
5
5
|
describeExtensionActivation,
|
|
6
6
|
renderExtensionSurfaceMarkdown
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HLZXQKGZ.js";
|
|
8
8
|
import {
|
|
9
9
|
getMigrationRuntimeDefinition,
|
|
10
10
|
resolveRegisteredSearchProvider,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
runPreflightOverride,
|
|
35
35
|
runRendererOverride,
|
|
36
36
|
runServiceOverride
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-66YL6RR5.js";
|
|
38
38
|
|
|
39
39
|
// dist/sdk/compose.js
|
|
40
40
|
!(function() {
|
|
@@ -1466,4 +1466,4 @@ export {
|
|
|
1466
1466
|
assertExtensionPreflight,
|
|
1467
1467
|
createExtensionTestHarness
|
|
1468
1468
|
};
|
|
1469
|
-
//# sourceMappingURL=chunk-
|
|
1469
|
+
//# sourceMappingURL=chunk-UGSHP6SR.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
replayToCanonicalItemDocument,
|
|
12
12
|
replayToItemDocument,
|
|
13
13
|
toReplayDocument
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VLVTXEGG.js";
|
|
15
15
|
import {
|
|
16
16
|
acquireLock,
|
|
17
17
|
appendHistoryEntry,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
recordAfterCommandAffectedItem,
|
|
30
30
|
runActiveOnWriteHooks,
|
|
31
31
|
serializeItemDocument
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-VXUWCJS7.js";
|
|
33
33
|
import {
|
|
34
34
|
EXIT_CODE,
|
|
35
35
|
PmCliError,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
resolveItemTypeRegistry,
|
|
42
42
|
resolvePmRoot,
|
|
43
43
|
writeFileAtomic
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-AHIEDSW2.js";
|
|
45
45
|
|
|
46
46
|
// dist/cli/commands/restore.js
|
|
47
47
|
import jsonPatch from "fast-json-patch";
|
|
@@ -430,6 +430,6 @@ export {
|
|
|
430
430
|
runRestore,
|
|
431
431
|
_testOnlyRestoreCommand
|
|
432
432
|
};
|
|
433
|
-
//# sourceMappingURL=chunk-
|
|
433
|
+
//# sourceMappingURL=chunk-VF24O6TV.js.map
|
|
434
434
|
|
|
435
435
|
//# debugId=701daeac-8fa6-5e75-a66b-cfdc07d4d662
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b525e367-f809-566c-9b93-89cbc179f36f")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
parseLimit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LEXFDABF.js";
|
|
6
6
|
import {
|
|
7
7
|
canonicalDocument,
|
|
8
8
|
enforceHistoryStreamPolicyForItem,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
sha256Hex,
|
|
20
20
|
stableStringify,
|
|
21
21
|
toItemRecord
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VXUWCJS7.js";
|
|
23
23
|
import {
|
|
24
24
|
EXIT_CODE,
|
|
25
25
|
FRONT_MATTER_KEY_ORDER,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
readFileIfExists,
|
|
31
31
|
resolveItemTypeRegistry,
|
|
32
32
|
resolvePmRoot
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AHIEDSW2.js";
|
|
34
34
|
|
|
35
35
|
// dist/core/history/replay.js
|
|
36
36
|
import jsonPatch from "fast-json-patch";
|
|
@@ -492,6 +492,6 @@ export {
|
|
|
492
492
|
readHistoryEntries,
|
|
493
493
|
runHistory
|
|
494
494
|
};
|
|
495
|
-
//# sourceMappingURL=chunk-
|
|
495
|
+
//# sourceMappingURL=chunk-VLVTXEGG.js.map
|
|
496
496
|
|
|
497
497
|
//# debugId=b525e367-f809-566c-9b93-89cbc179f36f
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeAddTypeInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L23NAJHL.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_RUNTIME_STATUS_DEFINITIONS,
|
|
6
|
+
FRONT_MATTER_KEY_ORDER,
|
|
6
7
|
RUNTIME_FIELD_COMMAND_VALUES,
|
|
7
8
|
RUNTIME_FIELD_TYPE_VALUES,
|
|
8
9
|
RUNTIME_STATUS_ROLE_VALUES,
|
|
9
10
|
evictOldestMemoEntries
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-66YL6RR5.js";
|
|
11
12
|
|
|
12
13
|
// dist/core/schema/status-defs-file.js
|
|
13
14
|
!(function() {
|
|
@@ -209,13 +210,14 @@ function assertStatusTokensAvailable(input, resolvedAliasToId) {
|
|
|
209
210
|
!(function() {
|
|
210
211
|
try {
|
|
211
212
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
212
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
213
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5b67948f-d13c-52e4-8e6a-6ba23768d589");
|
|
213
214
|
} catch (e2) {
|
|
214
215
|
}
|
|
215
216
|
})();
|
|
216
217
|
var RUNTIME_FIELD_TYPE_SET = new Set(RUNTIME_FIELD_TYPE_VALUES);
|
|
217
218
|
var RUNTIME_FIELD_COMMAND_SET = new Set(RUNTIME_FIELD_COMMAND_VALUES);
|
|
218
219
|
var BUILTIN_FIELD_KEYS = /* @__PURE__ */ new Set([
|
|
220
|
+
...FRONT_MATTER_KEY_ORDER.filter((key) => key !== "severity"),
|
|
219
221
|
"id",
|
|
220
222
|
"title",
|
|
221
223
|
"type",
|
|
@@ -299,7 +301,7 @@ function normalizeAddFieldInput(raw) {
|
|
|
299
301
|
throw new Error("Field key must not be empty.");
|
|
300
302
|
}
|
|
301
303
|
if (BUILTIN_FIELD_KEYS.has(key)) {
|
|
302
|
-
throw new Error(`Cannot define custom field "${key}":
|
|
304
|
+
throw new Error(`Cannot define custom field "${key}": custom schema field "${key}" collides with built-in item metadata "${key}". Rename the custom field with a project-specific prefix. Reserved fields: ${[...BUILTIN_FIELD_KEYS].sort((left, right) => left.localeCompare(right)).join(", ")}.`);
|
|
303
305
|
}
|
|
304
306
|
const typeCandidate = typeof raw.type === "string" && raw.type.trim().length > 0 ? raw.type.trim().toLowerCase() : "string";
|
|
305
307
|
if (!RUNTIME_FIELD_TYPE_SET.has(typeCandidate)) {
|
|
@@ -545,4 +547,4 @@ export {
|
|
|
545
547
|
normalizeTypePresetName,
|
|
546
548
|
resolveTypePresetDefinitions
|
|
547
549
|
};
|
|
548
|
-
//# sourceMappingURL=chunk-
|
|
550
|
+
//# sourceMappingURL=chunk-VMGK6ESD.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../core/schema/status-defs-file.ts", "../../../../../../../../core/schema/fields-file.ts", "../../../../../../../../core/schema/type-presets.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module core/schema/status-defs-file\n *\n * Resolves configurable schema, fields, statuses, and workflows for Status Defs File.\n */\nimport { RUNTIME_STATUS_ROLE_VALUES } from \"../../types/index.js\";\nimport type {\n RuntimeStatusDefinition,\n RuntimeStatusRole,\n} from \"../../types/index.js\";\nimport { DEFAULT_RUNTIME_STATUS_DEFINITIONS } from \"./runtime-schema.js\";\nimport { evictOldestMemoEntries } from \"../shared/memo.js\";\n\nexport type {\n RuntimeStatusDefinition,\n RuntimeStatusRole,\n} from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-status` / `pm schema remove-status`\n * commands. The CLI command file (schema.ts) owns IO/governance; everything\n * testable and side-effect-free lives here so it can be coverage-gated to 100%.\n *\n * Statuses persist at `.agents/pm/schema/statuses.json` under the shape\n * `{ statuses: RuntimeStatusDefinition[] }`. When the file is absent the runtime\n * merge layer (src/core/store/settings.ts) still supplies the built-in defaults\n * from DEFAULT_RUNTIME_STATUS_DEFINITIONS, so this module never duplicates them\n * into the persisted file.\n */\n\nconst RUNTIME_STATUS_ROLE_SET = new Set<string>(RUNTIME_STATUS_ROLE_VALUES);\n\n/**\n * Memo for {@link normalizeStatusToken}. Status ranking inside sort comparators\n * normalizes the same handful of status strings O(n log n) times per corpus scan, and\n * the trim/lowercase/regex pipeline shows up in list/next/context profiles. The cap\n * bounds memory in long-lived hosts against unbounded arbitrary inputs; half-eviction keeps the\n * newest-inserted half when the cap is hit. Declared before\n * BUILTIN_STATUS_IDS, whose module-level initializer already normalizes tokens.\n */\nconst STATUS_TOKEN_MEMO_MAX_ENTRIES = 2_000;\nconst statusTokenMemo = new Map<string, string>();\n\n/** The 5 lifecycle status ids that ship as built-in defaults and may never be removed (their normalized ids match DEFAULT_RUNTIME_STATUS_DEFINITIONS: open/in_progress/blocked/closed/canceled). `draft` is also a default but the acceptance criteria enumerate the 5 terminal/active ids explicitly, so the guard derives the full set from the canonical defaults to stay in sync. */\nexport const BUILTIN_STATUS_IDS: ReadonlySet<string> = new Set(\n DEFAULT_RUNTIME_STATUS_DEFINITIONS.map((definition) =>\n normalizeStatusToken(definition.id),\n ).filter((id) => id.length > 0),\n);\n\n/** The shape persisted at `.agents/pm/schema/statuses.json`. */\nexport interface StatusDefsFile {\n /** Value that configures or reports statuses for this contract. */\n statuses: RuntimeStatusDefinition[];\n}\n\n/** Documents the raw add status input payload exchanged by command, SDK, and package integrations. */\nexport interface RawAddStatusInput {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string | undefined;\n /** Value that configures or reports roles for this contract. */\n roles?: string[];\n /** Value that configures or reports aliases for this contract. */\n aliases?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports order for this contract. */\n order?: number;\n}\n\n/** Documents the normalized add status input payload exchanged by command, SDK, and package integrations. */\nexport interface NormalizedAddStatusInput {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Normalized roles, or `undefined` when the raw input did not supply a roles field at all. `undefined` means \"leave existing roles untouched\" on upsert; an explicit empty array means \"clear roles\". This distinction is what keeps `add-status review --description x` from wiping a previously-set role. */\n roles?: RuntimeStatusRole[];\n /** Same omitted-vs-explicit-empty semantics as `roles`. */\n aliases?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports order for this contract. */\n order?: number;\n}\n\n/** Documents the upsert status def result payload exchanged by command, SDK, and package integrations. */\nexport interface UpsertStatusDefResult {\n /** Value that configures or reports file for this contract. */\n file: StatusDefsFile;\n /** The definition as stored after the upsert (existing fields preserved). */\n definition: RuntimeStatusDefinition;\n /** True when an existing definition with the same (normalized) id was replaced. */\n replaced: boolean;\n}\n\n/** Documents the remove status def result payload exchanged by command, SDK, and package integrations. */\nexport interface RemoveStatusDefResult {\n /** Value that configures or reports file for this contract. */\n file: StatusDefsFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched the requested id. */\n definition?: RuntimeStatusDefinition;\n}\n\n/** Normalizes a status token using the same rules as runtime-schema.ts: lowercase and collapse any run of whitespace/hyphens into a single underscore. */\nexport function normalizeStatusToken(value: unknown): string {\n if (typeof value !== \"string\") {\n return \"\";\n }\n const memoized = statusTokenMemo.get(value);\n if (memoized !== undefined) {\n return memoized;\n }\n const normalized = value\n .trim()\n .toLowerCase()\n .replaceAll(/[\\s-]+/g, \"_\");\n if (statusTokenMemo.size >= STATUS_TOKEN_MEMO_MAX_ENTRIES) {\n evictOldestMemoEntries(statusTokenMemo);\n }\n statusTokenMemo.set(value, normalized);\n return normalized;\n}\n\nfunction dedupeTokens(values: Iterable<string>): string[] {\n const seen = new Set<string>();\n for (const value of values) {\n const token = normalizeStatusToken(value);\n if (token.length > 0) {\n seen.add(token);\n }\n }\n return [...seen].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Validates and normalizes raw add-status CLI input. Throws a plain Error with a\n * stable message when the id is missing/empty or a role is not one of\n * RUNTIME_STATUS_ROLE_VALUES; the CLI layer maps these to PmCliError exit codes.\n *\n * Omitted vs explicit-empty is preserved end-to-end: when `raw.roles`/`raw.aliases`\n * is `undefined` (flag not supplied) the normalized field is `undefined` so the\n * upsert leaves the existing value untouched; when supplied (even an empty array)\n * the field is normalized to an array so the upsert can apply an explicit clear.\n */\nexport function normalizeAddStatusInput(\n raw: RawAddStatusInput,\n): NormalizedAddStatusInput {\n const id = normalizeStatusToken(raw.id);\n if (id.length === 0) {\n throw new Error(\"Status id must not be empty.\");\n }\n // Built-in lifecycle statuses are reserved and cannot be overridden: an\n // add-status override would change reserved metadata yet remove-status refuses\n // to delete a built-in id, leaving no CLI path to undo it. Reject up front,\n // symmetric with removeStatusDef.\n if (BUILTIN_STATUS_IDS.has(id)) {\n throw new Error(\n `Cannot add-status the built-in status \"${id}\". Built-in statuses are reserved: ${[...BUILTIN_STATUS_IDS].join(\", \")}.`,\n );\n }\n let roles: RuntimeStatusRole[] | undefined;\n if (raw.roles !== undefined) {\n roles = [];\n const seenRoles = new Set<string>();\n for (const rawRole of raw.roles) {\n const role =\n typeof rawRole === \"string\" ? rawRole.trim().toLowerCase() : \"\";\n if (role.length === 0) {\n continue;\n }\n if (!RUNTIME_STATUS_ROLE_SET.has(role)) {\n throw new Error(\n `Invalid status role \"${rawRole}\". Allowed roles: ${RUNTIME_STATUS_ROLE_VALUES.join(\", \")}.`,\n );\n }\n if (!seenRoles.has(role)) {\n seenRoles.add(role);\n roles.push(role as RuntimeStatusRole);\n }\n }\n }\n const aliases =\n raw.aliases === undefined\n ? undefined\n : dedupeTokens(raw.aliases).filter((alias) => alias !== id);\n const description = raw.description?.trim();\n const order =\n typeof raw.order === \"number\" && Number.isFinite(raw.order)\n ? Math.trunc(raw.order)\n : undefined;\n return {\n id,\n roles,\n aliases,\n description:\n description && description.length > 0 ? description : undefined,\n order,\n };\n}\n\nfunction selectStatusesArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.statuses)) {\n return record.statuses;\n }\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n return undefined;\n}\n\nfunction extractStatusDefinitions(parsed: unknown): RuntimeStatusDefinition[] {\n const candidate = selectStatusesArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: RuntimeStatusDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.id !== \"string\" || record.id.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as RuntimeStatusDefinition);\n }\n return definitions;\n}\n\n/** Coerces an arbitrary parsed value from statuses.json into a StatusDefsFile. Accepts the canonical `{ statuses: [...] }` shape, a bare array of definitions, or a `{ definitions: [...] }` form, and tolerates a missing/invalid file by returning an empty statuses list. */\nexport function parseStatusDefsFile(\n raw: string | null | undefined,\n): StatusDefsFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { statuses: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/statuses.json contains invalid JSON.\");\n }\n return { statuses: extractStatusDefinitions(parsed) };\n}\n\n/** Serializes the status definitions file with a trailing newline (matches the rest of the schema scaffold files written by pm). */\nexport function serializeStatusDefsFile(file: StatusDefsFile): string {\n return `${JSON.stringify({ statuses: file.statuses }, null, 2)}\\n`;\n}\n\n/** Idempotent UPSERT of a status definition into the parsed file. Matching is by normalized id. When a definition already exists, fields supplied in `input` override the previous values (roles/aliases replace when a non-empty array is given, clear when an explicit empty array is given, and are left UNTOUCHED when the field is `undefined` — i.e. the add-status flag was omitted); description/order override when provided. Fields not addressed by add-status flags are preserved untouched, so `add-status <id> --description x` keeps any previously-set roles/aliases. */\nexport function upsertStatusDef(\n file: StatusDefsFile,\n input: NormalizedAddStatusInput,\n baseDefinition?: RuntimeStatusDefinition,\n): UpsertStatusDefResult {\n const statuses = file.statuses.slice();\n const existingIndex = statuses.findIndex(\n (definition) => normalizeStatusToken(definition.id) === input.id,\n );\n // A file-backed definition is the primary seed; when the status is not yet in\n // statuses.json fall back to `baseDefinition` (the resolved settings-backed\n // definition) so omitting --role/--alias preserves metadata that lives in\n // settings.schema.statuses rather than the file.\n const existing =\n existingIndex >= 0 ? statuses[existingIndex] : baseDefinition;\n\n const next: RuntimeStatusDefinition = {\n ...existing,\n id: input.id,\n };\n if (input.roles !== undefined) {\n if (input.roles.length > 0) {\n next.roles = [...input.roles];\n } else if (next.roles !== undefined) {\n delete next.roles;\n }\n }\n if (input.aliases !== undefined) {\n if (input.aliases.length > 0) {\n next.aliases = [...input.aliases];\n } else if (next.aliases !== undefined) {\n delete next.aliases;\n }\n }\n if (input.description !== undefined) {\n next.description = input.description;\n }\n if (input.order !== undefined) {\n next.order = input.order;\n }\n\n if (existingIndex >= 0) {\n statuses[existingIndex] = next;\n } else {\n statuses.push(next);\n }\n\n return {\n file: { statuses },\n definition: next,\n // \"replaced\" reflects whether the status already existed effectively (in the\n // file OR in resolved settings), so the CLI reports \"Updated\" vs \"Registered\"\n // correctly even when the prior definition lived only in settings.\n replaced: existing !== undefined,\n };\n}\n\n/** Removes a status definition from the parsed file by id (normalized). Throws a plain Error when `id` is empty or matches a reserved built-in default status (those are never stored in the file and must never be deletable). Returns `removed: false` when no matching definition exists so the CLI layer can treat the call as an idempotent no-op. */\nexport function removeStatusDef(\n file: StatusDefsFile,\n id: string | undefined,\n): RemoveStatusDefResult {\n const normalizedId = normalizeStatusToken(id);\n if (normalizedId.length === 0) {\n throw new Error(\"Status id must not be empty.\");\n }\n if (BUILTIN_STATUS_IDS.has(normalizedId)) {\n throw new Error(\n `Cannot remove built-in status \"${normalizedId}\". Built-in statuses are reserved: ${[...BUILTIN_STATUS_IDS].join(\", \")}.`,\n );\n }\n const statuses = file.statuses.slice();\n const existingIndex = statuses.findIndex(\n (definition) => normalizeStatusToken(definition.id) === normalizedId,\n );\n if (existingIndex < 0) {\n return { file: { statuses }, removed: false };\n }\n const [definition] = statuses.splice(existingIndex, 1);\n return { file: { statuses }, removed: true, definition };\n}\n\n/** Throws when the new status id or any explicitly-supplied alias collides with a DIFFERENT existing status's id/alias. `resolvedAliasToId` maps a normalized token to its owning status id (the runtime status registry's alias_to_id map, which stores ids and aliases in one namespace). Re-adding the same status (matching id) is allowed — only cross-status collisions throw. This prevents a custom status from shadowing a built-in lifecycle token (for example `add-status review --alias open`, or a custom id `cancelled` that aliases the built-in `canceled`), which would make `pm update --status open` resolve to the wrong status. The CLI layer maps the thrown Error to a USAGE exit code. */\nexport function assertStatusTokensAvailable(\n input: { id: string; aliases?: string[] },\n resolvedAliasToId: ReadonlyMap<string, string>,\n): void {\n const candidates = [input.id, ...(input.aliases ?? [])];\n for (const candidate of candidates) {\n const token = normalizeStatusToken(candidate);\n if (token.length === 0) {\n continue;\n }\n const owner = resolvedAliasToId.get(token);\n if (owner !== undefined && owner !== input.id) {\n throw new Error(\n `Status token \"${token}\" already belongs to status \"${owner}\". Choose a different id/alias to avoid shadowing it.`,\n );\n }\n }\n}\n", "/**\n * @module core/schema/fields-file\n *\n * Resolves configurable schema, fields, statuses, and workflows for Fields File.\n */\nimport {\n RUNTIME_FIELD_COMMAND_VALUES,\n RUNTIME_FIELD_TYPE_VALUES,\n} from \"../../types/index.js\";\nimport type {\n RuntimeFieldCommand,\n RuntimeFieldDefinition,\n RuntimeFieldType,\n} from \"../../types/index.js\";\n\nexport type {\n RuntimeFieldCommand,\n RuntimeFieldDefinition,\n RuntimeFieldType,\n} from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-field` / `pm schema remove-field` commands\n * and the `list-fields` / `show-field` inspectors. The CLI command file\n * (schema.ts) owns IO/governance; everything testable and side-effect-free lives\n * here so it can be coverage-gated to 100%.\n *\n * Custom fields persist at `.agents/pm/schema/fields.json` under the shape\n * `{ fields: RuntimeFieldDefinition[] }`. The runtime merge layer\n * (loadRuntimeSchemaFromOptionalFiles) reads that file and dynamically registers\n * a CLI flag per field on create/update/list/search/context, so this module only\n * has to manage the persisted entries; it never duplicates the registration.\n */\n\nconst RUNTIME_FIELD_TYPE_SET = new Set<string>(RUNTIME_FIELD_TYPE_VALUES);\nconst RUNTIME_FIELD_COMMAND_SET = new Set<string>(RUNTIME_FIELD_COMMAND_VALUES);\n\n/** Built-in front-matter field names a custom field key must never shadow. A custom key that collides with one of these would let `pm create --<key>` write over reserved metadata, so add-field rejects them up front (symmetric with the built-in-type guard in item-types-file.ts). */\nexport const BUILTIN_FIELD_KEYS: ReadonlySet<string> = new Set([\n \"id\",\n \"title\",\n \"type\",\n \"status\",\n \"priority\",\n \"tags\",\n \"assignee\",\n \"parent\",\n \"description\",\n \"body\",\n \"created_at\",\n \"updated_at\",\n \"closed_at\",\n \"author\",\n \"deadline\",\n \"estimate\",\n \"sprint\",\n \"release\",\n \"risk\",\n \"confidence\",\n \"reviewer\",\n \"resolution\",\n \"expected\",\n \"actual\",\n]);\n\n/** The default commands a field is wired onto when `--commands` is omitted, matching the runtime default in runtime-schema.ts (normalizeRuntimeFieldDefinition). */\nconst DEFAULT_FIELD_COMMANDS: RuntimeFieldCommand[] = [\"create\", \"update\"];\n\n/** The shape persisted at `.agents/pm/schema/fields.json`. */\nexport interface FieldsFile {\n /** Value that configures or reports fields for this contract. */\n fields: RuntimeFieldDefinition[];\n}\n\n/** Documents the raw add field input payload exchanged by command, SDK, and package integrations. */\nexport interface RawAddFieldInput {\n /** Value that configures or reports key for this contract. */\n key: string | undefined;\n /** Schema type that determines the shape and validation rules for this value. */\n type?: string;\n /** Value that configures or reports commands for this contract. */\n commands?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports cli flag for this contract. */\n cliFlag?: string;\n /** Value that configures or reports aliases for this contract. */\n aliases?: string[];\n /** Value that configures or reports required for this contract. */\n required?: boolean;\n /** Value that configures or reports required on create for this contract. */\n requiredOnCreate?: boolean;\n /** Value that configures or reports allow unset for this contract. */\n allowUnset?: boolean;\n /** Value that configures or reports required types for this contract. */\n requiredTypes?: string[];\n}\n\n/** Documents the normalized add field input payload exchanged by command, SDK, and package integrations. */\nexport interface NormalizedAddFieldInput {\n /** Value that configures or reports key for this contract. */\n key: string;\n /** Schema type that determines the shape and validation rules for this value. */\n type: RuntimeFieldType;\n /** Value that configures or reports commands for this contract. */\n commands: RuntimeFieldCommand[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports cli flag for this contract. */\n cliFlag?: string;\n /** Value that configures or reports cli aliases for this contract. */\n cliAliases: string[];\n /** Value that configures or reports required for this contract. */\n required: boolean;\n /** Value that configures or reports required on create for this contract. */\n requiredOnCreate: boolean;\n /** Value that configures or reports allow unset for this contract. */\n allowUnset: boolean;\n /** Value that configures or reports required types for this contract. */\n requiredTypes: string[];\n}\n\n/** Documents the upsert field result payload exchanged by command, SDK, and package integrations. */\nexport interface UpsertFieldResult {\n /** Value that configures or reports file for this contract. */\n file: FieldsFile;\n /** The definition as stored after the upsert. */\n definition: RuntimeFieldDefinition;\n /** True when an existing definition with the same (normalized) key was replaced. */\n replaced: boolean;\n}\n\n/** Documents the remove field result payload exchanged by command, SDK, and package integrations. */\nexport interface RemoveFieldResult {\n /** Value that configures or reports file for this contract. */\n file: FieldsFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched the requested key. */\n definition?: RuntimeFieldDefinition;\n}\n\n/** Normalizes a field key using the same rule as runtime-schema.ts: lowercase and collapse any run of whitespace/hyphens into a single underscore. */\nexport function normalizeFieldKey(value: unknown): string {\n return typeof value === \"string\"\n ? value\n .trim()\n .toLowerCase()\n .replaceAll(/[\\s-]+/g, \"_\")\n : \"\";\n}\n\n/** Normalizes a CLI flag token: strip a leading `--`, lowercase, and collapse whitespace/underscore runs to a single hyphen (matches normalizeCliToken in runtime-schema.ts). */\nfunction normalizeCliToken(value: unknown): string {\n if (typeof value !== \"string\") {\n return \"\";\n }\n const collapsed = value\n .trim()\n .toLowerCase()\n .replaceAll(/[\\s_]+/g, \"-\");\n return collapsed.startsWith(\"--\") ? collapsed.slice(2) : collapsed;\n}\n\nfunction keyToDefaultCliFlag(key: string): string {\n return key.replaceAll(\"_\", \"-\");\n}\n\nfunction dedupeCliTokens(values: Iterable<string>, exclude: string): string[] {\n const seen = new Set<string>();\n for (const value of values) {\n const token = normalizeCliToken(value);\n if (token.length > 0 && token !== exclude) {\n seen.add(token);\n }\n }\n return [...seen].sort((left, right) => left.localeCompare(right));\n}\n\nfunction dedupeStringList(values: string[] | undefined): string[] {\n const seen = new Set<string>();\n for (const value of values ?? []) {\n const trimmed = value.trim();\n if (trimmed.length > 0) {\n seen.add(trimmed);\n }\n }\n return [...seen].sort((left, right) => left.localeCompare(right));\n}\n\n/** Normalizes the command allow-list stored for a custom field definition. */\nfunction normalizeFieldCommands(\n rawCommands: string[] | undefined,\n): RuntimeFieldCommand[] {\n const seen = new Set<string>();\n const normalized: RuntimeFieldCommand[] = [];\n for (const rawCommand of rawCommands ?? []) {\n const command = rawCommand.trim().toLowerCase();\n if (command.length === 0) {\n continue;\n }\n if (!RUNTIME_FIELD_COMMAND_SET.has(command)) {\n throw new Error(\n `Invalid field command \"${rawCommand}\". Allowed: ${RUNTIME_FIELD_COMMAND_VALUES.join(\", \")}.`,\n );\n }\n if (!seen.has(command)) {\n seen.add(command);\n normalized.push(command as RuntimeFieldCommand);\n }\n }\n return rawCommands === undefined || normalized.length === 0\n ? [...DEFAULT_FIELD_COMMANDS]\n : normalized;\n}\n\n/** Validates and normalizes raw add-field CLI input. Throws a plain Error with a stable message when the key is missing/empty, collides with a built-in field, or carries an invalid type/command; the CLI layer maps these to PmCliError exit codes. A `string_array` type implies a repeatable field downstream (runtime-schema.ts derives `repeatable`), so no separate repeatable flag is exposed. */\nexport function normalizeAddFieldInput(\n raw: RawAddFieldInput,\n): NormalizedAddFieldInput {\n const key = normalizeFieldKey(raw.key);\n if (key.length === 0) {\n throw new Error(\"Field key must not be empty.\");\n }\n if (BUILTIN_FIELD_KEYS.has(key)) {\n throw new Error(\n `Cannot define custom field \"${key}\": it shadows a built-in field. Built-in fields are reserved.`,\n );\n }\n\n const typeCandidate =\n typeof raw.type === \"string\" && raw.type.trim().length > 0\n ? raw.type.trim().toLowerCase()\n : \"string\";\n if (!RUNTIME_FIELD_TYPE_SET.has(typeCandidate)) {\n throw new Error(\n `Invalid field type \"${raw.type}\". Allowed: ${RUNTIME_FIELD_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const type = typeCandidate as RuntimeFieldType;\n\n const commands = normalizeFieldCommands(raw.commands);\n\n const cliFlagToken = normalizeCliToken(raw.cliFlag);\n const cliFlag =\n cliFlagToken.length > 0 && cliFlagToken !== keyToDefaultCliFlag(key)\n ? cliFlagToken\n : undefined;\n const effectiveFlag = cliFlag ?? keyToDefaultCliFlag(key);\n const cliAliases = dedupeCliTokens(raw.aliases ?? [], effectiveFlag);\n\n const description = raw.description?.trim();\n return {\n key,\n type,\n commands,\n description:\n description && description.length > 0 ? description : undefined,\n cliFlag,\n cliAliases,\n required: raw.required === true,\n requiredOnCreate: raw.requiredOnCreate === true,\n // allow_unset defaults to true (omitted) and is only persisted when an\n // operator explicitly disables it with --no-allow-unset (allowUnset === false).\n allowUnset: raw.allowUnset !== false,\n requiredTypes: dedupeStringList(raw.requiredTypes),\n };\n}\n\nfunction selectFieldsArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.fields)) {\n return record.fields;\n }\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n return undefined;\n}\n\nfunction extractFieldDefinitions(parsed: unknown): RuntimeFieldDefinition[] {\n const candidate = selectFieldsArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: RuntimeFieldDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.key !== \"string\" || record.key.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as RuntimeFieldDefinition);\n }\n return definitions;\n}\n\n/** Coerces an arbitrary parsed value from fields.json into a FieldsFile. Accepts the canonical `{ fields: [...] }` shape, a bare array, or a `{ definitions: [...] }` form, and tolerates a missing/invalid file by returning an empty fields list. */\nexport function parseFieldsFile(raw: string | null | undefined): FieldsFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { fields: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/fields.json contains invalid JSON.\");\n }\n return { fields: extractFieldDefinitions(parsed) };\n}\n\n/** Serializes the fields file with a trailing newline (matches the rest of the schema scaffold files written by pm). */\nexport function serializeFieldsFile(file: FieldsFile): string {\n return `${JSON.stringify({ fields: file.fields }, null, 2)}\\n`;\n}\n\n/** Idempotent UPSERT of a custom field into the parsed file. Matching is by normalized key. When a definition already exists, the supplied input fully replaces its add-field-managed attributes (type/commands/description/flags/ required flags) while preserving any unrelated keys the file may carry; any `metadata_key` already stored is preserved so existing item data keeps mapping to the same front-matter column. */\nexport function upsertField(\n file: FieldsFile,\n input: NormalizedAddFieldInput,\n): UpsertFieldResult {\n // Match by normalized key. A hand-authored file may carry more than one entry\n // for the same key, so drop ALL matches and re-insert a single merged result\n // (collapsing duplicates) rather than only rewriting the first occurrence. The\n // first existing match seeds preserved attributes (e.g. metadata_key).\n const existing = file.fields.find(\n (definition) => normalizeFieldKey(definition.key) === input.key,\n );\n const replaced = existing !== undefined;\n const fields = file.fields.filter(\n (definition) => normalizeFieldKey(definition.key) !== input.key,\n );\n\n const next: RuntimeFieldDefinition = {\n ...existing,\n key: input.key,\n type: input.type,\n commands: [...input.commands],\n };\n applyOptionalString(next, \"description\", input.description);\n applyOptionalString(next, \"cli_flag\", input.cliFlag);\n if (input.cliAliases.length > 0) {\n next.cli_aliases = [...input.cliAliases];\n } else {\n delete next.cli_aliases;\n }\n applyBooleanFlag(next, \"required\", input.required);\n applyBooleanFlag(next, \"required_on_create\", input.requiredOnCreate);\n // allow_unset defaults true; only persist the explicit false override.\n if (input.allowUnset === false) {\n next.allow_unset = false;\n } else {\n delete next.allow_unset;\n }\n if (input.requiredTypes.length > 0) {\n next.required_types = [...input.requiredTypes];\n } else {\n delete next.required_types;\n }\n\n fields.push(next);\n fields.sort((left, right) =>\n normalizeFieldKey(left.key).localeCompare(normalizeFieldKey(right.key)),\n );\n\n return {\n file: { fields },\n definition: next,\n replaced,\n };\n}\n\n/** Removes a custom field definition from the parsed file by key (normalized). Throws a plain Error when `key` is empty. Returns `removed: false` when no matching definition exists so the CLI layer can treat the call as an idempotent no-op. */\nexport function removeField(\n file: FieldsFile,\n key: string | undefined,\n): RemoveFieldResult {\n const normalizedKey = normalizeFieldKey(key);\n if (normalizedKey.length === 0) {\n throw new Error(\"Field key must not be empty.\");\n }\n // Remove ALL matches (a hand-authored file may carry duplicate entries for the\n // same normalized key) so no stale duplicate survives the removal.\n const removed: RuntimeFieldDefinition[] = [];\n const fields = file.fields.filter((definition) => {\n if (normalizeFieldKey(definition.key) === normalizedKey) {\n removed.push(definition);\n return false;\n }\n return true;\n });\n if (removed.length === 0) {\n return { file: { fields }, removed: false };\n }\n return { file: { fields }, removed: true, definition: removed[0] };\n}\n\nfunction applyOptionalString(\n definition: RuntimeFieldDefinition,\n key: string,\n value: string | undefined,\n): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value !== undefined && value.length > 0) {\n record[key] = value;\n } else {\n delete record[key];\n }\n}\n\nfunction applyBooleanFlag(\n definition: RuntimeFieldDefinition,\n key: string,\n value: boolean,\n): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value) {\n record[key] = true;\n } else {\n delete record[key];\n }\n}\n", "/**\n * @module core/schema/type-presets\n *\n * Resolves configurable schema, fields, statuses, and workflows for Type Presets.\n */\nimport {\n normalizeAddTypeInput,\n type NormalizedAddTypeInput,\n type RawAddTypeInput,\n} from \"./item-types-file.js\";\n\n/** Shared domain item-type presets. These power both `pm init --type-preset` (registered during initialization) and the standalone `pm schema apply-preset` subcommand (adopting a preset into an already-initialized project). Keeping the raw definitions and the preset-name normalizer in one place guarantees init and schema register byte-identical types. */\n\nexport const TYPE_PRESET_NAMES = [\"agile\", \"ops\", \"research\"] as const;\n/** Restricts type preset name values accepted by command, SDK, and storage contracts. */\nexport type TypePresetName = (typeof TYPE_PRESET_NAMES)[number];\n\n/**\n * Raw (pre-normalization) preset definitions keyed by preset name. Each entry is\n * fed through {@link normalizeAddTypeInput} before being upserted so the same\n * validation/normalization the `pm schema add-type` CLI applies governs preset\n * registration too.\n */\nexport const TYPE_PRESET_DEFINITIONS: Record<\n TypePresetName,\n RawAddTypeInput[]\n> = {\n agile: [\n {\n name: \"Story\",\n description:\n \"User-facing outcome or capability slice expressed from a stakeholder perspective.\",\n defaultStatus: \"open\",\n folder: \"stories\",\n aliases: [\"user-story\"],\n },\n {\n name: \"Spike\",\n description:\n \"Time-boxed investigation used to reduce uncertainty before implementation.\",\n defaultStatus: \"open\",\n folder: \"spikes\",\n aliases: [\"research-spike\"],\n },\n ],\n ops: [\n {\n name: \"Incident\",\n description:\n \"Operational disruption, degradation, or support escalation with recovery tracking.\",\n defaultStatus: \"open\",\n folder: \"incidents\",\n aliases: [\"outage\"],\n },\n {\n name: \"Runbook\",\n description:\n \"Repeatable operational procedure, diagnostic path, or response playbook.\",\n defaultStatus: \"open\",\n folder: \"runbooks\",\n aliases: [\"playbook\"],\n },\n ],\n research: [\n {\n name: \"Experiment\",\n description:\n \"Validated-learning activity with hypothesis, method, and outcome tracking.\",\n defaultStatus: \"open\",\n folder: \"experiments\",\n aliases: [\"study\"],\n },\n {\n name: \"Hypothesis\",\n description:\n \"Testable claim or assumption that should be supported, rejected, or refined.\",\n defaultStatus: \"open\",\n folder: \"hypotheses\",\n aliases: [\"assumption\"],\n },\n ],\n};\n\n/** Validates and normalizes a raw preset-name CLI value. Returns `undefined` when the value is omitted (no preset requested). Throws a plain Error with a stable message for an empty or unknown preset; CLI layers map it to a USAGE exit code. Accepts hyphen/underscore-insensitive casing for ergonomics. */\nexport function normalizeTypePresetName(\n rawValue: string | undefined,\n): TypePresetName | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n const normalized = rawValue.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n throw new Error(\"Type preset name must not be empty.\");\n }\n if (\n normalized === \"agile\" ||\n normalized === \"ops\" ||\n normalized === \"research\"\n ) {\n return normalized;\n }\n throw new Error(\n `Invalid type preset \"${rawValue}\". Allowed: ${TYPE_PRESET_NAMES.join(\", \")}.`,\n );\n}\n\n/** Returns the normalized add-type inputs for a preset, in the order they should be upserted. Each raw definition is run through normalizeAddTypeInput so callers get the same validated shape as an individual `add-type` invocation. */\nexport function resolveTypePresetDefinitions(\n preset: TypePresetName,\n): NormalizedAddTypeInput[] {\n return TYPE_PRESET_DEFINITIONS[preset].map((rawDefinition) =>\n normalizeAddTypeInput(rawDefinition),\n );\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AA8BA,IAAM,0BAA0B,IAAI,IAA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,aAAa,SAAS,KAAI,EAAG,YAAW,EAAG,WAAW,KAAK,GAAG;AACpE,MAAI,WAAW,WAAW,GAAG;AAC3B,UAAM,IAAI,MAAM,qCAAqC;EACvD;AACA,MACE,eAAe,WACf,eAAe,SACf,eAAe,YACf;AACA,WAAO;EACT;AACA,QAAM,IAAI,MACR,wBAAwB,QAAQ,eAAe,kBAAkB,KAAK,IAAI,CAAC,GAAG;AAElF;AAGM,SAAU,6BACd,QAAsB;AAEtB,SAAO,wBAAwB,MAAM,EAAE,IAAI,CAAC,kBAC1C,sBAAsB,aAAa,CAAC;AAExC;",
|
|
4
|
+
"sourcesContent": ["/**\n * @module core/schema/status-defs-file\n *\n * Resolves configurable schema, fields, statuses, and workflows for Status Defs File.\n */\nimport { RUNTIME_STATUS_ROLE_VALUES } from \"../../types/index.js\";\nimport type {\n RuntimeStatusDefinition,\n RuntimeStatusRole,\n} from \"../../types/index.js\";\nimport { DEFAULT_RUNTIME_STATUS_DEFINITIONS } from \"./runtime-schema.js\";\nimport { evictOldestMemoEntries } from \"../shared/memo.js\";\n\nexport type {\n RuntimeStatusDefinition,\n RuntimeStatusRole,\n} from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-status` / `pm schema remove-status`\n * commands. The CLI command file (schema.ts) owns IO/governance; everything\n * testable and side-effect-free lives here so it can be coverage-gated to 100%.\n *\n * Statuses persist at `.agents/pm/schema/statuses.json` under the shape\n * `{ statuses: RuntimeStatusDefinition[] }`. When the file is absent the runtime\n * merge layer (src/core/store/settings.ts) still supplies the built-in defaults\n * from DEFAULT_RUNTIME_STATUS_DEFINITIONS, so this module never duplicates them\n * into the persisted file.\n */\n\nconst RUNTIME_STATUS_ROLE_SET = new Set<string>(RUNTIME_STATUS_ROLE_VALUES);\n\n/**\n * Memo for {@link normalizeStatusToken}. Status ranking inside sort comparators\n * normalizes the same handful of status strings O(n log n) times per corpus scan, and\n * the trim/lowercase/regex pipeline shows up in list/next/context profiles. The cap\n * bounds memory in long-lived hosts against unbounded arbitrary inputs; half-eviction keeps the\n * newest-inserted half when the cap is hit. Declared before\n * BUILTIN_STATUS_IDS, whose module-level initializer already normalizes tokens.\n */\nconst STATUS_TOKEN_MEMO_MAX_ENTRIES = 2_000;\nconst statusTokenMemo = new Map<string, string>();\n\n/** The 5 lifecycle status ids that ship as built-in defaults and may never be removed (their normalized ids match DEFAULT_RUNTIME_STATUS_DEFINITIONS: open/in_progress/blocked/closed/canceled). `draft` is also a default but the acceptance criteria enumerate the 5 terminal/active ids explicitly, so the guard derives the full set from the canonical defaults to stay in sync. */\nexport const BUILTIN_STATUS_IDS: ReadonlySet<string> = new Set(\n DEFAULT_RUNTIME_STATUS_DEFINITIONS.map((definition) =>\n normalizeStatusToken(definition.id),\n ).filter((id) => id.length > 0),\n);\n\n/** The shape persisted at `.agents/pm/schema/statuses.json`. */\nexport interface StatusDefsFile {\n /** Value that configures or reports statuses for this contract. */\n statuses: RuntimeStatusDefinition[];\n}\n\n/** Documents the raw add status input payload exchanged by command, SDK, and package integrations. */\nexport interface RawAddStatusInput {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string | undefined;\n /** Value that configures or reports roles for this contract. */\n roles?: string[];\n /** Value that configures or reports aliases for this contract. */\n aliases?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports order for this contract. */\n order?: number;\n}\n\n/** Documents the normalized add status input payload exchanged by command, SDK, and package integrations. */\nexport interface NormalizedAddStatusInput {\n /** Stable identifier used to reference this record across commands and storage. */\n id: string;\n /** Normalized roles, or `undefined` when the raw input did not supply a roles field at all. `undefined` means \"leave existing roles untouched\" on upsert; an explicit empty array means \"clear roles\". This distinction is what keeps `add-status review --description x` from wiping a previously-set role. */\n roles?: RuntimeStatusRole[];\n /** Same omitted-vs-explicit-empty semantics as `roles`. */\n aliases?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports order for this contract. */\n order?: number;\n}\n\n/** Documents the upsert status def result payload exchanged by command, SDK, and package integrations. */\nexport interface UpsertStatusDefResult {\n /** Value that configures or reports file for this contract. */\n file: StatusDefsFile;\n /** The definition as stored after the upsert (existing fields preserved). */\n definition: RuntimeStatusDefinition;\n /** True when an existing definition with the same (normalized) id was replaced. */\n replaced: boolean;\n}\n\n/** Documents the remove status def result payload exchanged by command, SDK, and package integrations. */\nexport interface RemoveStatusDefResult {\n /** Value that configures or reports file for this contract. */\n file: StatusDefsFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched the requested id. */\n definition?: RuntimeStatusDefinition;\n}\n\n/** Normalizes a status token using the same rules as runtime-schema.ts: lowercase and collapse any run of whitespace/hyphens into a single underscore. */\nexport function normalizeStatusToken(value: unknown): string {\n if (typeof value !== \"string\") {\n return \"\";\n }\n const memoized = statusTokenMemo.get(value);\n if (memoized !== undefined) {\n return memoized;\n }\n const normalized = value\n .trim()\n .toLowerCase()\n .replaceAll(/[\\s-]+/g, \"_\");\n if (statusTokenMemo.size >= STATUS_TOKEN_MEMO_MAX_ENTRIES) {\n evictOldestMemoEntries(statusTokenMemo);\n }\n statusTokenMemo.set(value, normalized);\n return normalized;\n}\n\nfunction dedupeTokens(values: Iterable<string>): string[] {\n const seen = new Set<string>();\n for (const value of values) {\n const token = normalizeStatusToken(value);\n if (token.length > 0) {\n seen.add(token);\n }\n }\n return [...seen].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Validates and normalizes raw add-status CLI input. Throws a plain Error with a\n * stable message when the id is missing/empty or a role is not one of\n * RUNTIME_STATUS_ROLE_VALUES; the CLI layer maps these to PmCliError exit codes.\n *\n * Omitted vs explicit-empty is preserved end-to-end: when `raw.roles`/`raw.aliases`\n * is `undefined` (flag not supplied) the normalized field is `undefined` so the\n * upsert leaves the existing value untouched; when supplied (even an empty array)\n * the field is normalized to an array so the upsert can apply an explicit clear.\n */\nexport function normalizeAddStatusInput(\n raw: RawAddStatusInput,\n): NormalizedAddStatusInput {\n const id = normalizeStatusToken(raw.id);\n if (id.length === 0) {\n throw new Error(\"Status id must not be empty.\");\n }\n // Built-in lifecycle statuses are reserved and cannot be overridden: an\n // add-status override would change reserved metadata yet remove-status refuses\n // to delete a built-in id, leaving no CLI path to undo it. Reject up front,\n // symmetric with removeStatusDef.\n if (BUILTIN_STATUS_IDS.has(id)) {\n throw new Error(\n `Cannot add-status the built-in status \"${id}\". Built-in statuses are reserved: ${[...BUILTIN_STATUS_IDS].join(\", \")}.`,\n );\n }\n let roles: RuntimeStatusRole[] | undefined;\n if (raw.roles !== undefined) {\n roles = [];\n const seenRoles = new Set<string>();\n for (const rawRole of raw.roles) {\n const role =\n typeof rawRole === \"string\" ? rawRole.trim().toLowerCase() : \"\";\n if (role.length === 0) {\n continue;\n }\n if (!RUNTIME_STATUS_ROLE_SET.has(role)) {\n throw new Error(\n `Invalid status role \"${rawRole}\". Allowed roles: ${RUNTIME_STATUS_ROLE_VALUES.join(\", \")}.`,\n );\n }\n if (!seenRoles.has(role)) {\n seenRoles.add(role);\n roles.push(role as RuntimeStatusRole);\n }\n }\n }\n const aliases =\n raw.aliases === undefined\n ? undefined\n : dedupeTokens(raw.aliases).filter((alias) => alias !== id);\n const description = raw.description?.trim();\n const order =\n typeof raw.order === \"number\" && Number.isFinite(raw.order)\n ? Math.trunc(raw.order)\n : undefined;\n return {\n id,\n roles,\n aliases,\n description:\n description && description.length > 0 ? description : undefined,\n order,\n };\n}\n\nfunction selectStatusesArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.statuses)) {\n return record.statuses;\n }\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n return undefined;\n}\n\nfunction extractStatusDefinitions(parsed: unknown): RuntimeStatusDefinition[] {\n const candidate = selectStatusesArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: RuntimeStatusDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.id !== \"string\" || record.id.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as RuntimeStatusDefinition);\n }\n return definitions;\n}\n\n/** Coerces an arbitrary parsed value from statuses.json into a StatusDefsFile. Accepts the canonical `{ statuses: [...] }` shape, a bare array of definitions, or a `{ definitions: [...] }` form, and tolerates a missing/invalid file by returning an empty statuses list. */\nexport function parseStatusDefsFile(\n raw: string | null | undefined,\n): StatusDefsFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { statuses: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/statuses.json contains invalid JSON.\");\n }\n return { statuses: extractStatusDefinitions(parsed) };\n}\n\n/** Serializes the status definitions file with a trailing newline (matches the rest of the schema scaffold files written by pm). */\nexport function serializeStatusDefsFile(file: StatusDefsFile): string {\n return `${JSON.stringify({ statuses: file.statuses }, null, 2)}\\n`;\n}\n\n/** Idempotent UPSERT of a status definition into the parsed file. Matching is by normalized id. When a definition already exists, fields supplied in `input` override the previous values (roles/aliases replace when a non-empty array is given, clear when an explicit empty array is given, and are left UNTOUCHED when the field is `undefined` — i.e. the add-status flag was omitted); description/order override when provided. Fields not addressed by add-status flags are preserved untouched, so `add-status <id> --description x` keeps any previously-set roles/aliases. */\nexport function upsertStatusDef(\n file: StatusDefsFile,\n input: NormalizedAddStatusInput,\n baseDefinition?: RuntimeStatusDefinition,\n): UpsertStatusDefResult {\n const statuses = file.statuses.slice();\n const existingIndex = statuses.findIndex(\n (definition) => normalizeStatusToken(definition.id) === input.id,\n );\n // A file-backed definition is the primary seed; when the status is not yet in\n // statuses.json fall back to `baseDefinition` (the resolved settings-backed\n // definition) so omitting --role/--alias preserves metadata that lives in\n // settings.schema.statuses rather than the file.\n const existing =\n existingIndex >= 0 ? statuses[existingIndex] : baseDefinition;\n\n const next: RuntimeStatusDefinition = {\n ...existing,\n id: input.id,\n };\n if (input.roles !== undefined) {\n if (input.roles.length > 0) {\n next.roles = [...input.roles];\n } else if (next.roles !== undefined) {\n delete next.roles;\n }\n }\n if (input.aliases !== undefined) {\n if (input.aliases.length > 0) {\n next.aliases = [...input.aliases];\n } else if (next.aliases !== undefined) {\n delete next.aliases;\n }\n }\n if (input.description !== undefined) {\n next.description = input.description;\n }\n if (input.order !== undefined) {\n next.order = input.order;\n }\n\n if (existingIndex >= 0) {\n statuses[existingIndex] = next;\n } else {\n statuses.push(next);\n }\n\n return {\n file: { statuses },\n definition: next,\n // \"replaced\" reflects whether the status already existed effectively (in the\n // file OR in resolved settings), so the CLI reports \"Updated\" vs \"Registered\"\n // correctly even when the prior definition lived only in settings.\n replaced: existing !== undefined,\n };\n}\n\n/** Removes a status definition from the parsed file by id (normalized). Throws a plain Error when `id` is empty or matches a reserved built-in default status (those are never stored in the file and must never be deletable). Returns `removed: false` when no matching definition exists so the CLI layer can treat the call as an idempotent no-op. */\nexport function removeStatusDef(\n file: StatusDefsFile,\n id: string | undefined,\n): RemoveStatusDefResult {\n const normalizedId = normalizeStatusToken(id);\n if (normalizedId.length === 0) {\n throw new Error(\"Status id must not be empty.\");\n }\n if (BUILTIN_STATUS_IDS.has(normalizedId)) {\n throw new Error(\n `Cannot remove built-in status \"${normalizedId}\". Built-in statuses are reserved: ${[...BUILTIN_STATUS_IDS].join(\", \")}.`,\n );\n }\n const statuses = file.statuses.slice();\n const existingIndex = statuses.findIndex(\n (definition) => normalizeStatusToken(definition.id) === normalizedId,\n );\n if (existingIndex < 0) {\n return { file: { statuses }, removed: false };\n }\n const [definition] = statuses.splice(existingIndex, 1);\n return { file: { statuses }, removed: true, definition };\n}\n\n/** Throws when the new status id or any explicitly-supplied alias collides with a DIFFERENT existing status's id/alias. `resolvedAliasToId` maps a normalized token to its owning status id (the runtime status registry's alias_to_id map, which stores ids and aliases in one namespace). Re-adding the same status (matching id) is allowed — only cross-status collisions throw. This prevents a custom status from shadowing a built-in lifecycle token (for example `add-status review --alias open`, or a custom id `cancelled` that aliases the built-in `canceled`), which would make `pm update --status open` resolve to the wrong status. The CLI layer maps the thrown Error to a USAGE exit code. */\nexport function assertStatusTokensAvailable(\n input: { id: string; aliases?: string[] },\n resolvedAliasToId: ReadonlyMap<string, string>,\n): void {\n const candidates = [input.id, ...(input.aliases ?? [])];\n for (const candidate of candidates) {\n const token = normalizeStatusToken(candidate);\n if (token.length === 0) {\n continue;\n }\n const owner = resolvedAliasToId.get(token);\n if (owner !== undefined && owner !== input.id) {\n throw new Error(\n `Status token \"${token}\" already belongs to status \"${owner}\". Choose a different id/alias to avoid shadowing it.`,\n );\n }\n }\n}\n", "/**\n * @module core/schema/fields-file\n *\n * Resolves configurable schema, fields, statuses, and workflows for Fields File.\n */\nimport {\n RUNTIME_FIELD_COMMAND_VALUES,\n RUNTIME_FIELD_TYPE_VALUES,\n} from \"../../types/index.js\";\nimport type {\n RuntimeFieldCommand,\n RuntimeFieldDefinition,\n RuntimeFieldType,\n} from \"../../types/index.js\";\nimport { FRONT_MATTER_KEY_ORDER } from \"../shared/constants.js\";\n\nexport type {\n RuntimeFieldCommand,\n RuntimeFieldDefinition,\n RuntimeFieldType,\n} from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-field` / `pm schema remove-field` commands\n * and the `list-fields` / `show-field` inspectors. The CLI command file\n * (schema.ts) owns IO/governance; everything testable and side-effect-free lives\n * here so it can be coverage-gated to 100%.\n *\n * Custom fields persist at `.agents/pm/schema/fields.json` under the shape\n * `{ fields: RuntimeFieldDefinition[] }`. The runtime merge layer\n * (loadRuntimeSchemaFromOptionalFiles) reads that file and dynamically registers\n * a CLI flag per field on create/update/list/search/context, so this module only\n * has to manage the persisted entries; it never duplicates the registration.\n */\n\nconst RUNTIME_FIELD_TYPE_SET = new Set<string>(RUNTIME_FIELD_TYPE_VALUES);\nconst RUNTIME_FIELD_COMMAND_SET = new Set<string>(RUNTIME_FIELD_COMMAND_VALUES);\n\n/** Built-in front-matter field names a custom field key must never shadow. A custom key that collides with one of these would let `pm create --<key>` write over reserved metadata, so add-field rejects them up front (symmetric with the built-in-type guard in item-types-file.ts). */\nexport const BUILTIN_FIELD_KEYS: ReadonlySet<string> = new Set([\n ...FRONT_MATTER_KEY_ORDER.filter((key) => key !== \"severity\"),\n \"id\",\n \"title\",\n \"type\",\n \"status\",\n \"priority\",\n \"tags\",\n \"assignee\",\n \"parent\",\n \"description\",\n \"body\",\n \"created_at\",\n \"updated_at\",\n \"closed_at\",\n \"author\",\n \"deadline\",\n \"estimate\",\n \"sprint\",\n \"release\",\n \"risk\",\n \"confidence\",\n \"reviewer\",\n \"resolution\",\n \"expected\",\n \"actual\",\n]);\n\n/** The default commands a field is wired onto when `--commands` is omitted, matching the runtime default in runtime-schema.ts (normalizeRuntimeFieldDefinition). */\nconst DEFAULT_FIELD_COMMANDS: RuntimeFieldCommand[] = [\"create\", \"update\"];\n\n/** The shape persisted at `.agents/pm/schema/fields.json`. */\nexport interface FieldsFile {\n /** Value that configures or reports fields for this contract. */\n fields: RuntimeFieldDefinition[];\n}\n\n/** Documents the raw add field input payload exchanged by command, SDK, and package integrations. */\nexport interface RawAddFieldInput {\n /** Value that configures or reports key for this contract. */\n key: string | undefined;\n /** Schema type that determines the shape and validation rules for this value. */\n type?: string;\n /** Value that configures or reports commands for this contract. */\n commands?: string[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports cli flag for this contract. */\n cliFlag?: string;\n /** Value that configures or reports aliases for this contract. */\n aliases?: string[];\n /** Value that configures or reports required for this contract. */\n required?: boolean;\n /** Value that configures or reports required on create for this contract. */\n requiredOnCreate?: boolean;\n /** Value that configures or reports allow unset for this contract. */\n allowUnset?: boolean;\n /** Value that configures or reports required types for this contract. */\n requiredTypes?: string[];\n}\n\n/** Documents the normalized add field input payload exchanged by command, SDK, and package integrations. */\nexport interface NormalizedAddFieldInput {\n /** Value that configures or reports key for this contract. */\n key: string;\n /** Schema type that determines the shape and validation rules for this value. */\n type: RuntimeFieldType;\n /** Value that configures or reports commands for this contract. */\n commands: RuntimeFieldCommand[];\n /** Value that configures or reports description for this contract. */\n description?: string;\n /** Value that configures or reports cli flag for this contract. */\n cliFlag?: string;\n /** Value that configures or reports cli aliases for this contract. */\n cliAliases: string[];\n /** Value that configures or reports required for this contract. */\n required: boolean;\n /** Value that configures or reports required on create for this contract. */\n requiredOnCreate: boolean;\n /** Value that configures or reports allow unset for this contract. */\n allowUnset: boolean;\n /** Value that configures or reports required types for this contract. */\n requiredTypes: string[];\n}\n\n/** Documents the upsert field result payload exchanged by command, SDK, and package integrations. */\nexport interface UpsertFieldResult {\n /** Value that configures or reports file for this contract. */\n file: FieldsFile;\n /** The definition as stored after the upsert. */\n definition: RuntimeFieldDefinition;\n /** True when an existing definition with the same (normalized) key was replaced. */\n replaced: boolean;\n}\n\n/** Documents the remove field result payload exchanged by command, SDK, and package integrations. */\nexport interface RemoveFieldResult {\n /** Value that configures or reports file for this contract. */\n file: FieldsFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched the requested key. */\n definition?: RuntimeFieldDefinition;\n}\n\n/** Normalizes a field key using the same rule as runtime-schema.ts: lowercase and collapse any run of whitespace/hyphens into a single underscore. */\nexport function normalizeFieldKey(value: unknown): string {\n return typeof value === \"string\"\n ? value\n .trim()\n .toLowerCase()\n .replaceAll(/[\\s-]+/g, \"_\")\n : \"\";\n}\n\n/** Normalizes a CLI flag token: strip a leading `--`, lowercase, and collapse whitespace/underscore runs to a single hyphen (matches normalizeCliToken in runtime-schema.ts). */\nfunction normalizeCliToken(value: unknown): string {\n if (typeof value !== \"string\") {\n return \"\";\n }\n const collapsed = value\n .trim()\n .toLowerCase()\n .replaceAll(/[\\s_]+/g, \"-\");\n return collapsed.startsWith(\"--\") ? collapsed.slice(2) : collapsed;\n}\n\nfunction keyToDefaultCliFlag(key: string): string {\n return key.replaceAll(\"_\", \"-\");\n}\n\nfunction dedupeCliTokens(values: Iterable<string>, exclude: string): string[] {\n const seen = new Set<string>();\n for (const value of values) {\n const token = normalizeCliToken(value);\n if (token.length > 0 && token !== exclude) {\n seen.add(token);\n }\n }\n return [...seen].sort((left, right) => left.localeCompare(right));\n}\n\nfunction dedupeStringList(values: string[] | undefined): string[] {\n const seen = new Set<string>();\n for (const value of values ?? []) {\n const trimmed = value.trim();\n if (trimmed.length > 0) {\n seen.add(trimmed);\n }\n }\n return [...seen].sort((left, right) => left.localeCompare(right));\n}\n\n/** Normalizes the command allow-list stored for a custom field definition. */\nfunction normalizeFieldCommands(\n rawCommands: string[] | undefined,\n): RuntimeFieldCommand[] {\n const seen = new Set<string>();\n const normalized: RuntimeFieldCommand[] = [];\n for (const rawCommand of rawCommands ?? []) {\n const command = rawCommand.trim().toLowerCase();\n if (command.length === 0) {\n continue;\n }\n if (!RUNTIME_FIELD_COMMAND_SET.has(command)) {\n throw new Error(\n `Invalid field command \"${rawCommand}\". Allowed: ${RUNTIME_FIELD_COMMAND_VALUES.join(\", \")}.`,\n );\n }\n if (!seen.has(command)) {\n seen.add(command);\n normalized.push(command as RuntimeFieldCommand);\n }\n }\n return rawCommands === undefined || normalized.length === 0\n ? [...DEFAULT_FIELD_COMMANDS]\n : normalized;\n}\n\n/** Validates and normalizes raw add-field CLI input. Throws a plain Error with a stable message when the key is missing/empty, collides with a built-in field, or carries an invalid type/command; the CLI layer maps these to PmCliError exit codes. A `string_array` type implies a repeatable field downstream (runtime-schema.ts derives `repeatable`), so no separate repeatable flag is exposed. */\nexport function normalizeAddFieldInput(\n raw: RawAddFieldInput,\n): NormalizedAddFieldInput {\n const key = normalizeFieldKey(raw.key);\n if (key.length === 0) {\n throw new Error(\"Field key must not be empty.\");\n }\n if (BUILTIN_FIELD_KEYS.has(key)) {\n throw new Error(\n `Cannot define custom field \"${key}\": custom schema field \"${key}\" collides with built-in item metadata \"${key}\". Rename the custom field with a project-specific prefix. Reserved fields: ${[...BUILTIN_FIELD_KEYS].sort((left, right) => left.localeCompare(right)).join(\", \")}.`,\n );\n }\n\n const typeCandidate =\n typeof raw.type === \"string\" && raw.type.trim().length > 0\n ? raw.type.trim().toLowerCase()\n : \"string\";\n if (!RUNTIME_FIELD_TYPE_SET.has(typeCandidate)) {\n throw new Error(\n `Invalid field type \"${raw.type}\". Allowed: ${RUNTIME_FIELD_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const type = typeCandidate as RuntimeFieldType;\n\n const commands = normalizeFieldCommands(raw.commands);\n\n const cliFlagToken = normalizeCliToken(raw.cliFlag);\n const cliFlag =\n cliFlagToken.length > 0 && cliFlagToken !== keyToDefaultCliFlag(key)\n ? cliFlagToken\n : undefined;\n const effectiveFlag = cliFlag ?? keyToDefaultCliFlag(key);\n const cliAliases = dedupeCliTokens(raw.aliases ?? [], effectiveFlag);\n\n const description = raw.description?.trim();\n return {\n key,\n type,\n commands,\n description:\n description && description.length > 0 ? description : undefined,\n cliFlag,\n cliAliases,\n required: raw.required === true,\n requiredOnCreate: raw.requiredOnCreate === true,\n // allow_unset defaults to true (omitted) and is only persisted when an\n // operator explicitly disables it with --no-allow-unset (allowUnset === false).\n allowUnset: raw.allowUnset !== false,\n requiredTypes: dedupeStringList(raw.requiredTypes),\n };\n}\n\nfunction selectFieldsArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.fields)) {\n return record.fields;\n }\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n return undefined;\n}\n\nfunction extractFieldDefinitions(parsed: unknown): RuntimeFieldDefinition[] {\n const candidate = selectFieldsArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: RuntimeFieldDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.key !== \"string\" || record.key.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as RuntimeFieldDefinition);\n }\n return definitions;\n}\n\n/** Coerces an arbitrary parsed value from fields.json into a FieldsFile. Accepts the canonical `{ fields: [...] }` shape, a bare array, or a `{ definitions: [...] }` form, and tolerates a missing/invalid file by returning an empty fields list. */\nexport function parseFieldsFile(raw: string | null | undefined): FieldsFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { fields: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/fields.json contains invalid JSON.\");\n }\n return { fields: extractFieldDefinitions(parsed) };\n}\n\n/** Serializes the fields file with a trailing newline (matches the rest of the schema scaffold files written by pm). */\nexport function serializeFieldsFile(file: FieldsFile): string {\n return `${JSON.stringify({ fields: file.fields }, null, 2)}\\n`;\n}\n\n/** Idempotent UPSERT of a custom field into the parsed file. Matching is by normalized key. When a definition already exists, the supplied input fully replaces its add-field-managed attributes (type/commands/description/flags/ required flags) while preserving any unrelated keys the file may carry; any `metadata_key` already stored is preserved so existing item data keeps mapping to the same front-matter column. */\nexport function upsertField(\n file: FieldsFile,\n input: NormalizedAddFieldInput,\n): UpsertFieldResult {\n // Match by normalized key. A hand-authored file may carry more than one entry\n // for the same key, so drop ALL matches and re-insert a single merged result\n // (collapsing duplicates) rather than only rewriting the first occurrence. The\n // first existing match seeds preserved attributes (e.g. metadata_key).\n const existing = file.fields.find(\n (definition) => normalizeFieldKey(definition.key) === input.key,\n );\n const replaced = existing !== undefined;\n const fields = file.fields.filter(\n (definition) => normalizeFieldKey(definition.key) !== input.key,\n );\n\n const next: RuntimeFieldDefinition = {\n ...existing,\n key: input.key,\n type: input.type,\n commands: [...input.commands],\n };\n applyOptionalString(next, \"description\", input.description);\n applyOptionalString(next, \"cli_flag\", input.cliFlag);\n if (input.cliAliases.length > 0) {\n next.cli_aliases = [...input.cliAliases];\n } else {\n delete next.cli_aliases;\n }\n applyBooleanFlag(next, \"required\", input.required);\n applyBooleanFlag(next, \"required_on_create\", input.requiredOnCreate);\n // allow_unset defaults true; only persist the explicit false override.\n if (input.allowUnset === false) {\n next.allow_unset = false;\n } else {\n delete next.allow_unset;\n }\n if (input.requiredTypes.length > 0) {\n next.required_types = [...input.requiredTypes];\n } else {\n delete next.required_types;\n }\n\n fields.push(next);\n fields.sort((left, right) =>\n normalizeFieldKey(left.key).localeCompare(normalizeFieldKey(right.key)),\n );\n\n return {\n file: { fields },\n definition: next,\n replaced,\n };\n}\n\n/** Removes a custom field definition from the parsed file by key (normalized). Throws a plain Error when `key` is empty. Returns `removed: false` when no matching definition exists so the CLI layer can treat the call as an idempotent no-op. */\nexport function removeField(\n file: FieldsFile,\n key: string | undefined,\n): RemoveFieldResult {\n const normalizedKey = normalizeFieldKey(key);\n if (normalizedKey.length === 0) {\n throw new Error(\"Field key must not be empty.\");\n }\n // Remove ALL matches (a hand-authored file may carry duplicate entries for the\n // same normalized key) so no stale duplicate survives the removal.\n const removed: RuntimeFieldDefinition[] = [];\n const fields = file.fields.filter((definition) => {\n if (normalizeFieldKey(definition.key) === normalizedKey) {\n removed.push(definition);\n return false;\n }\n return true;\n });\n if (removed.length === 0) {\n return { file: { fields }, removed: false };\n }\n return { file: { fields }, removed: true, definition: removed[0] };\n}\n\nfunction applyOptionalString(\n definition: RuntimeFieldDefinition,\n key: string,\n value: string | undefined,\n): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value !== undefined && value.length > 0) {\n record[key] = value;\n } else {\n delete record[key];\n }\n}\n\nfunction applyBooleanFlag(\n definition: RuntimeFieldDefinition,\n key: string,\n value: boolean,\n): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value) {\n record[key] = true;\n } else {\n delete record[key];\n }\n}\n", "/**\n * @module core/schema/type-presets\n *\n * Resolves configurable schema, fields, statuses, and workflows for Type Presets.\n */\nimport {\n normalizeAddTypeInput,\n type NormalizedAddTypeInput,\n type RawAddTypeInput,\n} from \"./item-types-file.js\";\n\n/** Shared domain item-type presets. These power both `pm init --type-preset` (registered during initialization) and the standalone `pm schema apply-preset` subcommand (adopting a preset into an already-initialized project). Keeping the raw definitions and the preset-name normalizer in one place guarantees init and schema register byte-identical types. */\n\nexport const TYPE_PRESET_NAMES = [\"agile\", \"ops\", \"research\"] as const;\n/** Restricts type preset name values accepted by command, SDK, and storage contracts. */\nexport type TypePresetName = (typeof TYPE_PRESET_NAMES)[number];\n\n/**\n * Raw (pre-normalization) preset definitions keyed by preset name. Each entry is\n * fed through {@link normalizeAddTypeInput} before being upserted so the same\n * validation/normalization the `pm schema add-type` CLI applies governs preset\n * registration too.\n */\nexport const TYPE_PRESET_DEFINITIONS: Record<\n TypePresetName,\n RawAddTypeInput[]\n> = {\n agile: [\n {\n name: \"Story\",\n description:\n \"User-facing outcome or capability slice expressed from a stakeholder perspective.\",\n defaultStatus: \"open\",\n folder: \"stories\",\n aliases: [\"user-story\"],\n },\n {\n name: \"Spike\",\n description:\n \"Time-boxed investigation used to reduce uncertainty before implementation.\",\n defaultStatus: \"open\",\n folder: \"spikes\",\n aliases: [\"research-spike\"],\n },\n ],\n ops: [\n {\n name: \"Incident\",\n description:\n \"Operational disruption, degradation, or support escalation with recovery tracking.\",\n defaultStatus: \"open\",\n folder: \"incidents\",\n aliases: [\"outage\"],\n },\n {\n name: \"Runbook\",\n description:\n \"Repeatable operational procedure, diagnostic path, or response playbook.\",\n defaultStatus: \"open\",\n folder: \"runbooks\",\n aliases: [\"playbook\"],\n },\n ],\n research: [\n {\n name: \"Experiment\",\n description:\n \"Validated-learning activity with hypothesis, method, and outcome tracking.\",\n defaultStatus: \"open\",\n folder: \"experiments\",\n aliases: [\"study\"],\n },\n {\n name: \"Hypothesis\",\n description:\n \"Testable claim or assumption that should be supported, rejected, or refined.\",\n defaultStatus: \"open\",\n folder: \"hypotheses\",\n aliases: [\"assumption\"],\n },\n ],\n};\n\n/** Validates and normalizes a raw preset-name CLI value. Returns `undefined` when the value is omitted (no preset requested). Throws a plain Error with a stable message for an empty or unknown preset; CLI layers map it to a USAGE exit code. Accepts hyphen/underscore-insensitive casing for ergonomics. */\nexport function normalizeTypePresetName(\n rawValue: string | undefined,\n): TypePresetName | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n const normalized = rawValue.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n throw new Error(\"Type preset name must not be empty.\");\n }\n if (\n normalized === \"agile\" ||\n normalized === \"ops\" ||\n normalized === \"research\"\n ) {\n return normalized;\n }\n throw new Error(\n `Invalid type preset \"${rawValue}\". Allowed: ${TYPE_PRESET_NAMES.join(\", \")}.`,\n );\n}\n\n/** Returns the normalized add-type inputs for a preset, in the order they should be upserted. Each raw definition is run through normalizeAddTypeInput so callers get the same validated shape as an individual `add-type` invocation. */\nexport function resolveTypePresetDefinitions(\n preset: TypePresetName,\n): NormalizedAddTypeInput[] {\n return TYPE_PRESET_DEFINITIONS[preset].map((rawDefinition) =>\n normalizeAddTypeInput(rawDefinition),\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AA8BA,IAAM,0BAA0B,IAAI,IAAY,0BAA0B;AAU1E,IAAM,gCAAgC;AACtC,IAAM,kBAAkB,oBAAI,IAAG;AAGxB,IAAM,qBAA0C,IAAI,IACzD,mCAAmC,IAAI,CAAC,eACtC,qBAAqB,WAAW,EAAE,CAAC,EACnC,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;AA0D3B,SAAU,qBAAqB,OAAc;AACjD,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;EACT;AACA,QAAM,WAAW,gBAAgB,IAAI,KAAK;AAC1C,MAAI,aAAa,QAAW;AAC1B,WAAO;EACT;AACA,QAAM,aAAa,MAChB,KAAI,EACJ,YAAW,EACX,WAAW,WAAW,GAAG;AAC5B,MAAI,gBAAgB,QAAQ,+BAA+B;AACzD,2BAAuB,eAAe;EACxC;AACA,kBAAgB,IAAI,OAAO,UA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AAI,CAAC,kBAC1C,sBAAsB,aAAa,CAAC;AAExC;",
|
|
6
6
|
"names": ["definition"]
|
|
7
7
|
}
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
toErrorMessage,
|
|
58
58
|
weekdayOrderIndex,
|
|
59
59
|
writeFileAtomic
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-AHIEDSW2.js";
|
|
61
61
|
|
|
62
62
|
// dist/core/shared/serial-queue.js
|
|
63
63
|
function createSerialQueue() {
|
|
@@ -5334,6 +5334,6 @@ export {
|
|
|
5334
5334
|
mutateItem,
|
|
5335
5335
|
deleteItem
|
|
5336
5336
|
};
|
|
5337
|
-
//# sourceMappingURL=chunk-
|
|
5337
|
+
//# sourceMappingURL=chunk-VXUWCJS7.js.map
|
|
5338
5338
|
|
|
5339
5339
|
//# debugId=6e8722f4-d5ca-5635-868e-dff5b97d6c5a
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getActiveExtensionRegistrations,
|
|
3
3
|
listAllFrontMatterLight,
|
|
4
4
|
readSettings
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NEJKKTCG.js";
|
|
6
6
|
import {
|
|
7
7
|
EXIT_CODE,
|
|
8
8
|
PmCliError,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
pathExists,
|
|
11
11
|
resolveItemTypeRegistry,
|
|
12
12
|
resolvePmRoot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-66YL6RR5.js";
|
|
14
14
|
|
|
15
15
|
// dist/cli/commands/deps.js
|
|
16
16
|
!(function() {
|
|
@@ -220,4 +220,4 @@ export {
|
|
|
220
220
|
DEPS_COLLAPSE_VALUES,
|
|
221
221
|
runDeps
|
|
222
222
|
};
|
|
223
|
-
//# sourceMappingURL=chunk-
|
|
223
|
+
//# sourceMappingURL=chunk-WBMARQCV.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
serializeStatusDefsFile,
|
|
17
17
|
upsertField,
|
|
18
18
|
upsertStatusDef
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VMGK6ESD.js";
|
|
20
20
|
import {
|
|
21
21
|
assertAliasesAvailable,
|
|
22
22
|
assertTypeFolderAvailable,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
removeItemType,
|
|
28
28
|
serializeItemTypesFile,
|
|
29
29
|
upsertItemType
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-L23NAJHL.js";
|
|
31
31
|
import {
|
|
32
32
|
acquireLock,
|
|
33
33
|
getActiveExtensionRegistrations,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
readSettings,
|
|
37
37
|
resolveGovernanceKnobs,
|
|
38
38
|
runActiveOnWriteHooks
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-NEJKKTCG.js";
|
|
40
40
|
import {
|
|
41
41
|
DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
|
|
42
42
|
EXIT_CODE,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
resolveRuntimeStatusRegistry,
|
|
53
53
|
toDefaultFolder,
|
|
54
54
|
writeFileAtomic
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-66YL6RR5.js";
|
|
56
56
|
|
|
57
57
|
// dist/cli/commands/schema.js
|
|
58
58
|
import path from "node:path";
|
|
@@ -1246,4 +1246,4 @@ export {
|
|
|
1246
1246
|
formatSchemaInferTypesHuman,
|
|
1247
1247
|
_testOnlySchemaCommand
|
|
1248
1248
|
};
|
|
1249
|
-
//# sourceMappingURL=chunk-
|
|
1249
|
+
//# sourceMappingURL=chunk-WZDABROA.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
replayToItemDocument,
|
|
10
10
|
tryApplyReplayPatch,
|
|
11
11
|
verifyHistoryChain
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AS62PEJE.js";
|
|
13
13
|
import {
|
|
14
14
|
acquireLock,
|
|
15
15
|
canonicalDocument,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resolveGovernanceKnobs,
|
|
25
25
|
runActiveOnWriteHooks,
|
|
26
26
|
serializeItemDocument
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-NEJKKTCG.js";
|
|
28
28
|
import {
|
|
29
29
|
EXIT_CODE,
|
|
30
30
|
PmCliError,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
resolveItemTypeRegistry,
|
|
37
37
|
resolvePmRoot,
|
|
38
38
|
writeFileAtomic
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-66YL6RR5.js";
|
|
40
40
|
|
|
41
41
|
// dist/cli/commands/history-redact.js
|
|
42
42
|
import fs2 from "node:fs/promises";
|
|
@@ -656,4 +656,4 @@ export {
|
|
|
656
656
|
runHistoryRedact,
|
|
657
657
|
_testOnly
|
|
658
658
|
};
|
|
659
|
-
//# sourceMappingURL=chunk-
|
|
659
|
+
//# sourceMappingURL=chunk-XG5GVZRX.js.map
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
loadMutationCheckpoint,
|
|
4
4
|
restoreCheckpointItems,
|
|
5
5
|
writeMutationCheckpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OUQ4I6HC.js";
|
|
7
7
|
import {
|
|
8
8
|
runRestore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PHQPQNAT.js";
|
|
10
10
|
import {
|
|
11
11
|
runUpdate
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O5ELBOEJ.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveAuthor
|
|
15
15
|
} from "./chunk-YRYYFGV3.js";
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
} from "./chunk-KWYX6ZIR.js";
|
|
19
19
|
import {
|
|
20
20
|
runList
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GFBV2254.js";
|
|
22
22
|
import {
|
|
23
23
|
resolvePriority
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TYCM65DJ.js";
|
|
25
25
|
import {
|
|
26
26
|
applyTagRemovals,
|
|
27
27
|
mergeAdditiveTags,
|
|
28
28
|
parseTags
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-OKUFGORG.js";
|
|
30
30
|
import {
|
|
31
31
|
buildInvalidTypeError
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-L23NAJHL.js";
|
|
33
33
|
import {
|
|
34
34
|
collectRuntimeUpdateFieldValues,
|
|
35
35
|
getActiveExtensionRegistrations,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
resolveIsoOrRelative,
|
|
40
40
|
stableValueEquals,
|
|
41
41
|
toItemRecord
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-NEJKKTCG.js";
|
|
43
43
|
import {
|
|
44
44
|
EXIT_CODE,
|
|
45
45
|
PmCliError,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
resolveRuntimeStatusRegistry,
|
|
53
53
|
resolveTypeName,
|
|
54
54
|
toErrorMessage
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-66YL6RR5.js";
|
|
56
56
|
|
|
57
57
|
// dist/cli/commands/update-many.js
|
|
58
58
|
!(function() {
|
|
@@ -649,4 +649,4 @@ export {
|
|
|
649
649
|
runUpdateMany,
|
|
650
650
|
_testOnlyUpdateManyCommand
|
|
651
651
|
};
|
|
652
|
-
//# sourceMappingURL=chunk-
|
|
652
|
+
//# sourceMappingURL=chunk-XGCPTS6L.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
parseItemDocument,
|
|
5
5
|
runActiveOnWriteHooks,
|
|
6
6
|
serializeItemDocument
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VXUWCJS7.js";
|
|
8
8
|
import {
|
|
9
9
|
TYPE_TO_FOLDER,
|
|
10
10
|
getItemFormatFromPath,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
readFileIfExists,
|
|
13
13
|
removeFileIfExists,
|
|
14
14
|
writeFileAtomic
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AHIEDSW2.js";
|
|
16
16
|
|
|
17
17
|
// dist/core/store/item-format-migration.js
|
|
18
18
|
import fs from "node:fs/promises";
|
|
@@ -117,6 +117,6 @@ async function migrateItemFilesToFormat(pmRoot, targetFormat, op = "item_format:
|
|
|
117
117
|
export {
|
|
118
118
|
migrateItemFilesToFormat
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-Y44B5FBE.js.map
|
|
121
121
|
|
|
122
122
|
//# debugId=0127ef28-92b7-5eba-be4e-2a3dd130f4a2
|