AgentConnect
Agent workspace

Commit the staged workspace changes

Commit whatever is staged in the owning daemon’s checkout, or in an authorized isolated session worktree when sessionId is given. Requires edit access to the agent. The commit is attributed to the identity the daemon registered at handshake, never to the console user. Nothing staged, a blank message, a daemon with no registered identity and a git refusal all come back as ok:false with a machine reason, not an HTTP error; 409 when the agent is busy in its workspace, 503 when unplaced or the daemon is offline. The control plane forwards the message and stores neither it nor the diff. 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/gitcommit

授权

bearerAuth
授权Bearer <token>

位置: header

路径参数

orgId*string
id*string

查询参数

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

请求主体

application/json

TypeScript 定义

在 TypeScript 中使用 request 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/gitcommit" \  -H "Content-Type: application/json" \  -d '{    "message": "string"  }'
{  "isRepo": true,  "ok": true,  "sha": "string",  "detail": "string",  "reason": "not-a-repo"}