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

授权

bearerAuth
授权Bearer <token>

位置: header

路径参数

orgId*string
id*string

查询参数

repo?string
长度1 <= length <= 256
sessionId?string
长度1 <= length
path*string
长度1 <= length <= 4096
scope?string
默认"unstaged"

值于

  • "unstaged"
  • "staged"

响应主体

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}