@unbrained/pm-cli 2026.6.13 → 2026.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -0
- package/README.md +1 -1
- package/dist/cli/bootstrap-args.d.ts +29 -0
- package/dist/cli/bootstrap-args.js +11 -4
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.d.ts +12 -0
- package/dist/cli/commander-usage.js +18 -7
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.d.ts +19 -0
- package/dist/cli/commands/activity.js +12 -2
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +58 -0
- package/dist/cli/commands/aggregate.js +48 -15
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/annotation-command.d.ts +6 -1
- package/dist/cli/commands/annotation-command.js +72 -2
- package/dist/cli/commands/annotation-command.js.map +1 -1
- package/dist/cli/commands/append.js +4 -3
- package/dist/cli/commands/append.js.map +1 -1
- package/dist/cli/commands/close-many.d.ts +20 -0
- package/dist/cli/commands/close-many.js +14 -23
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.js +37 -4
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +3 -2
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/comments.d.ts +2 -0
- package/dist/cli/commands/comments.js +49 -23
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +362 -15
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +51 -1
- package/dist/cli/commands/config.js +50 -12
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +79 -1
- package/dist/cli/commands/context.js +151 -25
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +80 -1
- package/dist/cli/commands/contracts.js +54 -4
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +51 -0
- package/dist/cli/commands/create.js +137 -18
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.d.ts +33 -0
- package/dist/cli/commands/dedupe-audit.js +18 -14
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/deps.js +7 -4
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/event-validation-messages.js +3 -3
- package/dist/cli/commands/event-validation-messages.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +7 -0
- package/dist/cli/commands/extension/bundled-catalog.js +19 -15
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +41 -1
- package/dist/cli/commands/extension/install-sources.js +26 -8
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +5 -0
- package/dist/cli/commands/extension/shared.js +9 -3
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +133 -1
- package/dist/cli/commands/extension.js +127 -9
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.d.ts +30 -1
- package/dist/cli/commands/files.js +21 -2
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/focus.d.ts +11 -0
- package/dist/cli/commands/focus.js +86 -0
- package/dist/cli/commands/focus.js.map +1 -0
- package/dist/cli/commands/get.d.ts +9 -2
- package/dist/cli/commands/get.js +34 -6
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/guide.d.ts +5 -0
- package/dist/cli/commands/guide.js +6 -3
- package/dist/cli/commands/guide.js.map +1 -1
- package/dist/cli/commands/health.d.ts +109 -0
- package/dist/cli/commands/health.js +87 -35
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.js +27 -36
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +46 -0
- package/dist/cli/commands/history-redact.js +99 -67
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +34 -37
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/history.js +6 -2
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +4 -1
- package/dist/cli/commands/index.js +6 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +54 -0
- package/dist/cli/commands/init-agent-guidance.js +31 -4
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +38 -2
- package/dist/cli/commands/init.js +50 -64
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learnings.js +4 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/lifecycle-transitions.d.ts +23 -0
- package/dist/cli/commands/lifecycle-transitions.js +41 -0
- package/dist/cli/commands/lifecycle-transitions.js.map +1 -0
- package/dist/cli/commands/linked-artifacts.d.ts +5 -0
- package/dist/cli/commands/linked-artifacts.js +18 -4
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/linked-test-parsers.d.ts +5 -0
- package/dist/cli/commands/linked-test-parsers.js +5 -2
- package/dist/cli/commands/linked-test-parsers.js.map +1 -1
- package/dist/cli/commands/list-filter-shared.d.ts +8 -0
- package/dist/cli/commands/list-filter-shared.js +70 -0
- package/dist/cli/commands/list-filter-shared.js.map +1 -0
- package/dist/cli/commands/list.d.ts +116 -0
- package/dist/cli/commands/list.js +194 -6
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/normalize.js +16 -2
- package/dist/cli/commands/normalize.js.map +1 -1
- package/dist/cli/commands/notes.js +4 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/plan.js +3 -2
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/recurrence-parsers.d.ts +9 -0
- package/dist/cli/commands/recurrence-parsers.js +19 -2
- package/dist/cli/commands/recurrence-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +83 -0
- package/dist/cli/commands/reindex.js +45 -10
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/repeatable-metadata-parsers.js +28 -4
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +40 -1
- package/dist/cli/commands/restore.js +27 -2
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/scheduling-shortcuts.d.ts +43 -0
- package/dist/cli/commands/scheduling-shortcuts.js +87 -0
- package/dist/cli/commands/scheduling-shortcuts.js.map +1 -0
- package/dist/cli/commands/schema.d.ts +152 -2
- package/dist/cli/commands/schema.js +510 -4
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +289 -1
- package/dist/cli/commands/search.js +367 -60
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +38 -0
- package/dist/cli/commands/stats.js +38 -10
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.js +5 -3
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/templates.d.ts +18 -0
- package/dist/cli/commands/templates.js +9 -2
- package/dist/cli/commands/templates.js.map +1 -1
- package/dist/cli/commands/test-all.d.ts +5 -0
- package/dist/cli/commands/test-all.js +9 -3
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +70 -1
- package/dist/cli/commands/test.js +84 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.d.ts +34 -1
- package/dist/cli/commands/update-many.js +60 -31
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +71 -0
- package/dist/cli/commands/update.js +91 -11
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts +28 -1
- package/dist/cli/commands/upgrade.js +17 -4
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +114 -0
- package/dist/cli/commands/validate.js +153 -8
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +30 -0
- package/dist/cli/error-guidance.js +41 -6
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-options.js +9 -7
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.d.ts +8 -0
- package/dist/cli/help-content.js +54 -6
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.d.ts +19 -1
- package/dist/cli/help-json-payload.js +16 -7
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.d.ts +242 -0
- package/dist/cli/main.js +241 -45
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +62 -5
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.d.ts +16 -0
- package/dist/cli/register-mutation.js +376 -100
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.d.ts +8 -0
- package/dist/cli/register-operations.js +134 -11
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +9 -6
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +4 -0
- package/dist/cli/registration-helpers.js +124 -38
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-PZYSZA26.js +18 -0
- package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js → activity-SFM4THAU.js} +13 -11
- package/dist/cli-bundle/chunks/{aggregate-IRHJWEKG.js → aggregate-Y5ADDKBM.js} +55 -26
- package/dist/cli-bundle/chunks/aggregate-Y5ADDKBM.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-XEBW22UQ.js → aggregate-YTAUQLRW.js} +54 -25
- package/dist/cli-bundle/chunks/aggregate-YTAUQLRW.js.map +7 -0
- package/dist/cli-bundle/chunks/{append-NL67JNJU.js → append-4M7OVV7M.js} +11 -11
- package/dist/cli-bundle/chunks/append-4M7OVV7M.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-N2AWXKZC.js → append-HSPK4L4V.js} +10 -10
- package/dist/cli-bundle/chunks/{append-N2AWXKZC.js.map → append-HSPK4L4V.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js → chunk-26BM6YLO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js → chunk-2C6FU3D3.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js.map → chunk-2C6FU3D3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQDKAEKG.js → chunk-2OPYLXDO.js} +117 -37
- package/dist/cli-bundle/chunks/chunk-2OPYLXDO.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4ZKKZMLH.js → chunk-2S46FKLB.js} +104 -30
- package/dist/cli-bundle/chunks/chunk-2S46FKLB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js → chunk-2TMKMTEI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js → chunk-2VH7DFSJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RHYBR6G7.js → chunk-3ENF4NO4.js} +74 -14
- package/dist/cli-bundle/chunks/chunk-3ENF4NO4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3GR2HTYY.js +404 -0
- package/dist/cli-bundle/chunks/chunk-3GR2HTYY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AAUYXSFF.js → chunk-3R3FYCBV.js} +223 -50
- package/dist/cli-bundle/chunks/chunk-3R3FYCBV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5HSAHRYA.js → chunk-3UKJX3RP.js} +82 -21
- package/dist/cli-bundle/chunks/chunk-3UKJX3RP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js +83 -0
- package/dist/cli-bundle/chunks/chunk-4RTLBTYS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UCVJP4JL.js → chunk-5FDYWOJT.js} +52 -8
- package/dist/cli-bundle/chunks/chunk-5FDYWOJT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js → chunk-5XGWFUW2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LYNQ3NGI.js → chunk-6BD77FGL.js} +309 -20
- package/dist/cli-bundle/chunks/chunk-6BD77FGL.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js +35 -0
- package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-36BCSMKP.js → chunk-6HF6CIY2.js} +26 -11
- package/dist/cli-bundle/chunks/chunk-6HF6CIY2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M3SI2REU.js → chunk-6PBPD4MN.js} +322 -19
- package/dist/cli-bundle/chunks/chunk-6PBPD4MN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TSXWFN3L.js → chunk-6VFUEGOA.js} +53 -9
- package/dist/cli-bundle/chunks/chunk-6VFUEGOA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2J2AH4V5.js → chunk-AAOXSPAE.js} +56 -72
- package/dist/cli-bundle/chunks/chunk-AAOXSPAE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js → chunk-AJCQ5GT6.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ALTGYHN3.js +61 -0
- package/dist/cli-bundle/chunks/chunk-ALTGYHN3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KHGTYCJ6.js → chunk-AOJQL33L.js} +83 -22
- package/dist/cli-bundle/chunks/chunk-AOJQL33L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js → chunk-AXLDUGXA.js} +7 -4
- package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js.map → chunk-AXLDUGXA.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js → chunk-BITCVGHT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js → chunk-CGQTFWYI.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LFW5NQUP.js → chunk-CHM2VFVL.js} +407 -290
- package/dist/cli-bundle/chunks/chunk-CHM2VFVL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js → chunk-COVLE33A.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SGMGMCIF.js → chunk-DDNBWH4W.js} +157 -25
- package/dist/cli-bundle/chunks/chunk-DDNBWH4W.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js → chunk-F5MSD5HE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6TBR5AZ2.js → chunk-FAXB6F6R.js} +76 -8
- package/dist/cli-bundle/chunks/chunk-FAXB6F6R.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L6YQONLM.js → chunk-FPDK5BZQ.js} +18 -19
- package/dist/cli-bundle/chunks/chunk-FPDK5BZQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGG32LKL.js → chunk-FPY2TOFI.js} +480 -24
- package/dist/cli-bundle/chunks/chunk-FPY2TOFI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JWXTOYBI.js → chunk-G2MOUCTU.js} +121 -44
- package/dist/cli-bundle/chunks/chunk-G2MOUCTU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3VULHQNS.js → chunk-G57RHEGP.js} +36 -18
- package/dist/cli-bundle/chunks/chunk-G57RHEGP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QQG4HEX7.js → chunk-IROHIK2T.js} +37 -63
- package/dist/cli-bundle/chunks/chunk-IROHIK2T.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js → chunk-JZHL4E3Q.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-XXLMJDUB.js → chunk-KA22USXD.js} +21 -22
- package/dist/cli-bundle/chunks/chunk-KA22USXD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WLH7X4RN.js → chunk-KBC4O7SY.js} +56 -72
- package/dist/cli-bundle/chunks/chunk-KBC4O7SY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js → chunk-KCAGIH6K.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BVL5KGVA.js → chunk-KO3VM5GS.js} +27 -12
- package/dist/cli-bundle/chunks/chunk-KO3VM5GS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IXVSSHGV.js → chunk-LNH5Q32E.js} +13 -8
- package/dist/cli-bundle/chunks/chunk-LNH5Q32E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js → chunk-LORM3M2I.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js.map → chunk-LORM3M2I.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-PNYAAB4S.js → chunk-LWGMDLQ6.js} +8 -3
- package/dist/cli-bundle/chunks/chunk-LWGMDLQ6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js → chunk-M4AVU7VC.js} +19 -8
- package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js.map → chunk-M4AVU7VC.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js → chunk-MIBX6ZRN.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AUDDXKNX.js → chunk-MMF2E3FM.js} +77 -9
- package/dist/cli-bundle/chunks/chunk-MMF2E3FM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RFR2YQGO.js → chunk-MORZOR7W.js} +21 -8
- package/dist/cli-bundle/chunks/chunk-MORZOR7W.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4TPFXE2R.js → chunk-MUTUZ2HD.js} +118 -74
- package/dist/cli-bundle/chunks/chunk-MUTUZ2HD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HZOX5BYD.js → chunk-OGXEBTX3.js} +35 -17
- package/dist/cli-bundle/chunks/chunk-OGXEBTX3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js → chunk-OOIH6J5T.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js.map → chunk-OOIH6J5T.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VNC2HBL4.js → chunk-OSBJPPX3.js} +20 -9
- package/dist/cli-bundle/chunks/chunk-OSBJPPX3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2ANTZBYF.js → chunk-PJS3WDO2.js} +122 -45
- package/dist/cli-bundle/chunks/chunk-PJS3WDO2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7SM7VA5I.js → chunk-QGPE2H6Z.js} +19 -8
- package/dist/cli-bundle/chunks/chunk-QGPE2H6Z.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QVTFFLR2.js +58 -0
- package/dist/cli-bundle/chunks/chunk-QVTFFLR2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js → chunk-QW2F6ARZ.js} +8 -5
- package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js.map → chunk-QW2F6ARZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TOX7YQ7X.js → chunk-QXC3LWB7.js} +223 -50
- package/dist/cli-bundle/chunks/chunk-QXC3LWB7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-W6KNFAMZ.js → chunk-QXMXRPX5.js} +9 -8
- package/dist/cli-bundle/chunks/chunk-QXMXRPX5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js → chunk-R4AKUPKI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js.map → chunk-R4AKUPKI.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-RASR23HV.js +394 -0
- package/dist/cli-bundle/chunks/chunk-RASR23HV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JW7D6437.js → chunk-SCDCNGCV.js} +20 -9
- package/dist/cli-bundle/chunks/chunk-SCDCNGCV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js → chunk-SCS5PVAA.js} +10 -9
- package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js.map → chunk-SCS5PVAA.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-S2CDTRJ6.js → chunk-SJCMTOEU.js} +381 -271
- package/dist/cli-bundle/chunks/chunk-SJCMTOEU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js → chunk-SO2ES46D.js} +11 -10
- package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js.map → chunk-SO2ES46D.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MACCNKSZ.js → chunk-TBV33CB4.js} +36 -62
- package/dist/cli-bundle/chunks/chunk-TBV33CB4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js +86 -0
- package/dist/cli-bundle/chunks/chunk-TEFEXQWI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HLEGAQXT.js → chunk-TWBDDVIF.js} +20 -7
- package/dist/cli-bundle/chunks/chunk-TWBDDVIF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4JHJ7YG2.js → chunk-UGUJ2UOR.js} +118 -74
- package/dist/cli-bundle/chunks/chunk-UGUJ2UOR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js → chunk-UN6P3IJ4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-32XSW44C.js → chunk-V2GYOMEX.js} +10 -9
- package/dist/cli-bundle/chunks/chunk-V2GYOMEX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HWHONML5.js → chunk-VF3KQGNY.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SOHXUA2Q.js → chunk-VHG6LUKR.js} +116 -36
- package/dist/cli-bundle/chunks/chunk-VHG6LUKR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7CRFV6JR.js → chunk-VXHMQDXA.js} +483 -27
- package/dist/cli-bundle/chunks/chunk-VXHMQDXA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IZHCCG4S.js → chunk-VXRFAE7W.js} +14 -9
- package/dist/cli-bundle/chunks/chunk-VXRFAE7W.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-R4VWYWRN.js → chunk-W3HFLORZ.js} +7 -2
- package/dist/cli-bundle/chunks/chunk-W3HFLORZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4FHLNNW7.js → chunk-WQRL4COW.js} +74 -14
- package/dist/cli-bundle/chunks/chunk-WQRL4COW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js +32 -0
- package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MGAQ6KZG.js → chunk-XESAPVZ4.js} +166 -27
- package/dist/cli-bundle/chunks/chunk-XESAPVZ4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PEH7SZD2.js → chunk-YLAW3FZN.js} +105 -31
- package/dist/cli-bundle/chunks/chunk-YLAW3FZN.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js → claim-WGAWJCPY.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js → claim-ZI6P4LMU.js} +10 -10
- package/dist/cli-bundle/chunks/close-I7PRQ5G7.js +13 -0
- package/dist/cli-bundle/chunks/{close-SPUFW5QR.js → close-JMVVSIQE.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-GKAJX54X.js → close-many-IKPJXVOZ.js} +32 -20
- package/dist/cli-bundle/chunks/close-many-IKPJXVOZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-GL6NRUU5.js → close-many-TXABDCSJ.js} +31 -19
- package/dist/cli-bundle/chunks/close-many-TXABDCSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-5FPT6L7N.js → comments-RLWR2S7W.js} +55 -31
- package/dist/cli-bundle/chunks/comments-RLWR2S7W.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-TOLOYWNI.js → comments-YAMXKHUX.js} +54 -30
- package/dist/cli-bundle/chunks/comments-YAMXKHUX.js.map +7 -0
- package/dist/cli-bundle/chunks/{config-7N6D7YJE.js → config-7ICYC2WU.js} +83 -19
- package/dist/cli-bundle/chunks/config-7ICYC2WU.js.map +7 -0
- package/dist/cli-bundle/chunks/{config-4MN45TIH.js → config-NGWN3EXC.js} +83 -19
- package/dist/cli-bundle/chunks/config-NGWN3EXC.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-AQSLE7DZ.js → context-K6QAHN5H.js} +128 -39
- package/dist/cli-bundle/chunks/context-K6QAHN5H.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-U3PUJMVN.js → context-VGXOOAH2.js} +127 -38
- package/dist/cli-bundle/chunks/context-VGXOOAH2.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-ITSJXO3O.js → contracts-KJGY2AQA.js} +99 -15
- package/dist/cli-bundle/chunks/contracts-KJGY2AQA.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-H7KCQXLY.js → contracts-KMA6OJY7.js} +99 -15
- package/dist/cli-bundle/chunks/contracts-KMA6OJY7.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js → copy-Q2PPU4AY.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-C4W522JM.js → copy-SC6UF3PI.js} +7 -7
- package/dist/cli-bundle/chunks/{create-4EQNELMY.js → create-76FE7JVF.js} +16 -13
- package/dist/cli-bundle/chunks/create-RTRFW6RE.js +30 -0
- package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js → delete-T6DJSUJI.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js → delete-XFUX533E.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js → deps-5GWMMS6D.js} +9 -10
- package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js.map → deps-5GWMMS6D.js.map} +2 -2
- package/dist/cli-bundle/chunks/{deps-HV2C2L46.js → deps-MCCU633S.js} +10 -11
- package/dist/cli-bundle/chunks/deps-MCCU633S.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js → docs-HE3HCQ4S.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-RJQPLROO.js → docs-SXMOABHR.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js → extension-E23K4QRR.js} +7 -5
- package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js → extension-PMD3XMLN.js} +7 -5
- package/dist/cli-bundle/chunks/{files-OIFN3DQX.js → files-2RSWGPEU.js} +25 -11
- package/dist/cli-bundle/chunks/files-2RSWGPEU.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-LIFDKNCN.js → files-ZWFJFWBK.js} +24 -10
- package/dist/cli-bundle/chunks/files-ZWFJFWBK.js.map +7 -0
- package/dist/cli-bundle/chunks/focus-KTTB3P3F.js +106 -0
- package/dist/cli-bundle/chunks/focus-KTTB3P3F.js.map +1 -0
- package/dist/cli-bundle/chunks/focus-ZMDP4FEL.js +109 -0
- package/dist/cli-bundle/chunks/focus-ZMDP4FEL.js.map +7 -0
- package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js → gc-BXIAKLAH.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js → gc-C7K6JNUO.js} +3 -3
- package/dist/cli-bundle/chunks/{get-SAB7CRBG.js → get-AZQLC4NO.js} +43 -16
- package/dist/cli-bundle/chunks/get-AZQLC4NO.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-K7UULTQF.js → get-I65HTAWO.js} +42 -15
- package/dist/cli-bundle/chunks/get-I65HTAWO.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-NUVZYIEV.js → health-3MFFPQVZ.js} +75 -49
- package/dist/cli-bundle/chunks/health-3MFFPQVZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-VJWH3ZFK.js → health-MYZEOCLI.js} +74 -48
- package/dist/cli-bundle/chunks/health-MYZEOCLI.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-GYFD2DJW.js → history-73Z6OBFZ.js} +10 -10
- package/dist/cli-bundle/chunks/history-BIPHVUMF.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-WQZQ6KXM.js → history-compact-24VQ63A3.js} +37 -46
- package/dist/cli-bundle/chunks/history-compact-24VQ63A3.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-SLL6ESXH.js → history-compact-UIAR2OI4.js} +38 -47
- package/dist/cli-bundle/chunks/history-compact-UIAR2OI4.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js → history-redact-7YCXEWJD.js} +13 -11
- package/dist/cli-bundle/chunks/history-redact-WZZ6GZ2Z.js +21 -0
- package/dist/cli-bundle/chunks/{history-repair-BJCGM6Q3.js → history-repair-4NOFFG2W.js} +44 -49
- package/dist/cli-bundle/chunks/history-repair-4NOFFG2W.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-UCYS55ZX.js → history-repair-GQN2X4TR.js} +43 -48
- package/dist/cli-bundle/chunks/history-repair-GQN2X4TR.js.map +7 -0
- package/dist/cli-bundle/chunks/init-K34V4PZR.js +20 -0
- package/dist/cli-bundle/chunks/{init-MXV57LKL.js → init-TDEDNVMM.js} +12 -9
- package/dist/cli-bundle/chunks/{learnings-QKJOKEAO.js → learnings-TV2CTGJ3.js} +13 -12
- package/dist/cli-bundle/chunks/learnings-TV2CTGJ3.js.map +7 -0
- package/dist/cli-bundle/chunks/{learnings-L6KTZGOT.js → learnings-U67FTXPB.js} +14 -13
- package/dist/cli-bundle/chunks/learnings-U67FTXPB.js.map +1 -0
- package/dist/cli-bundle/chunks/list-MSHYOCFU.js +33 -0
- package/dist/cli-bundle/chunks/list-VV57WGUD.js +29 -0
- package/dist/cli-bundle/chunks/{notes-HMCB7TK6.js → notes-EUANWWKD.js} +13 -12
- package/dist/cli-bundle/chunks/notes-EUANWWKD.js.map +7 -0
- package/dist/cli-bundle/chunks/{notes-3NLK7WTZ.js → notes-GYVNDAL4.js} +14 -13
- package/dist/cli-bundle/chunks/notes-GYVNDAL4.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-NANUWH4T.js → plan-4LF4AV63.js} +15 -14
- package/dist/cli-bundle/chunks/plan-4LF4AV63.js.map +7 -0
- package/dist/cli-bundle/chunks/{plan-DWBYI5C6.js → plan-W27O6DBS.js} +16 -15
- package/dist/cli-bundle/chunks/plan-W27O6DBS.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-SMMMLSWW.js → register-list-query-BXLEHJ7L.js} +32 -23
- package/dist/cli-bundle/chunks/register-list-query-BXLEHJ7L.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-PWQ5F2VI.js → register-list-query-C2MS3BVQ.js} +31 -22
- package/dist/cli-bundle/chunks/register-list-query-C2MS3BVQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-QKFPTIZG.js → register-mutation-6UCOEQ6L.js} +361 -106
- package/dist/cli-bundle/chunks/register-mutation-6UCOEQ6L.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-ZYJQ4DVP.js → register-mutation-HE73PREP.js} +355 -107
- package/dist/cli-bundle/chunks/register-mutation-HE73PREP.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-2FMZ6WEF.js → register-operations-L6C32FDA.js} +111 -39
- package/dist/cli-bundle/chunks/register-operations-L6C32FDA.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-BAFQURZG.js → register-operations-QQEHEX4P.js} +112 -40
- package/dist/cli-bundle/chunks/register-operations-QQEHEX4P.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-QN2XV7UL.js → register-setup-A7N4PNT3.js} +18 -21
- package/dist/cli-bundle/chunks/register-setup-A7N4PNT3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-DQEIKBIP.js → register-setup-WHG3NBP6.js} +17 -20
- package/dist/cli-bundle/chunks/register-setup-WHG3NBP6.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js → restore-TSWSULYY.js} +13 -11
- package/dist/cli-bundle/chunks/restore-XQXICL3V.js +19 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js +91 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-NC46K6BD.js.map +7 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js +88 -0
- package/dist/cli-bundle/chunks/scheduling-shortcuts-UGDPQALY.js.map +1 -0
- package/dist/cli-bundle/chunks/{schema-ZZ7ZDM2X.js → schema-7U7JUYGK.js} +797 -10
- package/dist/cli-bundle/chunks/schema-7U7JUYGK.js.map +1 -0
- package/dist/cli-bundle/chunks/{schema-RNVJ55V2.js → schema-TSBYSEMW.js} +810 -9
- package/dist/cli-bundle/chunks/schema-TSBYSEMW.js.map +7 -0
- package/dist/cli-bundle/chunks/{search-BJ457C2A.js → search-OXLSQKHP.js} +328 -71
- package/dist/cli-bundle/chunks/search-OXLSQKHP.js.map +7 -0
- package/dist/cli-bundle/chunks/{search-FQDZXX7P.js → search-T3TOFLOQ.js} +328 -71
- package/dist/cli-bundle/chunks/search-T3TOFLOQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{stats-DUQWCVOS.js → stats-5CLG22YZ.js} +41 -16
- package/dist/cli-bundle/chunks/stats-5CLG22YZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{stats-CUG3ZHOI.js → stats-XEMUXS42.js} +42 -17
- package/dist/cli-bundle/chunks/stats-XEMUXS42.js.map +1 -0
- package/dist/cli-bundle/chunks/{telemetry-RK2VX75A.js → telemetry-23OPBBZT.js} +7 -7
- package/dist/cli-bundle/chunks/telemetry-23OPBBZT.js.map +1 -0
- package/dist/cli-bundle/chunks/{telemetry-33MRGX4Z.js → telemetry-I3D7XZ55.js} +6 -6
- package/dist/cli-bundle/chunks/telemetry-I3D7XZ55.js.map +7 -0
- package/dist/cli-bundle/chunks/test-AROS3LIV.js +35 -0
- package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js → test-CECIMKOA.js} +17 -14
- package/dist/cli-bundle/chunks/{test-all-ARSMX33Q.js → test-all-4DEQPIXH.js} +25 -17
- package/dist/cli-bundle/chunks/test-all-4DEQPIXH.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-all-ANYQ33O2.js → test-all-6RO6X3SM.js} +24 -16
- package/dist/cli-bundle/chunks/test-all-6RO6X3SM.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-runs-5URSD34O.js → test-runs-AAXVFWKH.js} +62 -65
- package/dist/cli-bundle/chunks/test-runs-AAXVFWKH.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-XNACGSNQ.js → test-runs-LYBQSYRC.js} +61 -64
- package/dist/cli-bundle/chunks/test-runs-LYBQSYRC.js.map +7 -0
- package/dist/cli-bundle/chunks/update-MIWEJC76.js +24 -0
- package/dist/cli-bundle/chunks/update-P7I5YSRB.js +28 -0
- package/dist/cli-bundle/chunks/{update-many-724JCVDE.js → update-many-5B4HLVBK.js} +79 -33
- package/dist/cli-bundle/chunks/update-many-5B4HLVBK.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-6B7PJ33I.js → update-many-G2QOVZSB.js} +80 -34
- package/dist/cli-bundle/chunks/update-many-G2QOVZSB.js.map +1 -0
- package/dist/cli-bundle/chunks/{upgrade-QHRGDBSA.js → upgrade-GFIDL62L.js} +23 -9
- package/dist/cli-bundle/chunks/upgrade-GFIDL62L.js.map +1 -0
- package/dist/cli-bundle/chunks/{upgrade-ALBEZAI7.js → upgrade-QUQYL7D3.js} +22 -8
- package/dist/cli-bundle/chunks/upgrade-QUQYL7D3.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-UY6DRCG5.js → validate-ADDZBMM3.js} +236 -30
- package/dist/cli-bundle/chunks/validate-ADDZBMM3.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-IQRYFXIV.js → validate-MAS3H6ZP.js} +222 -30
- package/dist/cli-bundle/chunks/validate-MAS3H6ZP.js.map +1 -0
- package/dist/cli-bundle/main.js +312 -139
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +21 -8
- package/dist/cli.js.map +1 -1
- package/dist/core/config/nested-settings.js +40 -2
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +7 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/extensions/extension-policy.js +14 -15
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/item-fields.js +4 -5
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +75 -1
- package/dist/core/extensions/loader.js +56 -32
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/governance/content-fields.d.ts +84 -0
- package/dist/core/governance/content-fields.js +182 -0
- package/dist/core/governance/content-fields.js.map +1 -0
- package/dist/core/governance/issue-codes.d.ts +51 -0
- package/dist/core/governance/issue-codes.js +95 -0
- package/dist/core/governance/issue-codes.js.map +1 -0
- package/dist/core/governance/metadata-coverage.d.ts +168 -0
- package/dist/core/governance/metadata-coverage.js +362 -0
- package/dist/core/governance/metadata-coverage.js.map +1 -0
- package/dist/core/history/history-rewrite.d.ts +22 -0
- package/dist/core/history/history-rewrite.js +38 -2
- package/dist/core/history/history-rewrite.js.map +1 -1
- package/dist/core/history/history.d.ts +7 -0
- package/dist/core/history/history.js +6 -2
- package/dist/core/history/history.js.map +1 -1
- package/dist/core/io/body-file.d.ts +14 -0
- package/dist/core/io/body-file.js +47 -0
- package/dist/core/io/body-file.js.map +1 -0
- package/dist/core/item/item-format.d.ts +46 -1
- package/dist/core/item/item-format.js +51 -60
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/parse.d.ts +41 -0
- package/dist/core/item/parse.js +69 -16
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/item/type-registry.d.ts +1 -0
- package/dist/core/item/type-registry.js +8 -10
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock.d.ts +26 -0
- package/dist/core/lock/lock.js +10 -2
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/output/output.d.ts +7 -0
- package/dist/core/output/output.js +6 -2
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/schema/fields-file.d.ts +94 -0
- package/dist/core/schema/fields-file.js +317 -0
- package/dist/core/schema/fields-file.js.map +1 -0
- package/dist/core/schema/item-types-file.d.ts +25 -2
- package/dist/core/schema/item-types-file.js +78 -6
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-schema.d.ts +7 -0
- package/dist/core/schema/runtime-schema.js +23 -16
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/type-inference.d.ts +34 -0
- package/dist/core/schema/type-inference.js +97 -0
- package/dist/core/schema/type-inference.js.map +1 -0
- package/dist/core/schema/type-presets.d.ts +30 -0
- package/dist/core/schema/type-presets.js +96 -0
- package/dist/core/schema/type-presets.js.map +1 -0
- package/dist/core/search/cache.d.ts +19 -1
- package/dist/core/search/cache.js +11 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +36 -2
- package/dist/core/search/corpus.js +120 -24
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/providers.d.ts +19 -0
- package/dist/core/search/providers.js +19 -2
- package/dist/core/search/providers.js.map +1 -1
- package/dist/core/sentry/instrument.d.ts +1 -0
- package/dist/core/sentry/instrument.js +6 -2
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/session/session-state.d.ts +16 -0
- package/dist/core/session/session-state.js +48 -0
- package/dist/core/session/session-state.js.map +1 -0
- package/dist/core/shared/constants.d.ts +8 -0
- package/dist/core/shared/constants.js +11 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/text-normalization.js +4 -3
- package/dist/core/shared/text-normalization.js.map +1 -1
- package/dist/core/shared/time.d.ts +13 -0
- package/dist/core/shared/time.js +19 -7
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +13 -0
- package/dist/core/store/front-matter-cache.js +21 -11
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.d.ts +11 -0
- package/dist/core/store/item-store.js +12 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +2 -0
- package/dist/core/store/settings-validator.js +25 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.d.ts +60 -1
- package/dist/core/store/settings.js +100 -46
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +10 -8
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +272 -1
- package/dist/core/telemetry/runtime.js +358 -37
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/background-runs.d.ts +35 -0
- package/dist/core/test/background-runs.js +72 -61
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/core/test/run-selectors.js +5 -4
- package/dist/core/test/run-selectors.js.map +1 -1
- package/dist/core/validate/estimate-defaults.d.ts +39 -0
- package/dist/core/validate/estimate-defaults.js +117 -0
- package/dist/core/validate/estimate-defaults.js.map +1 -0
- package/dist/core/validate/fix-planning.d.ts +21 -3
- package/dist/core/validate/fix-planning.js +31 -4
- package/dist/core/validate/fix-planning.js.map +1 -1
- package/dist/core/validate/missing-link-owners.d.ts +64 -0
- package/dist/core/validate/missing-link-owners.js +98 -0
- package/dist/core/validate/missing-link-owners.js.map +1 -0
- package/dist/mcp/server.d.ts +61 -0
- package/dist/mcp/server.js +98 -8
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +64 -10
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +13 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +110 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +127 -11
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +31 -0
- package/dist/sdk/cli-contracts.js +238 -12
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/types.d.ts +17 -1
- package/dist/types.js +3 -3
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +15 -3
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +171 -10
- package/docs/CONFIGURATION.md +135 -0
- package/docs/TESTING.md +6 -4
- package/package.json +6 -4
- package/packages/pm-calendar/extensions/calendar/runtime.js +6 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +12 -0
- package/packages/pm-todos/extensions/todos/runtime.ts +5 -0
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +3 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +1 -1
- package/scripts/bundle-cli.mjs +46 -37
- package/scripts/finalize-build.mjs +20 -9
- package/scripts/prepare-build-cache.mjs +27 -16
- package/dist/cli-bundle/chunks/activity-XIOTGZMU.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-IRHJWEKG.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-XEBW22UQ.js.map +0 -7
- package/dist/cli-bundle/chunks/append-NL67JNJU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2ANTZBYF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2J2AH4V5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-32XSW44C.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-36BCSMKP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VULHQNS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4FHLNNW7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4JHJ7YG2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4TPFXE2R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4ZKKZMLH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5HSAHRYA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6TBR5AZ2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7CRFV6JR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7SM7VA5I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AAUYXSFF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AGG32LKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AUDDXKNX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BVL5KGVA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C24PWDFG.js +0 -138
- package/dist/cli-bundle/chunks/chunk-C24PWDFG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HLEGAQXT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HZOX5BYD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IXVSSHGV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZHCCG4S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JW7D6437.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JWXTOYBI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KHGTYCJ6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-L6YQONLM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LFW5NQUP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LYNQ3NGI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-M3SI2REU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MACCNKSZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MGAQ6KZG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PEH7SZD2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QQG4HEX7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RFR2YQGO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RHYBR6G7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-S2CDTRJ6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SGMGMCIF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SOHXUA2Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SQDKAEKG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TOX7YQ7X.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TSXWFN3L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UCVJP4JL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js +0 -128
- package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VNC2HBL4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-W6KNFAMZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WLH7X4RN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XXLMJDUB.js.map +0 -7
- package/dist/cli-bundle/chunks/close-WOG5WTMZ.js +0 -13
- package/dist/cli-bundle/chunks/close-many-GKAJX54X.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-GL6NRUU5.js.map +0 -7
- package/dist/cli-bundle/chunks/comments-5FPT6L7N.js.map +0 -1
- package/dist/cli-bundle/chunks/comments-TOLOYWNI.js.map +0 -7
- package/dist/cli-bundle/chunks/config-4MN45TIH.js.map +0 -1
- package/dist/cli-bundle/chunks/config-7N6D7YJE.js.map +0 -7
- package/dist/cli-bundle/chunks/context-AQSLE7DZ.js.map +0 -1
- package/dist/cli-bundle/chunks/context-U3PUJMVN.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-H7KCQXLY.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-ITSJXO3O.js.map +0 -1
- package/dist/cli-bundle/chunks/create-NW3K7LVG.js +0 -27
- package/dist/cli-bundle/chunks/deps-HV2C2L46.js.map +0 -1
- package/dist/cli-bundle/chunks/files-LIFDKNCN.js.map +0 -7
- package/dist/cli-bundle/chunks/files-OIFN3DQX.js.map +0 -1
- package/dist/cli-bundle/chunks/get-K7UULTQF.js.map +0 -7
- package/dist/cli-bundle/chunks/get-SAB7CRBG.js.map +0 -1
- package/dist/cli-bundle/chunks/health-NUVZYIEV.js.map +0 -1
- package/dist/cli-bundle/chunks/health-VJWH3ZFK.js.map +0 -7
- package/dist/cli-bundle/chunks/history-IUVN4NTN.js +0 -20
- package/dist/cli-bundle/chunks/history-compact-SLL6ESXH.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-WQZQ6KXM.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-75KIIJUJ.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-BJCGM6Q3.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-UCYS55ZX.js.map +0 -7
- package/dist/cli-bundle/chunks/init-JJFYRUKG.js +0 -17
- package/dist/cli-bundle/chunks/learnings-L6KTZGOT.js.map +0 -1
- package/dist/cli-bundle/chunks/learnings-QKJOKEAO.js.map +0 -7
- package/dist/cli-bundle/chunks/list-GGVPXEV6.js +0 -23
- package/dist/cli-bundle/chunks/list-VOQDQHA4.js +0 -19
- package/dist/cli-bundle/chunks/notes-3NLK7WTZ.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-HMCB7TK6.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-DWBYI5C6.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-NANUWH4T.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-PWQ5F2VI.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-SMMMLSWW.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-QKFPTIZG.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-ZYJQ4DVP.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-2FMZ6WEF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-BAFQURZG.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-DQEIKBIP.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-QN2XV7UL.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-DRBNXJJH.js +0 -17
- package/dist/cli-bundle/chunks/schema-RNVJ55V2.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-ZZ7ZDM2X.js.map +0 -1
- package/dist/cli-bundle/chunks/search-BJ457C2A.js.map +0 -7
- package/dist/cli-bundle/chunks/search-FQDZXX7P.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-CUG3ZHOI.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-DUQWCVOS.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-33MRGX4Z.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-RK2VX75A.js.map +0 -1
- package/dist/cli-bundle/chunks/test-SDMYEQHH.js +0 -32
- package/dist/cli-bundle/chunks/test-all-ANYQ33O2.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-ARSMX33Q.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-5URSD34O.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-XNACGSNQ.js.map +0 -7
- package/dist/cli-bundle/chunks/update-PD46VOXI.js +0 -21
- package/dist/cli-bundle/chunks/update-U235A7WP.js +0 -25
- package/dist/cli-bundle/chunks/update-many-6B7PJ33I.js.map +0 -1
- package/dist/cli-bundle/chunks/update-many-724JCVDE.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-ALBEZAI7.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-QHRGDBSA.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-IQRYFXIV.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-UY6DRCG5.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-XIOTGZMU.js.map → activity-PZYSZA26.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js.map → activity-SFM4THAU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js.map → chunk-26BM6YLO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js.map → chunk-2TMKMTEI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js.map → chunk-2VH7DFSJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js.map → chunk-5XGWFUW2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js.map → chunk-AJCQ5GT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js.map → chunk-BITCVGHT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js.map → chunk-CGQTFWYI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js.map → chunk-COVLE33A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js.map → chunk-F5MSD5HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js.map → chunk-JZHL4E3Q.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js.map → chunk-KCAGIH6K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js.map → chunk-MIBX6ZRN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js.map → chunk-UN6P3IJ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HWHONML5.js.map → chunk-VF3KQGNY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js.map → claim-WGAWJCPY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js.map → claim-ZI6P4LMU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-WOG5WTMZ.js.map → close-I7PRQ5G7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-SPUFW5QR.js.map → close-JMVVSIQE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js.map → copy-Q2PPU4AY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-C4W522JM.js.map → copy-SC6UF3PI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-4EQNELMY.js.map → create-76FE7JVF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-NW3K7LVG.js.map → create-RTRFW6RE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js.map → delete-T6DJSUJI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js.map → delete-XFUX533E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js.map → docs-HE3HCQ4S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RJQPLROO.js.map → docs-SXMOABHR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js.map → extension-E23K4QRR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js.map → extension-PMD3XMLN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js.map → gc-BXIAKLAH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js.map → gc-C7K6JNUO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-GYFD2DJW.js.map → history-73Z6OBFZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-IUVN4NTN.js.map → history-BIPHVUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js.map → history-redact-7YCXEWJD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-75KIIJUJ.js.map → history-redact-WZZ6GZ2Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-JJFYRUKG.js.map → init-K34V4PZR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-MXV57LKL.js.map → init-TDEDNVMM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-GGVPXEV6.js.map → list-MSHYOCFU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-VOQDQHA4.js.map → list-VV57WGUD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js.map → restore-TSWSULYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-DRBNXJJH.js.map → restore-XQXICL3V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-SDMYEQHH.js.map → test-AROS3LIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js.map → test-CECIMKOA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-PD46VOXI.js.map → update-MIWEJC76.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-U235A7WP.js.map → update-P7I5YSRB.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../core/schema/runtime-field-values.ts","../../../../../../../../core/item/status.ts","../../../../../../../../core/shared/conflict-markers.ts","../../../../../../../../core/item/item-format.ts","../../../../../../../../core/item/toon-decode.ts"],"sourcesContent":["import { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { runtimeFieldOptionTarget, type RuntimeFieldDefinitionResolved, type RuntimeFieldRegistry } from \"./runtime-schema.js\";\n\nfunction toCamelToken(value: string): string {\n const segments = value\n .trim()\n .replaceAll(/[^A-Za-z0-9]+/g, \" \")\n .split(/\\s+/)\n .filter((segment) => segment.length > 0)\n .map((segment) => segment.toLowerCase());\n if (segments.length === 0) {\n return value;\n }\n const [first, ...rest] = segments;\n return `${first}${rest.map((segment) => `${segment.slice(0, 1).toUpperCase()}${segment.slice(1)}`).join(\"\")}`;\n}\n\nfunction resolveCandidateOptionKeys(definition: RuntimeFieldDefinitionResolved): string[] {\n return [...new Set([\n runtimeFieldOptionTarget(definition),\n toCamelToken(definition.key),\n toCamelToken(definition.cli_flag),\n ...definition.cli_aliases.map((alias) => toCamelToken(alias)),\n ])];\n}\n\nexport function readRuntimeFieldOptionValue(\n options: Record<string, unknown>,\n definition: RuntimeFieldDefinitionResolved,\n): unknown {\n for (const candidateKey of resolveCandidateOptionKeys(definition)) {\n if (!Object.hasOwn(options, candidateKey)) {\n continue;\n }\n const value = options[candidateKey];\n if (value !== undefined) {\n return value;\n }\n }\n return undefined;\n}\n\nfunction normalizeStringArrayValue(value: unknown): string[] {\n if (Array.isArray(value)) {\n return value\n .flatMap((entry) => normalizeStringArrayValue(entry))\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n }\n if (typeof value === \"string\") {\n return value\n .split(/[,\\n|]/)\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n }\n if (value === undefined || value === null) {\n return [];\n }\n return [String(value).trim()].filter((entry) => entry.length > 0);\n}\n\nfunction parseBooleanValue(raw: unknown, label: string): boolean {\n if (typeof raw === \"boolean\") {\n return raw;\n }\n if (typeof raw === \"number\") {\n if (raw === 1) {\n return true;\n }\n if (raw === 0) {\n return false;\n }\n }\n if (typeof raw === \"string\") {\n const normalized = raw.trim().toLowerCase();\n if (normalized === \"true\" || normalized === \"1\" || normalized === \"yes\") {\n return true;\n }\n if (normalized === \"false\" || normalized === \"0\" || normalized === \"no\") {\n return false;\n }\n }\n throw new PmCliError(`${label} must be one of true|false|1|0|yes|no`, EXIT_CODE.USAGE);\n}\n\nfunction parseNumberValue(raw: unknown, label: string): number {\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n const candidate = typeof raw === \"string\" ? raw.trim() : String(raw);\n const parsed = Number(candidate);\n if (!Number.isFinite(parsed)) {\n throw new PmCliError(`${label} must be a number`, EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nexport function coerceRuntimeFieldValue(\n definition: RuntimeFieldDefinitionResolved,\n rawValue: unknown,\n labelOverride?: string,\n): unknown {\n const label = labelOverride ?? `--${definition.cli_flag}`;\n if (definition.repeatable || definition.type === \"string_array\") {\n const values = normalizeStringArrayValue(rawValue);\n if (definition.type === \"number\") {\n return values.map((value) => parseNumberValue(value, label));\n }\n if (definition.type === \"boolean\") {\n return values.map((value) => parseBooleanValue(value, label));\n }\n return values;\n }\n\n const scalarRaw = Array.isArray(rawValue) ? rawValue[rawValue.length - 1] : rawValue;\n if (scalarRaw === undefined) {\n return undefined;\n }\n if (definition.type === \"number\") {\n return parseNumberValue(scalarRaw, label);\n }\n if (definition.type === \"boolean\") {\n return parseBooleanValue(scalarRaw, label);\n }\n return typeof scalarRaw === \"string\" ? scalarRaw : String(scalarRaw);\n}\n\nfunction shouldRequireFieldOnCreate(definition: RuntimeFieldDefinitionResolved, itemTypeName: string | undefined): boolean {\n if (!definition.required && !definition.required_on_create) {\n return false;\n }\n if (definition.required_types.length === 0) {\n return true;\n }\n if (!itemTypeName) {\n return false;\n }\n return definition.required_types.map((value) => value.toLowerCase()).includes(itemTypeName.trim().toLowerCase());\n}\n\nexport function collectRuntimeCreateFieldValues(\n options: Record<string, unknown>,\n fieldRegistry: RuntimeFieldRegistry,\n itemTypeName: string | undefined,\n): { values: Record<string, unknown>; missing_required_flags: string[] } {\n const values: Record<string, unknown> = {};\n const missingRequiredFlags: string[] = [];\n for (const definition of fieldRegistry.command_to_fields.get(\"create\") ?? []) {\n const rawValue = readRuntimeFieldOptionValue(options, definition);\n if (rawValue === undefined) {\n if (shouldRequireFieldOnCreate(definition, itemTypeName)) {\n missingRequiredFlags.push(`--${definition.cli_flag}`);\n }\n continue;\n }\n values[definition.metadata_key] = coerceRuntimeFieldValue(definition, rawValue);\n }\n return {\n values,\n missing_required_flags: [...new Set(missingRequiredFlags)].sort((left, right) => left.localeCompare(right)),\n };\n}\n\nexport function collectRuntimeUpdateFieldValues(\n options: Record<string, unknown>,\n fieldRegistry: RuntimeFieldRegistry,\n commands: Array<\"update\" | \"update_many\"> | null | undefined = [\"update\"],\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n const definitions = (commands ?? [\"update\"]).flatMap((command) => fieldRegistry.command_to_fields.get(command) ?? []);\n const seen = new Set<string>();\n for (const definition of definitions) {\n const rawValue = readRuntimeFieldOptionValue(options, definition);\n if (rawValue === undefined) {\n continue;\n }\n if (seen.has(definition.metadata_key)) {\n continue;\n }\n seen.add(definition.metadata_key);\n values[definition.metadata_key] = coerceRuntimeFieldValue(definition, rawValue);\n }\n return values;\n}\n","import { STATUS_VALUES } from \"../../types/index.js\";\nimport type { ItemStatus } from \"../../types/index.js\";\nimport { normalizeStatusInputWithRegistry, type RuntimeStatusRegistry } from \"../schema/runtime-schema.js\";\n\nconst STATUS_ALIAS_MAP: Readonly<Record<string, ItemStatus>> = {\n \"in-progress\": \"in_progress\",\n cancelled: \"canceled\",\n};\n\nexport function normalizeStatusInput(value: unknown, registry?: RuntimeStatusRegistry): ItemStatus | undefined {\n if (registry) {\n const normalizedFromRegistry = normalizeStatusInputWithRegistry(value, registry);\n if (normalizedFromRegistry) {\n return normalizedFromRegistry;\n }\n }\n if (typeof value !== \"string\") {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if (!normalized) {\n return undefined;\n }\n const canonical = STATUS_ALIAS_MAP[normalized] ?? normalized;\n if (!(STATUS_VALUES as readonly string[]).includes(canonical)) {\n return undefined;\n }\n return canonical as ItemStatus;\n}\n\n/**\n * Normalize a status against the runtime registry, falling back to the original\n * value when normalization does not resolve to a known status. This preserves\n * the long-standing `normalizeStatusInput(status, registry) ?? status` pattern\n * used by query commands so that unknown/custom statuses still compare against\n * registry sets by their raw value.\n */\nexport function normalizeStatusForRegistry(status: ItemStatus, registry: RuntimeStatusRegistry): ItemStatus {\n return normalizeStatusInput(status, registry) ?? status;\n}\n\n/**\n * Determine whether a status is terminal according to the runtime status\n * registry, applying registry-aware normalization first (with raw fallback).\n */\nexport function isTerminalStatus(status: ItemStatus, registry: RuntimeStatusRegistry): boolean {\n return registry.terminal_statuses.has(normalizeStatusForRegistry(status, registry));\n}\n","export interface ConflictMarkerMatch {\n line: number;\n marker: \"<<<<<<<\" | \"=======\" | \">>>>>>>\";\n text: string;\n}\n\nconst CONFLICT_MARKER_PATTERN = /^\\s*(<<<<<<<|=======|>>>>>>>)(?:\\s.*)?$/;\n\nexport function findMergeConflictMarkers(content: string): ConflictMarkerMatch[] {\n if (content.length === 0) {\n return [];\n }\n const lines = content.split(/\\r?\\n/);\n const matches: ConflictMarkerMatch[] = [];\n for (let index = 0; index < lines.length; index += 1) {\n const line = lines[index] ?? \"\";\n const markerMatch = line.match(CONFLICT_MARKER_PATTERN);\n if (!markerMatch) {\n continue;\n }\n const marker = markerMatch[1] as ConflictMarkerMatch[\"marker\"];\n matches.push({\n line: index + 1,\n marker,\n text: line,\n });\n }\n return matches;\n}\n\nexport function findFirstMergeConflictMarker(content: string): ConflictMarkerMatch | undefined {\n const matches = findMergeConflictMarkers(content);\n return matches[0];\n}\n","import { encode as encodeToon } from \"@toon-format/toon\";\nimport type {\n CalendarEvent,\n Comment,\n Dependency,\n ItemDocument,\n ItemMetadata,\n RuntimeSchemaSettings,\n ItemTestRunSummary,\n LinkedDoc,\n LinkedFile,\n LinkedTest,\n LogNote,\n PlanDecision,\n PlanDiscovery,\n PlanStep,\n PlanStepDoc,\n PlanStepFile,\n PlanStepLink,\n PlanStepStatus,\n PlanValidationCheck,\n RecurrenceRule,\n Reminder,\n} from \"../../types/index.js\";\nimport type { ItemFormat } from \"../../types/index.js\";\nimport {\n CONFIDENCE_TEXT_VALUES,\n ISSUE_SEVERITY_VALUES,\n RECURRENCE_FREQUENCY_VALUES,\n RECURRENCE_WEEKDAY_VALUES,\n STATUS_VALUES,\n weekdayOrderIndex,\n} from \"../../types/index.js\";\nimport { coerceRuntimeFieldValue } from \"../schema/runtime-field-values.js\";\nimport {\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n type RuntimeFieldRegistry,\n type RuntimeStatusRegistry,\n} from \"../schema/runtime-schema.js\";\nimport { normalizeStatusInput } from \"./status.js\";\nimport { decodeToonItemContent } from \"./toon-decode.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../shared/constants.js\";\nimport { findFirstMergeConflictMarker } from \"../shared/conflict-markers.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { orderObject } from \"../shared/serialization.js\";\nimport { compareTimestampStrings, isTimestampLiteral } from \"../shared/time.js\";\n\nconst LINKED_TEST_PM_CONTEXT_MODE_VALUES = new Set([\"schema\", \"tracker\", \"auto\"]);\n\nfunction normalizePathValue(value: string): string {\n return value.replaceAll(\"\\\\\", \"/\");\n}\n\nconst REQUIRED_STRING_FIELDS = [\n \"id\",\n \"title\",\n \"description\",\n \"created_at\",\n \"updated_at\",\n] as const;\n\nconst STATIC_FRONT_MATTER_FIELD_SET = new Set(FRONT_MATTER_KEY_ORDER);\n\ninterface RuntimeSchemaValidationContext {\n statusRegistry?: RuntimeStatusRegistry;\n fieldRegistry?: RuntimeFieldRegistry;\n unknownFieldPolicy: \"allow\" | \"warn\" | \"reject\";\n extensionFieldNames: ReadonlySet<string>;\n onWarning?: (warning: string) => void;\n}\n\nexport interface ItemDocumentFormatOptions {\n format?: ItemFormat;\n schema?: RuntimeSchemaSettings;\n extensionFieldNames?: readonly string[];\n onWarning?: (warning: string) => void;\n}\n\nfunction resolveRuntimeSchemaValidationContext(\n options: ItemDocumentFormatOptions | undefined,\n): RuntimeSchemaValidationContext | undefined {\n if (!options?.schema) {\n return undefined;\n }\n return {\n statusRegistry: resolveRuntimeStatusRegistry(options.schema),\n fieldRegistry: resolveRuntimeFieldRegistry(options.schema),\n unknownFieldPolicy: options.schema.unknown_field_policy ?? \"allow\",\n extensionFieldNames: new Set(options.extensionFieldNames ?? []),\n onWarning: options.onWarning,\n };\n}\n\nfunction runtimeFieldRequiredForType(definition: RuntimeFieldRegistry[\"definitions\"][number], typeName: string): boolean {\n if (!definition.required) {\n return false;\n }\n if (definition.required_types.length === 0) {\n return true;\n }\n return definition.required_types.map((value) => value.toLowerCase()).includes(typeName.trim().toLowerCase());\n}\n\nfunction validationError(message: string): never {\n throw new PmCliError(`Invalid item front matter: ${message}`, EXIT_CODE.GENERIC_FAILURE);\n}\n\nfunction buildKnownFrontMatterKeys(runtimeContext: RuntimeSchemaValidationContext): Set<string> {\n const knownKeys = new Set(STATIC_FRONT_MATTER_FIELD_SET);\n for (const definition of runtimeContext.fieldRegistry?.definitions ?? []) {\n knownKeys.add(definition.metadata_key);\n }\n for (const fieldName of runtimeContext.extensionFieldNames) {\n knownKeys.add(fieldName);\n }\n return knownKeys;\n}\n\nfunction assertFrontMatterCondition(condition: boolean, message: string): void {\n if (!condition) {\n validationError(message);\n }\n}\n\nfunction assertTimestampField(record: Record<string, unknown>, fieldName: \"created_at\" | \"updated_at\" | \"deadline\"): void {\n const rawValue = record[fieldName];\n assertFrontMatterCondition(typeof rawValue === \"string\", `${fieldName} must be a string`);\n const timestamp = rawValue as string;\n assertFrontMatterCondition(isTimestampLiteral(timestamp), `${fieldName} must be a valid ISO timestamp`);\n}\n\nfunction assertValidRecurrenceRule(recurrence: unknown): void {\n assertFrontMatterCondition(\n typeof recurrence === \"object\" && recurrence !== null && !Array.isArray(recurrence),\n \"event.recurrence must be an object\",\n );\n const recurrenceRecord = recurrence as Record<string, unknown>;\n assertFrontMatterCondition(typeof recurrenceRecord.freq === \"string\", \"event.recurrence.freq must be a string\");\n const frequency = (recurrenceRecord.freq as string).trim().toLowerCase();\n assertFrontMatterCondition(\n RECURRENCE_FREQUENCY_VALUES.includes(frequency as (typeof RECURRENCE_FREQUENCY_VALUES)[number]),\n `event.recurrence.freq must be one of: ${RECURRENCE_FREQUENCY_VALUES.join(\", \")}`,\n );\n\n if (recurrenceRecord.interval !== undefined) {\n assertFrontMatterCondition(\n typeof recurrenceRecord.interval === \"number\" &&\n Number.isInteger(recurrenceRecord.interval) &&\n (recurrenceRecord.interval as number) >= 1,\n \"event.recurrence.interval must be an integer >= 1\",\n );\n }\n\n if (recurrenceRecord.count !== undefined) {\n assertFrontMatterCondition(\n typeof recurrenceRecord.count === \"number\" && Number.isInteger(recurrenceRecord.count) && (recurrenceRecord.count as number) >= 1,\n \"event.recurrence.count must be an integer >= 1\",\n );\n }\n\n if (recurrenceRecord.until !== undefined) {\n assertFrontMatterCondition(typeof recurrenceRecord.until === \"string\", \"event.recurrence.until must be a string\");\n assertFrontMatterCondition(\n isTimestampLiteral(recurrenceRecord.until as string),\n \"event.recurrence.until must be a valid ISO timestamp\",\n );\n }\n\n if (recurrenceRecord.by_weekday !== undefined) {\n assertFrontMatterCondition(Array.isArray(recurrenceRecord.by_weekday), \"event.recurrence.by_weekday must be an array\");\n for (const weekday of recurrenceRecord.by_weekday as unknown[]) {\n assertFrontMatterCondition(typeof weekday === \"string\", \"event.recurrence.by_weekday entries must be strings\");\n const normalizedWeekday = (weekday as string).trim().toLowerCase();\n assertFrontMatterCondition(\n RECURRENCE_WEEKDAY_VALUES.includes(normalizedWeekday as (typeof RECURRENCE_WEEKDAY_VALUES)[number]),\n `event.recurrence.by_weekday entries must be one of: ${RECURRENCE_WEEKDAY_VALUES.join(\", \")}`,\n );\n }\n }\n\n if (recurrenceRecord.by_month_day !== undefined) {\n assertFrontMatterCondition(Array.isArray(recurrenceRecord.by_month_day), \"event.recurrence.by_month_day must be an array\");\n for (const day of recurrenceRecord.by_month_day as unknown[]) {\n assertFrontMatterCondition(\n typeof day === \"number\" && Number.isInteger(day) && day >= 1 && day <= 31,\n \"event.recurrence.by_month_day entries must be integers 1..31\",\n );\n }\n }\n\n if (recurrenceRecord.exdates !== undefined) {\n assertFrontMatterCondition(Array.isArray(recurrenceRecord.exdates), \"event.recurrence.exdates must be an array\");\n for (const exdate of recurrenceRecord.exdates as unknown[]) {\n assertFrontMatterCondition(typeof exdate === \"string\", \"event.recurrence.exdates entries must be strings\");\n assertFrontMatterCondition(isTimestampLiteral(exdate as string), \"event.recurrence.exdates entries must be valid ISO timestamps\");\n }\n }\n}\n\nfunction assertValidFrontMatter(\n frontMatter: unknown,\n runtimeContext?: RuntimeSchemaValidationContext,\n): asserts frontMatter is ItemMetadata {\n assertFrontMatterCondition(\n typeof frontMatter === \"object\" && frontMatter !== null && !Array.isArray(frontMatter),\n \"front matter must be an object\",\n );\n\n const record = frontMatter as Record<string, unknown>;\n for (const fieldName of REQUIRED_STRING_FIELDS) {\n assertFrontMatterCondition(typeof record[fieldName] === \"string\", `${fieldName} is required and must be a string`);\n }\n\n const itemType = record.type;\n assertFrontMatterCondition(typeof itemType === \"string\" && itemType.trim().length > 0, \"type must be a non-empty string\");\n\n const status = record.status;\n assertFrontMatterCondition(\n typeof status === \"string\" && status.trim().length > 0,\n \"status must be a non-empty string\",\n );\n const statusRegistry = runtimeContext?.statusRegistry;\n const normalizedStatus = normalizeStatusInput(status as string, statusRegistry);\n const statusDomain = statusRegistry\n ? statusRegistry.definitions.map((definition) => definition.id)\n : [...STATUS_VALUES];\n assertFrontMatterCondition(normalizedStatus !== undefined, `status must be one of: ${statusDomain.join(\", \")}`);\n\n const priority = record.priority;\n assertFrontMatterCondition(\n typeof priority === \"number\" && Number.isInteger(priority) && [0, 1, 2, 3, 4].includes(priority),\n \"priority must be an integer 0..4\",\n );\n\n const tags = record.tags;\n assertFrontMatterCondition(Array.isArray(tags), \"tags must be an array\");\n for (const tag of tags as unknown[]) {\n assertFrontMatterCondition(typeof tag === \"string\", \"tags entries must be strings\");\n }\n\n const confidence = record.confidence;\n if (confidence !== undefined) {\n if (typeof confidence === \"number\") {\n assertFrontMatterCondition(\n Number.isInteger(confidence) && confidence >= 0 && confidence <= 100,\n \"confidence number value must be an integer 0..100\",\n );\n } else if (typeof confidence === \"string\") {\n const normalizedConfidence = confidence.trim().toLowerCase();\n const isKnownTextConfidence =\n normalizedConfidence === \"med\" || CONFIDENCE_TEXT_VALUES.includes(normalizedConfidence as (typeof CONFIDENCE_TEXT_VALUES)[number]);\n assertFrontMatterCondition(\n isKnownTextConfidence,\n `confidence string value must be one of: ${[...CONFIDENCE_TEXT_VALUES, \"med\"].join(\", \")}`,\n );\n } else {\n assertFrontMatterCondition(false, \"confidence must be a number or string\");\n }\n }\n\n const severity = record.severity;\n if (severity !== undefined) {\n if (typeof severity !== \"string\") {\n validationError(\"severity must be a string\");\n }\n const normalizedSeverity = severity.trim().toLowerCase();\n const isKnownSeverity =\n normalizedSeverity === \"med\" || ISSUE_SEVERITY_VALUES.includes(normalizedSeverity as (typeof ISSUE_SEVERITY_VALUES)[number]);\n assertFrontMatterCondition(\n isKnownSeverity,\n `severity value must be one of: ${[...ISSUE_SEVERITY_VALUES, \"med\"].join(\", \")}`,\n );\n }\n\n const regression = record.regression;\n if (regression !== undefined) {\n if (typeof regression !== \"boolean\") {\n validationError(\"regression must be a boolean\");\n }\n }\n\n assertTimestampField(record, \"created_at\");\n assertTimestampField(record, \"updated_at\");\n if (record.deadline !== undefined) {\n assertTimestampField(record, \"deadline\");\n }\n if (record.reminders !== undefined) {\n const reminders = record.reminders;\n assertFrontMatterCondition(Array.isArray(reminders), \"reminders must be an array\");\n for (const reminder of reminders as unknown[]) {\n assertFrontMatterCondition(typeof reminder === \"object\" && reminder !== null && !Array.isArray(reminder), \"reminders entries must be objects\");\n const reminderRecord = reminder as Record<string, unknown>;\n assertFrontMatterCondition(typeof reminderRecord.at === \"string\", \"reminder.at must be a string\");\n assertFrontMatterCondition(isTimestampLiteral(reminderRecord.at as string), \"reminder.at must be a valid ISO timestamp\");\n assertFrontMatterCondition(typeof reminderRecord.text === \"string\", \"reminder.text must be a string\");\n assertFrontMatterCondition((reminderRecord.text as string).trim().length > 0, \"reminder.text must not be empty\");\n }\n }\n if (record.events !== undefined) {\n const events = record.events;\n assertFrontMatterCondition(Array.isArray(events), \"events must be an array\");\n for (const event of events as unknown[]) {\n assertFrontMatterCondition(typeof event === \"object\" && event !== null && !Array.isArray(event), \"events entries must be objects\");\n const eventRecord = event as Record<string, unknown>;\n assertFrontMatterCondition(typeof eventRecord.start_at === \"string\", \"event.start_at must be a string\");\n assertFrontMatterCondition(isTimestampLiteral(eventRecord.start_at as string), \"event.start_at must be a valid ISO timestamp\");\n\n if (eventRecord.end_at !== undefined) {\n assertFrontMatterCondition(typeof eventRecord.end_at === \"string\", \"event.end_at must be a string\");\n assertFrontMatterCondition(isTimestampLiteral(eventRecord.end_at as string), \"event.end_at must be a valid ISO timestamp\");\n assertFrontMatterCondition(\n compareTimestampStrings(eventRecord.end_at as string, eventRecord.start_at as string) > 0,\n \"event.end_at must be after event.start_at\",\n );\n }\n\n for (const stringField of [\"title\", \"description\", \"location\", \"timezone\"] as const) {\n if (eventRecord[stringField] !== undefined) {\n assertFrontMatterCondition(typeof eventRecord[stringField] === \"string\", `event.${stringField} must be a string`);\n assertFrontMatterCondition(\n (eventRecord[stringField] as string).trim().length > 0,\n `event.${stringField} must not be empty`,\n );\n }\n }\n\n if (eventRecord.all_day !== undefined) {\n assertFrontMatterCondition(typeof eventRecord.all_day === \"boolean\", \"event.all_day must be a boolean\");\n }\n\n if (eventRecord.recurrence !== undefined) {\n assertValidRecurrenceRule(eventRecord.recurrence);\n if ((eventRecord.recurrence as Record<string, unknown>).until !== undefined) {\n assertFrontMatterCondition(\n compareTimestampStrings(\n (eventRecord.recurrence as Record<string, unknown>).until as string,\n eventRecord.start_at as string,\n ) >= 0,\n \"event.recurrence.until must be at or after event.start_at\",\n );\n }\n }\n }\n }\n if (record.closed_at !== undefined) {\n const closedAt = record.closed_at;\n assertFrontMatterCondition(typeof closedAt === \"string\", \"closed_at must be a string\");\n assertFrontMatterCondition(isTimestampLiteral(closedAt as string), \"closed_at must be a valid ISO timestamp\");\n }\n for (const fieldName of [\"source_type\", \"source_owner\", \"design\", \"external_ref\"] as const) {\n const value = record[fieldName];\n if (value !== undefined) {\n assertFrontMatterCondition(typeof value === \"string\", `${fieldName} must be a string`);\n }\n }\n const typeOptions = record.type_options;\n if (typeOptions !== undefined) {\n assertFrontMatterCondition(\n typeof typeOptions === \"object\" && typeOptions !== null && !Array.isArray(typeOptions),\n \"type_options must be an object\",\n );\n for (const [optionKey, optionValue] of Object.entries(typeOptions as Record<string, unknown>)) {\n assertFrontMatterCondition(optionKey.trim().length > 0, \"type_options keys must be non-empty\");\n assertFrontMatterCondition(typeof optionValue === \"string\", \"type_options values must be strings\");\n const optionText = optionValue as string;\n assertFrontMatterCondition(optionText.trim().length > 0, \"type_options values must be non-empty strings\");\n }\n }\n\n if (runtimeContext?.fieldRegistry) {\n for (const definition of runtimeContext.fieldRegistry.definitions) {\n const fieldValue = record[definition.metadata_key];\n if (fieldValue === undefined) {\n if (runtimeFieldRequiredForType(definition, itemType as string)) {\n validationError(`missing required schema field: ${definition.metadata_key}`);\n }\n continue;\n }\n try {\n record[definition.metadata_key] = coerceRuntimeFieldValue(\n definition,\n fieldValue,\n `metadata field \"${definition.metadata_key}\"`,\n );\n } catch (error: unknown) {\n validationError(\n error instanceof Error ? error.message.replace(/^Invalid\\s+/u, \"\") : `invalid ${definition.metadata_key} value`,\n );\n }\n }\n }\n\n if (runtimeContext && runtimeContext.unknownFieldPolicy !== \"allow\") {\n const knownKeys = buildKnownFrontMatterKeys(runtimeContext);\n const unknownKeys = Object.keys(record).filter((key) => !knownKeys.has(key)).sort((left, right) => left.localeCompare(right));\n if (unknownKeys.length > 0) {\n if (runtimeContext.unknownFieldPolicy === \"reject\") {\n validationError(`unknown schema fields are not allowed: ${unknownKeys.join(\", \")}`);\n } else {\n runtimeContext.onWarning?.(`item_unknown_schema_fields:${unknownKeys.join(\",\")}`);\n }\n }\n }\n}\n\nfunction sortDependencies(values: Dependency[] | undefined): Dependency[] | undefined {\n if (!values || values.length === 0) return undefined;\n return [...values]\n .map((value) => ({\n id: value.id.trim().toLowerCase(),\n kind: value.kind,\n created_at: value.created_at,\n author: value.author?.trim() || undefined,\n source_kind: value.source_kind?.trim() || undefined,\n }))\n .sort((a, b) => {\n const byCreated = compareTimestampStrings(a.created_at, b.created_at);\n if (byCreated !== 0) return byCreated;\n const byId = a.id.localeCompare(b.id);\n if (byId !== 0) return byId;\n const byKind = a.kind.localeCompare(b.kind);\n if (byKind !== 0) return byKind;\n return (a.source_kind ?? \"\").localeCompare(b.source_kind ?? \"\");\n });\n}\n\nfunction sortLogValues<T extends Comment | LogNote>(values: T[] | undefined): T[] | undefined {\n if (!values || values.length === 0) return undefined;\n return [...values].sort((a, b) => {\n const byCreated = compareTimestampStrings(a.created_at, b.created_at);\n if (byCreated !== 0) return byCreated;\n const byText = a.text.localeCompare(b.text);\n if (byText !== 0) return byText;\n return a.author.localeCompare(b.author);\n });\n}\n\nfunction sortReminders(values: Reminder[] | undefined): Reminder[] | undefined {\n if (!values || values.length === 0) return undefined;\n const normalized = [...values]\n .map((value) => ({\n at: value.at,\n text: value.text.trim(),\n }))\n .filter((value) => value.text.length > 0)\n .sort((a, b) => {\n const byAt = compareTimestampStrings(a.at, b.at);\n if (byAt !== 0) return byAt;\n return a.text.localeCompare(b.text);\n });\n return normalized.length === 0 ? undefined : normalized;\n}\n\nfunction normalizeRecurrenceRule(value: RecurrenceRule | undefined): RecurrenceRule | undefined {\n if (!value) {\n return undefined;\n }\n const normalizedFrequency = value.freq.trim().toLowerCase();\n if (!RECURRENCE_FREQUENCY_VALUES.includes(normalizedFrequency as (typeof RECURRENCE_FREQUENCY_VALUES)[number])) {\n return undefined;\n }\n\n const byWeekday = Array.from(\n new Set(\n (value.by_weekday ?? [])\n .map((weekday) => weekday.trim().toLowerCase())\n .filter((weekday) => RECURRENCE_WEEKDAY_VALUES.includes(weekday as (typeof RECURRENCE_WEEKDAY_VALUES)[number])),\n ),\n ).sort(\n (a, b) =>\n weekdayOrderIndex(a as (typeof RECURRENCE_WEEKDAY_VALUES)[number]) -\n weekdayOrderIndex(b as (typeof RECURRENCE_WEEKDAY_VALUES)[number]),\n );\n\n const byMonthDay = Array.from(\n new Set(\n (value.by_month_day ?? [])\n .filter((day) => Number.isInteger(day) && day >= 1 && day <= 31)\n .map((day) => day as number),\n ),\n ).sort((a, b) => a - b);\n\n const exdates = Array.from(\n new Set(\n (value.exdates ?? [])\n .map((timestamp) => timestamp.trim())\n .filter((timestamp) => isTimestampLiteral(timestamp)),\n ),\n ).sort((a, b) => compareTimestampStrings(a, b));\n\n const normalized: RecurrenceRule = {\n freq: normalizedFrequency as (typeof RECURRENCE_FREQUENCY_VALUES)[number],\n interval: value.interval !== undefined && value.interval > 1 ? value.interval : undefined,\n count: value.count,\n until: value.until?.trim() || undefined,\n by_weekday: byWeekday.length > 0 ? (byWeekday as (typeof RECURRENCE_WEEKDAY_VALUES)[number][]) : undefined,\n by_month_day: byMonthDay.length > 0 ? byMonthDay : undefined,\n exdates: exdates.length > 0 ? exdates : undefined,\n };\n for (const [key, fieldValue] of Object.entries(normalized)) {\n if (fieldValue === undefined) {\n delete (normalized as unknown as Record<string, unknown>)[key];\n }\n }\n return normalized;\n}\n\nfunction sortEvents(values: CalendarEvent[] | undefined): CalendarEvent[] | undefined {\n if (!values || values.length === 0) {\n return undefined;\n }\n const normalized = [...values]\n .map((value) => {\n const event: CalendarEvent = {\n start_at: value.start_at,\n end_at: value.end_at || undefined,\n title: value.title?.trim() || undefined,\n description: value.description?.trim() || undefined,\n location: value.location?.trim() || undefined,\n all_day: value.all_day,\n timezone: value.timezone?.trim() || undefined,\n recurrence: normalizeRecurrenceRule(value.recurrence),\n };\n for (const [key, fieldValue] of Object.entries(event)) {\n if (fieldValue === undefined) {\n delete (event as unknown as Record<string, unknown>)[key];\n }\n }\n return event;\n })\n .sort((a, b) => {\n const byStart = compareTimestampStrings(a.start_at, b.start_at);\n if (byStart !== 0) return byStart;\n const byEnd = (a.end_at ?? \"\").localeCompare(b.end_at ?? \"\");\n if (byEnd !== 0) return byEnd;\n const byTitle = (a.title ?? \"\").localeCompare(b.title ?? \"\");\n if (byTitle !== 0) return byTitle;\n const byAllDay = Number(Boolean(a.all_day)) - Number(Boolean(b.all_day));\n if (byAllDay !== 0) return byAllDay;\n const byTimezone = (a.timezone ?? \"\").localeCompare(b.timezone ?? \"\");\n if (byTimezone !== 0) return byTimezone;\n const byLocation = (a.location ?? \"\").localeCompare(b.location ?? \"\");\n if (byLocation !== 0) return byLocation;\n const byDescription = (a.description ?? \"\").localeCompare(b.description ?? \"\");\n if (byDescription !== 0) return byDescription;\n return JSON.stringify(a.recurrence ?? {}).localeCompare(JSON.stringify(b.recurrence ?? {}));\n });\n return normalized;\n}\n\nfunction normalizeFiles(values: LinkedFile[] | undefined): LinkedFile[] | undefined {\n if (!values || values.length === 0) return undefined;\n return values\n .map((value) => ({\n path: normalizePathValue(value.path),\n scope: value.scope,\n note: value.note?.trim() || undefined,\n }));\n}\n\nfunction normalizeTestRunSummaries(values: ItemTestRunSummary[] | undefined): ItemTestRunSummary[] | undefined {\n if (!values || values.length === 0) return undefined;\n const normalized = values\n .map((value) => {\n const runId = typeof value.run_id === \"string\" ? value.run_id.trim() : \"\";\n const kind = value.kind === \"test\" || value.kind === \"test-all\" ? value.kind : \"test\";\n const status =\n value.status === \"passed\" || value.status === \"failed\" || value.status === \"stopped\" || value.status === \"canceled\"\n ? value.status\n : \"failed\";\n const startedAt = typeof value.started_at === \"string\" ? value.started_at : \"\";\n const finishedAt = typeof value.finished_at === \"string\" ? value.finished_at : \"\";\n const recordedAt = typeof value.recorded_at === \"string\" ? value.recorded_at : \"\";\n const passed = typeof value.passed === \"number\" && Number.isFinite(value.passed) ? Math.max(0, Math.floor(value.passed)) : 0;\n const failed = typeof value.failed === \"number\" && Number.isFinite(value.failed) ? Math.max(0, Math.floor(value.failed)) : 0;\n const skipped = typeof value.skipped === \"number\" && Number.isFinite(value.skipped) ? Math.max(0, Math.floor(value.skipped)) : 0;\n return {\n run_id: runId,\n kind,\n status,\n started_at: startedAt,\n finished_at: finishedAt,\n recorded_at: recordedAt,\n attempt:\n typeof value.attempt === \"number\" && Number.isFinite(value.attempt) && value.attempt >= 1\n ? Math.floor(value.attempt)\n : undefined,\n resumed_from: value.resumed_from?.trim() || undefined,\n passed,\n failed,\n skipped,\n items:\n typeof value.items === \"number\" && Number.isFinite(value.items) && value.items >= 0\n ? Math.floor(value.items)\n : undefined,\n linked_tests:\n typeof value.linked_tests === \"number\" && Number.isFinite(value.linked_tests) && value.linked_tests >= 0\n ? Math.floor(value.linked_tests)\n : undefined,\n fail_on_skipped_triggered: value.fail_on_skipped_triggered === true ? true : undefined,\n };\n })\n .filter((value) => value.run_id.length > 0 && value.started_at.length > 0 && value.finished_at.length > 0 && value.recorded_at.length > 0)\n .sort((a, b) => {\n const byRecorded = compareTimestampStrings(a.recorded_at, b.recorded_at);\n if (byRecorded !== 0) return byRecorded;\n const byRunId = a.run_id.localeCompare(b.run_id);\n if (byRunId !== 0) return byRunId;\n return a.kind.localeCompare(b.kind);\n });\n return normalized.length > 0 ? normalized : undefined;\n}\n\nfunction sortTests(values: LinkedTest[] | undefined): LinkedTest[] | undefined {\n if (!values || values.length === 0) return undefined;\n return [...values]\n .map((value) => ({\n command: value.command?.trim() || undefined,\n path: value.path ? normalizePathValue(value.path) : undefined,\n scope: value.scope,\n timeout_seconds:\n typeof value.timeout_seconds === \"number\" && Number.isFinite(value.timeout_seconds) && value.timeout_seconds > 0\n ? value.timeout_seconds\n : undefined,\n pm_context_mode: (() => {\n const normalized = value.pm_context_mode?.trim().toLowerCase();\n if (!normalized || !LINKED_TEST_PM_CONTEXT_MODE_VALUES.has(normalized)) {\n return undefined;\n }\n return normalized as LinkedTest[\"pm_context_mode\"];\n })(),\n env_set: value.env_set\n ? Object.fromEntries(\n Object.entries(value.env_set)\n .map(([key, envValue]) => [key.trim(), String(envValue).trim()] as const)\n .filter(([key, envValue]) => key.length > 0 && envValue.length > 0)\n .sort(([left], [right]) => left.localeCompare(right)),\n )\n : undefined,\n env_clear: value.env_clear\n ? [...new Set(value.env_clear.map((entry) => entry.trim()).filter((entry) => entry.length > 0))].sort((a, b) =>\n a.localeCompare(b),\n )\n : undefined,\n shared_host_safe: value.shared_host_safe === true ? true : undefined,\n assert_stdout_contains: value.assert_stdout_contains\n ? [...new Set(value.assert_stdout_contains.map((entry) => entry.trim()).filter((entry) => entry.length > 0))].sort((a, b) =>\n a.localeCompare(b),\n )\n : undefined,\n assert_stdout_regex: value.assert_stdout_regex\n ? [...new Set(value.assert_stdout_regex.map((entry) => entry.trim()).filter((entry) => entry.length > 0))].sort((a, b) =>\n a.localeCompare(b),\n )\n : undefined,\n assert_stderr_contains: value.assert_stderr_contains\n ? [...new Set(value.assert_stderr_contains.map((entry) => entry.trim()).filter((entry) => entry.length > 0))].sort((a, b) =>\n a.localeCompare(b),\n )\n : undefined,\n assert_stderr_regex: value.assert_stderr_regex\n ? [...new Set(value.assert_stderr_regex.map((entry) => entry.trim()).filter((entry) => entry.length > 0))].sort((a, b) =>\n a.localeCompare(b),\n )\n : undefined,\n assert_stdout_min_lines:\n typeof value.assert_stdout_min_lines === \"number\" &&\n Number.isFinite(value.assert_stdout_min_lines) &&\n value.assert_stdout_min_lines >= 0\n ? Math.floor(value.assert_stdout_min_lines)\n : undefined,\n assert_json_field_equals: value.assert_json_field_equals\n ? Object.fromEntries(\n Object.entries(value.assert_json_field_equals)\n .map(([key, expectedValue]) => [key.trim(), String(expectedValue).trim()] as const)\n .filter(([key, expectedValue]) => key.length > 0 && expectedValue.length > 0)\n .sort(([left], [right]) => left.localeCompare(right)),\n )\n : undefined,\n assert_json_field_gte: value.assert_json_field_gte\n ? Object.fromEntries(\n Object.entries(value.assert_json_field_gte)\n .map(([key, expectedValue]) => [key.trim(), Number(expectedValue)] as const)\n .filter(([key, expectedValue]) => key.length > 0 && Number.isFinite(expectedValue))\n .sort(([left], [right]) => left.localeCompare(right)),\n )\n : undefined,\n note: value.note?.trim() || undefined,\n }))\n .sort((a, b) => {\n const byScope = a.scope.localeCompare(b.scope);\n if (byScope !== 0) return byScope;\n const byPath = (a.path ?? \"\").localeCompare(b.path ?? \"\");\n if (byPath !== 0) return byPath;\n const byCommand = (a.command ?? \"\").localeCompare(b.command ?? \"\");\n if (byCommand !== 0) return byCommand;\n const byTimeout = (a.timeout_seconds ?? 0) - (b.timeout_seconds ?? 0);\n if (byTimeout !== 0) return byTimeout;\n const byPmContext = (a.pm_context_mode ?? \"\").localeCompare(b.pm_context_mode ?? \"\");\n if (byPmContext !== 0) return byPmContext;\n const bySharedHostSafe = Number(Boolean(a.shared_host_safe)) - Number(Boolean(b.shared_host_safe));\n if (bySharedHostSafe !== 0) return bySharedHostSafe;\n const byEnvClear = JSON.stringify(a.env_clear ?? []).localeCompare(JSON.stringify(b.env_clear ?? []));\n if (byEnvClear !== 0) return byEnvClear;\n const byEnvSet = JSON.stringify(a.env_set ?? {}).localeCompare(JSON.stringify(b.env_set ?? {}));\n if (byEnvSet !== 0) return byEnvSet;\n const byStdoutContains = JSON.stringify(a.assert_stdout_contains ?? []).localeCompare(\n JSON.stringify(b.assert_stdout_contains ?? []),\n );\n if (byStdoutContains !== 0) return byStdoutContains;\n const byStdoutRegex = JSON.stringify(a.assert_stdout_regex ?? []).localeCompare(\n JSON.stringify(b.assert_stdout_regex ?? []),\n );\n if (byStdoutRegex !== 0) return byStdoutRegex;\n const byStderrContains = JSON.stringify(a.assert_stderr_contains ?? []).localeCompare(\n JSON.stringify(b.assert_stderr_contains ?? []),\n );\n if (byStderrContains !== 0) return byStderrContains;\n const byStderrRegex = JSON.stringify(a.assert_stderr_regex ?? []).localeCompare(\n JSON.stringify(b.assert_stderr_regex ?? []),\n );\n if (byStderrRegex !== 0) return byStderrRegex;\n const byStdoutMinLines = (a.assert_stdout_min_lines ?? 0) - (b.assert_stdout_min_lines ?? 0);\n if (byStdoutMinLines !== 0) return byStdoutMinLines;\n const byJsonFieldEquals = JSON.stringify(a.assert_json_field_equals ?? {}).localeCompare(\n JSON.stringify(b.assert_json_field_equals ?? {}),\n );\n if (byJsonFieldEquals !== 0) return byJsonFieldEquals;\n const byJsonFieldGte = JSON.stringify(a.assert_json_field_gte ?? {}).localeCompare(\n JSON.stringify(b.assert_json_field_gte ?? {}),\n );\n if (byJsonFieldGte !== 0) return byJsonFieldGte;\n return (a.note ?? \"\").localeCompare(b.note ?? \"\");\n });\n}\n\nfunction sortDocs(values: LinkedDoc[] | undefined): LinkedDoc[] | undefined {\n if (!values || values.length === 0) return undefined;\n return [...values]\n .map((value) => ({\n path: normalizePathValue(value.path),\n scope: value.scope,\n note: value.note?.trim() || undefined,\n }))\n .sort((a, b) => {\n const byScope = a.scope.localeCompare(b.scope);\n if (byScope !== 0) return byScope;\n const byPath = a.path.localeCompare(b.path);\n if (byPath !== 0) return byPath;\n return (a.note ?? \"\").localeCompare(b.note ?? \"\");\n });\n}\n\nfunction trimStringOrUndefined(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction normalizePlanStepLinks(value: unknown): PlanStepLink[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanStepLink[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const id = trimStringOrUndefined(record.id);\n const kind = trimStringOrUndefined(record.kind);\n if (!id || !kind) continue;\n const link: PlanStepLink = { id, kind: kind as PlanStepLink[\"kind\"] };\n const note = trimStringOrUndefined(record.note);\n if (note) link.note = note;\n if (record.required_before_step === true) link.required_before_step = true;\n out.push(link);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanStepFiles(value: unknown): PlanStepFile[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanStepFile[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const path = trimStringOrUndefined(record.path);\n if (!path) continue;\n const file: PlanStepFile = { path: normalizePathValue(path) };\n if (record.scope === \"project\" || record.scope === \"global\") file.scope = record.scope;\n const note = trimStringOrUndefined(record.note);\n if (note) file.note = note;\n out.push(file);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanStepTests(value: unknown): { command?: string; path?: string; note?: string }[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: { command?: string; path?: string; note?: string }[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const command = trimStringOrUndefined(record.command);\n const path = trimStringOrUndefined(record.path);\n if (!command && !path) continue;\n const test: { command?: string; path?: string; note?: string } = {};\n if (command) test.command = command;\n if (path) test.path = normalizePathValue(path);\n const note = trimStringOrUndefined(record.note);\n if (note) test.note = note;\n out.push(test);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanStepDocs(value: unknown): PlanStepDoc[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanStepDoc[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const path = trimStringOrUndefined(record.path);\n if (!path) continue;\n const doc: PlanStepDoc = { path: normalizePathValue(path) };\n if (record.scope === \"project\" || record.scope === \"global\") doc.scope = record.scope;\n const note = trimStringOrUndefined(record.note);\n if (note) doc.note = note;\n out.push(doc);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanSteps(value: unknown): PlanStep[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanStep[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const id = trimStringOrUndefined(record.id);\n const title = trimStringOrUndefined(record.title);\n const status = trimStringOrUndefined(record.status);\n const orderRaw = record.order;\n const order = typeof orderRaw === \"number\" && Number.isFinite(orderRaw) ? orderRaw : Number(orderRaw);\n if (!id || !title || !status || !Number.isFinite(order)) continue;\n const created_at = typeof record.created_at === \"string\" ? record.created_at : \"\";\n const updated_at = typeof record.updated_at === \"string\" ? record.updated_at : \"\";\n if (!created_at || !updated_at) continue;\n const step: PlanStep = {\n id,\n order,\n title,\n status: status as PlanStepStatus,\n created_at,\n updated_at,\n };\n const body = trimStringOrUndefined(record.body);\n if (body) step.body = body;\n const owner = trimStringOrUndefined(record.owner);\n if (owner) step.owner = owner;\n const evidence = trimStringOrUndefined(record.evidence);\n if (evidence) step.evidence = evidence;\n const blockedReason = trimStringOrUndefined(record.blocked_reason);\n if (blockedReason) step.blocked_reason = blockedReason;\n const supersededBy = trimStringOrUndefined(record.superseded_by);\n if (supersededBy) step.superseded_by = supersededBy;\n const completedAt = typeof record.completed_at === \"string\" ? record.completed_at : undefined;\n if (completedAt && completedAt.length > 0) step.completed_at = completedAt;\n const links = normalizePlanStepLinks(record.linked_items);\n if (links) step.linked_items = links;\n const files = normalizePlanStepFiles(record.files);\n if (files) step.files = files;\n const tests = normalizePlanStepTests(record.tests);\n if (tests) step.tests = tests;\n const docs = normalizePlanStepDocs(record.docs);\n if (docs) step.docs = docs;\n out.push(step);\n }\n out.sort((left, right) => left.order - right.order);\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanDecisions(value: unknown): PlanDecision[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanDecision[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const ts = typeof record.ts === \"string\" ? record.ts : \"\";\n const author = typeof record.author === \"string\" ? record.author : \"\";\n const decision = trimStringOrUndefined(record.decision);\n if (!ts || !author || !decision) continue;\n const item: PlanDecision = { ts, author, decision };\n const rationale = trimStringOrUndefined(record.rationale);\n if (rationale) item.rationale = rationale;\n const evidence = trimStringOrUndefined(record.evidence);\n if (evidence) item.evidence = evidence;\n const stepId = trimStringOrUndefined(record.step_id);\n if (stepId) item.step_id = stepId;\n out.push(item);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanDiscoveries(value: unknown): PlanDiscovery[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanDiscovery[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const ts = typeof record.ts === \"string\" ? record.ts : \"\";\n const author = typeof record.author === \"string\" ? record.author : \"\";\n const text = trimStringOrUndefined(record.text);\n if (!ts || !author || !text) continue;\n const item: PlanDiscovery = { ts, author, text };\n const stepId = trimStringOrUndefined(record.step_id);\n if (stepId) item.step_id = stepId;\n out.push(item);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizePlanValidation(value: unknown): PlanValidationCheck[] | undefined {\n if (!Array.isArray(value)) return undefined;\n const out: PlanValidationCheck[] = [];\n for (const entry of value) {\n if (entry === null || typeof entry !== \"object\") continue;\n const record = entry as Record<string, unknown>;\n const text = trimStringOrUndefined(record.text);\n if (!text) continue;\n const item: PlanValidationCheck = { text };\n const command = trimStringOrUndefined(record.command);\n if (command) item.command = command;\n const expected = trimStringOrUndefined(record.expected);\n if (expected) item.expected = expected;\n out.push(item);\n }\n return out.length > 0 ? out : undefined;\n}\n\nfunction normalizeTypeOptions(values: Record<string, string> | undefined): Record<string, string> | undefined {\n if (!values) {\n return undefined;\n }\n const normalizedEntries = Object.entries(values)\n .map(([key, value]) => [key.trim(), value.trim()] as const)\n .filter(([key, value]) => key.length > 0 && value.length > 0)\n .sort((left, right) => left[0].localeCompare(right[0]));\n if (normalizedEntries.length === 0) {\n return undefined;\n }\n return Object.fromEntries(normalizedEntries);\n}\n\nfunction normalizeBody(body: string): string {\n let start = 0;\n while (start < body.length && body[start] === \"\\n\") {\n start += 1;\n }\n return body.slice(start).trimEnd();\n}\n\nfunction normalizeConfidenceValue(value: ItemMetadata[\"confidence\"] | undefined): ItemMetadata[\"confidence\"] | undefined {\n if (value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n return value;\n }\n const normalized = value.trim().toLowerCase();\n if (normalized === \"med\") {\n return \"medium\";\n }\n if (CONFIDENCE_TEXT_VALUES.includes(normalized as (typeof CONFIDENCE_TEXT_VALUES)[number])) {\n return normalized as (typeof CONFIDENCE_TEXT_VALUES)[number];\n }\n return undefined;\n}\n\nfunction normalizeSeverityValue(value: ItemMetadata[\"severity\"] | undefined): ItemMetadata[\"severity\"] | undefined {\n if (value === undefined) {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if (normalized === \"med\") {\n return \"medium\";\n }\n if (ISSUE_SEVERITY_VALUES.includes(normalized as (typeof ISSUE_SEVERITY_VALUES)[number])) {\n return normalized as (typeof ISSUE_SEVERITY_VALUES)[number];\n }\n return undefined;\n}\n\nexport function normalizeFrontMatter(\n frontMatter: ItemMetadata,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): ItemMetadata {\n const runtimeContext = resolveRuntimeSchemaValidationContext(options);\n const normalizedStatus = normalizeStatusInput(frontMatter.status, runtimeContext?.statusRegistry) ?? frontMatter.status;\n const tags = Array.from(new Set(frontMatter.tags.map((tag) => tag.trim().toLowerCase()).filter(Boolean))).sort((a, b) =>\n a.localeCompare(b),\n );\n const normalized: ItemMetadata = {\n id: frontMatter.id,\n title: frontMatter.title,\n description: frontMatter.description,\n type: frontMatter.type,\n source_type: frontMatter.source_type?.trim() || undefined,\n type_options: normalizeTypeOptions(frontMatter.type_options),\n status: normalizedStatus,\n priority: frontMatter.priority,\n tags,\n created_at: frontMatter.created_at,\n updated_at: frontMatter.updated_at,\n dependencies: sortDependencies(frontMatter.dependencies),\n comments: sortLogValues(frontMatter.comments),\n notes: sortLogValues(frontMatter.notes),\n learnings: sortLogValues(frontMatter.learnings),\n files: normalizeFiles(frontMatter.files),\n tests: sortTests(frontMatter.tests),\n test_runs: normalizeTestRunSummaries(frontMatter.test_runs),\n docs: sortDocs(frontMatter.docs),\n deadline: frontMatter.deadline || undefined,\n reminders: sortReminders(frontMatter.reminders),\n events: sortEvents(frontMatter.events),\n closed_at: frontMatter.closed_at || undefined,\n assignee: frontMatter.assignee?.trim() || undefined,\n source_owner: frontMatter.source_owner?.trim() || undefined,\n author: frontMatter.author || undefined,\n estimated_minutes: frontMatter.estimated_minutes,\n acceptance_criteria: frontMatter.acceptance_criteria ?? undefined,\n design: frontMatter.design ?? undefined,\n external_ref: frontMatter.external_ref ?? undefined,\n definition_of_ready: frontMatter.definition_of_ready?.trim() || undefined,\n order: frontMatter.order,\n goal: frontMatter.goal?.trim() || undefined,\n objective: frontMatter.objective?.trim() || undefined,\n value: frontMatter.value?.trim() || undefined,\n impact: frontMatter.impact?.trim() || undefined,\n outcome: frontMatter.outcome?.trim() || undefined,\n why_now: frontMatter.why_now?.trim() || undefined,\n parent: frontMatter.parent?.trim() || undefined,\n reviewer: frontMatter.reviewer?.trim() || undefined,\n risk: frontMatter.risk ?? undefined,\n confidence: normalizeConfidenceValue(frontMatter.confidence),\n sprint: frontMatter.sprint?.trim() || undefined,\n release: frontMatter.release?.trim() || undefined,\n blocked_by: frontMatter.blocked_by?.trim() || undefined,\n blocked_reason: frontMatter.blocked_reason?.trim() || undefined,\n unblock_note: frontMatter.unblock_note?.trim() || undefined,\n reporter: frontMatter.reporter?.trim() || undefined,\n severity: normalizeSeverityValue(frontMatter.severity),\n environment: frontMatter.environment?.trim() || undefined,\n repro_steps: frontMatter.repro_steps?.trim() || undefined,\n resolution: frontMatter.resolution?.trim() || undefined,\n expected_result: frontMatter.expected_result?.trim() || undefined,\n actual_result: frontMatter.actual_result?.trim() || undefined,\n affected_version: frontMatter.affected_version?.trim() || undefined,\n fixed_version: frontMatter.fixed_version?.trim() || undefined,\n component: frontMatter.component?.trim() || undefined,\n regression: frontMatter.regression,\n customer_impact: frontMatter.customer_impact?.trim() || undefined,\n close_reason: frontMatter.close_reason || undefined,\n plan_mode: trimStringOrUndefined(frontMatter.plan_mode) as ItemMetadata[\"plan_mode\"],\n plan_scope: trimStringOrUndefined(frontMatter.plan_scope),\n plan_harness: trimStringOrUndefined(frontMatter.plan_harness) as ItemMetadata[\"plan_harness\"],\n plan_resume_context: trimStringOrUndefined(frontMatter.plan_resume_context),\n plan_steps: normalizePlanSteps(frontMatter.plan_steps),\n plan_decisions: normalizePlanDecisions(frontMatter.plan_decisions),\n plan_discoveries: normalizePlanDiscoveries(frontMatter.plan_discoveries),\n plan_validation: normalizePlanValidation(frontMatter.plan_validation),\n };\n const sourceRecord = frontMatter as unknown as Record<string, unknown>;\n for (const [key, value] of Object.entries(sourceRecord)) {\n if (Object.prototype.hasOwnProperty.call(normalized, key) || value === undefined) {\n continue;\n }\n (normalized as unknown as Record<string, unknown>)[key] = value;\n }\n\n if (runtimeContext?.fieldRegistry) {\n for (const definition of runtimeContext.fieldRegistry.definitions) {\n const currentValue = (normalized as unknown as Record<string, unknown>)[definition.metadata_key];\n if (currentValue === undefined) {\n continue;\n }\n (normalized as unknown as Record<string, unknown>)[definition.metadata_key] = coerceRuntimeFieldValue(\n definition,\n currentValue,\n `metadata field \"${definition.metadata_key}\"`,\n );\n }\n }\n\n if (runtimeContext && runtimeContext.unknownFieldPolicy !== \"allow\") {\n const knownKeys = buildKnownFrontMatterKeys(runtimeContext);\n const unknownKeys = Object.keys(normalized as unknown as Record<string, unknown>)\n .filter((key) => !knownKeys.has(key))\n .sort((left, right) => left.localeCompare(right));\n if (unknownKeys.length > 0) {\n if (runtimeContext.unknownFieldPolicy === \"reject\") {\n validationError(`unknown schema fields are not allowed: ${unknownKeys.join(\", \")}`);\n }\n }\n }\n\n for (const [key, value] of Object.entries(normalized)) {\n if (value === undefined) {\n delete (normalized as unknown as Record<string, unknown>)[key];\n }\n }\n return normalized;\n}\n\nfunction orderFrontMatter(frontMatter: ItemMetadata): Record<string, unknown> {\n return orderObject(frontMatter as unknown as Record<string, unknown>, FRONT_MATTER_KEY_ORDER);\n}\n\nfunction findJsonObjectEnd(content: string): number {\n let depth = 0;\n let inString = false;\n let escaped = false;\n\n for (let i = 0; i < content.length; i += 1) {\n const char = content[i];\n if (inString) {\n if (escaped) {\n escaped = false;\n continue;\n }\n if (char === \"\\\\\") {\n escaped = true;\n continue;\n }\n if (char === \"\\\"\") {\n inString = false;\n }\n continue;\n }\n if (char === \"\\\"\") {\n inString = true;\n continue;\n }\n if (char === \"{\") {\n depth += 1;\n continue;\n }\n if (char === \"}\") {\n depth -= 1;\n if (depth === 0) {\n return i;\n }\n }\n }\n\n return -1;\n}\n\nexport function splitFrontMatter(content: string): { frontMatter: string; body: string } {\n if (!content.startsWith(\"{\")) {\n return { frontMatter: \"\", body: content };\n }\n const end = findJsonObjectEnd(content);\n if (end < 0) {\n return { frontMatter: \"\", body: content };\n }\n const frontMatter = content.slice(0, end + 1);\n const body = content.slice(end + 1).replace(/^\\r?\\n+/, \"\");\n return { frontMatter, body };\n}\n\nfunction stripLeadingYamlDocument(content: string): { content: string; stripped: boolean } {\n const normalizedContent = content.charCodeAt(0) === 0xfeff ? content.slice(1) : content;\n const opener = normalizedContent.match(/^[ \\t]*---[ \\t]*(?:\\r?\\n|$)/);\n if (!opener) {\n return { content: normalizedContent, stripped: false };\n }\n\n let cursor = opener[0].length;\n while (cursor < normalizedContent.length) {\n const nextNewline = normalizedContent.indexOf(\"\\n\", cursor);\n const lineEnd = nextNewline === -1 ? normalizedContent.length : nextNewline;\n const line = normalizedContent.slice(cursor, lineEnd).replace(/\\r$/, \"\");\n const afterLine = nextNewline === -1 ? lineEnd : lineEnd + 1;\n if (line.trim() === \"---\") {\n return { content: normalizedContent.slice(afterLine).replace(/^\\s+/, \"\"), stripped: true };\n }\n cursor = afterLine;\n }\n\n return { content: normalizedContent, stripped: false };\n}\n\nfunction parseJsonMarkdownItemDocument(\n content: string,\n runtimeContext?: RuntimeSchemaValidationContext,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): ItemDocument {\n const normalized = stripLeadingYamlDocument(content);\n if (normalized.stripped) {\n options.onWarning?.(\"json_markdown_leading_yaml_frontmatter_ignored\");\n }\n const { frontMatter, body } = splitFrontMatter(normalized.content);\n if (!frontMatter) {\n const trimmed = content.trimStart();\n if (trimmed.startsWith(\"{\")) {\n validationError(\"JSON front matter is not valid JSON\");\n }\n validationError(\"missing JSON front matter\");\n }\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(frontMatter);\n } catch {\n validationError(\"JSON front matter is not valid JSON\");\n }\n assertValidFrontMatter(parsed, runtimeContext);\n\n return {\n metadata: normalizeFrontMatter(parsed, options),\n body: normalizeBody(body),\n };\n}\n\nfunction parseToonItemDocument(\n content: string,\n runtimeContext?: RuntimeSchemaValidationContext,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): ItemDocument {\n let parsed: unknown;\n try {\n // decodeToonItemContent transparently recovers documents that the upstream\n // strict decoder rejects (bracketed-token-then-colon inside a quoted value;\n // see toon-decode.ts). The recovery is lossless, so it stays silent rather\n // than emitting a per-read warning that would perpetually flip pm health\n // red for legacy files. The behavior is pinned by toon-decode.spec.ts.\n parsed = decodeToonItemContent(content).value;\n } catch {\n validationError(\"TOON item document is not valid TOON\");\n }\n assertFrontMatterCondition(\n typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed),\n \"TOON item document must be an object\",\n );\n const record = parsed as Record<string, unknown>;\n\n if (Object.prototype.hasOwnProperty.call(record, \"front_matter\")) {\n assertValidFrontMatter(record.front_matter, runtimeContext);\n assertFrontMatterCondition(\n record.body === undefined || typeof record.body === \"string\",\n \"TOON item document body must be a string\",\n );\n return {\n metadata: normalizeFrontMatter(record.front_matter, options),\n body: normalizeBody(typeof record.body === \"string\" ? record.body : \"\"),\n };\n }\n\n const { body, ...frontMatterRecord } = record;\n assertFrontMatterCondition(\n body === undefined || typeof body === \"string\",\n \"TOON item document body must be a string\",\n );\n assertValidFrontMatter(frontMatterRecord, runtimeContext);\n return {\n metadata: normalizeFrontMatter(frontMatterRecord, options),\n body: normalizeBody(typeof body === \"string\" ? body : \"\"),\n };\n}\n\nfunction serializeJsonMarkdownItemDocument(\n document: ItemDocument,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): string {\n const normalizedFrontMatter = normalizeFrontMatter(document.metadata, options);\n const orderedFrontMatter = orderFrontMatter(normalizedFrontMatter);\n const serializedFrontMatter = JSON.stringify(orderedFrontMatter, null, 2);\n const normalizedBody = normalizeBody(document.body ?? \"\");\n if (!normalizedBody) {\n return `${serializedFrontMatter}\\n`;\n }\n return `${serializedFrontMatter}\\n\\n${normalizedBody}\\n`;\n}\n\nfunction serializeToonItemDocument(\n document: ItemDocument,\n options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {},\n): string {\n const normalizedFrontMatter = normalizeFrontMatter(document.metadata, options);\n const orderedFrontMatter = orderFrontMatter(normalizedFrontMatter);\n const normalizedBody = normalizeBody(document.body ?? \"\");\n return `${encodeToon({ ...orderedFrontMatter, body: normalizedBody })}\\n`;\n}\n\nexport function parseItemDocument(content: string, options: ItemDocumentFormatOptions = {}): ItemDocument {\n const conflictMarker = findFirstMergeConflictMarker(content);\n if (conflictMarker) {\n throw new PmCliError(\n `Merge conflict markers detected in item document at line ${conflictMarker.line} (${conflictMarker.marker}). Resolve <<<<<<< ======= >>>>>>> markers and retry.`,\n EXIT_CODE.GENERIC_FAILURE,\n {\n code: \"merge_conflict_markers_detected\",\n required: \"Resolve merge-conflict markers in the item file before parsing or mutation commands.\",\n why: \"Partially merged documents can corrupt item metadata and history integrity.\",\n examples: [\"git status\", \"git add <resolved-file> && git commit\"],\n nextSteps: [\"Resolve conflicts, save the file, then rerun the pm command.\"],\n },\n );\n }\n const format = options.format ?? \"toon\";\n const runtimeContext = resolveRuntimeSchemaValidationContext(options);\n return format === \"toon\"\n ? parseToonItemDocument(content, runtimeContext, options)\n : parseJsonMarkdownItemDocument(content, runtimeContext, options);\n}\n\nexport function serializeItemDocument(document: ItemDocument, options: ItemDocumentFormatOptions = {}): string {\n const format = options.format ?? \"toon\";\n return format === \"toon\" ? serializeToonItemDocument(document, options) : serializeJsonMarkdownItemDocument(document, options);\n}\n\nexport function canonicalDocument(document: ItemDocument, options: Pick<ItemDocumentFormatOptions, \"schema\" | \"extensionFieldNames\" | \"onWarning\"> = {}): ItemDocument {\n return {\n metadata: normalizeFrontMatter(document.metadata, options),\n body: normalizeBody(document.body ?? \"\"),\n };\n}\n","import { decode as decodeToon } from \"@toon-format/toon\";\n\nexport const TOON_SCALAR_BRACKET_ESCAPE_UPSTREAM_PR = \"https://github.com/toon-format/toon/pull/314\" as const;\n\nexport const TOON_SCALAR_BRACKET_ESCAPE_TRACKING = {\n dependency: \"@toon-format/toon\",\n affected_versions: \"<=2.3.0\",\n upstream_pr: TOON_SCALAR_BRACKET_ESCAPE_UPSTREAM_PR,\n removal_condition:\n \"Remove escapeBracketsInQuotedScalars retry once the upstream strict decoder fix ships in a released @toon-format/toon version and this repository upgrades to it.\",\n} as const;\n\nexport interface ToonDecodeResult {\n /** The decoded TOON document. */\n value: unknown;\n /** True when the strict decode required the scalar-bracket escape workaround. */\n usedScalarBracketEscape: boolean;\n}\n\n/**\n * Escape `[` as `\\u005b` inside quoted scalar values so the upstream\n * `@toon-format/toon` strict decoder cannot mis-read them.\n *\n * The upstream bug: the strict decoder's array-header detection scans the whole\n * line for an opening bracket when the key is unquoted, so a quoted scalar value\n * that contains a bracketed token followed (anywhere later on the line) by a\n * colon, e.g. `body: \"POST [redacted]: ok\"` or `desc: \"sntr[ysu]_ ... :\"`, is\n * mis-detected as a `key`+bracket+colon array header and throws. The library's\n * own `encode()` emits exactly this otherwise-correctly-quoted form, so strict\n * decode cannot read the encoder's own output for such values.\n *\n * A line is treated as a scalar `key: value` (not an array header) only when its\n * `\": \"` key/value separator occurs before the first `[`; array-header lines\n * (`tags[3]:`, `comments[6]{...}:`) have the bracket first and are left\n * untouched, as are non-string (unquoted) values. Within a matched quoted value\n * every `[` becomes `\\u005b`, which the decoder unescapes back to `[`, so the\n * decoded value is byte-for-byte identical. Crucially, this neutralises only the\n * bracket trigger and nothing else, so the retry stays in strict mode and every\n * other strict invariant (duplicate sibling keys, array-count mismatches, tabs\n * in indentation, ...) is still enforced.\n *\n * Upstream tracking metadata lives in {@link TOON_SCALAR_BRACKET_ESCAPE_TRACKING}.\n */\nfunction escapeBracketsInQuotedScalars(content: string): string {\n return content\n .split(\"\\n\")\n .map((line) => {\n const separatorIndex = line.indexOf(\": \");\n const bracketIndex = line.indexOf(\"[\");\n if (separatorIndex === -1 || bracketIndex === -1 || bracketIndex < separatorIndex) {\n return line;\n }\n const key = line.slice(0, separatorIndex + 2);\n const value = line.slice(separatorIndex + 2);\n if (!value.startsWith('\"')) {\n return line;\n }\n return key + value.replaceAll(\"[\", \"\\\\u005b\");\n })\n .join(\"\\n\");\n}\n\n/**\n * Decode a TOON item document, working around the upstream bracket mis-parse\n * bug described in {@link escapeBracketsInQuotedScalars}.\n *\n * Strict decode is attempted first (the fast path for all well-formed\n * documents). Only if it fails is the scalar-bracket escape applied and strict\n * decode retried, so the workaround never relaxes strict validation; it only\n * removes the specific trigger. If the escaped content is identical to the\n * original (no quoted-scalar bracket to neutralise) the original strict error is\n * surfaced unchanged; if the retry itself fails the document has a genuine\n * problem beyond the bracket bug and that error propagates.\n */\nexport function decodeToonItemContent(content: string): ToonDecodeResult {\n try {\n return { value: decodeToon(content), usedScalarBracketEscape: false };\n } catch (strictError) {\n const escaped = escapeBracketsInQuotedScalars(content);\n if (escaped === content) {\n throw strictError;\n }\n return { value: decodeToon(escaped), usedScalarBracketEscape: true };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,aAAa,OAAa;AACjC,QAAM,WAAW,MACd,KAAI,EACJ,WAAW,kBAAkB,GAAG,EAChC,MAAM,KAAK,EACX,OAAO,CAAC,YAAY,QAAQ,SAAS,CAAC,EACtC,IAAI,CAAC,YAAY,QAAQ,YAAW,CAAE;AACzC,MAAI,SAAS,WAAW,GAAG;AACzB,WAAO;EACT;AACA,QAAM,CAAC,OAAO,GAAG,IAAI,IAAI;AACzB,SAAO,GAAG,KAAK,GAAG,KAAK,IAAI,CAAC,YAAY,GAAG,QAAQ,MAAM,GAAG,CAAC,EAAE,YAAW,CAAE,GAAG,QAAQ,MAAM,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC;AAC7G;AAEA,SAAS,2BAA2B,YAA0C;AAC5E,SAAO,CAAC,GAAG,oBAAI,IAAI;IACjB,yBAAyB,UAAU;IACnC,aAAa,WAAW,GAAG;IAC3B,aAAa,WAAW,QAAQ;IAChC,GAAG,WAAW,YAAY,IAAI,CAAC,UAAU,aAAa,KAAK,CAAC;GAC7D,CAAC;AACJ;AAEM,SAAU,4BACd,SACA,YAA0C;AAE1C,aAAW,gBAAgB,2BAA2B,UAAU,GAAG;AACjE,QAAI,CAAC,OAAO,OAAO,SAAS,YAAY,GAAG;AACzC;IACF;AACA,UAAM,QAAQ,QAAQ,YAAY;AAClC,QAAI,UAAU,QAAW;AACvB,aAAO;IACT;EACF;AACA,SAAO;AACT;AAEA,SAAS,0BAA0B,OAAc;AAC/C,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,MACJ,QAAQ,CAAC,UAAU,0BAA0B,KAAK,CAAC,EACnD,IAAI,CAAC,UAAU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S,gBAAgB,OAAO,IACtD,8BAA8B,SAAS,gBAAgB,OAAO;AACpE;AAEM,SAAU,sBAAsB,UAAwB,UAAqC,CAAA,GAAE;AACnG,QAAM,SAAS,QAAQ,UAAU;AACjC,SAAO,WAAW,SAAS,0BAA0B,UAAU,OAAO,IAAI,kCAAkC,UAAU,OAAO;AAC/H;AAEM,SAAU,kBAAkB,UAAwB,UAA2F,CAAA,GAAE;AACrJ,SAAO;IACL,UAAU,qBAAqB,SAAS,UAAU,OAAO;IACzD,MAAM,cAAc,SAAS,QAAQ,EAAE;;AAE3C","debugId":"8e6380db-298c-5343-b79e-9939444e8ad2"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../../core/diagnostics/remediation.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\nexport interface RemediationEntry {\n /**\n * Stable warning-code prefix this entry resolves. A warning matches when it\n * equals this code or begins with `<code>:`. Registry codes are mutually\n * exclusive under that colon-boundary rule (no code is a `:`-delimited prefix\n * of another — e.g. `settings:id_prefix_empty` is distinct from a bare\n * `settings`, which is intentionally not registered), so `resolveRemediation`\n * uses first-match with no ordering dependency.\n */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/**\n * Registry of every non-extension `pm health` / `pm validate` warning code and\n * its remediation. Extension findings keep their richer, contextual\n * `details.triage.remediation` produced by the extension health triage and are\n * intentionally excluded here (see pm-0hnu: \"all non-extension checks\").\n */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary: \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary: \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary: 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary: 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary: \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary: \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_queue_high_retries\",\n command: \"pm telemetry flush\",\n summary:\n \"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_schema_version_behind\",\n command: \"pm health --check-telemetry\",\n summary: \"Client schema is behind server; upgrade pm-cli to emit the latest event shape.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file failed to parse; fix the malformed front matter at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm health: history_drift ---\n // `pm health` rewrites these commands to `pm history-repair --all` in the\n // per-check remediation_map when more than one stream is drifted.\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n // --- pm health: locks ---\n {\n code: \"locks_stale_count\",\n command: \"pm gc --scope locks\",\n summary:\n \"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them — gc retains active and unparseable locks.\",\n },\n {\n code: \"locks_unreadable\",\n command: \"pm gc --scope locks --dry-run\",\n summary:\n \"Some lock files could not be read; preview the sweep and inspect the unreadable files manually — gc never deletes what it cannot read.\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary: \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n {\n code: \"vectorization_embedding_identity_changed\",\n command: \"pm reindex --mode semantic\",\n summary: \"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` front-matter field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary: \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary: \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary: \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary: \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary: \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command: 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(warning: string): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/**\n * Build a compact `remediation_map` (code -> command) for a set of warning\n * tokens. First match wins per code; unknown codes are skipped. Used by\n * `pm health --json` per-check details and as the source of deduped executable\n * commands for `pm validate --fix-hints`.\n */\nexport function buildRemediationMap(warnings: Iterable<string>): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (entry !== undefined && !Object.prototype.hasOwnProperty.call(map, entry.code)) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/**\n * Build a deduped, ordered list of executable remediation commands for a set of\n * warning tokens (one command per distinct matched code). Used by\n * `pm validate --fix-hints` for checks that do not already emit per-row\n * remediation commands.\n */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AA0CO,IAAM,uBAAoD,OAAO,OAAO;;EAE7E;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AI,IAAI,MAAM;IAC1B;EACF;AACA,SAAO;AACT;AAQM,SAAU,yBAAyB,UAA0B;AACjE,SAAO,OAAO,OAAO,oBAAoB,QAAQ,CAAC;AACpD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/linked-artifacts.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport fg from \"fast-glob\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { createStdinTokenResolver, parseCsvKv } from \"../../core/item/parse.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\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 { listAllFrontMatter, locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { SCOPE_VALUES } from \"../../types/index.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { LinkScope } from \"../../types/index.js\";\n\nexport type LinkedArtifact = {\n path: string;\n scope: LinkScope;\n note?: string;\n};\n\nexport interface LinkedArtifactCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /**\n * GH-170 (pm-pfnx): standalone note applied to every link added by --add /\n * --add-glob in the same invocation. A per-entry embedded note (the\n * `path=...,note=...` pair syntax) takes precedence over this flag.\n * Requires at least one --add/--add-glob; rejected otherwise.\n */\n note?: string;\n list?: boolean;\n appendStable?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\nexport interface PathMigration {\n from: string;\n to: string;\n}\n\nexport interface AddGlobEntry {\n pattern: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedPathValidation {\n checked: number;\n existing_files: string[];\n missing_paths: string[];\n non_file_paths: string[];\n}\n\nexport interface LinkedPathAuditEntry {\n path: string;\n linked_by_count: number;\n linked_item_ids: string[];\n}\n\nexport interface LinkedArtifactResult {\n id: string;\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n artifacts: LinkedArtifact[];\n}\n\n/**\n * Configuration that adapts the shared linked-artifact command core to a\n * specific resource kind (files or docs) while preserving every behavioral\n * detail of the original twin implementations.\n */\nexport interface LinkedArtifactKindConfig {\n /** Metadata key under which the artifacts are stored (e.g. \"files\" | \"docs\"). */\n metadataKey: \"files\" | \"docs\";\n /** Mutation op recorded in history (e.g. \"files_add\" | \"docs_add\"). */\n op: \"files_add\" | \"docs_add\";\n /** Noun used in the \"bare <noun> path\" --add usage error (e.g. \"file\" | \"doc\"). */\n bareNoun: \"file\" | \"doc\";\n /**\n * Whether this kind honors the append-stable option. files supports it;\n * docs always sorts and must never expose append-stable behavior.\n */\n supportsAppendStable: boolean;\n}\n\nexport function ensureScope(raw: string | undefined): LinkScope {\n const value = (raw ?? \"project\") as LinkScope;\n if (!SCOPE_VALUES.includes(value)) {\n throw new PmCliError(\n `Invalid scope \"${raw}\". Valid scopes: ${SCOPE_VALUES.join(\", \")} (default: project).`,\n EXIT_CODE.USAGE,\n );\n }\n return value;\n}\n\nexport function looksLikeStructuredPathEntry(raw: string): boolean {\n if (raw.startsWith(\"```\") || raw.includes(\"\\n\")) {\n return true;\n }\n return /^(?:[-*+]\\s+)?(?:path|scope|note)\\s*[:=]/i.test(raw);\n}\n\nexport function parseAddEntries(raw: string[] | undefined, bareNoun: \"file\" | \"doc\"): LinkedArtifact[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n const kv = looksLikeStructuredPathEntry(trimmed) ? parseCsvKv(entry, \"--add\") : { path: trimmed };\n if (!kv.path) {\n throw new PmCliError(`--add requires path=<value> or a bare ${bareNoun} path`, EXIT_CODE.USAGE);\n }\n return {\n path: kv.path,\n scope: ensureScope(kv.scope),\n note: kv.note?.trim() || undefined,\n };\n });\n}\n\nexport function parseAddGlobEntries(raw: string[] | undefined): AddGlobEntry[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n throw new PmCliError(\"--add-glob requires a glob pattern value\", EXIT_CODE.USAGE);\n }\n if (trimmed.includes(\"=\") || /^(?:[-*+]\\s+)?(?:pattern|glob|path)\\s*[:=]/i.test(trimmed) || trimmed.startsWith(\"```\")) {\n const kv = parseCsvKv(trimmed, \"--add-glob\");\n const pattern = kv.pattern?.trim() || kv.glob?.trim() || kv.path?.trim();\n if (!pattern) {\n throw new PmCliError(\"--add-glob key/value form requires pattern=<glob>\", EXIT_CODE.USAGE);\n }\n return {\n pattern,\n scope: ensureScope(kv.scope),\n note: kv.note?.trim() || undefined,\n };\n }\n return {\n pattern: trimmed,\n scope: \"project\",\n };\n });\n}\n\nexport function parseRemoveEntries(raw: string[] | undefined): string[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const trimmed = entry.trim();\n if (!trimmed) {\n throw new PmCliError(\"--remove requires a path value\", EXIT_CODE.USAGE);\n }\n if (trimmed.includes(\"=\") || /^(?:[-*+]\\s+)?path\\s*[:=]/i.test(trimmed) || trimmed.startsWith(\"```\")) {\n const kv = parseCsvKv(trimmed, \"--remove\");\n if (!kv.path) {\n throw new PmCliError(\"--remove key/value form requires path=<value>\", EXIT_CODE.USAGE);\n }\n return kv.path;\n }\n return trimmed;\n });\n}\n\nexport function parseMigrateEntries(raw: string[] | undefined): PathMigration[] {\n if (!raw) return [];\n return raw.map((entry) => {\n const kv = parseCsvKv(entry, \"--migrate\");\n const from = kv.from?.trim();\n const to = kv.to?.trim();\n if (!from || !to) {\n throw new PmCliError(\"--migrate requires from=<value> and to=<value>\", EXIT_CODE.USAGE);\n }\n return { from, to };\n });\n}\n\nexport function applyPathMigrations(artifactPath: string, migrations: PathMigration[]): string {\n let next = artifactPath;\n for (const migration of migrations) {\n if (next.startsWith(migration.from)) {\n next = `${migration.to}${next.slice(migration.from.length)}`;\n }\n }\n return next;\n}\n\nexport function normalizeLinkedPath(value: string): string {\n return value.split(path.sep).join(\"/\");\n}\n\nexport async function expandAddGlobEntries(entries: AddGlobEntry[]): Promise<LinkedArtifact[]> {\n const expanded: LinkedArtifact[] = [];\n for (const entry of entries) {\n const absolutePattern = path.isAbsolute(entry.pattern);\n const matches = await fg(entry.pattern, {\n cwd: process.cwd(),\n absolute: absolutePattern,\n onlyFiles: true,\n dot: true,\n unique: true,\n followSymbolicLinks: true,\n });\n const sortedMatches = [...new Set(matches.map((match) => normalizeLinkedPath(path.normalize(match))))].sort((left, right) =>\n left.localeCompare(right),\n );\n for (const matchedPath of sortedMatches) {\n expanded.push({\n path: matchedPath,\n scope: entry.scope,\n note: entry.note,\n });\n }\n }\n return expanded;\n}\n\n/**\n * GH-170 (pm-pfnx): apply a standalone --note to the links added in this\n * invocation. Semantics (documented on pm-pfnx): the note is attached to EVERY\n * entry added via --add/--add-glob so a single flag annotates the whole batch\n * predictably; a per-entry embedded `note=` wins over the standalone flag; and\n * --note without any --add/--add-glob flag is a usage error because there is\n * nothing to annotate (it never retro-edits existing links). `hasAddFlags`\n * reflects flag presence, not match count, so a glob that legitimately matches\n * zero files is not an error.\n */\nexport function applyStandaloneNote(\n adds: LinkedArtifact[],\n note: string | undefined,\n hasAddFlags: boolean,\n): LinkedArtifact[] {\n if (note === undefined) {\n return adds;\n }\n if (!hasAddFlags) {\n throw new PmCliError(\n \"--note requires --add or --add-glob in the same invocation (the note annotates the links being added)\",\n EXIT_CODE.USAGE,\n );\n }\n const trimmed = note.trim();\n if (trimmed.length === 0) {\n return adds;\n }\n return adds.map((entry) => (entry.note === undefined ? { ...entry, note: trimmed } : entry));\n}\n\nexport function artifactKey(value: Pick<LinkedArtifact, \"path\" | \"scope\">): string {\n return `${value.path}::${value.scope}`;\n}\n\nexport function sortLinkedArtifacts(artifacts: LinkedArtifact[]): LinkedArtifact[] {\n return [...artifacts].sort((left, right) => {\n const byPath = left.path.localeCompare(right.path);\n if (byPath !== 0) return byPath;\n return left.scope.localeCompare(right.scope);\n });\n}\n\nexport function dedupeLinkedArtifacts(artifacts: LinkedArtifact[]): LinkedArtifact[] {\n return [...new Map(artifacts.map((entry) => [artifactKey(entry), entry])).values()].map((entry) => ({\n ...entry,\n note: entry.note?.trim() || undefined,\n }));\n}\n\nexport async function validateLinkedPaths(paths: string[]): Promise<LinkedPathValidation> {\n const uniquePaths = [...new Set(paths)].sort((left, right) => left.localeCompare(right));\n const existingFiles: string[] = [];\n const missingPaths: string[] = [];\n const nonFilePaths: string[] = [];\n for (const relativePath of uniquePaths) {\n const resolvedPath = path.isAbsolute(relativePath) ? relativePath : path.resolve(process.cwd(), relativePath);\n try {\n const stats = await fs.stat(resolvedPath);\n if (stats.isFile()) {\n existingFiles.push(relativePath);\n } else {\n nonFilePaths.push(relativePath);\n }\n } catch (error: unknown) {\n if (typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === \"ENOENT\") {\n missingPaths.push(relativePath);\n continue;\n }\n nonFilePaths.push(relativePath);\n }\n }\n return {\n checked: uniquePaths.length,\n existing_files: existingFiles,\n missing_paths: missingPaths,\n non_file_paths: nonFilePaths,\n };\n}\n\nexport function buildLinkedPathAudit(\n paths: string[],\n allItems: Array<{ id: string; artifacts?: LinkedArtifact[] }>,\n): LinkedPathAuditEntry[] {\n const index = new Map<string, Set<string>>();\n for (const item of allItems) {\n for (const linkedArtifact of item.artifacts ?? []) {\n const seen = index.get(linkedArtifact.path) ?? new Set<string>();\n seen.add(item.id);\n index.set(linkedArtifact.path, seen);\n }\n }\n return [...new Set(paths)]\n .sort((left, right) => left.localeCompare(right))\n .map((linkedPath) => {\n const linkedIds = [...(index.get(linkedPath) ?? new Set<string>())].sort((left, right) => left.localeCompare(right));\n return {\n path: linkedPath,\n linked_by_count: linkedIds.length,\n linked_item_ids: linkedIds,\n };\n });\n}\n\n/**\n * Shared linked-artifact list/mutate command core used by runFiles and runDocs.\n * The kind config selects metadata key, op, bare-path noun, and whether\n * append-stable ordering is honored, preserving each twin's exact semantics.\n */\nexport async function runLinkedArtifacts(\n id: string,\n options: LinkedArtifactCommandOptions,\n global: GlobalOptions,\n config: LinkedArtifactKindConfig,\n): Promise<LinkedArtifactResult> {\n const { metadataKey } = config;\n const stdinResolver = createStdinTokenResolver();\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const resolvedAdds = await stdinResolver.resolveList(options.add, \"--add\");\n const resolvedAddGlobs = await stdinResolver.resolveList(options.addGlob, \"--add-glob\");\n const resolvedRemoves = await stdinResolver.resolveList(options.remove, \"--remove\");\n const resolvedMigrations = await stdinResolver.resolveList(options.migrate, \"--migrate\");\n const parsedAdds = parseAddEntries(resolvedAdds, config.bareNoun);\n const addGlobs = parseAddGlobEntries(resolvedAddGlobs);\n const expandedGlobAdds = await expandAddGlobEntries(addGlobs);\n const adds = applyStandaloneNote(\n [...parsedAdds, ...expandedGlobAdds],\n options.note,\n parsedAdds.length > 0 || addGlobs.length > 0,\n );\n const removes = parseRemoveEntries(resolvedRemoves);\n const migrations = parseMigrateEntries(resolvedMigrations);\n const shouldMutate = adds.length > 0 || removes.length > 0 || migrations.length > 0;\n\n const collectAuditItems = async (): Promise<Array<{ id: string; artifacts?: LinkedArtifact[] }>> =>\n (await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema)).map((entry) => ({\n id: entry.id,\n artifacts: (entry as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined,\n }));\n\n if (!shouldMutate) {\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const artifacts = ((loaded.document.metadata as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined) ?? [];\n return {\n id: located.id,\n artifacts,\n changed: false,\n count: artifacts.length,\n validation: options.validatePaths ? await validateLinkedPaths(artifacts.map((entry) => entry.path)) : undefined,\n audit: options.audit ? buildLinkedPathAudit(artifacts.map((entry) => entry.path), await collectAuditItems()) : undefined,\n };\n }\n\n const author = resolveAuthor(options.author, settings.author_default);\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: config.op,\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n const metadata = document.metadata as Record<string, unknown>;\n const next = [...((metadata[metadataKey] as LinkedArtifact[] | undefined) ?? [])];\n let migrationCount = 0;\n if (migrations.length > 0) {\n for (let index = 0; index < next.length; index += 1) {\n const migratedPath = applyPathMigrations(next[index].path, migrations);\n if (migratedPath !== next[index].path) {\n next[index] = { ...next[index], path: migratedPath };\n migrationCount += 1;\n }\n }\n }\n const migratedAdds = adds.map((entry) => {\n const migratedPath = applyPathMigrations(entry.path, migrations);\n if (migratedPath !== entry.path) {\n migrationCount += 1;\n }\n return {\n ...entry,\n path: migratedPath,\n };\n });\n const migratedRemoves = removes.map((entry) => applyPathMigrations(entry, migrations));\n for (const add of migratedAdds) {\n const exists = next.some((entry) => entry.path === add.path && entry.scope === add.scope);\n if (!exists) {\n next.push(add);\n }\n }\n if (migratedRemoves.length > 0) {\n for (let i = next.length - 1; i >= 0; i -= 1) {\n if (migratedRemoves.includes(next[i].path)) {\n next.splice(i, 1);\n }\n }\n }\n const deduped = dedupeLinkedArtifacts(next);\n const normalized = config.supportsAppendStable && options.appendStable ? deduped : sortLinkedArtifacts(deduped);\n if (normalized.length > 0) {\n metadata[metadataKey] = normalized;\n } else {\n delete metadata[metadataKey];\n }\n return { changedFields: [metadataKey], warnings: migrationCount > 0 ? [`path_migrations_applied:${migrationCount}`] : [] };\n },\n });\n\n const artifacts = ((result.item as Record<string, unknown>)[metadataKey] as LinkedArtifact[] | undefined) ?? [];\n const migrationWarning = result.warnings.find((warning) => warning.startsWith(\"path_migrations_applied:\"));\n const migrationCount = migrationWarning ? Number(migrationWarning.slice(\"path_migrations_applied:\".length)) : 0;\n const allItems = options.audit ? await collectAuditItems() : [];\n return {\n id: result.item.id,\n artifacts,\n changed: true,\n count: artifacts.length,\n migrations_applied: migrationCount > 0 ? migrationCount : undefined,\n validation: options.validatePaths ? await validateLinkedPaths(artifacts.map((entry) => entry.path)) : undefined,\n audit: options.audit ? buildLinkedPathAudit(artifacts.map((entry) => entry.path), allItems) : undefined,\n };\n}\n\n/**\n * Re-key the generic `artifacts` field to the resource-specific name (files/docs)\n * while preserving the original key order and presence so kind-specific result\n * shapes (and their deterministic JSON key ordering) stay byte-identical.\n */\nexport function renameArtifactsResultKey(result: LinkedArtifactResult, key: \"files\" | \"docs\"): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [field, value] of Object.entries(result)) {\n out[field === \"artifacts\" ? key : field] = value;\n }\n return out;\n}\n"],"names":["artifacts","migrationCount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,QAAQ;AA+FT,SAAU,YAAY,KAAuB;AACjD,QAAM,QAAS,OAAO;AACtB,MAAI,CAAC,aAAa,SAAS,KAAK,GAAG;AACjC,UAAM,IAAI,WACR,kBAAkB,GAAG,oBAAoB,aAAa,KAAK,IAAI,CAAC,wBAChE,UAAU,KAAK;EAEnB;AACA,SAAO;AACT;AAEM,SAAU,6BAA6B,KAAW;AACtD,MAAI,IAAI,WAAW,KAAK,KAAK,IAAI,SAAS,IAAI,GAAG;AAC/C,WAAO;EACT;AACA,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