banbo-dsh
其他 活跃维护

banbo-dsh

BanboLee/banbo-dsh

支持通过统一的命令行界面调用多个大模型,内置提示词模板和调试记录,可实时对比不同模型输出,自动处理API错误与重试,无需编写额外代码即可完成模型选型与验证。

2
Stars 标星
0
Forks 分支
2
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
2.7 MB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:BanboLee/banbo-dsh
git clone https://github.com/BanboLee/banbo-dsh.git
git clone git@github.com:BanboLee/banbo-dsh.git
README.md main

banbo-dsh

CI

English | 中文

A collection of DeepSeek Harness (DSH) plugins: six ready-to-use bundles published
on npm under @banbolee/dsh-*, installable into any DSH profile with a single
command — no need to clone this repository. MIT licensed.

Quick install (users)

Prerequisites: dsh (0.2.1-rc.2 family), Node.js >= 22, pnpm 9.x.

Install whichever bundles you need:

dsh plugin --profile <profile> add @banbolee/dsh-rtk
dsh plugin --profile <profile> add @banbolee/dsh-codegraph-mcp
dsh plugin --profile <profile> add @banbolee/dsh-fish-shell
dsh plugin --profile <profile> add @banbolee/dsh-lsp-diagnostics
dsh plugin --profile <profile> add @banbolee/dsh-llm-pi-ai-with-session
dsh plugin --profile <profile> add @banbolee/dsh-agents

Bundles

Bundle What it does Binary it needs
@banbolee/dsh-rtk Decorates the mounted shell executor: every command is rewritten through the rtk rewrite oracle, and model-facing grep output is compressed via rtk pipe rtk
@banbolee/dsh-codegraph-mcp Adds an mcp-codegraph row that serves the CodeGraph MCP server (codegraph serve --mcp) over stdio through the official DSH bridge, plus an agent-instructions install helper codegraph
@banbolee/dsh-fish-shell Fish executors (sandboxed and local) plus a model-facing fish tool and a per-agent policy that swaps bash for fish under any agent preset fish
@banbolee/dsh-lsp-diagnostics After write/edit/str_replace_editor mutations, appends a persistent LSP diagnostics notice to the next model inference; also registers a model-callable lsp_diagnostics(file_path) tool typescript-language-server, gopls (opt-in: clangd, rust-analyzer, pyright-langserver)
@banbolee/dsh-llm-pi-ai-with-session Generic session wrapper over llm-pi-ai: registers explicit session provider routes that carry a dynamic session id header (default x-session-id) on every LLM request none (reuses llm-pi-ai providers)
@banbolee/dsh-agents Define your own Agent team in YAML: named agent_<id> tools, a persona and a tool surface per Agent, an explicit delegation graph, and absolute depth/concurrency budgets; ships its presets as @deepseek-ai/dsh-agent-preset rows on the profile's preset registry none

@banbolee/dsh-llm-pi-ai-with-session is a generic session wrapper over llm-pi-ai: it registers explicit session provider routes as configured, reuses pi-ai's openai-completions implementation, and carries a configurable session header (default x-session-id) on every request; the gateway, credentials, model and reasoning effort are all inherited from the source provider, so nothing has to be configured twice. See plugins/dsh-llm-pi-ai-with-session/README.md.

See each plugin README for full details.

External dependencies (important — read before installing)

rtk, codegraph, fish, and the LSP servers must be pre-installed by you;
the bundles never download or install them:

Binary Used by
rtk @banbolee/dsh-rtk — must be pre-installed or rewrites/grep-compression fail open to passthrough
codegraph @banbolee/dsh-codegraph-mcp — must be pre-installed or the MCP bridge has no server and no mcp__codegraph__* tools
fish @banbolee/dsh-fish-shell executors and tool
typescript-language-server, gopls (opt-in: clangd, rust-analyzer, pyright-langserver) @banbolee/dsh-lsp-diagnostics automatic diagnostics

Put the binaries on PATH (or pin them through the bundle config). A missing
binary never blocks install or tests — the affected feature fails open.

Uninstall

dsh plugin --profile <profile> remove @banbolee/dsh-rtk
dsh plugin --profile <profile> remove @banbolee/dsh-codegraph-mcp
dsh plugin --profile <profile> remove @banbolee/dsh-fish-shell
dsh plugin --profile <profile> remove @banbolee/dsh-lsp-diagnostics
dsh plugin --profile <profile> remove @banbolee/dsh-llm-pi-ai-with-session
dsh plugin --profile <profile> remove @banbolee/dsh-agents

A normal uninstall of @banbolee/dsh-agents keeps your data
($DSH_HOME/banbo-agents/: YAML definitions, personas, the ABI manifest), so
reinstalling restores it; the bundle simply stops being mounted at runtime and
its preset rows go with it. A full wipe is an explicit destructive operation — see
plugins/agents/README.md.

Local development / install from source (contributors)

git clone git@github.com:BanboLee/banbo-dsh.git
cd banbo-dsh
env NODE_ENV=development pnpm install

Install into a profile from the repository root (the -w flag is required for
the local path installs below, otherwise pnpm fails with
ERR_PNPM_ADDING_TO_ROOT; @banbolee/dsh-fish-shell is the exception — no -w,
it has its own deploy-and-symlink story documented in its README):

dsh plugin --profile <profile> add -w ./plugins/rtk
dsh plugin --profile <profile> add -w ./plugins/codegraph-mcp
dsh plugin --profile <profile> add -w ./plugins/dsh-llm-pi-ai-with-session
dsh plugin --profile <profile> add -w ./plugins/dsh-lsp-diagnostics
dsh plugin --profile <profile> add -w ./plugins/agents
dsh plugin --profile <profile> add ./plugins/fish-shell

Sync helpers for isolated profiles (they require DSH_HOME to point at
isolated state):

DSH_HOME="$(mktemp -d)" scripts/sync-rtk-codegraph-to-profile.sh <profile>
DSH_HOME="$(mktemp -d)" scripts/sync-lsp-diagnostics-to-profile.sh <profile>
scripts/sync-to-profile.sh <profile>            # fish-shell: pack the bundle, then install the tarball

Testing

env NODE_ENV=development pnpm test

NODE_ENV=development matters: with NODE_ENV=production pnpm skips
devDependencies entirely, which breaks installs and the dependency-graph
assertions. Per-bundle verification commands are documented in each plugin
README.

Real headless E2E (optional)

Build the sibling RTK release binary and CodeGraph distribution, then run the
opt-in real profile suite:

(cd ../rtk && cargo build --release)
(cd ../codegraph && npm run build)
corepack pnpm test:e2e:headless

Requires Node 22, dsh, and fish. Override executable locations with
DSH_REAL_E2E_DSH_BIN, DSH_REAL_E2E_NODE_BIN, DSH_REAL_E2E_RTK_BIN, and
DSH_REAL_E2E_CODEGRAPH_BIN.

Releasing (maintainers)

Releases go through one manual workflow, .github/workflows/release.yml,
and a dispatch always releases all six bundles at one commit:

gh workflow run release.yml -f release_sha=<40-character SHA on main> -f dry_run=true

dry_run defaults to true: it packs and validates all six tarballs and uploads
the release journal without touching the registry. Set dry_run=false to
publish. The lane runs every deterministic gate first, then packs once, publishes
serially under the next candidate tag with npm publish --provenance --access public, verifies each version's registry integrity, and only after all six
succeed promotes latest, removes the candidate tag, and creates six annotated
tags plus six GitHub Releases at the same commit.

Authentication is npm Trusted Publishing (OIDC, no long-lived secret); the
id-token: write permission is what signs provenance. Two things must be true on
npmjs.com for this to work: the Trusted Publisher has to authorise both publish
and dist-tag
(the lane moves latest and removes the candidate tag with the same
OIDC identity), and the npm CLI has to be 11.21.0 or newer — publish speaks
tokenless OIDC from 11.5.1, but dist-tag only from 11.21.0, so an older CLI would
publish all six versions and then fail at the first promotion. The workflow pins
that version and preflight refuses to start on anything older.

A published npm version is immutable, so a partial failure is never retried
blindly: the uploaded journal records what reached the registry. Re-dispatch with
prior_run_id and the journal is verified (same commit, tag and
versions) and resumed — already-published versions are skipped, finalize only
promotes what has not been promoted yet, and an existing GitHub Release is accepted
only when its tag, target and title match this dispatch.

License

MIT — see LICENSE.