文档
推荐给好友,福利领不停!好友同步开通最高 1000 万词元额度 · 后续消费分佣最高 30%。
+50万 Token生成链接
GET /v1/sessions/{session_id}/events

事件流

通过 Server-Sent Events 订阅一个会话的全部事件——每一步工具调用、每一次写盘、每一次模型回包。

参数

sincenumber

从某个时间戳起回放(用于断线续传)。

kindsstring[]

事件类型过滤(如 `step,write,approval`)。

响应

json
event: step
data: {	ype:"step",step:{kind:"read",path:"src/api/users.ts"},	s:1716250503}

event: step
data: {	ype:"step",step:{kind:"shell",cmd:"npm test"},	s:1716250508}

event: write
data: {	ype:"write",write:{path:"src/api/users.ts",ytes:2418},	s:1716250512}
event: step
data: {	ype:"step",step:{kind:"read",path:"src/api/users.ts"},	s:1716250503}

event: step
data: {	ype:"step",step:{kind:"shell",cmd:"npm test"},	s:1716250508}

event: write
data: {	ype:"write",write:{path:"src/api/users.ts",ytes:2418},	s:1716250512}