@unbrained/pm-cli 2026.7.20 → 2026.7.21
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 +11 -0
- package/dist/cli/commander-usage.d.ts +1 -1
- package/dist/cli/commander-usage.js +5 -5
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/completion.js +13 -5
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +2 -0
- package/dist/cli/error-guidance.js +7 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/main.d.ts +1 -5
- package/dist/cli/main.js +12 -50
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +13 -3
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +45 -3
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-structured-mutation.d.ts +14 -0
- package/dist/cli/register-structured-mutation.js +62 -0
- package/dist/cli/register-structured-mutation.js.map +1 -0
- package/dist/cli/registration-helpers.js +5 -3
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +280 -296
- package/dist/cli-bundle/chunks/{append-E6V54WOQ.js → append-7OVFYR3C.js} +3 -3
- package/dist/cli-bundle/chunks/{append-NNJ3EFIT.js → append-DFETHAZL.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-C3KD7U3T.js → chunk-2L6ZP22J.js} +241 -10
- package/dist/cli-bundle/chunks/chunk-2L6ZP22J.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KZEANWJS.js → chunk-4PUUNQDV.js} +98 -30
- package/dist/cli-bundle/chunks/chunk-4PUUNQDV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RDV4ZFYS.js → chunk-4QOB7L7I.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-RDV4ZFYS.js.map → chunk-4QOB7L7I.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3LPFHE3P.js → chunk-4QSQ6XDK.js} +62 -20
- package/dist/cli-bundle/chunks/chunk-4QSQ6XDK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QJKL5PHS.js → chunk-7656MAUL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3AO5VSDR.js → chunk-7RW4JCU2.js} +328 -6
- package/dist/cli-bundle/chunks/chunk-7RW4JCU2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X6K5XTTN.js → chunk-7W2UAXXT.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-SSKOQNMS.js → chunk-ABWCF646.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-SSKOQNMS.js.map → chunk-ABWCF646.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WVA4DVNV.js → chunk-ADBTSVGK.js} +71 -33
- package/dist/cli-bundle/chunks/chunk-ADBTSVGK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-J4FBIFU6.js → chunk-AELMUANP.js} +12 -6
- package/dist/cli-bundle/chunks/chunk-AELMUANP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4F6BWJ4J.js → chunk-AMJPSANK.js} +57 -36
- package/dist/cli-bundle/chunks/chunk-AMJPSANK.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6VIJ7UA5.js → chunk-AS4SAZ5R.js} +850 -819
- package/dist/cli-bundle/chunks/chunk-AS4SAZ5R.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SG74J6MV.js → chunk-ATBCUC7Y.js} +574 -5
- package/dist/cli-bundle/chunks/chunk-ATBCUC7Y.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5OK4UGFV.js → chunk-BXNDKOR2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KSPWRNVP.js → chunk-CPX275C6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JH2ZSLO3.js → chunk-DZRV2OPA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L7BH7IWU.js → chunk-E5XMKOSB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CQTQKUUV.js → chunk-EWJWSNRU.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DAQ45GCS.js → chunk-F2LBF7XJ.js} +22 -15
- package/dist/cli-bundle/chunks/chunk-F2LBF7XJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6XMUURSS.js → chunk-FJIFFBJX.js} +64 -33
- package/dist/cli-bundle/chunks/chunk-FJIFFBJX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E7ICD63T.js → chunk-FO6OSVEN.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-E7ICD63T.js.map → chunk-FO6OSVEN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3MCTMJXI.js → chunk-FPBMLYPI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UZDQXNUB.js → chunk-FSE2IKJQ.js} +46 -5
- package/dist/cli-bundle/chunks/chunk-FSE2IKJQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IX677TRO.js → chunk-GKX4NJ7U.js} +8 -10
- package/dist/cli-bundle/chunks/{chunk-IX677TRO.js.map → chunk-GKX4NJ7U.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DVDBQA3B.js → chunk-GTK4DTEW.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-H7EAER5L.js +974 -0
- package/dist/cli-bundle/chunks/chunk-H7EAER5L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5UX66S6U.js → chunk-ICDAQ4TD.js} +316 -8
- package/dist/cli-bundle/chunks/chunk-ICDAQ4TD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YQQNAKW3.js → chunk-JFD5LPMI.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-YQQNAKW3.js.map → chunk-JFD5LPMI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QANSTTC7.js → chunk-JXCW2TI2.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-QANSTTC7.js.map → chunk-JXCW2TI2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GSJSM5BJ.js → chunk-K36WV5J6.js} +76 -13
- package/dist/cli-bundle/chunks/chunk-K36WV5J6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GVI6FAFG.js → chunk-K55VMLSS.js} +7 -5
- package/dist/cli-bundle/chunks/chunk-K55VMLSS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GIQSU6S2.js → chunk-KBLZ3AA5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XJF7CDNH.js → chunk-KH44WBAT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GV2262OF.js → chunk-LAV26CQG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VDO2JMD4.js → chunk-LVC72YRD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3VY6MIEO.js → chunk-LZYP423P.js} +35 -6
- package/dist/cli-bundle/chunks/chunk-LZYP423P.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZYPFOO3L.js → chunk-MATHDCGG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OV7MSW3I.js → chunk-MWQ2HC2A.js} +99 -31
- package/dist/cli-bundle/chunks/chunk-MWQ2HC2A.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NHT3F4WZ.js → chunk-NUF7ROFH.js} +840 -816
- package/dist/cli-bundle/chunks/chunk-NUF7ROFH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AOEOYL3S.js → chunk-O4BCOJTZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RJO3YAFM.js → chunk-OCUBRA6D.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5IZJWSDB.js → chunk-OG5DVFMA.js} +22 -15
- package/dist/cli-bundle/chunks/chunk-OG5DVFMA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-I577UHC7.js → chunk-OR42SO64.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZOJ3LR7O.js → chunk-OY7DMU5P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HEWM6CEN.js → chunk-P7MTHPJQ.js} +50 -9
- package/dist/cli-bundle/chunks/chunk-P7MTHPJQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2BO4CA46.js → chunk-PFNHX655.js} +236 -12
- package/dist/cli-bundle/chunks/{chunk-2BO4CA46.js.map → chunk-PFNHX655.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZV2NTVMJ.js → chunk-PONKZPCJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-THAOZG4U.js → chunk-PQSEQD6E.js} +8 -6
- package/dist/cli-bundle/chunks/chunk-PQSEQD6E.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-PWDEHT3L.js +991 -0
- package/dist/cli-bundle/chunks/chunk-PWDEHT3L.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UX6SSO2I.js → chunk-PZC2FUOQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WUVEBQW6.js → chunk-QG4GFLQ6.js} +3 -5
- package/dist/cli-bundle/chunks/{chunk-WUVEBQW6.js.map → chunk-QG4GFLQ6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VQIHNHMJ.js → chunk-QIH77CAG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-R3EWPG4A.js → chunk-QJIKE24M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QLZ643FM.js → chunk-QOOTOD3W.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-QLZ643FM.js.map → chunk-QOOTOD3W.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MYSS5H2A.js → chunk-R3P6FZJW.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-MYSS5H2A.js.map → chunk-R3P6FZJW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-G3COA6GS.js → chunk-RNPZYNHS.js} +56 -35
- package/dist/cli-bundle/chunks/chunk-RNPZYNHS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-T44FMVRL.js → chunk-RPESLSO5.js} +62 -20
- package/dist/cli-bundle/chunks/chunk-RPESLSO5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-INSTSQNZ.js → chunk-SY4SFZSD.js} +595 -3
- package/dist/cli-bundle/chunks/chunk-SY4SFZSD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HB3P4M52.js → chunk-TRSHFPRZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HRW7GF6T.js → chunk-UCBDQI5E.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4U4Z6AHI.js → chunk-V22ZPOKN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JM6YAXTR.js → chunk-VHXHVTUU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LPEYZRUR.js → chunk-VJQG4BIM.js} +35 -6
- package/dist/cli-bundle/chunks/chunk-VJQG4BIM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D6NXDNP3.js → chunk-VLRGDBLY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JAPE62Y5.js → chunk-VNTCM3VW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-FDHPAVVB.js → chunk-VXOOB6YX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GFQP7HAZ.js → chunk-VZIZB6QH.js} +3 -5
- package/dist/cli-bundle/chunks/{chunk-GFQP7HAZ.js.map → chunk-VZIZB6QH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HQ3SB4CN.js → chunk-X3W65QK3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RZJLNXFG.js → chunk-XJTABV3X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GVT754PX.js → chunk-YCIUJJOD.js} +11 -5
- package/dist/cli-bundle/chunks/chunk-YCIUJJOD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IJNK6WW2.js → chunk-Z75ONV25.js} +75 -12
- package/dist/cli-bundle/chunks/chunk-Z75ONV25.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4L23AGQ7.js → chunk-Z7VWXXJM.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-4L23AGQ7.js.map → chunk-Z7VWXXJM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YBT7O4KT.js → chunk-ZTVA4KLN.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-YBT7O4KT.js.map → chunk-ZTVA4KLN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TYHJDFYW.js → chunk-ZVZGXPQ5.js} +2 -2
- package/dist/cli-bundle/chunks/{close-many-SDA426VT.js → close-many-5RZXVN4J.js} +5 -6
- package/dist/cli-bundle/chunks/{close-many-UTZANOCQ.js → close-many-RZVTUGBG.js} +5 -6
- package/dist/cli-bundle/chunks/{comments-LZN6FXXC.js → comments-TPU7QRBL.js} +4 -4
- package/dist/cli-bundle/chunks/{comments-VBQ345ND.js → comments-Z4KV6FU3.js} +4 -4
- package/dist/cli-bundle/chunks/{create-GG4RBCGC.js → create-EIFBIVNQ.js} +6 -6
- package/dist/cli-bundle/chunks/{create-JBC5KUW6.js → create-RGSPN5GD.js} +6 -6
- package/dist/cli-bundle/chunks/{deps-FI4O6NQS.js → deps-UH5EQQUY.js} +3 -3
- package/dist/cli-bundle/chunks/{deps-DELOO4TL.js → deps-YG7UF3VR.js} +3 -3
- package/dist/cli-bundle/chunks/{docs-6Z2MP526.js → docs-G32TK6XS.js} +4 -4
- package/dist/cli-bundle/chunks/{docs-2UYBP5D6.js → docs-JWWNRC27.js} +4 -4
- package/dist/cli-bundle/chunks/{files-HKEAN5MA.js → files-3H32UQ4K.js} +4 -4
- package/dist/cli-bundle/chunks/{files-HEUGSJZL.js → files-4ALMCSKB.js} +4 -4
- package/dist/cli-bundle/chunks/{history-compact-7NDVP3PT.js → history-compact-77BT2LUB.js} +3 -4
- package/dist/cli-bundle/chunks/{history-compact-65YVN5DB.js → history-compact-VCKGTX64.js} +3 -4
- package/dist/cli-bundle/chunks/{history-redact-7YBL4XSG.js → history-redact-LJPZPNFA.js} +2 -3
- package/dist/cli-bundle/chunks/{history-redact-IZGNJBU4.js → history-redact-PWTTJ3XS.js} +2 -3
- package/dist/cli-bundle/chunks/{history-repair-7M4PYQUH.js → history-repair-I7CBNCV3.js} +5 -6
- package/dist/cli-bundle/chunks/{history-repair-GNGETJLI.js → history-repair-YTDZRK5E.js} +5 -6
- package/dist/cli-bundle/chunks/{learnings-3YXDRWFT.js → learnings-CYNOICKR.js} +4 -4
- package/dist/cli-bundle/chunks/{learnings-ALC6IMNL.js → learnings-KTYW3AL7.js} +4 -4
- package/dist/cli-bundle/chunks/{notes-7JMLQ447.js → notes-FGO63FXL.js} +4 -4
- package/dist/cli-bundle/chunks/{notes-JFCLTC5C.js → notes-ZERD3KB2.js} +4 -4
- package/dist/cli-bundle/chunks/{plan-T3XB3WTK.js → plan-OFJUBIM5.js} +7 -7
- package/dist/cli-bundle/chunks/{plan-KOIPWVOZ.js → plan-SGCDDTYR.js} +7 -7
- package/dist/cli-bundle/chunks/{profile-OILJHKUW.js → profile-3THJPIQY.js} +4 -5
- package/dist/cli-bundle/chunks/{profile-RJXA7PGS.js → profile-XEZAMMBW.js} +4 -5
- package/dist/cli-bundle/chunks/{register-list-query-CFVG75P3.js → register-list-query-BR435Q2H.js} +19 -16
- package/dist/cli-bundle/chunks/register-list-query-BR435Q2H.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-E7UVY4TN.js → register-list-query-RWTWLOBE.js} +18 -15
- package/dist/cli-bundle/chunks/register-list-query-RWTWLOBE.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-IQ55E25C.js → register-mutation-HLWC2WNP.js} +167 -31
- package/dist/cli-bundle/chunks/register-mutation-HLWC2WNP.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-4VJTXBZW.js → register-mutation-ZJX5AZM5.js} +173 -30
- package/dist/cli-bundle/chunks/register-mutation-ZJX5AZM5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-AR7RMX4W.js → register-operations-744YBJMV.js} +23 -25
- package/dist/cli-bundle/chunks/{register-operations-AR7RMX4W.js.map → register-operations-744YBJMV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-NOLZGORC.js → register-operations-UEBJH6AN.js} +21 -23
- package/dist/cli-bundle/chunks/{register-operations-NOLZGORC.js.map → register-operations-UEBJH6AN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-EYZ7VTPZ.js → register-setup-5DA4UZXI.js} +7 -8
- package/dist/cli-bundle/chunks/{register-setup-EYZ7VTPZ.js.map → register-setup-5DA4UZXI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-BB77VUEE.js → register-setup-6H25M3BH.js} +9 -10
- package/dist/cli-bundle/chunks/{register-setup-BB77VUEE.js.map → register-setup-6H25M3BH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{restore-ZH65GZFB.js → restore-6TDVSATY.js} +4 -5
- package/dist/cli-bundle/chunks/{restore-L6IAGOD7.js → restore-RSL7C7LO.js} +4 -5
- package/dist/cli-bundle/chunks/{schema-4ERWM5QJ.js → schema-HFXFSGPG.js} +2 -3
- package/dist/cli-bundle/chunks/{schema-55DL3Q52.js → schema-TPVTIJPO.js} +2 -3
- package/dist/cli-bundle/chunks/{update-FW6FKDOP.js → update-LJZCL5SI.js} +7 -7
- package/dist/cli-bundle/chunks/{update-TJHSPRPT.js → update-SIA7LH5Y.js} +7 -7
- package/dist/cli-bundle/chunks/{update-many-PWXX5WHO.js → update-many-BDBZVGQL.js} +11 -12
- package/dist/cli-bundle/chunks/{update-many-NNALYQCN.js → update-many-MOY3A5B3.js} +11 -12
- package/dist/cli-bundle/main.js +60 -85
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +37 -37
- package/dist/cli-bundle/sdk.js +126 -291
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/core/item/parse.d.ts +1 -1
- package/dist/core/item/parse.js +13 -7
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/output/mutation-projection.d.ts +2 -0
- package/dist/core/output/mutation-projection.js +33 -2
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/output/output.d.ts +4 -0
- package/dist/core/output/output.js +18 -13
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/shared/command-types.d.ts +4 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/mcp/server.js +39 -4
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +45 -4
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-bootstrap.d.ts +2 -0
- package/dist/sdk/cli-bootstrap.js +20 -27
- package/dist/sdk/cli-bootstrap.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +21 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +10 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +16 -3
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +6 -2
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/cli-program.js +4 -2
- package/dist/sdk/cli-program.js.map +1 -1
- package/dist/sdk/dependencies.d.ts +3 -2
- package/dist/sdk/dependencies.js +13 -12
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/sdk/error-runtime.d.ts +10 -0
- package/dist/sdk/error-runtime.js +59 -0
- package/dist/sdk/error-runtime.js.map +1 -0
- package/dist/sdk/graph/analytics.d.ts +9 -0
- package/dist/sdk/graph/analytics.js +24 -13
- package/dist/sdk/graph/analytics.js.map +1 -1
- package/dist/sdk/graph/assembly.d.ts +39 -0
- package/dist/sdk/graph/assembly.js +92 -12
- package/dist/sdk/graph/assembly.js.map +1 -1
- package/dist/sdk/graph/cache.d.ts +4 -1
- package/dist/sdk/graph/cache.js +17 -4
- package/dist/sdk/graph/cache.js.map +1 -1
- package/dist/sdk/graph/centrality.d.ts +82 -0
- package/dist/sdk/graph/centrality.js +259 -0
- package/dist/sdk/graph/centrality.js.map +1 -0
- package/dist/sdk/graph/durable-cache.d.ts +71 -0
- package/dist/sdk/graph/durable-cache.js +205 -0
- package/dist/sdk/graph/durable-cache.js.map +1 -0
- package/dist/sdk/graph/governance.d.ts +69 -1
- package/dist/sdk/graph/governance.js +143 -35
- package/dist/sdk/graph/governance.js.map +1 -1
- package/dist/sdk/graph/index.d.ts +7 -4
- package/dist/sdk/graph/index.js +8 -5
- package/dist/sdk/graph/index.js.map +1 -1
- package/dist/sdk/graph/mutation-advisory.d.ts +35 -4
- package/dist/sdk/graph/mutation-advisory.js +124 -35
- package/dist/sdk/graph/mutation-advisory.js.map +1 -1
- package/dist/sdk/graph/remediation.js +12 -2
- package/dist/sdk/graph/remediation.js.map +1 -1
- package/dist/sdk/graph/run.d.ts +133 -2
- package/dist/sdk/graph/run.js +217 -8
- package/dist/sdk/graph/run.js.map +1 -1
- package/dist/sdk/graph/scheduling.d.ts +59 -0
- package/dist/sdk/graph/scheduling.js +125 -0
- package/dist/sdk/graph/scheduling.js.map +1 -0
- package/dist/sdk/graph/traversal.d.ts +11 -0
- package/dist/sdk/graph/traversal.js +16 -2
- package/dist/sdk/graph/traversal.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -0
- package/dist/sdk/index.js +6 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime-input.js +7 -2
- package/dist/sdk/runtime-input.js.map +1 -1
- package/dist/sdk/runtime-primitives.d.ts +10 -0
- package/dist/sdk/runtime-primitives.js +14 -0
- package/dist/sdk/runtime-primitives.js.map +1 -0
- package/dist/sdk/runtime.d.ts +15 -0
- package/dist/sdk/runtime.js +16 -3
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/structured-mutations.d.ts +21 -0
- package/dist/sdk/structured-mutations.js +375 -0
- package/dist/sdk/structured-mutations.js.map +1 -0
- package/docs/COMMANDS.md +85 -5
- package/docs/RELATIONSHIP_GRAPH.md +48 -7
- package/docs/SDK.md +78 -3
- package/marketplace.json +2 -2
- package/package.json +1 -1
- 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/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +5 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/dist/cli-bundle/chunks/chunk-3AO5VSDR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3LPFHE3P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3VY6MIEO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4F6BWJ4J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5IZJWSDB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5UX66S6U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6C2ZZX5Z.js +0 -286
- package/dist/cli-bundle/chunks/chunk-6C2ZZX5Z.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6VIJ7UA5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6XMUURSS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C3KD7U3T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CFHAODHQ.js +0 -334
- package/dist/cli-bundle/chunks/chunk-CFHAODHQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DAQ45GCS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-E6LEMURX.js +0 -249
- package/dist/cli-bundle/chunks/chunk-E6LEMURX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-G3COA6GS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GSJSM5BJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GVI6FAFG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GVT754PX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HEWM6CEN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IJNK6WW2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-INSTSQNZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J4FBIFU6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KZEANWJS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LPEYZRUR.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NHT3F4WZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OV7MSW3I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-P7JTWYLH.js +0 -246
- package/dist/cli-bundle/chunks/chunk-P7JTWYLH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-R5U2VZ3K.js +0 -344
- package/dist/cli-bundle/chunks/chunk-R5U2VZ3K.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SG74J6MV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-T44FMVRL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-THAOZG4U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UQLXSG72.js +0 -289
- package/dist/cli-bundle/chunks/chunk-UQLXSG72.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UZDQXNUB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WVA4DVNV.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-CFVG75P3.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-E7UVY4TN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-4VJTXBZW.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-IQ55E25C.js.map +0 -1
- /package/dist/cli-bundle/chunks/{append-E6V54WOQ.js.map → append-7OVFYR3C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-NNJ3EFIT.js.map → append-DFETHAZL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QJKL5PHS.js.map → chunk-7656MAUL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X6K5XTTN.js.map → chunk-7W2UAXXT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5OK4UGFV.js.map → chunk-BXNDKOR2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KSPWRNVP.js.map → chunk-CPX275C6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JH2ZSLO3.js.map → chunk-DZRV2OPA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L7BH7IWU.js.map → chunk-E5XMKOSB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CQTQKUUV.js.map → chunk-EWJWSNRU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3MCTMJXI.js.map → chunk-FPBMLYPI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DVDBQA3B.js.map → chunk-GTK4DTEW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GIQSU6S2.js.map → chunk-KBLZ3AA5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XJF7CDNH.js.map → chunk-KH44WBAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GV2262OF.js.map → chunk-LAV26CQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VDO2JMD4.js.map → chunk-LVC72YRD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZYPFOO3L.js.map → chunk-MATHDCGG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AOEOYL3S.js.map → chunk-O4BCOJTZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RJO3YAFM.js.map → chunk-OCUBRA6D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I577UHC7.js.map → chunk-OR42SO64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZOJ3LR7O.js.map → chunk-OY7DMU5P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZV2NTVMJ.js.map → chunk-PONKZPCJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UX6SSO2I.js.map → chunk-PZC2FUOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VQIHNHMJ.js.map → chunk-QIH77CAG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R3EWPG4A.js.map → chunk-QJIKE24M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HB3P4M52.js.map → chunk-TRSHFPRZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HRW7GF6T.js.map → chunk-UCBDQI5E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4U4Z6AHI.js.map → chunk-V22ZPOKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JM6YAXTR.js.map → chunk-VHXHVTUU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D6NXDNP3.js.map → chunk-VLRGDBLY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JAPE62Y5.js.map → chunk-VNTCM3VW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDHPAVVB.js.map → chunk-VXOOB6YX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HQ3SB4CN.js.map → chunk-X3W65QK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RZJLNXFG.js.map → chunk-XJTABV3X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TYHJDFYW.js.map → chunk-ZVZGXPQ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-SDA426VT.js.map → close-many-5RZXVN4J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-UTZANOCQ.js.map → close-many-RZVTUGBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-LZN6FXXC.js.map → comments-TPU7QRBL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-VBQ345ND.js.map → comments-Z4KV6FU3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-GG4RBCGC.js.map → create-EIFBIVNQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JBC5KUW6.js.map → create-RGSPN5GD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-FI4O6NQS.js.map → deps-UH5EQQUY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-DELOO4TL.js.map → deps-YG7UF3VR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-6Z2MP526.js.map → docs-G32TK6XS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-2UYBP5D6.js.map → docs-JWWNRC27.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-HKEAN5MA.js.map → files-3H32UQ4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-HEUGSJZL.js.map → files-4ALMCSKB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-7NDVP3PT.js.map → history-compact-77BT2LUB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-65YVN5DB.js.map → history-compact-VCKGTX64.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-7YBL4XSG.js.map → history-redact-LJPZPNFA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IZGNJBU4.js.map → history-redact-PWTTJ3XS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-7M4PYQUH.js.map → history-repair-I7CBNCV3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-GNGETJLI.js.map → history-repair-YTDZRK5E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-3YXDRWFT.js.map → learnings-CYNOICKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-ALC6IMNL.js.map → learnings-KTYW3AL7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-7JMLQ447.js.map → notes-FGO63FXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-JFCLTC5C.js.map → notes-ZERD3KB2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-T3XB3WTK.js.map → plan-OFJUBIM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-KOIPWVOZ.js.map → plan-SGCDDTYR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-OILJHKUW.js.map → profile-3THJPIQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-RJXA7PGS.js.map → profile-XEZAMMBW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-ZH65GZFB.js.map → restore-6TDVSATY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-L6IAGOD7.js.map → restore-RSL7C7LO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-4ERWM5QJ.js.map → schema-HFXFSGPG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-55DL3Q52.js.map → schema-TPVTIJPO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-FW6FKDOP.js.map → update-LJZCL5SI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-TJHSPRPT.js.map → update-SIA7LH5Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-PWXX5WHO.js.map → update-many-BDBZVGQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-NNALYQCN.js.map → update-many-MOY3A5B3.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
parseAnnotationTextInput,
|
|
5
5
|
resolveAnnotationInput,
|
|
6
6
|
runAnnotationCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TRSHFPRZ.js";
|
|
8
8
|
|
|
9
9
|
// dist/cli/commands/learnings.js
|
|
10
10
|
async function runLearnings(id, options, global) {
|
|
@@ -30,6 +30,6 @@ async function runLearnings(id, options, global) {
|
|
|
30
30
|
export {
|
|
31
31
|
runLearnings
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-7656MAUL.js.map
|
|
34
34
|
|
|
35
35
|
//# debugId=1bec9be5-4967-5914-933d-cf3ebd310ca5
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
refreshMergeAttributeFenceIfInstalled
|
|
3
|
-
} from "./chunk-R5U2VZ3K.js";
|
|
4
1
|
import {
|
|
5
2
|
BUILTIN_STATUS_IDS,
|
|
6
3
|
TYPE_PRESET_NAMES,
|
|
@@ -57,8 +54,323 @@ import {
|
|
|
57
54
|
writeFileAtomic
|
|
58
55
|
} from "./chunk-7AVEY74G.js";
|
|
59
56
|
|
|
60
|
-
// dist/sdk/
|
|
57
|
+
// dist/sdk/workspace.js
|
|
58
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
61
59
|
import path from "node:path";
|
|
60
|
+
!(function() {
|
|
61
|
+
try {
|
|
62
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
63
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2ebcdfcf-c29b-50d6-940d-299d7699059a");
|
|
64
|
+
} catch (e2) {
|
|
65
|
+
}
|
|
66
|
+
})();
|
|
67
|
+
var PM_GITIGNORE_START = "# pm-cli:runtime-cache:start";
|
|
68
|
+
var PM_GITIGNORE_END = "# pm-cli:runtime-cache:end";
|
|
69
|
+
var PM_GITIGNORE_DEFAULT_TRACKER_ROOT = ".agents/pm";
|
|
70
|
+
var PM_GITIGNORE_RUNTIME_DIRECTORIES = [
|
|
71
|
+
"runtime/",
|
|
72
|
+
"search/",
|
|
73
|
+
"locks/",
|
|
74
|
+
"transactions/",
|
|
75
|
+
"checkpoints/"
|
|
76
|
+
];
|
|
77
|
+
function normalizeTrackerRelativeRoot(trackerRelativeRoot) {
|
|
78
|
+
return trackerRelativeRoot.replaceAll("\\", "/").replace(/^\.\/+/, "").replace(/\/+$/, "");
|
|
79
|
+
}
|
|
80
|
+
function isPathOutsideRoot(relativePath) {
|
|
81
|
+
const normalized = relativePath.replaceAll("\\", "/");
|
|
82
|
+
return path.isAbsolute(relativePath) || normalized === ".." || normalized.startsWith("../");
|
|
83
|
+
}
|
|
84
|
+
function getPmGitignoreBlock(trackerRelativeRoot = PM_GITIGNORE_DEFAULT_TRACKER_ROOT) {
|
|
85
|
+
const root = normalizeTrackerRelativeRoot(trackerRelativeRoot);
|
|
86
|
+
return [
|
|
87
|
+
PM_GITIGNORE_START,
|
|
88
|
+
...PM_GITIGNORE_RUNTIME_DIRECTORIES.map((directory) => `${root}/${directory}`),
|
|
89
|
+
PM_GITIGNORE_END
|
|
90
|
+
].join("\n");
|
|
91
|
+
}
|
|
92
|
+
async function ensurePmGitignore(workspaceRoot, options = {}) {
|
|
93
|
+
const gitignorePath = path.join(workspaceRoot, ".gitignore");
|
|
94
|
+
let trackerRelativeRoot = PM_GITIGNORE_DEFAULT_TRACKER_ROOT;
|
|
95
|
+
if (options.pmRoot !== void 0) {
|
|
96
|
+
const relative = normalizeTrackerRelativeRoot(path.relative(path.resolve(workspaceRoot), path.resolve(options.pmRoot)));
|
|
97
|
+
if (isPathOutsideRoot(relative)) {
|
|
98
|
+
return { path: gitignorePath, changed: false };
|
|
99
|
+
}
|
|
100
|
+
if (relative.length > 0) {
|
|
101
|
+
trackerRelativeRoot = relative;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
let current = "";
|
|
105
|
+
try {
|
|
106
|
+
current = await readFile(gitignorePath, "utf8");
|
|
107
|
+
} catch (error) {
|
|
108
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) {
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const start = current.indexOf(PM_GITIGNORE_START);
|
|
113
|
+
const end = current.indexOf(PM_GITIGNORE_END);
|
|
114
|
+
const withoutManagedBlock = start >= 0 && end >= start ? `${current.slice(0, start)}${current.slice(end + PM_GITIGNORE_END.length)}` : current;
|
|
115
|
+
const prefix = withoutManagedBlock.trimEnd();
|
|
116
|
+
const next = `${prefix.length > 0 ? `${prefix}
|
|
117
|
+
|
|
118
|
+
` : ""}${getPmGitignoreBlock(trackerRelativeRoot)}
|
|
119
|
+
`;
|
|
120
|
+
if (next === current) {
|
|
121
|
+
return { path: gitignorePath, changed: false };
|
|
122
|
+
}
|
|
123
|
+
await writeFile(gitignorePath, next, "utf8");
|
|
124
|
+
return { path: gitignorePath, changed: true };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// dist/sdk/merge/install.js
|
|
128
|
+
import { readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
129
|
+
import { execFile } from "node:child_process";
|
|
130
|
+
import path2 from "node:path";
|
|
131
|
+
import { promisify } from "node:util";
|
|
132
|
+
!(function() {
|
|
133
|
+
try {
|
|
134
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
135
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "86f1b43a-3b30-5791-ba03-fc362dfe5585");
|
|
136
|
+
} catch (e2) {
|
|
137
|
+
}
|
|
138
|
+
})();
|
|
139
|
+
var execFileAsync = promisify(execFile);
|
|
140
|
+
var PM_GITATTRIBUTES_START = "# pm-cli:merge-drivers:start";
|
|
141
|
+
var PM_GITATTRIBUTES_END = "# pm-cli:merge-drivers:end";
|
|
142
|
+
var MERGE_FENCE_LOCK_ID = "merge-fence";
|
|
143
|
+
var MERGE_DRIVER_DEFINITIONS = [
|
|
144
|
+
{
|
|
145
|
+
key: "pm-item-toon",
|
|
146
|
+
name: "pm field-aware TOON item document merge",
|
|
147
|
+
artifact: "item",
|
|
148
|
+
itemPath: "item.toon"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
key: "pm-item-markdown",
|
|
152
|
+
name: "pm field-aware JSON-markdown item document merge",
|
|
153
|
+
artifact: "item",
|
|
154
|
+
itemPath: "item.md"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
key: "pm-history",
|
|
158
|
+
name: "pm append-only history stream merge",
|
|
159
|
+
artifact: "history",
|
|
160
|
+
itemPath: void 0
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
key: "pm-relationship",
|
|
164
|
+
name: "pm append-only relationship event store merge",
|
|
165
|
+
artifact: "relationship",
|
|
166
|
+
itemPath: void 0
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
key: "pm-json",
|
|
170
|
+
name: "pm key-level JSON config merge",
|
|
171
|
+
artifact: "json",
|
|
172
|
+
itemPath: void 0
|
|
173
|
+
}
|
|
174
|
+
];
|
|
175
|
+
async function resolveGitWorkspaceRoot(cwd) {
|
|
176
|
+
try {
|
|
177
|
+
const { stdout } = await execFileAsync("git", ["rev-parse", "--show-toplevel"], { cwd, encoding: "utf8", windowsHide: true, timeout: 1e4 });
|
|
178
|
+
return stdout.trim();
|
|
179
|
+
} catch {
|
|
180
|
+
throw new PmCliError("pm merge install requires a git repository (merge drivers are git configuration).", EXIT_CODE.USAGE);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function toPosixRelative(fromPath, toPath) {
|
|
184
|
+
return path2.relative(fromPath, toPath).replaceAll("\\", "/");
|
|
185
|
+
}
|
|
186
|
+
function quoteGitAttributePattern(value) {
|
|
187
|
+
return `"${value.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
|
188
|
+
}
|
|
189
|
+
function buildMergeAttributePatterns(trackerRelativeRoot, typeFolders) {
|
|
190
|
+
const prefix = trackerRelativeRoot.length > 0 ? `${trackerRelativeRoot}/` : "";
|
|
191
|
+
const patterns = [];
|
|
192
|
+
for (const folder of typeFolders) {
|
|
193
|
+
patterns.push(`${quoteGitAttributePattern(`${prefix}${folder}/*.toon`)} merge=pm-item-toon`);
|
|
194
|
+
patterns.push(`${quoteGitAttributePattern(`${prefix}${folder}/*.md`)} merge=pm-item-markdown`);
|
|
195
|
+
}
|
|
196
|
+
patterns.push(`${quoteGitAttributePattern(`${prefix}**/*.jsonl`)} merge=pm-relationship`);
|
|
197
|
+
patterns.push(`${quoteGitAttributePattern(`${prefix}history/*.jsonl`)} merge=pm-history`);
|
|
198
|
+
patterns.push(`${quoteGitAttributePattern(`${prefix}settings.json`)} merge=pm-json`);
|
|
199
|
+
patterns.push(`${quoteGitAttributePattern(`${prefix}schema/*.json`)} merge=pm-json`);
|
|
200
|
+
return patterns;
|
|
201
|
+
}
|
|
202
|
+
async function reconcileGitattributesBlock(workspaceRoot, patterns, dryRun) {
|
|
203
|
+
const gitattributesPath = path2.join(workspaceRoot, ".gitattributes");
|
|
204
|
+
let current = "";
|
|
205
|
+
try {
|
|
206
|
+
current = await readFile2(gitattributesPath, "utf8");
|
|
207
|
+
} catch (error) {
|
|
208
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) {
|
|
209
|
+
throw error;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const block = [
|
|
213
|
+
PM_GITATTRIBUTES_START,
|
|
214
|
+
...patterns,
|
|
215
|
+
PM_GITATTRIBUTES_END
|
|
216
|
+
].join("\n");
|
|
217
|
+
const start = current.indexOf(PM_GITATTRIBUTES_START);
|
|
218
|
+
const end = current.indexOf(PM_GITATTRIBUTES_END);
|
|
219
|
+
const withoutManagedBlock = start >= 0 && end > start ? `${current.slice(0, start)}${current.slice(end + PM_GITATTRIBUTES_END.length)}` : current.replace(PM_GITATTRIBUTES_START, "").replace(PM_GITATTRIBUTES_END, "");
|
|
220
|
+
const prefix = withoutManagedBlock.trimEnd();
|
|
221
|
+
const next = `${prefix.length > 0 ? `${prefix}
|
|
222
|
+
|
|
223
|
+
` : ""}${block}
|
|
224
|
+
`;
|
|
225
|
+
if (next === current) {
|
|
226
|
+
return { path: gitattributesPath, changed: false };
|
|
227
|
+
}
|
|
228
|
+
if (!dryRun) {
|
|
229
|
+
await writeFile2(gitattributesPath, next, "utf8");
|
|
230
|
+
}
|
|
231
|
+
return { path: gitattributesPath, changed: true };
|
|
232
|
+
}
|
|
233
|
+
async function auditMergeAttributeFence(pmRoot, typeFolders) {
|
|
234
|
+
const resolvedRoot = path2.resolve(pmRoot);
|
|
235
|
+
let fenceDirectory = null;
|
|
236
|
+
let fenceContent = "";
|
|
237
|
+
let directory = resolvedRoot;
|
|
238
|
+
for (let depth = 0; depth < 8; depth += 1) {
|
|
239
|
+
const candidate = path2.join(directory, ".gitattributes");
|
|
240
|
+
try {
|
|
241
|
+
const raw = await readFile2(candidate, "utf8");
|
|
242
|
+
if (raw.includes(PM_GITATTRIBUTES_START)) {
|
|
243
|
+
fenceDirectory = directory;
|
|
244
|
+
fenceContent = raw;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
} catch {
|
|
248
|
+
}
|
|
249
|
+
const parent = path2.dirname(directory);
|
|
250
|
+
if (parent === directory) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
directory = parent;
|
|
254
|
+
}
|
|
255
|
+
if (fenceDirectory === null) {
|
|
256
|
+
return { status: "not_installed", missing_patterns: [], stale_patterns: [] };
|
|
257
|
+
}
|
|
258
|
+
const fencePath = path2.join(fenceDirectory, ".gitattributes");
|
|
259
|
+
const start = fenceContent.indexOf(PM_GITATTRIBUTES_START);
|
|
260
|
+
const end = fenceContent.indexOf(PM_GITATTRIBUTES_END);
|
|
261
|
+
const committed = end > start ? fenceContent.slice(start + PM_GITATTRIBUTES_START.length, end).split("\n").map((line) => line.trim()).filter((line) => line.length > 0) : [];
|
|
262
|
+
const expected = buildMergeAttributePatterns(toPosixRelative(fenceDirectory, resolvedRoot), typeFolders);
|
|
263
|
+
const committedSet = new Set(committed);
|
|
264
|
+
const expectedSet = new Set(expected);
|
|
265
|
+
const missing = expected.filter((line) => !committedSet.has(line));
|
|
266
|
+
const stale = committed.filter((line) => !expectedSet.has(line));
|
|
267
|
+
return {
|
|
268
|
+
status: missing.length > 0 || stale.length > 0 ? "drift" : "ok",
|
|
269
|
+
path: fencePath,
|
|
270
|
+
missing_patterns: missing,
|
|
271
|
+
stale_patterns: stale
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
async function refreshMergeAttributeFenceIfInstalled(pmRoot) {
|
|
275
|
+
let workspaceRoot;
|
|
276
|
+
try {
|
|
277
|
+
workspaceRoot = await resolveGitWorkspaceRoot(path2.resolve(pmRoot));
|
|
278
|
+
} catch {
|
|
279
|
+
return { status: "no_git" };
|
|
280
|
+
}
|
|
281
|
+
const trackerRelativeRoot = toPosixRelative(workspaceRoot, path2.resolve(pmRoot));
|
|
282
|
+
const lockSettings = await readSettings(pmRoot);
|
|
283
|
+
const owner = (process.env.PM_AUTHOR ?? lockSettings.author_default).trim();
|
|
284
|
+
const releaseLock = await acquireLock(pmRoot, MERGE_FENCE_LOCK_ID, lockSettings.locks.ttl_seconds, owner.length > 0 ? owner : "unknown", false, resolveGovernanceKnobs(lockSettings).force_required_for_stale_lock, lockSettings.locks.wait_ms);
|
|
285
|
+
try {
|
|
286
|
+
const gitattributesPath = path2.join(workspaceRoot, ".gitattributes");
|
|
287
|
+
let current;
|
|
288
|
+
try {
|
|
289
|
+
current = await readFile2(gitattributesPath, "utf8");
|
|
290
|
+
} catch (error) {
|
|
291
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
292
|
+
return { status: "not_installed", path: gitattributesPath };
|
|
293
|
+
}
|
|
294
|
+
throw error;
|
|
295
|
+
}
|
|
296
|
+
if (!current.includes(PM_GITATTRIBUTES_START)) {
|
|
297
|
+
return { status: "not_installed", path: gitattributesPath };
|
|
298
|
+
}
|
|
299
|
+
const settings = await readSettings(pmRoot);
|
|
300
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
301
|
+
const typeFolders = [
|
|
302
|
+
...new Set(Object.values(typeRegistry.type_to_folder))
|
|
303
|
+
].sort((left, right) => left.localeCompare(right));
|
|
304
|
+
const outcome = await reconcileGitattributesBlock(workspaceRoot, buildMergeAttributePatterns(trackerRelativeRoot, typeFolders), false);
|
|
305
|
+
return {
|
|
306
|
+
status: outcome.changed ? "refreshed" : "unchanged",
|
|
307
|
+
path: outcome.path
|
|
308
|
+
};
|
|
309
|
+
} finally {
|
|
310
|
+
await releaseLock();
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
async function runMergeInstall(options, global2) {
|
|
314
|
+
const pmRoot = resolvePmRoot(process.cwd(), global2.path);
|
|
315
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
316
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
317
|
+
}
|
|
318
|
+
const dryRun = options.dryRun === true;
|
|
319
|
+
const workspaceRoot = await resolveGitWorkspaceRoot(process.cwd());
|
|
320
|
+
const trackerRelativeRoot = toPosixRelative(workspaceRoot, path2.resolve(pmRoot));
|
|
321
|
+
if (isPathOutsideRoot(trackerRelativeRoot)) {
|
|
322
|
+
throw new PmCliError(`Tracker root ${pmRoot} is outside the git repository ${workspaceRoot}; there is nothing to configure for this repository.`, EXIT_CODE.USAGE);
|
|
323
|
+
}
|
|
324
|
+
const settings = await readSettings(pmRoot);
|
|
325
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
326
|
+
const typeFolders = [
|
|
327
|
+
...new Set(Object.values(typeRegistry.type_to_folder))
|
|
328
|
+
].sort((left, right) => left.localeCompare(right));
|
|
329
|
+
const patterns = buildMergeAttributePatterns(trackerRelativeRoot, typeFolders);
|
|
330
|
+
const gitattributes = await reconcileGitattributesBlock(workspaceRoot, patterns, dryRun);
|
|
331
|
+
const gitConfigEntries = [];
|
|
332
|
+
for (const definition of MERGE_DRIVER_DEFINITIONS) {
|
|
333
|
+
gitConfigEntries.push({
|
|
334
|
+
key: `merge.${definition.key}.name`,
|
|
335
|
+
value: definition.name
|
|
336
|
+
});
|
|
337
|
+
gitConfigEntries.push({
|
|
338
|
+
key: `merge.${definition.key}.driver`,
|
|
339
|
+
value: `pm merge driver ${definition.artifact} "%O" "%A" "%B"${definition.itemPath === void 0 ? "" : ` --item-path ${definition.itemPath}`}`
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
if (!dryRun) {
|
|
343
|
+
for (const entry of gitConfigEntries) {
|
|
344
|
+
await execFileAsync("git", ["config", entry.key, entry.value], {
|
|
345
|
+
cwd: workspaceRoot,
|
|
346
|
+
encoding: "utf8",
|
|
347
|
+
windowsHide: true,
|
|
348
|
+
timeout: 1e4
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
return {
|
|
353
|
+
ok: true,
|
|
354
|
+
dry_run: dryRun,
|
|
355
|
+
workspace_root: workspaceRoot,
|
|
356
|
+
gitattributes: {
|
|
357
|
+
path: gitattributes.path,
|
|
358
|
+
changed: gitattributes.changed,
|
|
359
|
+
patterns
|
|
360
|
+
},
|
|
361
|
+
git_config: gitConfigEntries,
|
|
362
|
+
guidance: [
|
|
363
|
+
"Commit .gitattributes so every branch and collaborator shares the merge mapping.",
|
|
364
|
+
'git config is per-clone: each collaborator (and each fresh worktree/clone) runs "pm merge install" once.',
|
|
365
|
+
'After merging branches, run "pm validate" and, if history drift is reported, "pm history-repair --all" to reconcile item state with merged history.',
|
|
366
|
+
"Custom item types registered later refresh this fence automatically (pm schema add-type/remove-type); rerun pm merge install only after out-of-band type-folder edits."
|
|
367
|
+
],
|
|
368
|
+
generated_at: nowIso()
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// dist/sdk/schema.js
|
|
373
|
+
import path3 from "node:path";
|
|
62
374
|
import { mkdir } from "node:fs/promises";
|
|
63
375
|
|
|
64
376
|
// dist/core/schema/type-inference.js
|
|
@@ -358,7 +670,7 @@ function typesPathFor(pmRoot, schema) {
|
|
|
358
670
|
async function ensureTypeFolderScaffold(pmRoot, definitions, warnings, op) {
|
|
359
671
|
for (const definition of definitions) {
|
|
360
672
|
const folder = definition.folder ?? toDefaultFolder(definition.name);
|
|
361
|
-
const target =
|
|
673
|
+
const target = path3.join(pmRoot, folder);
|
|
362
674
|
if (await pathExists(target)) {
|
|
363
675
|
continue;
|
|
364
676
|
}
|
|
@@ -1241,6 +1553,16 @@ var _testOnlySchemaCommand = {
|
|
|
1241
1553
|
};
|
|
1242
1554
|
|
|
1243
1555
|
export {
|
|
1556
|
+
PM_GITIGNORE_START,
|
|
1557
|
+
PM_GITIGNORE_END,
|
|
1558
|
+
getPmGitignoreBlock,
|
|
1559
|
+
ensurePmGitignore,
|
|
1560
|
+
PM_GITATTRIBUTES_START,
|
|
1561
|
+
PM_GITATTRIBUTES_END,
|
|
1562
|
+
buildMergeAttributePatterns,
|
|
1563
|
+
auditMergeAttributeFence,
|
|
1564
|
+
refreshMergeAttributeFenceIfInstalled,
|
|
1565
|
+
runMergeInstall,
|
|
1244
1566
|
SCHEMA_SUBCOMMANDS,
|
|
1245
1567
|
runSchemaAddType,
|
|
1246
1568
|
runSchemaRemoveType,
|
|
@@ -1271,4 +1593,4 @@ export {
|
|
|
1271
1593
|
formatSchemaInferTypesHuman,
|
|
1272
1594
|
_testOnlySchemaCommand
|
|
1273
1595
|
};
|
|
1274
|
-
//# sourceMappingURL=chunk-
|
|
1596
|
+
//# sourceMappingURL=chunk-7RW4JCU2.js.map
|