An open-source, faster Devin alternative
TypeScript
docs(repos): clearer flow diagram — two boxes, brain/hands, fix labels
Igor Zalutski9eb5e31dec89
diff --git a/docs/agent-sessions/repos.mdx b/docs/agent-sessions/repos.mdxindex 25c52f61..eb250688 100644--- a/docs/agent-sessions/repos.mdx+++ b/docs/agent-sessions/repos.mdx@@ -38,35 +38,43 @@ surface while sessions continue to reference repos and sources the same way.Every authenticated Git operation runs in its own **Git operations sandbox** — a minimalbox with `git` and nothing else, provisioned for that one operation and destroyed when it-finishes. The agent's sandbox is never one of these: it never holds a token and never runs-authenticated `git` or `gh`. Files and patches move between the two through object storage,-never next to a credential.+finishes. Checkout and publish get *different* boxes. Your agent's own sandboxes — the+**brain** that runs the loop and the **hands** sandbox that holds the files — are never one+of these: they hold no token and never run authenticated `git` or `gh`. Files and patches+move between them through object storage, never next to a credential.```mermaidsequenceDiagram- participant Agent as Agent sandbox+ participant Brain as Brain (agent loop)+ participant Hands as Hands (agent sandbox)participant CP as Control plane- participant Git as Git operations sandbox+ participant GitR as Git box (checkout)+ participant GitW as Git box (publish)participant Store as Object storageparticipant GH as GitHub- Note over CP,GH: Checkout — before the first turn- CP->>Git: Provision for one operation+ Note over GitR: Checkout — before the first turn+ CP->>GitR: Provision (git only, ephemeral)CP->>GH: Mint just-in-time token (read-only, one repo)- CP->>Git: Inject token into this box's env only- Git->>GH: Clone at the pinned sha- Git->>Store: Write files (no .git, no token)- Note over Git: Destroyed — token gone- Store->>Agent: Extract into the source path-- Note over Agent,GH: Publish — agent calls github_publish_pull_request- Agent->>Store: Write a patch (still no token)- CP->>Git: Provision a new box+ GH-->>CP: Scoped token+ CP->>GitR: Inject token into this box's env only+ GitR->>GH: Clone at the pinned sha+ GitR->>Store: Write files (no .git, no token)+ Note over GitR: Destroyed — token gone+ Store->>Hands: Extract into /workspace/sources++ Note over GitW: Publish — on github_publish_pull_request+ Brain->>CP: github_publish_pull_request(source, title)+ CP->>Hands: Diff the edits+ Hands->>Store: Write a patch (no token)+ CP->>GitW: Provision a separate box (git only)CP->>GH: Mint just-in-time token (write-scoped, one repo)- Git->>Store: Read the patch- Git->>GH: Push an oc/ branch, open the PR- Note over Git: Destroyed — token gone- GH-->>Agent: PR URL+ GH-->>CP: Scoped token+ CP->>GitW: Inject token into this box's env only+ GitW->>Store: Read the patch+ GitW->>GH: Push an oc/ branch, open the PR+ Note over GitW: Destroyed — token gone+ CP-->>Brain: PR URL```**Checkout (read), before the first turn:**@@ -78,11 +86,11 @@ sequenceDiagram3. The sandbox clones the exact `sha`, then writes the **files** (no `.git`, no remote, notoken) to dedicated object storage.4. The sandbox is destroyed; the token dies with it.-5. The agent's sandbox extracts those bytes into `/workspace/sources/<name>`.+5. The **hands** sandbox extracts those bytes into `/workspace/sources/<name>`.**Publish (write), when the agent calls `github_publish_pull_request`:**-1. The agent's sandbox turns its edits into a patch and writes it to object storage. The+1. The **hands** sandbox turns its edits into a patch and writes it to object storage. Theagent still has no token.2. OpenComputer provisions a **new** Git operations sandbox and mints a fresh,**write-scoped** token for that one repo.