@deepseek-harness-pi/dsh-pi0.14.0
The oh-my-pi interactive terminal for DeepSeek Harness, as a DSH plugin.
Built for omp
The author tagged this package oh-my-pi.
Reports 0
No reports yet.
Readme
dsh-pi
The original oh-my-pi interactive terminal for DeepSeek Harness. OMP handles the interactive editor and display. DSH owns the agent, models, tools, policies and sessions, and runs non-interactive commands natively.
The DSH plugin also provides durable rules, curated memory, bundled skills,
magic keywords, prompt commands and the /pi control surface. The previous
in-tree interface remains available as dsh-pi legacy.
Install
Requirements: Node ^22.19 || >=24 for dsh-pi (DSH may require a newer Node),
and DSH stable or RC releases on the 0.2.x line from 0.2.2-rc.5 onward.
The interactive profile requires pnpm for installation and OMP
on PATH (verified with OMP 19.4.0). DSH_PI_OMP and DSH_PI_DSH can point to other
executables.
npm install -g pnpm@11 @deepseek-ai/dsh @deepseek-harness-pi/dsh-pi
dsh-pi
The first interactive launch creates $DSH_HOME/profiles/dsh-pi
(~/.dsh/profiles/dsh-pi by default) from @deepseek-ai/dsh-base and this bundle. dsh-pi setup does
this explicitly; dsh-pi doctor checks both runtimes and the profile.
Already installed? Upgrade the launcher and confirm the installed version:
npm install -g @deepseek-harness-pi/dsh-pi@latest
dsh-pi --version
Interactive startup checks @deepseek-ai/dsh@latest at most once every six hours.
It installs a newer supported release for dsh-pi only, without changing the global
dsh. If the update fails, startup continues with the existing host if it is
compatible. Headless commands, setup and doctor do not check for updates.
Set DSH_PI_AUTO_UPDATE=0 to turn off automatic checks or DSH_PI_DSH to select
a specific executable. Run dsh-pi update-dsh to check immediately, and
dsh-pi doctor to see the selected version.
Credentials
Starting with 0.12.1, if the selected DeepSeek API route has no key, the OMP
terminal shows setup instructions before you send a prompt. Enter /login
to view the DSH instructions instead of opening OMP's account picker. For the
default route, set DEEPSEEK_API_KEY in the launch environment, or run dsh web
and save the key on the Models page. If you configured a different
credential reference for the route, use the variable named in the terminal.
Restart dsh-pi after setup. Never paste credentials into the chat.
The optional TypeSafe judge reads TYPESAFE_API_KEY (or the variable named by
typesafeApiKeyEnv) from the launch environment. With a key present it answers
approvals and choice questions it is confident about; without one it stays out
of the way and every request asks you, so nothing else needs to be configured.
Usage
dsh-pi # original OMP interactive terminal
dsh-pi -p 'Summarize this repository' # native DSH one-shot answer
git diff | dsh-pi # native DSH reads the task from stdin
dsh-pi --mode json 'Explain this module' # native DSH newline-delimited events
dsh-pi headless --help # native DSH headless options
dsh-pi --resume <dsh-session-id> # resume in the OMP terminal
dsh-pi legacy # previous in-tree interface
-p, --print, --json, --mode text|json, piped stdin, or redirected stdout
select the native headless DSH profile, not the interactive dsh-pi profile.
Scripts can use dsh-pi headless to pass options directly to DSH. To resume
headlessly, run from the session's recorded workspace and pass --session-id
(or --resume through the launcher). OMP slash commands, @file expansion
and OMP JSON events are not part of the headless interface.
In OMP, type / for terminal commands or /dsh (with a trailing space) for
commands from the active DSH profile. Tab inserts the selected command so you
can add arguments. /help shows common actions. /model opens the DSH route
picker (arrow keys move the highlight, Enter commits it) and
/model [provider/]model selects a route directly; both switch the route the
next model request uses. /providers checks the active route, registered
providers and whether the DeepSeek API key was configured at launch. None of
them calls a model. /resume opens a pi-style picker over the persisted DSH
sessions: newest activity first, pinned rows ★-marked and leading, a search
box, Tab for all workspaces, ⌃P for a preview of the highlighted session's
last messages, Enter to reopen and Escape to clear the search or close. The
chosen session reopens through the launcher with its recent conversation
replayed as read-only rows above the prompt; /resume <id-or-title> skips the
picker, and /new starts fresh in the same workspace. Search for /skill: in
completion to find user-invocable skills. /skill:<name> [instructions]
loads one directly. /skills lists the same catalog by name, source and
description; /skills search <query> filters it and
/skills <name> [instructions] loads a skill into the conversation.
The picker lists every route the profile registers, including a provider whose
credential is not stored yet: its profile's declared models are shown so the
route can still be selected (the request then reports the missing credential).
The OMP status bar's context meter uses the active route's resolved window
(for example 1M, or 8.2K for an 8k model), refreshed after every route
switch, rather than the bridge's registration placeholder. Its occupancy and
token counters come from DSH's provider usage as well: each turn reports the
prompt of its newest step plus the summed billable buckets, so the meter shows
what DSH actually sent to the model instead of OMP's estimate of the bridge
stream.
The editor opens under the dsh-pi brand: oh-my-pi's 12×5 gradient block mark
beside a two-line DeepSeek Harness wordmark and the dsh-pi version, centered
above the prompt in the welcome card's style. The first prompt removes it; a
guide command such as /help replaces it with its own text. OMP's own omp
card stays disabled, so its product name and credential tips never appear.
Use /login for credential setup. If the launcher reports an older DSH version,
run dsh-pi update-dsh. If you set DSH_PI_DSH, update that executable or unset the override.
A launcher installed globally drives whichever dsh-pi checkout the profile
already links, so a development checkout is not silently replaced by the older
global copy; run dsh-pi setup from the checkout to point the profile at it explicitly.
In OMP, /dsh-session shows the DSH session ID. Run DSH commands with the
/dsh prefix, for example /dsh /pi status or /dsh /plan off. Use /login
for credential instructions and /model to select a route. Credentials and
permissions stay in the DSH profile.
/supervisor <task> is visible in the OMP / menu and fans the task out to local subagents directly —
there is nothing to pick, so the work starts at once. The terminal shows
planning and each worker's status as it changes, then the final report.
/supervisor --plan <task> prints the decomposition only.
The /resume command opens the pi-style
picker over the persisted DSH sessions (newest first, pins first, /-style
typing to search, Tab for all workspaces, ⌃P to preview, Enter to reopen,
Escape to clear or close), after which the launcher restarts the frontend in
that session's workspace; /resume <id-or-title> reopens one without the
picker. The resumed transcript replays the
recent conversation above the prompt as read-only rows — DSH already holds that
history, so the model is not asked twice. Without
the launcher (dsh --profile dsh-pi), start dsh-pi again for a fresh session, or pass
--resume with the DSH ID; /dsh-session shows the attached ID and recent
history. Running dsh --profile dsh-pi still uses the legacy row.
Tool status, approval prompts and questions come from DSH. Text and reasoning are
shown when DSH commits a model step, so discarded attempts never appear as
part of the answer.
In-tree terminal (dsh-pi legacy)
| Surface | What you get |
|---|---|
| Transcript | Markdown responses, reasoning blocks, padded user turns, and tool cards following each tool's presentCall / presentResult intent (terminal, diff and generic cards). A landed compaction checkpoint adds one dim marker where the model stopped seeing the history instead of erasing it. |
| Screen | Fullscreen by default: the terminal owns the alternate screen for the session (oh-my-pi's fullscreen screen mode), so the transcript viewport takes the whole window and the shell's scrollback stays untouched; on exit the conversation is written back into scrollback. fullscreen: false in the tui row keeps the inline mode, where frames stay in the terminal's own history. |
| Editor | Multiline editing with history, @file completion over the session workspace, slash-command and /skill: completion, hint-driven argument completion (/pi including nested /pi memory//pi rule arguments, /details , /goal , /plan , /permission presets, /find --role values, /save flags), and bracketed paste. Submitting while the agent runs steers the turn; Ctrl+C or Esc cancels it, and Ctrl+C on an idle prompt clears the buffer together with any open completion list. |
| Scrolling | The wheel (three lines per notch), PgUp/PgDn (single-line input, or whenever the view is already scrolled), Ctrl+Home/Ctrl+End (top/bottom) or `/scroll up |
| Status line | Turn phase, elapsed time, running step total and the steering queue above the editor; the footer packs model · effort, cwd, git branch, tokens, cache-hit rate and context occupancy. |
| Model picker | /model lists the advisory ctx.llm catalog with a filter box; Tab completes a known provider/model route from the same cached catalog; Shift+Tab cycles the focused model's advertised reasoning efforts. A new session starts on the host's stored default (agent-default-model), and selecting a route persists it as that default, so a restart keeps it. |
| Sessions | /resume scans persisted sessions in the current workspace or across workspaces, using the projection cache when the profile mounts it. Ctrl+P opens a preview of the highlighted session's last messages (each row stamped with its local MM-DD HH:MM time); PgUp/PgDn page further back, Ctrl+E returns to the newest messages, Ctrl+R forces a fresh read, the heading shows the visible range (and the workspace in all-workspaces scope), and previews are cached (15 s TTL, 10 sessions) while the picker is open. /new starts a fresh conversation in the same workspace in-process: the app creates the agent/session through the same factory the loop uses at boot, checkpoints the conversation it is leaving, swaps the mounted transcript to the new one, and the previous conversation stays in /resume. A session that is still live in this process (the boot conversation, or one a previous /new left behind) is adopted in place instead of restarting. Hidden aliases are listed at the bottom of /help: /search, /hist, /cls; /hotkeys shows every keybinding. /title <text> pins a session title. |
| Questions | ask_user_question renders inline between the transcript and the editor with numbered options, descriptions and paging. |
| History | /history [query] or Ctrl+P opens a searchable list of submitted prompts, seeded from the session log and .dsh-pi/history.jsonl (redacted, capped at 100); Enter inserts the full prompt into the editor (including original line breaks), and r runs the selected prompt immediately. New prompts append asynchronously, so a read-only workspace never blocks a submission. /history --clear asks for confirmation and removes the persisted file; Row numbers are positions in the full history, so a filtered view still agrees with /history --delete <n>; --delete removes that entry from both the picker and disk, and d/Delete removes the selected row inside the panel. |
| Search | /find [--role you|assistant|tool|result] [text] (or Ctrl+F) scans prompts, assistant replies, tool calls and tool results, then opens a scrollable match list with turn numbers, occurrence counts (×N), one-line snippets and underlined hits (↑/↓, PgUp/PgDn, Home/End, Esc). With no argument it opens a search box; the editor draft is preserved. Matches are selectable: Enter opens that turn through /view, scrolls to the hit and underlines the matched text (whole-line fallback when the phrase wraps). |
| Turn view | /view <turn> rebuilds the transcript around one past turn (with a viewing turn N banner and /view all to return live); live output stays out of the frozen view until it is closed. Inspection commands (/scroll, /theme, /details, /find, /save, /status, /title, /help, /model) keep the view; prompts and workflow commands return live. |
| Diagnostics | /status opens a scrollable point-in-time panel (summary fields, system prompt, registered tools); /status print appends the same text to the transcript; /details cycles tool-card and reasoning visibility. |
| Tool cards | /tool [all|running|ok|failed|hidden] [query] (or Ctrl+T for all) opens a selectable card list grouped under — turn N — headers, showing each card's title, running/ok/failed status and (for failures) a one-line cause; the panel title summarizes total/running/failed/hidden counts; a query filters titles, tool names and failure causes (prefix title:, name:, error: or turn: narrows the field; turn: matches exactly and rejects non-numeric values), and a bare word searches all three. Enter expands/collapses the selected card in place (a hidden card reopens expanded), h hides/restores it, and the panel stays open for more actions; a title that differs from the tool name is shown as title [name]; Esc closes. It does not change the global /details mode. |
| Clipboard | /copy [n|code [n|lang]] sends the nth newest settled assistant reply, the nth newest fenced code block, or the newest block of a language through OSC 52, so copying works over SSH when the client terminal supports clipboard writes. |
| Save | /save [--turn <n> | --view] [--json | --json-doc] [--code[:<n>|<lang>]] [--force] [path] writes the complete session, one turn, or the turn currently open through /view as Markdown, raw JSONL (--json) or one JSON document (--json-doc), independent of /clear; the default goes to a new .dsh-pi/exports/<session>-<time>.* file; explicit paths support ~/, directories are rejected and an existing file asks for confirmation (--force skips the prompt). Tab completes the path argument. |
| Plan mode | DSH's dsh-plan-mode owns the mode: /plan [message] enters it, /plan off leaves, and exit_plan_mode presents the plan for approval through the question panel. The terminal shows a strip above the prompt, and /status, Pi Hub and Pi stats report the mode. |
| LSP | The model-callable lsp tool: hover, definition, references and published diagnostics from a language server started per workspace/language and reused; servers come from ~/.dsh-pi/lsp.json over built-in defaults, never from the repository. |
| DAP | The model-callable dap tool: launch a configured adapter, set breakpoints, continue/step, inspect threads/stack/scopes/variables and evaluate; one session per workspace and adapter, disposed on unload. |
| Security | /security plan|scan [scanner]|list|show [id] runs local scanners, normalizes their JSON into one finding shape, stores each run under .dsh-pi/security/ and renders severity-ordered findings; scanner commands come from ~/.dsh-pi/security.json. |
| Browser | The model-callable browser tool: open an http(s) URL in a local Chrome over CDP, snapshot the title/URL/visible text, click, type, evaluate JavaScript and capture a PNG; one session per process, closed on unload. |
| Collab | /collab view|status|stop starts a loopback-only HTTP server and prints a tokenized link; viewers watch the rendered transcript over Server-Sent Events. Read-only by construction: no inbound prompt, steer or approval path. /join [<url>] checks that a shared link is reachable and is a dsh-pi viewer, then opens it in the browser (bare shows the local link). |
| Pi Hub | /pi hub overlays the roster of live agents, background jobs, the durable goal and the current plan. |
| Pi stats | /pi stats overlays the session dashboard: model and effort, workspace and branch, token buckets and cache-hit rate, context occupancy, event/turn/step/tool counters, created/last times, goal and plan. |
| Welcome | The oh-my-pi welcome card: a 12×5 gradient block mark beside the two-line DeepSeek Harness wordmark, the version and one rotating tip (a configured welcome line stands in until a session title exists). |
| Colors | The default omp palette pins oh-my-pi's accent and status hues (dark and light); ansi follows the terminal's own 16 colors; nord, solarized and gruvbox are named palettes with dark/light variants. Body text stays the terminal's foreground. /theme opens a picker with the current flavor preselected (/theme <flavor> selects directly), /color #rrggbb overrides the accent for the session, and the profile's theme.palette keeps a choice across launches. |
Feature-by-feature parity with the community dsh-TUI terminal is tracked in
docs/PARITY-DSH-TUI.md with phases and host-owned gaps.
oh-my-pi parity is tracked in docs/PARITY.md with a
one-page snapshot in docs/PARITY-STATUS.md, and the
completion plan for every remaining oh-my-pi surface is
docs/OMP-PARITY-PLAN.md.
The front door is a port of DeepSeek Harness's former official terminal
application; see docs/ARCHITECTURE.md and
THIRD_PARTY_NOTICES.md.
In-tree terminal commands
| Command | Meaning |
|---|---|
/help [command|text] |
List every registered command, grouped by Terminal, dsh-pi, Skills and Host; /help <command> describes one command, and /help <text> searches names, descriptions and argument hints. |
/model [model|provider/model] |
Open the model picker, or select directly; Tab completes advertised routes. |
/new |
Start a new conversation in this workspace without leaving the terminal: a fresh agent/session is created in-process, the current one is checkpointed and stays resumable, and the transcript swaps to the new conversation. |
/fork [title] |
Copy this conversation into a new session (seeded from the turn-closed log, parentSession recorded) and switch to it in-process; the source stays resumable. |
/rewind [turn] |
Fork the log up to just before a chosen turn and switch to it; with no argument, lists the rewindable turns. The current session is untouched. |
/tree |
Show this session's lineage — ancestors, the current session, and its forks — in a scrollable panel. |
/resume |
Pick a persisted session to resume; Ctrl+P previews its last messages. Enter reopens the chosen session in its own workspace: the launcher restarts the app there and the transcript comes back with its model route. |
/pin [id], /unpin [id] |
Keep a session at the top of /resume (the current session when no id is given); pinned rows carry a ★ marker, and Alt+P toggles the highlighted row inside the picker. Stored in ~/.dsh-pi/pins.json. |
/title [text] |
Show the session title, or pin a new one for this session. |
/rename <text> |
Alias of /title for the dsh-TUI habit; empty prints the current title. |
/save [--turn <n> | --view] [--json | --json-doc] [--code[:<n>|<lang>]] [--force] [path] |
Write the full session, one turn, the current /view turn as Markdown, JSONL or JSON, or a code block with `--code[:
|
/export [path] |
Save this session as Markdown (alias of /save). |
/copy [n|code [n|lang]] |
Copy an assistant reply or code block (by position or language) via OSC 52. |
/dump |
Copy the whole transcript as Markdown via OSC 52 (reports lines, bytes and any size truncation). |
/open [link|url] |
Open the newest http(s) link this session mentioned in the browser; non-http schemes are refused. |
/local [name] |
Edit a Markdown file under .dsh-pi/ in $VISUAL/$EDITOR (a missing name opens a picker; naming a new file creates it). The TUI hands the terminal over and repaints on return; the command requires an idle agent. |
/status [panel|print] |
Open a scrollable diagnostics panel, or append the same fields/prompt/tools to the transcript with print. |
/details [collapsed|expanded|hidden] [reasoning on|off] |
Cycle global tool-card and reasoning visibility. |
/tool [all|running|ok|failed|hidden] [query] |
Filter/query tool cards (name:, title:, error:, turn: prefixes) and pick one to expand/collapse (Ctrl+T opens all). |
/history [--clear|--delete <n>|<query>] |
Search/insert a previous prompt (Ctrl+P); --delete <n> removes one record, --clear removes the persisted file after confirmation. |
/find [--role <role>] [text] |
Search this session's transcript, optionally only one speaker bucket; no argument opens a search box prefilled with the last query. Ctrl+F does the same, and Enter on a match opens its turn. |
/theme [omp|ansi|nord|solarized|gruvbox] |
Open a palette picker, or switch directly for this session. |
/color [#rrggbb|reset] |
Override the accent color for this session (read at paint time, so the repaint is instant), or reset it to the active flavor. |
/tokens |
Show this session's token usage (input/output, cache read/write and hit rate) and context occupancy. |
/context |
Open the context panel: window occupancy, the provider/estimate anchor, system-vs-conversation composition, cache and session totals, and the six heaviest surface messages with a one-line preview. |
/git [status|diff [--staged] [path]|log [n]] |
Read-only repository panel: branch and divergence, staged/unstaged/untracked entries, a stat plus tone-colored patch, or the recent log. Never stages, discards or commits. |
/commit [message] |
Stage everything and create one commit after confirmation; without a message the current route drafts a Conventional Commit subject from the diff (no push, no changelog edits). |
/todo |
Show the agent's current todo list (the latest todo/write snapshot of this turn; the host resets it at each turn boundary): counts plus one line per entry. Read-only; the model owns the list. |
/changelog [full|last [N]] |
Show this package's release entries: the last release by default, the last N, or the whole changelog, rendered in a panel. |
/wt (alias /worktree) [list|add [branch]|switch <target>|remove <target>] |
Managed git worktrees: create one on a new branch under ~/.dsh-pi/worktrees/, list them, move the session into one through the launcher handoff, or remove one after confirmation (git refuses a dirty worktree). Uncommitted changes stay in the source checkout. |
/trace |
Open the tail of this session's event log — seq, local time, event type — in a scrollable panel. |
/tips |
Print the rotating keyboard and workflow tips. |
/recap |
Queue a bounded recap turn over the conversation so far (decisions, files, checks, next step). |
/btw <question> |
Ask the current model a side question outside the transcript: one tool-free ctx.llm.stream() call carrying a bounded conversation tail, answered in a panel with its token usage. |
/retry |
Re-queue the prompt that started the last failed turn (error or interrupted); completed, cancelled, blocked and token-limited turns are refused with the reason. |
/init |
Queue a turn that reads the workspace and writes or merges AGENTS.md. |
/agents |
Open the Pi Hub: live agent roster, background jobs, goal and plan. |
/jobs |
List this session's background jobs with status, progress and failure detail. |
/timeline [turn] |
Open the turn index (number, time, prompt); Enter opens that turn via /view, or pass a turn number to jump directly. |
/panel [on|off] |
Toggle the right-hand session panel (Ctrl+B): model, cwd, tokens, cache, context, goal and jobs beside the transcript. |
/agentview |
Open the session picker across all workspaces (Tab narrows to this one). |
/activity [ohm|dots|braille] |
Switch the working-indicator glyph preset; persisted in ~/.dsh-pi/settings.json. |
/home, /workspace |
List workspaces with session counts; resuming a session switches there. |
/add-dir |
Show the resolved sandbox scope (mode, workspace root, extra writable roots). |
/dirs |
List the session workspace and the sandbox's mode, root and extra writable roots. |
/setup |
Readiness checklist: registered provider routes and the selected model, workspace/branch/sandbox, $VISUAL/$EDITOR, terminal color/hyperlink/image capabilities, command and skill counts, session store and plan mode — with the fix for every missing piece. |
/lang [en|zh] |
Switch the terminal interface language and save it to ~/.dsh-pi/settings.json; /help, /setup, /settings, panel names, the /resume and model pickers, the find prompt, the question dialog, the command notices (/collab, /security, /local, /open, /save, /copy, /theme, /dump), /setup's values and next-step hints and short values (on/off, shown/hidden) render in the chosen language, and a Chinese LANG selects it on first launch. |
/move <directory> |
Reopen this conversation in another workspace: the target is validated (exists, is a directory, not the current one, ~ expands), the session is checkpointed, and the launcher restarts there. |
/bg [list|tail <id>|restart <id>|stop <id>|<command>] |
Run a shell command detached with its output appended to ~/.dsh-pi/bg/<id>.log, list tracked commands, show the last 20 log lines, restart one, or stop one by id; the terminal gets one notice when it exits. |
/collab [view|status|stop] |
Loopback HTTP/SSE server with a tokenized read-only viewer link. |
/join [<url>] |
Check a shared collab link (http(s) + viewer markup) and open it in the browser; bare shows the local link. |
/security plan|scan [scanner]|list|show [id] |
Plan, run, list or show local scanner runs (semgrep/trivy); config in ~/.dsh-pi/security.json. |
/cost |
Estimate this session's spend: sums the logged usage buckets, applies ~/.dsh-pi/pricing.json (provider/model → USD per million tokens) and adds a per-turn breakdown; without an entry it names the missing key instead of guessing. |
/team [on|off] |
Show the root session's Team mode and durable task board (task id, status, subject, owner), or switch the mode; the agent-team service is mounted by dsh-base. |
/supervisor [--workers N] [--plan] <task> |
Fan out to up to N concurrent local subagents in this workspace (default 3, max 5), then report each worker's status, elapsed time and answer. One tool-free planning call splits the task into independent slices. --plan prints the split without starting workers; a failed split (or --workers 1) runs one worker with the whole task. Cancelling disposes started workers. |
/balance |
Show the DeepSeek account state and, when signed in, recharge/bonus wallet balances (5 s query bound; failures and timeouts are reported, never guessed). |
/settings |
Toggle fullscreen, exit replay, reasoning, palette, cursor, Vim keybindings and completion notifications; saved to ~/.dsh-pi/settings.json and re-applied on launch. |
/vim [on|off] |
Toggle Vim normal/insert handling in the editor (motions, inserts, dd/x/D, counts, u); persisted in ~/.dsh-pi/settings.json. |
| Markdown | Responses render Mermaid flowchart/graph blocks as Unicode text diagrams (boxed chains, node/edge lists for branches), $…$ math as Unicode, and standalone  images through Kitty/Sixel with a text fallback. |
/provider [add ...], /mcp, /plugin, /preset, /login |
Host status panels: LLM adapters, MCP servers, Loader entries, agent presets, stored credential records (addresses/kinds only). /provider add <name> --base-url <url> --model <id> [--api <protocol>] [--api-key-env <ENV>] [--display <name>] [--context <n>] [--max-tokens <n>] [--default] validates the route, confirms it and writes it into the llm-pi-ai user settings, so the next request can use it without a restart (--default also makes it the new-session default); /provider remove <name> unsets it after confirmation (and warns when it was the new-session default). Unmounted services say so. |
/hooks [status|trust|untrust] |
.dsh-pi/hooks.json shell hooks: show the project/user files and trust state, record the current file hashes, or revoke them. Editing a file requires trusting it again. |
/tools [list|status|trust|untrust|reload] |
.dsh-pi/tools/*.js custom tools: list shows every tool the agent can call (✚ marks custom ones); each module default-exports one tool object (or an array) with name, description, parameters, output.schema/output.render and execute; hash-bound trust, config customTools, and /tools reload after an edit. |
/marketplace [list|indexes|add <url>|remove <url>|search <text>|install <package>|remove <package>] |
The profile's npm packages: list declared dependencies and bundles, browse the plugin market indexes configured through the experimental market bundle (search, indexes, add <url>, remove <url>), or confirm-then-run `dsh plugin --profile dsh-pi add |
/update, /migrate, /terminal-setup |
Guidance: how to update, import status, and the terminal capabilities this front door expects. |
/effort [id] |
List the current model's reasoning levels, or set one; the choice persists as the default. |
/palette |
Print every color and attribute role with its SGR pair. |
/view [all|<turn>] |
Show only one past turn; all restores the live transcript. |
/scroll [top|bottom|up [n]|down [n]] |
Scroll the transcript; no argument returns to the live bottom. PgUp/PgDn do the same on a single-line input. |
/clear |
Clear the transcript view. Session history is unchanged, the clear survives later theme/reasoning rebuilds, and /find still searches everything. |
/reload |
EXPERIMENTAL (dev): re-read the loader config files and apply the diff; requires an idle agent. |
/exit |
Leave the terminal. |
/q, /quit |
Aliases of /exit. |
/pi … |
dsh-pi's own control surface (below). |
/pi-<name> |
A Markdown prompt command (below). |
/hotkeys |
Every keyboard shortcut this terminal binds, grouped by editing, transcript, panels and session; /keys is its hidden alias. |
/queue <message> |
Queue a message as a follow-up turn instead of steering the running one; the driver runs it when the current turn ends. |
/stats [view|stop] |
Whole-session summary from the durable log: turns, steps, user/assistant messages, tool calls, elapsed wall time and the token buckets the footer tracks. view serves the same numbers as a loopback dashboard page (stop ends it). |
/record [start|stop|status] |
Toggle an asciinema v2 cast of this screen under ~/.dsh-pi/recordings/; replay with asciinema play <file>. |
/search, /hist, /cls |
Hidden aliases for /find, /history, /clear. |
/pi
/pi reports status and manages dsh-pi's durable state:
| Subcommand | Meaning |
|---|---|
/pi or /pi status |
Working style, rules, memory, skills, keywords, tools and terminal status. |
/pi config |
Effective configuration. |
/pi context |
The prompt sections dsh-pi injects, with sizes. |
/pi advisor [on|off|status] |
Second-model reviewer: reviews each finished turn and injects the review at the next step. |
/pi judge [on|off|status] |
TypeSafe judge: provider, model, credential and counters for the automatic approval gate and question answerer. |
/pi rules |
List project and user rules, and their budget. |
/pi rule <text> |
Add a rule. |
/pi rule --remove <id> |
Remove a rule. |
/pi clear |
Clear the project rule file. |
/pi memory |
List curated memory entries. |
/pi skills |
Bundled skills plus the host's discovered catalog. |
/pi hub |
Open the Pi Hub overlay. |
/pi stats |
Open the Pi stats overlay. |
/pi persona |
The working-style prompt actually in use. |
/pi keywords |
Magic keyword state and tool-gated availability. |
/pi doctor |
Diagnostics for the host row, profile and package. |
/pi review, /pi commit, /pi handoff |
Queue one structured user turn for that workflow. |
/pi help |
Full usage. |
/pi-agents list|send|interrupt exposes the Agent Hub actions a terminal alone
cannot: roster, steer and cancel subagents. /supervisor is the inverse: it
starts the workers a fan-out needs and joins them instead of inspecting them.
Tab completes /pi subcommands and
their own arguments (memory verbs and scopes, rule flags, workflow targets,
skills <name> from the invocable catalog), and completes live subagent names
after send, show and interrupt (plus --live after list).
Working style, rules, memory
- Working style — a terse, evidence-first persona section derived from
oh-my-pi's house style (
prompts/persona.md, orpersonaText). - Durable rules — project
.dsh-pi/rules.mdand user~/.dsh-pi/rules.mdinjected as a dynamic system-prompt section, edited by/pi ruleor the model'spi_ruletool. A bullet starting with[when: a|b]is injected as a per-step hidden notice only when the prompt contains one of the terms. - Curated memory — project and user
memory.jsonlstores injected as a<dsh-pi-memory>section, edited by/pi memoryand thepi_memorytool. Newest-first caps, 500-entry pruning, and secret redaction on write.
Skills and magic keywords
Bundled skills: pi-workflow, system-prompts, semantic-compression and
tool-prompt-optimization. They merge with the host's discovered catalog, and
/pi skills <name> prints details.
Magic keywords inject a hidden per-turn notice on agent/pre-step:
ultrathink, chillax, orchestrate, workflowz, jevify. The ones that
need a capability (orchestrate, workflowz, jevify) are tool-gated;
chillax cancels ultrathink. Matching masks code fences, inline code and
HTML/XML elements, and respects identifier and path boundaries, so a keyword in
code never triggers a notice.
Prompt commands
Markdown files in .dsh-pi/commands/*.md and ~/.dsh-pi/commands/*.md become
/pi-<name> commands. $ARGUMENTS and $1…$9 expand from the typed
arguments; project commands shadow user commands with the same name. The
command queues its expanded template as the next user turn.
TypeSafe judge
TypeSafe's System One answers small typed decisions over one JSON state, and dsh-pi spends its calls on the two places the terminal interrupts a turn: permissions and choice questions.
- Approvals. When DSH asks whether a tool call may run, the judge sees the
tool, its arguments, the asker's reason, the workspace and your last prompt,
and answers
alloworrejectwith a confidence. A verdict at or abovetypesafeApprovalThreshold(default0.90) settles the request; anything lower falls through to the interactive answerer, which asks you. - Choice questions. An
ask_user_questionbatch becomes one typed question per option. Single-select questions are one choice; multi-select questions are one yes/no per option. A question with no options expects free text and cannot be answered by the judge, so the whole batch — DSH requires one answer per question — falls through to you. - Fail-open by construction. A missing key, an unreachable endpoint, a
malformed body or a timeout calls
next(): the human answers exactly as before. Nothing is written to the transcript; DSH already records the approval outcome and the answer batch. - It reads untrusted text. Prompts, tool arguments and question details
are what the judge reasons over, and a request that talks its way past the
judge is a real risk. The judge is a convenience gate, not a security
boundary: keep
/permissionpresets and the sandbox for anything irreversible, and settypesafeApprovals: falseto leave approvals to you while keeping question answering. The state — the last user prompt, the pending tool call and its arguments — is sent to the configured endpoint.
/pi judge status reports the provider (typesafe), endpoint, model,
credential variable and per-process counters (allowed, rejected, escalated,
failed, answered). The judge is registered in both frontends because it lives
in the host row, not the terminal.
Configuration
The dsh-pi row in cordis.patch.yml accepts:
| Key | Default | Meaning |
|---|---|---|
persona |
true |
Inject the working-style prompt section. |
personaText |
packaged | Override the persona text; empty uses prompts/persona.md. |
rules |
true |
Inject project and user rules. |
memory |
true |
Inject curated memory and register pi_memory. |
skills |
true |
Register the bundled skills. |
advisor |
false |
Start with the second-model reviewer enabled; /pi advisor on|off toggles it at runtime. |
hooks |
false |
Install the .dsh-pi/hooks.json shell-hook listeners; files still need /hooks trust. |
customTools |
false |
Load .dsh-pi/tools/*.js modules; files still need /tools trust. |
lsp |
false |
Register the lsp tool (hover, definition, references, diagnostics) over ~/.dsh-pi/lsp.json servers merged with built-in TypeScript/Python/Rust/Go defaults. |
dap |
false |
Register the dap tool (launch, breakpoints, stepping, stack, variables, evaluate) over ~/.dsh-pi/dap.json adapters. |
security |
false |
Enable /security scanner runs over ~/.dsh-pi/security.json scanners (semgrep and trivy by default). |
browser |
false |
Register the browser tool (CDP endpoint from ~/.dsh-pi/browser.json or DSH_BROWSER_ENDPOINT). |
collab |
false |
Enable /collab: a loopback HTTP/SSE server that streams this session read-only to a browser link. |
typesafe |
true |
Let the TypeSafe judge answer approvals and choice questions when its key resolves; /pi judge on|off toggles it at runtime. |
typesafeApprovals |
true |
Let the judge grant or refuse an approval; below the threshold the human answers. |
typesafeQuestions |
true |
Let the judge answer an ask_user_question batch; any unanswerable question sends the whole batch to the human. |
typesafeBaseUrl |
TYPESAFE_BASE_URL or https://api.typesafe.ai |
System One endpoint. |
typesafeModel |
TYPESAFE_DEFAULT_MODEL or jev-latest |
Judge model id (jev-latest, jev-1.14.0, or any id the endpoint serves). |
typesafeApiKeyEnv |
TYPESAFE_API_KEY |
Credential variable read from the launch environment. |
typesafeApprovalThreshold |
0.9 |
Minimum confidence before an approval is settled without you. |
typesafeQuestionThreshold |
0.8 |
Minimum confidence before a question is answered for you. |
typesafeTimeoutMs |
10000 |
Per-attempt network bound for one judgment. |
background |
false |
Enable /bg background shell commands. |
magicKeywords |
true |
Install the agent/pre-step keyword listener. |
magicKeywordsUltrathink, magicKeywordsChillax, magicKeywordsOrchestrate, magicKeywordsWorkflowz, magicKeywordsJevify |
true |
Per-keyword toggles. |
projectRulesPath / userRulesPath |
.dsh-pi/rules.md / ~/.dsh-pi/rules.md |
Rule files. |
projectMemoryPath / userMemoryPath |
.dsh-pi/memory.jsonl / ~/.dsh-pi/memory.jsonl |
Memory stores. |
projectCommandsDir / userCommandsDir |
.dsh-pi/commands / ~/.dsh-pi/commands |
Prompt-command directories. |
commands |
true |
Load prompt commands. |
The legacy tui row accepts the terminal settings from
src/terminal/config.ts: sessionId, welcome,
showReasoning, maxToolOutputLines, dialog sizes, color, title and the
theme prompt templates.
fullscreen (default true) owns the terminal's alternate screen, so the
session fills the window and the shell's scrollback is untouched until exit;
fullscreen: false draws inline into that scrollback instead.
fullscreenExitTranscript (default true) replays the conversation into the
normal screen when a fullscreen session exits, so it stays visible after the
process ends.
theme.palette selects omp (default) or ansi; /theme changes it for the
running session only. Edit either row in the profile's cordis.patch.yml, or
through the DSH settings surface where one is mounted.
Architecture
The dsh-pi profile is dsh-base plus this bundle. By default dsh-pi runs
OMP with a bundled extension; the extension runs the DSH profile with an
overlay that replaces the in-tree terminal with a stdio bridge. The DSH
agent, model, tools, policies, and durable session store are unchanged.
See docs/ARCHITECTURE.md for the row map and the
package invariants.
Development
pnpm install
pnpm run check # build + test type-check + manifest + package + tests
node scripts/doctor.mjs
Compose the profile against a throwaway DSH home without touching your own:
DSH_HOME=/tmp/dshpi dsh plugin --profile dsh-pi add "$PWD"
DSH_HOME=/tmp/dshpi dsh --profile dsh-pi --dump-config
Layout
bin/dsh-pi launcher and profile bootstrap
cordis.patch.yml bundle patch (agent, terminal, host row)
omp/ original OMP extension and host overlay
src/ host extension (persona, rules, memory, skills, /pi)
src/terminal/ in-tree terminal front door
prompts/ packaged persona
skills/ bundled skills
scripts/ manifest, package and doctor checks
test/ node:test suites (test/pty.test.ts and test/app-boot.test.ts drive real PTYs under script)
中文速览
dsh-pi 只在交互终端使用原版 OMP。模型、工具、权限和会话由 DSH 管理。
dsh-pi -p '问题'、管道输入和 dsh-pi --mode json '问题' 均直接使用原生 DSH
headless profile,无需 OMP;JSON 输出遵循 DSH 格式。dsh-pi headless --help
查看原生参数。交互界面中 /resume 打开 pi 风格的选择器:按最近活动排序,置顶会话带
★,可直接输入搜索,Tab 切到全部工作区,⌃P 预览该会话最后几条消息,回车重开,Esc
清空搜索/关闭;选中的会话由 launcher 在它的工作区重启前端,并把最近的对话以只读行重放
回屏幕。/resume <id 或标题> 跳过选择器直接指定
(DSH 已持有这段历史,不会重复送给模型),/resume <id 或标题> 可直接指定;
/dsh-session 查看当前会话 ID 与最近的对话,dsh-pi --resume <id> 在 shell 里继续。
在 OMP 中,/ 菜单显示终端命令和 /supervisor。输入 /dsh (末尾有空格)补全 DSH 命令,
例如 /dsh /pi status、/dsh /plan off;/supervisor <任务> 直接并发本地
worker 并实时显示各 worker 状态,--plan 只看拆解。
以下界面和命令适用于 dsh-pi legacy。
编辑器里 Tab 会补全命令名、/pi//details//goal//plan 等命令的参数、
@file 和 /skill: 名称;/help 按来源分组列出命令,/help <command>
查看单条命令,输错命令、/pi 子命令或技能名时会给出最接近的建议。
PgUp/PgDn(单行输入时)或 /scroll up|down|top|bottom 可在应用内翻看历史,
编辑器与状态栏保持固定;/tool [all|running|ok|failed|hidden] [query](或 Ctrl+T)可筛选并单独展开/折叠某张工具卡片,支持 name:/title:/error:/turn: 前缀;
/copy [n|code [n|lang]] 通过 OSC 52 复制第 n 条最新助手回复、第 n 个最新代码块或指定语言的最新代码块(SSH 下也可用,需终端支持剪贴板写入);/open 用系统浏览器打开本会话最近提到的 http(s) 链接(拒绝非 http(s) scheme);/retry 重新排队最后一个失败轮(error/interrupted)的起始提示,完成/取消/阻塞/超限的轮会说明原因并拒绝,/supervisor [--workers N] <任务> 并发运行本地 worker(默认 3 个、最多 5 个),--plan 只看拆解,/btw <问题> 用当前模型在会话之外做一次无工具的旁问(带截断的对话上下文,答案在面板中显示并报告 token),/marketplace [list|search <文字>|install <pkg>|remove <pkg>] 管理 profile 的 npm 包(search 读取实验性市场 bundle 配置的索引)(确认后经 dsh plugin --profile dsh-pi add|remove 安装,重启生效),/cost 按 ~/.dsh-pi/pricing.json(provider/model → 每百万 token 美元价)估算本会话花费(无条目时指出缺哪个 key),/bg [list|stop <id>|<命令>] 在后台运行 shell 命令(输出写到 ~/.dsh-pi/bg/,退出时提示一次),/collab view|status|stop 生成只读观看链接(仅回环地址 + 随机 token,SSE 推送渲染后的 transcript,没有反向输入通道),browser 工具(CDP 驱动本地 Chrome:打开/快照/点击/输入/求值/截图,端点配置在 ~/.dsh-pi/browser.json),/security plan|scan [scanner]|list|show [id] 跑本地扫描器(semgrep/trivy,配置在 ~/.dsh-pi/security.json)、归一化 findings 并存到 .dsh-pi/security/,dap 工具(launch/断点/单步/栈/变量/求值,适配器配置在 ~/.dsh-pi/dap.json),lsp 工具(hover/definition/references/diagnostics,按工作区+语言懒启动语言服务器并复用,服务器配置在 ~/.dsh-pi/lsp.json),/tools 管理 .dsh-pi/tools/*.js 自定义工具(模块默认导出一个工具对象或数组,信任绑定文件哈希,改文件需重新 /tools trust,/tools reload 重新加载),/hooks 管理 .dsh-pi/hooks.json 的 shell 钩子(session-start / pre-tool / post-tool / turn-end,pre-tool 退出码 2 拒绝调用;信任绑定文件哈希,改文件需重新 /hooks trust),/color #rrggbb|reset 会话级 accent 覆盖(绘制时读取,立即重绘),/theme 支持 omp|ansi|nord|solarized|gruvbox 命名调色板,/move <目录> 把当前会话迁到另一个工作区(校验目录、checkpoint 后经 launcher 重启过去),/lang [en|zh] 切换终端界面语言并持久化(/help、/setup、/settings 的标题与标签,中文 LANG 首次启动自动选中文),/setup 打开就绪检查(路由/模型、工作区/分支/沙箱、编辑器、终端能力、命令与技能计数、会话存储、plan mode,缺什么给什么修法),/dump 把整段会话以 Markdown 写入 OSC 52 剪贴板(报告行数、字节数与截断),/dirs 列出当前工作区与沙箱目录;/local [name] 用 $VISUAL/$EDITOR 编辑 .dsh-pi/ 下的 Markdown(不给名字则弹出选择器,新名字会创建文件,需在空闲时使用);
/pi judge on|off|status 控制 TypeSafe 判定器:设置 TYPESAFE_API_KEY(或 typesafeApiKeyEnv 指定的变量)后,它用 jev-latest 等模型替你审批权限、回答选择题,置信度低于阈值(审批 0.90、选择题 0.80,可配)或调用失败时自动退回人工;/pi judge status 显示 endpoint、模型、凭据变量与计数,供应商 typesafe 的模型清单与阈值都在 dsh-pi 行的配置里。
/save [--turn <n> | --view] [--json | --json-doc] [--code[:<n>|<lang>]] [--force] [path](--code 将指定代码块写入文件) 可把完整会话、指定轮或当前 /view 轮导出为 Markdown、JSONL 或单 JSON 文档(覆盖已有文件会先确认),/title <text> 可给当前会话命名,/new 在当前工作区直接开新会话(进程内创建新 agent/session 并切换,不重启;旧会话先落盘,之后仍可在 /resume 里找回),/resume 里按 Ctrl+P 可预览选中会话的最后几条消息,预览内用 PgUp/PgDn 翻页、Ctrl+E 回到最新;
/pin [id]、/unpin [id] 把会话固定在 /resume 列表顶部(省略 id 即当前会话,置顶行带 ★,选择器里按 Alt+P 直接切换),/fork [标题] 复制当前会话为新分支并原地切换,/rewind [turn] 回退到某轮之前(当前会话保留),/tree 查看会话谱系;/tokens 查看本会话 token 与上下文占用,/context 打开上下文面板(窗口占用、来源、system 与对话占比、缓存与会话合计、最重的六条消息及预览),/git [status|diff [--staged] [path]|log [n]] 只读查看仓库状态、diff 与最近提交(不会暂存、丢弃或提交),/wt [list|add [branch]|switch <target>|remove <target>] 管理 git worktree(在 ~/.dsh-pi/worktrees/ 下建新分支工作树、列出、经 launcher 切过去、确认后删除;未提交改动留在原工作区),/trace 查看事件轨迹,/tips 看快捷提示,/recap 生成阶段小结,/init 生成 AGENTS.md,/rename、/export、/q 分别是 /title、/save、/exit 的别名;
/theme 打开配色选择器(或 /theme omp|ansi 直接切换),/palette 查看每个颜色角色;
/model 后按 Tab 可补全已注册的 provider/model 路由;/find <text>(或 Ctrl+F)
搜索本次会话的提问、回复、工具调用和结果(可用 --role 限定角色),并在可滚动面板中查看命中片段;选中后进入该轮并高亮命中行。
先安装 oh-my-pi,确保 omp 在 PATH 中,再安装 DSH 和插件:
npm install -g pnpm@11 @deepseek-ai/dsh @deepseek-harness-pi/dsh-pi
dsh-pi
首次启动会创建 ~/.dsh/profiles/dsh-pi(dsh-base + 本包)并进入原版 OMP。
OMP 编辑器上方会显示 dsh-pi 品牌:oh-my-pi 的渐变方块标记旁是两行
DeepSeek Harness 字标和 dsh-pi 版本;首次提问后它自动消失,/help 等引导
命令会用各自的说明替换它。OMP 自带的 omp 欢迎卡保持关闭。
dsh-pi setup 显式创建配置,dsh-pi doctor 检查安装状态。
交互启动时至多每六小时检查一次 npm 的 latest,只更新 dsh-pi 使用的 DSH,不改全局 dsh。
更新失败时继续使用现有的兼容版本;非交互命令不会检查。设置 DSH_PI_AUTO_UPDATE=0 可关闭,
设置 DSH_PI_DSH 可指定宿主。dsh-pi update-dsh 立即更新,dsh-pi doctor 查看实际选中的版本。
已安装的用户可运行 npm install -g @deepseek-harness-pi/dsh-pi@latest 升级,并用
dsh-pi --version 确认版本。自 0.12.1 起,当前 DeepSeek API 路由缺少密钥时,
会在第一次提问前显示配置指引。/login 可重新查看指引,
不会打开 OMP 的账户选择器。默认路由可在启动环境中设置 DEEPSEEK_API_KEY,
或运行 dsh web 后在 Models 页面保存密钥。配置后重启 dsh-pi,不要把密钥粘贴到聊天里。
License
MIT. Bundled skills and visual ideas are adapted from MIT-licensed oh-my-pi;
the terminal front door is adapted from DeepSeek Harness's MIT-licensed former
terminal application. See THIRD_PARTY_NOTICES.md.