Back to home@GooDAnDReaDY

dsh-gitea

Gitea/Forgejo toolkit for DeepSeek Harness: issues, PRs, CI, releases, operations

Stars
0
Language
JavaScript
Created
Aug 31, 2026
Updated
Sep 1, 2026
GitHub repo

Introduction

📦 @goodandready/dsh-gitea

Enterprise Gitea & Forgejo Integration Suite for DeepSeek Harness

npm version license DSH Plugin Node version

All Author Projects

🇬🇧 English🇷🇺 Русский🇨🇳 中文说明


⚡ Overview & Problem Solved

When autonomous AI coding agents perform complex multi-step development in DeepSeek Harness, they require seamless access to issue trackers, pull request review workflows, branch creation, and isolated workspace worktrees without risking repository corruption or leaking credentials into chat logs.

@goodandready/dsh-gitea bridges DeepSeek Harness to self-hosted Gitea and Forgejo instances. It equips agents with a complete suite of 20+ structured tools, registers a live Git Status Chip directly in the Web UI chat header, and enforces safety rails (confirm: true merge guards and dedicated write wrappers).


🏗️ Architecture

graph LR
    subgraph DSH ["DeepSeek Harness"]
        UI["Web UI Chat Header<br/>(Git Status Chip)"]
        Agent["Autonomous Agent<br/>(20+ Gitea Tools)"]
        Creds["Credentials Store<br/>(GITEA_TOKEN Ref)"]
    end

    subgraph Plugin ["dsh-gitea Plugin"]
        ChipPoller["/git-status API<br/>Branch & Diff Inspector"]
        Client["GiteaClient<br/>(REST API v1)"]
        WorktreeMgr["Worktree Manager<br/>(Isolated Task Trees)"]
    end

    subgraph Server ["Self-Hosted VCS"]
        Gitea["Gitea / Forgejo Server<br/>(Issues, PRs, Labels, Milestones)"]
        GitRepo["Git Repository<br/>(Worktrees & Remotes)"]
    end

    UI -->|Polls Status| ChipPoller
    ChipPoller -->|Reads Status| GitRepo
    Agent -->|Executes Tools| Client
    Agent -->|Manages Branches| WorktreeMgr
    WorktreeMgr -->|git worktree| GitRepo
    Client -->|Authenticated REST| Gitea
    Creds -.->|Resolves In-Memory| Client

✨ Full Feature Breakdown

1. 20+ Agent Tools Suite

All tools infer owner and repo automatically from the active workspace's git remote get-url origin when omitted by the agent.

Tool NameScopeDescriptionSafety Requirements
gitea_issue_createIssuesCreates a new issue with title, body, labels, and assignees-
gitea_issue_listIssuesLists issues with state (open/closed), milestone, and label filters-
gitea_issue_getIssuesFetches detailed issue data by issue index-
gitea_issue_commentIssuesPosts comments, progress updates, and code reviews-
gitea_issue_updateIssuesUpdates issue title, body, or status-
gitea_issue_closeIssuesCloses an issue-
gitea_issue_searchIssuesFull-text issue query across the repository/instance-
gitea_issue_set_labelsLabelsReplaces or updates issue labels-
gitea_issue_set_assigneeTeamAssigns developers or agents to issues-
gitea_label_listLabelsLists all repository labels-
gitea_label_createLabelsCreates custom labels with colors-
gitea_label_deleteLabelsDeletes repository labels-
gitea_milestone_listMilestonesLists repository milestones and progress-
gitea_milestone_createMilestonesCreates roadmap milestones with due dates-
gitea_pr_createPull RequestsOpens PR from source branch to base branch-
gitea_pr_listPull RequestsLists open and closed pull requests-
gitea_pr_getPull RequestsFetches PR diff summary, reviews, and status-
gitea_pr_commentPull RequestsAdds line comments and general PR feedback-
gitea_pr_mergePull RequestsMerges PR via merge/rebase/squash⚠️ Requires confirm: true
gitea_worktree_listWorktreesLists active git worktrees and branch paths-
gitea_worktree_addWorktreesCreates an isolated worktree for concurrent tasks-
gitea_worktree_useWorktreesSwitches session context to a worktree directory-
gitea_worktree_removeWorktreesPrunes and deletes completed worktrees⚠️ Requires confirm: true
gitea_repo_searchDiscoverySearches repositories across the Gitea instance-
gitea_whoamiAuthReturns authenticated user details and permissions-

2. Live Git Status Chip in Chat Header

The client component injects a real-time Git Status Chip into the DSH Web UI top navigation bar:

  • Active Repository & Branch: Displays current branch name (e.g., feature/issue-42-auth).
  • Tree Cleanliness: Color-coded badges indicating clean vs dirty working trees.
  • Uncommitted Diff Inspector: 1-click modal drawer showing modified files and diff lines.
  • Ahead/Behind Tracker: Sync indicator with upstream origin remote.

3. Worktree Isolation & Agent Safety Rails

To allow autonomous agents to work on multiple issues without touching the primary branch:

  • Non-destructive Worktrees: Creates worktree paths under .worktrees/issue-<id>/ or custom directories.
  • Confirm Guard Matrix: Destructive operations like gitea_pr_merge and gitea_worktree_remove strictly require explicit boolean confirm: true. Unconfirmed tool calls are automatically rejected.
  • Git Wrapper Enforcement: Write operations can be routed through a dedicated wrapper (gitWrapper, e.g., git-deepseek-harness) to enforce agent author signatures.

4. Gitea Issue Templates Pack

Includes standardized Gitea YAML issue templates under .gitea/ISSUE_TEMPLATE/:

Template FilePurposeRecommended Starter Labels
bug.yamlBug reporttype/bug, status/ready
feature.yamlFeature proposaltype/feature, status/ready
security.yamlSecurity vulnerabilitytype/security, priority/high, scope/security
research.yamlArchitectural research / spiketype/research, status/ready
tech-debt.yamlTechnical debt & refactoringtype/tech-debt, status/ready
incident.yamlProduction incident reporttype/incident, priority/critical
config-change.yamlInfrastructure & config changetype/refactor, scope/settings, status/ready

📦 Installation

Install via DeepSeek Harness CLI:

dsh plugin --profile web add @goodandready/dsh-gitea

Restart DSH Web UI and perform a hard-refresh (Ctrl+F5 or Cmd+Shift+R).


⚙️ Configuration

Navigate to Settings -> Plugins -> Gitea:

# config.yaml
dsh-gitea:
  baseUrl: "https://gitea.yourcompany.com"
  tokenEnv: "GITEA_TOKEN"
  gitWrapper: ""
  timeoutMs: 15000

Settings Reference Table

KeyTypeDefaultDescription
baseUrlstring""Base URL of your Gitea or Forgejo instance (e.g. https://gitea.example.com)
tokenEnvstring"GITEA_TOKEN"Name of the DSH Credential containing the personal access token
gitWrapperstring""Optional executable wrapper for write operations (e.g., git-dsh)
timeoutMsnumber15000HTTP request timeout in milliseconds

[!IMPORTANT] Never put the raw API token in the tokenEnv field. Store the token securely in DSH Credentials and enter only its reference key name.


🧪 Testing & Verification

Run the comprehensive unit and integration test suite:

npm test

📄 License

MIT © GooDAnDReaDY