feat: harden workflow gates and expose token usage

This commit is contained in:
2026-07-21 12:14:26 +02:00
parent 8aa1676811
commit 2ff63d371f
20 changed files with 604 additions and 53 deletions
+9
View File
@@ -75,6 +75,14 @@ export interface ActivityEntry {
status?: "running" | "completed" | "failed";
}
export interface TokenUsage {
input: number;
cacheRead: number;
output: number;
totalTokens: number;
contextWindow: number;
}
export type StreamEvent =
| { type: "ui_request"; ui_request: WidgetDescriptor }
| { type: "text_delta"; text: string }
@@ -88,6 +96,7 @@ export type StreamEvent =
status: "running" | "completed" | "failed";
};
}
| { type: "usage"; usage: TokenUsage }
| { type: "info"; level?: "info" | "warning" | "error"; text: string }
| { type: "system_event"; event: string };