dshbase

插件目录 / Developer / dsh-tool-github

dsh-tool-github

已验证 · 实测可装 LJH-snow

✓ 持续维护 基于 6 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

2Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-14最近推送
跨平台平台

功能简介

(无描述)

✅
我们的评价
可用 — 实测通过,早期项目

(无描述) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-tool-github

English | 中文

A Cordis tool plugin that gives DeepSeek Harness (dsh) GitHub capabilities. Agents can look up repositories, search code, list issues, and create draft pull requests in natural language.

Built on the official "everything is a plugin" architecture via ctx.tools.register(defineTool(...)), following the official adding-a-tool contract.

Install

Install directly from GitHub (no npm publish needed):

npm install github:LJH-snow/dsh-tool-github
# or a specific branch/tag
npm install github:LJH-snow/dsh-tool-github#main

Or from a local checkout:

git clone https://github.com/LJH-snow/dsh-tool-github
cd dsh-tool-github
npm install && npm run build   # builds to lib/
npm install /path/to/dsh-tool-github

Once published to npm, it will also be installable as npm install @libai168/dsh-tool-github.

Requires @deepseek-ai/cordis (^4.0.1) and @deepseek-ai/dsh-tools (^0.1.0-rc.6) as peer dependencies, provided by the host dsh runtime.

Configuration

Load the plugin in a dsh composition config (cordis.yml):

- name: 'dsh-tool-github'
  config:
    token: 'ghp_xxx'        # GitHub PAT (optional; required for code search and PR creation)
    baseUrl: 'https://api.github.com'   # optional, override for GitHub Enterprise
    timeoutMs: 15000        # optional, request timeout in ms (default 15000)

Full example: examples/cordis.yml.

Security: read-only tools need no token. github_search_code and github_create_pr_draft require a token. Prefer a minimal-scope fine-grained token and never commit it.

Tools

Tool Description Token
github_get_repo Repository metadata (description, stars, language, license, homepage, updated) no
github_search_repos Search repositories (sort stars/forks/updated, up to 10 results) no
github_list_issues List issues (state/label filters, up to 20 results) no
github_search_code Code search; clear hint when no token is configured yes
github_list_prs List pull requests (state filter, up to 20) no
github_get_file Read a repository file (branch/ref support, base64-decoded) no
github_list_commits List recent commits (branch/author filters, up to 30) no
github_create_issue Create an issue (title required; body/labels optional) yes
github_comment_issue Comment on an issue or PR yes
github_update_issue Open or close an issue yes
github_merge_pr Merge a PR (merge/squash/rebase; requires token) yes
github_list_releases List releases (tag, draft/prerelease, author) no
github_list_branches List branches with latest SHAs no
github_get_issue Get issue details (title, state, author, labels, body) no
github_list_issue_comments List issue comments (author, time, body) no
github_list_pr_comments List PR review comments (author, time, body) no
github_get_user Get user/org info (name, bio, followers, repos) no
github_list_workflow_runs List Actions runs (workflow, branch, status) no*
github_create_branch Create a branch from a ref yes
github_write_file Create/update a file (creates a commit) yes
github_get_readme Read the repository README (markdown) no
github_list_tags List version tags no
github_star_repo Star a repository yes
github_unstar_repo Remove a star yes
github_create_release Create a release for a tag yes
github_create_pr_draft Create a draft PR (head/base/title/body) yes

Behavior contract (per the official execute contract)

  • Business failures are canonical values: missing repo → { found: false }; PR creation failure (branch missing / PR exists) → { created: false, reason }.
  • Only infrastructure errors throw: invalid token (401), rate limit (403), etc.
  • Cancellable: every request forwards exec.signal, with a default 15s timeout.

Development

npm install
npm run typecheck   # type check
npm test            # unit tests (vitest)
npm run build       # build to lib/

See DEVELOPMENT.md for plans and decisions.

Publishing

  1. The package is published under your npm scope: @libai168/dsh-tool-github (npm publishing requires a granular access token with 2FA bypass enabled, or trusted publishing).
  2. npm run build, then npm publish --access public.
  3. Add the dsh-plugin topic to your GitHub repo for ecosystem discovery.

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-tool-github」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

Web profile:

dsh plugin --profile web add dsh-tool-github

Headless(CLI)profile:

dsh plugin --profile headless add dsh-tool-github

包信息

npm:dsh-tool-github · 版本 0.1.0 · 实测环境 dsh 0.1.0-rc.6

实测报告

端到端验证通过:dsh 0.1.0-rc.6 上 L1 安装 + L2 加载 + L3 运行问答。

使用场景

扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。

适合谁

想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。

二次开发建议

工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7797 个插件 →