import type { StateSubject } from '../schemas/states'; import { type SubmitToolRunArgs } from '../tool-runs'; import type { Transport } from './transport'; export interface RunToolArgs { readonly tool: string; readonly kwargs?: Record; /** The addressed subject an async park of this run indexes under. Omitted from * the request body when unset, so a plain run (no subject) parks un-indexed. */ readonly subject?: StateSubject; } /** * Identify one app tool for a live-registry op (`POST /api/tools/reload`, * `POST /api/tools/remove`): its `kind` (the reloader kind a plugin registered, * e.g. `example_tool`) and `name`. `targets` optionally restricts the fleet * fan-out to specific workers; omit it to reach every worker. */ export interface ToolAdminArgs { readonly kind: string; readonly name: string; readonly targets?: string[]; } export declare function toolsClient(t: Transport): { listTools: (signal?: AbortSignal) => Promise; getToolSchema: (name: string, signal?: AbortSignal) => Promise<{ input: Record; output: Record | null; description: string | null; }>; getAllToolSchemas: (signal?: AbortSignal) => Promise; output: Record | null; description: string | null; }>>; runTool: (args: RunToolArgs, signal?: AbortSignal) => Promise; reloadTool: (args: ToolAdminArgs) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; removeTool: (args: ToolAdminArgs) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; submitToolRun: (args: SubmitToolRunArgs, signal?: AbortSignal) => Promise<{ run_id: string; }>; getToolRun: (runId: string, signal?: AbortSignal) => Promise<{ run_id: string; tool_name: string; status: "running" | "failed" | "parked" | "succeeded" | "lost"; started_at: string; finished_at?: string | undefined; result?: unknown; error?: string | undefined; resumed_interactions?: string[] | undefined; }>; listToolRuns: (toolName: string, signal?: AbortSignal) => Promise<{ run_id: string; tool_name: string; status: "running" | "failed" | "parked" | "succeeded" | "lost"; started_at: string; finished_at?: string | undefined; }[]>; listToolTags: (signal?: AbortSignal) => Promise<{ name: string; tags: string[]; badges: string[]; hidden: boolean; }[]>; }; //# sourceMappingURL=tools-client.d.ts.map