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,25 @@
|
|
|
1
|
+
import { type HostPluginApi } from "@waterplane/shared";
|
|
2
|
+
import type { DiskProfile } from "../shared/wire.mjs";
|
|
3
|
+
import type { Roots } from "./candidates.mjs";
|
|
4
|
+
import { type Engine } from "./engine.mjs";
|
|
5
|
+
export { createEngine } from "./engine.mjs";
|
|
6
|
+
export type { Roots } from "./candidates.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Which desktop this is, decided once: a Mac, plain Linux, or Linux inside Windows' WSL — the same
|
|
9
|
+
* test the host's own WSL checks use (`WSL_DISTRO_NAME`/`WSL_INTEROP`, else "microsoft" in the
|
|
10
|
+
* kernel release). Any other platform is read as plain Linux.
|
|
11
|
+
*/
|
|
12
|
+
export declare function detectProfile(platform?: NodeJS.Platform, e?: NodeJS.ProcessEnv): Promise<DiskProfile>;
|
|
13
|
+
/** `cmd.exe /c echo %USERPROFILE%`'s answer, if it is one (an unset variable echoes itself). */
|
|
14
|
+
export declare function parseUserProfile(out: string): string | null;
|
|
15
|
+
/** wsl: the Windows user folder as a /mnt path, asked of Windows once (time-bounded) and cached. */
|
|
16
|
+
export declare function resolveWinHome(): Promise<{
|
|
17
|
+
winHome: string | null;
|
|
18
|
+
why?: string;
|
|
19
|
+
}>;
|
|
20
|
+
/** This desktop's roots. `WATERPLANE_ROOT` as the daemon reads it, else ~/dev. */
|
|
21
|
+
export declare function defaultRoots(): Promise<Roots>;
|
|
22
|
+
/** Wire an engine to `api`'s methods and push. Exported so the tests drive the real handlers. */
|
|
23
|
+
export declare function serve(api: Pick<HostPluginApi, "handle" | "push">, engine: Engine): () => void;
|
|
24
|
+
export declare function activate(api: HostPluginApi): Promise<void>;
|
|
25
|
+
export declare function deactivate(): void;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The disk-space extension's host half: the methods the phone's sheet calls (`shared/wire.mts`) over
|
|
3
|
+
* the engine (`engine.mts`). Contributed through the same `HostPluginApi` an external plugin gets.
|
|
4
|
+
*
|
|
5
|
+
* Spends nothing: `du`, `find`, `git check-ignore` and `ollama list|rm`, each by `execFile`/`spawn`
|
|
6
|
+
* with no shell and a time bound. Nothing runs until the phone asks — no poller.
|
|
7
|
+
*/
|
|
8
|
+
import { access, readFile, stat } from "node:fs/promises";
|
|
9
|
+
import { homedir, userInfo } from "node:os";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
import { handleAll, makeEnvReader } from "@waterplane/shared";
|
|
12
|
+
import { LARGE_LIMIT_S, PUSH_CHANGED } from "../shared/wire.mjs";
|
|
13
|
+
import { createEngine } from "./engine.mjs";
|
|
14
|
+
import { run } from "./run.mjs";
|
|
15
|
+
export { createEngine } from "./engine.mjs";
|
|
16
|
+
const { env } = makeEnvReader(process.env, (text) => console.warn(text));
|
|
17
|
+
const OLLAMA_PLACES = ["/opt/homebrew/bin/ollama", "/usr/local/bin/ollama", "/Applications/Ollama.app/Contents/Resources/ollama", "/usr/bin/ollama"];
|
|
18
|
+
async function findOllama() {
|
|
19
|
+
for (const p of OLLAMA_PLACES) {
|
|
20
|
+
try {
|
|
21
|
+
await access(p);
|
|
22
|
+
return p;
|
|
23
|
+
}
|
|
24
|
+
catch { /* next */ }
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Which desktop this is, decided once: a Mac, plain Linux, or Linux inside Windows' WSL — the same
|
|
30
|
+
* test the host's own WSL checks use (`WSL_DISTRO_NAME`/`WSL_INTEROP`, else "microsoft" in the
|
|
31
|
+
* kernel release). Any other platform is read as plain Linux.
|
|
32
|
+
*/
|
|
33
|
+
export async function detectProfile(platform = process.platform, e = process.env) {
|
|
34
|
+
if (platform === "darwin")
|
|
35
|
+
return "mac";
|
|
36
|
+
if (e.WSL_DISTRO_NAME || e.WSL_INTEROP)
|
|
37
|
+
return "wsl";
|
|
38
|
+
try {
|
|
39
|
+
if (/microsoft/i.test(await readFile("/proc/sys/kernel/osrelease", "utf8")))
|
|
40
|
+
return "wsl";
|
|
41
|
+
}
|
|
42
|
+
catch { /* not WSL */ }
|
|
43
|
+
return "linux";
|
|
44
|
+
}
|
|
45
|
+
/** `cmd.exe /c echo %USERPROFILE%`'s answer, if it is one (an unset variable echoes itself). */
|
|
46
|
+
export function parseUserProfile(out) {
|
|
47
|
+
const line = out.split(/\r?\n/).map((l) => l.trim()).filter(Boolean).at(-1) ?? "";
|
|
48
|
+
return /^[A-Za-z]:\\[^%\r\n]*$/.test(line) ? line : null;
|
|
49
|
+
}
|
|
50
|
+
let winHomeCache = null;
|
|
51
|
+
/** wsl: the Windows user folder as a /mnt path, asked of Windows once (time-bounded) and cached. */
|
|
52
|
+
export function resolveWinHome() {
|
|
53
|
+
winHomeCache ??= (async () => {
|
|
54
|
+
// cwd on the Windows drive: cmd.exe started from a Linux folder prints a UNC warning first.
|
|
55
|
+
let cwd = "/mnt/c";
|
|
56
|
+
try {
|
|
57
|
+
await access(cwd);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
cwd = undefined;
|
|
61
|
+
}
|
|
62
|
+
const echo = await run("cmd.exe", ["/c", "echo", "%USERPROFILE%"], { timeoutMs: 10_000, cwd });
|
|
63
|
+
const win = echo.code === 0 ? parseUserProfile(echo.stdout) : null;
|
|
64
|
+
if (!win)
|
|
65
|
+
return { winHome: null, why: echo.timedOut ? "cmd.exe did not answer within 10 s" : echo.code !== 0 ? `cmd.exe could not run (${echo.error ?? `exit ${echo.code}`}) — is WSL interop switched off?` : "cmd.exe gave no %USERPROFILE%" };
|
|
66
|
+
const u = await run("wslpath", ["-u", win], { timeoutMs: 5_000 });
|
|
67
|
+
const path = u.code === 0 ? u.stdout.trim() : "";
|
|
68
|
+
if (!path.startsWith("/"))
|
|
69
|
+
return { winHome: null, why: `wslpath could not translate ${win}` };
|
|
70
|
+
try {
|
|
71
|
+
if (!(await stat(path)).isDirectory())
|
|
72
|
+
throw new Error("not a folder");
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return { winHome: null, why: `${path} is not reachable from WSL` };
|
|
76
|
+
}
|
|
77
|
+
return { winHome: path };
|
|
78
|
+
})();
|
|
79
|
+
return winHomeCache;
|
|
80
|
+
}
|
|
81
|
+
/** This desktop's roots. `WATERPLANE_ROOT` as the daemon reads it, else ~/dev. */
|
|
82
|
+
export async function defaultRoots() {
|
|
83
|
+
const home = homedir();
|
|
84
|
+
const profile = await detectProfile();
|
|
85
|
+
const wsl = profile === "wsl" ? await resolveWinHome() : null;
|
|
86
|
+
return {
|
|
87
|
+
profile,
|
|
88
|
+
winHome: wsl?.winHome ?? null,
|
|
89
|
+
wslDistro: profile === "wsl" ? (process.env.WSL_DISTRO_NAME || null) : null,
|
|
90
|
+
profileNote: wsl && !wsl.winHome ? `Only the Linux side of WSL is listed: the Windows home folder could not be found (${wsl.why}).` : null,
|
|
91
|
+
psBin: profile === "wsl" ? "powershell.exe" : null,
|
|
92
|
+
// One call sizes every Windows-side folder of a scan phase; what it has not reached by then is "size unknown".
|
|
93
|
+
psTimeoutMs: 180_000,
|
|
94
|
+
home,
|
|
95
|
+
root: (env("ROOT") || "").trim() || join(home, "dev"),
|
|
96
|
+
// Claude Code keeps session scratch folders under /tmp/claude-<uid> (on a Mac /tmp is /private/tmp).
|
|
97
|
+
tmpRoot: profile === "mac" ? `/private/tmp/claude-${userInfo().uid}` : `/tmp/claude-${userInfo().uid}`,
|
|
98
|
+
androidSdk: (process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT || "").trim() || (profile === "mac" ? join(home, "Library", "Android", "sdk") : join(home, "Android", "Sdk")),
|
|
99
|
+
duBin: "/usr/bin/du",
|
|
100
|
+
gitBin: "git",
|
|
101
|
+
findBin: "/usr/bin/find",
|
|
102
|
+
ollamaBin: await findOllama(),
|
|
103
|
+
duTimeoutMs: 120_000,
|
|
104
|
+
concurrency: 4,
|
|
105
|
+
walkDepth: 8,
|
|
106
|
+
walkBudget: 60_000,
|
|
107
|
+
tmpMinAgeMs: 24 * 3600_000,
|
|
108
|
+
winTempMinAgeMs: 7 * 24 * 3600_000,
|
|
109
|
+
largeLimitMs: LARGE_LIMIT_S * 1000,
|
|
110
|
+
largeMinSize: "+500M",
|
|
111
|
+
now: () => Date.now(),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** Wire an engine to `api`'s methods and push. Exported so the tests drive the real handlers. */
|
|
115
|
+
export function serve(api, engine) {
|
|
116
|
+
return handleAll(api, {
|
|
117
|
+
state: () => engine.state(),
|
|
118
|
+
scan: () => engine.scan(),
|
|
119
|
+
scanLarge: () => engine.scanLarge(),
|
|
120
|
+
scanCode: () => engine.scanCode(),
|
|
121
|
+
remove: (a) => engine.remove(a?.id),
|
|
122
|
+
cleanTemp: () => engine.cleanTemp(),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
let off = null;
|
|
126
|
+
export async function activate(api) {
|
|
127
|
+
const roots = await defaultRoots();
|
|
128
|
+
const engine = createEngine(roots, () => { api.push(PUSH_CHANGED, { at: Date.now() }); });
|
|
129
|
+
off = serve(api, engine);
|
|
130
|
+
}
|
|
131
|
+
export function deactivate() {
|
|
132
|
+
off?.();
|
|
133
|
+
off = null;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../../extensions/diskspace/host/index.mts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAsB,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoB,MAAM,oBAAoB,CAAC;AAGnF,OAAO,EAAE,YAAY,EAAe,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,MAAM,EAAE,GAAG,EAAE,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAEzE,MAAM,aAAa,GAAG,CAAC,0BAA0B,EAAE,uBAAuB,EAAE,oDAAoD,EAAE,iBAAiB,CAAC,CAAC;AAErJ,KAAK,UAAU,UAAU;IACvB,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;QAAC,IAAI,CAAC;YAAC,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC;IAA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AAI,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,GAAkB;IAC/C,MAAM,KAAK,GAAG,MAAM,YAAY,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1F,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,GAAG,EAAE,EAAE,CAAC;IACR,GAAG,GAAG,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LargeFile } from "../shared/wire.mjs";
|
|
2
|
+
import { type Roots } from "./candidates.mjs";
|
|
3
|
+
export interface LargeOutcome {
|
|
4
|
+
items: LargeFile[];
|
|
5
|
+
found: number;
|
|
6
|
+
stoppedAfterS: number | null;
|
|
7
|
+
tookMs: number;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function findArgs(r: Roots): string[];
|
|
11
|
+
export declare function findLarge(r: Roots): Promise<LargeOutcome>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Scan for large files": a plain `find` over $HOME — no model call, no `claude -p`, zero tokens.
|
|
3
|
+
* One filesystem (`-xdev`), the folders the lists already cover pruned, killed at its time bound
|
|
4
|
+
* with whatever it found so far reported as PARTIAL. Show-only: nothing here has a delete path.
|
|
5
|
+
*/
|
|
6
|
+
import { spawn } from "node:child_process";
|
|
7
|
+
import { stat } from "node:fs/promises";
|
|
8
|
+
import { LARGE_TOP } from "../shared/wire.mjs";
|
|
9
|
+
import { coveredPaths, tilde } from "./candidates.mjs";
|
|
10
|
+
import { pool } from "./run.mjs";
|
|
11
|
+
export function findArgs(r) {
|
|
12
|
+
const prune = coveredPaths(r).flatMap((p, i) => (i ? ["-o", "-path", p] : ["-path", p]));
|
|
13
|
+
return [r.home, "-xdev", "(", ...prune, ")", "-prune", "-o", "-type", "f", "-size", r.largeMinSize, "-print"];
|
|
14
|
+
}
|
|
15
|
+
export function findLarge(r) {
|
|
16
|
+
const t0 = Date.now();
|
|
17
|
+
return new Promise((resolve) => {
|
|
18
|
+
const paths = [];
|
|
19
|
+
let buf = "";
|
|
20
|
+
let stopped = false;
|
|
21
|
+
let spawnError;
|
|
22
|
+
const child = spawn(r.findBin, findArgs(r), { stdio: ["ignore", "pipe", "ignore"] });
|
|
23
|
+
const timer = setTimeout(() => { stopped = true; child.kill("SIGKILL"); }, r.largeLimitMs);
|
|
24
|
+
child.stdout.setEncoding("utf8");
|
|
25
|
+
child.stdout.on("data", (d) => {
|
|
26
|
+
buf += d;
|
|
27
|
+
const lines = buf.split("\n");
|
|
28
|
+
buf = lines.pop() ?? "";
|
|
29
|
+
for (const l of lines)
|
|
30
|
+
if (l)
|
|
31
|
+
paths.push(l);
|
|
32
|
+
});
|
|
33
|
+
child.on("error", (e) => { spawnError = e.message; });
|
|
34
|
+
child.on("close", async () => {
|
|
35
|
+
clearTimeout(timer);
|
|
36
|
+
if (buf && !stopped)
|
|
37
|
+
paths.push(buf); // a half line from a killed find is dropped
|
|
38
|
+
const stats = await pool(paths, 8, async (p) => {
|
|
39
|
+
try {
|
|
40
|
+
const s = await stat(p);
|
|
41
|
+
return { path: tilde(p, r.home), sizeKb: Math.round(s.size / 1024), mtime: s.mtimeMs };
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const items = stats.filter((x) => x != null).sort((a, b) => b.sizeKb - a.sizeKb);
|
|
48
|
+
resolve({
|
|
49
|
+
items: items.slice(0, LARGE_TOP), found: items.length, tookMs: Date.now() - t0,
|
|
50
|
+
stoppedAfterS: stopped ? Math.round(r.largeLimitMs / 1000) : null,
|
|
51
|
+
...(spawnError ? { error: `find could not run: ${spawnError}` } : {}),
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=large.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"large.mjs","sourceRoot":"","sources":["../../../../../extensions/diskspace/host/large.mts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,KAAK,EAAc,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,MAAM,UAAU,QAAQ,CAAC,CAAQ;IAC/B,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACzF,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AAChH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,CAAQ;IAChC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACtB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAa,EAAE,CAAC;QAC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3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
timedOut: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Run `bin argv` with no shell, killed (SIGKILL) after `timeoutMs`. Resolves, never rejects. */
|
|
9
|
+
export declare function run(bin: string, argv: string[], opts: {
|
|
10
|
+
timeoutMs: number;
|
|
11
|
+
cwd?: string;
|
|
12
|
+
maxBuffer?: number;
|
|
13
|
+
input?: string;
|
|
14
|
+
}): Promise<RunResult>;
|
|
15
|
+
export type Runner = typeof run;
|
|
16
|
+
export interface Measured {
|
|
17
|
+
sizeKb: number | null;
|
|
18
|
+
partial?: boolean;
|
|
19
|
+
sizeNote?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* `du -skx -- path`. A timeout or no number is UNKNOWN with the reason, never 0. A number with a
|
|
23
|
+
* non-zero exit (unreadable files inside) is a FLOOR, said as such.
|
|
24
|
+
*/
|
|
25
|
+
export declare function measure(path: string, o: {
|
|
26
|
+
duBin: string;
|
|
27
|
+
timeoutMs: number;
|
|
28
|
+
}): Promise<Measured>;
|
|
29
|
+
/** Map `items` through `fn` with at most `limit` in flight. Order kept. */
|
|
30
|
+
export declare function pool<T, R>(items: readonly T[], limit: number, fn: (t: T) => Promise<R>): Promise<R[]>;
|
|
31
|
+
/** Free and total of the volume holding `path`, or null when statfs could not say. */
|
|
32
|
+
export declare function volumeOf(path: string): Promise<{
|
|
33
|
+
path: string;
|
|
34
|
+
freeKb: number;
|
|
35
|
+
totalKb: number;
|
|
36
|
+
} | null>;
|
|
37
|
+
/** Let the event loop breathe during a long walk. */
|
|
38
|
+
export declare const tick: () => Promise<void>;
|
|
39
|
+
/** `powershell.exe … "<free> <used>"` (bytes) as KiB; null when it is not two whole numbers. */
|
|
40
|
+
export declare function parsePsDrive(out: string): {
|
|
41
|
+
freeKb: number;
|
|
42
|
+
totalKb: number;
|
|
43
|
+
} | null;
|
|
44
|
+
/**
|
|
45
|
+
* The Windows drive `winHome` is on (wsl), as `C:`: statfs of the /mnt mount first (WSL2's drvfs
|
|
46
|
+
* answers it with the drive's own figures), and when that fails or says something impossible,
|
|
47
|
+
* PowerShell's `Get-PSDrive` with a time bound. Neither: null and the sentence why — never a guess.
|
|
48
|
+
*/
|
|
49
|
+
export declare function windowsVolume(winHome: string, psBin: string | null | undefined): Promise<{
|
|
50
|
+
volume: DiskVolumeLike | null;
|
|
51
|
+
note?: string;
|
|
52
|
+
}>;
|
|
53
|
+
export interface DiskVolumeLike {
|
|
54
|
+
path: string;
|
|
55
|
+
freeKb: number;
|
|
56
|
+
totalKb: number;
|
|
57
|
+
label?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The PowerShell that sums file lengths for each path it is handed. The paths arrive on STDIN as
|
|
61
|
+
* JSON (`{"p":[...]}`, ASCII-only with `\u` escapes, so the console code page cannot mangle a name)
|
|
62
|
+
* and are never part of this text: nothing a folder is called can become a command. It prints one
|
|
63
|
+
* line per path as soon as that path is done (`{"i","bytes","bad","found"}`, numbers only), so a
|
|
64
|
+
* run stopped by its time bound still answers for the paths it finished. Folder links (junctions,
|
|
65
|
+
* symlinks) are not followed, as `du -x` would not; `bad` counts what could not be read.
|
|
66
|
+
*/
|
|
67
|
+
export declare const PS_SIZES: string;
|
|
68
|
+
/** JSON with every non-ASCII character as a `\u` escape: what goes to PowerShell's stdin. */
|
|
69
|
+
export declare const asciiJson: (v: unknown) => string;
|
|
70
|
+
export interface PsLine {
|
|
71
|
+
bytes: number;
|
|
72
|
+
bad: number;
|
|
73
|
+
found: boolean;
|
|
74
|
+
}
|
|
75
|
+
/** PowerShell's lines for `n` paths, by index. A line that is not exactly that shape is ignored — never read as 0. */
|
|
76
|
+
export declare function parsePsSizes(out: string, n: number): Map<number, PsLine>;
|
|
77
|
+
/** `/mnt/c/Users/me/x` as Windows names it (`C:\Users\me\x`); null for any other path. What `wslpath -w` answers under the default /mnt automount. */
|
|
78
|
+
export declare function winPathOf(p: string): string | null;
|
|
79
|
+
/**
|
|
80
|
+
* Sizes of Windows-side paths from ONE `powershell.exe` call. `fallback` (with the reason) when
|
|
81
|
+
* PowerShell is missing, a path has no Windows form, or it answered nothing usable: the caller then
|
|
82
|
+
* measures with `du` as before. Otherwise every path has a reading — a path PowerShell did not reach
|
|
83
|
+
* before its time bound is UNKNOWN with that reason, never 0.
|
|
84
|
+
*/
|
|
85
|
+
export declare function measureWindows(paths: readonly string[], o: {
|
|
86
|
+
psBin: string | null | undefined;
|
|
87
|
+
timeoutMs: number;
|
|
88
|
+
run?: Runner;
|
|
89
|
+
winPath?: (p: string) => string | null;
|
|
90
|
+
}): Promise<{
|
|
91
|
+
byPath: Map<string, Measured>;
|
|
92
|
+
} | {
|
|
93
|
+
fallback: string;
|
|
94
|
+
}>;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The disk-space extension's process plumbing: async `execFile` with a hard time bound, `du -sk`
|
|
3
|
+
* read honestly, a concurrency pool and the volume reading. Nothing here blocks the loop that pumps
|
|
4
|
+
* every PTY: no `*Sync` call, no shell.
|
|
5
|
+
*/
|
|
6
|
+
import { execFile } from "node:child_process";
|
|
7
|
+
import { statfs } from "node:fs/promises";
|
|
8
|
+
/** Run `bin argv` with no shell, killed (SIGKILL) after `timeoutMs`. Resolves, never rejects. */
|
|
9
|
+
export function run(bin, argv, opts) {
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
|
+
const cp = execFile(bin, argv, { timeout: opts.timeoutMs, killSignal: "SIGKILL", cwd: opts.cwd, maxBuffer: opts.maxBuffer ?? 8 * 1024 * 1024, encoding: "utf8" }, (err, stdout, stderr) => {
|
|
12
|
+
if (!err) {
|
|
13
|
+
resolve({ code: 0, stdout, stderr, timedOut: false });
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const e = err;
|
|
17
|
+
const timedOut = e.killed === true && e.signal === "SIGKILL";
|
|
18
|
+
const code = typeof e.code === "number" ? e.code : null;
|
|
19
|
+
resolve({ code, stdout: stdout ?? "", stderr: stderr ?? "", timedOut, error: typeof e.code === "string" ? `${e.code}` : e.message });
|
|
20
|
+
});
|
|
21
|
+
// stdin: the input when there is one, else closed at once (a program reading it must not wait for ever).
|
|
22
|
+
cp.stdin?.on("error", () => undefined);
|
|
23
|
+
cp.stdin?.end(opts.input ?? "");
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* `du -skx -- path`. A timeout or no number is UNKNOWN with the reason, never 0. A number with a
|
|
28
|
+
* non-zero exit (unreadable files inside) is a FLOOR, said as such.
|
|
29
|
+
*/
|
|
30
|
+
export async function measure(path, o) {
|
|
31
|
+
const r = await run(o.duBin, ["-skx", "--", path], { timeoutMs: o.timeoutMs });
|
|
32
|
+
if (r.timedOut)
|
|
33
|
+
return { sizeKb: null, sizeNote: `size unknown — du did not finish within ${Math.round(o.timeoutMs / 1000)} s` };
|
|
34
|
+
const m = /^(\d+)\s/.exec(r.stdout.split("\n").filter(Boolean).at(-1) ?? "");
|
|
35
|
+
if (!m)
|
|
36
|
+
return { sizeKb: null, sizeNote: `size unknown — du gave no number${r.error ? ` (${r.error})` : ""}` };
|
|
37
|
+
const kb = Number(m[1]);
|
|
38
|
+
if (r.code === 0)
|
|
39
|
+
return { sizeKb: kb };
|
|
40
|
+
return { sizeKb: kb, partial: true, sizeNote: "some files inside could not be read — at least this much" };
|
|
41
|
+
}
|
|
42
|
+
/** Map `items` through `fn` with at most `limit` in flight. Order kept. */
|
|
43
|
+
export async function pool(items, limit, fn) {
|
|
44
|
+
const out = new Array(items.length);
|
|
45
|
+
let next = 0;
|
|
46
|
+
const worker = async () => { for (;;) {
|
|
47
|
+
const i = next++;
|
|
48
|
+
if (i >= items.length)
|
|
49
|
+
return;
|
|
50
|
+
out[i] = await fn(items[i]);
|
|
51
|
+
} };
|
|
52
|
+
await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker));
|
|
53
|
+
return out;
|
|
54
|
+
}
|
|
55
|
+
/** Free and total of the volume holding `path`, or null when statfs could not say. */
|
|
56
|
+
export async function volumeOf(path) {
|
|
57
|
+
try {
|
|
58
|
+
const s = await statfs(path);
|
|
59
|
+
const freeKb = Math.floor((Number(s.bavail) * Number(s.bsize)) / 1024);
|
|
60
|
+
const totalKb = Math.floor((Number(s.blocks) * Number(s.bsize)) / 1024);
|
|
61
|
+
if (!Number.isFinite(freeKb) || !Number.isFinite(totalKb) || totalKb <= 0)
|
|
62
|
+
return null;
|
|
63
|
+
return { path, freeKb, totalKb };
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** Let the event loop breathe during a long walk. */
|
|
70
|
+
export const tick = () => new Promise((r) => setImmediate(r));
|
|
71
|
+
/** `powershell.exe … "<free> <used>"` (bytes) as KiB; null when it is not two whole numbers. */
|
|
72
|
+
export function parsePsDrive(out) {
|
|
73
|
+
const m = /^\s*(\d+)\s+(\d+)\s*$/.exec(out);
|
|
74
|
+
if (!m)
|
|
75
|
+
return null;
|
|
76
|
+
const free = Number(m[1]), used = Number(m[2]);
|
|
77
|
+
if (!Number.isSafeInteger(free) || !Number.isSafeInteger(used) || free + used <= 0)
|
|
78
|
+
return null;
|
|
79
|
+
return { freeKb: Math.floor(free / 1024), totalKb: Math.floor((free + used) / 1024) };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The Windows drive `winHome` is on (wsl), as `C:`: statfs of the /mnt mount first (WSL2's drvfs
|
|
83
|
+
* answers it with the drive's own figures), and when that fails or says something impossible,
|
|
84
|
+
* PowerShell's `Get-PSDrive` with a time bound. Neither: null and the sentence why — never a guess.
|
|
85
|
+
*/
|
|
86
|
+
export async function windowsVolume(winHome, psBin) {
|
|
87
|
+
const letter = /^\/mnt\/([a-z])(\/|$)/.exec(winHome)?.[1]?.toUpperCase() ?? "C";
|
|
88
|
+
const label = `${letter}:`;
|
|
89
|
+
const v = await volumeOf(winHome);
|
|
90
|
+
if (v && v.freeKb <= v.totalKb)
|
|
91
|
+
return { volume: { ...v, label } };
|
|
92
|
+
if (psBin) {
|
|
93
|
+
const r = await run(psBin, ["-NoProfile", "-NonInteractive", "-Command", `$d = Get-PSDrive -Name ${letter}; "$($d.Free) $($d.Used)"`], { timeoutMs: 15_000 });
|
|
94
|
+
const got = r.code === 0 ? parsePsDrive(r.stdout) : null;
|
|
95
|
+
if (got)
|
|
96
|
+
return { volume: { path: winHome, ...got, label } };
|
|
97
|
+
return { volume: null, note: `Free space on ${label} could not be read: statfs on ${winHome} gave no usable figure, and PowerShell ${r.timedOut ? "did not answer within 15 s" : "gave no number"}.` };
|
|
98
|
+
}
|
|
99
|
+
return { volume: null, note: `Free space on ${label} could not be read: statfs on ${winHome} gave no usable figure, and powershell.exe is not reachable from WSL.` };
|
|
100
|
+
}
|
|
101
|
+
// ── Windows-side sizes on wsl: one PowerShell call for a list of folders ──────────────────────
|
|
102
|
+
/**
|
|
103
|
+
* The PowerShell that sums file lengths for each path it is handed. The paths arrive on STDIN as
|
|
104
|
+
* JSON (`{"p":[...]}`, ASCII-only with `\u` escapes, so the console code page cannot mangle a name)
|
|
105
|
+
* and are never part of this text: nothing a folder is called can become a command. It prints one
|
|
106
|
+
* line per path as soon as that path is done (`{"i","bytes","bad","found"}`, numbers only), so a
|
|
107
|
+
* run stopped by its time bound still answers for the paths it finished. Folder links (junctions,
|
|
108
|
+
* symlinks) are not followed, as `du -x` would not; `bad` counts what could not be read.
|
|
109
|
+
*/
|
|
110
|
+
export const PS_SIZES = [
|
|
111
|
+
"$ErrorActionPreference='SilentlyContinue'",
|
|
112
|
+
"$ps=@(([Console]::In.ReadToEnd() | ConvertFrom-Json).p)",
|
|
113
|
+
"for($i=0;$i -lt $ps.Count;$i++){",
|
|
114
|
+
" $n=[int64]0;$bad=0;$found=1",
|
|
115
|
+
" $it=Get-Item -LiteralPath $ps[$i] -Force",
|
|
116
|
+
" if($null -eq $it){$found=0}",
|
|
117
|
+
" elseif(-not $it.PSIsContainer){$n=[int64]$it.Length}",
|
|
118
|
+
" else{",
|
|
119
|
+
" $st=New-Object System.Collections.Stack;$st.Push($it.FullName)",
|
|
120
|
+
" while($st.Count -gt 0){",
|
|
121
|
+
" $d=$st.Pop();$ev=$null",
|
|
122
|
+
" $cs=Get-ChildItem -LiteralPath $d -Force -ErrorVariable ev",
|
|
123
|
+
" if($ev){$bad+=@($ev).Count}",
|
|
124
|
+
" foreach($c in $cs){",
|
|
125
|
+
" if($c.PSIsContainer){if(-not ($c.Attributes -band [IO.FileAttributes]::ReparsePoint)){$st.Push($c.FullName)}}",
|
|
126
|
+
" else{$n+=[int64]$c.Length}",
|
|
127
|
+
" }",
|
|
128
|
+
" }",
|
|
129
|
+
" }",
|
|
130
|
+
" [Console]::Out.WriteLine('{\"i\":'+$i+',\"bytes\":'+$n+',\"bad\":'+$bad+',\"found\":'+$found+'}')",
|
|
131
|
+
"}",
|
|
132
|
+
].join("\n");
|
|
133
|
+
/** JSON with every non-ASCII character as a `\u` escape: what goes to PowerShell's stdin. */
|
|
134
|
+
export const asciiJson = (v) => JSON.stringify(v).replace(/[\u007f-\uffff]/g, (c) => `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
135
|
+
/** PowerShell's lines for `n` paths, by index. A line that is not exactly that shape is ignored — never read as 0. */
|
|
136
|
+
export function parsePsSizes(out, n) {
|
|
137
|
+
const got = new Map();
|
|
138
|
+
for (const line of out.split(/\r?\n/)) {
|
|
139
|
+
const t = line.trim();
|
|
140
|
+
if (!t.startsWith("{"))
|
|
141
|
+
continue;
|
|
142
|
+
let o;
|
|
143
|
+
try {
|
|
144
|
+
o = JSON.parse(t);
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const { i, bytes, bad, found } = (o ?? {});
|
|
150
|
+
if (!Number.isSafeInteger(i) || i < 0 || i >= n)
|
|
151
|
+
continue;
|
|
152
|
+
if (!Number.isSafeInteger(bytes) || bytes < 0 || !Number.isSafeInteger(bad) || bad < 0 || (found !== 0 && found !== 1))
|
|
153
|
+
continue;
|
|
154
|
+
got.set(i, { bytes: bytes, bad: bad, found: found === 1 });
|
|
155
|
+
}
|
|
156
|
+
return got;
|
|
157
|
+
}
|
|
158
|
+
/** `/mnt/c/Users/me/x` as Windows names it (`C:\Users\me\x`); null for any other path. What `wslpath -w` answers under the default /mnt automount. */
|
|
159
|
+
export function winPathOf(p) {
|
|
160
|
+
const m = /^\/mnt\/([a-z])(\/.*)?$/.exec(p);
|
|
161
|
+
if (!m)
|
|
162
|
+
return null;
|
|
163
|
+
let rest = m[2] ?? "";
|
|
164
|
+
while (rest.endsWith("/"))
|
|
165
|
+
rest = rest.slice(0, -1);
|
|
166
|
+
return `${m[1].toUpperCase()}:${rest ? rest.replace(/\//g, "\\") : "\\"}`;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Sizes of Windows-side paths from ONE `powershell.exe` call. `fallback` (with the reason) when
|
|
170
|
+
* PowerShell is missing, a path has no Windows form, or it answered nothing usable: the caller then
|
|
171
|
+
* measures with `du` as before. Otherwise every path has a reading — a path PowerShell did not reach
|
|
172
|
+
* before its time bound is UNKNOWN with that reason, never 0.
|
|
173
|
+
*/
|
|
174
|
+
export async function measureWindows(paths, o) {
|
|
175
|
+
if (!o.psBin)
|
|
176
|
+
return { fallback: "powershell.exe is not reachable from WSL" };
|
|
177
|
+
const conv = o.winPath ?? winPathOf;
|
|
178
|
+
const wins = paths.map(conv);
|
|
179
|
+
const bad = paths.find((_, i) => wins[i] == null);
|
|
180
|
+
if (bad)
|
|
181
|
+
return { fallback: `${bad} has no Windows path` };
|
|
182
|
+
const res = await (o.run ?? run)(o.psBin, ["-NoProfile", "-NonInteractive", "-Command", PS_SIZES], { timeoutMs: o.timeoutMs, input: asciiJson({ p: wins }), cwd: undefined });
|
|
183
|
+
const got = parsePsSizes(res.stdout, paths.length);
|
|
184
|
+
if (!got.size && !res.timedOut)
|
|
185
|
+
return { fallback: `PowerShell gave no sizes (${res.error ?? `exit ${res.code}`})` };
|
|
186
|
+
const byPath = new Map();
|
|
187
|
+
paths.forEach((p, i) => {
|
|
188
|
+
const g = got.get(i);
|
|
189
|
+
if (!g)
|
|
190
|
+
byPath.set(p, { sizeKb: null, sizeNote: res.timedOut ? `size unknown — PowerShell did not finish within ${Math.round(o.timeoutMs / 1000)} s` : "size unknown — PowerShell gave no number for it" });
|
|
191
|
+
else if (!g.found)
|
|
192
|
+
byPath.set(p, { sizeKb: null, sizeNote: "size unknown — Windows did not find it" });
|
|
193
|
+
else if (g.bad > 0)
|
|
194
|
+
byPath.set(p, { sizeKb: Math.ceil(g.bytes / 1024), partial: true, sizeNote: "some files inside could not be read — at least this much" });
|
|
195
|
+
else
|
|
196
|
+
byPath.set(p, { sizeKb: Math.ceil(g.bytes / 1024) });
|
|
197
|
+
});
|
|
198
|
+
return { byPath };
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=run.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.mjs","sourceRoot":"","sources":["../../../../../extensions/diskspace/host/run.mts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI1C,iGAAiG;AACjG,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,IAAc,EAAE,IAA6E;IAC5H,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,IAAI,GAAG,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