@unbrained/pm-cli 2026.6.30 → 2026.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +26 -0
- package/dist/cli/bootstrap-args.js +89 -79
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.d.ts +2 -0
- package/dist/cli/commander-usage.js +58 -47
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.js +102 -79
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +339 -303
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +89 -68
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.js +157 -129
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +50 -42
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/config.d.ts +2 -0
- package/dist/cli/commands/config.js +443 -879
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.js +365 -287
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +352 -238
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +483 -434
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +46 -39
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/dedupe-merge.js +88 -69
- package/dist/cli/commands/dedupe-merge.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.js +59 -46
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +129 -78
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/managed-state.js +101 -57
- package/dist/cli/commands/extension/managed-state.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +7 -0
- package/dist/cli/commands/extension/scaffold.js +214 -186
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +6 -1
- package/dist/cli/commands/extension.js +1034 -902
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/get.js +114 -81
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +17 -0
- package/dist/cli/commands/health.js +446 -307
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.js +209 -140
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.js +162 -119
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +120 -85
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init.d.ts +8 -2
- package/dist/cli/commands/init.js +263 -162
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list-filter-shared.js +55 -48
- package/dist/cli/commands/list-filter-shared.js.map +1 -1
- package/dist/cli/commands/list.js +152 -102
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.js +49 -32
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/plan.js +373 -298
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/recurrence-parsers.js +43 -25
- package/dist/cli/commands/recurrence-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +21 -5
- package/dist/cli/commands/reindex.js +345 -205
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +8 -7
- package/dist/cli/commands/restore.js +105 -69
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +33 -30
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +10 -2
- package/dist/cli/commands/search.js +595 -536
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/telemetry.js +98 -87
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/test-all.js +237 -168
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -5
- package/dist/cli/commands/test.js +530 -464
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +57 -42
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -1
- package/dist/cli/commands/update.js +764 -747
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +18 -1
- package/dist/cli/commands/validate.js +466 -343
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +399 -357
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-options.js +48 -21
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/main.d.ts +47 -0
- package/dist/cli/main.js +428 -341
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration-gates.js +22 -45
- package/dist/cli/migration-gates.js.map +1 -1
- package/dist/cli/register-list-query.js +94 -105
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +400 -416
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +86 -66
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +120 -101
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +117 -122
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-MVSEND6D.js → activity-CUC4JY3U.js} +9 -9
- package/dist/cli-bundle/chunks/activity-WEIEMM73.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-MOC4TR2G.js → aggregate-DKUTRY6R.js} +109 -85
- package/dist/cli-bundle/chunks/aggregate-DKUTRY6R.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js → aggregate-SW5PNGCS.js} +108 -84
- package/dist/cli-bundle/chunks/{aggregate-XJHLZQ5X.js.map → aggregate-SW5PNGCS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{append-KDHT4GHI.js → append-H32VOR2Y.js} +6 -6
- package/dist/cli-bundle/chunks/{append-LEDBAM3K.js → append-UBM632FK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-Z55WX4IQ.js → chunk-2227673O.js} +158 -114
- package/dist/cli-bundle/chunks/chunk-2227673O.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js → chunk-2ASNV4DH.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js → chunk-2CHRYUXL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QE5UFCCO.js → chunk-2KWL5NPW.js} +42 -27
- package/dist/cli-bundle/chunks/chunk-2KWL5NPW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZEATCVAC.js → chunk-36UGKF4O.js} +21 -29
- package/dist/cli-bundle/chunks/chunk-36UGKF4O.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JZG5ADVE.js → chunk-3AZUFQK6.js} +1103 -963
- package/dist/cli-bundle/chunks/chunk-3AZUFQK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DRPF274X.js → chunk-3LCUASYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js → chunk-3Q2HBMTI.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GF7EAR22.js → chunk-4NUOWFBT.js} +109 -72
- package/dist/cli-bundle/chunks/chunk-4NUOWFBT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js → chunk-55XRYWEG.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-5IRVSKPS.js → chunk-5GVTFFTC.js} +150 -224
- package/dist/cli-bundle/chunks/chunk-5GVTFFTC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CHRNYKNI.js → chunk-5PGBHRY3.js} +41 -26
- package/dist/cli-bundle/chunks/chunk-5PGBHRY3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-53ARXF2O.js → chunk-66Z3X7ZG.js} +261 -161
- package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-A3UNLXNJ.js → chunk-6ITZLD4T.js} +738 -688
- package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JTRKME24.js → chunk-6YCYF2AI.js} +262 -162
- package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RM6MHL6A.js → chunk-6ZMBJRDJ.js} +580 -467
- package/dist/cli-bundle/chunks/chunk-6ZMBJRDJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RPRW26NG.js → chunk-7MYWF4ZX.js} +110 -73
- package/dist/cli-bundle/chunks/chunk-7MYWF4ZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SNUK7H5J.js → chunk-7NSPKJUS.js} +716 -606
- package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KYDYQMNW.js → chunk-7TH5NMVB.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VD3LKZFX.js → chunk-7W4H4K26.js} +739 -689
- package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js → chunk-A6VOGKBA.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js → chunk-AIAIXG7I.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NIBP3I7A.js → chunk-AJEBCRIY.js} +128 -126
- package/dist/cli-bundle/chunks/chunk-AJEBCRIY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js → chunk-B4O5S7I3.js} +79 -57
- package/dist/cli-bundle/chunks/{chunk-VZDBVEZR.js.map → chunk-B4O5S7I3.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5ABGFWR4.js → chunk-BTX5MIQF.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-BVZZN2LH.js +809 -0
- package/dist/cli-bundle/chunks/chunk-BVZZN2LH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js → chunk-CYBDUHNO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js → chunk-CZPVDLD2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FDEVKXC4.js → chunk-EMPGXBUF.js} +22 -30
- package/dist/cli-bundle/chunks/chunk-EMPGXBUF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js → chunk-EUKTMRN3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js → chunk-FFOQHGNH.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js → chunk-GFMSLORL.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-IZQOJR2B.js → chunk-GRRG3MCT.js} +198 -189
- package/dist/cli-bundle/chunks/chunk-GRRG3MCT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js → chunk-H4GRLYJS.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js → chunk-HQTPRV4D.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-CY5IJMUM.js → chunk-I66WE2HE.js} +712 -602
- package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZFIEEDTJ.js → chunk-IEEJQCZ4.js} +509 -363
- package/dist/cli-bundle/chunks/chunk-IEEJQCZ4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DU66JUGT.js → chunk-IG5JYZGU.js} +488 -420
- package/dist/cli-bundle/chunks/chunk-IG5JYZGU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js → chunk-JMK5GCK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js → chunk-JXAUVO6X.js} +258 -169
- package/dist/cli-bundle/chunks/{chunk-LBH7UYKY.js.map → chunk-JXAUVO6X.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js → chunk-K2VYLVX4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js → chunk-KCO2EAN5.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-T7ZMQI4J.js → chunk-KIYCOJ63.js} +198 -189
- package/dist/cli-bundle/chunks/chunk-KIYCOJ63.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js → chunk-KLXF7NCC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3KLX7U7.js → chunk-KN3URLKS.js} +510 -364
- package/dist/cli-bundle/chunks/chunk-KN3URLKS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js → chunk-LRKMWUUV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js → chunk-LTRAF2D7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5T6WPLRO.js → chunk-MNBPX5JS.js} +394 -354
- package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js → chunk-MRD4T5LF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js → chunk-N2JSWVWG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7WDETKGP.js → chunk-N3QCJS4M.js} +1105 -965
- package/dist/cli-bundle/chunks/chunk-N3QCJS4M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KGQ3W65B.js → chunk-NRZS637N.js} +258 -169
- package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OTUJZKGI.js +799 -0
- package/dist/cli-bundle/chunks/chunk-OTUJZKGI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZIE6WXJ2.js → chunk-Q6K2OACU.js} +153 -90
- package/dist/cli-bundle/chunks/chunk-Q6K2OACU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K46GQ265.js → chunk-Q6NXOHS6.js} +489 -421
- package/dist/cli-bundle/chunks/chunk-Q6NXOHS6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js → chunk-QH3FSKRJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UB3V5WUI.js → chunk-RM37OPYK.js} +394 -354
- package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js → chunk-S62UANU7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NO6Y6FB2.js → chunk-SPM2XLWI.js} +37 -28
- package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DORJSBGJ.js → chunk-SYNKD3ZG.js} +127 -125
- package/dist/cli-bundle/chunks/chunk-SYNKD3ZG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6YRAMXRS.js → chunk-SYVUU7EK.js} +581 -468
- package/dist/cli-bundle/chunks/chunk-SYVUU7EK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D5LYZVGB.js → chunk-TPOFWBMY.js} +95 -53
- package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IHXXUIXS.js → chunk-TTHCEV5Q.js} +92 -77
- package/dist/cli-bundle/chunks/chunk-TTHCEV5Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js → chunk-U2BEEM2X.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-Z5BM2FKQ.js → chunk-UGLU6Q2I.js} +91 -76
- package/dist/cli-bundle/chunks/chunk-UGLU6Q2I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js → chunk-UT73HUPC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js → chunk-UTSH5GWX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-AWN4PPH5.js → chunk-UWKEJMZU.js} +157 -113
- package/dist/cli-bundle/chunks/chunk-UWKEJMZU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KTMMTOIP.js → chunk-W47SML5B.js} +152 -89
- package/dist/cli-bundle/chunks/chunk-W47SML5B.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UFKNF23C.js → chunk-WJAMWAHZ.js} +157 -118
- package/dist/cli-bundle/chunks/chunk-WJAMWAHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HIBK6H4S.js → chunk-XCHUVHKU.js} +685 -544
- package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-DJDXAU74.js → chunk-XEWQKDYZ.js} +685 -544
- package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-BOWQWXLI.js → chunk-XTHQWXVC.js} +158 -119
- package/dist/cli-bundle/chunks/chunk-XTHQWXVC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6T5ZIWBS.js → chunk-XWGEMNBR.js} +150 -224
- package/dist/cli-bundle/chunks/chunk-XWGEMNBR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js → chunk-Y4NRKBFW.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WTRUDJ3R.js → chunk-YLZZ6T54.js} +38 -29
- package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js → chunk-YPKFV2JR.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js → chunk-Z4DGFQDH.js} +80 -58
- package/dist/cli-bundle/chunks/{chunk-OKQ22KTH.js.map → chunk-Z4DGFQDH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-BN3CWK6G.js → chunk-ZNHEYCDD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js → chunk-ZNT7KEWE.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js → claim-SENTPZBN.js} +8 -8
- package/dist/cli-bundle/chunks/{claim-6NINZYB3.js → claim-Z7MEQCBT.js} +8 -8
- package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js → close-424MX4CU.js} +7 -7
- package/dist/cli-bundle/chunks/close-YCWQQPDS.js +14 -0
- package/dist/cli-bundle/chunks/{close-many-CXJBOWWY.js → close-many-2IV4J2TR.js} +103 -82
- package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-BFMP6HHK.js → close-many-SWY34BII.js} +102 -81
- package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-ETHABIY6.js → comments-4FGNTSNV.js} +8 -8
- package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js → comments-7YS5MY5X.js} +8 -8
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js +1062 -0
- package/dist/cli-bundle/chunks/config-BZJKK7FZ.js.map +1 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js +1072 -0
- package/dist/cli-bundle/chunks/config-G74GISC4.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js → context-LHVKJSPJ.js} +12 -12
- package/dist/cli-bundle/chunks/{context-XDI4DKKT.js → context-ZQY54JNS.js} +12 -12
- package/dist/cli-bundle/chunks/{contracts-SMOAN5NF.js → contracts-CP2EZJC7.js} +320 -199
- package/dist/cli-bundle/chunks/contracts-CP2EZJC7.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-KP4QAGVW.js → contracts-FIZLMP7O.js} +321 -200
- package/dist/cli-bundle/chunks/contracts-FIZLMP7O.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js → copy-GYNQQPW2.js} +5 -5
- package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js → copy-TLW7JTQT.js} +5 -5
- package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js → create-VSKYSOCD.js} +12 -12
- package/dist/cli-bundle/chunks/create-XTMAPS7I.js +28 -0
- package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js → delete-4W5JYCEG.js} +5 -5
- package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js → delete-ANTOTI2I.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js → deps-HPPE6MJN.js} +5 -5
- package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js → deps-ZQZN54EZ.js} +5 -5
- package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js → docs-RPOVFMP3.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-2TIFR62T.js → docs-XJNYBJGE.js} +7 -7
- package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js → eval-DM6JBZTS.js} +10 -10
- package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js → eval-RFBI5FGS.js} +10 -10
- package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js → extension-B3YY4WY5.js} +11 -10
- package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js → extension-TTSEFQTS.js} +11 -10
- package/dist/cli-bundle/chunks/{files-DF3HO6XK.js → files-5D65CHGE.js} +7 -7
- package/dist/cli-bundle/chunks/{files-T5ODMETM.js → files-GPIG77EN.js} +7 -7
- package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js → focus-C3PEJV2C.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js → focus-ZHN7WIGX.js} +6 -6
- package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js → gc-D4JQ6OWN.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-FULIVYR4.js → gc-VZIXDL32.js} +3 -3
- package/dist/cli-bundle/chunks/{get-VYPIICPC.js → get-GIBRUUOP.js} +121 -81
- package/dist/cli-bundle/chunks/get-GIBRUUOP.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-AWK324RS.js → get-IOVAN6RU.js} +120 -80
- package/dist/cli-bundle/chunks/get-IOVAN6RU.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-Q66C43GN.js → health-L2U3AFKV.js} +437 -264
- package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-FBCVZGSX.js → health-MM7AWXYF.js} +436 -263
- package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +7 -0
- package/dist/cli-bundle/chunks/history-DD7L7BNL.js +18 -0
- package/dist/cli-bundle/chunks/{history-X4OSES6K.js → history-IL7XCEX2.js} +8 -8
- package/dist/cli-bundle/chunks/{history-compact-2GHT32UX.js → history-compact-HALOTOU7.js} +214 -135
- package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-compact-WLCQEKXS.js → history-compact-MV25P7DM.js} +213 -134
- package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +7 -0
- package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js → history-redact-VYCWQFK7.js} +9 -9
- package/dist/cli-bundle/chunks/{history-repair-FY75IC26.js → history-repair-44MODPQF.js} +124 -84
- package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-GABSDSVD.js → history-repair-CPNAOCNF.js} +123 -83
- package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +7 -0
- package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js → init-F27NHENZ.js} +12 -11
- package/dist/cli-bundle/chunks/init-HHVQQP6C.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js → learnings-HJVDQIGY.js} +8 -8
- package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js → learnings-XSFSUUWK.js} +8 -8
- package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js → list-HPMEKCAA.js} +8 -8
- package/dist/cli-bundle/chunks/{list-ROT7JF62.js → list-VMPWTURB.js} +8 -8
- package/dist/cli-bundle/chunks/{next-66BJB4N2.js → next-ETXF2ZCN.js} +59 -37
- package/dist/cli-bundle/chunks/next-ETXF2ZCN.js.map +7 -0
- package/dist/cli-bundle/chunks/{next-N5MWJTBY.js → next-QM6YJIIS.js} +60 -38
- package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-FW6YFLND.js → notes-GDZIKGR6.js} +8 -8
- package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js → notes-WDDBPC4D.js} +8 -8
- package/dist/cli-bundle/chunks/{plan-ZHKZ7JVF.js → plan-BGDR73Z6.js} +373 -279
- package/dist/cli-bundle/chunks/plan-BGDR73Z6.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-DQ7G4EDC.js → plan-C5IMM335.js} +372 -278
- package/dist/cli-bundle/chunks/plan-C5IMM335.js.map +7 -0
- package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js → profile-CCOKZ2IQ.js} +9 -9
- package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js → profile-HUCENIEQ.js} +9 -9
- package/dist/cli-bundle/chunks/{register-list-query-Y2VRHPCL.js → register-list-query-ROSNIL52.js} +80 -83
- package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-KY6Z6WV7.js → register-list-query-XN4ZRHSV.js} +79 -82
- package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-PCARIGZS.js → register-mutation-CFSB2MS3.js} +406 -385
- package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-N6AYSKPM.js → register-mutation-KRLAHEL2.js} +405 -384
- package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-L6CYTOIH.js → register-operations-4PASGJDB.js} +112 -93
- package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-YAT6FUUB.js → register-operations-MBN4KGUM.js} +113 -94
- package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-N7UGXYJC.js → register-setup-VIAWYFP5.js} +129 -104
- package/dist/cli-bundle/chunks/register-setup-VIAWYFP5.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-MPANILQF.js → register-setup-ZCGKHDKL.js} +128 -103
- package/dist/cli-bundle/chunks/register-setup-ZCGKHDKL.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js → restore-4CBWUMCX.js} +9 -9
- package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js → scheduling-shortcuts-6VFKNKCM.js} +12 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js → scheduling-shortcuts-ERHCVTEM.js} +12 -12
- package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js → schema-TDGK6N3I.js} +7 -7
- package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js → schema-UE5KKAUX.js} +7 -7
- package/dist/cli-bundle/chunks/{search-KP6H7COV.js → search-FP7MEU4S.js} +10 -10
- package/dist/cli-bundle/chunks/{search-CX5UMV4H.js → search-K4CFLQ5S.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js → stats-NJJCALEZ.js} +6 -6
- package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js → stats-XT6QRKQY.js} +6 -6
- package/dist/cli-bundle/chunks/{telemetry-DIFPXCAT.js → telemetry-5SQ5UDXC.js} +84 -70
- package/dist/cli-bundle/chunks/telemetry-5SQ5UDXC.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-WTYFUPRL.js → telemetry-HVXFZA2U.js} +85 -71
- package/dist/cli-bundle/chunks/telemetry-HVXFZA2U.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-QNDXZQCW.js → test-UFSJ5YIO.js} +15 -14
- package/dist/cli-bundle/chunks/{test-HU2BS7EY.js → test-YCDAUBWF.js} +15 -14
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js +427 -0
- package/dist/cli-bundle/chunks/test-all-2BWKY3GQ.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js +430 -0
- package/dist/cli-bundle/chunks/test-all-PM7UYN42.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-runs-CA6K32RD.js → test-runs-FK5E75AA.js} +185 -147
- package/dist/cli-bundle/chunks/test-runs-FK5E75AA.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-LANLLPVO.js → test-runs-H4TGWGRN.js} +184 -146
- package/dist/cli-bundle/chunks/test-runs-H4TGWGRN.js.map +7 -0
- package/dist/cli-bundle/chunks/update-MTCFES6X.js +24 -0
- package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js → update-Y5WQVT5O.js} +15 -15
- package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js → update-many-6YAYYRLE.js} +83 -68
- package/dist/cli-bundle/chunks/{update-many-LU3SCNK5.js.map → update-many-6YAYYRLE.js.map} +2 -2
- package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js → update-many-JTKKSA7Y.js} +84 -69
- package/dist/cli-bundle/chunks/{update-many-VW5DGF3S.js.map → update-many-JTKKSA7Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js → upgrade-DTAHZ236.js} +11 -10
- package/dist/cli-bundle/chunks/{upgrade-ICXY244R.js.map → upgrade-DTAHZ236.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js → upgrade-JUDU7YL4.js} +13 -12
- package/dist/cli-bundle/chunks/{upgrade-77FRUAXN.js.map → upgrade-JUDU7YL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-2G566PKQ.js → validate-732RWS5W.js} +440 -319
- package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-BDPVXHHH.js → validate-W7H5TEDC.js} +441 -320
- package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +1 -0
- package/dist/cli-bundle/main.js +986 -1500
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/config/nested-settings.js +89 -67
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/extensions/activation-summary-markdown.js +23 -12
- package/dist/core/extensions/activation-summary-markdown.js.map +1 -1
- package/dist/core/extensions/extension-policy.d.ts +18 -3
- package/dist/core/extensions/extension-policy.js +116 -106
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/loader.js +310 -232
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/governance/metadata-coverage.js +20 -28
- package/dist/core/governance/metadata-coverage.js.map +1 -1
- package/dist/core/history/drift-scan.js +93 -81
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/item-format.js +523 -410
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/item-type-definition.js +14 -14
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/type-registry.js +87 -82
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/output/mutation-projection.js +42 -26
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +34 -28
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +64 -37
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.js +32 -17
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.js +31 -28
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/sentry/instrument.js +54 -43
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +239 -153
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.js +33 -26
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings.js +247 -203
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/test/background-runs.js +189 -160
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/mcp/server.js +387 -367
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +111 -180
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +76 -45
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/compose.d.ts +4 -1
- package/dist/sdk/compose.js +181 -115
- package/dist/sdk/compose.js.map +1 -1
- package/docs/RELEASING.md +2 -3
- package/package.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime.ts +240 -167
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +65 -58
- package/packages/pm-todos/extensions/todos/runtime.ts +65 -42
- package/dist/cli-bundle/chunks/activity-EJBMXUBH.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-MOC4TR2G.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-53ARXF2O.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5IRVSKPS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5T6WPLRO.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6T5ZIWBS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6YRAMXRS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7WDETKGP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-A3UNLXNJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AWN4PPH5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BOWQWXLI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js +0 -115
- package/dist/cli-bundle/chunks/chunk-C2KCIZKZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CHRNYKNI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CY5IJMUM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-D5LYZVGB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DJDXAU74.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DORJSBGJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DU66JUGT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js +0 -118
- package/dist/cli-bundle/chunks/chunk-F6VH3LFC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FDEVKXC4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GF7EAR22.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HIBK6H4S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IHXXUIXS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZQOJR2B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JTRKME24.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JZG5ADVE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-K46GQ265.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KGQ3W65B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KTMMTOIP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KYDYQMNW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NIBP3I7A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NO6Y6FB2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QE5UFCCO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RM6MHL6A.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RPRW26NG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SNUK7H5J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T7ZMQI4J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UB3V5WUI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UFKNF23C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-V3KLX7U7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VD3LKZFX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WTRUDJ3R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z55WX4IQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z5BM2FKQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZEATCVAC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZFIEEDTJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZIE6WXJ2.js.map +0 -1
- package/dist/cli-bundle/chunks/close-37KEHLYM.js +0 -14
- package/dist/cli-bundle/chunks/close-many-BFMP6HHK.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-CXJBOWWY.js.map +0 -1
- package/dist/cli-bundle/chunks/config-FIXJZEQK.js +0 -1541
- package/dist/cli-bundle/chunks/config-FIXJZEQK.js.map +0 -7
- package/dist/cli-bundle/chunks/config-X3ZVCUUG.js +0 -1531
- package/dist/cli-bundle/chunks/config-X3ZVCUUG.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-KP4QAGVW.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-SMOAN5NF.js.map +0 -7
- package/dist/cli-bundle/chunks/create-DFMNBKBS.js +0 -28
- package/dist/cli-bundle/chunks/get-AWK324RS.js.map +0 -7
- package/dist/cli-bundle/chunks/get-VYPIICPC.js.map +0 -1
- package/dist/cli-bundle/chunks/health-FBCVZGSX.js.map +0 -7
- package/dist/cli-bundle/chunks/health-Q66C43GN.js.map +0 -1
- package/dist/cli-bundle/chunks/history-5XUSLAJA.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-2GHT32UX.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-WLCQEKXS.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-BVHWDXPR.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-FY75IC26.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-GABSDSVD.js.map +0 -7
- package/dist/cli-bundle/chunks/init-TRYJELH4.js +0 -21
- package/dist/cli-bundle/chunks/next-66BJB4N2.js.map +0 -7
- package/dist/cli-bundle/chunks/next-N5MWJTBY.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-DQ7G4EDC.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-ZHKZ7JVF.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-KY6Z6WV7.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-Y2VRHPCL.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-N6AYSKPM.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-PCARIGZS.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-L6CYTOIH.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-YAT6FUUB.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-MPANILQF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-N7UGXYJC.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-IRAKSWIW.js +0 -17
- package/dist/cli-bundle/chunks/telemetry-DIFPXCAT.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-WTYFUPRL.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-PZTBLLQ6.js +0 -360
- package/dist/cli-bundle/chunks/test-all-PZTBLLQ6.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-XLPI4USF.js +0 -357
- package/dist/cli-bundle/chunks/test-all-XLPI4USF.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-CA6K32RD.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-LANLLPVO.js.map +0 -7
- package/dist/cli-bundle/chunks/update-UXDLTEOZ.js +0 -24
- package/dist/cli-bundle/chunks/validate-2G566PKQ.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-BDPVXHHH.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-MVSEND6D.js.map → activity-CUC4JY3U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-EJBMXUBH.js.map → activity-WEIEMM73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-KDHT4GHI.js.map → append-H32VOR2Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-LEDBAM3K.js.map → append-UBM632FK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SJZTPVFT.js.map → chunk-2ASNV4DH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVQ7UOYC.js.map → chunk-2CHRYUXL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRPF274X.js.map → chunk-3LCUASYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJ4SG243.js.map → chunk-3Q2HBMTI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TQ6E76BE.js.map → chunk-55XRYWEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IBU2LLWM.js.map → chunk-A6VOGKBA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MLHX6DN5.js.map → chunk-AIAIXG7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5ABGFWR4.js.map → chunk-BTX5MIQF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3JWQCLR5.js.map → chunk-CYBDUHNO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WFJZDUM7.js.map → chunk-CZPVDLD2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HUYYMTGW.js.map → chunk-EUKTMRN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EVWYAG46.js.map → chunk-FFOQHGNH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IF4ERU6A.js.map → chunk-GFMSLORL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IDYCAK35.js.map → chunk-H4GRLYJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VMY7MZEM.js.map → chunk-HQTPRV4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7L6TXOOC.js.map → chunk-JMK5GCK2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KRASIL6M.js.map → chunk-K2VYLVX4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4YIMPANT.js.map → chunk-KCO2EAN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D6USKAMA.js.map → chunk-KLXF7NCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OB3RJV5F.js.map → chunk-LRKMWUUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-74PUWBGN.js.map → chunk-LTRAF2D7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4TXTVZL3.js.map → chunk-MRD4T5LF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2Q2ULMR.js.map → chunk-N2JSWVWG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7RIJGN4R.js.map → chunk-QH3FSKRJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OUQ5JEFM.js.map → chunk-S62UANU7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DLDCPF5X.js.map → chunk-U2BEEM2X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-73PTKMAE.js.map → chunk-UT73HUPC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F7G53BOA.js.map → chunk-UTSH5GWX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JIP67N2K.js.map → chunk-Y4NRKBFW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FBZ5XAAF.js.map → chunk-YPKFV2JR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN3CWK6G.js.map → chunk-ZNHEYCDD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YEDFE4DC.js.map → chunk-ZNT7KEWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-HMCLSLUE.js.map → claim-SENTPZBN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-6NINZYB3.js.map → claim-Z7MEQCBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-OP3LK7Z2.js.map → close-424MX4CU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-37KEHLYM.js.map → close-YCWQQPDS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-ETHABIY6.js.map → comments-4FGNTSNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MU2WMBUY.js.map → comments-7YS5MY5X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-7ZEZV3BV.js.map → context-LHVKJSPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-XDI4DKKT.js.map → context-ZQY54JNS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-JJ3KOQW2.js.map → copy-GYNQQPW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-CWM6SBY6.js.map → copy-TLW7JTQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-J5Q2ELZT.js.map → create-VSKYSOCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-DFMNBKBS.js.map → create-XTMAPS7I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-2GZLQEUQ.js.map → delete-4W5JYCEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-OOQS4KVD.js.map → delete-ANTOTI2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-IF4IGL4R.js.map → deps-HPPE6MJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-ZVGGCRR6.js.map → deps-ZQZN54EZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-NFTBCQQC.js.map → docs-RPOVFMP3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-2TIFR62T.js.map → docs-XJNYBJGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-2F6EH4XN.js.map → eval-DM6JBZTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-PFKXQR3B.js.map → eval-RFBI5FGS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-GMVOIP4O.js.map → extension-B3YY4WY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-3LRYX7SW.js.map → extension-TTSEFQTS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-DF3HO6XK.js.map → files-5D65CHGE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-T5ODMETM.js.map → files-GPIG77EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-MY5ARIEK.js.map → focus-C3PEJV2C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-DLXKK4AH.js.map → focus-ZHN7WIGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-MDGRR2SU.js.map → gc-D4JQ6OWN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-FULIVYR4.js.map → gc-VZIXDL32.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-5XUSLAJA.js.map → history-DD7L7BNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-X4OSES6K.js.map → history-IL7XCEX2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-BVHWDXPR.js.map → history-redact-IX4YEWMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-45YW65BK.js.map → history-redact-VYCWQFK7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-KO7CGIRQ.js.map → init-F27NHENZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-TRYJELH4.js.map → init-HHVQQP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-LHZT5BHW.js.map → learnings-HJVDQIGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-3F7YLI45.js.map → learnings-XSFSUUWK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-Y6AU5BJS.js.map → list-HPMEKCAA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-ROT7JF62.js.map → list-VMPWTURB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-FW6YFLND.js.map → notes-GDZIKGR6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-EVJZ3VAB.js.map → notes-WDDBPC4D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-CHAW6SEA.js.map → profile-CCOKZ2IQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-UPZGCDOG.js.map → profile-HUCENIEQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-DKMCLPI5.js.map → restore-4CBWUMCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-IRAKSWIW.js.map → restore-5UEAGG3W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-3F4QUEDH.js.map → scheduling-shortcuts-6VFKNKCM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{scheduling-shortcuts-BNZLQK36.js.map → scheduling-shortcuts-ERHCVTEM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-OLT6LVKH.js.map → schema-TDGK6N3I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-XJXKJQF5.js.map → schema-UE5KKAUX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-KP6H7COV.js.map → search-FP7MEU4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-CX5UMV4H.js.map → search-K4CFLQ5S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-QZUG6MX5.js.map → stats-NJJCALEZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-7XW4OEMK.js.map → stats-XT6QRKQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QNDXZQCW.js.map → test-UFSJ5YIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-HU2BS7EY.js.map → test-YCDAUBWF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-UXDLTEOZ.js.map → update-MTCFES6X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-DJKWLBWJ.js.map → update-Y5WQVT5O.js.map} +0 -0
|
@@ -139,54 +139,77 @@ interface TodosSdkModule {
|
|
|
139
139
|
writeFileAtomic: (targetPath: string, content: string) => Promise<void>;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
const TODOS_SDK_ARRAY_EXPORTS = [
|
|
143
|
+
"CONFIDENCE_TEXT_VALUES",
|
|
144
|
+
"DEPENDENCY_KIND_VALUES",
|
|
145
|
+
"ISSUE_SEVERITY_VALUES",
|
|
146
|
+
"RISK_VALUES",
|
|
147
|
+
] as const satisfies readonly (keyof TodosSdkModule)[];
|
|
148
|
+
|
|
149
|
+
const TODOS_SDK_FUNCTION_EXPORTS = [
|
|
150
|
+
"PmCliError",
|
|
151
|
+
"canonicalDocument",
|
|
152
|
+
"commitImportedItem",
|
|
153
|
+
"ensureTrackerInitialized",
|
|
154
|
+
"generateItemId",
|
|
155
|
+
"getActiveExtensionRegistrations",
|
|
156
|
+
"getItemPath",
|
|
157
|
+
"listAllFrontMatter",
|
|
158
|
+
"locateItem",
|
|
159
|
+
"normalizeFrontMatter",
|
|
160
|
+
"normalizeItemId",
|
|
161
|
+
"nowIso",
|
|
162
|
+
"readLocatedItem",
|
|
163
|
+
"readSettings",
|
|
164
|
+
"resolveItemTypeRegistry",
|
|
165
|
+
"resolvePmRoot",
|
|
166
|
+
"runActiveOnReadHooks",
|
|
167
|
+
"runActiveOnWriteHooks",
|
|
168
|
+
"selectImportAuthor",
|
|
169
|
+
"splitFrontMatter",
|
|
170
|
+
"toEstimatedMinutesValue",
|
|
171
|
+
"toImportPriority",
|
|
172
|
+
"toImportStatus",
|
|
173
|
+
"toImportTags",
|
|
174
|
+
"toNonEmptyImportString",
|
|
175
|
+
"writeFileAtomic",
|
|
176
|
+
] as const satisfies readonly (keyof TodosSdkModule)[];
|
|
177
|
+
|
|
178
|
+
function resolveTodosSdkModulePath(): string {
|
|
143
179
|
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
144
180
|
const hasConfiguredPackageRoot = typeof envRoot === "string" && envRoot.trim().length > 0;
|
|
145
|
-
const packageRoot =
|
|
146
|
-
|
|
147
|
-
? path.resolve(envRoot.trim())
|
|
148
|
-
: path.resolve(CURRENT_RUNTIME_ROOT, "../../../..");
|
|
149
|
-
const modulePath = hasConfiguredPackageRoot
|
|
181
|
+
const packageRoot = hasConfiguredPackageRoot ? path.resolve(envRoot.trim()) : path.resolve(CURRENT_RUNTIME_ROOT, "../../../..");
|
|
182
|
+
return hasConfiguredPackageRoot
|
|
150
183
|
? path.join(packageRoot, "dist", "sdk", "index.js")
|
|
151
184
|
: path.join(packageRoot, "src", "sdk", "index.ts");
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function hasTodosSdkArrayExports(loaded: Partial<TodosSdkModule>): boolean {
|
|
188
|
+
return TODOS_SDK_ARRAY_EXPORTS.every((key) => Array.isArray(loaded[key]));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function hasTodosSdkFunctionExports(loaded: Partial<TodosSdkModule>): boolean {
|
|
192
|
+
return TODOS_SDK_FUNCTION_EXPORTS.every((key) => typeof loaded[key] === "function");
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function hasTodosSdkExitCodeExports(loaded: Partial<TodosSdkModule>): boolean {
|
|
196
|
+
return (
|
|
197
|
+
typeof loaded.EXIT_CODE === "object" &&
|
|
198
|
+
loaded.EXIT_CODE !== null &&
|
|
199
|
+
typeof loaded.EXIT_CODE.NOT_FOUND === "number"
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function isTodosSdkModule(loaded: Partial<TodosSdkModule>): loaded is TodosSdkModule {
|
|
204
|
+
return hasTodosSdkArrayExports(loaded) && hasTodosSdkFunctionExports(loaded) && hasTodosSdkExitCodeExports(loaded);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
async function loadTodosSdkModule(): Promise<TodosSdkModule> {
|
|
208
|
+
const modulePath = resolveTodosSdkModulePath();
|
|
152
209
|
try {
|
|
153
210
|
const loaded = (await import(pathToFileURL(modulePath).href)) as Partial<TodosSdkModule>;
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
Array.isArray(loaded.DEPENDENCY_KIND_VALUES) &&
|
|
157
|
-
typeof loaded.EXIT_CODE === "object" &&
|
|
158
|
-
loaded.EXIT_CODE !== null &&
|
|
159
|
-
typeof loaded.EXIT_CODE.NOT_FOUND === "number" &&
|
|
160
|
-
Array.isArray(loaded.ISSUE_SEVERITY_VALUES) &&
|
|
161
|
-
typeof loaded.PmCliError === "function" &&
|
|
162
|
-
Array.isArray(loaded.RISK_VALUES) &&
|
|
163
|
-
typeof loaded.canonicalDocument === "function" &&
|
|
164
|
-
typeof loaded.commitImportedItem === "function" &&
|
|
165
|
-
typeof loaded.ensureTrackerInitialized === "function" &&
|
|
166
|
-
typeof loaded.generateItemId === "function" &&
|
|
167
|
-
typeof loaded.getActiveExtensionRegistrations === "function" &&
|
|
168
|
-
typeof loaded.getItemPath === "function" &&
|
|
169
|
-
typeof loaded.listAllFrontMatter === "function" &&
|
|
170
|
-
typeof loaded.locateItem === "function" &&
|
|
171
|
-
typeof loaded.normalizeFrontMatter === "function" &&
|
|
172
|
-
typeof loaded.normalizeItemId === "function" &&
|
|
173
|
-
typeof loaded.nowIso === "function" &&
|
|
174
|
-
typeof loaded.readLocatedItem === "function" &&
|
|
175
|
-
typeof loaded.readSettings === "function" &&
|
|
176
|
-
typeof loaded.resolveItemTypeRegistry === "function" &&
|
|
177
|
-
typeof loaded.resolvePmRoot === "function" &&
|
|
178
|
-
typeof loaded.runActiveOnReadHooks === "function" &&
|
|
179
|
-
typeof loaded.runActiveOnWriteHooks === "function" &&
|
|
180
|
-
typeof loaded.selectImportAuthor === "function" &&
|
|
181
|
-
typeof loaded.splitFrontMatter === "function" &&
|
|
182
|
-
typeof loaded.toEstimatedMinutesValue === "function" &&
|
|
183
|
-
typeof loaded.toImportPriority === "function" &&
|
|
184
|
-
typeof loaded.toImportStatus === "function" &&
|
|
185
|
-
typeof loaded.toImportTags === "function" &&
|
|
186
|
-
typeof loaded.toNonEmptyImportString === "function" &&
|
|
187
|
-
typeof loaded.writeFileAtomic === "function"
|
|
188
|
-
) {
|
|
189
|
-
return loaded as TodosSdkModule;
|
|
211
|
+
if (isTodosSdkModule(loaded)) {
|
|
212
|
+
return loaded;
|
|
190
213
|
}
|
|
191
214
|
} catch (error: unknown) {
|
|
192
215
|
throw new Error(`builtin-todos failed to load SDK exports from ${modulePath}.`, { cause: error });
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
_testOnly,
|
|
3
|
-
runActivity
|
|
4
|
-
} from "./chunk-IF4ERU6A.js";
|
|
5
|
-
import "./chunk-IBU2LLWM.js";
|
|
6
|
-
import "./chunk-E2Q2ULMR.js";
|
|
7
|
-
import "./chunk-7L6TXOOC.js";
|
|
8
|
-
import "./chunk-LBH7UYKY.js";
|
|
9
|
-
import "./chunk-ZFIEEDTJ.js";
|
|
10
|
-
import "./chunk-MLHX6DN5.js";
|
|
11
|
-
import "./chunk-SNUK7H5J.js";
|
|
12
|
-
export {
|
|
13
|
-
_testOnly,
|
|
14
|
-
runActivity
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=activity-EJBMXUBH.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/aggregate.ts"],"sourcesContent":["/**\n * @module cli/commands/aggregate\n *\n * Implements the pm aggregate command surface and its agent-facing runtime behavior.\n */\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { parseStatusFilterCsv } from \"../../core/item/status-filter.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { buildListQueryFilters } from \"./list-filter-shared.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\n/**\n * Documents the aggregate options payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n completion?: boolean;\n sum?: string;\n avg?: string;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\n/**\n * Documents the aggregate row payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n /**\n * Human-readable display label for this group. Blank/null group values render\n * with an explicit \"(unassigned)\"-style label (per dimension) so terminal and\n * grep-based consumers are never faced with an ambiguous empty key. The\n * structured `group` record keeps the raw null for machine consumers.\n */\n group_label: string;\n count: number;\n open?: number;\n in_progress?: number;\n closed?: number;\n other?: number;\n completion_pct?: number;\n null_count?: number;\n sum?: number | null;\n avg?: number | null;\n}\n\n/**\n * Documents the aggregate result payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n completion: boolean;\n sum?: string | null;\n avg?: string | null;\n numeric_field?: string | null;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n const statuses = parseStatusFilterCsv(raw, statusRegistry, { strict: true, flagLabel: \"--status\" });\n if (!statuses || statuses.length === 0) {\n return undefined;\n }\n if (statuses.length > 1) {\n throw new PmCliError(\n 'Aggregate --status accepts one status, or the standalone \"all\" sentinel.',\n EXIT_CODE.USAGE,\n );\n }\n return statuses[0];\n}\n\ninterface NumericAggregation {\n field: string;\n sum: boolean;\n avg: boolean;\n}\n\nfunction parseNumericAggregation(options: AggregateOptions): NumericAggregation | null {\n const sumField = options.sum?.trim();\n const avgField = options.avg?.trim();\n const normalizedSum = sumField && sumField.length > 0 ? sumField : undefined;\n const normalizedAvg = avgField && avgField.length > 0 ? avgField : undefined;\n if (!normalizedSum && !normalizedAvg) {\n return null;\n }\n if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {\n throw new PmCliError(\"Aggregate --sum and --avg must target the same numeric field\", EXIT_CODE.USAGE);\n }\n return {\n field: normalizedSum ?? normalizedAvg!,\n sum: normalizedSum !== undefined,\n avg: normalizedAvg !== undefined,\n };\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\n/** Explicit display label for an empty/blank group value, keyed by dimension. */\nconst EMPTY_AGGREGATE_GROUP_LABELS: Record<AggregateGroupField, string> = {\n parent: \"(unparented)\",\n type: \"(untyped)\",\n priority: \"(no priority)\",\n status: \"(no status)\",\n assignee: \"(unassigned)\",\n tags: \"(untagged)\",\n sprint: \"(no sprint)\",\n release: \"(no release)\",\n};\n\n/** Render a single group field's value, substituting an explicit label for null. */\nfunction formatGroupFieldLabel(field: AggregateGroupField, value: AggregateGroupValue | undefined): string {\n if (value === null || value === undefined || value === \"\") {\n return EMPTY_AGGREGATE_GROUP_LABELS[field];\n }\n return String(value);\n}\n\n/**\n * Build the human-readable label for an aggregate row. Single-field grouping\n * yields the bare (possibly substituted) value; multi-field grouping joins each\n * \"field=value\" pair so composite groups stay unambiguous.\n */\nfunction buildGroupLabel(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n if (groupBy.length === 1) {\n return formatGroupFieldLabel(groupBy[0], group[groupBy[0]]);\n }\n return groupBy.map((field) => `${field}=${formatGroupFieldLabel(field, group[field])}`).join(\" | \");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nfunction readNumericAggregateValue(item: AggregateListedItem, field: string): number | null {\n const source = item as unknown as Record<string, unknown>;\n const raw = source[field];\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === \"string\") {\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return null;\n }\n const parsed = Number(trimmed);\n if (Number.isFinite(parsed)) {\n return parsed;\n }\n }\n return null;\n}\n\ninterface AggregateAccumulator {\n /** group_label is derived once at finalization, so the accumulator omits it. */\n row: Omit<AggregateRow, \"group_label\">;\n numeric_count: number;\n numeric_sum: number;\n null_count: number;\n open_count: number;\n in_progress_count: number;\n closed_count: number;\n other_count: number;\n}\n\nfunction completionPct(closed: number, total: number): number {\n if (total <= 0) {\n return 0;\n }\n return Math.round((closed / total) * 10000) / 100;\n}\n\nfunction updateCompletionCounts(accumulator: AggregateAccumulator, status: ItemStatus, statusRegistry: RuntimeStatusRegistry): void {\n const normalizedStatus = normalizeStatusInput(String(status), statusRegistry) ?? status;\n if (normalizedStatus === statusRegistry.open_status) {\n accumulator.open_count += 1;\n return;\n }\n if (normalizedStatus === \"in_progress\" || (statusRegistry.active_statuses.has(normalizedStatus) && normalizedStatus !== statusRegistry.open_status)) {\n accumulator.in_progress_count += 1;\n return;\n }\n if (statusRegistry.terminal_done_statuses.has(normalizedStatus) || normalizedStatus === statusRegistry.close_status) {\n accumulator.closed_count += 1;\n return;\n }\n accumulator.other_count += 1;\n}\n\n/**\n * Implements run aggregate for the public runtime surface of this module.\n */\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate grouped counts are always enabled; omit count=false.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const numericAggregation = parseNumericAggregation(options);\n const includeCompletion = options.completion === true;\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n buildListQueryFilters(options),\n global,\n );\n\n const grouped = new Map<string, AggregateAccumulator>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n const numericValue =\n numericAggregation === null\n ? null\n : readNumericAggregateValue(item, numericAggregation.field);\n if (existing) {\n existing.row.count += 1;\n if (includeCompletion) {\n updateCompletionCounts(existing, item.status, statusRegistry);\n }\n if (numericAggregation !== null) {\n if (numericValue === null) {\n existing.null_count += 1;\n } else {\n existing.numeric_count += 1;\n existing.numeric_sum += numericValue;\n }\n }\n } else {\n const accumulator: AggregateAccumulator = {\n row: {\n group,\n count: 1,\n },\n numeric_count: numericValue === null ? 0 : 1,\n numeric_sum: numericValue ?? 0,\n null_count: numericValue === null ? 1 : 0,\n open_count: 0,\n in_progress_count: 0,\n closed_count: 0,\n other_count: 0,\n };\n if (includeCompletion) {\n updateCompletionCounts(accumulator, item.status, statusRegistry);\n }\n grouped.set(key, accumulator);\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()]\n .map((entry) => {\n const withNumeric: AggregateRow = {\n ...entry.row,\n group_label: buildGroupLabel(groupBy, entry.row.group),\n };\n if (includeCompletion) {\n withNumeric.open = entry.open_count;\n withNumeric.in_progress = entry.in_progress_count;\n withNumeric.closed = entry.closed_count;\n withNumeric.other = entry.other_count;\n withNumeric.completion_pct = completionPct(entry.closed_count, entry.row.count);\n }\n if (numericAggregation !== null) {\n withNumeric.null_count = entry.null_count;\n if (numericAggregation.sum) {\n withNumeric.sum = entry.numeric_sum;\n }\n if (numericAggregation.avg) {\n withNumeric.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;\n }\n }\n return withNumeric;\n })\n .sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: {\n group_by: groupBy,\n count: true,\n completion: includeCompletion,\n include_unparented: includeUnparented,\n status: status ?? null,\n type: options.type ?? null,\n tag: options.tag ?? null,\n priority: options.priority ?? null,\n deadline_before: options.deadlineBefore ?? null,\n deadline_after: options.deadlineAfter ?? null,\n assignee: options.assignee ?? null,\n assignee_filter: options.assigneeFilter ?? null,\n parent: options.parent ?? null,\n sprint: options.sprint ?? null,\n release: options.release ?? null,\n ...(numericAggregation !== null\n ? {\n sum: options.sum ?? null,\n avg: options.avg ?? null,\n numeric_field: numericAggregation.field,\n }\n : {}),\n },\n now: nowIso(),\n ...(warnings ? { warnings } : {}),\n };\n}\n\nexport const _testOnlyAggregateCommand = {\n buildGroupKey,\n compareAggregateRows,\n compareNullableGroupValue,\n completionPct,\n normalizeTagGroupValue,\n parseGroupBy,\n parseNumericAggregation,\n parseStatus,\n readNumericAggregateValue,\n resolveGroupValue,\n updateCompletionCounts,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,yBAAgD;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAoFF,SAAS,YAAY,KAAyB,gBAAqC;AACjF,QAAM,WAAW,qBAAqB,KAAK,gBAAgB,EAAE,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AAO,MAAM;MAC/B,eAAe;MACf,0BAA0B;;IAE5B,SAAS;MACP,UAAU;MACV,OAAO;MACP,YAAY;MACZ,oBAAoB;MACpB,QAAQ,UAAU;MAClB,MAAM,QAAQ,QAAQ;MACtB,KAAK,QAAQ,OAAO;MACpB,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,gBAAgB,QAAQ,iBAAiB;MACzC,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,QAAQ,QAAQ,UAAU;MAC1B,QAAQ,QAAQ,UAAU;MAC1B,SAAS,QAAQ,WAAW;MAC5B,GAAI,uBAAuB,OACvB;QACE,KAAK,QAAQ,OAAO;QACpB,KAAK,QAAQ,OAAO;QACpB,eAAe,mBAAmB;UAEpC,CAAA;;IAEN,KAAK,OAAM;IACX,GAAI,WAAW,EAAE,SAAQ,IAAK,CAAA;;AAElC;AAEO,IAAM,4BAA4B;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","debugId":"f142f3dc-02b5-5d0f-9360-cdbd397f5cf2"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../cli/commands/init.ts", "../../../../../../../../cli/commands/init-agent-guidance.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @module cli/commands/init\n *\n * Implements the pm init command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport readline from \"node:readline/promises\";\nimport { stdin as input, stdout as output } from \"node:process\";\nimport { getActiveExtensionRegistrations, runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { pathExists, readFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { normalizePrefix } from \"../../core/item/id.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport {\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,\n ensureRuntimeSchemaFileScaffold,\n filePathForSchemaSection,\n normalizeRuntimeSchemaSettings,\n} from \"../../core/schema/runtime-schema.js\";\nimport {\n parseItemTypesFile,\n serializeItemTypesFile,\n upsertItemType,\n} from \"../../core/schema/item-types-file.js\";\nimport {\n normalizeTypePresetName,\n resolveTypePresetDefinitions,\n TYPE_PRESET_NAMES,\n type TypePresetName,\n} from \"../../core/schema/type-presets.js\";\nimport { EXIT_CODE, GOVERNANCE_PRESET_DEFAULTS, PM_REQUIRED_SUBDIRS, SETTINGS_DEFAULTS } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings, writeSettings } from \"../../core/store/settings.js\";\nimport type { GovernancePreset, PmSettings } from \"../../types/index.js\";\nimport { runExtension, type ExtensionCommandResult } from \"./extension.js\";\nimport {\n INIT_AGENT_GUIDANCE_MODE_VALUES,\n runInitAgentGuidance,\n type InitAgentGuidanceMode,\n type InitAgentGuidanceSummary,\n} from \"./init-agent-guidance.js\";\n\n/**\n * Documents the init installed packages summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitInstalledPackagesSummary {\n installed_all: boolean;\n installed_count: number;\n packages: Array<{\n alias: string;\n ok: boolean;\n }>;\n}\n\n/**\n * Restricts init type preset name values accepted by command, SDK, and storage contracts.\n */\nexport type InitTypePresetName = TypePresetName;\n\n/**\n * Documents the init registered type preset summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitRegisteredTypePresetSummary {\n name: InitTypePresetName;\n registered: string[];\n updated: string[];\n file: string;\n}\n\n/**\n * Documents the init result payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitResult {\n ok: boolean;\n path: string;\n settings: PmSettings;\n created_dirs: string[];\n warnings: string[];\n governance_preset: GovernancePreset;\n wizard_used: boolean;\n registered_type_preset?: InitRegisteredTypePresetSummary;\n installed_packages?: InitInstalledPackagesSummary;\n next_steps: string[];\n agent_guidance: InitAgentGuidanceSummary;\n}\n\n/**\n * Documents the init command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitCommandOptions {\n preset?: string;\n defaults?: boolean;\n author?: string;\n withPackages?: boolean;\n agentGuidance?: string;\n typePreset?: string;\n force?: boolean;\n}\n\n/**\n * Concise projection of an InitResult for the default (toon) renderer. It keeps\n * every piece of information that only init can surface — the resolved path, id\n * prefix, governance preset, telemetry capture level, created-directory count,\n * the full warnings list (including `already_exists:` markers), agent-guidance\n * summary, and next steps — but replaces the verbose full settings tree (~190\n * lines) with a compact `settings` summary. Use --verbose for the full tree.\n */\nexport interface InitConciseResult {\n ok: boolean;\n path: string;\n id_prefix: string;\n governance_preset: GovernancePreset;\n telemetry: {\n enabled: boolean;\n capture_level: string;\n };\n output_format: string;\n created_dirs_count: number;\n created_dirs: string[];\n warnings: string[];\n wizard_used: boolean;\n registered_type_preset?: InitRegisteredTypePresetSummary;\n installed_packages?: InitInstalledPackagesSummary;\n next_steps: string[];\n agent_guidance: InitAgentGuidanceSummary;\n hint: string;\n}\n\n/**\n * Implements summarize init result for the public runtime surface of this module.\n */\nexport function summarizeInitResult(result: InitResult): InitConciseResult {\n return {\n ok: result.ok,\n path: result.path,\n id_prefix: result.settings.id_prefix,\n governance_preset: result.governance_preset,\n telemetry: {\n enabled: result.settings.telemetry.enabled,\n capture_level: result.settings.telemetry.capture_level,\n },\n output_format: result.settings.output.default_format,\n created_dirs_count: result.created_dirs.length,\n created_dirs: result.created_dirs,\n warnings: result.warnings,\n wizard_used: result.wizard_used,\n ...(result.registered_type_preset ? { registered_type_preset: result.registered_type_preset } : {}),\n ...(result.installed_packages ? { installed_packages: result.installed_packages } : {}),\n next_steps: result.next_steps,\n agent_guidance: result.agent_guidance,\n hint: \"Re-run with --verbose for the full settings tree.\",\n };\n}\n\nexport const _testOnly = {\n normalizeInitGovernancePreset,\n normalizeInitTypePreset,\n normalizeOptionalInitAuthor,\n normalizeInitAgentGuidanceMode,\n isPathLikeInitTarget,\n resolveInitInvocation,\n parseYesNoChoice,\n applyGovernancePreset,\n runInitWizard,\n setInitReadlineFactoryForTests,\n summarizeInstalledPackages,\n registerInitTypePreset,\n assertExplicitTrackerPathIsNotWorkspaceRoot,\n isLikelyWorkspaceRoot,\n};\n\ntype InitReadlineInterface = ReturnType<typeof readline.createInterface>;\nlet createInitReadlineInterface = (): InitReadlineInterface => readline.createInterface({ input, output });\n\nfunction setInitReadlineFactoryForTests(factory: (() => InitReadlineInterface) | undefined): void {\n createInitReadlineInterface = factory ?? (() => readline.createInterface({ input, output }));\n}\n\nfunction cloneDefaults(): PmSettings {\n return structuredClone(SETTINGS_DEFAULTS);\n}\n\ntype BuiltinGovernancePreset = Exclude<GovernancePreset, \"custom\">;\nconst BUILTIN_GOVERNANCE_PRESETS: BuiltinGovernancePreset[] = [\"minimal\", \"default\", \"strict\"];\nfunction normalizeInitGovernancePreset(rawValue: string | undefined): BuiltinGovernancePreset | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n const normalized = rawValue.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n throw new PmCliError(\"--preset must not be empty\", EXIT_CODE.USAGE);\n }\n if (normalized === \"minimal\" || normalized === \"default\" || normalized === \"strict\") {\n return normalized;\n }\n if (normalized === \"lite\" || normalized === \"minimum\") {\n return \"minimal\";\n }\n throw new PmCliError(\n `Invalid --preset value \"${rawValue}\". Allowed: ${BUILTIN_GOVERNANCE_PRESETS.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction normalizeInitTypePreset(rawValue: string | undefined): InitTypePresetName | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n if (rawValue.trim().length === 0) {\n throw new PmCliError(\"--type-preset must not be empty\", EXIT_CODE.USAGE);\n }\n try {\n // Non-undefined input never returns undefined; the shared normalizer throws\n // a plain Error for empty/unknown values, which we re-map to init's --type-preset\n // PmCliError wording for a consistent CLI surface.\n return normalizeTypePresetName(rawValue) as InitTypePresetName;\n } catch {\n throw new PmCliError(\n `Invalid --type-preset value \"${rawValue}\". Allowed: ${TYPE_PRESET_NAMES.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n}\n\nfunction normalizeOptionalInitAuthor(rawValue: string | undefined): string | undefined {\n if (rawValue === undefined) {\n return undefined;\n }\n const normalized = rawValue.trim();\n if (normalized.length === 0) {\n throw new PmCliError(\"--author must not be empty\", EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction isPathLikeInitTarget(rawValue: string | undefined): boolean {\n if (rawValue === undefined) {\n return false;\n }\n const trimmed = rawValue.trim();\n if (trimmed.length === 0) {\n return false;\n }\n return path.isAbsolute(trimmed) || trimmed.startsWith(\".\") || trimmed.includes(\"/\") || trimmed.includes(\"\\\\\");\n}\n\nfunction resolveInitInvocation(\n cwd: string,\n global: GlobalOptions,\n prefixArg: string | undefined,\n): { pmRoot: string; prefixArg: string | undefined; positional_target?: string } {\n if (global.path === undefined && isPathLikeInitTarget(prefixArg)) {\n const positionalTarget = path.resolve(cwd, prefixArg!.trim());\n return {\n pmRoot: positionalTarget,\n prefixArg: undefined,\n positional_target: positionalTarget,\n };\n }\n return {\n pmRoot: resolvePmRoot(cwd, global.path),\n prefixArg,\n };\n}\n\nfunction normalizeInitAgentGuidanceMode(rawValue: string | undefined): InitAgentGuidanceMode {\n if (rawValue === undefined) {\n return \"ask\";\n }\n const normalized = rawValue.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n throw new PmCliError(\"--agent-guidance must not be empty\", EXIT_CODE.USAGE);\n }\n if (normalized === \"ask\" || normalized === \"add\" || normalized === \"skip\" || normalized === \"status\") {\n return normalized;\n }\n throw new PmCliError(\n `Invalid --agent-guidance value \"${rawValue}\". Allowed: ${INIT_AGENT_GUIDANCE_MODE_VALUES.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n}\n\nfunction parseYesNoChoice(answer: string, currentDefault: boolean): boolean {\n const normalized = answer.trim().toLowerCase();\n if (normalized.length === 0) {\n return currentDefault;\n }\n if (normalized === \"y\" || normalized === \"yes\") {\n return true;\n }\n if (normalized === \"n\" || normalized === \"no\") {\n return false;\n }\n return currentDefault;\n}\n\nfunction applyGovernancePreset(settings: PmSettings, preset: BuiltinGovernancePreset): void {\n const knobs = GOVERNANCE_PRESET_DEFAULTS[preset];\n settings.governance = {\n preset,\n ...knobs,\n };\n settings.validation.parent_reference = knobs.parent_reference;\n settings.validation.metadata_profile = knobs.metadata_profile;\n}\n\nfunction isInstalledPackageEntry(value: unknown): value is { alias?: unknown; ok?: unknown } {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction summarizeInstalledPackages(result: ExtensionCommandResult): InitInstalledPackagesSummary {\n const details = result.details as {\n installed_all?: unknown;\n installed_count?: unknown;\n packages?: Array<{\n alias?: unknown;\n ok?: unknown;\n }>;\n };\n return {\n installed_all: details.installed_all === true,\n installed_count: typeof details.installed_count === \"number\" ? details.installed_count : 0,\n packages: Array.isArray(details.packages)\n ? details.packages.filter(isInstalledPackageEntry).map((entry) => ({\n alias: typeof entry.alias === \"string\" ? entry.alias : \"\",\n ok: entry.ok === true,\n }))\n : [],\n };\n}\n\nasync function registerInitTypePreset(\n pmRoot: string,\n settings: PmSettings,\n preset: InitTypePresetName,\n): Promise<InitRegisteredTypePresetSummary> {\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);\n const parsed = parseItemTypesFile(await readFileIfExists(typesPath));\n let nextFile = parsed;\n const registered: string[] = [];\n const updated: string[] = [];\n for (const normalized of resolveTypePresetDefinitions(preset)) {\n const upsert = upsertItemType(nextFile, normalized);\n nextFile = upsert.file;\n (upsert.replaced ? updated : registered).push(upsert.definition.name);\n }\n await writeFileAtomic(typesPath, serializeItemTypesFile(nextFile));\n return {\n name: preset,\n registered,\n updated,\n file: typesPath,\n };\n}\n\nasync function isLikelyWorkspaceRoot(candidate: string): Promise<boolean> {\n const indicators = [\n \".git\",\n \"package.json\",\n \"pnpm-workspace.yaml\",\n \"AGENTS.md\",\n path.join(\".agents\", \"pm\"),\n ];\n for (const indicator of indicators) {\n if (await pathExists(path.join(candidate, indicator))) {\n return true;\n }\n }\n return false;\n}\n\nasync function assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot: string, global: GlobalOptions, force: boolean): Promise<void> {\n if (global.path === undefined || force) {\n return;\n }\n if (await pathExists(path.join(pmRoot, \"settings.json\"))) {\n return;\n }\n if (!(await isLikelyWorkspaceRoot(pmRoot))) {\n return;\n }\n const nestedTracker = path.join(pmRoot, \".agents\", \"pm\");\n throw new PmCliError(\n `Refusing to initialize tracker files directly in workspace root \"${pmRoot}\".`,\n EXIT_CODE.USAGE,\n {\n code: \"workspace_root_pm_path\",\n type: \"urn:pm-cli:error:workspace_root_pm_path\",\n why: \"--pm-path/--path points at the tracker storage directory itself, not the repository workspace. Point it at .agents/pm or pass --force if you intentionally want root-level tracker files.\",\n examples: [\n `pm --pm-path ${nestedTracker} init --yes`,\n \"pm init --yes\",\n `pm --pm-path ${pmRoot} init --yes --force`,\n ],\n nextSteps: [\n \"Use --pm-path <repo>/.agents/pm for repository-local tracker storage.\",\n \"Use PM_PATH only for sandboxed tests or explicit tracker roots.\",\n \"Pass --force only when root-level tracker files are intentional.\",\n ],\n recovery: {\n next_best_command: `pm --pm-path ${nestedTracker} init --yes`,\n },\n },\n );\n}\n\nasync function runInitWizard(initialPrefix: string, telemetryDefault: boolean): Promise<{\n prefix: string;\n preset: BuiltinGovernancePreset;\n telemetry_enabled: boolean;\n}> {\n const rl = createInitReadlineInterface();\n try {\n output.write(\"pm init setup wizard (agent-optimized)\\n\");\n output.write(\"This walkthrough is non-destructive and each choice can be changed later with pm config.\\n\\n\");\n\n output.write(\"1/3 Item ID prefix\\n\");\n output.write(\"Prefix is prepended to generated IDs (for example pm-a1b2).\\n\");\n const prefixAnswer = await rl.question(`Item ID prefix [${initialPrefix}]: `);\n const resolvedPrefix = prefixAnswer.trim().length > 0 ? normalizePrefix(prefixAnswer) : initialPrefix;\n\n output.write(\"\\n2/3 Governance preset\\n\");\n output.write(\"minimal: no ownership blocking, progressive create defaults, close validation off.\\n\");\n output.write(\"default: ownership conflict warnings, progressive create defaults, close validation warn.\\n\");\n output.write(\"strict: ownership blocking, strict create defaults, close validation strict.\\n\");\n const presetAnswer = await rl.question(\"Governance preset [minimal/default/strict] (default: minimal): \");\n const presetChoice = presetAnswer.trim().length > 0 ? presetAnswer.trim() : \"minimal\";\n // The wizard is forgiving: a typo'd/unknown preset defaults to minimal with a\n // notice instead of throwing and aborting an in-progress interactive setup.\n // normalizeInitGovernancePreset returns a concrete preset for valid input and\n // throws (never returns undefined) for invalid non-empty input, so the result is\n // always a BuiltinGovernancePreset on the success path.\n let resolvedPreset: BuiltinGovernancePreset = \"minimal\";\n try {\n resolvedPreset = normalizeInitGovernancePreset(presetChoice) as BuiltinGovernancePreset;\n } catch {\n output.write(`Unrecognized governance preset \"${presetChoice}\"; using minimal.\\n`);\n }\n\n output.write(\"\\n3/3 Project telemetry\\n\");\n output.write(\"Telemetry helps improve reliability and can be disabled anytime via pm config.\\n\");\n const telemetryLabel = telemetryDefault ? \"Y/n\" : \"y/N\";\n const telemetryAnswer = await rl.question(`Enable telemetry for this project? [${telemetryLabel}] `);\n const telemetryEnabled = parseYesNoChoice(telemetryAnswer, telemetryDefault);\n\n output.write(\"\\n\");\n return {\n prefix: resolvedPrefix,\n preset: resolvedPreset,\n telemetry_enabled: telemetryEnabled,\n };\n } finally {\n rl.close();\n }\n}\n\n/**\n * Implements run init for the public runtime surface of this module.\n */\nexport async function runInit(\n prefixArg: string | undefined,\n global: GlobalOptions,\n options: InitCommandOptions = {},\n): Promise<InitResult> {\n const cwd = process.cwd();\n const invocation = resolveInitInvocation(cwd, global, prefixArg);\n const pmRoot = invocation.pmRoot;\n prefixArg = invocation.prefixArg;\n await assertExplicitTrackerPathIsNotWorkspaceRoot(pmRoot, global, options.force === true);\n const createdDirs: string[] = [];\n const warnings: string[] = [];\n let wizardUsed = false;\n\n for (const subdir of PM_REQUIRED_SUBDIRS) {\n const target = subdir ? path.join(pmRoot, subdir) : pmRoot;\n const existed = await pathExists(target);\n await fs.mkdir(target, { recursive: true });\n if (existed) {\n warnings.push(`already_exists:${target}`);\n } else {\n createdDirs.push(target);\n }\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: target,\n scope: \"project\",\n op: \"init:ensure_dir\",\n })),\n );\n }\n\n const settingsPath = path.join(pmRoot, \"settings.json\");\n const settingsExists = await pathExists(settingsPath);\n let normalizedPrefix = normalizePrefix(prefixArg);\n const presetFromOption = normalizeInitGovernancePreset(options.preset);\n const useDefaults = options.defaults === true;\n const authorFromOption = normalizeOptionalInitAuthor(options.author);\n const installBundledPackages = options.withPackages === true;\n const agentGuidanceMode = normalizeInitAgentGuidanceMode(options.agentGuidance);\n const typePreset = normalizeInitTypePreset(options.typePreset);\n let chosenPreset = presetFromOption;\n let chosenTelemetryEnabled: boolean | undefined;\n\n let settings: PmSettings;\n if (settingsExists) {\n settings = await readSettings(pmRoot);\n warnings.push(`already_exists:${settingsPath}`);\n const pendingChanges: string[] = [];\n const shouldUpdatePrefix = prefixArg !== undefined && settings.id_prefix !== normalizedPrefix;\n const shouldUpdatePreset = presetFromOption !== undefined && settings.governance.preset !== presetFromOption;\n const shouldUpdateAuthor = authorFromOption !== undefined && settings.author_default !== authorFromOption;\n if (shouldUpdatePrefix) {\n pendingChanges.push(\"id_prefix\");\n }\n if (shouldUpdatePreset) {\n pendingChanges.push(\"governance_preset\");\n }\n if (shouldUpdateAuthor) {\n pendingChanges.push(\"author_default\");\n }\n if (pendingChanges.length > 0 && options.force !== true) {\n throw new PmCliError(\n `Refusing to update existing tracker settings at ${settingsPath} without --force.`,\n EXIT_CODE.USAGE,\n {\n code: \"init_existing_settings_requires_force\",\n type: \"urn:pm-cli:error:init_existing_settings_requires_force\",\n required: `--force for ${pendingChanges.join(\", \")}`,\n why: \"pm init is safe to rerun, but changing id prefix, governance preset, or default author on an existing tracker can corrupt long-lived project context when an agent meant to initialize a sandbox path.\",\n examples: [\n \"pm init --yes\",\n \"pm init ./sandbox-pm --yes\",\n \"pm init acme --yes --force\",\n ],\n nextSteps: [\n \"If you meant to initialize a sandbox tracker, pass a path-like positional such as ./sandbox-pm or /tmp/pm-test.\",\n \"If you intentionally want to rewrite this existing tracker's init-managed settings, rerun with --force.\",\n ],\n },\n );\n }\n let changed = false;\n if (shouldUpdatePrefix) {\n settings.id_prefix = normalizedPrefix;\n warnings.push(`updated:id_prefix:${normalizedPrefix}`);\n changed = true;\n }\n if (shouldUpdatePreset) {\n applyGovernancePreset(settings, presetFromOption!);\n warnings.push(`updated:governance_preset:${presetFromOption}`);\n changed = true;\n }\n if (shouldUpdateAuthor) {\n settings.author_default = authorFromOption!;\n warnings.push(`updated:author_default:${authorFromOption}`);\n changed = true;\n }\n if (changed) {\n await writeSettings(pmRoot, settings);\n }\n } else {\n if (presetFromOption === undefined && !useDefaults && process.stdin.isTTY === true && process.stdout.isTTY === true) {\n const wizardChoices = await runInitWizard(normalizedPrefix, SETTINGS_DEFAULTS.telemetry.enabled);\n normalizedPrefix = wizardChoices.prefix;\n chosenPreset = wizardChoices.preset;\n chosenTelemetryEnabled = wizardChoices.telemetry_enabled;\n wizardUsed = true;\n }\n const effectivePreset = chosenPreset ?? \"minimal\";\n settings = cloneDefaults();\n settings.id_prefix = normalizedPrefix;\n applyGovernancePreset(settings, effectivePreset);\n if (authorFromOption !== undefined) {\n settings.author_default = authorFromOption;\n }\n if (chosenTelemetryEnabled !== undefined) {\n settings.telemetry.enabled = chosenTelemetryEnabled;\n settings.telemetry.first_run_prompt_completed = true;\n }\n await writeSettings(pmRoot, settings);\n }\n\n const agentGuidanceResult = await runInitAgentGuidance({\n pm_root: pmRoot,\n cwd,\n mode: agentGuidanceMode,\n interactive: process.stdin.isTTY === true && process.stdout.isTTY === true,\n settings,\n });\n warnings.push(...agentGuidanceResult.warnings);\n if (agentGuidanceResult.settings_changed) {\n await writeSettings(pmRoot, settings);\n }\n\n const runtimeSchemaScaffold = await ensureRuntimeSchemaFileScaffold(pmRoot, settings.schema);\n for (const createdPath of runtimeSchemaScaffold.created_paths) {\n createdDirs.push(createdPath);\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: createdPath,\n scope: \"project\",\n op: \"init:runtime_schema_file\",\n })),\n );\n }\n\n let registeredTypePreset: InitRegisteredTypePresetSummary | undefined;\n if (typePreset !== undefined) {\n registeredTypePreset = await registerInitTypePreset(pmRoot, settings, typePreset);\n warnings.push(`registered_type_preset:${typePreset}`);\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: registeredTypePreset.file,\n scope: \"project\",\n op: \"init:type_preset\",\n })),\n );\n settings = await readSettings(pmRoot);\n }\n\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n for (const typeFolder of typeRegistry.folders) {\n if ((PM_REQUIRED_SUBDIRS as readonly string[]).includes(typeFolder)) {\n continue;\n }\n const target = path.join(pmRoot, typeFolder);\n const existed = await pathExists(target);\n await fs.mkdir(target, { recursive: true });\n if (existed) {\n warnings.push(`already_exists:${target}`);\n } else {\n createdDirs.push(target);\n }\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: target,\n scope: \"project\",\n op: \"init:ensure_dir\",\n })),\n );\n }\n\n let installedPackages: InitInstalledPackagesSummary | undefined;\n if (installBundledPackages) {\n const packageInstallResult = await runExtension(\"all\", { install: true, project: true }, global);\n warnings.push(...packageInstallResult.warnings);\n installedPackages = summarizeInstalledPackages(packageInstallResult);\n if (!installedPackages.installed_all || installedPackages.packages.some((entry) => !entry.ok)) {\n throw new PmCliError(\"pm init --with-packages did not install all bundled packages successfully.\", EXIT_CODE.GENERIC_FAILURE);\n }\n }\n\n const nextSteps: string[] = [\n 'Create your first item: pm create --type Task --title \"<title>\"',\n 'List active items: pm list',\n 'Get agent-friendly project context: pm context',\n ];\n if (!installBundledPackages) {\n nextSteps.push(\n \"Add optional packages for richer workflows: pm install calendar --project, pm install templates --project, pm install guide-shell --project\",\n );\n nextSteps.push(\"Or install everything bundled: pm init --with-packages (idempotent on re-run)\");\n } else {\n nextSteps.push(\"Explore newly-available commands: pm cal, pm templates, pm guide\");\n }\n if (registeredTypePreset) {\n nextSteps.push(`Inspect registered preset types: pm schema list, pm schema show ${registeredTypePreset.registered[0] ?? registeredTypePreset.updated[0]}`);\n }\n nextSteps.push(\"Set PM_AUTHOR=<your-agent-id> so mutations attribute to the right caller.\");\n for (const guidanceNextStep of agentGuidanceResult.next_steps) {\n if (!nextSteps.includes(guidanceNextStep)) {\n nextSteps.push(guidanceNextStep);\n }\n }\n\n return {\n ok: true,\n path: pmRoot,\n settings,\n created_dirs: createdDirs,\n warnings,\n governance_preset: settings.governance.preset,\n wizard_used: wizardUsed,\n ...(registeredTypePreset ? { registered_type_preset: registeredTypePreset } : {}),\n ...(installedPackages ? { installed_packages: installedPackages } : {}),\n next_steps: nextSteps,\n agent_guidance: agentGuidanceResult.summary,\n };\n}\n", "/**\n * @module cli/commands/init-agent-guidance\n *\n * Implements the pm init agent guidance command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport readline from \"node:readline/promises\";\nimport { stdin as input, stdout as output } from \"node:process\";\nimport { runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { PmSettings } from \"../../types/index.js\";\n\n/**\n * Restricts init agent guidance mode values accepted by command, SDK, and storage contracts.\n */\nexport type InitAgentGuidanceMode = \"ask\" | \"add\" | \"skip\" | \"status\";\n\nexport const INIT_AGENT_GUIDANCE_MODE_VALUES: InitAgentGuidanceMode[] = [\"ask\", \"add\", \"skip\", \"status\"];\n\nconst AGENT_GUIDANCE_TARGET_FILENAMES = [\"AGENTS.md\", \"CLAUDE.md\"] as const;\nconst AGENT_GUIDANCE_REQUIRED_TOKENS = [\n \"pm init\",\n \"pm context\",\n \"pm search\",\n \"pm create\",\n \"pm claim\",\n \"pm files\",\n \"pm docs\",\n \"pm test --run\",\n \"pm close\",\n \"pm release\",\n \"pm_author\",\n] as const;\nconst AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD = 8;\nconst AGENT_GUIDANCE_TEMPLATE_VERSION = 1;\nconst AGENT_GUIDANCE_START_MARKER_PREFIX = \"<!-- pm-cli:agent-guidance:start:\";\nconst AGENT_GUIDANCE_START_MARKER = `<!-- pm-cli:agent-guidance:start:v${AGENT_GUIDANCE_TEMPLATE_VERSION} -->`;\nconst AGENT_GUIDANCE_END_MARKER = \"<!-- pm-cli:agent-guidance:end -->\";\n\nexport const _testOnly = {\n toPortableRelativePath,\n ensureTrailingNewline,\n detectLineEnding,\n findGuidanceBlockRange,\n buildAgentGuidanceBlock,\n upsertAgentGuidanceBlock,\n resolveProjectRoot,\n resolveTargetGuidancePath,\n parsePromptChoice,\n pushUnique,\n promptForGuidanceWrite,\n normalizeAgentGuidanceState,\n applyAgentGuidanceState,\n writeGuidanceFile,\n setAgentGuidanceReadlineFactoryForTests,\n};\n\ntype AgentGuidanceReadlineInterface = ReturnType<typeof readline.createInterface>;\nlet createAgentGuidanceReadlineInterface = (): AgentGuidanceReadlineInterface => readline.createInterface({ input, output });\n\nfunction setAgentGuidanceReadlineFactoryForTests(factory: (() => AgentGuidanceReadlineInterface) | undefined): void {\n createAgentGuidanceReadlineInterface = factory ?? (() => readline.createInterface({ input, output }));\n}\n\ninterface AgentGuidanceFileScan {\n file_path: string;\n exists: boolean;\n has_guidance: boolean;\n has_marker: boolean;\n}\n\ninterface AgentGuidanceBlockRange {\n start_index: number;\n end_index: number;\n}\n\n/**\n * Documents the init agent guidance summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface InitAgentGuidanceSummary {\n mode: InitAgentGuidanceMode;\n present: boolean;\n prompted: boolean;\n applied: boolean;\n skipped: boolean;\n declined: boolean;\n prompt_completed: boolean;\n template_version: number;\n target_file: string;\n checked_files: string[];\n files_with_guidance: string[];\n missing_files: string[];\n}\n\n/**\n * Documents the run init agent guidance options payload exchanged by command, SDK, and package integrations.\n */\nexport interface RunInitAgentGuidanceOptions {\n pm_root: string;\n cwd: string;\n mode: InitAgentGuidanceMode;\n interactive: boolean;\n settings: PmSettings;\n}\n\n/**\n * Documents the run init agent guidance result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RunInitAgentGuidanceResult {\n summary: InitAgentGuidanceSummary;\n warnings: string[];\n next_steps: string[];\n settings_changed: boolean;\n}\n\nfunction toPortableRelativePath(projectRoot: string, targetPath: string): string {\n const relative = path.relative(projectRoot, targetPath);\n if (relative.length === 0) {\n return path.basename(targetPath);\n }\n return relative.split(path.sep).join(\"/\");\n}\n\nfunction ensureTrailingNewline(value: string): string {\n return value.endsWith(\"\\n\") ? value : `${value}\\n`;\n}\n\nfunction detectLineEnding(value: string): \"\\n\" | \"\\r\\n\" {\n return value.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n}\n\nfunction findGuidanceBlockRange(content: string): AgentGuidanceBlockRange | null {\n const startIndex = content.indexOf(AGENT_GUIDANCE_START_MARKER_PREFIX);\n if (startIndex === -1) {\n return null;\n }\n const endMarkerIndex = content.indexOf(AGENT_GUIDANCE_END_MARKER, startIndex);\n if (endMarkerIndex === -1) {\n return null;\n }\n return {\n start_index: startIndex,\n end_index: endMarkerIndex + AGENT_GUIDANCE_END_MARKER.length,\n };\n}\n\nfunction hasGuidanceMarker(content: string): boolean {\n return findGuidanceBlockRange(content) !== null;\n}\n\nfunction buildAgentGuidanceBlock(lineEnding: \"\\n\" | \"\\r\\n\"): string {\n const lines = [\n AGENT_GUIDANCE_START_MARKER,\n \"## pm Workflow (Agent Quickstart)\",\n \"\",\n \"- Orient before mutate: `pm context --limit 10`, `pm search \\\"<keywords>\\\" --limit 10`, `pm list-open --limit 20`.\",\n \"- Claim and execute: `pm claim <id>` then `pm update <id> --status in_progress`.\",\n \"- Link evidence while coding: `pm files <id> --add ...`, `pm docs <id> --add ...`, `pm test <id> --add command=\\\"node scripts/run-tests.mjs test -- ...\\\"`.\",\n \"- Verify and close: `pm test <id> --run --progress`, `pm close <id> \\\"<evidence>\\\" --validate-close warn`, `pm release <id>`.\",\n \"- Set `PM_AUTHOR=<stable-agent-id>` before mutation commands.\",\n \"\",\n AGENT_GUIDANCE_END_MARKER,\n \"\",\n ];\n return lines.join(lineEnding);\n}\n\nfunction upsertAgentGuidanceBlock(existingContent: string): { next_content: string; changed: boolean } {\n const lineEnding = detectLineEnding(existingContent);\n const nextBlock = buildAgentGuidanceBlock(lineEnding);\n const existingRange = findGuidanceBlockRange(existingContent);\n if (existingRange) {\n const trailingContent = existingContent.slice(existingRange.end_index);\n const normalizedTrailingContent = trailingContent.startsWith(\"\\r\\n\")\n ? trailingContent.slice(2)\n : trailingContent.startsWith(\"\\n\")\n ? trailingContent.slice(1)\n : trailingContent;\n const nextContent = ensureTrailingNewline(\n `${existingContent.slice(0, existingRange.start_index)}${nextBlock}${normalizedTrailingContent}`,\n );\n return {\n next_content: nextContent,\n changed: nextContent !== existingContent,\n };\n }\n const separator = existingContent.length === 0 ? \"\" : existingContent.endsWith(\"\\n\") ? \"\\n\" : \"\\n\\n\";\n const nextContent = ensureTrailingNewline(`${existingContent}${separator}${nextBlock}`);\n return {\n next_content: nextContent,\n changed: nextContent !== existingContent,\n };\n}\n\nfunction resolveProjectRoot(pmRoot: string, cwd: string): string {\n const parent = path.dirname(pmRoot);\n if (path.basename(pmRoot) === \"pm\" && path.basename(parent) === \".agents\") {\n return path.dirname(parent);\n }\n return path.resolve(cwd, pmRoot);\n}\n\nfunction resolveTargetGuidancePath(scans: AgentGuidanceFileScan[], projectRoot: string): string {\n const existingAgents = scans.find((entry) => path.basename(entry.file_path) === \"AGENTS.md\" && entry.exists);\n if (existingAgents) {\n return existingAgents.file_path;\n }\n const existingAny = scans.find((entry) => entry.exists);\n if (existingAny) {\n return existingAny.file_path;\n }\n return path.join(projectRoot, \"AGENTS.md\");\n}\n\nfunction parsePromptChoice(answer: string, currentDefault: boolean): boolean {\n const normalized = answer.trim().toLowerCase();\n if (normalized.length === 0) {\n return currentDefault;\n }\n if (normalized === \"y\" || normalized === \"yes\") {\n return true;\n }\n if (normalized === \"n\" || normalized === \"no\") {\n return false;\n }\n return currentDefault;\n}\n\nasync function promptForGuidanceWrite(targetRelativePath: string): Promise<boolean> {\n const rl = createAgentGuidanceReadlineInterface();\n try {\n output.write(\"\\nAgent guidance check\\n\");\n output.write(\"No AGENTS.md/CLAUDE.md file currently contains compact pm workflow guidance.\\n\");\n const answer = await rl.question(`Add a compact pm workflow section to ${targetRelativePath}? [Y/n] `);\n output.write(\"\\n\");\n return parsePromptChoice(answer, true);\n } finally {\n rl.close();\n }\n}\n\nfunction normalizeAgentGuidanceState(settings: PmSettings): PmSettings[\"agent_guidance\"] {\n const current = settings.agent_guidance;\n return {\n prompt_completed: current?.prompt_completed === true,\n declined: current?.declined === true,\n declined_at: typeof current?.declined_at === \"string\" ? current.declined_at : \"\",\n template_version:\n typeof current?.template_version === \"number\" && Number.isInteger(current.template_version) && current.template_version > 0\n ? current.template_version\n : AGENT_GUIDANCE_TEMPLATE_VERSION,\n last_checked_files: Array.isArray(current?.last_checked_files)\n ? [...new Set(current.last_checked_files.map((value) => value.trim()).filter((value) => value.length > 0))].sort(\n (left, right) => left.localeCompare(right),\n )\n : [],\n };\n}\n\nasync function scanGuidanceFiles(projectRoot: string): Promise<AgentGuidanceFileScan[]> {\n const scans: AgentGuidanceFileScan[] = [];\n for (const filename of AGENT_GUIDANCE_TARGET_FILENAMES) {\n const filePath = path.join(projectRoot, filename);\n const exists = await pathExists(filePath);\n if (!exists) {\n scans.push({\n file_path: filePath,\n exists,\n has_guidance: false,\n has_marker: false,\n });\n continue;\n }\n const content = await fs.readFile(filePath, \"utf8\");\n const contentLower = content.toLowerCase();\n const tokenHits = AGENT_GUIDANCE_REQUIRED_TOKENS.filter((token) => contentLower.includes(token));\n const hasMarker = hasGuidanceMarker(content);\n scans.push({\n file_path: filePath,\n exists,\n has_guidance: hasMarker || tokenHits.length >= AGENT_GUIDANCE_REQUIRED_TOKEN_THRESHOLD,\n has_marker: hasMarker,\n });\n }\n return scans;\n}\n\nfunction pushUnique(target: string[], value: string): void {\n if (!target.includes(value)) {\n target.push(value);\n }\n}\n\nfunction applyAgentGuidanceState(\n settings: PmSettings,\n currentState: PmSettings[\"agent_guidance\"],\n): { changed: boolean; state: PmSettings[\"agent_guidance\"] } {\n const existing = normalizeAgentGuidanceState(settings);\n const changed = JSON.stringify(existing) !== JSON.stringify(currentState);\n if (changed) {\n settings.agent_guidance = currentState;\n }\n return { changed, state: currentState };\n}\n\nasync function writeGuidanceFile(filePath: string): Promise<{ changed: boolean; warnings: string[] }> {\n const exists = await pathExists(filePath);\n const currentContent = exists ? await fs.readFile(filePath, \"utf8\") : \"\";\n const nextContent = upsertAgentGuidanceBlock(currentContent);\n if (!nextContent.changed) {\n return { changed: false, warnings: [] };\n }\n await fs.writeFile(filePath, nextContent.next_content, \"utf8\");\n return {\n changed: true,\n warnings: await runActiveOnWriteHooks({\n path: filePath,\n scope: \"project\",\n op: \"init:agent_guidance_file\",\n }),\n };\n}\n\n/**\n * Implements run init agent guidance for the public runtime surface of this module.\n */\nexport async function runInitAgentGuidance(options: RunInitAgentGuidanceOptions): Promise<RunInitAgentGuidanceResult> {\n const warnings: string[] = [];\n const nextSteps: string[] = [];\n const projectRoot = resolveProjectRoot(options.pm_root, options.cwd);\n let scans = await scanGuidanceFiles(projectRoot);\n const targetPath = resolveTargetGuidancePath(scans, projectRoot);\n const targetRelativePath = toPortableRelativePath(projectRoot, targetPath);\n const addLaterHint = \"Add workflow guidance later: pm init --agent-guidance add\";\n let prompted = false;\n let applied = false;\n let skipped = false;\n let state = normalizeAgentGuidanceState(options.settings);\n const checkedFiles = scans.map((entry) => toPortableRelativePath(projectRoot, entry.file_path));\n const presentBefore = scans.some((entry) => entry.has_guidance);\n\n const markState = (partial: Partial<PmSettings[\"agent_guidance\"]>): void => {\n state = {\n ...state,\n ...partial,\n template_version: AGENT_GUIDANCE_TEMPLATE_VERSION,\n last_checked_files: checkedFiles,\n };\n };\n\n if (options.mode === \"status\") {\n if (!presentBefore) {\n warnings.push(\"agent_guidance:missing\");\n pushUnique(nextSteps, addLaterHint);\n }\n } else if (options.mode === \"skip\") {\n skipped = true;\n markState({\n prompt_completed: true,\n declined: true,\n declined_at: state.declined_at.length > 0 ? state.declined_at : new Date().toISOString(),\n });\n warnings.push(\"agent_guidance:explicit_skip\");\n pushUnique(nextSteps, addLaterHint);\n } else if (options.mode === \"add\") {\n if (!presentBefore) {\n const writeResult = await writeGuidanceFile(targetPath);\n warnings.push(...writeResult.warnings);\n if (writeResult.changed) {\n applied = true;\n warnings.push(`agent_guidance:added:${targetRelativePath}`);\n }\n }\n markState({\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n } else if (presentBefore) {\n if (state.declined) {\n markState({\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n }\n } else if (state.prompt_completed && state.declined) {\n skipped = true;\n warnings.push(\"agent_guidance:skipped_declined\");\n pushUnique(nextSteps, addLaterHint);\n } else if (options.interactive) {\n prompted = true;\n const approved = await promptForGuidanceWrite(targetRelativePath);\n if (approved) {\n const writeResult = await writeGuidanceFile(targetPath);\n warnings.push(...writeResult.warnings);\n if (writeResult.changed) {\n applied = true;\n warnings.push(`agent_guidance:added:${targetRelativePath}`);\n }\n markState({\n prompt_completed: true,\n declined: false,\n declined_at: \"\",\n });\n } else {\n skipped = true;\n markState({\n prompt_completed: true,\n declined: true,\n declined_at: new Date().toISOString(),\n });\n warnings.push(\"agent_guidance:declined\");\n pushUnique(nextSteps, addLaterHint);\n }\n } else {\n warnings.push(\"agent_guidance:missing_non_interactive\");\n pushUnique(nextSteps, addLaterHint);\n }\n\n const stateUpdate = applyAgentGuidanceState(options.settings, state);\n if (applied) {\n scans = await scanGuidanceFiles(projectRoot);\n }\n\n const summary: InitAgentGuidanceSummary = {\n mode: options.mode,\n present: scans.some((entry) => entry.has_guidance),\n prompted,\n applied,\n skipped,\n declined: state.declined,\n prompt_completed: state.prompt_completed,\n template_version: state.template_version,\n target_file: targetRelativePath,\n checked_files: scans.map((entry) => toPortableRelativePath(projectRoot, entry.file_path)),\n files_with_guidance: scans\n .filter((entry) => entry.has_guidance)\n .map((entry) => toPortableRelativePath(projectRoot, entry.file_path)),\n missing_files: scans\n .filter((entry) => !entry.exists)\n .map((entry) => toPortableRelativePath(projectRoot, entry.file_path)),\n };\n\n return {\n summary,\n warnings,\n next_steps: nextSteps,\n settings_changed: stateUpdate.changed,\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAOA,SAAQ;AACf,OAAOC,WAAU;AACjB,OAAOC,eAAc;AACrB,SAAS,SAASC,QAAO,UAAUC,eAAc;;;ACHjD,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,SAAS,SAAS,OAAO,UAAU,cAAc;;;;;;;;AAU1C,IAAM,kCAA2D,CAAC,OAAO,OAAO,QAAQ,QAAQ;AAEvG,IAAM,kCAAkC,CAAC,aAAa,WAAW;AACjE,IAAM,iCAAiC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF,IAAM,0CAA0C;AAChD,IAAM,kCAAkC;AACxC,IAAM,qCAAqC;AAC3C,IAAM,8BAA8B,qCAAqC,+BAA+B;AACxG,IAAM,4BAA4B;AAqBlC,IAAI,uCAAuC,MAAsC,SAAS,gBAAgB,EAAE,OAAO,OAAM,CAAE;AAyD3H,SAAS,uBAAuB,aAAqB,YAAkB;AACrE,QAAM,WAAW,KAAK,SAAS,aAAa,UAAU;AACtD,MAAI,SAAS,WAAW,GAAG;AACzB,WAAO,KAAK,S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ACA,mBAAmB,SAAS,WAAW;IACvC,aAAa;IACb,GAAI,uBAAuB,EAAE,wBAAwB,qBAAoB,IAAK,CAAA;IAC9E,GAAI,oBAAoB,EAAE,oBAAoB,kBAAiB,IAAK,CAAA;IACpE,YAAY;IACZ,gBAAgB,oBAAoB;;AAExC;",
|
|
6
|
-
"names": ["fs", "path", "readline", "input", "output", "nextContent", "readline", "input", "output", "path", "global", "fs"]
|
|
7
|
-
}
|