Preface¶
When developing agents in DeepSeek Harness (DSH), frequently interacting with GitHub repositories, handling Pull Requests, and tracking Issue statuses are common scenarios. The traditional approach either involves using git commands in the terminal or manually opening a browser to log in to GitHub, resulting in a fragmented workflow where events are easily missed.
This article introduces GitHub Orchestrator, a Host + Web UI plugin that turns your local working directory into a GitHub workbench: it provides a panel in the Harness Web UI, enables GitHub login via OAuth, maintains an event inbox, executes tasks in parallel using Git worktrees, and supports rebase/merge/cleanup as well as Issue-based storyboards.
Plugin Overview¶
- Plugin name:
hitzhangjie/dsh-plugin-github-orchestrator - Maintainer: hitzhangjie
- Category: Workflow
This is a DeepSeek Harness plugin that provides, via a Cordis bundle, a Host process (responsible for communicating with the GitHub REST API and Git) and a browser frontend (providing the Web UI panel). The plugin runs locally and does not depend on a server or a public Webhook endpoint.
Core Features¶
1. Harness Web UI Panel¶
After installation, a GitHub branch icon appears in the left sidebar. Clicking it opens a dashboard with the following views:
- Header: Displays the workspace root directory, authentication status (OAuth / environment variable / GitHub CLI, etc.), a refresh button, and an Agent chat entry point.
- Sign-in card: Clicking “Sign in with GitHub” initiates the GitHub device-code flow. You enter the one-time code displayed at github.com, and upon authorization the token is stored in the Harness credential service. Sign-out is also supported.
- Inbox: A list of unread events, categorized by event type (issue, PR, review, push, etc.), showing repository, branch/PR/issue links, and associated task IDs. You can mark all or some as read.
- Issues: The current issue backlog, filterable by status, repository, and count. Each row has a “Create task” button.
- PRs: A list of Pull Requests, showing all statuses by default (open, merged, closed), with the same filtering and “Create task” options.
- Tasks: A task list displaying status, branch, issue link, worktree path, and a “from PR” / “from issue” tag. Supports syncing the storyboard or closing a task.
- Repos: Clone/pull status of watched repositories, showing the base branch and dirty state.
- Worktrees: A list of currently active worktrees, showing branch and dirty state, with removal support (with confirmation).
- Automation: Event dispatch configuration—toggle on/off, set event types, minimum interval, watcher session ID. Supports “Run check now” and sending chat-style commands to the watcher session.
- Settings: Edit the workspace root directory and polling interval; changes are persisted immediately.
2. Tool Commands¶
The plugin provides a set of tools in DSH sessions, callable from the main chat or the watcher session:
github_config: View/modify workspace root, polling interval, base branch, branch prefix, remote, git executable path, OAuth client ID/scopes, and automation fields.github_auth: OAuth device-code flow—view status, start, poll, cancel, and sign out.github_repos: Add/remove watched repositories, perform clone/pull, and view clone status.github_issues: List/view/create issues and PRs (the current backlog, not just event increments).github_events: Read/poll/mark the event inbox and view the polling watermark.github_tasks: Create/list/update/close tasks, sync task issues and storyboards, import existing issues.github_dispatch: Control the persistent dispatcher—status, run once immediately, send text to the watcher session.git_worktree: Create/list/remove/clean up worktrees.git_sync: Fetch, rebase, rebase continue/abort, merge + cleanup, clean up merged worktrees, and view status.
At runtime, the plugin provides a ## GitHub orchestrator context snippet containing the workspace root, active tasks, unread event counts by repository and type, and token availability.
3. OAuth Login and Git Access¶
The plugin uses the GitHub device-code flow for OAuth login—no SSH keys or credential helpers required. After authorization, the token is stored in the Harness credential service, and all clone, pull, and push operations use this token over HTTPS. The plugin calls the GitHub REST API via local fetch and executes Git operations through the local git executable.
4. Event Inbox and Storyboard¶
The plugin continuously polls configured repositories and normalizes events—issues, PRs, reviews, branch pushes, etc.—into the event inbox, preventing critical events from being missed between sessions.
When “storyboard memory” is enabled, each task is mirrored to an issue. Each repository reuses a single per-repository epic issue (reused even if closed), staying consistent with the task table and status counts, and closing duplicate epic issues. The local task store serves as a fast cache, while GitHub issues serve as persistent shared memory.
5. Parallel Worktrees and Task Lifecycle¶
A single workspace directory can contain any number of repository clones. Each task uses its own git worktree and branch, created from the remote base branch. Upon task completion, you can rebase onto the latest base branch (conflicts are reported but not forced), merge into the main clone’s base branch, then remove the worktree, delete the branch, close the task, and update the storyboard.
6. Persistent Automation (Grok-bot Mode)¶
Once autoDispatch is enabled, the plugin enters persistent dispatch mode. During each polling cycle it:
- Selects newly appeared, unread, non-baseline events (default types: issue, pr, review)
- Deduplicates against the persisted
dispatch.json, ignoring the plugin’s own[Storyboard]/[Tn]issues to avoid self-trigger loops - Applies a minimum interval limit to prevent rapid repeated processing
- Routes events to the watcher session, where the agent performs subsequent actions in the main chat or the native chat tab in the right sidebar
Installation & Activation¶
The plugin is a Cordis bundle comprising a Host and a browser component. Repository URL: https://github.com/hitzhangjie/dsh-plugin-github-orchestrator
After cloning the repository, run locally:
git clone https://github.com/hitzhangjie/dsh-plugin-github-orchestrator.git
cd dsh-plugin-github-orchestrator
node --check index.js
node --check client.js
node --test "test/**/*.test.js"
Install to the current profile:
plugin_manager action=install_bundle target=<absolute path to this directory>
After a successful installation, the GitHub icon appears in the left sidebar. Click it to open the panel or directly use the nine tools.
Typical Usage¶
Assigning Tasks via Main Chat¶
In a DSH session, simply describe the task, for example:
Check the GitHub inbox and map the latest review request to a task; create a worktree to implement it if needed, then rebase onto the latest main, merge, clean up the worktree and branch, and close the issue.
The agent will autonomously invoke tools such as github_events, github_tasks, git_worktree, and git_sync to complete the workflow.
Dispatching via the Panel¶
In the panel’s Automation tab, enable autoDispatch, select event types and minimum interval, and click “Run check now” to trigger a dispatch immediately. In the watcher session, the agent processes new events according to the configured event types.
Manually Creating Tasks and Worktrees¶
Create tasks via the panel’s Issues/PRs view, or use the github_tasks tool. Then use git_worktree to create a worktree and branch, and git_sync to perform fetch/rebase/merge/cleanup.
Applicable Scenarios & Notes¶
Ideal for agent developers who need to frequently interact with GitHub repositories, manage multi-branch tasks, and embed their workflow within the Harness context.
Notes:
- The plugin runs with the current DSH process permissions. Review the source code and license (MIT) before installation.
- Node.js >= 22.5.0 must be installed locally, and
gitmust be in PATH. - The plugin relies on the Harness credential service to store OAuth tokens. Configure the corresponding permissions in Harness.
Summary¶
GitHub Orchestrator turns a local working directory into a complete GitHub workbench. Through the Harness Web UI, it provides a panel supporting OAuth login, an event inbox, parallel worktrees, rebase/merge/cleanup, and Issue-based storyboards. It can invoke tools on demand during a session or be switched to persistent automation mode, allowing the agent to handle events automatically. The plugin runs entirely locally, with no dependency on a server or public Webhook endpoint, making it well-suited for agent development scenarios that require deep integration with GitHub workflows.
Catalog page: https://www.skillhub.cn/plugins/hitzhangjie/dsh-plugin-github-orchestrator
GitHub: https://github.com/hitzhangjie/dsh-plugin-github-orchestrator