/** * `useApi` — the typed client, provided through an SDK-owned React context. * * SDK boundary invariant: this context lives INSIDE the shared module set * (the SDK is a shared singleton across the plugin boundary), so a plugin calling * `useApi()` reaches the SAME client the shell built. It must NEVER wrap a * TanStack Query/Router context (those are deliberately NOT shared) — it stays a * plain typed client. The `ApiClient` type is imported type-only, so there is no * runtime dependency on @tai42/api-client (the SDK imports nothing internal at * runtime). */ import type { ApiClient } from '@tai42/api-client'; export declare const ApiProvider: import("react").Provider<{ readonly streamInteractions: (signal?: AbortSignal, lastEventId?: string) => Promise>; readonly getHealth: (signal?: AbortSignal) => Promise; readonly getSystemKinds: (signal?: AbortSignal) => Promise<{ detail: string; kind: string; plugin: string | null; state: "default" | "active" | "off"; }[]>; readonly searchMarketplace: (query?: import("@tai42/api-client").MarketplaceSearchQuery, signal?: AbortSignal) => Promise<{ listings: { ref: string; namespace: string; name: string; display_name: string | null; icon_url: string | null; package: string | null; description: string; categories: string[]; tags: string[]; trust_tier: string; pricing: string; latest_version: string | null; downloads: number; updated_at: string; kinds: { kind: string; count: number; names: string[]; }[]; groups: { name: string; count: number; }[]; premium?: boolean | null | undefined; }[]; total: number; page: number; page_size: number; }>; readonly getMarketplacePlugin: (namespace: string, name: string, signal?: AbortSignal) => Promise<{ namespace: string; name: string; display_name: string | null; icon_url: string | null; package: string | null; description: string; readme_md: string | null; license: string | null; homepage_url: string | null; repository_url: string | null; categories: string[]; tags: string[]; trust_tier: string; pricing: string; downloads: number; latest: { version: string; contract_range: string | null; status: string; published_at: string | null; items: { kind: string; name: string; description: string; tags: string[]; group: string | null; routes?: { base: string; paths: { path: string; methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[]; public: boolean; }[]; } | null | undefined; required_env?: { name: string; secret: boolean; }[] | undefined; }[]; } | null; versions: { version: string; contract_range: string | null; status: string; published_at: string | null; }[]; source?: "pypi" | "github" | "spec" | null | undefined; docs_url?: string | null | undefined; premium?: boolean | null | undefined; }>; readonly listMarketplaceCategories: (signal?: AbortSignal) => Promise; readonly listMarketplaceKinds: (signal?: AbortSignal) => Promise; readonly listInstalledMarketplacePlugins: (signal?: AbortSignal) => Promise<{ installed: { compat: { reason: string | null; status: "unknown" | "compatible" | "incompatible"; }; delivery: "package" | "descriptor"; incompatible_newer: string | null; installed_at: string; items: { kind: string; name: string; }[]; latest: string | null; missing_upstream: boolean; ref: string; route_mounts: Record; source: string; update_available: boolean; version: string; }[]; }>; readonly previewMarketplaceInstall: (body: import("@tai42/api-client").MarketplaceInstallPreviewBody, signal?: AbortSignal) => Promise<{ collisions: { conflict_owner: string; conflict_path: string; full_path: string; item: string; methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[]; }[]; delivery: "package" | "descriptor"; items: { base: string; default_base: string; item: string; kind: string; routes: { full_path: string; methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[]; path: string; public: boolean; }[]; }[]; missing_env: string[]; new_public_routes: { full_path: string; item: string; methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[]; }[]; public_routes: { full_path: string; item: string; methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[]; }[]; ref: string; required_env: { name: string; secret: boolean; }[]; requires_public_acceptance: boolean; version: string; }>; readonly installMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceInstallBody) => Promise<{ notes: string[]; package: string | null; pip_output: string | null; ref: string; reload: { awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; }; routes: { full_path: string; item: string; methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[]; public: boolean; }[]; version: string; advisories: { id: number; listing: string; affected_versions: string; severity: string; summary: string; created_at: string; withdrawn_at: string | null; }[]; }>; readonly uninstallMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceUninstallBody) => Promise<{ notes: string[]; ref: string; reload: { awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; } | null; uninstalled: boolean; }>; readonly updateMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceInstallBody) => Promise<{ notes: string[]; package: string | null; pip_output: string | null; ref: string; reload: { awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; }; routes: { full_path: string; item: string; methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[]; public: boolean; }[]; version: string; advisories: { id: number; listing: string; affected_versions: string; severity: string; summary: string; created_at: string; withdrawn_at: string | null; }[]; }>; readonly upgradeAllMarketplacePlugins: () => Promise<{ results: { detail: string; outcome: "failed" | "upgraded" | "up-to-date" | "no-compatible-version"; ref: string; }[]; }>; readonly getMarketplaceAdvisories: (signal?: AbortSignal) => Promise<{ fetched_at: string; advisories: { id: number; listing: string; affected_versions: string; severity: string; summary: string; created_at: string; withdrawn_at: string | null; }[]; }>; readonly getObservabilityMetrics: (params?: import("@tai42/api-client").MetricsQuery, signal?: AbortSignal) => Promise<{ byModel: { avgLatencyMs: number; calls: number; cost: number; model: string; totalTokens: number; }[]; byModelAvailable: boolean; granularity: "hour" | "day" | "week"; summary: { averageLatencyMs: number; avgCostPerRun: number; avgTokensPerRun: number; timeToFirstTokenMs: number | null; totalCost: number; totalRuns: number; totalTokens: number; }; timeSeries: { avgLatencyMs: number; bucket: string | null; cost: number; runs: number; totalTokens: number; }[]; }>; readonly listRuns: (params?: import("@tai42/api-client").RunsQuery, signal?: AbortSignal) => Promise<{ items: { cost: number | null; createdAt: string | null; id: string; inputPreview: unknown; latencyMs: number | null; outputPreview: unknown; status: "error" | "success"; tags: string[]; totalTokens: number | null; traceId: string; }[]; nextPage: number | null; page: number; }>; readonly getObservabilityCapabilities: (signal?: AbortSignal) => Promise<{ incompatibleFilters: Record; metrics: { dimensions: string[]; measures: string[]; }; pageSizeMax: number; sortKeys: ("totalTokens" | "cost" | "createdAt" | "latencyMs")[]; }>; readonly getRunTrace: (traceId: string, signal?: AbortSignal) => Promise<{ input: unknown; metadata: unknown; output: unknown; spans: { end: string | null; id: string; input: unknown; inputTokens: number | null; kind: "LLM" | "TOOL" | "CHAIN" | "EVENT" | null; level: string | null; metadata: unknown; model: string | null; name: string | null; output: unknown; outputTokens: number | null; parentId: string | null; start: string | null; statusMessage: string | null; totalTokens: number | null; traceId: string | null; }[]; tags: string[]; timestamp: string | null; totalCost: number | null; traceId: string; }>; readonly getRunTraceOutline: (traceId: string, signal?: AbortSignal) => Promise<{ spans: { end: string | null; id: string; inputTokens: number | null; kind: "LLM" | "TOOL" | "CHAIN" | "EVENT" | null; level: string | null; metadata: unknown; model: string | null; name: string | null; outputTokens: number | null; parentId: string | null; start: string | null; statusMessage: string | null; totalTokens: number | null; traceId: string | null; }[]; traceId: string; }>; readonly getResolvedSpanValue: (traceId: string, spanId: string, field: "input" | "output", options?: { readonly pointer?: string; }, signal?: AbortSignal) => Promise<{ field: "output" | "input"; pointer: string; spanId: string; traceId: string; value: unknown; }>; readonly exportTrace: (traceId: string, options?: { readonly resolve?: boolean; }, signal?: AbortSignal) => Promise; readonly exportRuns: (params: import("@tai42/api-client").RunsQuery & { format: "csv" | "json"; }, signal?: AbortSignal) => Promise; readonly listSchedules: (signal?: AbortSignal) => Promise<{ cadence: { day_of_month: string; day_of_week: string; hour: string; kind: "crontab"; minute: string; month_of_year: string; } | { every: number; kind: "interval"; relative: boolean; }; enabled: boolean; error: { at_iso: string | null; message: string; } | null; name: string; next_run_at_iso: string | null; next_run_at_ts: number | null; tool: string; }[]>; readonly getServerDateTime: (signal?: AbortSignal) => Promise<{ [x: string]: unknown; utc: unknown; local?: unknown; system?: unknown; }>; readonly addSchedule: (body: import("@tai42/api-client").ScheduleCreate) => Promise; readonly deleteSchedule: (name: string) => Promise; readonly listBackupSections: (signal?: AbortSignal) => Promise<{ name: string; secret: boolean; }[]>; readonly exportBackup: (sections: string[], signal?: AbortSignal) => Promise; readonly importBackup: (body: { document: unknown; sections: string[]; }) => Promise<{ ok: boolean; sections: Record; }>; readonly validateCondition: (body: import("@tai42/api-client").ValidateConditionBody) => Promise<{ ok: boolean; result: boolean | null; }>; readonly listPolicyVersions: (userId: string, signal?: AbortSignal) => Promise<{ created_at: string; is_current: boolean; tags: string[]; version: number; body: { condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; policy_data: Record; scopes: string[]; }; }[]>; readonly rollbackPolicy: (userId: string, version: number) => Promise<{ active_version: number; user_id: string; }>; readonly logout: () => Promise<{ revoked: boolean; }>; readonly getAuthCapabilities: (signal?: AbortSignal) => Promise<{ mintable: boolean; providers: { mintable: boolean; name: string; }[]; }>; readonly getLoginMethods: (options?: { signal?: AbortSignal; }) => Promise<{ claim_fragment_key: string; methods: ({ href: string; icon: string | null; id: string; label: string; shape: "button"; } | { fields: { autocomplete: string | null; label: string; name: string; secret: boolean; }[]; id: string; purpose: "login" | "invite"; shape: "form"; submit_path: string; title: string; })[]; needs_setup: boolean; setup_login: { kinds: ("invite" | "password")[]; } | null; }>; readonly submitLoginForm: (path: string, values: Record) => Promise<{ token: string; user_id: string; }>; readonly exchangeSsoCode: (code: string) => Promise<{ token: string; user_id: string; }>; readonly claimLogin: (body: { token: string; }) => Promise<{ token: string; user_id: string; }>; readonly submitSetup: (body: import("@tai42/api-client").SetupBody) => Promise<{ api_key: string; invite_token: string | null; key_fingerprint: string; key_user_id: string; login_attached: boolean; login_path: string | null; owner_user_id: string; }>; readonly getMe: (signal?: AbortSignal) => Promise<{ admin: boolean; agents: string[]; mintable: boolean; owner_user_id: string | null; principal: { display_name: string; kind: "human" | "service"; user_id: string; } | null; public_resource_id: string; route_patterns: { open_prefix: string | null; pattern: string; scope_id: string; }[]; routes: { methods: string[]; path: string; }[]; scopes: string[]; sub_mcp: { access_pattern: string; mount_url: string; slug: string; tools: string[]; transport: string; }[]; tools: string[]; user_id: string; }>; readonly listPrincipals: (signal?: AbortSignal) => Promise<{ created_at: string; created_by: string | null; disabled: boolean; display_name: string; kind: "human" | "service"; user_id: string; }[]>; readonly createPrincipal: (body: { user_id?: string; kind: import("@tai42/api-client").PrincipalKind; display_name: string; role: string; }) => Promise<{ created_at: string; created_by: string | null; disabled: boolean; display_name: string; kind: "human" | "service"; user_id: string; }>; readonly updatePrincipal: (userId: string, body: { display_name?: string; disabled?: boolean; }) => Promise<{ created_at: string; created_by: string | null; disabled: boolean; display_name: string; kind: "human" | "service"; user_id: string; }>; readonly deletePrincipal: (userId: string) => Promise<{ deleted: boolean; user_id: string; }>; readonly listTokensPayload: (signal?: AbortSignal) => Promise<{ condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; description: string; orphaned: boolean; policy_data: Record | null; principal: { display_name: string; kind: "human" | "service"; user_id: string; } | null; scopes: string[] | null; user_id: string; }[]>; readonly createApiKey: (body: import("@tai42/api-client").ApiKeyBody) => Promise; readonly editApiKey: (userId: string, body: Omit) => Promise<{ updated: boolean; user_id: string; }>; readonly revokeApiKey: (userId: string) => Promise<{ revoked: boolean; user_id: string; }>; readonly createClaimLink: (body: import("@tai42/api-client").ClaimLinkBody) => Promise<{ claim_path: string; expires_at: string; token: string; }>; readonly listMembers: (signal?: AbortSignal) => Promise<{ invites: { action_keys: string[]; created_at: string; email: string; expires_at: string; handle: string; id: string; role: string | null; }[]; members: { action_keys: string[]; created_at: string; disabled: boolean; email: string; handle: string; id: string; principals: { disabled: boolean; role: string | null; user_id: string; }[]; role: string | null; }[]; }>; readonly listMemberActions: (signal?: AbortSignal) => Promise<{ actions: { destructive: boolean; input_schema: Record; key: string; label: string; result_schema: Record; scope: "page" | "member_row" | "invite_row"; }[]; }>; readonly invokeMemberAction: (body: import("../../../api-client/dist/client/auth-client").InvokeMemberActionBody) => Promise<{ result: Record; }>; readonly listRoles: (signal?: AbortSignal) => Promise<{ allow_all: boolean; base_tier: string | null; condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; description: string; grants: Record; name: string; scopes: string[]; }[]>; readonly createRole: (body: import("@tai42/api-client").RoleCreateBody) => Promise<{ allow_all: boolean; base_tier: string | null; condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; description: string; grants: Record; name: string; scopes: string[]; }>; readonly updateRole: (name: string, body: import("@tai42/api-client").RoleUpdateBody) => Promise<{ allow_all: boolean; base_tier: string | null; condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; description: string; grants: Record; name: string; scopes: string[]; }>; readonly deleteRole: (name: string) => Promise<{ deleted: boolean; name: string; }>; readonly listRoleVersions: (name: string, signal?: AbortSignal) => Promise<{ versions: { created_at: string; is_current: boolean; tags: string[]; version: number; body: { allow_all: boolean; base_tier: string | null; condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; description: string; grants: Record; name: string; scopes: string[]; }; }[]; audit: { created_at: string; is_current: boolean; tags: string[]; version: number; body: { action: string; actor: string | null; before: unknown; after: unknown; }; }[]; }>; readonly rollbackRole: (name: string, version: number) => Promise<{ allow_all: boolean; base_tier: string | null; condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; description: string; grants: Record; name: string; scopes: string[]; }>; readonly listScopes: (signal?: AbortSignal) => Promise>; readonly addUrlToScope: (body: import("@tai42/api-client").AddUrlToScopeBody) => Promise<{ scope_id: string; url: string; }>; readonly removeUrlFromScope: (body: { url: string; }) => Promise<{ url: string; }>; readonly removeScope: (scopeId: string) => Promise<{ deleted_keys: number; scope_id: string; }>; readonly listAuthRoutes: (signal?: AbortSignal) => Promise<{ action: "read" | "write" | "secret" | "fenced" | null; declared_public: boolean; mapped: string | null; methods: string[]; path: string; summary: string; tags: string[]; }[]>; readonly listPublicRoutes: (signal?: AbortSignal) => Promise; readonly pinRoutePublic: (body: import("@tai42/api-client").PinRoutePublicBody) => Promise<{ url: string; }>; readonly unpinPublicRoute: (url: string) => Promise<{ url: string; }>; readonly getSettingsSchema: (signal?: AbortSignal) => Promise<{ groups: { module: string; name: string; qualname: string; fields: { name: string; env_var: string; type: string; default: unknown; required: boolean; secret: boolean; description: string | null; nested_group: string | null; default_namespace_var: string | null; value: unknown; }[]; }[]; }>; readonly getMcpConfigSchema: (signal?: AbortSignal) => Promise>; readonly createTriggerLink: (body: import("@tai42/api-client").TriggerLinkCreateBody) => Promise<{ expires_at: string | null; name: string; token: string; topic: string; trigger_path: string; }>; readonly listTriggerLinks: (signal?: AbortSignal) => Promise<{ items: { created_at: string; created_by: string | null; execution_key: string; execution_key_fingerprint: string; expires_at: string | null; name: string; require_api_key: boolean; token_hash_prefix: string; tool_kwargs: Record | null; topic: string; trigger_auth: "token" | "public" | "verifier" | "token+api_key" | "out-of-service"; }[]; total: number; }>; readonly deleteTriggerLink: (name: string) => Promise<{ name: string; removed: boolean; }>; readonly listHooks: (topic?: string, signal?: AbortSignal) => Promise<{ items: { cancel_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; execution_key: string; execution_key_fingerprint: string; extras_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; name: string; resume_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; start_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; subject: { key_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; kind: string; target_kind: "tool" | "agent"; target_name: string; } | null; tool: string; tool_kwargs: Record; topic: string; }[]; total: number; trigger_auth: Record; topic_verifiers: Record; }>; }>; readonly registerHook: (params: import("@tai42/api-client").HookRegister) => Promise<{ name: string; registered: boolean; }>; readonly unregisterHook: (name: string) => Promise<{ name: string; removed: boolean; }>; readonly listHookVerifiers: (signal?: AbortSignal) => Promise; readonly setTopicVerifier: (topic: string, body: import("@tai42/api-client").TopicVerifierBody) => Promise<{ topic: string; verifier: string; }>; readonly deleteTopicVerifier: (topic: string) => Promise<{ removed: boolean; topic: string; }>; readonly listAgents: (signal?: AbortSignal) => Promise<{ items: { name: string; description: string; tool_name: string; input_schema: Record; spec_runnable: boolean; }[]; total: number; }>; readonly listSpecRunnableAgents: (signal?: AbortSignal) => Promise<{ items: { name: string; description: string; tool_name: string; input_schema: Record; spec_runnable: boolean; }[]; total: number; }>; readonly streamAgentRun: (name: string, input: unknown, signal?: AbortSignal) => Promise>; readonly streamAuthoredAgentRun: (name: string, input: unknown, signal?: AbortSignal) => Promise>; readonly listNotifications: (signal?: AbortSignal) => Promise<{ notifications: { audience: string | null; created_at: string; footer: string | null; header: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; } | null; id: string; location: { address: string | null; latitude: number; longitude: number; name: string | null; } | null; media: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; message: string; options: ({ kind: "link"; label: string; url: string; } | { description: string | null; id: string | null; kind: "reply"; text: string; })[] | null; recipient: string | null; schema: unknown; sections: { rows: { description: string | null; id: string | null; kind: "reply"; text: string; }[]; title: string; }[] | null; template: { language: string; name: string; parameters: Record | null; } | null; }[]; }>; readonly listConversationRoutes: (signal?: AbortSignal) => Promise<{ items: ({ callback_url: string | null; cancel_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; channel: null; door: "api"; error_reply_text: string | null; execution_key: string; execution_key_fingerprint: string; extras_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; initial_mode: "agent" | "manual"; locale: string | null; our_identity: null; overlap: { deliver: "one" | "all"; running: "continue" | "cancel"; settle_seconds: number; }; reply_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; resume_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; route_name: string; start_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; target_kind: "tool" | "agent"; target_name: string; turns_per_hour_override: number | null; } | { callback_url: null; cancel_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; channel: string; door: "channel"; error_reply_text: string | null; execution_key: string; execution_key_fingerprint: string; extras_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; initial_mode: "agent" | "manual"; locale: string | null; our_identity: string; overlap: { deliver: "one" | "all"; running: "continue" | "cancel"; settle_seconds: number; }; reply_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; resume_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; route_name: string; start_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; target_kind: "tool" | "agent"; target_name: string; turns_per_hour_override: number | null; })[]; total: number; unreadable: number; }>; readonly createOrReplaceConversationRoute: (route: import("@tai42/api-client").ConversationRouteCreate) => Promise<{ callback_secret: string | null; created: boolean; route: { callback_url: string | null; cancel_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; channel: null; door: "api"; error_reply_text: string | null; execution_key: string; execution_key_fingerprint: string; extras_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; initial_mode: "agent" | "manual"; locale: string | null; our_identity: null; overlap: { deliver: "one" | "all"; running: "continue" | "cancel"; settle_seconds: number; }; reply_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; resume_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; route_name: string; start_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; target_kind: "tool" | "agent"; target_name: string; turns_per_hour_override: number | null; } | { callback_url: null; cancel_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; channel: string; door: "channel"; error_reply_text: string | null; execution_key: string; execution_key_fingerprint: string; extras_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; initial_mode: "agent" | "manual"; locale: string | null; our_identity: string; overlap: { deliver: "one" | "all"; running: "continue" | "cancel"; settle_seconds: number; }; reply_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; resume_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; route_name: string; start_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; target_kind: "tool" | "agent"; target_name: string; turns_per_hour_override: number | null; }; route_name: string; }>; readonly deleteConversationRoute: (routeName: string) => Promise<{ removed: boolean; route_name: string; }>; readonly listConversationThreads: (routeName: string, page: number, pageSize: number, filters?: import("@tai42/api-client").ConversationThreadFilters, signal?: AbortSignal) => Promise<{ items: { client_address: string; last_activity_at: number; last_delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed"; message_count: number; thread_id: string; }[]; next_page: number | null; page: number; page_size: number; total: number; truncated: boolean; unreadable: number; }>; readonly readConversationTranscript: (query: import("@tai42/api-client").ConversationTranscriptQuery, signal?: AbortSignal) => Promise<{ items: { answer: string | null; answer_parts: { data: { options: Record; values: Record; } | null; footer: string | null; form_tag: string | null; header: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; } | null; location: { address: string | null; latitude: number; longitude: number; name: string | null; } | null; media: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; message: string; options: ({ kind: "link"; label: string; url: string; } | { description: string | null; id: string | null; kind: "reply"; text: string; })[] | null; pages: { button_label: string | null; display: { alt: string | null; kind: "heading" | "body" | "image"; slot: string | null; src: string | null; text: string | null; }[]; fields: string[]; kind: "input" | "review"; title: string; }[] | null; schema: Record | null; sections: { rows: { description: string | null; id: string | null; kind: "reply"; text: string; }[]; title: string; }[] | null; template: { language: string; name: string; parameters: Record | null; } | null; wording: { answer: { confirm: string | null; decline: string | null; open: string | null; rejected: string | null; rejected_final: string | null; reply_hint: string | null; submit: string | null; } | null; answer_page: { awaiting: { heading: string | null; text: string | null; } | null; confirm: { heading: string | null; text: string | null; } | null; done: { heading: string | null; text: string | null; } | null; form: { choose_one: string | null; date_unavailable: string | null; failed: string | null; network_error: string | null; update_failed: string | null; } | null; submitted: { heading: string | null; text: string | null; } | null; } | null; choice: { group_label: string | null; label: string | null; reply_hint: string | null; } | null; form: { back: string | null; cancel: string | null; fields: Record; open: string | null; review_empty: string | null; submit: string | null; title: string | null; } | null; lines: { answer_link: string | null; deadline: string | null; options: string | null; reply: string | null; } | null; status: { answered: string | null; closed: string | null; countdown: { one_second_left: string | null; seconds_left: string | null; under_half_minute: string | null; under_minute: string | null; under_ten_seconds: string | null; } | null; expired: string | null; sending: string | null; sent: string | null; unavailable: string | null; } | null; } | null; }[] | null; answer_status: "error" | "superseded" | "answered" | "silent" | "merged" | null; attempts: number | null; callback_url: string | null; caller_principal: string | null; channel: string | null; client_address: string; created_at: number; delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed"; door: "channel" | "api"; error: string | null; inbound_attachments: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; inbound_event: Record | null; inbound_form: Record | null; inbound_form_tag: string | null; inbound_kind: "message" | "event"; inbound_locale: string | null; inbound_location: { address: string | null; latitude: number; longitude: number; name: string | null; } | null; inbound_text: string; message_id: string; operator_send: boolean; origin: "operator" | "client"; our_identity: string | null; outbound_message_ids: string[] | null; pending_receipt: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | null; provider_message_id: string | null; route_missing: boolean; route_name: string; submitted_by: string | null; successor_id: string | null; thread_id: string; updated_at: number; }[]; next_page: number | null; order: "asc" | "desc"; page: number; page_size: number; person_id: string | null; total: number; truncated: boolean; unreadable: number; }>; readonly searchConversationMessages: (query: import("@tai42/api-client").ConversationMessageSearchQuery, signal?: AbortSignal) => Promise<{ items: { answer: string | null; answer_parts: { data: { options: Record; values: Record; } | null; footer: string | null; form_tag: string | null; header: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; } | null; location: { address: string | null; latitude: number; longitude: number; name: string | null; } | null; media: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; message: string; options: ({ kind: "link"; label: string; url: string; } | { description: string | null; id: string | null; kind: "reply"; text: string; })[] | null; pages: { button_label: string | null; display: { alt: string | null; kind: "heading" | "body" | "image"; slot: string | null; src: string | null; text: string | null; }[]; fields: string[]; kind: "input" | "review"; title: string; }[] | null; schema: Record | null; sections: { rows: { description: string | null; id: string | null; kind: "reply"; text: string; }[]; title: string; }[] | null; template: { language: string; name: string; parameters: Record | null; } | null; wording: { answer: { confirm: string | null; decline: string | null; open: string | null; rejected: string | null; rejected_final: string | null; reply_hint: string | null; submit: string | null; } | null; answer_page: { awaiting: { heading: string | null; text: string | null; } | null; confirm: { heading: string | null; text: string | null; } | null; done: { heading: string | null; text: string | null; } | null; form: { choose_one: string | null; date_unavailable: string | null; failed: string | null; network_error: string | null; update_failed: string | null; } | null; submitted: { heading: string | null; text: string | null; } | null; } | null; choice: { group_label: string | null; label: string | null; reply_hint: string | null; } | null; form: { back: string | null; cancel: string | null; fields: Record; open: string | null; review_empty: string | null; submit: string | null; title: string | null; } | null; lines: { answer_link: string | null; deadline: string | null; options: string | null; reply: string | null; } | null; status: { answered: string | null; closed: string | null; countdown: { one_second_left: string | null; seconds_left: string | null; under_half_minute: string | null; under_minute: string | null; under_ten_seconds: string | null; } | null; expired: string | null; sending: string | null; sent: string | null; unavailable: string | null; } | null; } | null; }[] | null; answer_status: "error" | "superseded" | "answered" | "silent" | "merged" | null; attempts: number | null; callback_url: string | null; caller_principal: string | null; channel: string | null; client_address: string; created_at: number; delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed"; door: "channel" | "api"; error: string | null; inbound_attachments: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; inbound_event: Record | null; inbound_form: Record | null; inbound_form_tag: string | null; inbound_kind: "message" | "event"; inbound_locale: string | null; inbound_location: { address: string | null; latitude: number; longitude: number; name: string | null; } | null; inbound_text: string; message_id: string; operator_send: boolean; origin: "operator" | "client"; our_identity: string | null; outbound_message_ids: string[] | null; pending_receipt: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | null; provider_message_id: string | null; route_missing: boolean; route_name: string; submitted_by: string | null; successor_id: string | null; thread_id: string; updated_at: number; }[]; next_page: number | null; page: number; page_size: number; total: number; truncated: boolean; unreadable: number; }>; readonly sendConversationThreadMessage: (routeName: string, body: import("@tai42/api-client").ConversationThreadMessageBody) => Promise<{ message_id: string; thread_id: string; }>; readonly getConversationThreadMode: (routeName: string, threadId: string, signal?: AbortSignal) => Promise<{ mode: "agent" | "manual"; source: "route" | "thread"; }>; readonly setConversationThreadMode: (routeName: string, threadId: string, mode: import("@tai42/api-client").ConversationThreadMode) => Promise<{ mode: "agent" | "manual"; source: "route" | "thread"; }>; readonly listConversationConfigs: (signal?: AbortSignal) => Promise<{ items: { greeting_template: string | null; multichannel: boolean; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; target_kind: "tool" | "agent"; target_name: string; }[]; total: number; unreadable: number; }>; readonly getConversationConfig: (targetKind: import("@tai42/api-client").ConversationTargetKind, targetName: string, signal?: AbortSignal) => Promise<{ greeting_template: string | null; multichannel: boolean; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; target_kind: "tool" | "agent"; target_name: string; }>; readonly setConversationConfig: (config: import("@tai42/api-client").TargetConversationConfig) => Promise<{ config: { greeting_template: string | null; multichannel: boolean; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; target_kind: "tool" | "agent"; target_name: string; }; created: boolean; target_kind: "tool" | "agent"; target_name: string; }>; readonly deleteConversationConfig: (targetKind: import("@tai42/api-client").ConversationTargetKind, targetName: string) => Promise<{ removed: boolean; target_kind: "tool" | "agent"; target_name: string; }>; readonly listFailedConversationMessages: (signal?: AbortSignal) => Promise<{ items: { answer: string | null; answer_parts: { data: { options: Record; values: Record; } | null; footer: string | null; form_tag: string | null; header: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; } | null; location: { address: string | null; latitude: number; longitude: number; name: string | null; } | null; media: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; message: string; options: ({ kind: "link"; label: string; url: string; } | { description: string | null; id: string | null; kind: "reply"; text: string; })[] | null; pages: { button_label: string | null; display: { alt: string | null; kind: "heading" | "body" | "image"; slot: string | null; src: string | null; text: string | null; }[]; fields: string[]; kind: "input" | "review"; title: string; }[] | null; schema: Record | null; sections: { rows: { description: string | null; id: string | null; kind: "reply"; text: string; }[]; title: string; }[] | null; template: { language: string; name: string; parameters: Record | null; } | null; wording: { answer: { confirm: string | null; decline: string | null; open: string | null; rejected: string | null; rejected_final: string | null; reply_hint: string | null; submit: string | null; } | null; answer_page: { awaiting: { heading: string | null; text: string | null; } | null; confirm: { heading: string | null; text: string | null; } | null; done: { heading: string | null; text: string | null; } | null; form: { choose_one: string | null; date_unavailable: string | null; failed: string | null; network_error: string | null; update_failed: string | null; } | null; submitted: { heading: string | null; text: string | null; } | null; } | null; choice: { group_label: string | null; label: string | null; reply_hint: string | null; } | null; form: { back: string | null; cancel: string | null; fields: Record; open: string | null; review_empty: string | null; submit: string | null; title: string | null; } | null; lines: { answer_link: string | null; deadline: string | null; options: string | null; reply: string | null; } | null; status: { answered: string | null; closed: string | null; countdown: { one_second_left: string | null; seconds_left: string | null; under_half_minute: string | null; under_minute: string | null; under_ten_seconds: string | null; } | null; expired: string | null; sending: string | null; sent: string | null; unavailable: string | null; } | null; } | null; }[] | null; answer_status: "error" | "superseded" | "answered" | "silent" | "merged" | null; attempts: number | null; callback_url: string | null; caller_principal: string | null; channel: string | null; client_address: string; created_at: number; delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed"; door: "channel" | "api"; error: string | null; inbound_attachments: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; inbound_event: Record | null; inbound_form: Record | null; inbound_form_tag: string | null; inbound_kind: "message" | "event"; inbound_locale: string | null; inbound_location: { address: string | null; latitude: number; longitude: number; name: string | null; } | null; inbound_text: string; message_id: string; operator_send: boolean; origin: "operator" | "client"; our_identity: string | null; outbound_message_ids: string[] | null; pending_receipt: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | null; provider_message_id: string | null; route_missing: boolean; route_name: string; submitted_by: string | null; successor_id: string | null; thread_id: string; updated_at: number; }[]; total: number; unreadable: number; }>; readonly deleteConversationThread: (routeName: string, threadId: string) => Promise<{ removed: number; route_name: string; thread_id: string; }>; readonly deleteConversationPerson: (personId: string) => Promise<{ erased: boolean; person_id: string; removed: number; }>; readonly listChannels: (signal?: AbortSignal) => Promise<{ channels: string[]; }>; readonly listInteractions: (page: number, pageSize: number, signal?: AbortSignal) => Promise<{ next_page: number | null; page: number; page_size: number; total: number; truncated: boolean; items: { answer_format: "text" | "free" | "confirm" | "form" | "select" | "external"; audience: string | null; channel: string | null; created_at: string; group_id: string; interaction_id: string; media: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; }[] | null; origin: string | null; question: string; recipient: string | null; sensitive: boolean; server_verified: boolean | null; timeout_at: string; format_payload: Record; }[]; }>; readonly answerInteraction: (interactionId: string, answer: unknown) => Promise<{ interaction_id: string; status: string; }>; readonly reactInteraction: (interactionId: string, event: import("@tai42/api-client").ReactionEvent, values: unknown) => Promise<{ values: Record; options: Record; errors: Record; display: Record; }>; readonly cancelInteraction: (interactionId: string) => Promise<{ interaction_id: string; status: string; }>; readonly listStudioPlugins: (signal?: AbortSignal) => Promise<{ api_version: number; contributions: { nav_entries: string[]; pages: string[]; route_panels: string[]; settings_tabs: string[]; tool_panels: Record; }; entry: string; integrity: Record; mounts: Record; name: string; version: string; }[]>; readonly discoverServer: (target: import("@tai42/api-client").DiscoverServerTarget) => Promise<{ authorization_servers: string[]; automatic_client: boolean; client_issuer: string | null; issuer: string; redirect_uri: string | null; registration_supported: boolean; resource: string; resource_name: string | null; scopes_supported: string[]; suggested_display_name: string; suggested_id: string; url: string; }>; readonly addServer: (args: import("@tai42/api-client").AddServerArgs) => Promise<{ provider: { category: string; client_source: "manual" | "env" | "dynamic" | "unset" | null; config_fields: { key: string; label: string; required: boolean; secret: boolean; target: "header" | "env"; }[]; description: string; display_name: string; icon_url: string | null; id: string; kind: "none" | "oauth"; origin: "system" | "community"; removable: boolean; sub_services: { description: string; display_name: string; id: string; scopes: string[]; }[]; }; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; } | null; }>; readonly removeProvider: (id: string) => Promise<{ provider_id: string; removed_clients: number; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; } | null; }>; readonly setProviderClient: (id: string, args: import("@tai42/api-client").SetProviderClientArgs) => Promise<{ provider: { category: string; client_source: "manual" | "env" | "dynamic" | "unset" | null; config_fields: { key: string; label: string; required: boolean; secret: boolean; target: "header" | "env"; }[]; description: string; display_name: string; icon_url: string | null; id: string; kind: "none" | "oauth"; origin: "system" | "community"; removable: boolean; sub_services: { description: string; display_name: string; id: string; scopes: string[]; }[]; }; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; } | null; }>; readonly listProviders: (signal?: AbortSignal) => Promise<{ categories: { display_name: string; id: string; sort_order: number; }[]; providers: { category: string; client_source: "manual" | "env" | "dynamic" | "unset" | null; config_fields: { key: string; label: string; required: boolean; secret: boolean; target: "header" | "env"; }[]; description: string; display_name: string; icon_url: string | null; id: string; kind: "none" | "oauth"; origin: "system" | "community"; removable: boolean; sub_services: { description: string; display_name: string; id: string; scopes: string[]; }[]; }[]; }>; readonly listConnections: (signal?: AbortSignal) => Promise<{ items: { account_identity: string | null; alias: string; auth_health_state: "healthy" | "reconnect_required" | "refresh_failing"; connection_id: string; created_at: string; enabled_sub_services: string[]; granted_scopes: string[]; kind: "none" | "oauth"; provider_id: string; scopes_wanted: string[]; unreachable_sub_services: string[]; }[]; total: number; unhealthy: number; }>; readonly getConnection: (id: string, signal?: AbortSignal) => Promise<{ account_identity: string | null; alias: string; auth_health_state: "healthy" | "reconnect_required" | "refresh_failing"; connection_id: string; created_at: string; enabled_sub_services: string[]; granted_scopes: string[]; kind: "none" | "oauth"; provider_id: string; scopes_wanted: string[]; unreachable_sub_services: string[]; }>; readonly startConnect: (args: import("@tai42/api-client").StartConnectArgs) => Promise<{ authorize_url: string; flow_id: string; } | { added_manifest_entries: string[]; connection_id: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; } | null; }>; readonly disconnect: (id: string) => Promise<{ connection_id: string; removed_manifest_entries: string[]; upstream_revoke_outcome: "success" | "failed" | "skipped"; upstream_revoke_status: number | null; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; } | null; }>; readonly reconnect: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{ authorize_url: string; flow_id: string; }>; readonly patchSubServices: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{ added_manifest_entries: string[]; authorize_url: string | null; connection_id: string; consent_required: boolean; enabled_sub_services: string[]; flow_id: string | null; removed_manifest_entries: string[]; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; } | null; }>; readonly completeOAuth: (state: string, code: string, error?: string, iss?: string) => Promise<{ kind: "cancelled"; message: string; } | { kind: "failed"; reason: string; } | { kind: "not_configured"; } | { connection_id: string; kind: "success"; return_url: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly setMcpSecretEnv: (body: import("../../../api-client/dist/client/manifest-client").SetMcpSecretEnvBody) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly getManifestPreserved: (signal?: AbortSignal) => Promise<{ user_tools: string[]; mcp: { [x: string]: unknown; managed?: { connection_id: string; provider_id: string; sub_service: string; } | null | undefined; }[]; }>; readonly getMcpEnvRefs: (signal?: AbortSignal) => Promise<{ has_default: boolean; pointer: string; set: boolean; var: string; }[]>; readonly listSettingsProfiles: (signal?: AbortSignal) => Promise<{ description: string; name: string; }[]>; readonly getSettingsProfile: (name: string, signal?: AbortSignal) => Promise<{ description: string; env: Record; secret_keys: string[]; }>; readonly putSettingsProfile: (name: string, body: import("../../../api-client/dist/schemas").SettingsProfileBody) => Promise<{ ok: boolean; version: number; }>; readonly deleteSettingsProfile: (name: string) => Promise<{ ok: boolean; }>; readonly diffSettingsProfile: (name: string) => Promise<{ added: string[]; changed: { key: string; new: string; old: string; }[]; recycle_keys: string[]; refused_keys: string[]; removed: string[]; }>; readonly applySettingsProfile: (name: string) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; fresh: { generation: number; kind: string; name: string; }[]; hot: string[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; refused: string[]; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly listSettingsProfileVersions: (name: string, signal?: AbortSignal) => Promise<{ created_at: string; is_current: boolean; tags: string[]; version: number; }[]>; readonly getSettingsProfileVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{ body: { description: string; env: Record; secret_keys: string[]; }; created_at: string; is_current: boolean; tags: string[]; version: number; }>; readonly rollbackSettingsProfile: (name: string, version: number) => Promise<{ ok: boolean; version: number; }>; readonly getEnvConfig: (signal?: AbortSignal) => Promise<{ env: Record; secret_keys: string[]; }>; readonly setEnvConfig: (body: { env: Record; secret_keys?: string[] | null; }) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly getConfigMode: (signal?: AbortSignal) => Promise<{ config_mode: string; read_only: boolean; }>; readonly reloadConfig: (targets?: string[] | null) => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly listSubMcp: (signal?: AbortSignal) => Promise>; readonly createSubMcp: (slug: string, tools: string[], transport?: string) => Promise<{ slug: string; tools: string[]; transport: string; }>; readonly deleteSubMcp: (slug: string) => Promise<{ removed: boolean; slug: string; }>; readonly getManifest: (signal?: AbortSignal) => Promise<{ user_tools: string[]; mcp: { [x: string]: unknown; managed?: { connection_id: string; provider_id: string; sub_service: string; } | null | undefined; }[]; }>; readonly setMcpConfig: (mcp: unknown[]) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly getMcpStatus: (signal?: AbortSignal) => Promise<{ bound: Record; failed: { category: string; http_status: number | null; message: string; status: string; title: string; }[]; health: Record | null; last_success: string | null; }>; }>; readonly reloadMcp: (title: string) => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly addToolsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly removeToolsEntry: (title: string) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly addAgentsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly removeAgentsEntry: (title: string) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly updateApiTools: (body: import("@tai42/api-client").ApiToolsListsBody) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly listFailedMcps: (signal?: AbortSignal) => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly reloadFailedMcps: () => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly deregisterMcp: (title: string) => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly listTemplates: (signal?: AbortSignal) => Promise; readonly getTemplate: (templateId: string) => Promise<{ schema: Record; template: string; }>; readonly uploadTemplate: (path: string, content: string) => Promise<{ fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; path: string; uploaded: boolean; }>; readonly deleteTemplate: (path: string) => Promise<{ deleted: boolean; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; path: string; }>; readonly deleteTemplateDir: (path: string) => Promise<{ deleted: boolean; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; path: string; }>; readonly renderTemplate: (text: import("@tai42/api-client").TemplatedText) => Promise<{ rendered: string; }>; readonly clearTemplatesCache: () => Promise<{ cleared: boolean; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; }>; readonly listExtensions: (signal?: AbortSignal) => Promise<{ kind: string; multiple: boolean; name: string; }[]>; readonly getToolExtensions: (name: string, signal?: AbortSignal) => Promise<{ available: { kind: string; multiple: boolean; name: string; }[]; combos: (string | { name: string; config: Record; })[][]; }>; readonly setToolExtensions: (name: string, combos: readonly import("@tai42/api-client").PresetExtensionElement[][]) => Promise<{ awaiting_respawn: { keys: string[]; name: string; }[]; env_keys: number; recycle: { fresh: { generation: number; kind: string; name: string; }[]; recycle: { detail: string | null; generation_before: number; kind: string; name: string; status: string; }[]; recycle_stopped: { detail: string; kind: string; name: string | null; } | null; } | null; status: string; fanout: { mode: "local-only"; note: string; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "fleet"; } | { error: string | null; local_only: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; mode: "unreachable"; }; }>; readonly getBackendInfo: (signal?: AbortSignal) => Promise<{ backend: string | null; module: string | null; present: boolean; }>; readonly listFleetWorkers: (signal?: AbortSignal) => Promise<{ workers: { beat_at: string; generation: number; joined_at: string; kind: "backend" | "serve"; last_op: { at: string; op: string; outcome: string; } | null; name: string; pid: number; stale: boolean; state: "resyncing" | "recycling" | "ready"; }[]; }>; readonly reloadFleetConfig: (targets: string[] | null) => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly getStorageInfo: (signal?: AbortSignal) => Promise<{ module: string | null; present: boolean; provider: string | null; }>; readonly listStorageResources: (signal?: AbortSignal) => Promise<{ resources: string[]; }>; readonly statStorageResource: (id: string, signal?: AbortSignal) => Promise<{ content_type: string | null; id: string; }>; readonly downloadStorageResource: (id: string, signal?: AbortSignal) => Promise; readonly uploadStorageResource: (body: import("@tai42/api-client").StorageUploadBody) => Promise<{ id: string; stored: boolean; }>; readonly deleteStorageResource: (id: string) => Promise<{ deleted: boolean; id: string; }>; readonly deleteStorageDir: (path: string) => Promise<{ deleted: boolean; dir: string; }>; readonly listToolMeta: (signal?: AbortSignal) => Promise<{ folders: { id: string; name: string; parent_id: string | null; }[]; meta: { badges: string[]; display_name: string | null; folder_id: string | null; hidden: boolean | null; tags: string[]; tool_name: string; }[]; }>; readonly upsertToolMeta: (toolName: string, patch: import("@tai42/api-client").ToolMetaPatch) => Promise<{ badges: string[]; display_name: string | null; folder_id: string | null; hidden: boolean | null; tags: string[]; tool_name: string; }>; readonly deleteToolMeta: (toolName: string) => Promise<{ deleted: boolean; tool_name: string; }>; readonly createFolder: (name: string, parentId?: string | null) => Promise<{ id: string; name: string; parent_id: string | null; }>; readonly renameFolder: (folderId: string, name: string) => Promise<{ id: string; name: string; parent_id: string | null; }>; readonly moveFolder: (folderId: string, parentId: string | null) => Promise<{ id: string; name: string; parent_id: string | null; }>; readonly deleteFolder: (folderId: string) => Promise<{ deleted: boolean; folder_id: string; }>; readonly listStates: (signal?: AbortSignal) => Promise<{ default_subject_kind: string; description: string; effective_schema: Record | null; name: string; regimes: { path: string[]; regime: "single" | "composing" | "free"; }[] | null; retention_days: number | null; subject_kinds: string[]; updated_at: string | null; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; }[]>; readonly getState: (name: string, signal?: AbortSignal) => Promise<{ default_subject_kind: string; description: string; effective_schema: Record | null; name: string; regimes: { path: string[]; regime: "single" | "composing" | "free"; }[] | null; retention_days: number | null; subject_kinds: string[]; updated_at: string | null; attachments: { declarations: Record; parameters: Record; path: string[]; template: string; }[]; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; }>; readonly putState: (name: string, body: import("@tai42/api-client").StateDeclarationBody) => Promise<{ default_subject_kind: string; description: string; effective_schema: Record | null; name: string; regimes: { path: string[]; regime: "single" | "composing" | "free"; }[] | null; retention_days: number | null; subject_kinds: string[]; updated_at: string | null; held?: { held_by: string; save_id: string; subjects: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; }[] | undefined; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; }>; readonly deleteState: (name: string) => Promise<{ deleted: boolean; name: string; }>; readonly getStateStats: (name: string, signal?: AbortSignal) => Promise<{ consumers: number; per_field: Record; per_kind: Record; records: number; held?: { held_by: string; save_id: string; subjects: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; }[] | undefined; }>; readonly listStateAttachments: (name: string, signal?: AbortSignal) => Promise<{ declarations: Record; parameters: Record; path: string[]; state: string; template: string; }[]>; readonly getStateAttachment: (name: string, template: string, signal?: AbortSignal) => Promise<{ declarations: Record; parameters: Record; path: string[]; template: string; }>; readonly attachStateTemplate: (name: string, template: string, body: import("@tai42/api-client").StateAttachmentBody) => Promise<{ attached: boolean; state: string; template: string; held?: { held_by: string; save_id: string; subjects: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; }[] | undefined; }>; readonly patchStateAttachment: (name: string, template: string, body: import("@tai42/api-client").StateAttachmentBody) => Promise<{ state: string; template: string; updated: boolean; }>; readonly detachStateTemplate: (name: string, template: string) => Promise<{ detached: boolean; state: string; template: string; }>; readonly listStateSubjects: (name: string, params: { kind?: string; } & import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{ next_cursor: string | null; subjects: { subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; updated_at: number; }[]; held?: { held_by: string; save_id: string; subjects: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; }[] | undefined; }>; readonly searchStateRecords: (name: string, body: { filters: Record; } & import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{ matches: { subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; updated_at: number; }[]; next_cursor: string | null; held?: { held_by: string; save_id: string; subjects: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; }[] | undefined; }>; readonly getStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, signal?: AbortSignal) => Promise<{ canonical_subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; data: Record; folded_from: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; seq: number; state: string; subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; } | null>; readonly putStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, data: Record) => Promise<{ canonical_subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; data: Record; folded_from: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; seq: number; state: string; subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; }>; readonly patchStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, data: Record) => Promise<{ canonical_subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; data: Record; folded_from: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; seq: number; state: string; subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; }>; readonly applyStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, ops: readonly Record[]) => Promise<{ applied: boolean; data: Record | null; seq: number | null; skipped: Record[]; }>; readonly evalTemplateJq: (name: string, subject: import("@tai42/api-client").StateSubjectRef, jqName: string, params?: Record, signal?: AbortSignal) => Promise<{ name: string; purpose: "input"; value: unknown; }>; readonly applyTemplateJq: (name: string, subject: import("@tai42/api-client").StateSubjectRef, jqName: string, body?: { input?: unknown; op_id?: string; }) => Promise<{ applied: boolean; data: Record | null; name: string; seq: number | null; skipped: Record[]; }>; readonly deleteStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef) => Promise<{ erased: boolean; }>; readonly foldStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, into: import("@tai42/api-client").StateSubjectRef, mode: "switch" | "merge") => Promise<{ already: boolean; flattened: number; from: { key: string; kind: string; }; into: { key: string; kind: string; }; merged_members: string[] | null; mode: "switch" | "merge"; }>; readonly listStateWrites: (name: string, subject: import("@tai42/api-client").StateSubjectRef, params?: import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{ items: { at: string; origin: { actor: string | null; consumer: string | null; door: "tool" | "api" | "conversation" | "hook" | "schedule" | "operator"; inbound_id: string | null; meta: Record | null; op_id: string | null; run_id: string | null; turn_id: string | null; }; paths: (string | number)[][]; seq: number; }[]; next_cursor: string | null; }>; readonly stateConsumers: (name: string, signal?: AbortSignal) => Promise<{ detail: string | null; kind: string; link: { plugin_path: string | null; search: Record | null; token: string | null; } | null; name: string | null; unavailable: string | null; }[]>; readonly listStateTemplates: (signal?: AbortSignal) => Promise<{ declarations: { check: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; schema: Record; } | null; description: string; kind: "state-template"; name: string; parameters: Record; default?: unknown; }>; reconcile: { close: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; orphans: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; resolutions: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; } | null; regimes: { path: string[]; regime: "single" | "composing" | "free"; }[]; template_jq: Record | undefined; }; params: string[]; purpose: "input" | "update"; reads: string[][]; writes: string[][]; }> | null; attached_to: number; shipped_default: boolean; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; trace?: { enabled: boolean; } | undefined; }[]>; readonly getStateTemplate: (name: string, signal?: AbortSignal) => Promise<{ declarations: { check: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; schema: Record; } | null; description: string; kind: "state-template"; name: string; parameters: Record; default?: unknown; }>; reconcile: { close: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; orphans: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; resolutions: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; } | null; regimes: { path: string[]; regime: "single" | "composing" | "free"; }[]; template_jq: Record | undefined; }; params: string[]; purpose: "input" | "update"; reads: string[][]; writes: string[][]; }> | null; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; trace?: { enabled: boolean; } | undefined; }>; readonly putStateTemplate: (name: string, body: import("@tai42/api-client").StateTemplateBody, replace?: boolean) => Promise<{ declarations: { check: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; schema: Record; } | null; description: string; kind: "state-template"; name: string; parameters: Record; default?: unknown; }>; reconcile: { close: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; orphans: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; resolutions: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; } | null; regimes: { path: string[]; regime: "single" | "composing" | "free"; }[]; template_jq: Record | undefined; }; params: string[]; purpose: "input" | "update"; reads: string[][]; writes: string[][]; }> | null; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; trace?: { enabled: boolean; } | undefined; }>; readonly deleteStateTemplate: (name: string) => Promise<{ deleted: boolean; name: string; }>; readonly pruneStateRetention: () => Promise<{ pruned: Record; held?: { held_by: string; save_id: string; subjects: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }[]; }[] | undefined; }>; readonly listPendingSaves: (params: { status?: "outstanding" | "failed"; } & import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{ failed: number; items: { attempts: number; calls: { kind: string; target: string; }[]; created_at: string; failed_at: string | null; failed_phase: "calls" | "records" | null; id: string; last_error: string | null; run_id: string | null; states: string[]; status: "running" | "failed" | "calls" | "pending"; subjects: { state: string; subject: { key: string; kind: string; target_kind: "tool" | "agent"; target_name: string; }; }[]; }[]; next_cursor: string | null; outstanding: number; }>; readonly retryPendingSave: (id: string) => Promise<{ id: string; last_error: string | null; status: "running" | "failed" | "applied" | "calls" | "pending"; }>; readonly discardPendingSave: (id: string) => Promise<{ discarded: string; }>; readonly listPresets: (signal?: AbortSignal) => Promise<{ active_version: number; base_tool: string; conflicted: boolean; conflicted_reason: string | null; description: string; input_schema: Record | null; name: string; output_schema: Record | null; used_by: string[]; uses: string[]; extensions: (string | { name: string; config: Record; })[][]; }[]>; readonly createPreset: (body: import("@tai42/api-client").CreatePresetBody) => Promise<{ active_version: number; base_tool: string; conflicted: boolean; conflicted_reason: string | null; description: string; input_schema: Record | null; name: string; output_schema: Record | null; used_by: string[]; uses: string[]; extensions: (string | { name: string; config: Record; })[][]; }>; readonly getPreset: (name: string, signal?: AbortSignal) => Promise<{ active_version: number; base_tool: string; conflicted: boolean; conflicted_reason: string | null; description: string; fixed_kwargs: Record; input_schema: Record | null; name: string; output_schema: Record | null; used_by: string[]; uses: string[]; extensions: (string | { name: string; config: Record; })[][]; }>; readonly listPresetVersions: (name: string, signal?: AbortSignal) => Promise<{ created_at: string; is_current: boolean; tags: string[]; version: number; body: { base_tool: string; description: string; extensions: (string | Record)[][]; fixed_kwargs: Record; input_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; output_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; }; }[]>; readonly getPresetVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{ created_at: string; is_current: boolean; tags: string[]; version: number; body: { base_tool: string; description: string; extensions: (string | Record)[][]; fixed_kwargs: Record; input_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; output_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; }; }>; readonly savePresetVersion: (name: string, body: import("@tai42/api-client").SavePresetVersionBody) => Promise<{ created_at: string; is_current: boolean; tags: string[]; version: number; body: { base_tool: string; description: string; extensions: (string | Record)[][]; fixed_kwargs: Record; input_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; output_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; }; }>; readonly rollbackPreset: (name: string, version: number) => Promise<{ active_version: number; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; name: string; }>; readonly deletePreset: (name: string) => Promise<{ deleted: boolean; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; name: string; }>; readonly renamePreset: (name: string, newName: string) => Promise<{ active_version: number; fanout: { error: string | null; local_only: boolean | null; mode: string; note: string | null; op: string | null; reachable: boolean | null; results: { detail: string | null; error: string | null; name: string; outcome: string; payload: unknown; }[] | null; }; name: string; renamed_from: string; }>; readonly getPresetReferees: (name: string, signal?: AbortSignal) => Promise<{ name: string; referees: string[]; }>; readonly validatePreset: (body: import("@tai42/api-client").ValidatePresetBody) => Promise<{ error: string | null; valid: boolean; }>; readonly setPresetVersionTags: (name: string, version: number, tags: readonly string[]) => Promise<{ name: string; tags: string[]; version: number; }>; readonly listTools: (signal?: AbortSignal) => Promise; readonly getToolSchema: (name: string, signal?: AbortSignal) => Promise<{ description: string | null; input: Record; output: Record | null; }>; readonly getAllToolSchemas: (signal?: AbortSignal) => Promise; output: Record | null; }>>; readonly runTool: (args: import("@tai42/api-client").RunToolArgs, signal?: AbortSignal) => Promise<{ asks: { answer_format: string | null; asked_by: string[] | null; audience: string | null; channel: string | null; created_at: string | null; error: unknown; expiry_at: string | null; format_payload: Record | null; group_id: string | null; id: string; media: Record[] | null; on_expiry: "kill" | "resume" | null; payload: Record | null; question: string | null; recipient: string | null; result: unknown; status: "running" | "asking" | "failed" | "finished"; thread_id: string | null; to: "caller" | "user" | null; }[]; kind: "asks"; suspended: { caller_interaction_ids: string[]; expiry_at: string | null; interaction_id: string; interaction_ids: string[]; resume_owner: string | null; }; } | { kind: "none"; } | { kind: "parked"; suspended: { caller_interaction_ids: string[]; expiry_at: string | null; interaction_id: string; interaction_ids: string[]; resume_owner: string | null; }; } | { kind: "result"; result: unknown; }>; readonly reloadTool: (args: import("@tai42/api-client").ToolAdminArgs) => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly removeTool: (args: import("@tai42/api-client").ToolAdminArgs) => Promise<{ error: string | null; local_only: boolean; ok: boolean; op: string; reachable: boolean; results: { detail: string | null; error: string | null; name: string; outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale"; payload: unknown; }[]; }>; readonly submitToolRun: (args: import("@tai42/api-client").SubmitToolRunArgs, signal?: AbortSignal) => Promise<{ run_id: string; }>; readonly getToolRun: (runId: string, signal?: AbortSignal) => Promise<{ error: string | null; finished_at: string | null; outcome: unknown; result: unknown; resumed_interactions: string[] | null; run_id: string; started_at: string; tool_name: string; status: "running"; } | { error: string | null; finished_at: string | null; outcome: unknown; result: unknown; resumed_interactions: string[] | null; run_id: string; started_at: string; tool_name: string; status: "succeeded"; } | { error: string | null; finished_at: string | null; outcome: unknown; result: unknown; resumed_interactions: string[] | null; run_id: string; started_at: string; tool_name: string; status: "failed"; } | { error: string | null; finished_at: string | null; outcome: unknown; result: unknown; resumed_interactions: string[] | null; run_id: string; started_at: string; tool_name: string; status: "lost"; } | { error: string | null; finished_at: string | null; outcome: unknown; resumed_interactions: string[] | null; run_id: string; started_at: string; tool_name: string; status: "parked"; result: { asks: { answer_format: string | null; asked_by: string[] | null; audience: string | null; channel: string | null; created_at: string | null; error: unknown; expiry_at: string | null; format_payload: Record | null; group_id: string | null; id: string; media: Record[] | null; on_expiry: "kill" | "resume" | null; payload: Record | null; question: string | null; recipient: string | null; result: unknown; status: "running" | "asking" | "failed" | "finished"; thread_id: string | null; to: "caller" | "user" | null; }[]; kind: "asks"; suspended: { caller_interaction_ids: string[]; expiry_at: string | null; interaction_id: string; interaction_ids: string[]; resume_owner: string | null; }; } | { kind: "parked"; suspended: { caller_interaction_ids: string[]; expiry_at: string | null; interaction_id: string; interaction_ids: string[]; resume_owner: string | null; }; }; }>; readonly listToolRuns: (toolName: string, signal?: AbortSignal) => Promise<{ finished_at: string | null; run_id: string; started_at: string; tool_name: string; status: "running" | "parked" | "failed" | "succeeded" | "lost"; }[]>; readonly listToolTags: (signal?: AbortSignal) => Promise<{ badges: string[]; hidden: boolean; name: string; schedulable: boolean; tags: string[]; }[]>; readonly baseUrl: string; readonly constants: { readonly MEDIA_ID_PATTERN: "[A-Za-z0-9_-]{43}"; readonly MEDIA_ROUTE_PREFIX: "/api/interactions/media/"; readonly PERSON_KIND: "person"; }; readonly request: [2]>(path: string, schema: S, options?: Parameters[3]) => Promise>; } | null>; export declare function useApi(): ApiClient; export type { ApiClient }; //# sourceMappingURL=useApi.d.ts.map