solpi-dsh: four efficiency mechanisms for long task sessions (an out-of-tree dsh-plugin)
#6577
ryanxie113
started this conversation in
Show Your Plugins!
Replies: 1 comment
|
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi all 👋 We've been running long multi-hour coding sessions on dsh and kept hitting
the same four frictions: edits needed a manual follow-up command, planning phases got
spilled previews instead of full code, ten-thousand-line test logs drowned the
context, and the session only ever grew.
solpi-dsh is our answer — a single npm
bundle that ships four independent mechanisms:
thenRun), result marked[then_run:succeeded/failed/skipped]$DSH_HOME/sol-pi/epr/)Everything is off by default, each mechanism can be toggled independently, and they
compose naturally: spill-policy trims big outputs first, EPR collapses diagnostics,
and OCC's economic gate works on what's left — the session skeleton, not the raw flood.
It's measurable. A durable event log lands at
$DSH_HOME/sol-pi/telemetry/events.jsonl(fail-open, size-rotated). In our live-fire run — a red→green node:test fix loop —
14 events closed the loop across three ledgers: telemetry
epoch=2↔ OCC state fileepoch=2/requestCount=6↔ six gate checks. One concrete sample: a 5255-byte failingtest log reduced to a 1480-byte receipt carrying 5 verbatim quotes; the model cited
the fatal line correctly afterwards.
Build notes that might help other plugin authors (things we learned the hard way):
awaitin a plugin module fails the boot ("Top-level await is currently notsupported"). Keep module init synchronous.
fileswhitelist: compaction-basic ships onlylib/, so its"./src/*"export map entry is unreachable from npm installs.If you reach into another package's internals, ask upstream to make it public API.
dsh plugin add <dir>≠ barepnpm add <dir>— only the former reconcilesdsh.profile.bundles. And it operates under$DSH_HOME, which may not be thedirectory you're looking at.
SOLPI_DSH_ROOT-style escape hatch (env var → walk-up probe → fail-fast) hasworked well as a general pattern for out-of-tree plugins that need to anchor
against the running installation.
Three upstream proposals came out of this work (drafts here):
tokenMeter.measure(cacheeconomics gates are currently config assumptions, not measurements);
purposefield so third-party and built-incompactions are distinguishable in forensics;
Known limits are documented honestly in the README (single model/provider validated,
dual-session concurrency tested only lightly). Feedback and issue reports welcome —
especially if you try it against different providers or larger windows.
All reactions