waterplane 0.1.25 → 0.1.26
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 +29 -0
- package/SECURITY.md +24 -4
- package/node_modules/@waterplane/shared/dist/agentseries/compare.d.ts +8 -0
- package/node_modules/@waterplane/shared/dist/agentseries/compare.js +103 -0
- package/node_modules/@waterplane/shared/dist/agentseries/compare.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/agentseries/markers.d.ts +17 -0
- package/node_modules/@waterplane/shared/dist/agentseries/markers.js +125 -0
- package/node_modules/@waterplane/shared/dist/agentseries/markers.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/agentseries/series.d.ts +16 -0
- package/node_modules/@waterplane/shared/dist/agentseries/series.js +93 -0
- package/node_modules/@waterplane/shared/dist/agentseries/series.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/agentseries/stats.d.ts +8 -0
- package/node_modules/@waterplane/shared/dist/agentseries/stats.js +33 -0
- package/node_modules/@waterplane/shared/dist/agentseries/stats.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/agentseries/types.d.ts +103 -0
- package/node_modules/@waterplane/shared/dist/agentseries/types.js +11 -0
- package/node_modules/@waterplane/shared/dist/agentseries/types.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/agentseries.d.ts +10 -0
- package/node_modules/@waterplane/shared/dist/agentseries.js +11 -0
- package/node_modules/@waterplane/shared/dist/agentseries.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/calday.d.ts +5 -0
- package/node_modules/@waterplane/shared/dist/calday.js +10 -0
- package/node_modules/@waterplane/shared/dist/calday.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/clihealth/healthfixture.d.ts +13 -1
- package/node_modules/@waterplane/shared/dist/clihealth/healthfixture.js +22 -4
- package/node_modules/@waterplane/shared/dist/clihealth/healthfixture.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/clihealth.d.ts +1 -1
- package/node_modules/@waterplane/shared/dist/clihealth.js +1 -1
- package/node_modules/@waterplane/shared/dist/clihealth.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/dictate.d.ts +6 -0
- package/node_modules/@waterplane/shared/dist/dictate.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/dictatemodels.d.ts +23 -0
- package/node_modules/@waterplane/shared/dist/dictatemodels.js +31 -0
- package/node_modules/@waterplane/shared/dist/dictatemodels.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthspend.d.ts +23 -0
- package/node_modules/@waterplane/shared/dist/healthspend.js +31 -0
- package/node_modules/@waterplane/shared/dist/healthspend.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/index.d.ts +7 -0
- package/node_modules/@waterplane/shared/dist/index.js +7 -0
- package/node_modules/@waterplane/shared/dist/index.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/installrow.js +10 -0
- package/node_modules/@waterplane/shared/dist/installrow.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/itempaths.d.ts +23 -0
- package/node_modules/@waterplane/shared/dist/itempaths.js +38 -0
- package/node_modules/@waterplane/shared/dist/itempaths.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/pluginlaunch.d.ts +3 -2
- package/node_modules/@waterplane/shared/dist/pluginlaunch.js +1 -1
- package/node_modules/@waterplane/shared/dist/pluginlaunch.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/pricelist.d.ts +57 -0
- package/node_modules/@waterplane/shared/dist/pricelist.js +128 -0
- package/node_modules/@waterplane/shared/dist/pricelist.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/pricing.d.ts +86 -9
- package/node_modules/@waterplane/shared/dist/pricing.js +140 -20
- package/node_modules/@waterplane/shared/dist/pricing.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/queue/queuelanestate.d.ts +14 -0
- package/node_modules/@waterplane/shared/dist/queue/queuelanestate.js +25 -0
- package/node_modules/@waterplane/shared/dist/queue/queuelanestate.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/queue/queueplan.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/queue/queueplan.js +21 -0
- package/node_modules/@waterplane/shared/dist/queue/queueplan.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/queue/queuewords.js +2 -1
- package/node_modules/@waterplane/shared/dist/queue/queuewords.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/queue.d.ts +2 -0
- package/node_modules/@waterplane/shared/dist/queue.js +1 -0
- package/node_modules/@waterplane/shared/dist/queue.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/skillstate.d.ts +51 -0
- package/node_modules/@waterplane/shared/dist/skillstate.js +176 -0
- package/node_modules/@waterplane/shared/dist/skillstate.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/skillwords.d.ts +10 -0
- package/node_modules/@waterplane/shared/dist/skillwords.js +18 -0
- package/node_modules/@waterplane/shared/dist/skillwords.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/agentreadings.d.ts +147 -3
- package/node_modules/@waterplane/shared/dist/wire/agentreadings.js +29 -0
- package/node_modules/@waterplane/shared/dist/wire/agentreadings.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/backend.d.ts +2 -0
- package/node_modules/@waterplane/shared/dist/wire/costwindow.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/wire/dictatesetup.d.ts +42 -0
- package/node_modules/@waterplane/shared/dist/wire/dictatesetup.js +9 -0
- package/node_modules/@waterplane/shared/dist/wire/dictatesetup.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/messages/hostcore.d.ts +22 -1
- package/node_modules/@waterplane/shared/dist/wire/skills.d.ts +142 -0
- package/node_modules/@waterplane/shared/dist/wire/skills.js +6 -0
- package/node_modules/@waterplane/shared/dist/wire/skills.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/sysstat.d.ts +17 -0
- package/node_modules/@waterplane/shared/dist/wire/telemetry.d.ts +4 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/packages/extensions/diskspace/waterplane-plugin.json +16 -0
- package/packages/extensions/links/waterplane-plugin.json +18 -0
- package/packages/host/dist/agentclass.d.ts +42 -31
- package/packages/host/dist/agentclass.js +155 -5
- package/packages/host/dist/agentclass.js.map +1 -1
- package/packages/host/dist/agentmarkers.d.ts +49 -0
- package/packages/host/dist/agentmarkers.js +255 -0
- package/packages/host/dist/agentmarkers.js.map +1 -0
- package/packages/host/dist/agentreadings.d.ts +30 -2
- package/packages/host/dist/agentreadings.js +89 -7
- package/packages/host/dist/agentreadings.js.map +1 -1
- package/packages/host/dist/agentscan.d.ts +1 -1
- package/packages/host/dist/agentscan.js +107 -9
- package/packages/host/dist/agentscan.js.map +1 -1
- package/packages/host/dist/archive.js +9 -3
- package/packages/host/dist/archive.js.map +1 -1
- package/packages/host/dist/artifacts.js +4 -7
- package/packages/host/dist/artifacts.js.map +1 -1
- package/packages/host/dist/askrules.js +12 -4
- package/packages/host/dist/askrules.js.map +1 -1
- package/packages/host/dist/auth.d.ts +1 -0
- package/packages/host/dist/auth.js +5 -3
- package/packages/host/dist/auth.js.map +1 -1
- package/packages/host/dist/autopull.js +4 -8
- package/packages/host/dist/autopull.js.map +1 -1
- package/packages/host/dist/backends/claude.js +1 -0
- package/packages/host/dist/backends/claude.js.map +1 -1
- package/packages/host/dist/backends/derive.js +3 -1
- package/packages/host/dist/backends/derive.js.map +1 -1
- package/packages/host/dist/binguard.js +19 -2
- package/packages/host/dist/binguard.js.map +1 -1
- package/packages/host/dist/capture.js +7 -10
- package/packages/host/dist/capture.js.map +1 -1
- package/packages/host/dist/clifixtures.d.ts +24 -4
- package/packages/host/dist/clifixtures.js +50 -10
- package/packages/host/dist/clifixtures.js.map +1 -1
- package/packages/host/dist/clihealth.d.ts +8 -2
- package/packages/host/dist/clihealth.js +11 -3
- package/packages/host/dist/clihealth.js.map +1 -1
- package/packages/host/dist/costwindow.js +4 -2
- package/packages/host/dist/costwindow.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxagents.d.ts +2 -0
- package/packages/host/dist/ctxlog/ctxagents.js +5 -5
- package/packages/host/dist/ctxlog/ctxagents.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxcursor.d.ts +2 -0
- package/packages/host/dist/ctxlog/ctxcursor.js +2 -2
- package/packages/host/dist/ctxlog/ctxcursor.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxupdate.js +11 -6
- package/packages/host/dist/ctxlog/ctxupdate.js.map +1 -1
- package/packages/host/dist/deliver/deliverknobs.d.ts +0 -2
- package/packages/host/dist/deliver/deliverknobs.js +0 -2
- package/packages/host/dist/deliver/deliverknobs.js.map +1 -1
- package/packages/host/dist/deliver/deliverproof.d.ts +3 -2
- package/packages/host/dist/deliver/deliverproof.js +9 -8
- package/packages/host/dist/deliver/deliverproof.js.map +1 -1
- package/packages/host/dist/deliver/deliverreturn.d.ts +3 -2
- package/packages/host/dist/deliver/deliverreturn.js +13 -12
- package/packages/host/dist/deliver/deliverreturn.js.map +1 -1
- package/packages/host/dist/deliver/deliverrun.js +20 -18
- package/packages/host/dist/deliver/deliverrun.js.map +1 -1
- package/packages/host/dist/deliver/deliverscreen.d.ts +2 -1
- package/packages/host/dist/deliver/deliverscreen.js +9 -8
- package/packages/host/dist/deliver/deliverscreen.js.map +1 -1
- package/packages/host/dist/deliver/delivertypes.d.ts +4 -0
- package/packages/host/dist/deliver.js +2 -1
- package/packages/host/dist/deliver.js.map +1 -1
- package/packages/host/dist/dictate.d.ts +11 -0
- package/packages/host/dist/dictate.js +20 -10
- package/packages/host/dist/dictate.js.map +1 -1
- package/packages/host/dist/dictatesetup.d.ts +54 -0
- package/packages/host/dist/dictatesetup.js +261 -0
- package/packages/host/dist/dictatesetup.js.map +1 -0
- package/packages/host/dist/doctor.js +1 -1
- package/packages/host/dist/doctor.js.map +1 -1
- package/packages/host/dist/exposurepush.js +2 -2
- package/packages/host/dist/exposurepush.js.map +1 -1
- package/packages/host/dist/extensions/diskspace/host/candidates.d.mts +180 -0
- package/packages/host/dist/extensions/diskspace/host/candidates.mjs +716 -0
- package/packages/host/dist/extensions/diskspace/host/candidates.mjs.map +1 -0
- package/packages/host/dist/extensions/diskspace/host/engine.d.mts +21 -0
- package/packages/host/dist/extensions/diskspace/host/engine.mjs +498 -0
- package/packages/host/dist/extensions/diskspace/host/engine.mjs.map +1 -0
- package/packages/host/dist/extensions/diskspace/host/index.d.mts +25 -0
- package/packages/host/dist/extensions/diskspace/host/index.mjs +135 -0
- package/packages/host/dist/extensions/diskspace/host/index.mjs.map +1 -0
- package/packages/host/dist/extensions/diskspace/host/large.d.mts +11 -0
- package/packages/host/dist/extensions/diskspace/host/large.mjs +56 -0
- package/packages/host/dist/extensions/diskspace/host/large.mjs.map +1 -0
- package/packages/host/dist/extensions/diskspace/host/run.d.mts +94 -0
- package/packages/host/dist/extensions/diskspace/host/run.mjs +200 -0
- package/packages/host/dist/extensions/diskspace/host/run.mjs.map +1 -0
- package/packages/host/dist/extensions/diskspace/shared/wire.d.mts +197 -0
- package/packages/host/dist/extensions/diskspace/shared/wire.mjs +23 -0
- package/packages/host/dist/extensions/diskspace/shared/wire.mjs.map +1 -0
- package/packages/host/dist/extensions/links/host/engine.d.mts +39 -0
- package/packages/host/dist/extensions/links/host/engine.mjs +285 -0
- package/packages/host/dist/extensions/links/host/engine.mjs.map +1 -0
- package/packages/host/dist/extensions/links/host/index.d.mts +10 -0
- package/packages/host/dist/extensions/links/host/index.mjs +72 -0
- package/packages/host/dist/extensions/links/host/index.mjs.map +1 -0
- package/packages/host/dist/extensions/links/host/parse.d.mts +61 -0
- package/packages/host/dist/extensions/links/host/parse.mjs +225 -0
- package/packages/host/dist/extensions/links/host/parse.mjs.map +1 -0
- package/packages/host/dist/extensions/links/host/run.d.mts +15 -0
- package/packages/host/dist/extensions/links/host/run.mjs +32 -0
- package/packages/host/dist/extensions/links/host/run.mjs.map +1 -0
- package/packages/host/dist/extensions/links/host/store.d.mts +11 -0
- package/packages/host/dist/extensions/links/host/store.mjs +76 -0
- package/packages/host/dist/extensions/links/host/store.mjs.map +1 -0
- package/packages/host/dist/extensions/links/shared/wire.d.mts +141 -0
- package/packages/host/dist/extensions/links/shared/wire.mjs +20 -0
- package/packages/host/dist/extensions/links/shared/wire.mjs.map +1 -0
- package/packages/host/dist/git.d.ts +5 -3
- package/packages/host/dist/git.js +16 -28
- package/packages/host/dist/git.js.map +1 -1
- package/packages/host/dist/halt.js +16 -3
- package/packages/host/dist/halt.js.map +1 -1
- package/packages/host/dist/jsonstore.d.ts +16 -4
- package/packages/host/dist/jsonstore.js +32 -8
- package/packages/host/dist/jsonstore.js.map +1 -1
- package/packages/host/dist/landedbase.d.ts +41 -0
- package/packages/host/dist/landedbase.js +59 -0
- package/packages/host/dist/landedbase.js.map +1 -0
- package/packages/host/dist/lantls.js +2 -2
- package/packages/host/dist/lantls.js.map +1 -1
- package/packages/host/dist/limitretry.js +2 -3
- package/packages/host/dist/limitretry.js.map +1 -1
- package/packages/host/dist/localledger.js +9 -12
- package/packages/host/dist/localledger.js.map +1 -1
- package/packages/host/dist/main.js +2 -0
- package/packages/host/dist/main.js.map +1 -1
- package/packages/host/dist/opendeliveries.d.ts +4 -0
- package/packages/host/dist/opendeliveries.js +27 -1
- package/packages/host/dist/opendeliveries.js.map +1 -1
- package/packages/host/dist/plugins/setupcontrib.js +3 -2
- package/packages/host/dist/plugins/setupcontrib.js.map +1 -1
- package/packages/host/dist/pricefetch.d.ts +80 -0
- package/packages/host/dist/pricefetch.js +289 -0
- package/packages/host/dist/pricefetch.js.map +1 -0
- package/packages/host/dist/pricegap.d.ts +11 -0
- package/packages/host/dist/pricegap.js +30 -0
- package/packages/host/dist/pricegap.js.map +1 -0
- package/packages/host/dist/repohealthscopes.js +16 -24
- package/packages/host/dist/repohealthscopes.js.map +1 -1
- package/packages/host/dist/repos.d.ts +4 -0
- package/packages/host/dist/repos.js +1 -1
- package/packages/host/dist/repos.js.map +1 -1
- package/packages/host/dist/routes/apiagentpoints.d.ts +5 -0
- package/packages/host/dist/routes/apiagentpoints.js +48 -0
- package/packages/host/dist/routes/apiagentpoints.js.map +1 -0
- package/packages/host/dist/routes/apidictate.d.ts +2 -0
- package/packages/host/dist/routes/apidictate.js +27 -0
- package/packages/host/dist/routes/apidictate.js.map +1 -0
- package/packages/host/dist/routes/apihost.js +3 -2
- package/packages/host/dist/routes/apihost.js.map +1 -1
- package/packages/host/dist/routes/apirepofiles.js +3 -1
- package/packages/host/dist/routes/apirepofiles.js.map +1 -1
- package/packages/host/dist/routes/apirepowork.js +3 -2
- package/packages/host/dist/routes/apirepowork.js.map +1 -1
- package/packages/host/dist/routes/apiroutes.js +4 -1
- package/packages/host/dist/routes/apiroutes.js.map +1 -1
- package/packages/host/dist/routes/apiskills.d.ts +3 -0
- package/packages/host/dist/routes/apiskills.js +81 -0
- package/packages/host/dist/routes/apiskills.js.map +1 -0
- package/packages/host/dist/routes/apistats.js +2 -2
- package/packages/host/dist/routes/apistats.js.map +1 -1
- package/packages/host/dist/server/billingwire.js +5 -0
- package/packages/host/dist/server/billingwire.js.map +1 -1
- package/packages/host/dist/server/deliveries.d.ts +4 -1
- package/packages/host/dist/server/deliveries.js +38 -6
- package/packages/host/dist/server/deliveries.js.map +1 -1
- package/packages/host/dist/server/intentDeps.js +7 -6
- package/packages/host/dist/server/intentDeps.js.map +1 -1
- package/packages/host/dist/server/wsops.js +2 -1
- package/packages/host/dist/server/wsops.js.map +1 -1
- package/packages/host/dist/sessions/core.d.ts +1 -0
- package/packages/host/dist/sessions/ctxseries.js +7 -5
- package/packages/host/dist/sessions/ctxseries.js.map +1 -1
- package/packages/host/dist/sessions/drive.d.ts +6 -1
- package/packages/host/dist/sessions/drive.js +13 -10
- package/packages/host/dist/sessions/drive.js.map +1 -1
- package/packages/host/dist/sessions/record.js +16 -17
- package/packages/host/dist/sessions/record.js.map +1 -1
- package/packages/host/dist/sessions/sidechannel.js +1 -1
- package/packages/host/dist/sessions/sidechannel.js.map +1 -1
- package/packages/host/dist/sessions/turn.js +5 -0
- package/packages/host/dist/sessions/turn.js.map +1 -1
- package/packages/host/dist/sessions.d.ts +2 -1
- package/packages/host/dist/sessions.js +1 -1
- package/packages/host/dist/sessions.js.map +1 -1
- package/packages/host/dist/settle.d.ts +3 -2
- package/packages/host/dist/settle.js +13 -13
- package/packages/host/dist/settle.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/skills/skillinventory.d.ts +23 -0
- package/packages/host/dist/skills/skillinventory.js +275 -0
- package/packages/host/dist/skills/skillinventory.js.map +1 -0
- package/packages/host/dist/skills/skilllayers.d.ts +28 -0
- package/packages/host/dist/skills/skilllayers.js +73 -0
- package/packages/host/dist/skills/skilllayers.js.map +1 -0
- package/packages/host/dist/skills/skillrecommend.d.ts +42 -0
- package/packages/host/dist/skills/skillrecommend.js +171 -0
- package/packages/host/dist/skills/skillrecommend.js.map +1 -0
- package/packages/host/dist/skills/skillrefs.d.ts +2 -0
- package/packages/host/dist/skills/skillrefs.js +50 -0
- package/packages/host/dist/skills/skillrefs.js.map +1 -0
- package/packages/host/dist/skills/skilluse.d.ts +57 -0
- package/packages/host/dist/skills/skilluse.js +242 -0
- package/packages/host/dist/skills/skilluse.js.map +1 -0
- package/packages/host/dist/skills/skillweight.d.ts +18 -0
- package/packages/host/dist/skills/skillweight.js +69 -0
- package/packages/host/dist/skills/skillweight.js.map +1 -0
- package/packages/host/dist/skills/skillwrite.d.ts +56 -0
- package/packages/host/dist/skills/skillwrite.js +183 -0
- package/packages/host/dist/skills/skillwrite.js.map +1 -0
- package/packages/host/dist/sysstat.d.ts +34 -1
- package/packages/host/dist/sysstat.js +82 -14
- package/packages/host/dist/sysstat.js.map +1 -1
- package/packages/host/dist/tokenscan.js +5 -2
- package/packages/host/dist/tokenscan.js.map +1 -1
- package/packages/host/dist/tokenstats.js +7 -4
- package/packages/host/dist/tokenstats.js.map +1 -1
- package/packages/host/dist/transcript/transcriptparse.js +2 -2
- package/packages/host/dist/transcript/transcriptparse.js.map +1 -1
- package/packages/host/dist/waitclock.d.ts +12 -0
- package/packages/host/dist/waitclock.js +23 -0
- package/packages/host/dist/waitclock.js.map +1 -0
- package/packages/host/dist/worktreeleftover.js +13 -15
- package/packages/host/dist/worktreeleftover.js.map +1 -1
- package/packages/web/dist/assets/demo-DHkwSmU5.js +26 -0
- package/packages/web/dist/assets/{icons-D8RlmSLR.js → icons-5lVTFNUU.js} +1 -1
- package/packages/web/dist/assets/index-Bh4cH6X8.js +170 -0
- package/packages/web/dist/assets/index-F7VHtsLI.css +1 -0
- package/packages/web/dist/assets/shared-BvQMg9ra.js +51 -0
- package/packages/web/dist/assets/sheets-Cwi72V02.js +257 -0
- package/packages/web/dist/assets/sheets-DjU2XiUd.css +1 -0
- package/packages/web/dist/build-id.txt +1 -1
- package/packages/web/dist/buildstamp.json +1 -1
- package/packages/web/dist/index.html +7 -7
- package/packages/web/dist/sw.js +2 -2
- package/release.json +11 -3
- package/packages/web/dist/assets/demo-mKJo0QVO.js +0 -26
- package/packages/web/dist/assets/index-B6f7Lcp1.js +0 -170
- package/packages/web/dist/assets/index-DQIK94fc.css +0 -1
- package/packages/web/dist/assets/shared-Cd69oxHd.js +0 -51
- package/packages/web/dist/assets/sheets-BImsk1_Y.js +0 -256
- package/packages/web/dist/assets/sheets-DoUhPGK0.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,35 @@ version — so entries are grouped by the release they shipped in. A fixed secur
|
|
|
5
5
|
vulnerability in what ships is listed under a **Security:** bullet of the release that
|
|
6
6
|
fixed it, with its CVE or GHSA id when one exists.
|
|
7
7
|
|
|
8
|
+
## 0.1.26
|
|
9
|
+
|
|
10
|
+
### New
|
|
11
|
+
|
|
12
|
+
- **Dollar figures now come from Anthropic's published price list.** The host reads the price page once a day and at boot, and keeps the last good read. Token stats and the VS Code status bar say which list priced a figure and when it was read. Past spend re-prices when the rates change. A desktop setup row shows the state, and `WATERPLANE_PRICE_FETCH=0` turns it off.
|
|
13
|
+
- **A "skills & plugins" screen switches skills and plugins on and off per repo.** You edit a draft, pick the level, and save to one named settings file. Each row shows its weight and how often it was used. Skills an author has locked count nothing and say so. Doors lead to it from the context-weight row and the request breakdown.
|
|
14
|
+
- **Recommend suggests which skills to switch off.** It is one tapped call that returns a pre-ticked list with the savings. Nothing applies until you tap Apply.
|
|
15
|
+
- **Token stats have an "Agent readings over time" card.** It shows start context, looks before the first edit, requests per committing session and subagent start, by day or week. Markers show where instructions, model, CLI version, memory or skills changed. Tapping a marker compares 14 days before and after, with the band of normal variation.
|
|
16
|
+
- **Disk space ships in the release, off until you switch it on.** It now covers Linux and Windows through WSL, including Windows caches and old temp files. The scan runs in two parts, so rows appear as soon as the fast part is measured.
|
|
17
|
+
- **Links ships in the release, off until you switch it on.** Its cloud search uses this desktop's gcloud sign-in.
|
|
18
|
+
- **Snippets can be ticked and inserted together, one per line.** A plain tap on a row still inserts one at once. The most recently used come first on this phone. A person with no list sees eight starter snippets.
|
|
19
|
+
- **Local dictation can be set up from a tap.** The Settings row shows the state, model choice, progress and any failure reason. The installer has an optional `--dictation` step. The fallback pill says the phone recogniser is weaker and may send audio to Google.
|
|
20
|
+
- **A busy CPU on the desktop sheet names the culprits.** At 80% or more it lists the top three programs and the coding sessions behind it. Tapping a session opens it.
|
|
21
|
+
- **The speed-test sheet has a connection test.** It makes 20 timed round trips and gives the median, jitter, best and worst, lost packets and a one-sentence verdict. Connection health and the desktop's edit form have doors to the connection test, the speed test and the desktop addresses.
|
|
22
|
+
- **Reader tables wrap long prose columns instead of scrolling sideways.** Short cells stay on one line. A toggle goes back to one line per row.
|
|
23
|
+
- **The model wheel button shows a Sparkles badge when the CLI confirmed ultracode is on.**
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **A retry now wakes the phone when the link drops in a pocket.** Before, a lost socket could stay lost for minutes until the screen came on.
|
|
28
|
+
- **A prompt no longer overtakes the picture it names.** A failed upload holds back the prompt that names it. The host also waits up to 5 minutes for fresh inbox files before typing.
|
|
29
|
+
- **The first prompt sent on a new screen while offline now rides inside the create.** The desktop types it once the link is back, even if the link comes back only briefly.
|
|
30
|
+
- **Words written on a pending screen that nothing can reach any more go to the pad.** Before, they were lost after the X or a retry.
|
|
31
|
+
- **The close check no longer reads an unknown unmerged count as nothing to lose.** It now says so. It also measures against the right base branch in repos that don't use main or master.
|
|
32
|
+
- **The update button no longer refuses because an agent ran an install in some repo.** Only an install that names the CLI's package counts.
|
|
33
|
+
- **The network retry card keeps its text readable.** The line and error sit above the buttons, and Retry now also works while waiting.
|
|
34
|
+
- **The request chip stays hidden while the link is connecting.** The header already says so.
|
|
35
|
+
- **Screens that also run in a desktop browser say "this device", not "this phone".**
|
|
36
|
+
|
|
8
37
|
## 0.1.25
|
|
9
38
|
|
|
10
39
|
### New
|
package/SECURITY.md
CHANGED
|
@@ -54,8 +54,9 @@ authorized caller can do once inside.**
|
|
|
54
54
|
"loopback" there means any process on the Windows machine, the same local-machine boundary as on a
|
|
55
55
|
Mac. The `Origin`/`Host` checks still apply to browsers on it.
|
|
56
56
|
- Never bind a public interface. `WATERPLANE_ALLOW_PUBLIC=1` adds LAN interfaces behind a password gate
|
|
57
|
-
(below) and is an explicit opt-in.
|
|
58
|
-
that network is not trusted, do not enable it.
|
|
57
|
+
(below) and is an explicit opt-in. A browser on the LAN speaks plain HTTP, which has no defence against
|
|
58
|
+
a man in the middle: if that network is not trusted, do not enable it. The Android app instead
|
|
59
|
+
reaches the desktop on the encrypted LAN port with a pinned key (see LAN TLS and the pin).
|
|
59
60
|
|
|
60
61
|
### In scope
|
|
61
62
|
|
|
@@ -368,8 +369,9 @@ itself arrives unprotected, and the token is still exposed to the relay.
|
|
|
368
369
|
|
|
369
370
|
(`packages/host/src/lantls.ts`.) Only where `WATERPLANE_ALLOW_PUBLIC=1` already binds LAN addresses, the
|
|
370
371
|
host also listens on `WATERPLANE_TLS_PORT` (default port + 1) on those same addresses, with the same
|
|
371
|
-
handler and gate, so a caller there is still peer kind `lan` and needs its token.
|
|
372
|
-
`WATERPLANE_TLS=0`;
|
|
372
|
+
handler and gate, so a caller there is still peer kind `lan` and needs its token. It is on by default
|
|
373
|
+
with the opt-in and off with `WATERPLANE_TLS=0`; a busy port is logged and the host carries on plain.
|
|
374
|
+
Never on loopback or the tailnet; nothing without the opt-in.
|
|
373
375
|
|
|
374
376
|
The key is P-256 in `<state dir>/lan-tls.json` (0600), kept across restarts. The certificate is
|
|
375
377
|
self-signed and re-issued on the same key when the addresses change, so the phone's pin (SHA-256 of the
|
|
@@ -387,6 +389,14 @@ from a CA; a self-signed one is read as self-signed) it serves the app, and the
|
|
|
387
389
|
- A first install of the APK over the network (Android accepts any signature then).
|
|
388
390
|
- Code already running in the page, a browser, and dropping packets.
|
|
389
391
|
|
|
392
|
+
The app learns the desktop's key over Tailscale (or a sealed pairing) and pins it per saved desktop. In
|
|
393
|
+
the Edit desktop screen the Wi-Fi address is typed plain (`192.168.0.64` or `http://192.168.0.64:8770`):
|
|
394
|
+
the app then dials `https://<ip>:8771` with the pin by itself. A typed `https://` bare IP is dialled as
|
|
395
|
+
written (the plain port never speaks TLS) and is never matched to the pin, so the screen offers "use
|
|
396
|
+
<ip>"; an `https` name, such as a front door with a real certificate, is left alone. The screen says per
|
|
397
|
+
row whether the link is encrypted, not yet encrypted (the key is learned by itself on the next
|
|
398
|
+
Tailscale connection) or cannot be (an old APK).
|
|
399
|
+
|
|
390
400
|
The pin is a property of current APK builds; an older APK ignores it and stays on plain LAN with the
|
|
391
401
|
warnings. The way out of a pinned desktop whose TLS port is off is a confirmed "use plain HTTP for this
|
|
392
402
|
desktop" on its row; nothing does it by itself. The measurements behind this, taken on two emulator
|
|
@@ -495,6 +505,16 @@ the accident, not a wrapper script the rule cannot see or an agent talking you i
|
|
|
495
505
|
directory entry counts) neither descend into nor list the contents of a link whose target is outside
|
|
496
506
|
the worktree; the link itself is shown as a link, nothing more.
|
|
497
507
|
|
|
508
|
+
### Outbound reads the host makes on its own
|
|
509
|
+
|
|
510
|
+
- **Anthropic's price page** (`pricefetch.ts`): one `GET` of the fixed HTTPS URL
|
|
511
|
+
`platform.claude.com/docs/en/about-claude/pricing.md`, at boot when the last read is over a day old,
|
|
512
|
+
once a day, and at most hourly when a ledger meets an unpriced Claude model. Generic user agent
|
|
513
|
+
(`waterplane-pricecheck`), no cookies, no identifiers, no body. A redirect is followed only to
|
|
514
|
+
HTTPS on `claude.com` or `anthropic.com` (or a subdomain); anywhere else is refused. The answer is
|
|
515
|
+
parsed strictly and a page that does not parse changes no price. The phone gets the host's read in
|
|
516
|
+
`welcome` and never fetches it itself. `WATERPLANE_PRICE_FETCH=0` turns it off.
|
|
517
|
+
|
|
498
518
|
### A repo's own repo-health engine
|
|
499
519
|
|
|
500
520
|
(`tools/repohealth.mjs`, run by the host after one approval, `repohealthapproval.ts`.) The engine is
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CompareOpts, CompareResult, SeriesAbsent, SeriesPoint } from "./types.js";
|
|
2
|
+
export declare const COMPARE_DEFAULT_DAYS = 14;
|
|
3
|
+
/** Fewest day blocks on each side. */
|
|
4
|
+
export declare const COMPARE_MIN_DAYS = 4;
|
|
5
|
+
/** Fewest sessions on each side. */
|
|
6
|
+
export declare const COMPARE_MIN_N = 10;
|
|
7
|
+
export declare const COMPARE_PERMUTATIONS = 500;
|
|
8
|
+
export declare function compareAround(points: readonly SeriesPoint[], atMs: number, opts: CompareOpts): CompareResult | SeriesAbsent;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `compareAround` — one reading `days` before an instant against `days` after it,
|
|
3
|
+
* beside the band of ratios day-to-day variation alone produces.
|
|
4
|
+
*
|
|
5
|
+
* The band: every session keeps its value, but the DAY blocks of the window
|
|
6
|
+
* (a day the instant splits is two blocks) are shuffled between the two sides,
|
|
7
|
+
* keeping each side's block count, and the pooled-median ratio is taken again —
|
|
8
|
+
* `COMPARE_PERMUTATIONS` times from a fixed seed, so the same data always gives
|
|
9
|
+
* the same band. Days, not sessions, are shuffled because sessions on one day
|
|
10
|
+
* are alike (same task, same cache), which a session shuffle would hide and
|
|
11
|
+
* draw the band too narrow. The band is its 2.5–97.5 percentiles.
|
|
12
|
+
*
|
|
13
|
+
* Same model only: a window whose sessions ran more than one model id (or do
|
|
14
|
+
* not say which) is ABSENT unless a model is named — a model change moves these
|
|
15
|
+
* readings more than any instruction edit does.
|
|
16
|
+
*/
|
|
17
|
+
import { addLocalDays } from "../calday.js";
|
|
18
|
+
import { seriesFilter, seriesReadingOf } from "./series.js";
|
|
19
|
+
import { localDayOf, medianOf, percentileSorted, seededRandom } from "./stats.js";
|
|
20
|
+
export const COMPARE_DEFAULT_DAYS = 14;
|
|
21
|
+
/** Fewest day blocks on each side. */
|
|
22
|
+
export const COMPARE_MIN_DAYS = 4;
|
|
23
|
+
/** Fewest sessions on each side. */
|
|
24
|
+
export const COMPARE_MIN_N = 10;
|
|
25
|
+
export const COMPARE_PERMUTATIONS = 500;
|
|
26
|
+
const SEED = 0x5eed2a11;
|
|
27
|
+
const absent = (why) => ({ absent: why });
|
|
28
|
+
/** Pooled-median ratio after/before of a split of the blocks; null when the before median is 0 or a side is empty. */
|
|
29
|
+
function ratioOf(blocks, isBefore) {
|
|
30
|
+
const b = [];
|
|
31
|
+
const a = [];
|
|
32
|
+
blocks.forEach((bl, i) => (isBefore(i) ? b : a).push(...bl.vals));
|
|
33
|
+
const mb = medianOf(b);
|
|
34
|
+
const ma = medianOf(a);
|
|
35
|
+
if (mb === null || ma === null || mb <= 0)
|
|
36
|
+
return null;
|
|
37
|
+
return { before: mb, after: ma, ratio: ma / mb };
|
|
38
|
+
}
|
|
39
|
+
export function compareAround(points, atMs, opts) {
|
|
40
|
+
if (!Number.isFinite(atMs))
|
|
41
|
+
return absent("No instant to compare around.");
|
|
42
|
+
const days = Math.max(1, Math.min(90, Math.floor(opts.days ?? COMPARE_DEFAULT_DAYS)));
|
|
43
|
+
const lo = addLocalDays(atMs, -days);
|
|
44
|
+
const hi = addLocalDays(atMs, days);
|
|
45
|
+
const inWin = seriesFilter(points, opts)
|
|
46
|
+
.filter((p) => p.t0 >= lo && p.t0 < hi && seriesReadingOf(p, opts.reading) !== undefined);
|
|
47
|
+
let model = opts.model;
|
|
48
|
+
if (model === undefined) {
|
|
49
|
+
const models = new Set(inWin.map((p) => p.model ?? ""));
|
|
50
|
+
if (models.has(""))
|
|
51
|
+
return absent("Some of these sessions do not record their model, so a model change in the window cannot be ruled out.");
|
|
52
|
+
if (models.size > 1)
|
|
53
|
+
return absent(`More than one model ran in this window (${[...models].sort().join(", ")}); compare one model at a time.`);
|
|
54
|
+
model = models.size === 1 ? [...models][0] : undefined;
|
|
55
|
+
}
|
|
56
|
+
const byKey = new Map();
|
|
57
|
+
for (const p of inWin) {
|
|
58
|
+
const before = p.t0 < atMs;
|
|
59
|
+
const key = `${localDayOf(p.t0)}|${before ? "b" : "a"}`;
|
|
60
|
+
const bl = byKey.get(key) ?? { before, vals: [] };
|
|
61
|
+
bl.vals.push(seriesReadingOf(p, opts.reading));
|
|
62
|
+
byKey.set(key, bl);
|
|
63
|
+
}
|
|
64
|
+
const blocks = [...byKey.keys()].sort().map((k) => byKey.get(k));
|
|
65
|
+
const daysBefore = blocks.filter((b) => b.before).length;
|
|
66
|
+
const daysAfter = blocks.length - daysBefore;
|
|
67
|
+
const nBefore = blocks.filter((b) => b.before).reduce((s, b) => s + b.vals.length, 0);
|
|
68
|
+
const nAfter = inWin.length - nBefore;
|
|
69
|
+
if (daysBefore < COMPARE_MIN_DAYS || daysAfter < COMPARE_MIN_DAYS) {
|
|
70
|
+
return absent(`${daysBefore} days with sessions before and ${daysAfter} after; a comparison needs at least ${COMPARE_MIN_DAYS} on each side.`);
|
|
71
|
+
}
|
|
72
|
+
if (nBefore < COMPARE_MIN_N || nAfter < COMPARE_MIN_N) {
|
|
73
|
+
return absent(`${nBefore} sessions before and ${nAfter} after; a comparison needs at least ${COMPARE_MIN_N} on each side.`);
|
|
74
|
+
}
|
|
75
|
+
const seen = ratioOf(blocks, (i) => blocks[i].before);
|
|
76
|
+
if (!seen)
|
|
77
|
+
return absent("The median before is 0, so there is no ratio to take.");
|
|
78
|
+
const rand = seededRandom(SEED);
|
|
79
|
+
const order = blocks.map((_, i) => i);
|
|
80
|
+
const ratios = [];
|
|
81
|
+
for (let k = 0; k < COMPARE_PERMUTATIONS; k++) {
|
|
82
|
+
for (let i = order.length - 1; i > 0; i--) {
|
|
83
|
+
const j = Math.floor(rand() * (i + 1));
|
|
84
|
+
[order[i], order[j]] = [order[j], order[i]];
|
|
85
|
+
}
|
|
86
|
+
const sideOf = new Array(blocks.length);
|
|
87
|
+
order.forEach((blockIdx, pos) => { sideOf[blockIdx] = pos < daysBefore; });
|
|
88
|
+
const r = ratioOf(blocks, (i) => sideOf[i]);
|
|
89
|
+
if (r)
|
|
90
|
+
ratios.push(r.ratio);
|
|
91
|
+
}
|
|
92
|
+
if (ratios.length < COMPARE_PERMUTATIONS / 2)
|
|
93
|
+
return absent("Too many shuffled splits had a median of 0 before to draw a band.");
|
|
94
|
+
ratios.sort((x, y) => x - y);
|
|
95
|
+
const band = [percentileSorted(ratios, 0.025), percentileSorted(ratios, 0.975)];
|
|
96
|
+
return {
|
|
97
|
+
before: seen.before, after: seen.after, ratio: seen.ratio, band,
|
|
98
|
+
inside: seen.ratio >= band[0] && seen.ratio <= band[1],
|
|
99
|
+
nBefore, nAfter, daysBefore, daysAfter,
|
|
100
|
+
...(model !== undefined ? { model } : {}),
|
|
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/D,MAAM,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;QACtD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS;QACtC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgentMarker, SeriesPoint } from "./types.js";
|
|
2
|
+
/** A day-median of a listing's chars moving by at least this much is a marker. */
|
|
3
|
+
export declare const LISTING_STEP_CHARS = 1000;
|
|
4
|
+
/** Fewest sessions a day needs before its dominant model/CLI or listing median counts. */
|
|
5
|
+
export declare const MARKER_MIN_N = 3;
|
|
6
|
+
/** Fold same-kind markers of one local day (and one repo) into one carrying `count`; sorted by time. */
|
|
7
|
+
export declare function collapseMarkers(markers: readonly AgentMarker[]): AgentMarker[];
|
|
8
|
+
/**
|
|
9
|
+
* Markers derived from the points: model, CLI version, memory and skills-listing steps.
|
|
10
|
+
* `listings: false` leaves the last two out: memory is each project's own index and the skills
|
|
11
|
+
* listing includes project skills, so a day median pooled over several repos moves when the repo
|
|
12
|
+
* mix does, which would read as an instruction change. Pooled (no `repo`) callers pass it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function derivedMarkers(points: readonly SeriesPoint[], opts?: {
|
|
15
|
+
repo?: string;
|
|
16
|
+
listings?: boolean;
|
|
17
|
+
}): AgentMarker[];
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Markers the points themselves show — the competing explanations drawn on the
|
|
3
|
+
* same axis as the readings: the model changed, a new CLI version took over,
|
|
4
|
+
* the memory or skills listing a fresh session carries stepped. Plus
|
|
5
|
+
* `collapseMarkers`, the ONE fold of same-kind markers on one local day
|
|
6
|
+
* (the host's git markers go through it too).
|
|
7
|
+
*
|
|
8
|
+
* Words are neutral: a marker says what changed and by how much, never whether
|
|
9
|
+
* that was good.
|
|
10
|
+
*/
|
|
11
|
+
import { hourKeyMs } from "../costwindow.js";
|
|
12
|
+
import { seriesReadingOf } from "./series.js";
|
|
13
|
+
import { localDayOf, medianOf } from "./stats.js";
|
|
14
|
+
/** A day-median of a listing's chars moving by at least this much is a marker. */
|
|
15
|
+
export const LISTING_STEP_CHARS = 1000;
|
|
16
|
+
/** Fewest sessions a day needs before its dominant model/CLI or listing median counts. */
|
|
17
|
+
export const MARKER_MIN_N = 3;
|
|
18
|
+
const dayStart = (day) => hourKeyMs(`${day}T00`);
|
|
19
|
+
const fmt = (n) => Math.round(n).toLocaleString("en-US");
|
|
20
|
+
/** The value held by more than half of `xs`, else null (a split day names no winner). */
|
|
21
|
+
function dominant(xs) {
|
|
22
|
+
if (xs.length < MARKER_MIN_N)
|
|
23
|
+
return null;
|
|
24
|
+
const c = new Map();
|
|
25
|
+
for (const x of xs)
|
|
26
|
+
c.set(x, (c.get(x) ?? 0) + 1);
|
|
27
|
+
for (const [k, n] of c)
|
|
28
|
+
if (n * 2 > xs.length)
|
|
29
|
+
return k;
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
/** Fold same-kind markers of one local day (and one repo) into one carrying `count`; sorted by time. */
|
|
33
|
+
export function collapseMarkers(markers) {
|
|
34
|
+
const by = new Map();
|
|
35
|
+
for (const m of markers) {
|
|
36
|
+
if (!m || !Number.isFinite(m.t))
|
|
37
|
+
continue;
|
|
38
|
+
const k = `${localDayOf(m.t)}|${m.kind}|${m.repo ?? ""}`;
|
|
39
|
+
const list = by.get(k);
|
|
40
|
+
if (list)
|
|
41
|
+
list.push(m);
|
|
42
|
+
else
|
|
43
|
+
by.set(k, [m]);
|
|
44
|
+
}
|
|
45
|
+
const out = [];
|
|
46
|
+
for (const list of by.values()) {
|
|
47
|
+
list.sort((a, b) => a.t - b.t);
|
|
48
|
+
const total = list.reduce((s, m) => s + (m.count ?? 1), 0);
|
|
49
|
+
if (total === 1) {
|
|
50
|
+
out.push(list[0]);
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const last = list[list.length - 1];
|
|
54
|
+
const labels = [...new Set(list.map((m) => m.label))];
|
|
55
|
+
out.push({
|
|
56
|
+
...last,
|
|
57
|
+
t: list[0].t,
|
|
58
|
+
count: total,
|
|
59
|
+
detail: labels.slice(0, 5).join("; ") + (labels.length > 5 ? `; and ${labels.length - 5} more` : ""),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return out.sort((a, b) => a.t - b.t || a.kind.localeCompare(b.kind));
|
|
63
|
+
}
|
|
64
|
+
const LISTINGS = [
|
|
65
|
+
{ part: "memory", kind: "memory", words: "memory" },
|
|
66
|
+
{ part: "skills", kind: "skills", words: "skills listing" },
|
|
67
|
+
];
|
|
68
|
+
/**
|
|
69
|
+
* Markers derived from the points: model, CLI version, memory and skills-listing steps.
|
|
70
|
+
* `listings: false` leaves the last two out: memory is each project's own index and the skills
|
|
71
|
+
* listing includes project skills, so a day median pooled over several repos moves when the repo
|
|
72
|
+
* mix does, which would read as an instruction change. Pooled (no `repo`) callers pass it.
|
|
73
|
+
*/
|
|
74
|
+
export function derivedMarkers(points, opts = {}) {
|
|
75
|
+
const byDay = new Map();
|
|
76
|
+
for (const p of points) {
|
|
77
|
+
if (!p || !Number.isFinite(p.t0) || p.fresh !== true || p.sub === true)
|
|
78
|
+
continue;
|
|
79
|
+
if (opts.repo !== undefined && p.repo !== opts.repo)
|
|
80
|
+
continue;
|
|
81
|
+
const d = localDayOf(p.t0);
|
|
82
|
+
const list = byDay.get(d);
|
|
83
|
+
if (list)
|
|
84
|
+
list.push(p);
|
|
85
|
+
else
|
|
86
|
+
byDay.set(d, [p]);
|
|
87
|
+
}
|
|
88
|
+
const days = [...byDay.keys()].sort();
|
|
89
|
+
const repo = opts.repo !== undefined ? { repo: opts.repo } : {};
|
|
90
|
+
const out = [];
|
|
91
|
+
let prevModel = null;
|
|
92
|
+
const cliSeen = new Set();
|
|
93
|
+
const prevListing = new Map();
|
|
94
|
+
for (const day of days) {
|
|
95
|
+
const ps = byDay.get(day);
|
|
96
|
+
const t = dayStart(day);
|
|
97
|
+
const model = dominant(ps.map((p) => p.model).filter((m) => typeof m === "string" && m !== ""));
|
|
98
|
+
if (model !== null) {
|
|
99
|
+
if (prevModel !== null && model !== prevModel)
|
|
100
|
+
out.push({ t, kind: "model", label: `model ${prevModel} to ${model}`, ...repo });
|
|
101
|
+
prevModel = model;
|
|
102
|
+
}
|
|
103
|
+
const cli = dominant(ps.map((p) => p.cli).filter((c) => typeof c === "string" && c !== ""));
|
|
104
|
+
if (cli !== null && !cliSeen.has(cli)) {
|
|
105
|
+
if (cliSeen.size > 0)
|
|
106
|
+
out.push({ t, kind: "cli", label: `CLI ${cli}`, ...repo });
|
|
107
|
+
cliSeen.add(cli);
|
|
108
|
+
}
|
|
109
|
+
const startSet = ps.filter((p) => seriesReadingOf(p, "start") !== undefined);
|
|
110
|
+
for (const { part, kind, words } of opts.listings === false ? [] : LISTINGS) {
|
|
111
|
+
const xs = startSet.map((p) => p.parts?.[part]).filter((x) => typeof x === "number" && Number.isFinite(x));
|
|
112
|
+
if (xs.length < MARKER_MIN_N)
|
|
113
|
+
continue;
|
|
114
|
+
const med = medianOf(xs);
|
|
115
|
+
const prev = prevListing.get(part);
|
|
116
|
+
if (prev !== undefined && Math.abs(med - prev) >= LISTING_STEP_CHARS) {
|
|
117
|
+
const d = med - prev;
|
|
118
|
+
out.push({ t, kind, label: `${words} ${d > 0 ? "+" : "−"}${fmt(Math.abs(d))} chars`, detail: `${fmt(prev)} to ${fmt(med)} chars, day median`, ...repo });
|
|
119
|
+
}
|
|
120
|
+
prevListing.set(part, med);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return collapseMarkers(out);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=markers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YACxH,IAAI,EAAE,CAAC,MAAM,GAAG,YAAY;gBAAE,SAAS;YACvC,MAAM,GAAG,GAAG,QAAQ,CAAC,EAAE,CAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,kBAAkB,EAAE,CAAC;gBACrE,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;gBACrB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,oBAAoB,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;YAC3J,CAAC;YACD,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SeriesBucket, SeriesOpts, SeriesPoint, SeriesReading } from "./types.js";
|
|
2
|
+
/** Fewest sessions a bucket's median is taken over. */
|
|
3
|
+
export declare const SERIES_MIN_N = 5;
|
|
4
|
+
/** The value `p` contributes to `reading`, or undefined when it is not one of that reading's sessions. */
|
|
5
|
+
export declare function seriesReadingOf(p: SeriesPoint, reading: SeriesReading): number | undefined;
|
|
6
|
+
/** The sentence for too few sessions behind a reading. */
|
|
7
|
+
export declare function seriesTooFewText(n: number, reading: SeriesReading | "part", min?: number): string;
|
|
8
|
+
/** Points kept by the model/repo filters (a model filter drops points with no model id). */
|
|
9
|
+
export declare function seriesFilter(points: readonly SeriesPoint[], opts: {
|
|
10
|
+
model?: string;
|
|
11
|
+
repo?: string;
|
|
12
|
+
}): SeriesPoint[];
|
|
13
|
+
/** The bucket key of an instant: its local day, or the Monday of that day's ISO week. */
|
|
14
|
+
export declare function seriesBucketKey(t: number, grain: "day" | "week"): string | null;
|
|
15
|
+
/** The readings per bucket, oldest first; only buckets holding at least one point. */
|
|
16
|
+
export declare function seriesOf(points: readonly SeriesPoint[], opts: SeriesOpts): SeriesBucket[];
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `seriesOf` — the agent readings per local day or ISO week.
|
|
3
|
+
*
|
|
4
|
+
* Which sessions each reading is over (`seriesReadingOf` is the ONE answer, the
|
|
5
|
+
* before/after uses it too):
|
|
6
|
+
* - `start`: fresh, interactive (not headless), not a subagent, with a first request;
|
|
7
|
+
* - `subStart`: subagent logs with a first request;
|
|
8
|
+
* - `look`: fresh, not a subagent, reached an edit (`look` present);
|
|
9
|
+
* - `req`: fresh, not a subagent, committed.
|
|
10
|
+
* A bucket with fewer than `SERIES_MIN_N` sessions for a reading has that reading
|
|
11
|
+
* ABSENT with the sentence why — never a median of one or two.
|
|
12
|
+
*/
|
|
13
|
+
import { isoWeekOf } from "../healthindex.js";
|
|
14
|
+
import { localDayOf, medianOf } from "./stats.js";
|
|
15
|
+
/** Fewest sessions a bucket's median is taken over. */
|
|
16
|
+
export const SERIES_MIN_N = 5;
|
|
17
|
+
const num = (x) => typeof x === "number" && Number.isFinite(x) && x >= 0;
|
|
18
|
+
const isFreshMain = (p) => p.fresh === true && p.sub !== true;
|
|
19
|
+
/** The value `p` contributes to `reading`, or undefined when it is not one of that reading's sessions. */
|
|
20
|
+
export function seriesReadingOf(p, reading) {
|
|
21
|
+
switch (reading) {
|
|
22
|
+
case "start": return isFreshMain(p) && p.headless !== true && num(p.start) ? p.start : undefined;
|
|
23
|
+
case "subStart": return p.sub === true && num(p.start) ? p.start : undefined;
|
|
24
|
+
case "look": return isFreshMain(p) && num(p.look) ? p.look : undefined;
|
|
25
|
+
case "req": return isFreshMain(p) && p.commit === true && num(p.req) ? p.req : undefined;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// closed: SeriesReading is a parameter of these pure functions, never read off the wire
|
|
29
|
+
const READING_WORDS = {
|
|
30
|
+
start: "fresh interactive sessions with a first request",
|
|
31
|
+
subStart: "subagent logs with a first request",
|
|
32
|
+
look: "fresh sessions that reached an edit",
|
|
33
|
+
req: "fresh sessions that committed",
|
|
34
|
+
};
|
|
35
|
+
/** The sentence for too few sessions behind a reading. */
|
|
36
|
+
export function seriesTooFewText(n, reading, min = SERIES_MIN_N) {
|
|
37
|
+
const what = reading === "part" ? "fresh interactive sessions that measured this part" : READING_WORDS[reading];
|
|
38
|
+
return `${n} ${what} here; a median needs at least ${min}.`;
|
|
39
|
+
}
|
|
40
|
+
/** Points kept by the model/repo filters (a model filter drops points with no model id). */
|
|
41
|
+
export function seriesFilter(points, opts) {
|
|
42
|
+
return points.filter((p) => p && Number.isFinite(p.t0)
|
|
43
|
+
&& (opts.repo === undefined || p.repo === opts.repo)
|
|
44
|
+
&& (opts.model === undefined || p.model === opts.model));
|
|
45
|
+
}
|
|
46
|
+
function valueOf(xs, reading) {
|
|
47
|
+
if (xs.length < SERIES_MIN_N)
|
|
48
|
+
return { absent: seriesTooFewText(xs.length, reading) };
|
|
49
|
+
return { median: medianOf(xs), n: xs.length };
|
|
50
|
+
}
|
|
51
|
+
function bucketOf(key, ps) {
|
|
52
|
+
const vals = (r) => ps.map((p) => seriesReadingOf(p, r)).filter((x) => x !== undefined);
|
|
53
|
+
const startSet = ps.filter((p) => seriesReadingOf(p, "start") !== undefined);
|
|
54
|
+
const parts = {};
|
|
55
|
+
const ids = [...new Set(startSet.flatMap((p) => Object.keys(p.parts ?? {})))].sort();
|
|
56
|
+
for (const part of ids) {
|
|
57
|
+
const xs = startSet.map((p) => p.parts?.[part]).filter(num);
|
|
58
|
+
if (xs.length > 0)
|
|
59
|
+
parts[part] = valueOf(xs, "part");
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
key,
|
|
63
|
+
fresh: ps.filter(isFreshMain).length,
|
|
64
|
+
start: valueOf(vals("start"), "start"),
|
|
65
|
+
parts,
|
|
66
|
+
look: valueOf(vals("look"), "look"),
|
|
67
|
+
req: valueOf(vals("req"), "req"),
|
|
68
|
+
subStart: valueOf(vals("subStart"), "subStart"),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** The bucket key of an instant: its local day, or the Monday of that day's ISO week. */
|
|
72
|
+
export function seriesBucketKey(t, grain) {
|
|
73
|
+
if (!Number.isFinite(t))
|
|
74
|
+
return null;
|
|
75
|
+
const day = localDayOf(t);
|
|
76
|
+
return grain === "day" ? day : isoWeekOf(day);
|
|
77
|
+
}
|
|
78
|
+
/** The readings per bucket, oldest first; only buckets holding at least one point. */
|
|
79
|
+
export function seriesOf(points, opts) {
|
|
80
|
+
const by = new Map();
|
|
81
|
+
for (const p of seriesFilter(points, opts)) {
|
|
82
|
+
const k = seriesBucketKey(p.t0, opts.grain);
|
|
83
|
+
if (!k)
|
|
84
|
+
continue;
|
|
85
|
+
const list = by.get(k);
|
|
86
|
+
if (list)
|
|
87
|
+
list.push(p);
|
|
88
|
+
else
|
|
89
|
+
by.set(k, [p]);
|
|
90
|
+
}
|
|
91
|
+
return [...by.keys()].sort().map((k) => bucketOf(k, by.get(k)));
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=series.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"series.js","sourceRoot":"","sources":["../../src/agentseries/series.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Median of finite numbers; null for none. */
|
|
2
|
+
export declare function medianOf(xs: readonly number[]): number | null;
|
|
3
|
+
/** Linear-interpolated percentile (`p` in 0..1) of an ascending array; null for none. */
|
|
4
|
+
export declare function percentileSorted(sorted: readonly number[], p: number): number | null;
|
|
5
|
+
/** mulberry32: a small deterministic PRNG, uniform in [0, 1). */
|
|
6
|
+
export declare function seededRandom(seed: number): () => number;
|
|
7
|
+
/** The local calendar day (`YYYY-MM-DD`) an instant falls in. */
|
|
8
|
+
export declare const localDayOf: (t: number) => string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Medians, percentiles and a seeded PRNG for the agent series — pure, no clock. */
|
|
2
|
+
import { hourKey } from "../costwindow.js";
|
|
3
|
+
/** Median of finite numbers; null for none. */
|
|
4
|
+
export function medianOf(xs) {
|
|
5
|
+
const v = xs.filter((x) => Number.isFinite(x)).sort((a, b) => a - b);
|
|
6
|
+
if (v.length === 0)
|
|
7
|
+
return null;
|
|
8
|
+
const m = v.length >> 1;
|
|
9
|
+
return v.length % 2 ? v[m] : (v[m - 1] + v[m]) / 2;
|
|
10
|
+
}
|
|
11
|
+
/** Linear-interpolated percentile (`p` in 0..1) of an ascending array; null for none. */
|
|
12
|
+
export function percentileSorted(sorted, p) {
|
|
13
|
+
if (sorted.length === 0)
|
|
14
|
+
return null;
|
|
15
|
+
const at = Math.min(1, Math.max(0, p)) * (sorted.length - 1);
|
|
16
|
+
const lo = Math.floor(at);
|
|
17
|
+
const hi = Math.ceil(at);
|
|
18
|
+
return sorted[lo] + (sorted[hi] - sorted[lo]) * (at - lo);
|
|
19
|
+
}
|
|
20
|
+
/** mulberry32: a small deterministic PRNG, uniform in [0, 1). */
|
|
21
|
+
export function seededRandom(seed) {
|
|
22
|
+
let a = seed >>> 0;
|
|
23
|
+
return () => {
|
|
24
|
+
a = (a + 0x6d2b79f5) >>> 0;
|
|
25
|
+
let t = a;
|
|
26
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
27
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
28
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** The local calendar day (`YYYY-MM-DD`) an instant falls in. */
|
|
32
|
+
export const localDayOf = (t) => hourKey(t).slice(0, 10);
|
|
33
|
+
//# sourceMappingURL=stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/agentseries/stats.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,+CAA+C;AAC/C,MAAM,UAAU,QAAQ,CAAC,EAAqB;IAC5C,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC;IACxB,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAE,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,gBAAgB,CAAC,MAAyB,EAAE,CAAS;IACnE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,EAAE,GAAG,IAAI,CAAC,GA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