AgentConnect
Agent workspace

Get a workspace file diff

Proxy the unified diff of one workspace path live from the owning daemon. scope=staged compares the index against HEAD; the default unstaged compares the worktree against the index. Pass sessionId for an authorized isolated session worktree. A binary change (binary:true), a path with no changes (diff:null) and a from-scratch workspace (isRepo:false) are all data, not errors; the daemon bounds the text to the wire frame cap and reports truncated. 503 when unplaced or the daemon is offline. 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.

GET
/v1/orgs/{orgId}/agents/{id}/workspace/gitdiff

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

orgId*string
id*string

Query Parameters

repo?string
Length1 <= length <= 256
sessionId?string
Length1 <= length
path*string
Length1 <= length <= 4096
scope?string
Default"unstaged"

Value in

  • "unstaged"
  • "staged"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/orgs/string/agents/string/workspace/gitdiff?path=string"
{  "path": "string",  "isRepo": true,  "exists": true,  "diff": "string",  "binary": true,  "truncated": true}