Files
oh-my-openagent/dist/tools/background-task/clients.d.ts
2026-03-14 04:56:50 +00:00

46 lines
1.1 KiB
TypeScript

import type { BackgroundManager } from "../../features/background-agent";
export type BackgroundOutputMessage = {
id?: string;
info?: {
role?: string;
time?: string | {
created?: number;
};
agent?: string;
};
parts?: Array<{
type?: string;
text?: string;
thinking?: string;
content?: string | Array<{
type: string;
text?: string;
}>;
output?: string;
name?: string;
}>;
};
export type BackgroundOutputMessagesResult = {
data?: BackgroundOutputMessage[];
error?: unknown;
} | BackgroundOutputMessage[];
export type BackgroundOutputClient = {
session: {
messages: (args: {
path: {
id: string;
};
}) => Promise<BackgroundOutputMessagesResult>;
};
};
export type BackgroundCancelClient = {
session: {
abort: (args: {
path: {
id: string;
};
}) => Promise<unknown>;
};
};
export type BackgroundOutputManager = Pick<BackgroundManager, "getTask">;