@threadplane/ag-uiTypeAliasv0.3.7

ClientToolCall

One call to a client tool the session runs, with its typed arguments and result, how far it has run and whether the backend has its result.

import type { ClientToolCall } from '@threadplane/ag-ui';

Declaration

export type ClientToolCall<C extends Record<string, ToolContract>> = {
    [K in keyof C & string]: {
        readonly name: K;
        readonly callId: string;
        readonly assistantMessageId: string;
        readonly sourceRunId: string;
        readonly rawArguments: string;
        readonly args?: DeepReadonly<C[K]['args']>;
        readonly result?: DeepReadonly<C[K]['result']>;
        readonly error?: string;
        readonly status: 'pending' | 'running' | 'complete' | 'error' | 'cancelled';
        readonly delivery: 'unsent' | 'sent-unconfirmed' | 'observed';
        readonly provenance: 'local';
    };
}[keyof C & string];

Type parameters

C
Record<string, ToolContract>