ghbhiee/dsh-plugin-cli-session0

dsh-plugin-cli-session

Resume-capable CLI runner for DeepSeek Harness: conversational text or machine-readable JSON from one plugin

包名
dsh-plugin-cli-session
版本
0.2.0
许可证
MIT
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ghbhiee/dsh-plugin-cli-session

Usage

dsh --profile chat "explain this file"          # new session
dsh --profile chat -r "follow-up"               # resume the newest session here
dsh --profile chat -s  "follow-up"          # resume a specific session
dsh --profile chat -w ./scratch "start here"    # new session in another directory
dsh --profile chat -l                           # list this profile's sessions here
dsh --profile api -o json "summarize this"      # {"type":"result",…}
dsh --profile api -o stream-json "summarize"    # init line, then the result line
FlagMeaning
-o, --output-format Shape of what is printed; text is the conversational one
-n, --newStart a new session (the default)
-r, --resumeContinue the newest session of this profile in this directory
-s, --session Continue a named session
-w, --workdir Create and enter a directory before starting a new session
-l, --listList this profile's sessions here and exit
--json-schema Ask the model for JSON in this shape (a prompt, not a constraint)

-o json / -o stream-json emit {type, subtype, is_error, duration_ms, num_turns, result, session_id, usage?}. stream-json prefixes a {type:"system",subtype:"init",…} line carrying the session id, cwd, provider, and model.

Misconfiguration fails at boot

The row's request comes from !!js ctx.cliStartup. Wire it wrong and the config schema's defaults quietly produce action: 'new' with an empty task — a session created and a model call spent on nothing. The runner refuses that at load instead, and says what to write:

cli-runner: no task to run. The row's config.request should be wired to the
startup service, as in `request: !!js ctx.cliStartup`.

A blank sessionTag (the label --list and --resume scope by) and a negative exitGraceMs are refused the same way.