Use the dedicated TJWATER_AGENT_URL and Responses stream protocol. Keep running turns active while users steer or queue follow-ups and edit pending delivery. Refresh the model catalog before generation and preserve approval mode selection. Integrate scoped investigation messaging/presentation, geographic place selection, current Agent composer styles and supporting workbench contracts. Validation: 77 focused Vitest checks, 21 browser cases, lint, typecheck and production build. Preserve direct Server/Agent routing and project authentication.
22 lines
773 B
TypeScript
22 lines
773 B
TypeScript
import { z } from "zod";
|
|
|
|
export const agentMessageSchema = z.object({
|
|
message_id: z.string().min(1),
|
|
task_id: z.string().min(1),
|
|
run_id: z.string().min(1),
|
|
source_session_id: z.string().min(1),
|
|
target_session_id: z.string().min(1).nullable(),
|
|
direction: z.enum(["to_task", "to_chat"]),
|
|
text: z.string(),
|
|
status: z.enum(["pending", "enqueued", "delivered", "failed"]),
|
|
in_reply_to: z.string().nullable(),
|
|
created_at: z.string(),
|
|
failure_detail: z.string().nullable().optional()
|
|
});
|
|
export const agentMessagePageSchema = z.object({
|
|
items: z.array(agentMessageSchema),
|
|
next_cursor: z.string().nullable()
|
|
});
|
|
export type AgentMailboxMessage = z.infer<typeof agentMessageSchema>;
|
|
export type AgentMessagePage = z.infer<typeof agentMessagePageSchema>;
|