mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 10:12:44 +00:00
* 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
14 lines
429 B
TypeScript
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>;
|