AgentConnect
Agent workspace

Push the workspace branch

Push the branch checked out in the owning daemon’s workspace, or in an authorized isolated session worktree when sessionId is given, to the remote that daemon authorizes. Requires edit access to the agent. The daemon derives the refspec and never forces: a diverged branch (reason diverged), a detached HEAD (detached-head), a branch tracking nothing (no-upstream) and a remote rejection (rejected) are all ok:false data, and a push with nothing to send is ok:true with ahead:0. 409 when the agent is busy in its workspace, 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.

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

授权

bearerAuth
授权Bearer <token>

位置: header

路径参数

orgId*string
id*string

查询参数

repo?string
长度1 <= length <= 256
sessionId?string
长度1 <= length

响应主体

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/agents/string/workspace/gitpush"
{  "isRepo": true,  "ok": true,  "detail": "string",  "ahead": 0,  "reason": "not-a-repo"}