waterplane 0.1.6 → 0.1.14
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 +146 -1
- package/README.md +47 -24
- package/SECURITY.md +11 -3
- package/deploy/node-version +1 -1
- package/node_modules/@waterplane/shared/dist/agentfiles.d.ts +17 -0
- package/node_modules/@waterplane/shared/dist/agentfiles.js +60 -5
- package/node_modules/@waterplane/shared/dist/agentfiles.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/alwaysonwords.d.ts +83 -0
- package/node_modules/@waterplane/shared/dist/alwaysonwords.js +215 -0
- package/node_modules/@waterplane/shared/dist/alwaysonwords.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/assess/sasswords.js +4 -0
- package/node_modules/@waterplane/shared/dist/assess/sasswords.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/autocompact.js +3 -2
- package/node_modules/@waterplane/shared/dist/autocompact.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/backendsources.d.ts +11 -1
- package/node_modules/@waterplane/shared/dist/backendsources.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/branchmode.d.ts +33 -0
- package/node_modules/@waterplane/shared/dist/branchmode.js +88 -0
- package/node_modules/@waterplane/shared/dist/branchmode.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/budget.d.ts +7 -1
- package/node_modules/@waterplane/shared/dist/budget.js +11 -3
- package/node_modules/@waterplane/shared/dist/budget.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/buildstamp.d.ts +37 -0
- package/node_modules/@waterplane/shared/dist/buildstamp.js +95 -0
- package/node_modules/@waterplane/shared/dist/buildstamp.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/burn.d.ts +16 -1
- package/node_modules/@waterplane/shared/dist/burn.js +30 -0
- package/node_modules/@waterplane/shared/dist/burn.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/calday.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/calday.js +25 -0
- package/node_modules/@waterplane/shared/dist/calday.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/changebrief.d.ts +77 -0
- package/node_modules/@waterplane/shared/dist/changebrief.js +70 -0
- package/node_modules/@waterplane/shared/dist/changebrief.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/clihealth/healthrecord.js +1 -0
- package/node_modules/@waterplane/shared/dist/clihealth/healthrecord.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/costwindow.d.ts +24 -5
- package/node_modules/@waterplane/shared/dist/costwindow.js +35 -15
- package/node_modules/@waterplane/shared/dist/costwindow.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/desktopfiles.d.ts +100 -0
- package/node_modules/@waterplane/shared/dist/desktopfiles.js +192 -0
- package/node_modules/@waterplane/shared/dist/desktopfiles.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/exposure.d.ts +175 -0
- package/node_modules/@waterplane/shared/dist/exposure.js +357 -0
- package/node_modules/@waterplane/shared/dist/exposure.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/exposurepush.d.ts +60 -0
- package/node_modules/@waterplane/shared/dist/exposurepush.js +103 -0
- package/node_modules/@waterplane/shared/dist/exposurepush.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/commits.d.ts +26 -0
- package/node_modules/@waterplane/shared/dist/healthindex/commits.js +57 -0
- package/node_modules/@waterplane/shared/dist/healthindex/commits.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/move.d.ts +25 -0
- package/node_modules/@waterplane/shared/dist/healthindex/move.js +79 -0
- package/node_modules/@waterplane/shared/dist/healthindex/move.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/readings.d.ts +53 -0
- package/node_modules/@waterplane/shared/dist/healthindex/readings.js +154 -0
- package/node_modules/@waterplane/shared/dist/healthindex/readings.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.d.ts +41 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js +19 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/score.d.ts +26 -0
- package/node_modules/@waterplane/shared/dist/healthindex/score.js +156 -0
- package/node_modules/@waterplane/shared/dist/healthindex/score.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/types.d.ts +206 -0
- package/node_modules/@waterplane/shared/dist/healthindex/types.js +58 -0
- package/node_modules/@waterplane/shared/dist/healthindex/types.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/vs.d.ts +26 -0
- package/node_modules/@waterplane/shared/dist/healthindex/vs.js +38 -0
- package/node_modules/@waterplane/shared/dist/healthindex/vs.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/words.d.ts +28 -0
- package/node_modules/@waterplane/shared/dist/healthindex/words.js +124 -0
- package/node_modules/@waterplane/shared/dist/healthindex/words.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex.d.ts +15 -411
- package/node_modules/@waterplane/shared/dist/healthindex.js +8 -602
- package/node_modules/@waterplane/shared/dist/healthindex.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/hints.js +15 -0
- package/node_modules/@waterplane/shared/dist/hints.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/index.d.ts +37 -0
- package/node_modules/@waterplane/shared/dist/index.js +37 -0
- package/node_modules/@waterplane/shared/dist/index.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/clean.d.ts +87 -0
- package/node_modules/@waterplane/shared/dist/intent/clean.js +51 -3
- package/node_modules/@waterplane/shared/dist/intent/clean.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/kind.d.ts +40 -1
- package/node_modules/@waterplane/shared/dist/intent/kind.js +36 -3
- package/node_modules/@waterplane/shared/dist/intent/kind.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/types.d.ts +13 -0
- package/node_modules/@waterplane/shared/dist/intent/types.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/verdict.js +9 -16
- package/node_modules/@waterplane/shared/dist/intent/verdict.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/words.js +5 -0
- package/node_modules/@waterplane/shared/dist/intent/words.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent.d.ts +2 -2
- package/node_modules/@waterplane/shared/dist/intent.js +2 -2
- package/node_modules/@waterplane/shared/dist/intent.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/launchmodes.d.ts +2 -0
- package/node_modules/@waterplane/shared/dist/launchmodes.js +12 -0
- package/node_modules/@waterplane/shared/dist/launchmodes.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/ledgerspan.d.ts +106 -0
- package/node_modules/@waterplane/shared/dist/ledgerspan.js +196 -0
- package/node_modules/@waterplane/shared/dist/ledgerspan.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/naming.d.ts +3 -1
- package/node_modules/@waterplane/shared/dist/naming.js +6 -2
- package/node_modules/@waterplane/shared/dist/naming.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/netfuse.d.ts +5 -0
- package/node_modules/@waterplane/shared/dist/netfuse.js +6 -1
- package/node_modules/@waterplane/shared/dist/netfuse.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/netretry.d.ts +78 -0
- package/node_modules/@waterplane/shared/dist/netretry.js +85 -0
- package/node_modules/@waterplane/shared/dist/netretry.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/netretrycfg.d.ts +12 -0
- package/node_modules/@waterplane/shared/dist/netretrycfg.js +27 -0
- package/node_modules/@waterplane/shared/dist/netretrycfg.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/nodemin.d.ts +6 -4
- package/node_modules/@waterplane/shared/dist/nodemin.js +6 -4
- package/node_modules/@waterplane/shared/dist/nodemin.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/optins.d.ts +35 -1
- package/node_modules/@waterplane/shared/dist/optins.js +39 -1
- package/node_modules/@waterplane/shared/dist/optins.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/pairing.js +4 -0
- package/node_modules/@waterplane/shared/dist/pairing.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/passive.js +3 -0
- package/node_modules/@waterplane/shared/dist/passive.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/plugin/api.d.ts +394 -0
- package/node_modules/@waterplane/shared/dist/plugin/api.js +2 -0
- package/node_modules/@waterplane/shared/dist/plugin/api.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/backend.d.ts +197 -0
- package/node_modules/@waterplane/shared/dist/plugin/backend.js +9 -0
- package/node_modules/@waterplane/shared/dist/plugin/backend.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/manifest.d.ts +160 -0
- package/node_modules/@waterplane/shared/dist/plugin/manifest.js +98 -0
- package/node_modules/@waterplane/shared/dist/plugin/manifest.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/module.d.ts +98 -0
- package/node_modules/@waterplane/shared/dist/plugin/module.js +13 -0
- package/node_modules/@waterplane/shared/dist/plugin/module.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/version.d.ts +66 -0
- package/node_modules/@waterplane/shared/dist/plugin/version.js +86 -0
- package/node_modules/@waterplane/shared/dist/plugin/version.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin.d.ts +5 -867
- package/node_modules/@waterplane/shared/dist/plugin.js +27 -186
- package/node_modules/@waterplane/shared/dist/plugin.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/pluginlaunch.d.ts +7 -0
- package/node_modules/@waterplane/shared/dist/prview.d.ts +23 -0
- package/node_modules/@waterplane/shared/dist/prview.js +107 -0
- package/node_modules/@waterplane/shared/dist/prview.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/queue/queueserial.d.ts +11 -2
- package/node_modules/@waterplane/shared/dist/queue/queueserial.js +13 -4
- package/node_modules/@waterplane/shared/dist/queue/queueserial.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/queue/queuewords.js +1 -0
- package/node_modules/@waterplane/shared/dist/queue/queuewords.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/repohealth.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/repohealth.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/repotwins.d.ts +31 -0
- package/node_modules/@waterplane/shared/dist/repotwins.js +52 -0
- package/node_modules/@waterplane/shared/dist/repotwins.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/requirements.js +4 -1
- package/node_modules/@waterplane/shared/dist/requirements.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule/schedaction.d.ts +29 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedaction.js +22 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedaction.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule/schedclean.js +26 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedclean.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.d.ts +1 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.js +1 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule.d.ts +1 -1
- package/node_modules/@waterplane/shared/dist/schedule.js +1 -1
- package/node_modules/@waterplane/shared/dist/schedule.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/sessionbudget.d.ts +34 -7
- package/node_modules/@waterplane/shared/dist/sessionbudget.js +59 -21
- package/node_modules/@waterplane/shared/dist/sessionbudget.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/sweep.d.ts +2 -1
- package/node_modules/@waterplane/shared/dist/sweep.js +2 -1
- package/node_modules/@waterplane/shared/dist/sweep.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/tokens.d.ts +4 -3
- package/node_modules/@waterplane/shared/dist/tokens.js +9 -7
- package/node_modules/@waterplane/shared/dist/tokens.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/weekburn.d.ts +144 -0
- package/node_modules/@waterplane/shared/dist/weekburn.js +250 -0
- package/node_modules/@waterplane/shared/dist/weekburn.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/alwayson.d.ts +64 -0
- package/node_modules/@waterplane/shared/dist/wire/alwayson.js +7 -0
- package/node_modules/@waterplane/shared/dist/wire/alwayson.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/backend.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/wire/backendtokens.d.ts +6 -0
- package/node_modules/@waterplane/shared/dist/wire/backendtokens.js +0 -9
- package/node_modules/@waterplane/shared/dist/wire/backendtokens.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/costwindow.d.ts +25 -0
- package/node_modules/@waterplane/shared/dist/wire/messages/clienthost.d.ts +15 -1
- package/node_modules/@waterplane/shared/dist/wire/messages/clientsession.d.ts +24 -0
- package/node_modules/@waterplane/shared/dist/wire/messages/hosttools.d.ts +12 -2
- package/node_modules/@waterplane/shared/dist/wire/notify.d.ts +194 -1
- package/node_modules/@waterplane/shared/dist/wire/notify.js +139 -1
- package/node_modules/@waterplane/shared/dist/wire/notify.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/pullrequest.d.ts +42 -0
- package/node_modules/@waterplane/shared/dist/wire/pullrequest.js +2 -0
- package/node_modules/@waterplane/shared/dist/wire/pullrequest.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/repo.d.ts +131 -0
- package/node_modules/@waterplane/shared/dist/wire/repo.js +8 -3
- package/node_modules/@waterplane/shared/dist/wire/repo.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/sent.d.ts +3 -1
- package/node_modules/@waterplane/shared/dist/wire/session/contextspark.d.ts +7 -0
- package/node_modules/@waterplane/shared/dist/wire/session/info.d.ts +4 -1
- package/node_modules/@waterplane/shared/dist/wire/session/launch.d.ts +36 -0
- package/node_modules/@waterplane/shared/dist/wire/session.d.ts +1 -1
- package/node_modules/@waterplane/shared/dist/wire/telemetry.d.ts +30 -0
- package/node_modules/@waterplane/shared/dist/wire/work.d.ts +13 -0
- package/node_modules/@waterplane/shared/dist/wire/work.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wordof.d.ts +11 -0
- package/node_modules/@waterplane/shared/dist/wordof.js +14 -0
- package/node_modules/@waterplane/shared/dist/wordof.js.map +1 -0
- package/npm-shrinkwrap.json +3 -3
- package/package.json +2 -2
- package/packages/extensions/scorecard/waterplane-plugin.json +10 -0
- package/packages/host/dist/agentexposure.d.ts +13 -0
- package/packages/host/dist/agentexposure.js +90 -0
- package/packages/host/dist/agentexposure.js.map +1 -0
- package/packages/host/dist/agentintents.js +7 -8
- package/packages/host/dist/agentintents.js.map +1 -1
- package/packages/host/dist/agentwatch.d.ts +3 -7
- package/packages/host/dist/agentwatch.js.map +1 -1
- package/packages/host/dist/alwayson.d.ts +18 -0
- package/packages/host/dist/alwayson.js +159 -0
- package/packages/host/dist/alwayson.js.map +1 -0
- package/packages/host/dist/answergate.d.ts +3 -7
- package/packages/host/dist/answergate.js.map +1 -1
- package/packages/host/dist/attentionstore.d.ts +94 -0
- package/packages/host/dist/attentionstore.js +232 -0
- package/packages/host/dist/attentionstore.js.map +1 -0
- package/packages/host/dist/backends/claude-sources.d.ts +2 -0
- package/packages/host/dist/backends/claude-sources.js +12 -0
- package/packages/host/dist/backends/claude-sources.js.map +1 -1
- package/packages/host/dist/backends/claude.js +3 -2
- package/packages/host/dist/backends/claude.js.map +1 -1
- package/packages/host/dist/backends/derive.js +1 -0
- package/packages/host/dist/backends/derive.js.map +1 -1
- package/packages/host/dist/backends/overhead.d.ts +7 -5
- package/packages/host/dist/backends/overhead.js +15 -13
- package/packages/host/dist/backends/overhead.js.map +1 -1
- package/packages/host/dist/backends/registry.js +4 -1
- package/packages/host/dist/backends/registry.js.map +1 -1
- package/packages/host/dist/backends/types.d.ts +2 -0
- package/packages/host/dist/besidespend.d.ts +22 -0
- package/packages/host/dist/besidespend.js +65 -0
- package/packages/host/dist/besidespend.js.map +1 -0
- package/packages/host/dist/boxkit.d.ts +19 -0
- package/packages/host/dist/boxkit.js +38 -0
- package/packages/host/dist/boxkit.js.map +1 -0
- package/packages/host/dist/branchrules.d.ts +14 -0
- package/packages/host/dist/branchrules.js +47 -0
- package/packages/host/dist/branchrules.js.map +1 -0
- package/packages/host/dist/budget.d.ts +3 -2
- package/packages/host/dist/budget.js +5 -3
- package/packages/host/dist/budget.js.map +1 -1
- package/packages/host/dist/builds.d.ts +31 -1
- package/packages/host/dist/builds.js +55 -3
- package/packages/host/dist/builds.js.map +1 -1
- package/packages/host/dist/buildversions.d.ts +2 -0
- package/packages/host/dist/buildversions.js +36 -0
- package/packages/host/dist/buildversions.js.map +1 -0
- package/packages/host/dist/burnwatch.d.ts +23 -11
- package/packages/host/dist/burnwatch.js +57 -3
- package/packages/host/dist/burnwatch.js.map +1 -1
- package/packages/host/dist/changebrief.d.ts +37 -0
- package/packages/host/dist/changebrief.js +157 -0
- package/packages/host/dist/changebrief.js.map +1 -0
- package/packages/host/dist/cli/index.js +1 -1
- package/packages/host/dist/cli/index.js.map +1 -1
- package/packages/host/dist/clihealth.d.ts +2 -0
- package/packages/host/dist/clihealth.js +11 -2
- package/packages/host/dist/clihealth.js.map +1 -1
- package/packages/host/dist/compliance.d.ts +5 -1
- package/packages/host/dist/compliance.js +70 -31
- package/packages/host/dist/compliance.js.map +1 -1
- package/packages/host/dist/composer.d.ts +3 -1
- package/packages/host/dist/composer.js +3 -1
- package/packages/host/dist/composer.js.map +1 -1
- package/packages/host/dist/context.js +29 -4
- package/packages/host/dist/context.js.map +1 -1
- package/packages/host/dist/convlog.d.ts +1 -1
- package/packages/host/dist/convlog.js +1 -1
- package/packages/host/dist/costwindow.d.ts +25 -0
- package/packages/host/dist/costwindow.js +63 -1
- package/packages/host/dist/costwindow.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxagents.js +16 -25
- package/packages/host/dist/ctxlog/ctxagents.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxcursor.d.ts +36 -1
- package/packages/host/dist/ctxlog/ctxcursor.js +96 -2
- package/packages/host/dist/ctxlog/ctxcursor.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxproject.js +2 -1
- package/packages/host/dist/ctxlog/ctxproject.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxupdate.js +30 -24
- package/packages/host/dist/ctxlog/ctxupdate.js.map +1 -1
- package/packages/host/dist/ctxlog/usagerecord.d.ts +28 -0
- package/packages/host/dist/ctxlog/usagerecord.js +81 -0
- package/packages/host/dist/ctxlog/usagerecord.js.map +1 -0
- package/packages/host/dist/diskwatch.d.ts +4 -6
- package/packages/host/dist/diskwatch.js +3 -1
- package/packages/host/dist/diskwatch.js.map +1 -1
- package/packages/host/dist/eraseen.d.ts +6 -0
- package/packages/host/dist/eraseen.js +100 -0
- package/packages/host/dist/eraseen.js.map +1 -0
- package/packages/host/dist/explainjob.d.ts +24 -0
- package/packages/host/dist/explainjob.js +80 -0
- package/packages/host/dist/explainjob.js.map +1 -0
- package/packages/host/dist/exposure.d.ts +56 -0
- package/packages/host/dist/exposure.js +371 -0
- package/packages/host/dist/exposure.js.map +1 -0
- package/packages/host/dist/exposurepush.d.ts +28 -0
- package/packages/host/dist/exposurepush.js +136 -0
- package/packages/host/dist/exposurepush.js.map +1 -0
- package/packages/host/dist/exposurerun.d.ts +18 -0
- package/packages/host/dist/exposurerun.js +126 -0
- package/packages/host/dist/exposurerun.js.map +1 -0
- package/packages/host/dist/exposurewatch.d.ts +29 -0
- package/packages/host/dist/exposurewatch.js +127 -0
- package/packages/host/dist/exposurewatch.js.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/engine.d.mts +54 -0
- package/packages/host/dist/extensions/scorecard/host/engine.mjs +303 -0
- package/packages/host/dist/extensions/scorecard/host/engine.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/gitslug.d.mts +5 -0
- package/packages/host/dist/extensions/scorecard/host/gitslug.mjs +45 -0
- package/packages/host/dist/extensions/scorecard/host/gitslug.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/index.d.mts +15 -0
- package/packages/host/dist/extensions/scorecard/host/index.mjs +47 -0
- package/packages/host/dist/extensions/scorecard/host/index.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/store.d.mts +12 -0
- package/packages/host/dist/extensions/scorecard/host/store.mjs +91 -0
- package/packages/host/dist/extensions/scorecard/host/store.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/shared/logic.d.mts +42 -0
- package/packages/host/dist/extensions/scorecard/shared/logic.mjs +170 -0
- package/packages/host/dist/extensions/scorecard/shared/logic.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/shared/wire.d.mts +140 -0
- package/packages/host/dist/extensions/scorecard/shared/wire.mjs +29 -0
- package/packages/host/dist/extensions/scorecard/shared/wire.mjs.map +1 -0
- package/packages/host/dist/files.d.ts +14 -12
- package/packages/host/dist/files.js +64 -94
- package/packages/host/dist/files.js.map +1 -1
- package/packages/host/dist/forge/github.d.ts +3 -0
- package/packages/host/dist/forge/github.js +96 -0
- package/packages/host/dist/forge/github.js.map +1 -0
- package/packages/host/dist/forge/index.d.ts +14 -0
- package/packages/host/dist/forge/index.js +32 -0
- package/packages/host/dist/forge/index.js.map +1 -0
- package/packages/host/dist/forge/types.d.ts +58 -0
- package/packages/host/dist/forge/types.js +2 -0
- package/packages/host/dist/forge/types.js.map +1 -0
- package/packages/host/dist/git.d.ts +41 -16
- package/packages/host/dist/git.js +162 -101
- package/packages/host/dist/git.js.map +1 -1
- package/packages/host/dist/gitnotify.d.ts +54 -0
- package/packages/host/dist/gitnotify.js +167 -0
- package/packages/host/dist/gitnotify.js.map +1 -0
- package/packages/host/dist/healthwatch.d.ts +2 -1
- package/packages/host/dist/healthwatch.js +4 -2
- package/packages/host/dist/healthwatch.js.map +1 -1
- package/packages/host/dist/hoststore.js +2 -2
- package/packages/host/dist/hoststore.js.map +1 -1
- package/packages/host/dist/intents/adapters.js +68 -19
- package/packages/host/dist/intents/adapters.js.map +1 -1
- package/packages/host/dist/intents/clock.d.ts +6 -3
- package/packages/host/dist/intents/clock.js +19 -5
- package/packages/host/dist/intents/clock.js.map +1 -1
- package/packages/host/dist/intents/contract.d.ts +15 -5
- package/packages/host/dist/intents/contract.js.map +1 -1
- package/packages/host/dist/intents/disk.d.ts +16 -0
- package/packages/host/dist/intents/disk.js +26 -1
- package/packages/host/dist/intents/disk.js.map +1 -1
- package/packages/host/dist/intents/fire.js +7 -1
- package/packages/host/dist/intents/fire.js.map +1 -1
- package/packages/host/dist/intents/ladder.js +3 -1
- package/packages/host/dist/intents/ladder.js.map +1 -1
- package/packages/host/dist/intents/manager.d.ts +3 -3
- package/packages/host/dist/intents/manager.js +2 -2
- package/packages/host/dist/intents/manager.js.map +1 -1
- package/packages/host/dist/intents/watch.d.ts +27 -3
- package/packages/host/dist/intents/watch.js +70 -9
- package/packages/host/dist/intents/watch.js.map +1 -1
- package/packages/host/dist/intents/write.d.ts +28 -1
- package/packages/host/dist/intents/write.js +87 -2
- package/packages/host/dist/intents/write.js.map +1 -1
- package/packages/host/dist/localcistatus.d.ts +22 -0
- package/packages/host/dist/localcistatus.js +105 -0
- package/packages/host/dist/localcistatus.js.map +1 -0
- package/packages/host/dist/main.js +45 -12
- package/packages/host/dist/main.js.map +1 -1
- package/packages/host/dist/net.d.ts +2 -0
- package/packages/host/dist/net.js +11 -2
- package/packages/host/dist/net.js.map +1 -1
- package/packages/host/dist/netlog.d.ts +40 -0
- package/packages/host/dist/netlog.js +165 -0
- package/packages/host/dist/netlog.js.map +1 -0
- package/packages/host/dist/netretrycfg.d.ts +7 -0
- package/packages/host/dist/netretrycfg.js +51 -0
- package/packages/host/dist/netretrycfg.js.map +1 -0
- package/packages/host/dist/notifyprefs.d.ts +6 -2
- package/packages/host/dist/notifyprefs.js +20 -5
- package/packages/host/dist/notifyprefs.js.map +1 -1
- package/packages/host/dist/notifytypes.d.ts +63 -0
- package/packages/host/dist/notifytypes.js +2 -0
- package/packages/host/dist/notifytypes.js.map +1 -0
- package/packages/host/dist/opendeliveries.js +24 -0
- package/packages/host/dist/opendeliveries.js.map +1 -1
- package/packages/host/dist/optins.d.ts +28 -1
- package/packages/host/dist/optins.js +96 -4
- package/packages/host/dist/optins.js.map +1 -1
- package/packages/host/dist/peers/agentpeer.js +1 -1
- package/packages/host/dist/peers/agentpeer.js.map +1 -1
- package/packages/host/dist/peers/jobs.d.ts +2 -4
- package/packages/host/dist/peers/jobs.js +6 -1
- package/packages/host/dist/peers/jobs.js.map +1 -1
- package/packages/host/dist/periodspend.d.ts +22 -3
- package/packages/host/dist/periodspend.js +44 -4
- package/packages/host/dist/periodspend.js.map +1 -1
- package/packages/host/dist/plugins/pluginapi.js +40 -10
- package/packages/host/dist/plugins/pluginapi.js.map +1 -1
- package/packages/host/dist/plugins/pluginregistry.d.ts +3 -8
- package/packages/host/dist/plugins/pluginregistry.js +1 -1
- package/packages/host/dist/plugins/pluginregistry.js.map +1 -1
- package/packages/host/dist/plugins/plugintoolkit/sessionof.d.ts +47 -0
- package/packages/host/dist/plugins/plugintoolkit/sessionof.js +136 -0
- package/packages/host/dist/plugins/plugintoolkit/sessionof.js.map +1 -0
- package/packages/host/dist/prmergestore.d.ts +31 -0
- package/packages/host/dist/prmergestore.js +106 -0
- package/packages/host/dist/prmergestore.js.map +1 -0
- package/packages/host/dist/protectmain.d.ts +35 -0
- package/packages/host/dist/protectmain.js +73 -0
- package/packages/host/dist/protectmain.js.map +1 -0
- package/packages/host/dist/prpush.d.ts +38 -0
- package/packages/host/dist/prpush.js +351 -0
- package/packages/host/dist/prpush.js.map +1 -0
- package/packages/host/dist/prs.d.ts +118 -0
- package/packages/host/dist/prs.js +681 -0
- package/packages/host/dist/prs.js.map +1 -0
- package/packages/host/dist/push.d.ts +85 -1
- package/packages/host/dist/push.js +238 -8
- package/packages/host/dist/push.js.map +1 -1
- package/packages/host/dist/pushlanded.d.ts +29 -0
- package/packages/host/dist/pushlanded.js +61 -0
- package/packages/host/dist/pushlanded.js.map +1 -0
- package/packages/host/dist/pushreach.d.ts +9 -0
- package/packages/host/dist/pushreach.js +102 -0
- package/packages/host/dist/pushreach.js.map +1 -0
- package/packages/host/dist/pushverdict.d.ts +42 -0
- package/packages/host/dist/pushverdict.js +110 -0
- package/packages/host/dist/pushverdict.js.map +1 -0
- package/packages/host/dist/render.d.ts +57 -0
- package/packages/host/dist/render.js +57 -39
- package/packages/host/dist/render.js.map +1 -1
- package/packages/host/dist/repohealth.js +5 -2
- package/packages/host/dist/repohealth.js.map +1 -1
- package/packages/host/dist/repohealthapproval.d.ts +3 -0
- package/packages/host/dist/repohealthapproval.js +92 -2
- package/packages/host/dist/repohealthapproval.js.map +1 -1
- package/packages/host/dist/repos.d.ts +7 -1
- package/packages/host/dist/repos.js +30 -3
- package/packages/host/dist/repos.js.map +1 -1
- package/packages/host/dist/reposkill.d.ts +8 -5
- package/packages/host/dist/reposkill.js +16 -11
- package/packages/host/dist/reposkill.js.map +1 -1
- package/packages/host/dist/reposkilltext.d.ts +8 -1
- package/packages/host/dist/reposkilltext.js +85 -12
- package/packages/host/dist/reposkilltext.js.map +1 -1
- package/packages/host/dist/routes/apigitspend.d.ts +2 -0
- package/packages/host/dist/routes/apigitspend.js +40 -0
- package/packages/host/dist/routes/apigitspend.js.map +1 -0
- package/packages/host/dist/routes/apihost.js +17 -0
- package/packages/host/dist/routes/apihost.js.map +1 -1
- package/packages/host/dist/routes/apiprs.d.ts +2 -0
- package/packages/host/dist/routes/apiprs.js +47 -0
- package/packages/host/dist/routes/apiprs.js.map +1 -0
- package/packages/host/dist/routes/apirepofiles.js +13 -1
- package/packages/host/dist/routes/apirepofiles.js.map +1 -1
- package/packages/host/dist/routes/apirepowork.d.ts +6 -0
- package/packages/host/dist/routes/apirepowork.js +42 -33
- package/packages/host/dist/routes/apirepowork.js.map +1 -1
- package/packages/host/dist/routes/apiroutes.js +2 -1
- package/packages/host/dist/routes/apiroutes.js.map +1 -1
- package/packages/host/dist/routes/apisession.js +24 -0
- package/packages/host/dist/routes/apisession.js.map +1 -1
- package/packages/host/dist/routes/apistats.js +12 -7
- package/packages/host/dist/routes/apistats.js.map +1 -1
- package/packages/host/dist/routes/apisystem.js +23 -1
- package/packages/host/dist/routes/apisystem.js.map +1 -1
- package/packages/host/dist/routes/apitable.d.ts +10 -0
- package/packages/host/dist/routes/apitable.js.map +1 -1
- package/packages/host/dist/routes/apiweekburn.d.ts +2 -0
- package/packages/host/dist/routes/apiweekburn.js +30 -0
- package/packages/host/dist/routes/apiweekburn.js.map +1 -0
- package/packages/host/dist/routes/session.js +10 -0
- package/packages/host/dist/routes/session.js.map +1 -1
- package/packages/host/dist/routes/system.js +34 -6
- package/packages/host/dist/routes/system.js.map +1 -1
- package/packages/host/dist/routes/types.d.ts +29 -21
- package/packages/host/dist/routes/work/workbuild.js +3 -2
- package/packages/host/dist/routes/work/workbuild.js.map +1 -1
- package/packages/host/dist/routes/work/workintent.js +6 -2
- package/packages/host/dist/routes/work/workintent.js.map +1 -1
- package/packages/host/dist/routes/work/workschedule.js +33 -3
- package/packages/host/dist/routes/work/workschedule.js.map +1 -1
- package/packages/host/dist/screenlog.d.ts +20 -0
- package/packages/host/dist/screenlog.js +40 -0
- package/packages/host/dist/screenlog.js.map +1 -1
- package/packages/host/dist/server/billingwire.d.ts +3 -1
- package/packages/host/dist/server/billingwire.js +4 -2
- package/packages/host/dist/server/billingwire.js.map +1 -1
- package/packages/host/dist/server/clients.d.ts +14 -24
- package/packages/host/dist/server/clients.js +81 -11
- package/packages/host/dist/server/clients.js.map +1 -1
- package/packages/host/dist/server/ctx.d.ts +2 -0
- package/packages/host/dist/server/ctxseal.d.ts +1 -1
- package/packages/host/dist/server/ctxseal.js +6 -6
- package/packages/host/dist/server/ctxseal.js.map +1 -1
- package/packages/host/dist/server/deliveries.js +4 -2
- package/packages/host/dist/server/deliveries.js.map +1 -1
- package/packages/host/dist/server/http.js +2 -2
- package/packages/host/dist/server/http.js.map +1 -1
- package/packages/host/dist/server/intentDeps.js +13 -6
- package/packages/host/dist/server/intentDeps.js.map +1 -1
- package/packages/host/dist/server/intentEvents.js +9 -4
- package/packages/host/dist/server/intentEvents.js.map +1 -1
- package/packages/host/dist/server/scan.js +23 -1
- package/packages/host/dist/server/scan.js.map +1 -1
- package/packages/host/dist/server/sessionEvents.js +40 -15
- package/packages/host/dist/server/sessionEvents.js.map +1 -1
- package/packages/host/dist/server/shutdown.d.ts +3 -1
- package/packages/host/dist/server/shutdown.js +9 -1
- package/packages/host/dist/server/shutdown.js.map +1 -1
- package/packages/host/dist/sessionbudget.d.ts +2 -0
- package/packages/host/dist/sessionbudget.js +17 -6
- package/packages/host/dist/sessionbudget.js.map +1 -1
- package/packages/host/dist/sessions/agentpoll.d.ts +42 -0
- package/packages/host/dist/sessions/agentpoll.js +193 -0
- package/packages/host/dist/sessions/agentpoll.js.map +1 -0
- package/packages/host/dist/sessions/apiretry.d.ts +106 -0
- package/packages/host/dist/sessions/apiretry.js +387 -0
- package/packages/host/dist/sessions/apiretry.js.map +1 -0
- package/packages/host/dist/sessions/askwatch.d.ts +62 -0
- package/packages/host/dist/sessions/askwatch.js +169 -0
- package/packages/host/dist/sessions/askwatch.js.map +1 -0
- package/packages/host/dist/sessions/boxes.d.ts +2 -23
- package/packages/host/dist/sessions/boxes.js +10 -664
- package/packages/host/dist/sessions/boxes.js.map +1 -1
- package/packages/host/dist/sessions/boxread.d.ts +47 -0
- package/packages/host/dist/sessions/boxread.js +628 -0
- package/packages/host/dist/sessions/boxread.js.map +1 -0
- package/packages/host/dist/sessions/core.d.ts +22 -1
- package/packages/host/dist/sessions/ctxseries.js +3 -0
- package/packages/host/dist/sessions/ctxseries.js.map +1 -1
- package/packages/host/dist/sessions/drive.d.ts +20 -6
- package/packages/host/dist/sessions/drive.js +45 -12
- package/packages/host/dist/sessions/drive.js.map +1 -1
- package/packages/host/dist/sessions/endsession.d.ts +11 -0
- package/packages/host/dist/sessions/endsession.js +71 -0
- package/packages/host/dist/sessions/endsession.js.map +1 -0
- package/packages/host/dist/sessions/haltall.d.ts +14 -0
- package/packages/host/dist/sessions/haltall.js +32 -1
- package/packages/host/dist/sessions/haltall.js.map +1 -1
- package/packages/host/dist/sessions/knobs.d.ts +11 -0
- package/packages/host/dist/sessions/knobs.js +12 -0
- package/packages/host/dist/sessions/knobs.js.map +1 -1
- package/packages/host/dist/sessions/record.js +7 -2
- package/packages/host/dist/sessions/record.js.map +1 -1
- package/packages/host/dist/sessions/resume.d.ts +17 -0
- package/packages/host/dist/sessions/resume.js +65 -11
- package/packages/host/dist/sessions/resume.js.map +1 -1
- package/packages/host/dist/sessions/roster.js +3 -0
- package/packages/host/dist/sessions/roster.js.map +1 -1
- package/packages/host/dist/sessions/sidechannel.d.ts +1 -1
- package/packages/host/dist/sessions/sidechannel.js +2 -2
- package/packages/host/dist/sessions/tmux.js +21 -2
- package/packages/host/dist/sessions/tmux.js.map +1 -1
- package/packages/host/dist/sessions/turn.d.ts +15 -58
- package/packages/host/dist/sessions/turn.js +19 -358
- package/packages/host/dist/sessions/turn.js.map +1 -1
- package/packages/host/dist/sessions.d.ts +10 -7
- package/packages/host/dist/sessions.js +31 -79
- package/packages/host/dist/sessions.js.map +1 -1
- package/packages/host/dist/settle.d.ts +30 -2
- package/packages/host/dist/settle.js +94 -49
- package/packages/host/dist/settle.js.map +1 -1
- package/packages/host/dist/setupprefs.d.ts +26 -1
- package/packages/host/dist/setupprefs.js +49 -1
- package/packages/host/dist/setupprefs.js.map +1 -1
- package/packages/host/dist/setupwatch.d.ts +10 -8
- package/packages/host/dist/setupwatch.js +19 -16
- package/packages/host/dist/setupwatch.js.map +1 -1
- package/packages/host/dist/sidecar/sidecarname.d.ts +2 -0
- package/packages/host/dist/sidecar/sidecarname.js +5 -1
- package/packages/host/dist/sidecar/sidecarname.js.map +1 -1
- package/packages/host/dist/sidecar/sidecarroute.d.ts +1 -1
- package/packages/host/dist/sidecar/sidecarroute.js +5 -0
- package/packages/host/dist/sidecar/sidecarroute.js.map +1 -1
- package/packages/host/dist/sidecar.d.ts +1 -1
- package/packages/host/dist/sidecar.js +1 -1
- package/packages/host/dist/sidecar.js.map +1 -1
- package/packages/host/dist/tokenscan.d.ts +4 -4
- package/packages/host/dist/tokenscan.js +18 -37
- package/packages/host/dist/tokenscan.js.map +1 -1
- package/packages/host/dist/tokenstats.js +16 -18
- package/packages/host/dist/tokenstats.js.map +1 -1
- package/packages/host/dist/transcript/transcriptparse.js +17 -26
- package/packages/host/dist/transcript/transcriptparse.js.map +1 -1
- package/packages/host/dist/transcript/transcriptturns.d.ts +29 -0
- package/packages/host/dist/transcript/transcriptturns.js +27 -0
- package/packages/host/dist/transcript/transcriptturns.js.map +1 -1
- package/packages/host/dist/transcript.d.ts +1 -1
- package/packages/host/dist/transcript.js +1 -1
- package/packages/host/dist/transcript.js.map +1 -1
- package/packages/host/dist/usagesources.d.ts +1 -1
- package/packages/host/dist/usagesources.js +7 -2
- package/packages/host/dist/usagesources.js.map +1 -1
- package/packages/host/dist/visualskill.js +2 -2
- package/packages/host/dist/weekburn.d.ts +79 -0
- package/packages/host/dist/weekburn.js +276 -0
- package/packages/host/dist/weekburn.js.map +1 -0
- package/packages/host/dist/worktreeleftover.d.ts +9 -0
- package/packages/host/dist/worktreeleftover.js +17 -1
- package/packages/host/dist/worktreeleftover.js.map +1 -1
- package/packages/web/dist/assets/demo-DsZGy-MC.js +24 -0
- package/packages/web/dist/assets/icons-eqlvjswV.js +1 -0
- package/packages/web/dist/assets/index-GHwJuQb3.js +169 -0
- package/packages/web/dist/assets/index-VzDSZwwH.css +1 -0
- package/packages/web/dist/assets/shared-BWk5jXWb.js +49 -0
- package/packages/web/dist/assets/sheets-Dj-0m0DB.js +232 -0
- package/packages/web/dist/assets/{sheets-Bjv2L-cG.css → sheets-DoUhPGK0.css} +1 -1
- package/packages/web/dist/build-id.txt +1 -1
- package/packages/web/dist/buildstamp.json +1 -0
- package/packages/web/dist/index.html +7 -7
- package/packages/web/dist/sw.js +18 -3
- package/release.json +7 -4
- package/scripts/windows/wsl-setup.sh +10 -1
- package/tools/repohealth/constants.mjs +21 -1
- package/tools/repohealth/fixture.json +493 -30
- package/tools/repohealth/lang/typescript-resolve.mjs +354 -0
- package/tools/repohealth/metrics/graph.mjs +258 -0
- package/tools/repohealth/metrics/size.mjs +1 -1
- package/tools/repohealth/own.mjs +4 -4
- package/tools/repohealth/packs/c.mjs +4 -0
- package/tools/repohealth/packs/common.mjs +4 -0
- package/tools/repohealth/packs/dart.mjs +4 -0
- package/tools/repohealth/packs/kotlin.mjs +8 -0
- package/tools/repohealth/packs/python.mjs +8 -0
- package/tools/repohealth/packs/shell.mjs +4 -0
- package/tools/repohealth/packs/typescript.mjs +278 -7
- package/tools/repohealth/readings.mjs +39 -0
- package/tools/repohealth/series.mjs +1 -0
- package/tools/repohealth/snapshot.mjs +14 -0
- package/tools/repohealth/types.mjs +12 -0
- package/tools/repohealth.mjs +2 -0
- package/packages/web/dist/assets/demo-CXlqlYE4.js +0 -23
- package/packages/web/dist/assets/icons-BbqDBVjw.js +0 -1
- package/packages/web/dist/assets/index-CgPoyb3Y.css +0 -1
- package/packages/web/dist/assets/index-D5JKj8DK.js +0 -169
- package/packages/web/dist/assets/shared-eyaskl5l.js +0 -47
- package/packages/web/dist/assets/sheets-BzzL2re1.js +0 -204
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type ComplianceAcceptRequest, type ComplianceCheck, type ComplianceTriageRequest, type ExposureAccept, type ExposureRow, type ExposureFinding, type ExposureTriage, type ExposureTriageFile } from "@waterplane/shared";
|
|
2
|
+
/** Tests: read and write this dir instead of `<state dir>/exposure`. `null` restores the default. */
|
|
3
|
+
export declare function setExposureDir(dir: string | null): void;
|
|
4
|
+
/** The exposure state dir (`<state dir>/exposure`, or the test override) — also where `targets.json` lives. */
|
|
5
|
+
export declare function exposureDir(): string;
|
|
6
|
+
/** Every stored series' newest row with its accepts, for the push sweep. Reuses `newestRow`'s mtime+size cache,
|
|
7
|
+
* so a quiet day costs one stat per file. A series with no readable row is skipped. Never throws. */
|
|
8
|
+
export declare function exposureSeriesAll(): Array<{
|
|
9
|
+
row: ExposureRow;
|
|
10
|
+
accepts: Record<string, ExposureAccept> | null;
|
|
11
|
+
triage: ExposureTriageFile | null;
|
|
12
|
+
unreadable?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
/** The exposure rows for this worktree: none when no series names it. Never throws. */
|
|
15
|
+
export declare function exposureChecksFor(worktree: string): ComplianceCheck[];
|
|
16
|
+
export type ExposureAcceptOutcome = {
|
|
17
|
+
ok: true;
|
|
18
|
+
} | {
|
|
19
|
+
ok: false;
|
|
20
|
+
error: string;
|
|
21
|
+
};
|
|
22
|
+
/** Accept (or stop accepting) one finding by writing the watch's own accepts file. */
|
|
23
|
+
export declare function setExposureAccept(worktree: string, req: ComplianceAcceptRequest): ExposureAcceptOutcome;
|
|
24
|
+
/**
|
|
25
|
+
* Mark (or, with `clear`, unmark) one finding or crash group in `<name>.triage.json`, beside the accepts file.
|
|
26
|
+
* `id` is a check id (`exposure:<key>`) or a triage id (`exposureTriageId`); it must name a finding in the newest
|
|
27
|
+
* row. Never writes over an unreadable file. `by` is who is asking (a person from the phone, an agent from a route).
|
|
28
|
+
*/
|
|
29
|
+
export declare function setExposureTriage(worktree: string, req: ComplianceTriageRequest, by?: ExposureTriage["by"]): ExposureAcceptOutcome;
|
|
30
|
+
export type AgentExposureStatus = "open" | "accepted" | "fixed";
|
|
31
|
+
export interface AgentExposureFinding {
|
|
32
|
+
triageId: string;
|
|
33
|
+
measure: string;
|
|
34
|
+
subject: string;
|
|
35
|
+
appVersion?: string;
|
|
36
|
+
text: string;
|
|
37
|
+
level: ExposureFinding["level"];
|
|
38
|
+
status: AgentExposureStatus;
|
|
39
|
+
triage?: ExposureTriage;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* What the agent route lists (`GET /api/agent/exposure`): the newest row for this dir after accepts and marks.
|
|
43
|
+
* Default = OPEN findings only (a regression is open; accepted and fixed-and-hidden are not). `all` adds those with a
|
|
44
|
+
* `status`, plus `staleMarks` (marks whose group is not in this reading). `dir` is the collector's recorded path.
|
|
45
|
+
*/
|
|
46
|
+
export declare function exposureFindingsFor(worktree: string, opts?: {
|
|
47
|
+
all?: boolean;
|
|
48
|
+
}): {
|
|
49
|
+
repo: string;
|
|
50
|
+
dir: string;
|
|
51
|
+
findings: AgentExposureFinding[];
|
|
52
|
+
staleMarks?: Array<{
|
|
53
|
+
triageId: string;
|
|
54
|
+
triage: ExposureTriage;
|
|
55
|
+
}>;
|
|
56
|
+
} | null;
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exposure watch's readings and accepts, as setup-checklist rows.
|
|
3
|
+
*
|
|
4
|
+
* `tools/exposure.mjs` (a daily, model-free job) appends one row per run to
|
|
5
|
+
* `<state dir>/exposure/<name>.jsonl` and keeps a person's accepts in
|
|
6
|
+
* `<name>.accepted.json`. This module only READS the newest row and, on a tap,
|
|
7
|
+
* writes that SAME accepts file — never `setupprefs.json` — because the release
|
|
8
|
+
* gate reads it and an accept the gate cannot see would be a lie.
|
|
9
|
+
*
|
|
10
|
+
* - **The CLI's exact dir**: `resolveStateDir()` (`branddirs.ts`) is the same
|
|
11
|
+
* `stateDirPick(env, home)` the CLI uses, made absolute (and WSL-mapped).
|
|
12
|
+
* - **Matched by REALPATH** of the row's `dir` against the worktree; no series
|
|
13
|
+
* for a repo means no rows at all (not a "never measured" warn).
|
|
14
|
+
* - **Never throws**: an unreadable file is no row; an unreadable accepts file
|
|
15
|
+
* is said in the summary row and is never overwritten by an accept.
|
|
16
|
+
* - **Cached by (mtime, size)** so the sweep (`setupwatch.ts`, every 10 minutes)
|
|
17
|
+
* does not re-read a file that did not change.
|
|
18
|
+
* - **A series that WAS readable and now is not** is never a clean checklist: the
|
|
19
|
+
* last-good (file -> dir) is remembered and that worktree gets a warn row.
|
|
20
|
+
* - **Deliberate CLI divergence**: the CLI records an accept for a key absent from the
|
|
21
|
+
* newest row and takes a past `--until-date`; this module refuses both (the phone can
|
|
22
|
+
* only show present rows).
|
|
23
|
+
* - **No lock**: the phone and the CLI can race on the same second; the accepts file is
|
|
24
|
+
* re-read right before the write, and the later write wins.
|
|
25
|
+
*/
|
|
26
|
+
import { closeSync, existsSync, openSync, readFileSync, readSync, readdirSync, realpathSync, statSync, fstatSync, mkdirSync } from "node:fs";
|
|
27
|
+
import { join } from "node:path";
|
|
28
|
+
import { PRE_ACCEPTED, applyAccepts, applyTriage, cleanAcceptRequest, cleanTriageFile, exposureKeyOf, exposureVersionStem, exposureChecks, readLastRow, semverCmp, EXPOSURE_SUMMARY_ID, exposureTriageId, } from "@waterplane/shared";
|
|
29
|
+
import { resolveStateDir } from "./branddirs.js";
|
|
30
|
+
import { writeJsonAtomic } from "./jsonstore.js";
|
|
31
|
+
const TAIL_BYTES = 256 * 1024;
|
|
32
|
+
const WHOLE_FILE_MAX = 16 * 1024 * 1024;
|
|
33
|
+
let dirOverride = null;
|
|
34
|
+
/** Tests: read and write this dir instead of `<state dir>/exposure`. `null` restores the default. */
|
|
35
|
+
export function setExposureDir(dir) {
|
|
36
|
+
dirOverride = dir;
|
|
37
|
+
rowCache.clear();
|
|
38
|
+
lastGood.clear();
|
|
39
|
+
}
|
|
40
|
+
/** The exposure state dir (`<state dir>/exposure`, or the test override) — also where `targets.json` lives. */
|
|
41
|
+
export function exposureDir() { return seriesDir(); }
|
|
42
|
+
function seriesDir() {
|
|
43
|
+
return dirOverride ?? join(resolveStateDir().dir, "exposure");
|
|
44
|
+
}
|
|
45
|
+
const real = (p) => { try {
|
|
46
|
+
return realpathSync(p);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return p;
|
|
50
|
+
} };
|
|
51
|
+
/** The tail of a file, as text (a row is one line, so the last 256 KB holds the newest). */
|
|
52
|
+
function readTail(path) {
|
|
53
|
+
let fd = null;
|
|
54
|
+
try {
|
|
55
|
+
fd = openSync(path, "r");
|
|
56
|
+
const size = fstatSync(fd).size;
|
|
57
|
+
const len = Math.min(size, TAIL_BYTES);
|
|
58
|
+
const buf = Buffer.alloc(len);
|
|
59
|
+
readSync(fd, buf, 0, len, size - len);
|
|
60
|
+
let text = buf.toString("utf8");
|
|
61
|
+
if (size > len) {
|
|
62
|
+
const nl = text.indexOf("\n");
|
|
63
|
+
if (nl < 0 || !text.slice(nl + 1).trim()) { // the newest row is longer than the tail: read the whole file (bounded)
|
|
64
|
+
if (size > WHOLE_FILE_MAX)
|
|
65
|
+
return null;
|
|
66
|
+
return readFileSync(path, "utf8");
|
|
67
|
+
}
|
|
68
|
+
text = text.slice(nl + 1); // drop the cut first line
|
|
69
|
+
}
|
|
70
|
+
return text;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
if (fd !== null)
|
|
77
|
+
try {
|
|
78
|
+
closeSync(fd);
|
|
79
|
+
}
|
|
80
|
+
catch { /* ignore */ }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** file -> the `dir` its newest row named, from the last read that worked. */
|
|
84
|
+
const lastGood = new Map();
|
|
85
|
+
const rowCache = new Map();
|
|
86
|
+
function newestRow(file) {
|
|
87
|
+
try {
|
|
88
|
+
const st = statSync(file);
|
|
89
|
+
const sig = `${st.mtimeMs}:${st.size}`;
|
|
90
|
+
const hit = rowCache.get(file);
|
|
91
|
+
if (hit && hit.sig === sig)
|
|
92
|
+
return hit.row;
|
|
93
|
+
const t = readTail(file);
|
|
94
|
+
const row = t === null ? null : readLastRow(t);
|
|
95
|
+
rowCache.set(file, { sig, row });
|
|
96
|
+
if (row && typeof row.dir === "string")
|
|
97
|
+
lastGood.set(file, row.dir);
|
|
98
|
+
return row;
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function seriesFor(worktree) {
|
|
105
|
+
const dir = seriesDir();
|
|
106
|
+
let names;
|
|
107
|
+
try {
|
|
108
|
+
names = readdirSync(dir).filter((f) => f.endsWith(".jsonl"));
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const want = real(worktree);
|
|
114
|
+
for (const f of names.sort()) {
|
|
115
|
+
const row = newestRow(join(dir, f));
|
|
116
|
+
if (!row || typeof row.dir !== "string")
|
|
117
|
+
continue;
|
|
118
|
+
if (real(row.dir) === want || row.dir === worktree) {
|
|
119
|
+
const name = f.slice(0, -".jsonl".length);
|
|
120
|
+
return { name, row, acceptsFile: join(dir, `${name}.accepted.json`), triageFile: join(dir, `${name}.triage.json`) };
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
/** Every stored series' newest row with its accepts, for the push sweep. Reuses `newestRow`'s mtime+size cache,
|
|
126
|
+
* so a quiet day costs one stat per file. A series with no readable row is skipped. Never throws. */
|
|
127
|
+
export function exposureSeriesAll() {
|
|
128
|
+
const out = [];
|
|
129
|
+
try {
|
|
130
|
+
const dir = seriesDir();
|
|
131
|
+
for (const f of readdirSync(dir).filter((n) => n.endsWith(".jsonl")).sort()) {
|
|
132
|
+
const row = newestRow(join(dir, f));
|
|
133
|
+
if (!row || typeof row.dir !== "string")
|
|
134
|
+
continue;
|
|
135
|
+
const stem = f.slice(0, -".jsonl".length);
|
|
136
|
+
const acc = readAccepts(join(dir, `${stem}.accepted.json`));
|
|
137
|
+
const tri = readTriage(join(dir, `${stem}.triage.json`));
|
|
138
|
+
out.push({ row, accepts: acc.ok ? acc.data : null, triage: tri.ok ? tri.data : null, ...(acc.ok && tri.ok ? {} : { unreadable: true }) });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch { /* no dir yet: nothing stored */ }
|
|
142
|
+
return out;
|
|
143
|
+
}
|
|
144
|
+
/** A warn summary when a series we read before names this worktree but cannot be read now. */
|
|
145
|
+
function unreadableRow(worktree) {
|
|
146
|
+
const dir = seriesDir();
|
|
147
|
+
const want = real(worktree);
|
|
148
|
+
for (const [file, rowDir] of lastGood) {
|
|
149
|
+
if (!file.startsWith(dir) || !existsSync(file))
|
|
150
|
+
continue;
|
|
151
|
+
if (!(real(rowDir) === want || rowDir === worktree))
|
|
152
|
+
continue;
|
|
153
|
+
if (newestRow(file))
|
|
154
|
+
continue;
|
|
155
|
+
return [unreadableSummary()];
|
|
156
|
+
}
|
|
157
|
+
return [];
|
|
158
|
+
}
|
|
159
|
+
const unreadableSummary = () => ({
|
|
160
|
+
id: EXPOSURE_SUMMARY_ID, label: "Exposure watch", status: "warn", fix: null, advisory: true,
|
|
161
|
+
detail: "The stored reading could not be read, so nothing is known about this repo's exposure right now (not the same as clean).",
|
|
162
|
+
});
|
|
163
|
+
function readAccepts(file) {
|
|
164
|
+
if (!existsSync(file))
|
|
165
|
+
return { ok: true, data: null };
|
|
166
|
+
try {
|
|
167
|
+
const v = JSON.parse(readFileSync(file, "utf8"));
|
|
168
|
+
if (!v || typeof v !== "object" || Array.isArray(v))
|
|
169
|
+
return { ok: false, why: "not an object" };
|
|
170
|
+
return { ok: true, data: v };
|
|
171
|
+
}
|
|
172
|
+
catch (e) {
|
|
173
|
+
return { ok: false, why: e instanceof Error ? e.message : String(e) };
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function readTriage(file) {
|
|
177
|
+
if (!existsSync(file))
|
|
178
|
+
return { ok: true, data: null };
|
|
179
|
+
try {
|
|
180
|
+
const v = JSON.parse(readFileSync(file, "utf8"));
|
|
181
|
+
if (!v || typeof v !== "object" || Array.isArray(v))
|
|
182
|
+
return { ok: false, why: "not an object" };
|
|
183
|
+
return { ok: true, data: cleanTriageFile(v) }; // a malformed entry reads as no mark
|
|
184
|
+
}
|
|
185
|
+
catch (e) {
|
|
186
|
+
return { ok: false, why: e instanceof Error ? e.message : String(e) };
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/** The exposure rows for this worktree: none when no series names it. Never throws. */
|
|
190
|
+
export function exposureChecksFor(worktree) {
|
|
191
|
+
try {
|
|
192
|
+
const s = seriesFor(worktree);
|
|
193
|
+
if (!s)
|
|
194
|
+
return unreadableRow(worktree);
|
|
195
|
+
const acc = readAccepts(s.acceptsFile);
|
|
196
|
+
const tri = readTriage(s.triageFile);
|
|
197
|
+
const rows = exposureChecks(s.row, s.name, acc.ok ? acc.data : null, new Date(), undefined, tri.ok ? tri.data : null);
|
|
198
|
+
if (!tri.ok) {
|
|
199
|
+
const sum = rows.find((c) => c.id === EXPOSURE_SUMMARY_ID);
|
|
200
|
+
if (sum) {
|
|
201
|
+
sum.status = "warn";
|
|
202
|
+
sum.detail += ` The triage file could not be read (${tri.why}), so no seen / investigating / fixed mark is applied here.`;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (!acc.ok) {
|
|
206
|
+
const sum = rows.find((c) => c.id === EXPOSURE_SUMMARY_ID);
|
|
207
|
+
if (sum) {
|
|
208
|
+
sum.status = "warn";
|
|
209
|
+
sum.detail += ` The accepts file could not be read (${acc.why}), so nothing shown here counts as accepted except what is built in.`;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return rows;
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
return [unreadableSummary()];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/** Accept (or stop accepting) one finding by writing the watch's own accepts file. */
|
|
219
|
+
export function setExposureAccept(worktree, req) {
|
|
220
|
+
const no = (error) => ({ ok: false, error });
|
|
221
|
+
try {
|
|
222
|
+
const c = cleanAcceptRequest(req, new Date());
|
|
223
|
+
if (!c.ok)
|
|
224
|
+
return no(c.error);
|
|
225
|
+
const r = c.value;
|
|
226
|
+
const key = exposureKeyOf(r.id);
|
|
227
|
+
if (!key)
|
|
228
|
+
return no("That row is not an exposure finding; only those can be accepted.");
|
|
229
|
+
const s = seriesFor(worktree);
|
|
230
|
+
if (!s)
|
|
231
|
+
return no("No exposure watch reading is stored for this repo, so there is nothing to accept.");
|
|
232
|
+
const f = s.row.findings?.find((x) => x.key === key);
|
|
233
|
+
let entry = null;
|
|
234
|
+
if (r.accept) {
|
|
235
|
+
if (!f)
|
|
236
|
+
return no("That finding is not in the newest reading any more.");
|
|
237
|
+
entry = { reason: r.reason, at: new Date().toISOString() };
|
|
238
|
+
if (r.until) {
|
|
239
|
+
if ("version" in r.until) {
|
|
240
|
+
if (!f.version)
|
|
241
|
+
return no(`${key} has no version to compare, so accepting until a version would never end: use a date or a change.`);
|
|
242
|
+
if (semverCmp(r.until.version, f.version) <= 0)
|
|
243
|
+
return no(`Pick a version newer than ${f.version}; otherwise the accept would already be over.`);
|
|
244
|
+
entry.until = { version: r.until.version };
|
|
245
|
+
}
|
|
246
|
+
else if ("date" in r.until)
|
|
247
|
+
entry.until = { date: r.until.date };
|
|
248
|
+
else
|
|
249
|
+
entry.until = { change: f.text };
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// Read the accepts file as late as possible: the CLI may have written it since the request began.
|
|
253
|
+
const cur = readAccepts(s.acceptsFile);
|
|
254
|
+
if (!cur.ok)
|
|
255
|
+
return no(`${s.acceptsFile} is unreadable (${cur.why}); not overwriting it.`);
|
|
256
|
+
const next = { ...(cur.data ?? {}) };
|
|
257
|
+
if (entry)
|
|
258
|
+
next[key] = entry;
|
|
259
|
+
else {
|
|
260
|
+
const stem = exposureVersionStem(key);
|
|
261
|
+
const hit = Object.hasOwn(next, key) ? key
|
|
262
|
+
: stem ? Object.keys(next).find((k) => exposureVersionStem(k) === stem && next[k]?.until?.version !== undefined)
|
|
263
|
+
: undefined;
|
|
264
|
+
if (!hit) {
|
|
265
|
+
return Object.hasOwn(PRE_ACCEPTED, key)
|
|
266
|
+
? no(`Accepted in code: ${PRE_ACCEPTED[key].reason}. That one is built in and is changed in the source, not here.`)
|
|
267
|
+
: no("That finding is not accepted.");
|
|
268
|
+
}
|
|
269
|
+
delete next[hit];
|
|
270
|
+
}
|
|
271
|
+
mkdirSync(seriesDir(), { recursive: true });
|
|
272
|
+
writeJsonAtomic(s.acceptsFile, next, { space: 2, newline: true });
|
|
273
|
+
return { ok: true };
|
|
274
|
+
}
|
|
275
|
+
catch (e) {
|
|
276
|
+
return no(`Could not save the accept: ${e instanceof Error ? e.message : String(e)}`);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
const TRIAGE_STATES = ["seen", "investigating", "fixed"];
|
|
280
|
+
/**
|
|
281
|
+
* Mark (or, with `clear`, unmark) one finding or crash group in `<name>.triage.json`, beside the accepts file.
|
|
282
|
+
* `id` is a check id (`exposure:<key>`) or a triage id (`exposureTriageId`); it must name a finding in the newest
|
|
283
|
+
* row. Never writes over an unreadable file. `by` is who is asking (a person from the phone, an agent from a route).
|
|
284
|
+
*/
|
|
285
|
+
export function setExposureTriage(worktree, req, by = { kind: "person" }) {
|
|
286
|
+
const no = (error) => ({ ok: false, error });
|
|
287
|
+
try {
|
|
288
|
+
const id0 = typeof req?.id === "string" ? req.id.trim() : "";
|
|
289
|
+
if (!id0)
|
|
290
|
+
return no("Say which finding to mark.");
|
|
291
|
+
const s = seriesFor(worktree);
|
|
292
|
+
if (!s)
|
|
293
|
+
return no("No exposure watch reading is stored for this repo, so there is nothing to mark.");
|
|
294
|
+
const key = exposureKeyOf(id0);
|
|
295
|
+
const f = (s.row.findings ?? []).find((x) => (key !== null ? x.key === key : exposureTriageId(x) === id0 || x.key === id0));
|
|
296
|
+
const cur = readTriage(s.triageFile);
|
|
297
|
+
if (!cur.ok)
|
|
298
|
+
return no(`${s.triageFile} is unreadable (${cur.why}); not overwriting it.`);
|
|
299
|
+
const next = { ...(cur.data ?? {}) };
|
|
300
|
+
// A mark whose group is not in today's reading is kept (it may return); it can still be cleared by its id.
|
|
301
|
+
if (!f && !(req.clear && Object.hasOwn(next, id0)))
|
|
302
|
+
return no("That finding is not in the newest reading any more.");
|
|
303
|
+
const tid = f ? exposureTriageId(f) : id0;
|
|
304
|
+
if (req.clear) {
|
|
305
|
+
if (!Object.hasOwn(next, tid))
|
|
306
|
+
return no("That finding has no mark to clear.");
|
|
307
|
+
delete next[tid];
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
if (!TRIAGE_STATES.includes(req.state))
|
|
311
|
+
return no('State must be "seen", "investigating" or "fixed".');
|
|
312
|
+
const e = { state: req.state, at: new Date().toISOString(), by, ...(f.appVersion ? { markedVersion: f.appVersion } : {}) };
|
|
313
|
+
if (req.state === "fixed") {
|
|
314
|
+
if (!f.appVersion)
|
|
315
|
+
return no("fixed needs a crash group with an app version; accept it instead (a fix is compared against the version that reports the crash).");
|
|
316
|
+
const v = typeof req.fixedIn === "string" ? req.fixedIn.trim() : "";
|
|
317
|
+
if (!v)
|
|
318
|
+
return no('"fixed" needs the version that carries the fix (fixedIn), so installs still on an older one are not called regressions.');
|
|
319
|
+
if (v.length > 32 || !/^[0-9A-Za-z.+-]+$/.test(v))
|
|
320
|
+
return no("fixedIn must be a version of at most 32 characters (letters, digits, . + -).");
|
|
321
|
+
e.fixedIn = v;
|
|
322
|
+
}
|
|
323
|
+
else if (req.fixedIn !== undefined && req.fixedIn !== "")
|
|
324
|
+
return no("fixedIn only goes with the fixed state.");
|
|
325
|
+
if (req.commit !== undefined && req.commit !== "") {
|
|
326
|
+
if (typeof req.commit !== "string" || !/^[0-9a-fA-F]{7,40}$/.test(req.commit.trim()))
|
|
327
|
+
return no("commit must be a hex commit id of 7 to 40 characters.");
|
|
328
|
+
e.commit = req.commit.trim();
|
|
329
|
+
}
|
|
330
|
+
if (req.note !== undefined && req.note !== "") {
|
|
331
|
+
if (typeof req.note !== "string" || req.note.trim().length > 280)
|
|
332
|
+
return no("note must be text of at most 280 characters.");
|
|
333
|
+
e.note = req.note.trim();
|
|
334
|
+
}
|
|
335
|
+
next[tid] = e;
|
|
336
|
+
}
|
|
337
|
+
mkdirSync(seriesDir(), { recursive: true });
|
|
338
|
+
writeJsonAtomic(s.triageFile, next, { space: 2, newline: true });
|
|
339
|
+
return { ok: true };
|
|
340
|
+
}
|
|
341
|
+
catch (e) {
|
|
342
|
+
return no(`Could not save the mark: ${e instanceof Error ? e.message : String(e)}`);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* What the agent route lists (`GET /api/agent/exposure`): the newest row for this dir after accepts and marks.
|
|
347
|
+
* Default = OPEN findings only (a regression is open; accepted and fixed-and-hidden are not). `all` adds those with a
|
|
348
|
+
* `status`, plus `staleMarks` (marks whose group is not in this reading). `dir` is the collector's recorded path.
|
|
349
|
+
*/
|
|
350
|
+
export function exposureFindingsFor(worktree, opts) {
|
|
351
|
+
const s = seriesFor(worktree);
|
|
352
|
+
if (!s)
|
|
353
|
+
return null;
|
|
354
|
+
const tri = readTriage(s.triageFile);
|
|
355
|
+
const acc = readAccepts(s.acceptsFile);
|
|
356
|
+
const t = tri.ok ? tri.data : null;
|
|
357
|
+
const eff = applyTriage(applyAccepts(s.row.findings ?? [], acc.ok ? acc.data : null, new Date()), t);
|
|
358
|
+
const all = eff.map((f) => ({
|
|
359
|
+
triageId: exposureTriageId(f), measure: f.measure, subject: f.subject, ...(f.appVersion ? { appVersion: f.appVersion } : {}),
|
|
360
|
+
text: f.text, level: f.level,
|
|
361
|
+
status: f.accepted ? (f.accepted.byMark ? "fixed" : "accepted") : "open",
|
|
362
|
+
...(f.triage ? { triage: f.triage } : {}),
|
|
363
|
+
}));
|
|
364
|
+
const out = { repo: s.row.repo, dir: s.row.dir, findings: opts?.all ? all : all.filter((f) => f.status === "open") };
|
|
365
|
+
if (!opts?.all)
|
|
366
|
+
return out;
|
|
367
|
+
const here = new Set((s.row.findings ?? []).map(exposureTriageId));
|
|
368
|
+
const staleMarks = Object.entries(t ?? {}).filter(([id]) => !here.has(id)).map(([triageId, triage]) => ({ triageId, triage }));
|
|
369
|
+
return { ...out, staleMarks };
|
|
370
|
+
}
|
|
371
|
+
//# sourceMappingURL=exposure.js.map
|
|
@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E,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,CAAC;IACrH,IAAI,CAAC,IAAI,EAAE,GAAG;QAAE,OAAO,GAAG,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC/H,OAAO,EAAE,GAAG,GAAG,EAAE,UAAU,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ExposureSeries } from "@waterplane/shared";
|
|
2
|
+
import type { Notify } from "./notifytypes.js";
|
|
3
|
+
export interface ExposurePushDeps {
|
|
4
|
+
notify: Notify;
|
|
5
|
+
/** Tests: where the store lives (default `<exposure dir>/pushed.json`). */
|
|
6
|
+
storePath?: () => string;
|
|
7
|
+
series?: () => ExposureSeries[];
|
|
8
|
+
/** The real dirs on the watch, or null when targets.json is unusable. */
|
|
9
|
+
watched?: () => Set<string> | null;
|
|
10
|
+
/** A watched dir -> the repo id the phone opens (undefined = not a discovered repo). */
|
|
11
|
+
repoIdFor?: (dir: string) => Promise<string | undefined>;
|
|
12
|
+
now?: () => Date;
|
|
13
|
+
/** Resolve an attention item by its key (`ctx.resolveAttention`); absent = keys are only set. */
|
|
14
|
+
resolveAttention?: (key: string, note: string) => number;
|
|
15
|
+
}
|
|
16
|
+
export declare class ExposurePush {
|
|
17
|
+
private readonly deps;
|
|
18
|
+
private timer;
|
|
19
|
+
private sweeping;
|
|
20
|
+
private readonly warned;
|
|
21
|
+
constructor(deps: ExposurePushDeps);
|
|
22
|
+
private path;
|
|
23
|
+
private load;
|
|
24
|
+
sweep(): Promise<void>;
|
|
25
|
+
start(): void;
|
|
26
|
+
stop(): void;
|
|
27
|
+
}
|
|
28
|
+
export declare function createExposurePush(root: string, notify: Notify, resolveAttention?: (key: string, note: string) => number): ExposurePush;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **One push per new exposure finding** — the host half of `exposurepush.ts` in shared (which
|
|
3
|
+
* decides; this module stores, sweeps and sends). Alert = a push the same day; the Monday digest is
|
|
4
|
+
* not here.
|
|
5
|
+
*
|
|
6
|
+
* - **Store**: `<exposure dir>/pushed.json`, `{v:2, keys, repos}` (v1 = keys, no repos), written with
|
|
7
|
+
* `writeJsonAtomic`, never pruned (a finding is pushed once forever). Keys are REMEMBERED BEFORE
|
|
8
|
+
* sending: a crash between the two loses a push, never repeats one.
|
|
9
|
+
* - **Seeding is per repo**: a repo not yet in `repos` (first sight as watched, whatever the reason,
|
|
10
|
+
* including no store at all) remembers its open alerts, pushes none, and is added.
|
|
11
|
+
* - **Resolving**: every push carries `key: exposure:<repo>:<finding key>` (summary:
|
|
12
|
+
* `exposure:<repo>`); a sweep resolves the keys whose finding is no longer open.
|
|
13
|
+
* - **An accepts file that exists but cannot be read** skips that repo for the sweep.
|
|
14
|
+
* - **A store that cannot be read** is logged and NOTHING is pushed or written: re-pushing
|
|
15
|
+
* everything is the failure this guards. (A corrupt file `readJsonGuarded` moved aside counts as
|
|
16
|
+
* "no store": every watched repo seeds quietly.)
|
|
17
|
+
* - **Cheap**: `exposureSeriesAll` reads through `newestRow`'s mtime+size cache, so a quiet 10
|
|
18
|
+
* minutes is one stat per series. Boot sweep after a short delay, then every 10 minutes.
|
|
19
|
+
* - Words only; nothing is fixed, accepted or muted by a push.
|
|
20
|
+
*/
|
|
21
|
+
import { existsSync, mkdirSync, realpathSync } from "node:fs";
|
|
22
|
+
import { join } from "node:path";
|
|
23
|
+
import { exposurePushes, logTag } from "@waterplane/shared";
|
|
24
|
+
import { exposureDir, exposureSeriesAll } from "./exposure.js";
|
|
25
|
+
import { exposureWatchedDirs } from "./exposurewatch.js";
|
|
26
|
+
import { readJsonGuardedDetail, writeJsonAtomic } from "./jsonstore.js";
|
|
27
|
+
import { discoverTargets } from "./repos.js";
|
|
28
|
+
const BOOT_DELAY_MS = 30_000;
|
|
29
|
+
const SWEEP_MS = 10 * 60_000;
|
|
30
|
+
const real = (p) => { try {
|
|
31
|
+
return realpathSync(p);
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return p;
|
|
35
|
+
} };
|
|
36
|
+
const EMPTY = () => ({ ok: true, keys: new Set(), repos: new Set() });
|
|
37
|
+
export class ExposurePush {
|
|
38
|
+
deps;
|
|
39
|
+
timer = null;
|
|
40
|
+
sweeping = false;
|
|
41
|
+
warned = new Set();
|
|
42
|
+
constructor(deps) {
|
|
43
|
+
this.deps = deps;
|
|
44
|
+
}
|
|
45
|
+
path() { return this.deps.storePath?.() ?? join(exposureDir(), "pushed.json"); }
|
|
46
|
+
load() {
|
|
47
|
+
const p = this.path();
|
|
48
|
+
if (!existsSync(p))
|
|
49
|
+
return EMPTY();
|
|
50
|
+
const r = readJsonGuardedDetail(p, null, (v) => !!v && typeof v === "object" && (v.v === 1 || v.v === 2) && Array.isArray(v.keys));
|
|
51
|
+
if (r.corrupt) {
|
|
52
|
+
return r.corrupt.movedTo ? EMPTY() : { ok: false, why: r.corrupt.error };
|
|
53
|
+
}
|
|
54
|
+
if (!r.value)
|
|
55
|
+
return { ok: false, why: "empty" };
|
|
56
|
+
const strs = (a) => (Array.isArray(a) ? a.filter((k) => typeof k === "string") : []);
|
|
57
|
+
return { ok: true, keys: new Set(strs(r.value.keys)), repos: new Set(r.value.v === 2 ? strs(r.value.repos) : []) };
|
|
58
|
+
}
|
|
59
|
+
async sweep() {
|
|
60
|
+
if (this.sweeping)
|
|
61
|
+
return;
|
|
62
|
+
this.sweeping = true;
|
|
63
|
+
try {
|
|
64
|
+
const watchedDirs = (this.deps.watched ?? exposureWatchedDirs)();
|
|
65
|
+
if (!watchedDirs)
|
|
66
|
+
return; // targets.json present but unusable: nobody is known to be watched
|
|
67
|
+
const store = this.load();
|
|
68
|
+
if (!store.ok) {
|
|
69
|
+
console.log(`${logTag} exposure push · pushed.json unreadable (${store.why}); pushing nothing until it is`);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const series = (this.deps.series ?? exposureSeriesAll)();
|
|
73
|
+
for (const s of series) {
|
|
74
|
+
if (s.unreadable && watchedDirs.has(real(s.row.dir)) && !this.warned.has(s.row.repo)) {
|
|
75
|
+
this.warned.add(s.row.repo);
|
|
76
|
+
console.log(`${logTag} exposure push · ${s.row.repo}: accepts or triage file unreadable; skipping this repo until it is`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const plan = exposurePushes(series, (d) => watchedDirs.has(real(d)), store, (this.deps.now ?? (() => new Date()))());
|
|
80
|
+
for (const k of plan.resolve)
|
|
81
|
+
this.deps.resolveAttention?.(k, "no longer an open finding");
|
|
82
|
+
if (plan.remember.length || plan.seenRepos.length) {
|
|
83
|
+
// Remember BEFORE sending: a crash between the two loses a push, never repeats one.
|
|
84
|
+
const keys = new Set([...store.keys, ...plan.remember]);
|
|
85
|
+
const repos = new Set([...store.repos, ...plan.seenRepos]);
|
|
86
|
+
try {
|
|
87
|
+
mkdirSync(exposureDir(), { recursive: true });
|
|
88
|
+
writeJsonAtomic(this.path(), { v: 2, keys: [...keys], repos: [...repos] }, { space: 2, newline: true });
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
console.log(`${logTag} exposure push · could not save pushed.json (${e instanceof Error ? e.message : String(e)}); pushing nothing`);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (!plan.push.length)
|
|
96
|
+
return;
|
|
97
|
+
const targets = await (this.deps.repoIdFor ? null : discoverTargets(rootForDiscovery).catch(() => []));
|
|
98
|
+
for (const p of plan.push) {
|
|
99
|
+
const repoId = this.deps.repoIdFor
|
|
100
|
+
? await this.deps.repoIdFor(p.dir).catch(() => undefined)
|
|
101
|
+
: targets?.find((t) => real(t.worktreePath) === real(p.dir))?.id;
|
|
102
|
+
const open = repoId ? { to: "setup", repoId } : undefined;
|
|
103
|
+
try {
|
|
104
|
+
this.deps.notify("exposure", { title: p.title, body: p.body, tag: p.tag, key: p.key, level: p.attention ? "attention" : "info", ...(open ? { open } : {}) });
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
console.log(`${logTag} exposure push · notify failed (${e instanceof Error ? e.message : String(e)}); key stays remembered`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
console.log(`${logTag} exposure push · ${e instanceof Error ? e.message : String(e)}`);
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
this.sweeping = false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
start() {
|
|
119
|
+
if (this.timer)
|
|
120
|
+
return;
|
|
121
|
+
const first = setTimeout(() => { void this.sweep(); this.timer = setInterval(() => void this.sweep(), SWEEP_MS); this.timer.unref?.(); }, BOOT_DELAY_MS);
|
|
122
|
+
first.unref?.();
|
|
123
|
+
this.timer = first;
|
|
124
|
+
}
|
|
125
|
+
stop() { if (this.timer) {
|
|
126
|
+
clearTimeout(this.timer);
|
|
127
|
+
clearInterval(this.timer);
|
|
128
|
+
this.timer = null;
|
|
129
|
+
} }
|
|
130
|
+
}
|
|
131
|
+
let rootForDiscovery = "";
|
|
132
|
+
export function createExposurePush(root, notify, resolveAttention) {
|
|
133
|
+
rootForDiscovery = root;
|
|
134
|
+
return new ExposurePush({ notify, resolveAttention });
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=exposurepush.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exposurepush.js","sourceRoot":"","sources":["../src/exposurepush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAwC,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC;AAC7B,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,GAAG,IAAI,CAAC;IAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;AAAC,CAAC;AAAC,MAAM,CAAC;IAAC,OAAO,CAAC,CAAC;AAAC,CAAC,CAAC,CAAC,CAAC;AAiB5F,MAAM,KAAK,GAAG,GAAU,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC,CAAC;AAE7E,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ACzJ,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,KAAW,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IAAC,CAAC,CAAC,CAAC;CAC7G;AAED,IAAI,gBAAgB,GAAG,EAAE,CAAC;AAE1B,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,MAAc,EAAE,gBAAwD;IACvH,gBAAgB,GAAG,IAAI,CAAC;IACxB,OAAO,IAAI,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import type { ExposureRunResult } from "@waterplane/shared";
|
|
3
|
+
export declare const EXPOSURE_RUN_TIMEOUT_MS: number;
|
|
4
|
+
/** This checkout — `packages/host/{src,dist}` three hops down — whose `tools/` holds the collector. */
|
|
5
|
+
export declare const HOST_CHECKOUT: string;
|
|
6
|
+
/** The argv to run for one target, or why there is none. `root` is the host's own checkout. */
|
|
7
|
+
export declare function exposureRunnerArgv(name: string, play: boolean, knob: string | undefined, root: string, has?: typeof existsSync): {
|
|
8
|
+
argv: string[];
|
|
9
|
+
} | {
|
|
10
|
+
refused: string;
|
|
11
|
+
};
|
|
12
|
+
/** The collector's exit, as the one sentence the phone shows. Exit codes: `tools/exposure.mjs`'s header. */
|
|
13
|
+
export declare function exposureRunSentence(exit: number | null, tail: string, opts?: {
|
|
14
|
+
timedOut?: boolean;
|
|
15
|
+
secs?: number;
|
|
16
|
+
}): string;
|
|
17
|
+
/** Run (or join) the watch for this worktree. Never throws; a refusal is `ok: false` + `refused`. */
|
|
18
|
+
export declare function runExposureWatch(wt: string, root?: string): Promise<ExposureRunResult>;
|