fix: align SDK wait and protocol contracts

This commit is contained in:
Peter Steinberger
2026-04-29 23:58:38 +01:00
parent 204d200be3
commit 29de89a8d9
5 changed files with 52 additions and 6 deletions

View File

@@ -146,7 +146,7 @@ have to parse `raw` for normal UI.
```typescript
type RunResult = {
runId: string;
status: "completed" | "failed" | "cancelled" | "timed_out";
status: "accepted" | "completed" | "failed" | "cancelled" | "timed_out";
sessionId?: string;
sessionKey?: string;
taskId?: string;
@@ -172,6 +172,11 @@ shape, so current lifecycle-backed runs usually report epoch millisecond
numbers while adapters may still surface ISO strings. Rich UI, tool traces, and
runtime-native details belong in events and artifacts.
`accepted` is a non-terminal wait result: it means the Gateway wait deadline
expired before the run produced a lifecycle end/error. It must not be treated as
`timed_out`; `timed_out` is reserved for a run that exceeded its own runtime
timeout.
## Approvals and questions
Approvals must be first-class because coding agents constantly cross safety