dshbase

插件目录 / Developer / dsh-git-forge

dsh-git-forge

已验证 · 实测可装 thirsty5034

✓ 持续维护 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-18最近推送
跨平台平台

功能简介

DSH community plugin: GitHub/Gitea accounts, project grants, push policy (better-sidebar)

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

DSH community plugin: GitHub/Gitea accounts, project grants, push policy (better-sidebar) 实测能干净安装、正常启动。早期项目,但功能可用。

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

README

dsh-git-forge

English | 简体中文

DeepSeek Harness community plugin: forge accounts + per-project grants + push policy in dsh-better-sidebar.

  • Account library: GitHub / Gitea / GitLab / Gitee / Bitbucket
  • Project grants (projectPathKey = workspace cwd)
  • Push guard: blocks bash git push / git remote add|set-url to non-granted hosts
  • Tokens in $DSH_HOME/git-forge/secrets.json (0600) — never in model context
  • Model tool GitForge (read-only policy)
  • Agent HTTPS git: after sidebar grants, agent bash git fetch/push can use the matching account via a Host-only credential helper (tokens never enter the model; R1 = exactly one granted token account per host)
  • UI aligned with dsh-ssh-tunnel

SSH remotes and system gh auth still use local SSH/gh. HTTPS under DSH agent shells is filled by this plugin’s helper from project grants; the push guard still decides where a project may push.

Requirements

  • DSH web profile with dsh-better-sidebar (≥ 0.12)
  • Node.js 18+

Install

macOS / Linux (Git Bash / WSL on Windows also works):

curl -fsSL https://raw.githubusercontent.com/thirsty5034/dsh-git-forge/main/scripts/install.sh | bash

Windows (PowerShell 5.1+ / pwsh):

irm https://raw.githubusercontent.com/thirsty5034/dsh-git-forge/main/scripts/install.ps1 | iex

Or via DSH CLI directly (GitHub source until the package is on npm):

export DSH_HOME=${DSH_HOME:-$HOME/.dsh}
dsh plugin --profile web add "dsh-git-forge@github:thirsty5034/dsh-git-forge"
dsh --profile web --dump-config | grep git-forge

After install: restart DSH web, then hard-refresh the browser (Cmd/Ctrl+Shift+R).

Options / local link / npm (later)
# pin ref
curl -fsSL .../install.sh | bash -s main --restart
bash scripts/install.sh --from npm 0.1.1   # after npm publish

# local checkout
dsh plugin --profile web add "dsh-git-forge@link:/path/to/dsh-git-forge"
# or: ./scripts/sync-to-dsh.sh && dsh plugin add "dsh-git-forge@link:$DSH_HOME/local-plugins/dsh-git-forge"

Discoverability

  • GitHub topics: dsh-plugin, deepseek-harness, dsh (required for dsh.so auto-index)
  • Install from GitHub (current): see Install above
  • Store listings may lag crawlers; source of truth is this repository

Data

Under $DSH_HOME/git-forge/:

File Purpose
accounts.json Account metadata (no tokens)
secrets.json Tokens (0600)
grants.json projectPathKey → accountIds[] + enforce policy

Sidebar

  1. Project access — accounts for the current project + enforce push
  2. Accounts — CRUD, API token probe
  3. Policy — allowed gitHosts; unbound-project default

Model tool

GitForge action=list_accounts
GitForge action=get_policy
GitForge action=list_project_accounts
GitForge action=check_remote [email protected]:org/repo.git

Agent HTTPS and project path

  • Grant key = DSH session workspace (DSH_GIT_FORGE_PROJECT in agent shells), not nested package path
  • Helper resolution: env → exact cwd → walk parents under /workspace
  • R1: auto-fill only with exactly one granted token account for that host
  • Push guard checks inline URLs and bare git push / git push origin (resolves remote URL)

Security

  • Tokens never appear in tool/API results or model context
  • Push policy is enforced in Host tools.guard
  • With no project grants, push is not blocked by default (progressive enablement); helper also supplies no credentials

Development

npm test
npm run check
./scripts/sync-to-dsh.sh   # optional: copy into $DSH_HOME/local-plugins

License

MIT — see LICENSE.

安装

🧩 让 Agent 自动装(推荐)

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

dsh plugin add dshbase-catalog

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

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:thirsty5034/dsh-git-forge

Headless(CLI)profile:

dsh plugin --profile headless add github:thirsty5034/dsh-git-forge

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

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

分享徽章

Developer 里更多

浏览全部 7819 个插件 →