dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
A stateful, Agent-controllable Jupyter workspace for DeepSeek Harness. A persistent ipykernel runtime that your DSH agent can read, edit, execute, and inspect — turning a notebook from a static artifact into an operationable target.
This is not just another Notebook frontend. The kernel is truly persistent (variables live across cells), the notebook saves and reloads, and the agent has tools that read, modify, run, and reason about cells and their outputs. That combination gives the agent a real Agent ↔ Kernel ↔ Artifact loop.
The point of this plugin is that the DSH agent doesn't run one-shot scripts — it drives a live computational session:
User: "Switch Harmony integration to scVI." → Agent finds the relevant cell → reads its source and context → edits the cell → executes it → checks stdout / traceback → iterates if needed.
Because the kernel is persistent, the agent is operating on stateful runtime state (an Anndata, a GPU model, loaded data), not just assembling strings.
Cell In[N]) that jump to the offending cell.ipykernel + jupyter_client sidecar — variables persist across cells.nb_get, nb_edit_cell, nb_run_cell, ...) with structured access to outputs and tracebacks.nb_context, nb_list_vars, and nb_inspect_object expose live kernel variables and compact notebook state; pandas DataFrame objects get shape / dtype / missing-value / head / summary metadata.nb_cell_history, nb_revert_cell, nb_error_context, and nb_edit_and_run_cell support auditable repair-and-rerun workflows.Queued / Executing status bar, execution-number glyph.dsh web is force-killed, the Python sidecar detects parent-process death and auto-shuts-down its ipykernel — no orphan processes (cross-platform: getppid on POSIX, OpenProcess on Windows).taskset), with a copy-ready psutil snippet; dismiss it and it won't repeat.df. / plt. / variable names; Tab to accept; hover for docstrings).cell.metadata.dsh)..ipynb save / load with autosave and unsaved-changes warning.ipykernel is missing.@beihaizb/dsh-notebook in both the host patch (cordis.patch.yml) and the client loader, so dsh plugin add @beihaizb/dsh-notebook loads out of the box (previously the unscoped patch name failed to resolve against the scoped npm package).psutil snippet's comments follow the UI language (EN / 中文).nb_run_cell, nb_edit_and_run_cell, nb_run_all) returns a canonical execution envelope — status, execution_count, duration_ms, kernel_state, merged stdout/stderr, outputs_summary, image paths, error + traceback_text, and execution_index — for a reliable agent execution loop.<notebook>_files/ with a path the agent reads on demand. Base64 images stay in the UI; the envelope carries file paths instead.cell.metadata.dsh.executions (capped at 50 per cell, persisted with the notebook) — the foundation for the execution-history UI and replay-based recovery.Queued state right away (the HTTP run endpoint no longer blocks on wait for the UI), and no snapshot swap blanks the editor mid-run.\r (colored Pdb prompts, colorama prints) is now stripped before rendering — previously the cleaned string was computed but the raw o.text was rendered, leaking literal [32m/[0m garbage into the output area. Error titles (evalue) get the same treatment.fold class (the only thing that clamps the height) was gated on a measurement taken from the already-clamped element, so overflow was never detected and the button never appeared. The overflow test now measures an inner, unclamped element against one shared FOLD_PX constant, and the button reports the hidden size ("Expand all (3,000 lines)").conversation.view slot while a session is blank, so the Notebook tab used to require sending a message first. A "📓 Open Notebook in this session" entry now appears above the composer in a blank session; it activates this View target, which reveals the normal View tabs (and the host then remembers your choice for that session).peerDependencies now cover both the 0.1.x-rc and 0.2.0-rc lines (@deepseek-ai/dsh-tools: ^0.1.0-rc.6 || ^0.2.0-rc.1), so DSH's startup compatibility gate no longer refuses the plugin on a 0.2.x runtime — the old ^0.1.0-rc.6 range capped at <0.2.0, and the gate skips the whole bundle when a @deepseek-ai/dsh* peer excludes the running version. The client manifest also now names @deepseek-ai/dsh-client-ui-renderer (the client row that actually provides the slots service) instead of @deepseek-ai/dsh-client-runtime, a package that does not exist.dsh-envsel selection. Before this, the plugin took whichever selection happened to be stored last in the file, so a notebook could land in an environment an unrelated session had picked; and every delegated subagent found nothing at all, because a subagent runs in its own session. A session with no selection of its own now inherits the nearest selecting session it descends from.The trajectory is toward a full agent computational workspace, not more Notebook UI:
nb_inspect_object("adata") with n_obs, layers, obsm, and obs / var column summaries.cell.metadata.dsh (per-execution records are already collected).Supported DSH runtime lines: 0.1.x-rc and 0.2.0-rc, verified against 0.1.7-rc.2 and 0.2.0-rc.2 (the plugin declares @deepseek-ai/dsh-tools: ^0.1.0-rc.6 || ^0.2.0-rc.1). DSH refuses to boot a plugin whose @deepseek-ai/dsh* peer ranges exclude the running version and skips the whole bundle — on an untested newer line, grant an exact-version exemption (dsh plugin allow-version, or the plugin manager) instead of forcing it.
dsh plugin --profile web add @beihaizb/dsh-notebook@0.3.1
Then restart dsh web. A Notebook tab appears at the top of the session.
Note on version pinning: if you install shortly after a release, pnpm's supply-chain policy (
minimumReleaseAge) may skip the just-published version and install an older one instead. Pin the version explicitly as above (@beihaizb/dsh-notebook@0.3.1), or use@beihaizb/dsh-notebook@latestonce the release is older than the policy window.
dsh-envsel is an optional dependency. With the environment picker installed, the plugin reads its selection (the store under $DSH_HOME, i.e. ~/.dsh/envsel-state.json) and uses the conda environment you picked for the session as the default kernel. A session with no selection of its own — a delegated subagent, for example — inherits the nearest selecting session it descends from, so delegated notebook work lands in the same environment as the session that delegated it. Install:
dsh plugin --profile web add @beihaizb/dsh-envsel
(Source: github.com/beihzb/dsh-envsel)
Without dsh-envsel, the plugin falls back to the first discovered conda environment that has ipykernel installed. The store is read with its own version stamp checked, so a future envsel state format is ignored rather than misread.
You are never locked in. Switch kernels from the toolbar dropdown at any time.
The selected environment needs ipykernel, jupyter_client, and nbformat. If any is missing, the plugin shows a friendly error with the exact install command.
nb_new / nb_open / nb_save / nb_get / nb_context / nb_list /
nb_list_vars / nb_inspect_object /
nb_add_cell / nb_delete_cell / nb_move_cell / nb_edit_cell / nb_edit_and_run_cell /
nb_cell_history / nb_revert_cell / nb_error_context /
nb_run_cell / nb_run_all / nb_apply_suggestion /
nb_kernel_restart / nb_kernel_restart_and_clear / nb_kernel_interrupt /
nb_kernel_list / nb_kernel_select / nb_clear_outputs / nb_set_cwd
MIT