Skip to content

Clone Repositories into a Workspace with GitHub tokens over a unix socket #63

Description

@ExtraToast

Design: #59 (the glossary and ADRs). Use the glossary's terms.

What to build

The user creates a Repo-backed Workspace. Its primary Repository is cloned, and the user can Add Repository to clone more. Workspace Status moves Preparing to Ready, or to Failed with a reason the UI shows. Agents push and pull with short-lived GitHub App installation tokens scoped to the Workspace's Repositories. A git credential helper gets each token over a unix socket, and the API accepts only callers whose peer uid is the agent user. The shared bearer between runner and API is removed. agents-ui uses "Add Repository" wording.

Implements ADR 0003: The API and agents run as separate users.

Acceptance criteria

  • Workspace Status is Preparing, Ready, Failed or Destroyed. Starting and Idle are no longer set.
  • A Repo-backed Workspace clones its primary Repository. Add Repository clones another into the same Workspace.
  • git push from an Agent Session succeeds with a token scoped to that Workspace's Repositories, and fails for any other repository.
  • A socket request from a process running as api or root is rejected. A test covers the peer uid check.
  • The GitHub App private key is never readable by agent.
  • The shared token bearer secret is no longer read or required.

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: agentsAgent runtime, agent APIs, tools, prompts, or UI.type: featureNew user-facing or operator-facing capability.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions