eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
22 lines (21 loc) • 1.11 kB
TypeScript
import type { ChannelAdapter } from "#channel/adapter.js";
import type { ActivitySnapshotV1 } from "#protocol/activity.js";
export interface ChannelActivityRenderer {
readonly id: string;
render(input: {
readonly destination: Readonly<Record<string, unknown>>;
readonly snapshot: ActivitySnapshotV1;
readonly state: unknown;
}): Promise<unknown>;
dispose?(input: {
readonly destination: Readonly<Record<string, unknown>>;
readonly state: unknown;
}): Promise<void>;
}
export interface ChannelActivityPresentation {
readonly destination: (state: Record<string, unknown> | undefined) => Readonly<Record<string, unknown>>;
readonly renderers: readonly ChannelActivityRenderer[];
}
export declare function attachChannelActivityPresentation(adapter: ChannelAdapter, presentation: ChannelActivityPresentation): void;
export declare function copyChannelActivityPresentation(source: ChannelAdapter, target: ChannelAdapter): void;
export declare function getChannelActivityPresentation(adapter: ChannelAdapter): ChannelActivityPresentation | undefined;