feat: add structured silent output contract

This commit is contained in:
Eyejoker
2026-03-28 05:56:58 +09:00
parent e1fdc47552
commit fe6314108c
13 changed files with 346 additions and 52 deletions

View File

@@ -21,6 +21,17 @@ export type AgentOutputPhase =
/** Phase as visible in the UI (mapped from AgentOutputPhase). */
export type VisiblePhase = 'silent' | 'progress' | 'final';
export type AgentVisibility = 'public' | 'silent';
export type StructuredAgentOutput =
| {
visibility: 'public';
text: string;
}
| {
visibility: 'silent';
};
export function normalizeAgentOutputPhase(
phase?: AgentOutputPhase,
): AgentOutputPhase {