import { Signal, Type } from "@angular/core"; import { FrontendTool, FrontendToolHandlerContext } from "@copilotkit/core"; import type { StandardSchemaV1 } from "@copilotkit/shared"; export type AngularToolCall = Record> = { args: Partial; status: "in-progress"; result: undefined; } | { args: Args; status: "executing"; result: undefined; } | { args: Args; status: "complete"; result: string; }; export type HumanInTheLoopToolCall = Record> = { args: Partial; status: "in-progress"; result: undefined; respond: (result: unknown) => void; } | { args: Args; status: "executing"; result: undefined; respond: (result: unknown) => void; } | { args: Args; status: "complete"; result: string; respond: (result: unknown) => void; }; export interface ToolRenderer = Record> { toolCall: Signal>; } export interface HumanInTheLoopToolRenderer = Record> { toolCall: Signal>; } export type ClientTool = Record> = Omit, "handler"> & { renderer?: Type>; }; export interface RenderToolCallConfig = Record> { name: string; args: StandardSchemaV1; component: Type>; agentId?: string; } export interface FrontendToolConfig = Record> { name: string; description: string; parameters: StandardSchemaV1; component?: Type>; handler: (args: Args, context: FrontendToolHandlerContext) => Promise; agentId?: string; } export interface HumanInTheLoopConfig = Record> { name: string; description: string; parameters: StandardSchemaV1; component: Type>; agentId?: string; } export declare function registerRenderToolCall = Record>(renderToolCall: RenderToolCallConfig): void; export declare function registerFrontendTool = Record>(frontendTool: FrontendToolConfig): void; export declare function registerHumanInTheLoop = Record>(humanInTheLoop: HumanInTheLoopConfig): void;