@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,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0499331c-7c90-573a-9b07-2437c7ac8072")}catch(e){}}();
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
import { mkdirSync, rmSync, statSync } from "node:fs";
|
|
@@ -15,6 +15,14 @@ import { readSettings, writeSettings } from "../store/settings.js";
|
|
|
15
15
|
import { deriveTelemetryCommandResolution, deriveTelemetryCommandTaxonomy, inferTelemetryErrorCode, } from "./observability.js";
|
|
16
16
|
const TELEMETRY_QUEUE_RELATIVE_PATH = path.join("runtime", "telemetry", "events.jsonl");
|
|
17
17
|
const TELEMETRY_STATE_RELATIVE_PATH = path.join("runtime", "telemetry", "state.json");
|
|
18
|
+
const TELEMETRY_OTEL_SPANS_RELATIVE_PATH = path.join("runtime", "telemetry", "otel-spans.jsonl");
|
|
19
|
+
// Kept small so a worst-case batch against a blackholed collector
|
|
20
|
+
// (TELEMETRY_OTEL_SPANS_FLUSH_BATCH_SIZE * TELEMETRY_HTTP_TIMEOUT_MS plus the
|
|
21
|
+
// preceding event flush) stays well under TELEMETRY_FLUSH_LOCK_STALE_MS (60s).
|
|
22
|
+
// Otherwise a later command could treat the still-held flush lock as stale and
|
|
23
|
+
// start a second concurrent worker.
|
|
24
|
+
const TELEMETRY_OTEL_SPANS_FLUSH_BATCH_SIZE = 8;
|
|
25
|
+
const TELEMETRY_OTEL_SPANS_MAX_PENDING = 500;
|
|
18
26
|
export const TELEMETRY_SCHEMA_VERSION = 1;
|
|
19
27
|
const TELEMETRY_CLIENT_SCHEMA_VERSION = 1;
|
|
20
28
|
const TELEMETRY_FLUSH_BATCH_SIZE = 100;
|
|
@@ -42,7 +50,7 @@ const PM_TELEMETRY_OTEL_DISABLED_VALUES = new Set(["1", "true", "yes", "on"]);
|
|
|
42
50
|
const PM_TELEMETRY_INLINE_FLUSH_ENV = "PM_TELEMETRY_INLINE_FLUSH";
|
|
43
51
|
const PM_TELEMETRY_FLUSH_CHILD_ENV = "PM_TELEMETRY_FLUSH_CHILD";
|
|
44
52
|
const PM_TELEMETRY_SOURCE_CONTEXT_ENV = "PM_TELEMETRY_SOURCE_CONTEXT";
|
|
45
|
-
const PM_TELEMETRY_SOURCE_CONTEXT_VALUES = ["user", "automation", "test", "dogfood", "audit_smoke"];
|
|
53
|
+
export const PM_TELEMETRY_SOURCE_CONTEXT_VALUES = ["user", "automation", "test", "dogfood", "audit_smoke"];
|
|
46
54
|
let _lastFlushPromise = Promise.resolve();
|
|
47
55
|
let _queueMutationPromise = Promise.resolve();
|
|
48
56
|
/** Wait for the most recent background flush to settle. Test-only helper. */
|
|
@@ -75,6 +83,9 @@ const PRIVATE_IP_PATTERN = /\b(?:10\.(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.(?:25[0-5]
|
|
|
75
83
|
function queuePath(globalPmRoot) {
|
|
76
84
|
return path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);
|
|
77
85
|
}
|
|
86
|
+
function otelSpansQueuePath(globalPmRoot) {
|
|
87
|
+
return path.join(globalPmRoot, TELEMETRY_OTEL_SPANS_RELATIVE_PATH);
|
|
88
|
+
}
|
|
78
89
|
function telemetryRuntimeDirectory(globalPmRoot) {
|
|
79
90
|
return path.dirname(queuePath(globalPmRoot));
|
|
80
91
|
}
|
|
@@ -337,7 +348,7 @@ function parseBooleanTrueLike(value) {
|
|
|
337
348
|
return BOOLEAN_TRUE_VALUES.has((value ?? "").trim().toLowerCase());
|
|
338
349
|
}
|
|
339
350
|
function normalizePmVersion(value) {
|
|
340
|
-
const trimmed = value
|
|
351
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
341
352
|
return trimmed.length > 0 ? trimmed : "0.0.0";
|
|
342
353
|
}
|
|
343
354
|
function normalizeTelemetryErrorCode(value) {
|
|
@@ -346,7 +357,7 @@ function normalizeTelemetryErrorCode(value) {
|
|
|
346
357
|
}
|
|
347
358
|
function normalizeTelemetryExitCode(exitCode, ok) {
|
|
348
359
|
if (Number.isFinite(exitCode)) {
|
|
349
|
-
return Math.max(0, Math.trunc(exitCode
|
|
360
|
+
return Math.max(0, Math.trunc(exitCode));
|
|
350
361
|
}
|
|
351
362
|
return ok ? 0 : 1;
|
|
352
363
|
}
|
|
@@ -428,8 +439,9 @@ function hashCommandArgs(installationId, args) {
|
|
|
428
439
|
};
|
|
429
440
|
}
|
|
430
441
|
function hashTelemetryErrorFingerprint(installationId, command, errorCode, errorMessage) {
|
|
431
|
-
const normalizedMessage = sanitizeString(errorMessage
|
|
432
|
-
const
|
|
442
|
+
const normalizedMessage = sanitizeString(typeof errorMessage === "string" ? errorMessage : "", "redacted");
|
|
443
|
+
const normalizedCode = typeof errorCode === "string" && errorCode.length > 0 ? errorCode : "unknown_error";
|
|
444
|
+
const fingerprintSource = `${command}\u0000${normalizedCode}\u0000${normalizedMessage}`;
|
|
433
445
|
return hashWithInstallationId(installationId, fingerprintSource);
|
|
434
446
|
}
|
|
435
447
|
function telemetryDisabledByEnvironment() {
|
|
@@ -488,14 +500,21 @@ function otlpIntAttribute(key, value) {
|
|
|
488
500
|
value: { intValue: String(Math.max(0, Math.trunc(value))) },
|
|
489
501
|
};
|
|
490
502
|
}
|
|
491
|
-
|
|
503
|
+
/**
|
|
504
|
+
* Build the OTLP trace-export request for a finished command without performing
|
|
505
|
+
* any network I/O. Returns `null` when OTLP export is not configured (no traces
|
|
506
|
+
* endpoint / trace ids). The actual POST is deferred to the detached flush worker
|
|
507
|
+
* via {@link enqueuePendingOtelSpan} so the foreground command never blocks on a
|
|
508
|
+
* connecting socket (GH-209).
|
|
509
|
+
*/
|
|
510
|
+
function buildOtelSpanRequest(activeCommand, outcome, finishedAtIso, durationMs) {
|
|
492
511
|
if (typeof activeCommand.otel_traces_endpoint !== "string" ||
|
|
493
512
|
activeCommand.otel_traces_endpoint.trim().length === 0 ||
|
|
494
513
|
typeof activeCommand.otel_trace_id !== "string" ||
|
|
495
514
|
activeCommand.otel_trace_id.length === 0 ||
|
|
496
515
|
typeof activeCommand.otel_span_id !== "string" ||
|
|
497
516
|
activeCommand.otel_span_id.length === 0) {
|
|
498
|
-
return;
|
|
517
|
+
return null;
|
|
499
518
|
}
|
|
500
519
|
const serviceNameCandidate = sanitizeString((process.env[OTEL_SERVICE_NAME_ENV] ?? "").trim());
|
|
501
520
|
const serviceName = serviceNameCandidate.length > 0 ? serviceNameCandidate : "pm-cli";
|
|
@@ -551,7 +570,9 @@ async function exportLocalOtelSpan(activeCommand, outcome, finishedAtIso, durati
|
|
|
551
570
|
attributes,
|
|
552
571
|
status: {
|
|
553
572
|
code: outcome.ok ? 1 : 2,
|
|
554
|
-
message: outcome.ok
|
|
573
|
+
message: outcome.ok
|
|
574
|
+
? ""
|
|
575
|
+
: sanitizeString(typeof outcome.error === "string" ? outcome.error : "command_failed"),
|
|
555
576
|
},
|
|
556
577
|
},
|
|
557
578
|
],
|
|
@@ -560,17 +581,7 @@ async function exportLocalOtelSpan(activeCommand, outcome, finishedAtIso, durati
|
|
|
560
581
|
},
|
|
561
582
|
],
|
|
562
583
|
};
|
|
563
|
-
|
|
564
|
-
method: "POST",
|
|
565
|
-
headers: {
|
|
566
|
-
"content-type": "application/json",
|
|
567
|
-
},
|
|
568
|
-
body: JSON.stringify(payload),
|
|
569
|
-
signal: AbortSignal.timeout(TELEMETRY_HTTP_TIMEOUT_MS),
|
|
570
|
-
});
|
|
571
|
-
if (!response.ok) {
|
|
572
|
-
throw new Error(`local_otel_export_http_${response.status}`);
|
|
573
|
-
}
|
|
584
|
+
return { endpoint: activeCommand.otel_traces_endpoint, payload };
|
|
574
585
|
}
|
|
575
586
|
function summarizeResult(result, captureLevel = "redacted") {
|
|
576
587
|
if (result === null || result === undefined) {
|
|
@@ -596,7 +607,7 @@ function summarizeResult(result, captureLevel = "redacted") {
|
|
|
596
607
|
let previewBytes = 0;
|
|
597
608
|
for (const key of keys.slice(0, 25)) {
|
|
598
609
|
const sanitizedValue = sanitizeValue(record[key], key, captureLevel);
|
|
599
|
-
const entrySize = JSON.stringify(sanitizedValue)
|
|
610
|
+
const entrySize = JSON.stringify(sanitizedValue).length;
|
|
600
611
|
if (previewBytes + entrySize > TELEMETRY_RESULT_PREVIEW_MAX_BYTES) {
|
|
601
612
|
sanitized[key] = "[preview_truncated]";
|
|
602
613
|
break;
|
|
@@ -823,16 +834,19 @@ function nextRetryIso(attempts) {
|
|
|
823
834
|
const delay = Math.min(TELEMETRY_RETRY_BASE_DELAY_MS * 2 ** Math.max(attempts - 1, 0), TELEMETRY_MAX_RETRY_DELAY_MS);
|
|
824
835
|
return new Date(Date.now() + delay).toISOString();
|
|
825
836
|
}
|
|
826
|
-
function
|
|
827
|
-
if (typeof
|
|
837
|
+
function isDueForRetryAt(nextAttemptAfter) {
|
|
838
|
+
if (typeof nextAttemptAfter !== "string" || nextAttemptAfter.trim().length === 0) {
|
|
828
839
|
return true;
|
|
829
840
|
}
|
|
830
|
-
const dueAtMs = Date.parse(
|
|
841
|
+
const dueAtMs = Date.parse(nextAttemptAfter);
|
|
831
842
|
if (Number.isNaN(dueAtMs)) {
|
|
832
843
|
return true;
|
|
833
844
|
}
|
|
834
845
|
return dueAtMs <= Date.now();
|
|
835
846
|
}
|
|
847
|
+
function isDueForRetry(entry) {
|
|
848
|
+
return isDueForRetryAt(entry.next_attempt_after);
|
|
849
|
+
}
|
|
836
850
|
function retentionCutoffMs(retentionDays) {
|
|
837
851
|
const normalizedDays = Number.isFinite(retentionDays) ? Math.max(1, Math.trunc(retentionDays)) : 1;
|
|
838
852
|
return Date.now() - normalizedDays * MILLISECONDS_PER_DAY;
|
|
@@ -892,6 +906,238 @@ function sleep(milliseconds) {
|
|
|
892
906
|
setTimeout(resolve, milliseconds);
|
|
893
907
|
});
|
|
894
908
|
}
|
|
909
|
+
/**
|
|
910
|
+
* Append a built OTLP span request to the bounded pending-spans queue. The
|
|
911
|
+
* detached flush worker drains and POSTs these so the foreground command never
|
|
912
|
+
* performs OTLP network I/O (GH-209). Best effort: a write failure never blocks
|
|
913
|
+
* the command, and the span is simply not exported.
|
|
914
|
+
*/
|
|
915
|
+
async function enqueuePendingOtelSpan(globalPmRoot, request) {
|
|
916
|
+
const pending = {
|
|
917
|
+
id: crypto.randomUUID(),
|
|
918
|
+
endpoint: request.endpoint,
|
|
919
|
+
payload: request.payload,
|
|
920
|
+
enqueued_at: nowIso(),
|
|
921
|
+
attempts: 0,
|
|
922
|
+
};
|
|
923
|
+
const serialized = JSON.stringify(pending);
|
|
924
|
+
// Drop oversized spans rather than poison the queue; they would never flush.
|
|
925
|
+
if (serialized.length > TELEMETRY_MAX_EVENT_BYTES) {
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
await withQueueMutation(async () => {
|
|
929
|
+
await appendLineAtomic(otelSpansQueuePath(globalPmRoot), serialized);
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* Derive a stable id for a legacy id-less pending span from its identity fields.
|
|
934
|
+
* Deterministic so the same on-disk line yields the same id across reads, which
|
|
935
|
+
* is what lets reconciliation remove/update it after a flush.
|
|
936
|
+
*/
|
|
937
|
+
function backfillPendingOtelSpanId(entry) {
|
|
938
|
+
const material = JSON.stringify([entry.endpoint, entry.enqueued_at, entry.payload]);
|
|
939
|
+
return crypto.createHash("sha256").update(material).digest("hex").slice(0, 32);
|
|
940
|
+
}
|
|
941
|
+
function parsePendingOtelSpanLines(raw) {
|
|
942
|
+
const entries = [];
|
|
943
|
+
for (const line of raw.split("\n")) {
|
|
944
|
+
const trimmed = line.trim();
|
|
945
|
+
if (trimmed.length === 0) {
|
|
946
|
+
continue;
|
|
947
|
+
}
|
|
948
|
+
try {
|
|
949
|
+
const parsed = JSON.parse(trimmed);
|
|
950
|
+
if (parsed &&
|
|
951
|
+
typeof parsed === "object" &&
|
|
952
|
+
typeof parsed.endpoint === "string" &&
|
|
953
|
+
parsed.endpoint.trim().length > 0 &&
|
|
954
|
+
"payload" in parsed &&
|
|
955
|
+
typeof parsed.attempts === "number" &&
|
|
956
|
+
Number.isFinite(parsed.attempts)) {
|
|
957
|
+
// Backfill an id for legacy entries written before id tracking existed.
|
|
958
|
+
// It MUST be deterministic from the entry's content so the post-flush
|
|
959
|
+
// re-read derives the same id and reconciliation can address the entry;
|
|
960
|
+
// a random id would differ between reads and strand the span.
|
|
961
|
+
if (typeof parsed.id !== "string" || parsed.id.length === 0) {
|
|
962
|
+
parsed.id = backfillPendingOtelSpanId(parsed);
|
|
963
|
+
}
|
|
964
|
+
entries.push(parsed);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
catch {
|
|
968
|
+
// Drop malformed lines to preserve forward progress.
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
return entries;
|
|
972
|
+
}
|
|
973
|
+
function isExpiredPendingOtelSpan(entry, cutoffMs) {
|
|
974
|
+
if (typeof entry.enqueued_at !== "string" || entry.enqueued_at.trim().length === 0) {
|
|
975
|
+
return false;
|
|
976
|
+
}
|
|
977
|
+
const enqueuedAtMs = Date.parse(entry.enqueued_at);
|
|
978
|
+
if (Number.isNaN(enqueuedAtMs)) {
|
|
979
|
+
return false;
|
|
980
|
+
}
|
|
981
|
+
return enqueuedAtMs < cutoffMs;
|
|
982
|
+
}
|
|
983
|
+
function prunePendingOtelSpans(entries, retentionDays) {
|
|
984
|
+
const cutoffMs = retentionCutoffMs(retentionDays);
|
|
985
|
+
const retained = [];
|
|
986
|
+
let prunedCount = 0;
|
|
987
|
+
for (const entry of entries) {
|
|
988
|
+
const oversized = JSON.stringify(entry).length > TELEMETRY_MAX_EVENT_BYTES;
|
|
989
|
+
if (oversized || isExpiredPendingOtelSpan(entry, cutoffMs) || entry.attempts >= TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS) {
|
|
990
|
+
prunedCount += 1;
|
|
991
|
+
continue;
|
|
992
|
+
}
|
|
993
|
+
retained.push(entry);
|
|
994
|
+
}
|
|
995
|
+
if (retained.length > TELEMETRY_OTEL_SPANS_MAX_PENDING) {
|
|
996
|
+
const overflow = retained.length - TELEMETRY_OTEL_SPANS_MAX_PENDING;
|
|
997
|
+
prunedCount += overflow;
|
|
998
|
+
// Keep the most recently enqueued spans; oldest beyond the cap are dropped.
|
|
999
|
+
return { entries: retained.slice(overflow), prunedCount };
|
|
1000
|
+
}
|
|
1001
|
+
return { entries: retained, prunedCount };
|
|
1002
|
+
}
|
|
1003
|
+
async function rewritePendingOtelSpans(globalPmRoot, entries) {
|
|
1004
|
+
const serialized = entries.map((entry) => JSON.stringify(entry)).join("\n");
|
|
1005
|
+
const contents = serialized.length > 0 ? `${serialized}\n` : "";
|
|
1006
|
+
for (let attempt = 0;; attempt += 1) {
|
|
1007
|
+
try {
|
|
1008
|
+
await writeFileAtomic(otelSpansQueuePath(globalPmRoot), contents);
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
catch (error) {
|
|
1012
|
+
const retryDelay = TELEMETRY_QUEUE_REWRITE_RETRY_DELAYS_MS[attempt];
|
|
1013
|
+
if (retryDelay === undefined || !isRetryableQueueRewriteError(error)) {
|
|
1014
|
+
throw error;
|
|
1015
|
+
}
|
|
1016
|
+
await sleep(retryDelay);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Drain the pending OTLP span queue and POST due spans to their traces endpoint.
|
|
1022
|
+
* Runs only inside the flush worker (detached child) or the inline test path, so
|
|
1023
|
+
* the foreground command never makes OTLP network calls. Failures increment
|
|
1024
|
+
* per-span attempts with backoff and are retried by a later flush; runtime state
|
|
1025
|
+
* records OTLP export diagnostics for `pm health` (GH-205).
|
|
1026
|
+
*/
|
|
1027
|
+
/**
|
|
1028
|
+
* Re-read the spans queue under the mutation serializer and rewrite it with the
|
|
1029
|
+
* processed spans removed/updated by id, preserving any spans a concurrent
|
|
1030
|
+
* foreground process appended during the (network) flush window. `succeededIds`
|
|
1031
|
+
* are dropped; `failedUpdates` patch attempts/next_attempt_after by id; all other
|
|
1032
|
+
* (incl. newly-appended) entries are retained, then pruned. Returns the count of
|
|
1033
|
+
* spans left in the queue. Mirrors removeFlushedEntriesFromCurrentQueue.
|
|
1034
|
+
*/
|
|
1035
|
+
async function reconcilePendingOtelSpansAfterFlush(globalPmRoot, retentionDays, succeededIds, failedUpdates) {
|
|
1036
|
+
return withQueueMutation(async () => {
|
|
1037
|
+
const raw = await readFileIfExists(otelSpansQueuePath(globalPmRoot));
|
|
1038
|
+
const current = raw === null ? [] : parsePendingOtelSpanLines(raw);
|
|
1039
|
+
const reconciled = [];
|
|
1040
|
+
for (const entry of current) {
|
|
1041
|
+
if (succeededIds.has(entry.id)) {
|
|
1042
|
+
continue;
|
|
1043
|
+
}
|
|
1044
|
+
const failure = failedUpdates.get(entry.id);
|
|
1045
|
+
reconciled.push(failure ? { ...entry, attempts: failure.attempts, next_attempt_after: failure.next_attempt_after } : entry);
|
|
1046
|
+
}
|
|
1047
|
+
const { entries: retained } = prunePendingOtelSpans(reconciled, retentionDays);
|
|
1048
|
+
await rewritePendingOtelSpans(globalPmRoot, retained);
|
|
1049
|
+
return retained.length;
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
async function flushPendingOtelSpans(globalPmRoot, retentionDays) {
|
|
1053
|
+
const raw = await readFileIfExists(otelSpansQueuePath(globalPmRoot));
|
|
1054
|
+
if (raw === null || raw.trim().length === 0) {
|
|
1055
|
+
await writeRuntimeState(globalPmRoot, { pending_otel_spans: 0 });
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1058
|
+
const entries = parsePendingOtelSpanLines(raw);
|
|
1059
|
+
const { entries: retained, prunedCount } = prunePendingOtelSpans(entries, retentionDays);
|
|
1060
|
+
const due = retained.filter((entry) => isDueForRetryAt(entry.next_attempt_after)).slice(0, TELEMETRY_OTEL_SPANS_FLUSH_BATCH_SIZE);
|
|
1061
|
+
if (due.length === 0) {
|
|
1062
|
+
// Nothing to POST. Still reconcile so pruning persists, but only if pruning
|
|
1063
|
+
// actually changed the on-disk set (avoids a redundant rewrite each command).
|
|
1064
|
+
const remaining = prunedCount > 0 ? await reconcilePendingOtelSpansAfterFlush(globalPmRoot, retentionDays, new Set(), new Map()) : retained.length;
|
|
1065
|
+
await writeRuntimeState(globalPmRoot, { pending_otel_spans: remaining });
|
|
1066
|
+
return;
|
|
1067
|
+
}
|
|
1068
|
+
const attemptTime = nowIso();
|
|
1069
|
+
const succeededIds = new Set();
|
|
1070
|
+
const failedUpdates = new Map();
|
|
1071
|
+
let succeededCount = 0;
|
|
1072
|
+
let lastError;
|
|
1073
|
+
// Export the batch concurrently so a slow/blackholed collector caps the worker
|
|
1074
|
+
// at one TELEMETRY_HTTP_TIMEOUT_MS rather than batch-size x timeout — keeping it
|
|
1075
|
+
// well within the flush-lock TTL. The Set/Map/counter mutations are synchronous
|
|
1076
|
+
// and safe under Node's single-threaded event loop.
|
|
1077
|
+
await Promise.all(due.map(async (span) => {
|
|
1078
|
+
try {
|
|
1079
|
+
const response = await fetch(span.endpoint, {
|
|
1080
|
+
method: "POST",
|
|
1081
|
+
headers: { "content-type": "application/json" },
|
|
1082
|
+
body: JSON.stringify(span.payload),
|
|
1083
|
+
signal: AbortSignal.timeout(TELEMETRY_HTTP_TIMEOUT_MS),
|
|
1084
|
+
});
|
|
1085
|
+
if (!response.ok) {
|
|
1086
|
+
throw new Error(`local_otel_export_http_${response.status}`);
|
|
1087
|
+
}
|
|
1088
|
+
succeededIds.add(span.id);
|
|
1089
|
+
succeededCount += 1;
|
|
1090
|
+
}
|
|
1091
|
+
catch (error) {
|
|
1092
|
+
lastError = error instanceof Error ? sanitizeString(error.message, "redacted") : "local_otel_export_failed";
|
|
1093
|
+
const nextAttempts = span.attempts + 1;
|
|
1094
|
+
failedUpdates.set(span.id, { attempts: nextAttempts, next_attempt_after: nextRetryIso(nextAttempts) });
|
|
1095
|
+
}
|
|
1096
|
+
}));
|
|
1097
|
+
const remaining = await reconcilePendingOtelSpansAfterFlush(globalPmRoot, retentionDays, succeededIds, failedUpdates);
|
|
1098
|
+
const statePatch = {
|
|
1099
|
+
pending_otel_spans: remaining,
|
|
1100
|
+
last_otel_attempt_at: attemptTime,
|
|
1101
|
+
};
|
|
1102
|
+
if (succeededCount > 0) {
|
|
1103
|
+
statePatch.last_otel_success_at = attemptTime;
|
|
1104
|
+
}
|
|
1105
|
+
if (lastError !== undefined) {
|
|
1106
|
+
statePatch.last_otel_failure_at = attemptTime;
|
|
1107
|
+
statePatch.last_otel_failure_error = lastError;
|
|
1108
|
+
}
|
|
1109
|
+
else if (remaining === 0) {
|
|
1110
|
+
// Only clear the failure diagnostic once the queue is fully drained. A
|
|
1111
|
+
// clean batch while other (not-yet-due) spans still wait could be hiding
|
|
1112
|
+
// earlier failures; keep the last known failure until nothing is pending.
|
|
1113
|
+
statePatch.last_otel_failure_at = undefined;
|
|
1114
|
+
statePatch.last_otel_failure_error = undefined;
|
|
1115
|
+
}
|
|
1116
|
+
await writeRuntimeState(globalPmRoot, statePatch);
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Flush both telemetry artifacts under the same worker invocation: the event
|
|
1120
|
+
* ingest queue and the pending OTLP span queue. Used by the detached flush
|
|
1121
|
+
* worker and the inline (test) path so OTLP export always happens off the
|
|
1122
|
+
* foreground command's critical path.
|
|
1123
|
+
*/
|
|
1124
|
+
async function flushTelemetryArtifacts(globalPmRoot, endpoint, retentionDays) {
|
|
1125
|
+
// Isolate the two artifacts: a failure flushing the event queue (e.g. a corrupt
|
|
1126
|
+
// queue file) must not strand the OTLP span flush in the same pass, and vice
|
|
1127
|
+
// versa. Both are best effort and retried on the next dispatch.
|
|
1128
|
+
try {
|
|
1129
|
+
await flushQueue(globalPmRoot, endpoint, retentionDays);
|
|
1130
|
+
}
|
|
1131
|
+
catch {
|
|
1132
|
+
// Best effort; event-queue flush is retried on the next dispatch.
|
|
1133
|
+
}
|
|
1134
|
+
try {
|
|
1135
|
+
await flushPendingOtelSpans(globalPmRoot, retentionDays);
|
|
1136
|
+
}
|
|
1137
|
+
catch {
|
|
1138
|
+
// Best effort; span flush is retried on the next dispatch.
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
895
1141
|
async function cleanupTelemetryQueueTempOrphans(globalPmRoot, maxAgeMs = TELEMETRY_QUEUE_TMP_ORPHAN_MAX_AGE_MS) {
|
|
896
1142
|
try {
|
|
897
1143
|
const dirPath = telemetryRuntimeDirectory(globalPmRoot);
|
|
@@ -912,8 +1158,12 @@ async function cleanupTelemetryQueueTempOrphans(globalPmRoot, maxAgeMs = TELEMET
|
|
|
912
1158
|
}
|
|
913
1159
|
}
|
|
914
1160
|
async function withQueueMutation(operation) {
|
|
915
|
-
const run = _queueMutationPromise.catch(
|
|
916
|
-
|
|
1161
|
+
const run = _queueMutationPromise.catch(
|
|
1162
|
+
/* c8 ignore next */
|
|
1163
|
+
() => { }).then(operation);
|
|
1164
|
+
_queueMutationPromise = run.catch(
|
|
1165
|
+
/* c8 ignore next */
|
|
1166
|
+
() => { });
|
|
917
1167
|
return run;
|
|
918
1168
|
}
|
|
919
1169
|
async function readCurrentQueueEntries(globalPmRoot) {
|
|
@@ -976,9 +1226,7 @@ async function flushQueue(globalPmRoot, endpoint, retentionDays) {
|
|
|
976
1226
|
}
|
|
977
1227
|
const { entries: retainedEntries, prunedCount } = pruneExpiredQueueEntries(queueEntries, retentionDays);
|
|
978
1228
|
if (retainedEntries.length === 0) {
|
|
979
|
-
|
|
980
|
-
await rewriteQueue(globalPmRoot, []);
|
|
981
|
-
}
|
|
1229
|
+
await rewriteQueue(globalPmRoot, []);
|
|
982
1230
|
await writeRuntimeState(globalPmRoot, {
|
|
983
1231
|
endpoint: normalizedEndpoint,
|
|
984
1232
|
queue_entries: 0,
|
|
@@ -1046,6 +1294,7 @@ async function flushQueue(globalPmRoot, endpoint, retentionDays) {
|
|
|
1046
1294
|
last_failed_flush_at: undefined,
|
|
1047
1295
|
last_failed_flush_error: undefined,
|
|
1048
1296
|
});
|
|
1297
|
+
/* c8 ignore start */
|
|
1049
1298
|
}
|
|
1050
1299
|
catch (error) {
|
|
1051
1300
|
const errorMessage = (() => {
|
|
@@ -1063,6 +1312,7 @@ async function flushQueue(globalPmRoot, endpoint, retentionDays) {
|
|
|
1063
1312
|
last_failed_flush_error: errorMessage,
|
|
1064
1313
|
});
|
|
1065
1314
|
}
|
|
1315
|
+
/* c8 ignore stop */
|
|
1066
1316
|
}
|
|
1067
1317
|
async function acquireTelemetryFlushLock(globalPmRoot) {
|
|
1068
1318
|
const lockPath = flushLockPath(globalPmRoot);
|
|
@@ -1126,6 +1376,7 @@ function createDirectoryLock(lockPath) {
|
|
|
1126
1376
|
return false;
|
|
1127
1377
|
}
|
|
1128
1378
|
}
|
|
1379
|
+
/* c8 ignore start */
|
|
1129
1380
|
try {
|
|
1130
1381
|
mkdirSync(path.dirname(lockPath), { recursive: true });
|
|
1131
1382
|
mkdirSync(lockPath);
|
|
@@ -1134,6 +1385,7 @@ function createDirectoryLock(lockPath) {
|
|
|
1134
1385
|
catch {
|
|
1135
1386
|
return false;
|
|
1136
1387
|
}
|
|
1388
|
+
/* c8 ignore stop */
|
|
1137
1389
|
}
|
|
1138
1390
|
function acquireTelemetryFlushSpawnGate(globalPmRoot) {
|
|
1139
1391
|
if (isFreshDirectoryLock(flushLockPath(globalPmRoot), TELEMETRY_FLUSH_LOCK_STALE_MS)) {
|
|
@@ -1158,9 +1410,67 @@ function releaseTelemetryFlushSpawnGate(globalPmRoot) {
|
|
|
1158
1410
|
}
|
|
1159
1411
|
export const _testOnly = {
|
|
1160
1412
|
acquireTelemetryFlushSpawnGate,
|
|
1413
|
+
acquireTelemetryFlushLock,
|
|
1414
|
+
buildCommandErrorPayload,
|
|
1415
|
+
buildCommandFinishPayload,
|
|
1416
|
+
buildCommandStartPayload,
|
|
1417
|
+
buildOtelSpanRequest,
|
|
1418
|
+
createDirectoryLock,
|
|
1419
|
+
enqueuePendingOtelSpan,
|
|
1420
|
+
enqueueTelemetryEvent,
|
|
1421
|
+
errorCode,
|
|
1422
|
+
flushPendingOtelSpans,
|
|
1423
|
+
flushQueue,
|
|
1424
|
+
flushQueueWithProcessLock,
|
|
1425
|
+
flushTelemetryArtifacts,
|
|
1426
|
+
hashTelemetryErrorFingerprint,
|
|
1427
|
+
hashTelemetryValue,
|
|
1428
|
+
isEmailDomainCharacter,
|
|
1429
|
+
isEmailLocalCharacter,
|
|
1430
|
+
isExpiredPendingOtelSpan,
|
|
1431
|
+
isExpiredQueueEntry,
|
|
1432
|
+
isFreshDirectoryLock,
|
|
1433
|
+
isDueForRetry,
|
|
1434
|
+
isDueForRetryAt,
|
|
1435
|
+
isRetryableQueueRewriteError,
|
|
1436
|
+
looksLikeEmailToken,
|
|
1437
|
+
otelSpansQueuePath,
|
|
1438
|
+
parseBooleanTrueLike,
|
|
1439
|
+
parsePendingOtelSpanLines,
|
|
1440
|
+
prunePendingOtelSpans,
|
|
1441
|
+
reconcilePendingOtelSpansAfterFlush,
|
|
1442
|
+
retentionCutoffMs,
|
|
1443
|
+
resolveOtelTracesEndpoint,
|
|
1444
|
+
rewritePendingOtelSpans,
|
|
1445
|
+
normalizeForHash,
|
|
1446
|
+
normalizeCaptureLevel,
|
|
1447
|
+
normalizePmVersion,
|
|
1448
|
+
normalizeTelemetryErrorCategory,
|
|
1449
|
+
normalizeTelemetryErrorCode,
|
|
1450
|
+
normalizeTelemetryExitCode,
|
|
1451
|
+
parseQueueLines,
|
|
1452
|
+
pruneExpiredQueueEntries,
|
|
1453
|
+
readRuntimeState,
|
|
1454
|
+
readCurrentQueueEntries,
|
|
1161
1455
|
releaseTelemetryFlushSpawnGate,
|
|
1456
|
+
removeFlushedEntriesFromCurrentQueue,
|
|
1457
|
+
removeDirectoryLockBestEffort,
|
|
1458
|
+
resolveTelemetrySourceContext,
|
|
1459
|
+
rewriteQueue,
|
|
1460
|
+
sanitizeCommandArgs,
|
|
1461
|
+
sanitizeStringMax,
|
|
1462
|
+
sanitizeStringRedacted,
|
|
1463
|
+
sanitizeValue,
|
|
1464
|
+
scheduleTelemetryFlush,
|
|
1465
|
+
shouldFlushInline,
|
|
1466
|
+
sleep,
|
|
1467
|
+
summarizeResult,
|
|
1468
|
+
telemetryFlushRunnerPath,
|
|
1469
|
+
withQueueMutation,
|
|
1162
1470
|
flushLockPath,
|
|
1163
1471
|
flushSpawnLockPath,
|
|
1472
|
+
runtimeStatePath,
|
|
1473
|
+
writeRuntimeState,
|
|
1164
1474
|
};
|
|
1165
1475
|
async function flushQueueWithProcessLock(globalPmRoot, endpoint, retentionDays) {
|
|
1166
1476
|
const acquired = await acquireTelemetryFlushLock(globalPmRoot);
|
|
@@ -1169,16 +1479,21 @@ async function flushQueueWithProcessLock(globalPmRoot, endpoint, retentionDays)
|
|
|
1169
1479
|
return;
|
|
1170
1480
|
}
|
|
1171
1481
|
try {
|
|
1172
|
-
await
|
|
1482
|
+
await flushTelemetryArtifacts(globalPmRoot, endpoint, retentionDays);
|
|
1173
1483
|
}
|
|
1174
1484
|
finally {
|
|
1175
|
-
|
|
1485
|
+
try {
|
|
1486
|
+
await rm(flushLockPath(globalPmRoot), { recursive: true, force: true });
|
|
1487
|
+
}
|
|
1488
|
+
catch {
|
|
1489
|
+
// Best effort lock cleanup; stale locks are recovered by TTL checks.
|
|
1490
|
+
}
|
|
1176
1491
|
}
|
|
1177
1492
|
}
|
|
1178
1493
|
function scheduleTelemetryFlush(globalPmRoot, endpoint, retentionDays) {
|
|
1179
1494
|
if (shouldFlushInline()) {
|
|
1180
1495
|
const previousFlush = _lastFlushPromise;
|
|
1181
|
-
const nextFlush =
|
|
1496
|
+
const nextFlush = flushTelemetryArtifacts(globalPmRoot, endpoint, retentionDays);
|
|
1182
1497
|
_lastFlushPromise = Promise.allSettled([previousFlush, nextFlush]).then(() => { });
|
|
1183
1498
|
return;
|
|
1184
1499
|
}
|
|
@@ -1342,13 +1657,19 @@ export async function finishTelemetryCommand(activeCommand, outcome) {
|
|
|
1342
1657
|
}),
|
|
1343
1658
|
};
|
|
1344
1659
|
await enqueueTelemetryEvent(activeCommand.global_pm_root, event);
|
|
1345
|
-
|
|
1346
|
-
void exportLocalOtelSpan(activeCommand, {
|
|
1660
|
+
const otelRequest = buildOtelSpanRequest(activeCommand, {
|
|
1347
1661
|
...outcome,
|
|
1348
1662
|
exit_code: normalizedExitCode,
|
|
1349
1663
|
error_code: normalizedErrorCode,
|
|
1350
1664
|
error_category: normalizedErrorCategory,
|
|
1351
|
-
}, finishedAt, durationMs)
|
|
1665
|
+
}, finishedAt, durationMs);
|
|
1666
|
+
if (otelRequest) {
|
|
1667
|
+
// Persist the span for the detached worker; never POST inline so the
|
|
1668
|
+
// foreground command exits promptly even if the traces endpoint is
|
|
1669
|
+
// unreachable (GH-209).
|
|
1670
|
+
await enqueuePendingOtelSpan(activeCommand.global_pm_root, otelRequest);
|
|
1671
|
+
}
|
|
1672
|
+
scheduleTelemetryFlush(activeCommand.global_pm_root, activeCommand.endpoint, activeCommand.retention_days);
|
|
1352
1673
|
}
|
|
1353
1674
|
catch {
|
|
1354
1675
|
// Telemetry must never block command execution.
|
|
@@ -1376,7 +1697,7 @@ export async function emitTelemetryErrorEvent(context) {
|
|
|
1376
1697
|
errorCode: context.error_code,
|
|
1377
1698
|
errorMessage: context.error_message,
|
|
1378
1699
|
exitCode: context.exit_code,
|
|
1379
|
-
}))
|
|
1700
|
+
}));
|
|
1380
1701
|
const normalizedErrorCategory = context.error_category ?? resolveTelemetryErrorCategory(normalizedErrorCode);
|
|
1381
1702
|
const normalizedExitCode = normalizeTelemetryExitCode(context.exit_code, false);
|
|
1382
1703
|
const normalizedCommand = context.command.trim().length > 0 ? context.command : "<unknown>";
|
|
@@ -1423,4 +1744,4 @@ export async function emitTelemetryErrorEvent(context) {
|
|
|
1423
1744
|
}
|
|
1424
1745
|
}
|
|
1425
1746
|
//# sourceMappingURL=runtime.js.map
|
|
1426
|
-
//# debugId=
|
|
1747
|
+
//# debugId=0499331c-7c90-573a-9b07-2437c7ac8072
|