ghbhiee/dsh-plugins--packages-cli-session ↗★ 0
dsh-plugin-cli-session
支持恢复的 DeepSeek Harness CLI 运行器:提供对话文本或机器可读的 JSON 输出
AI 分析
核心用途是提供功能丰富的命令行会话交互。适合需要新建或恢复会话、列出会话,或以 JSON/流式 JSON 格式输出结果以供脚本集成的开发者。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ghbhiee/dsh-plugins#2017411fca73e4294335eb25ea1ddaf6a5cb986b&path:packages/cli-session說明文件
閱讀完整 README ↗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
| Flag | Meaning |
|---|---|
-o, --output-format | Shape of what is printed; text is the conversational one |
-n, --new | Start a new session (the default) |
-r, --resume | Continue 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, --list | List 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.