79054ea3e5
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
33 lines
889 B
TypeScript
33 lines
889 B
TypeScript
import type { BackgroundManager } from "../../features/background-agent"
|
|
|
|
export type BackgroundOutputMessage = {
|
|
id?: string
|
|
info?: { role?: string; time?: string | { created?: number }; agent?: string; error?: unknown }
|
|
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">
|