Skip to content

Commit 5ce84d0

Browse files
authored
Adopt structured agent thread rows (author_kind/event/payload)
Types the new TaskThreadMessage fields from PostHog/posthog#70371 (stacked on #70320) and keys agent rendering on author_kind, keeping the authorless fallback for older backends. payload.run_id on turn_complete rows is the dedupe key for live session-derived agent turn views. Generated-By: PostHog Code Task-Id: ea09a661-1f6d-4bd8-a046-24be60909d28
1 parent dd391e3 commit 5ce84d0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/shared/src/domain-types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ export interface ChannelFeedMessage {
107107
export interface TaskThreadMessage {
108108
id: string;
109109
task: string;
110+
/** Who authored the row; agent rows are server-emitted announcements. Absent on older backends. */
111+
author_kind?: "human" | "system" | "agent";
112+
/** Stable event key for non-human rows (e.g. "canvas_created", "turn_complete"). */
113+
event?: string;
114+
/** Structured event payload; turn_complete carries `{ run_id }` so a client rendering a run's live agent turns can dedupe the durable row. */
115+
payload?: Record<string, unknown>;
110116
content: string;
111117
created_at: string;
112118
author?: UserBasic | null;

0 commit comments

Comments
 (0)