Skip to main content

Code Forge

Connect the built-in GitHub or GitLab provider, resolve a repository and inspect forge data. GitHub also supplies in-app issue and pull-request browsing and bulk worktree creation.

Updated
Reviewed

Forge providers

A forge is the platform layer that sits on top of git: issues, pull requests, reviews, CI status, releases, and authentication. Daintree talks to a forge through a forge provider, and two ship built in:

  • GitHub, for repositories on github.com.
  • GitLab, for gitlab.com, a handful of well-known public GitLab instances, and any self-hosted GitLab you point it at. On GitLab, Daintree's "pull request" surfaces show merge requests.

Everything outside the providers is provider-neutral. Provider resolution, the credential form, the toolbar counts, worktree linkage, commit-author avatars and the forge.* actions all route through one typed contract rather than calling GitHub or GitLab directly. The two providers do not offer the same surface yet, though, so the comparison below says which parts each one fills in.

Note
A forge provider cannot be installed as a third-party plugin. Providers must be in-process built-ins that ship inside the app bundle, because the parts of the contract Daintree calls on the hot path (remote parsing, URL building, push-error classification) are synchronous, and an out-of-process .dntr plugin can only answer across an async message port. Calling registerForgeProvider from a worker-hosted plugin logs a warning and returns a no-op, and a project plugin that declares contributes.forgeProviders fails validation. Plugins extend the forge experience in other ways (the built-in GitHub provider itself contributes a file-decoration provider for diff review), but they cannot register a forge. See the plugin system for what plugins can and cannot do.

How Daintree chooses a provider

When you open a project, Daintree picks a forge provider by checking three things in order:

  1. A per-project override. If you've pinned this project to a specific provider, that wins, and it is searched against the whole registry rather than only the providers that match the remote's hostname.
  2. Your global default. If you've set a default provider in settings, Daintree uses it only if it covers the project's remote. An explicit default that cannot resolve the remote stops resolution; it does not fall through.
  3. Hostname matching. Otherwise Daintree reads the git remote URL and matches its hostname against the registered providers. A github.com remote resolves to GitHub. GitLab matches gitlab.com, invent.kde.org, salsa.debian.org, gitlab.freedesktop.org, gitlab.gnome.org and gitlab.haskell.org.

Hostname matching is exact after lowercasing and stripping a leading www.. There are no wildcards, and there is no fuzzy fallback. A self-hosted GitLab on any other hostname therefore never matches by hostname, and a global default doesn't help either, because the default only applies to remotes it covers. Pin the project to GitLab with the per-project override; Connect and Authenticate walks through it.

Warning
Both explicit tiers fail closed. An override naming a provider that is not registered resolves to no provider at all: it does not fall through to hostname detection. Neither does a global default that doesn't cover the project's remote. The visible symptom is a toolbar that shows only the commits count, which is the intended signal: a silently substituted provider would point issue and PR writes at the wrong repository.

What a connection gets you

Connecting a forge does three things, and each has its own page:

  1. Connect and authenticate. Pick a provider, supply a token with the right scopes, and confirm Daintree accepted it. Start here, because nothing below works until this does.
  2. Read issues and pull requests. Live counts in the toolbar and, on GitHub, a searchable panel of issues and pull requests with CI status, without leaving the workspace.
  3. Create and link worktrees. Turn an issue or a pull request into a branch and a checkout, one at a time or in bulk, and keep the link between the two afterwards.

The pull request a worktree's branch belongs to also shows up in Review Hub, as a chip with its CI status and the merge-readiness conditions that come from it.

GitHub and GitLab compared

Both providers connect with a personal access token and feed the same toolbar, worktree badges and agent actions. The in-app browsing and bulk surfaces are GitHub's for now.

FeatureGitHubGitLab
ConnectPersonal access token, or import the token the gh CLI already holdsPersonal access token for one instance URL
Toolbar counts of open issues and open pull or merge requestsYesYes
Clicking an issue or pull request countOpens the in-app issues or pull requests panelOpens the project's issues or merge requests page in your browser
Bulk worktree creation from a selectionYesNo
Issue picker in the Create worktree dialogYesNo
Attaching an issue to an existing worktreeYesYes
Pull or merge request badge on worktree cards, and the Review Hub PR chipYesYes, with CI status from the head pipeline
Individual CI checks in Review Hub, with hand-off to an agentYesNo
CI status filtered to required checksYesNo
Unresolved review comment counts in base-branch reviewYesNo
Commit-author profile picturesYesYes
Checking out a pull or merge request head, including forksFrom the pull requests panelNo in-app list; an agent can create the worktree from a merge request number

What agents can do with the forge

The forge is not just a panel. Daintree exposes it as a set of forge.* actions, so an agent working in a worktree can read and act on the same data you can:

  • Reads: repository stats, issue and PR listing and detail, issue comment threads, CI roll-up status, and per-check detail. Listing takes page size, sort and direction, and returns either a summary or a full view; an unrecognized filter is rejected rather than silently dropped, so an agent finds out it asked for something impossible instead of acting on a wrong result set.
  • Per-check CI detail: an agent can see which check failed, not just that the roll-up is red, which is the difference between "CI is broken" and "the lint job failed on two files". GitHub only; the GitLab provider reports the head pipeline's overall status.
  • Issue writes: create, close, reopen, edit, comment, add and remove labels, assign and unassign.
  • PR writes: create, close, reopen, merge, edit, comment, convert to draft, mark ready for review.
  • Review writes: approve, request changes, dismiss a review, request reviewers. GitHub only.
  • Navigation: open an issue, PR, commit list or the repository in the browser.

Over MCP, only reads are reachable, and only some of them: forge.getPR, forge.listPRs, forge.getIssue, forge.listIssues and forge.getCIStatus sit in the Full tool set. Forge writes and navigation are on no tier, so no agent merges a PR or closes an issue through Daintree. An agent still has its own shell and whatever forge CLI you have installed, and what it can do with them is governed by that CLI's permissions, not by Daintree.

Warning
External API-key MCP clients do not expose forge tools. The forge reads above are available only to the in-app Daintree Assistant and agent panes at the Full tool set. See the MCP server for the external tool list.

Adding another forge

A further forge (Gitea, Bitbucket, another self-hosted server) is a built-in provider, not something you install. Everything around it is already provider-neutral: resolution, the settings section and credential form, the toolbar counts, the worktree linkage and the forge.* actions all route through one contract. GitLab arrived exactly this way.

Capabilities are declared, not assumed, so the UI can hide what a given forge doesn't support rather than failing at call time. GitHub declares issues, pulls, reviews, required-checks, draft-prs, assignees, releases, batch-branch-prs, identity, and clone. GitLab declares issues, pulls, draft-prs, assignees, releases, batch-branch-prs, and identity.

For implementation details, read the built-in GitHub provider and GitLab provider. A project plugin can contribute companion actions and UI around either integration; see Project Plugins.