AgentConnect
Agent workspace

Stage workspace paths

Stage the named paths in the owning daemon’s checkout, or in an authorized isolated session worktree when sessionId is given. Requires edit access to the agent. Answers with the FRESH git status, so the console never re-polls for the result of its own action. An empty list, a path the checkout does not currently report as changed and a from-scratch workspace (isRepo:false) are all data, not errors; 409 when the agent is busy in its workspace, 503 when unplaced or the daemon is offline. The control plane executes no git and stores no workspace state. Pass repo (owner/repo) to address one of the agent’s authorized additional repositories instead of its primary workspace; an unauthorized name reads 404, and a daemon too old to scope by repository yields 409.

POST
/v1/orgs/{orgId}/agents/{id}/workspace/gitstage

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

orgId*string
id*string

Query Parameters

repo?string
Length1 <= length <= 256
sessionId?string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/agents/string/workspace/gitstage" \  -H "Content-Type: application/json" \  -d '{    "paths": [      "string"    ]  }'
{  "isRepo": true,  "clean": true,  "repo": "string",  "agentDir": "string",  "branch": "string",  "tracking": "string",  "ahead": 0,  "behind": 0,  "files": [    {      "path": "string",      "index": "string",      "workingDir": "string",      "additions": 0,      "deletions": 0    }  ],  "truncated": true,  "lastCommit": {    "sha": "string",    "shortSha": "string",    "subject": "string",    "committedAt": "string"  },  "lastFetchAt": "string"}