export interface ToolColumn { key: string; label: string; } export interface ToolPagination { offset: number; limit: number; total: number; hasMore?: boolean; } export type ToolPresentation = "table" | "compact_card" | "full_card"; export interface ToolDataBlock { kind: "table" | "record" | "list" | "none"; presentation?: ToolPresentation; title?: string; columns?: ToolColumn[]; rows?: Array>; record?: Record; items?: unknown[]; pagination?: ToolPagination; } export interface ToolEntityAction { label: string; tool: string; args: Record; style?: "primary" | "secondary"; } export interface ToolEntityRef { type: string; id: string | number; } export interface ToolEntity extends ToolEntityRef { label?: string; fields?: Record; actions?: ToolEntityAction[]; } export interface ToolContextBlock { summary: string; metrics?: Record; entities?: ToolEntity[]; primaryEntity?: ToolEntityRef; highlights?: string[]; suggestedQueries?: string[]; fields?: string[]; warnings?: string[]; } export interface ToolResolutionBlock { scope: "all" | "top_level" | "children_of_parent"; resolvedParentId?: number | null; resolvedParentName?: string | null; resolvedParentPath?: string | null; } export interface ToolInteractionAction { type: "button"; label: string; template?: string; tool?: string; args?: Record; argsFromRow?: Record; style?: "primary" | "secondary"; } export interface ToolRowInteractionsBlock { mode: "row_actions"; prompt?: string; submitAs?: "user_message" | "assistant_context"; rowKey?: string; rowLabelFields?: string[]; rowActions: ToolInteractionAction[]; } export interface ToolActionInteractionsBlock { mode: "tool_actions"; prompt?: string; submitAs?: "user_message" | "assistant_context"; actions: ToolInteractionAction[]; } export type ToolInteractionsBlock = ToolRowInteractionsBlock | ToolActionInteractionsBlock; export interface ToolMetaBlock { tool: string; title: string; generatedAt: string; resultCount?: number; entity?: string; entityId?: string | number; } export interface ToolErrorBlock { code: string; message: string; kind: "permission" | "validation" | "not_found" | "capability" | "upstream" | "unknown"; canRetry: boolean; actionRequired?: string; } export interface ToolResponse { ok: boolean; meta?: ToolMetaBlock; data: ToolDataBlock; context: ToolContextBlock; resolution?: ToolResolutionBlock; interactions?: ToolInteractionsBlock; error?: string | ToolErrorBlock; } export declare function buildToolResponse(input: { ok?: boolean; meta?: Omit & { generatedAt?: string; }; data: ToolDataBlock; context: ToolContextBlock; resolution?: ToolResolutionBlock; interactions?: ToolInteractionsBlock; error?: string | ToolErrorBlock; }): ToolResponse; export declare function buildToolErrorResponse(input: { error: string | ToolErrorBlock; summary: string; meta?: Omit & { generatedAt?: string; }; highlights?: string[]; suggestedQueries?: string[]; warnings?: string[]; interactions?: ToolInteractionsBlock; }): ToolResponse; //# sourceMappingURL=response-types.d.ts.map