Files
paseo/packages/protocol/src/agent-message.ts
T
Mohamed Boudra d0bc188a5b Show agent messages and completion notifications with sender identity (#6373)
* feat(agents): show agent messages and completion notifications with sender identity

* fix(agents): preserve human envelope examples and attachment context

* fix(agents): separate message provenance from timeline presentation
2026-10-08 14:42:34 +01:00

14 lines
429 B
TypeScript

import { z } from "zod";
/** Semantic provenance, independent of provider envelopes and timeline presentation. */
export const AgentMessageSchema = z.object({
event: z.enum(["message", "finished", "errored", "permission-required", "closed"]),
sender: z.object({
id: z.string().min(1),
title: z.string().min(1).optional(),
}),
text: z.string(),
});
export type AgentMessage = z.infer<typeof AgentMessageSchema>;