waterplane 0.1.24 → 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 +49 -0
- package/SECURITY.md +25 -5
- 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/healthindex/commits.d.ts +1 -1
- package/node_modules/@waterplane/shared/dist/healthindex/commits.js +2 -2
- package/node_modules/@waterplane/shared/dist/healthindex/commits.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthindex/coverage.d.ts +128 -0
- package/node_modules/@waterplane/shared/dist/healthindex/coverage.js +343 -0
- package/node_modules/@waterplane/shared/dist/healthindex/coverage.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/readings.d.ts +9 -1
- package/node_modules/@waterplane/shared/dist/healthindex/readings.js +122 -4
- package/node_modules/@waterplane/shared/dist/healthindex/readings.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.d.ts +5 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js +2 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthindex/score.d.ts +3 -0
- package/node_modules/@waterplane/shared/dist/healthindex/score.js +52 -16
- package/node_modules/@waterplane/shared/dist/healthindex/score.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthindex/types.d.ts +82 -6
- package/node_modules/@waterplane/shared/dist/healthindex/types.js +35 -2
- package/node_modules/@waterplane/shared/dist/healthindex/types.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthindex/words.js +65 -6
- package/node_modules/@waterplane/shared/dist/healthindex/words.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthindex.d.ts +21 -7
- package/node_modules/@waterplane/shared/dist/healthindex.js +20 -7
- package/node_modules/@waterplane/shared/dist/healthindex.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthindexresponse.js +3 -2
- package/node_modules/@waterplane/shared/dist/healthindexresponse.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/healthspend.d.ts +23 -0
- package/node_modules/@waterplane/shared/dist/healthspend.js +32 -1
- package/node_modules/@waterplane/shared/dist/healthspend.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/hints.js +9 -0
- package/node_modules/@waterplane/shared/dist/hints.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/index.d.ts +9 -0
- package/node_modules/@waterplane/shared/dist/index.js +9 -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/intent/kind.d.ts +45 -1
- package/node_modules/@waterplane/shared/dist/intent/kind.js +60 -2
- package/node_modules/@waterplane/shared/dist/intent/kind.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent.d.ts +1 -1
- package/node_modules/@waterplane/shared/dist/intent.js +1 -1
- package/node_modules/@waterplane/shared/dist/intent.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/repohealth.d.ts +178 -0
- package/node_modules/@waterplane/shared/dist/repohealth.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/repohealthhabits.d.ts +15 -0
- package/node_modules/@waterplane/shared/dist/repohealthhabits.js +117 -0
- package/node_modules/@waterplane/shared/dist/repohealthhabits.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/repohealthnative.d.ts +10 -0
- package/node_modules/@waterplane/shared/dist/repohealthnative.js +94 -0
- package/node_modules/@waterplane/shared/dist/repohealthnative.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/repohealthread.js +23 -1
- package/node_modules/@waterplane/shared/dist/repohealthread.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 +248 -0
- package/node_modules/@waterplane/shared/dist/wire/agentreadings.js +36 -0
- package/node_modules/@waterplane/shared/dist/wire/agentreadings.js.map +1 -0
- 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/notify.d.ts +6 -1
- package/node_modules/@waterplane/shared/dist/wire/notify.js +6 -1
- package/node_modules/@waterplane/shared/dist/wire/notify.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/repo.d.ts +1 -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 +116 -0
- package/packages/host/dist/agentclass.js +339 -0
- package/packages/host/dist/agentclass.js.map +1 -0
- package/packages/host/dist/agentintents.d.ts +18 -0
- package/packages/host/dist/agentintents.js +40 -7
- package/packages/host/dist/agentintents.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 +68 -0
- package/packages/host/dist/agentreadings.js +336 -0
- package/packages/host/dist/agentreadings.js.map +1 -0
- package/packages/host/dist/agentscan.d.ts +8 -0
- package/packages/host/dist/agentscan.js +427 -0
- package/packages/host/dist/agentscan.js.map +1 -0
- 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/exposure.d.ts +10 -0
- package/packages/host/dist/exposure.js +25 -0
- package/packages/host/dist/exposure.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/reposkilltext.d.ts +2 -0
- package/packages/host/dist/reposkilltext.js +8 -2
- package/packages/host/dist/reposkilltext.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 +14 -0
- 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/routes/apisystem.js +3 -1
- package/packages/host/dist/routes/apisystem.js.map +1 -1
- package/packages/host/dist/routes/apitable.d.ts +2 -0
- package/packages/host/dist/routes/apitable.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/http.js +1 -1
- package/packages/host/dist/server/http.js.map +1 -1
- package/packages/host/dist/server/intentDeps.js +20 -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/tmux.js +6 -1
- package/packages/host/dist/sessions/tmux.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/weekburn.js +7 -5
- package/packages/host/dist/weekburn.js.map +1 -1
- 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/tools/repohealth/constants.mjs +34 -1
- package/tools/repohealth/fixture.json +5374 -38
- package/tools/repohealth/git.mjs +77 -0
- package/tools/repohealth/lang/dart-analyze.mjs +181 -0
- package/tools/repohealth/lang/dart-lex.mjs +494 -0
- package/tools/repohealth/lang/dart-resolve.mjs +95 -0
- package/tools/repohealth/lang/python-ast.mjs +602 -0
- package/tools/repohealth/lang/python-resolve.mjs +228 -0
- package/tools/repohealth/metrics/habits.mjs +286 -0
- package/tools/repohealth/metrics/native.mjs +542 -0
- package/tools/repohealth/metrics/untested.mjs +20 -8
- package/tools/repohealth/metrics/workspace.mjs +256 -0
- package/tools/repohealth/own.mjs +67 -5
- package/tools/repohealth/packs/dart.mjs +153 -85
- package/tools/repohealth/packs/python.mjs +51 -14
- package/tools/repohealth/plot.mjs +143 -1
- package/tools/repohealth/reach.mjs +98 -0
- package/tools/repohealth/scope.mjs +14 -1
- package/tools/repohealth/series.mjs +5 -0
- package/tools/repohealth/types.mjs +4 -0
- package/tools/repohealth.mjs +39 -5
- package/packages/web/dist/assets/demo-ad3g3HDa.js +0 -26
- package/packages/web/dist/assets/index-Csb7jynu.js +0 -170
- package/packages/web/dist/assets/index-Cz9Haocy.css +0 -1
- package/packages/web/dist/assets/shared-DBaaGttP.js +0 -51
- package/packages/web/dist/assets/sheets-CqsP9w1V.js +0 -256
- package/packages/web/dist/assets/sheets-DoUhPGK0.css +0 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The disk-space extension's wire: what the phone may ask the host half, typed once for both ends.
|
|
3
|
+
* Pure, no node imports — the host compiles it (`tsconfig.extensions.json`), the phone bundles it.
|
|
4
|
+
*
|
|
5
|
+
* Transport: the generic plugin channel on the one socket. Phone → host is `plugin.call`; host →
|
|
6
|
+
* phone is ONE tiny push, `changed` (`{ at }`), after which the phone reads `state` again. The
|
|
7
|
+
* state itself is never pushed: a scan's lists can pass the push cap, and a read is re-asked after a
|
|
8
|
+
* reconnect anyway.
|
|
9
|
+
*
|
|
10
|
+
* The rule the whole contract is shaped around: **a deletion never takes a path from the phone.**
|
|
11
|
+
* `remove` carries an opaque `id` from the last scan; the host recomputes that category's candidates
|
|
12
|
+
* itself, finds the id there, and re-checks containment before anything is removed. A show-only
|
|
13
|
+
* entry and a large file have no id a `remove` accepts — there is no delete path for them at all.
|
|
14
|
+
*/
|
|
15
|
+
/** temp: regenerable, deletable · model: deletable, re-downloadable · show: sizes only. */
|
|
16
|
+
export type DiskKind = "temp" | "model" | "show";
|
|
17
|
+
/**
|
|
18
|
+
* Which desktop the host runs on. `wsl` is Linux inside Windows' WSL: two disks matter there — the
|
|
19
|
+
* Linux side (inside WSL's virtual disk) and the Windows drive that virtual disk is a file on.
|
|
20
|
+
*/
|
|
21
|
+
export type DiskProfile = "mac" | "linux" | "wsl";
|
|
22
|
+
/**
|
|
23
|
+
* Which disk a row's bytes are on, set only on `wsl`: `wsl` = inside WSL's virtual disk (deleting
|
|
24
|
+
* frees space there; the Windows drive gets it back only after that disk is compacted), `windows` =
|
|
25
|
+
* on the Windows drive itself. Absent on mac and plain Linux, where there is one disk.
|
|
26
|
+
*/
|
|
27
|
+
export type DiskSide = "wsl" | "windows";
|
|
28
|
+
export interface DiskEntry {
|
|
29
|
+
/** Opaque: `<category>:<16 hex>`. Only a temp/model id is ever accepted by `remove`. */
|
|
30
|
+
id: string;
|
|
31
|
+
kind: DiskKind;
|
|
32
|
+
/** Which family it is in ("Gradle", "browser caches", "build output", "Hugging Face", …). */
|
|
33
|
+
group: string;
|
|
34
|
+
/** What the row is called: a `~` path, `org/name`, an ollama tag. */
|
|
35
|
+
label: string;
|
|
36
|
+
/** KiB as `du -sk` measured it; null = could not be measured (never 0 for that). */
|
|
37
|
+
sizeKb: number | null;
|
|
38
|
+
/** Why the size is unknown, or why it is a floor ("some files were unreadable — at least this"). */
|
|
39
|
+
sizeNote?: string;
|
|
40
|
+
/** True when `sizeKb` is a floor: du finished but complained. */
|
|
41
|
+
partial?: boolean;
|
|
42
|
+
/** temp/model: what puts it back if it is needed again. show: how to free it by hand. */
|
|
43
|
+
regen?: string;
|
|
44
|
+
/** ms since epoch, when known. */
|
|
45
|
+
mtime?: number | null;
|
|
46
|
+
/** Anything else the row must say (a shared ollama id, how many folders a row stands for). */
|
|
47
|
+
note?: string;
|
|
48
|
+
/** Rows with the same value are ONE copy on disk (ollama tags sharing an ID): a total counts it once. */
|
|
49
|
+
copy?: string;
|
|
50
|
+
/** wsl only: which disk this row is on. */
|
|
51
|
+
side?: DiskSide;
|
|
52
|
+
}
|
|
53
|
+
export interface DiskVolume {
|
|
54
|
+
/** The path statfs was asked about (the home folder's volume). */
|
|
55
|
+
path: string;
|
|
56
|
+
freeKb: number;
|
|
57
|
+
totalKb: number;
|
|
58
|
+
/** What the disk is called when there are two ("C:", "inside WSL"); absent on mac and plain Linux. */
|
|
59
|
+
label?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface DiskScan {
|
|
62
|
+
at: number;
|
|
63
|
+
tookMs: number;
|
|
64
|
+
/** The header disk: the home folder's volume on mac/linux, the Windows drive (C:) on wsl. */
|
|
65
|
+
volume: DiskVolume | null;
|
|
66
|
+
/** wsl only: the Linux side's own free space (inside WSL's virtual disk), the second line. */
|
|
67
|
+
wslVolume?: DiskVolume | null;
|
|
68
|
+
/** Absent from a host older than the field: read as `mac`. */
|
|
69
|
+
profile?: DiskProfile;
|
|
70
|
+
temp: DiskEntry[];
|
|
71
|
+
models: DiskEntry[];
|
|
72
|
+
show: DiskEntry[];
|
|
73
|
+
/** Sentences about what the scan could not do (ollama did not answer, the walk stopped early). */
|
|
74
|
+
notes: string[];
|
|
75
|
+
}
|
|
76
|
+
export interface LargeFile {
|
|
77
|
+
path: string;
|
|
78
|
+
sizeKb: number;
|
|
79
|
+
mtime: number | null;
|
|
80
|
+
}
|
|
81
|
+
export interface LargeScan {
|
|
82
|
+
at: number;
|
|
83
|
+
running: boolean;
|
|
84
|
+
tookMs: number | null;
|
|
85
|
+
/** Set when the find was stopped by its time bound: the list is partial. */
|
|
86
|
+
stoppedAfterS: number | null;
|
|
87
|
+
/** How many matched in all (the list keeps the biggest LARGE_TOP). */
|
|
88
|
+
found: number;
|
|
89
|
+
items: LargeFile[];
|
|
90
|
+
error?: string;
|
|
91
|
+
/** What the find did not cover, as a sentence (on wsl: the Windows drive). */
|
|
92
|
+
note?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface DiskDeleteResult {
|
|
95
|
+
id: string;
|
|
96
|
+
label: string;
|
|
97
|
+
at: number;
|
|
98
|
+
ok: boolean;
|
|
99
|
+
/** The size the last scan measured for it, null when unknown. */
|
|
100
|
+
sizeKb: number | null;
|
|
101
|
+
/** How far free space rose across the delete, on the disk the delete touched (`side`) — may differ from `sizeKb` (snapshots, other writers). */
|
|
102
|
+
freeDeltaKb: number | null;
|
|
103
|
+
error?: string;
|
|
104
|
+
/** wsl only: which disk the delete touched, and so which disk `freeDeltaKb` was read on. */
|
|
105
|
+
side?: DiskSide;
|
|
106
|
+
/** A row of many entries deleted one by one (Windows temporary files): how many went. */
|
|
107
|
+
removed?: number;
|
|
108
|
+
/** …and how many were in use by a running program and left alone (never counted as freed). */
|
|
109
|
+
skipped?: number;
|
|
110
|
+
/** …of those skipped, how many were folders with a held file inside that were left partly cleared (what could be unlinked before the hold is gone). */
|
|
111
|
+
partial?: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The code-root walk (build output + node_modules), the slow part of a scan. It runs after the rest
|
|
115
|
+
* of the scan has been measured and pushed, so those rows show while it runs. On wsl with the code
|
|
116
|
+
* root on the Windows drive it is not part of the automatic scan at all (`onTap`): folders there are
|
|
117
|
+
* slow to read from inside WSL, so it runs only when the person taps for it (`scanCode`).
|
|
118
|
+
*/
|
|
119
|
+
export interface CodeWalk {
|
|
120
|
+
/** The code root as the person knows it (`~/dev`, `C:/dev`). */
|
|
121
|
+
root: string;
|
|
122
|
+
/** True: the walk is never started by a scan, only by `scanCode`. */
|
|
123
|
+
onTap: boolean;
|
|
124
|
+
/** Being looked for now, or next in this scan. */
|
|
125
|
+
running: boolean;
|
|
126
|
+
/** When the walk itself started; null while it waits for the rest of the scan. */
|
|
127
|
+
startedAt: number | null;
|
|
128
|
+
/** When the build output / node_modules rows now listed were looked for; null = not this host run. */
|
|
129
|
+
at: number | null;
|
|
130
|
+
tookMs: number | null;
|
|
131
|
+
/** What the walk could not do (stopped early, folders not ignored by git, the biggest N). */
|
|
132
|
+
notes: string[];
|
|
133
|
+
}
|
|
134
|
+
export interface DiskState {
|
|
135
|
+
scanning: boolean;
|
|
136
|
+
/** Which part of a running scan: `fast` = everything but the code root, `code` = the code-root walk. Absent from an older host. */
|
|
137
|
+
phase?: "fast" | "code" | null;
|
|
138
|
+
/** Absent from an older host. */
|
|
139
|
+
code?: CodeWalk;
|
|
140
|
+
scanStartedAt: number | null;
|
|
141
|
+
scan: DiskScan | null;
|
|
142
|
+
large: LargeScan | null;
|
|
143
|
+
/** Deletes running or queued right now. */
|
|
144
|
+
deleting: {
|
|
145
|
+
id: string;
|
|
146
|
+
label: string;
|
|
147
|
+
since: number;
|
|
148
|
+
}[];
|
|
149
|
+
/** Recent delete outcomes, newest first. */
|
|
150
|
+
results: DiskDeleteResult[];
|
|
151
|
+
}
|
|
152
|
+
/** The time bound on the large-file find, in seconds. */
|
|
153
|
+
export declare const LARGE_LIMIT_S = 120;
|
|
154
|
+
/** How many large files are listed. */
|
|
155
|
+
export declare const LARGE_TOP = 50;
|
|
156
|
+
/** The only push: "read `state` again". */
|
|
157
|
+
export declare const PUSH_CHANGED = "changed";
|
|
158
|
+
/** What `remove` accepts, before anything else is looked at: a category and 16 hex, nothing path-shaped. */
|
|
159
|
+
export declare const CANDIDATE_ID_RE: RegExp;
|
|
160
|
+
export type DiskMethods = {
|
|
161
|
+
state: {
|
|
162
|
+
args: Record<string, never>;
|
|
163
|
+
result: DiskState;
|
|
164
|
+
};
|
|
165
|
+
/** Start a scan (joins one already running) and answer the state at once. */
|
|
166
|
+
scan: {
|
|
167
|
+
args: Record<string, never>;
|
|
168
|
+
result: DiskState;
|
|
169
|
+
};
|
|
170
|
+
/** Look for build output and node_modules under the code root now (joins a running scan; on wsl with the code root on the Windows drive, the only way it runs). */
|
|
171
|
+
scanCode: {
|
|
172
|
+
args: Record<string, never>;
|
|
173
|
+
result: DiskState;
|
|
174
|
+
};
|
|
175
|
+
/** Start the large-file find (joins one already running). */
|
|
176
|
+
scanLarge: {
|
|
177
|
+
args: Record<string, never>;
|
|
178
|
+
result: DiskState;
|
|
179
|
+
};
|
|
180
|
+
/** Queue one candidate's delete. Answers once it is ACCEPTED; the outcome arrives in `results`. */
|
|
181
|
+
remove: {
|
|
182
|
+
args: {
|
|
183
|
+
id: string;
|
|
184
|
+
};
|
|
185
|
+
result: {
|
|
186
|
+
accepted: true;
|
|
187
|
+
label: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
/** Queue every temporary candidate of the last scan. */
|
|
191
|
+
cleanTemp: {
|
|
192
|
+
args: Record<string, never>;
|
|
193
|
+
result: {
|
|
194
|
+
accepted: number;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The disk-space extension's wire: what the phone may ask the host half, typed once for both ends.
|
|
3
|
+
* Pure, no node imports — the host compiles it (`tsconfig.extensions.json`), the phone bundles it.
|
|
4
|
+
*
|
|
5
|
+
* Transport: the generic plugin channel on the one socket. Phone → host is `plugin.call`; host →
|
|
6
|
+
* phone is ONE tiny push, `changed` (`{ at }`), after which the phone reads `state` again. The
|
|
7
|
+
* state itself is never pushed: a scan's lists can pass the push cap, and a read is re-asked after a
|
|
8
|
+
* reconnect anyway.
|
|
9
|
+
*
|
|
10
|
+
* The rule the whole contract is shaped around: **a deletion never takes a path from the phone.**
|
|
11
|
+
* `remove` carries an opaque `id` from the last scan; the host recomputes that category's candidates
|
|
12
|
+
* itself, finds the id there, and re-checks containment before anything is removed. A show-only
|
|
13
|
+
* entry and a large file have no id a `remove` accepts — there is no delete path for them at all.
|
|
14
|
+
*/
|
|
15
|
+
/** The time bound on the large-file find, in seconds. */
|
|
16
|
+
export const LARGE_LIMIT_S = 120;
|
|
17
|
+
/** How many large files are listed. */
|
|
18
|
+
export const LARGE_TOP = 50;
|
|
19
|
+
/** The only push: "read `state` again". */
|
|
20
|
+
export const PUSH_CHANGED = "changed";
|
|
21
|
+
/** What `remove` accepts, before anything else is looked at: a category and 16 hex, nothing path-shaped. */
|
|
22
|
+
export const CANDIDATE_ID_RE = /^(cache|build|tmp|hf|ollama|wcache|wtemp):[0-9a-f]{16}$/;
|
|
23
|
+
//# sourceMappingURL=wire.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.mjs","sourceRoot":"","sources":["../../../../../extensions/diskspace/shared/wire.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA8IH,yDAAyD;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AACjC,uCAAuC;AACvC,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAC;AAC5B,2CAA2C;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC;AAEtC,4GAA4G;AAC5G,MAAM,CAAC,MAAM,eAAe,GAAG,yDAAyD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type LinksState } from "../shared/wire.mjs";
|
|
2
|
+
import { type Runner } from "./run.mjs";
|
|
3
|
+
export interface Roots {
|
|
4
|
+
root: string;
|
|
5
|
+
file: string;
|
|
6
|
+
lsofBin: string;
|
|
7
|
+
tailscaleBin: string | null;
|
|
8
|
+
gcloudBin: string | null;
|
|
9
|
+
gitBin: string;
|
|
10
|
+
run: Runner;
|
|
11
|
+
fetch: typeof fetch;
|
|
12
|
+
now: () => number;
|
|
13
|
+
selfPid: number;
|
|
14
|
+
probeTimeoutMs: number;
|
|
15
|
+
}
|
|
16
|
+
export interface Engine {
|
|
17
|
+
state(): Promise<LinksState>;
|
|
18
|
+
discover(o: {
|
|
19
|
+
cloud?: boolean;
|
|
20
|
+
}): Promise<LinksState>;
|
|
21
|
+
probe(): Promise<LinksState>;
|
|
22
|
+
pin(key: string): Promise<LinksState>;
|
|
23
|
+
add(a: {
|
|
24
|
+
label: unknown;
|
|
25
|
+
url: unknown;
|
|
26
|
+
repo?: unknown;
|
|
27
|
+
env?: unknown;
|
|
28
|
+
}): Promise<LinksState>;
|
|
29
|
+
edit(a: {
|
|
30
|
+
id: unknown;
|
|
31
|
+
label?: unknown;
|
|
32
|
+
env?: unknown;
|
|
33
|
+
repo?: unknown;
|
|
34
|
+
}): Promise<LinksState>;
|
|
35
|
+
unpin(id: unknown): Promise<LinksState>;
|
|
36
|
+
/** Settles when every discovery started so far has finished (tests). */
|
|
37
|
+
idle(): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export declare function createEngine(r: Roots, changed: () => void): Engine;
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The links engine: the two discoveries (local — fast; cloud — slow, cached), the probes, and the
|
|
3
|
+
* pin edits. State lives in memory with its times; the pins are re-read from disk on every answer,
|
|
4
|
+
* so a hand edit of `links.json` shows on the next open without a restart.
|
|
5
|
+
*
|
|
6
|
+
* Nothing runs until the phone asks — no poller. A discovery already running is joined, not doubled.
|
|
7
|
+
*/
|
|
8
|
+
import { randomBytes } from "node:crypto";
|
|
9
|
+
import { readdir, readFile, stat } from "node:fs/promises";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
import { CLOUD_FRESH_MS, LOCAL_FRESH_MS, PIN_ID_RE, isHttpUrl, } from "../shared/wire.mjs";
|
|
12
|
+
import { assignProjects, localFound, parseHostingSites, parseLsofCwd, parseLsofListen, parseRunServices, parseServeStatus, servePortsInUse, } from "./parse.mjs";
|
|
13
|
+
import { pool } from "./run.mjs";
|
|
14
|
+
import { REPO_RE, cleanLabel, isEnv, loadPins, savePins } from "./store.mjs";
|
|
15
|
+
const quoteBin = (b) => (/\s/.test(b) ? `"${b}"` : b);
|
|
16
|
+
const firstLine = (s) => s.split("\n").map((l) => l.trim()).find(Boolean) ?? "";
|
|
17
|
+
export function createEngine(r, changed) {
|
|
18
|
+
let local = [], cloud = [];
|
|
19
|
+
let serve = new Map();
|
|
20
|
+
let localAt = null, cloudAt = null;
|
|
21
|
+
let localRun = null, cloudRun = null;
|
|
22
|
+
let localNotes = [], cloudNotes = [];
|
|
23
|
+
const probes = new Map();
|
|
24
|
+
let writeChain = Promise.resolve();
|
|
25
|
+
async function discoverLocal() {
|
|
26
|
+
const notes = [];
|
|
27
|
+
const ls = await r.run(r.lsofBin, ["-nP", "-iTCP", "-sTCP:LISTEN", "-Fpcn"], { timeoutMs: 15_000 });
|
|
28
|
+
if (ls.timedOut || (ls.code !== 0 && !ls.stdout))
|
|
29
|
+
notes.push(`lsof did not list the listening ports${ls.timedOut ? " within 15 s" : ls.error ? ` (${ls.error})` : ""}.`);
|
|
30
|
+
const listeners = parseLsofListen(ls.stdout);
|
|
31
|
+
const pids = [...new Set(listeners.map((l) => l.pid))].filter((p) => p !== r.selfPid);
|
|
32
|
+
const cwdOut = pids.length ? await r.run(r.lsofBin, ["-a", "-d", "cwd", "-p", pids.join(","), "-Fpn"], { timeoutMs: 15_000 }) : null;
|
|
33
|
+
let serveJson = "", tailnetIp = null;
|
|
34
|
+
if (r.tailscaleBin) {
|
|
35
|
+
const [s, ip] = await Promise.all([
|
|
36
|
+
r.run(r.tailscaleBin, ["serve", "status", "--json"], { timeoutMs: 10_000 }),
|
|
37
|
+
r.run(r.tailscaleBin, ["ip", "-4"], { timeoutMs: 10_000 }),
|
|
38
|
+
]);
|
|
39
|
+
serveJson = s.stdout;
|
|
40
|
+
if (s.code !== 0)
|
|
41
|
+
notes.push(`tailscale serve status did not answer${s.error ? ` (${s.error})` : ""} — front doors are not known.`);
|
|
42
|
+
tailnetIp = /^100\.\d+\.\d+\.\d+$/.test(firstLine(ip.stdout)) ? firstLine(ip.stdout) : null;
|
|
43
|
+
}
|
|
44
|
+
else
|
|
45
|
+
notes.push("No tailscale command on this desktop — the phone URLs of local ports are not known.");
|
|
46
|
+
serve = parseServeStatus(serveJson);
|
|
47
|
+
local = localFound({
|
|
48
|
+
listeners, cwd: parseLsofCwd(cwdOut?.stdout ?? ""), repos: await repoDirs(), serve, servePorts: servePortsInUse(serveJson),
|
|
49
|
+
tailnetIp, tailscale: quoteBin(r.tailscaleBin ?? "tailscale"), selfPid: r.selfPid,
|
|
50
|
+
});
|
|
51
|
+
localNotes = notes;
|
|
52
|
+
localAt = r.now();
|
|
53
|
+
}
|
|
54
|
+
/** Repos under the code root, and one folder down when a folder is not a repo itself
|
|
55
|
+
* (`watch/watch-monorepo`) — the same repos core lists, by the same folder name. */
|
|
56
|
+
async function repoDirs() {
|
|
57
|
+
const out = [];
|
|
58
|
+
const isRepo = async (p) => { try {
|
|
59
|
+
await stat(join(p, ".git"));
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return false;
|
|
64
|
+
} };
|
|
65
|
+
const kids = async (p) => { try {
|
|
66
|
+
return (await readdir(p, { withFileTypes: true })).filter((d) => d.isDirectory() && !d.name.startsWith(".") && REPO_RE.test(d.name)).map((d) => d.name);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return [];
|
|
70
|
+
} };
|
|
71
|
+
for (const n of await kids(r.root)) {
|
|
72
|
+
const p = join(r.root, n);
|
|
73
|
+
if (await isRepo(p)) {
|
|
74
|
+
out.push({ name: n, path: p });
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
for (const m of await kids(p))
|
|
78
|
+
if (await isRepo(join(p, m)))
|
|
79
|
+
out.push({ name: m, path: join(p, m) });
|
|
80
|
+
}
|
|
81
|
+
// Two repos with one folder name would be one chip; the first keeps it, the other is left out.
|
|
82
|
+
return out.filter((d, i) => out.findIndex((o) => o.name === d.name) === i);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Who owns each cloud row. A project goes to the repo whose `.firebaserc` names it, else the one
|
|
86
|
+
* that mentions it most. A Firebase site that is NOT the project's default site goes to the repo
|
|
87
|
+
* that mentions the site id most — one project often hosts many apps, and the repo naming the
|
|
88
|
+
* project is not the one that deploys every site in it. No mention, no repo: a wrong repo is worse.
|
|
89
|
+
*/
|
|
90
|
+
async function cloudRepos(projects, sites) {
|
|
91
|
+
const repos = await repoDirs();
|
|
92
|
+
const exact = new Map();
|
|
93
|
+
for (const repo of repos) {
|
|
94
|
+
try {
|
|
95
|
+
const rc = JSON.parse(await readFile(join(repo.path, ".firebaserc"), "utf8"));
|
|
96
|
+
for (const p of Object.values(rc.projects ?? {}))
|
|
97
|
+
if (typeof p === "string" && projects.includes(p) && !exact.has(p))
|
|
98
|
+
exact.set(p, repo.name);
|
|
99
|
+
}
|
|
100
|
+
catch { /* none */ }
|
|
101
|
+
}
|
|
102
|
+
const hits = new Map();
|
|
103
|
+
const argv = ["grep", "-I", "-o", "-h", "-F", ...[...projects, ...sites].flatMap((p) => ["-e", p])];
|
|
104
|
+
await pool(repos, 4, async (repo) => {
|
|
105
|
+
const g = await r.run(r.gitBin, ["-C", repo.path, ...argv], { timeoutMs: 15_000 });
|
|
106
|
+
if (g.stdout)
|
|
107
|
+
hits.set(repo.name, g.stdout);
|
|
108
|
+
});
|
|
109
|
+
const byProject = assignProjects(hits, projects);
|
|
110
|
+
for (const [p, repo] of exact)
|
|
111
|
+
byProject.set(p, repo);
|
|
112
|
+
return { byProject, bySite: assignProjects(hits, sites) };
|
|
113
|
+
}
|
|
114
|
+
async function discoverCloud() {
|
|
115
|
+
const notes = [];
|
|
116
|
+
if (!r.gcloudBin) {
|
|
117
|
+
cloud = [];
|
|
118
|
+
cloudNotes = ["No gcloud command on this desktop — deployed services are not looked for."];
|
|
119
|
+
cloudAt = r.now();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const pl = await r.run(r.gcloudBin, ["projects", "list", "--format=value(projectId)", "--quiet"], { timeoutMs: 30_000 });
|
|
123
|
+
const projects = pl.stdout.split("\n").map((s) => s.trim()).filter((s) => /^[a-z][a-z0-9-]{4,62}$/.test(s));
|
|
124
|
+
if (pl.code !== 0)
|
|
125
|
+
notes.push(`gcloud did not list projects: ${firstLine(pl.stderr) || pl.error || "no reason given"}. Signed in? \`gcloud auth login\`.`);
|
|
126
|
+
const tok = projects.length ? await r.run(r.gcloudBin, ["auth", "print-access-token", "--quiet"], { timeoutMs: 20_000 }) : null;
|
|
127
|
+
const token = tok?.code === 0 ? firstLine(tok.stdout) : "";
|
|
128
|
+
const rows = [];
|
|
129
|
+
await pool(projects, 3, async (p) => {
|
|
130
|
+
const s = await r.run(r.gcloudBin, ["run", "services", "list", `--project=${p}`, "--format=json", "--quiet"], { timeoutMs: 60_000 });
|
|
131
|
+
if (s.code === 0)
|
|
132
|
+
rows.push(...parseRunServices(s.stdout, p));
|
|
133
|
+
else if (!/not been used|not enabled|SERVICE_DISABLED/i.test(s.stderr))
|
|
134
|
+
notes.push(`Cloud Run in ${p} did not answer: ${firstLine(s.stderr) || s.error || (s.timedOut ? "timed out after 60 s" : "no reason")}`);
|
|
135
|
+
if (!token)
|
|
136
|
+
return;
|
|
137
|
+
try {
|
|
138
|
+
const res = await r.fetch(`https://firebasehosting.googleapis.com/v1beta1/projects/${encodeURIComponent(p)}/sites`, {
|
|
139
|
+
headers: { authorization: `Bearer ${token}`, "x-goog-user-project": p }, signal: AbortSignal.timeout(15_000),
|
|
140
|
+
});
|
|
141
|
+
if (res.ok)
|
|
142
|
+
rows.push(...parseHostingSites(await res.text(), p));
|
|
143
|
+
}
|
|
144
|
+
catch { /* hosting not set up, or unreachable: no row, said by its absence */ }
|
|
145
|
+
});
|
|
146
|
+
if (projects.length && !token)
|
|
147
|
+
notes.push("gcloud gave no access token — Firebase Hosting sites are not looked for.");
|
|
148
|
+
const ownSite = (row) => row.kind === "firebase" && row.label !== row.project;
|
|
149
|
+
const sites = [...new Set(rows.filter(ownSite).map((row) => row.label))];
|
|
150
|
+
const own = projects.length ? await cloudRepos(projects, sites) : null;
|
|
151
|
+
for (const row of rows)
|
|
152
|
+
row.repo = (ownSite(row) ? own?.bySite.get(row.label) : own?.byProject.get(row.project)) ?? null;
|
|
153
|
+
rows.sort((a, b) => (a.repo ?? "~").localeCompare(b.repo ?? "~") || a.key.localeCompare(b.key));
|
|
154
|
+
cloud = rows;
|
|
155
|
+
cloudNotes = notes;
|
|
156
|
+
cloudAt = r.now();
|
|
157
|
+
}
|
|
158
|
+
const startLocal = () => (localRun ??= discoverLocal().catch((e) => { localNotes = [`Local discovery failed: ${e.message}`]; })
|
|
159
|
+
.finally(() => { localRun = null; changed(); }));
|
|
160
|
+
const startCloud = () => (cloudRun ??= discoverCloud().catch((e) => { cloudNotes = [`Cloud discovery failed: ${e.message}`]; cloudAt = r.now(); })
|
|
161
|
+
.finally(() => { cloudRun = null; changed(); }));
|
|
162
|
+
function view(p) {
|
|
163
|
+
const probe = probes.get(p.id) ?? null;
|
|
164
|
+
if (p.url)
|
|
165
|
+
return { ...p, openUrl: p.url, probe };
|
|
166
|
+
const f = local.find((l) => l.port === p.port);
|
|
167
|
+
const listening = localAt == null ? null : !!f;
|
|
168
|
+
const openUrl = f?.url ?? serve.get(p.port) ?? null;
|
|
169
|
+
const v = { ...p, openUrl, listening, probe };
|
|
170
|
+
if (!openUrl)
|
|
171
|
+
v.why = localAt == null ? "not looked up yet" : f ? "listens on this desktop only — it needs a front door (see Found)" : `nothing listens on :${p.port} and it has no front door`;
|
|
172
|
+
return v;
|
|
173
|
+
}
|
|
174
|
+
async function state() {
|
|
175
|
+
const l = await loadPins(r.file);
|
|
176
|
+
return {
|
|
177
|
+
pinned: l.links.map(view), found: [...local, ...cloud], localAt, cloudAt,
|
|
178
|
+
discovering: { local: !!localRun, cloud: !!cloudRun }, notes: [...l.problems, ...localNotes, ...cloudNotes], file: r.file,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/** One pin edit at a time, over a fresh read; refuses in words while the file has problems. */
|
|
182
|
+
function mutate(fn) {
|
|
183
|
+
const job = writeChain.then(async () => {
|
|
184
|
+
const l = await loadPins(r.file);
|
|
185
|
+
if (!l.writable)
|
|
186
|
+
throw new Error(l.problems[0] ?? `${r.file} cannot be written`);
|
|
187
|
+
await savePins(r.file, fn(l.links));
|
|
188
|
+
});
|
|
189
|
+
writeChain = job.catch(() => undefined);
|
|
190
|
+
return job.then(state);
|
|
191
|
+
}
|
|
192
|
+
const newId = () => `p:${randomBytes(6).toString("hex")}`;
|
|
193
|
+
const repoArg = (v) => v === null ? null : typeof v === "string" && REPO_RE.test(v) ? v : undefined;
|
|
194
|
+
async function probeOne(p) {
|
|
195
|
+
if (!p.openUrl) {
|
|
196
|
+
probes.delete(p.id);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const t0 = r.now();
|
|
200
|
+
const once = (method) => r.fetch(p.openUrl, { method, redirect: "manual", signal: AbortSignal.timeout(r.probeTimeoutMs) });
|
|
201
|
+
try {
|
|
202
|
+
let res = await once("HEAD");
|
|
203
|
+
if (res.status === 405 || res.status === 501)
|
|
204
|
+
res = await once("GET");
|
|
205
|
+
void res.body?.cancel().catch(() => undefined);
|
|
206
|
+
probes.set(p.id, { at: r.now(), state: res.status < 500 ? "up" : "down", status: res.status, ms: r.now() - t0 });
|
|
207
|
+
}
|
|
208
|
+
catch (e) {
|
|
209
|
+
const err = e;
|
|
210
|
+
const why = err.name === "TimeoutError" ? `no answer within ${Math.round(r.probeTimeoutMs / 1000)} s` : err.cause?.code ?? err.message;
|
|
211
|
+
probes.set(p.id, { at: r.now(), state: "down", error: why, ms: r.now() - t0 });
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return {
|
|
215
|
+
state,
|
|
216
|
+
async discover(o) {
|
|
217
|
+
if (localRun || localAt == null || r.now() - localAt > LOCAL_FRESH_MS || o.cloud)
|
|
218
|
+
void startLocal();
|
|
219
|
+
if (cloudRun || o.cloud || cloudAt == null || r.now() - cloudAt > CLOUD_FRESH_MS)
|
|
220
|
+
void startCloud();
|
|
221
|
+
return state();
|
|
222
|
+
},
|
|
223
|
+
async probe() {
|
|
224
|
+
await localRun;
|
|
225
|
+
const s = await state();
|
|
226
|
+
await pool(s.pinned, 6, probeOne);
|
|
227
|
+
return state();
|
|
228
|
+
},
|
|
229
|
+
async pin(key) {
|
|
230
|
+
const f = [...local, ...cloud].find((x) => x.key === key);
|
|
231
|
+
if (!f)
|
|
232
|
+
throw new Error("that link is not in the last discovery — look again and pin it from the fresh list");
|
|
233
|
+
return mutate((links) => {
|
|
234
|
+
if (links.some((p) => p.from === key))
|
|
235
|
+
return links;
|
|
236
|
+
const p = { id: newId(), repo: f.repo, label: f.kind === "local" ? `${f.repo ?? f.proc} :${f.port}` : f.label, env: f.env, from: key };
|
|
237
|
+
if (f.kind === "local")
|
|
238
|
+
p.port = f.port;
|
|
239
|
+
else
|
|
240
|
+
p.url = f.url;
|
|
241
|
+
return [...links, p];
|
|
242
|
+
});
|
|
243
|
+
},
|
|
244
|
+
async add(a) {
|
|
245
|
+
const label = cleanLabel(a.label);
|
|
246
|
+
if (!label)
|
|
247
|
+
throw new Error("a link needs a name");
|
|
248
|
+
if (!isHttpUrl(a.url))
|
|
249
|
+
throw new Error("only an http:// or https:// address can be pinned");
|
|
250
|
+
const repo = repoArg(a.repo) ?? null;
|
|
251
|
+
const env = isEnv(a.env) ? a.env : "prod";
|
|
252
|
+
return mutate((links) => [...links, { id: newId(), label, url: a.url, repo, env }]);
|
|
253
|
+
},
|
|
254
|
+
async edit(a) {
|
|
255
|
+
if (typeof a.id !== "string" || !PIN_ID_RE.test(a.id))
|
|
256
|
+
throw new Error("not a pin id");
|
|
257
|
+
const label = a.label === undefined ? undefined : cleanLabel(a.label);
|
|
258
|
+
if (a.label !== undefined && !label)
|
|
259
|
+
throw new Error("a link needs a name");
|
|
260
|
+
if (a.env !== undefined && !isEnv(a.env))
|
|
261
|
+
throw new Error("env is dev, staging or prod");
|
|
262
|
+
const repo = a.repo === undefined ? undefined : repoArg(a.repo);
|
|
263
|
+
if (a.repo !== undefined && repo === undefined)
|
|
264
|
+
throw new Error("not a repo folder name");
|
|
265
|
+
let hit = false;
|
|
266
|
+
const out = await mutate((links) => links.map((p) => {
|
|
267
|
+
if (p.id !== a.id)
|
|
268
|
+
return p;
|
|
269
|
+
hit = true;
|
|
270
|
+
return { ...p, ...(label ? { label } : {}), ...(a.env !== undefined ? { env: a.env } : {}), ...(repo !== undefined ? { repo } : {}) };
|
|
271
|
+
}));
|
|
272
|
+
if (!hit)
|
|
273
|
+
throw new Error("that pin is not in the file any more");
|
|
274
|
+
return out;
|
|
275
|
+
},
|
|
276
|
+
async unpin(id) {
|
|
277
|
+
if (typeof id !== "string" || !PIN_ID_RE.test(id))
|
|
278
|
+
throw new Error("not a pin id");
|
|
279
|
+
probes.delete(id);
|
|
280
|
+
return mutate((links) => links.filter((p) => p.id !== id));
|
|
281
|
+
},
|
|
282
|
+
async idle() { await Promise.all([localRun, cloudRun]); },
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=engine.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.mjs","sourceRoot":"","sources":["../../../../../extensions/links/host/engine.mts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,GAErD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,GAClI,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAe,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAgB7E,MAAM,QAAQ,GAAG,CAAC,CAAS,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AAC,CAAC;KAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type HostPluginApi } from "@waterplane/shared";
|
|
2
|
+
import { type Engine, type Roots } from "./engine.mjs";
|
|
3
|
+
export { createEngine } from "./engine.mjs";
|
|
4
|
+
export type { Roots } from "./engine.mjs";
|
|
5
|
+
/** This desktop's roots. The pins file sits in the config dir next to `plugin-paths.json`. */
|
|
6
|
+
export declare function defaultRoots(): Promise<Roots>;
|
|
7
|
+
/** Wire an engine to `api`'s methods. Exported so the tests drive the real handlers. */
|
|
8
|
+
export declare function serve(api: Pick<HostPluginApi, "handle" | "push">, engine: Engine): () => void;
|
|
9
|
+
export declare function activate(api: HostPluginApi): Promise<void>;
|
|
10
|
+
export declare function deactivate(): void;
|