- Início
- Plugins
- Sessões e mensagens
- dsh-code-runtime-kernels
dsh-code-runtime-kernels
hy-sde/dsh-code-runtime-kernels
The run_kernel_code tool for DeepSeek Harness: persistent Python and JavaScript kernels (a long-lived python3/node subprocess per session, sharing a core host driver) — a standalone plugin with no upstream harness changes required.
Instalar
dsh plugin --profile web add github:hy-sde/dsh-code-runtime-kernelsREADME
dsh-code-runtime-kernels
Persistent Python + JavaScript kernels for DeepSeek Harness — a standalone
plugin repo hosting ONE package,
@hy-sde-org/dsh-code-runtime-kernels, that
gives the model a first-class run_kernel_code tool with session/reset
state, execution counts, and both languages — with zero upstream harness
changes required.
packages/code-runtime-kernels/
src/
core/ shared host driver: NDJSON protocol, `KernelHost`
(spawn+handshake, hostile-peer parsing, interrupt
escalation, shutdown), `SessionRegistry` (serialize,
reset, replace-and-retry), output ledger, binding
validation, invariant
python/runner.ts embedded self-contained Python kernel (stdlib only)
nodejs/runner.ts compiled self-contained Node.js kernel (builtins only)
index.ts plugin: config, KernelManager, run_kernel_code tool
tests/ kernels.spec.ts + tool.spec.ts (real subprocesses,
36 tests)
cordis.patch.yml the bundle row deployments mount
Design decisions:
- One plugin, two providers, one core. Both kernels share the driver in
src/core/; each language contributes only its runner and aKernelRuntimeProfile. Adding a language means a runner + a profile, not a driver fork. - Own tool surface. Upstream
run_codecannot carry sessions, so this plugin ownsrun_kernel_code(language, code, session?, reset?)and reuses the seam's result vocabulary (error.kindofexception/timeout/abort/worker-exit/invalid-output/output-limit), exactly like the siblingdsh-tool-astownsast_grep/ast_edit. - Process confinement, not a security boundary, matching the harness's own
processbackends.
Quick start
pnpm install
pnpm check # tsc
pnpm test # vitest — real python3/node subprocesses
pnpm build # tsc → dist
bash scripts/release-public.sh --check
Mount the bundle (@hy-sde-org/dsh-code-runtime-kernels row from
cordis.patch.yml) into any deployment, and the model gets run_kernel_code.
Full docs in the package README.
License
MIT. Portions derived from oh-my-pi (MIT, © 2025 Mario Zechner, © 2025-2026 Can Bölük) — see THIRD-PARTY-NOTICES.md.
Plugins relacionados
dsh-synapse
liangmianya/dsh-synapse
dsh-turn-rewind
anionex/dsh-turn-rewind
dsh-chat-import
nwflower/dsh-chat-import
dsh-suite (plugin-session-export)
whyihaveyou/dsh-suite