diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 8308a5d..03fbbb7 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -1,2 +1,2 @@ export type { AppRouter } from './trpc.js'; -export type { Initiative, Phase, Plan, Task, Agent, Message, PendingQuestions, QuestionItem } from './types.js'; +export type { Initiative, Phase, Plan, Task, Agent, Message, PendingQuestions, QuestionItem, SubscriptionEvent } from './types.js'; diff --git a/packages/shared/src/types.ts b/packages/shared/src/types.ts index a57b9e2..d183727 100644 --- a/packages/shared/src/types.ts +++ b/packages/shared/src/types.ts @@ -1,2 +1,13 @@ export type { Initiative, Phase, Plan, Task, Agent, Message } from '../../../src/db/schema.js'; export type { PendingQuestions, QuestionItem } from '../../../src/agent/types.js'; + +/** + * Shape of events received from tRPC subscription streams. + * Used by the frontend in onData callbacks. + */ +export interface SubscriptionEvent { + id: string; + type: string; + payload: unknown; + timestamp: string; +}