/** Composition root: assembles the per-resource sub-clients into the client. */ import type { ApiConfig } from '../http'; export type { AddUrlToScopeBody, ApiKeyBody, ClaimLinkBody, PinRoutePublicBody, RoleCreateBody, RoleUpdateBody, } from './auth-client'; export type { StartConnectArgs } from './connectors-client'; export type { ConversationMessageSearchQuery, ConversationThreadFilters, ConversationThreadMessageBody, ConversationTranscriptQuery, } from './conversations-client'; export type { TopicVerifierBody } from './hooks-client'; export { isSafeApiPath } from './login-client'; export type { ApiToolsListsBody } from './manifest-client'; export type { MarketplaceInstallBody, MarketplaceInstallPreviewBody, MarketplaceSearchQuery, MarketplaceUninstallBody, } from './marketplace-client'; export type { MetricsQuery, RunsQuery } from './observability-client'; export type { ValidateConditionBody } from './policy-client'; export type { CreatePresetBody, SavePresetVersionBody, ValidatePresetBody } from './presets-client'; export type { StateAttachmentBody, StateDeclarationBody, StatePageQuery, StateSubjectRef, StateTemplateBody, } from './states-client'; export type { StorageUploadBody } from './storage-client'; export type { ToolMetaPatch } from './tool-meta-client'; export type { RunToolArgs, ToolAdminArgs } from './tools-client'; export type { TriggerLinkCreateBody } from './trigger-links-client'; export type { WebEntryCodeMintBody } from './web-entry-gate-client'; export declare function createApiClient(config: ApiConfig): { readonly streamInteractions: (signal?: AbortSignal, lastEventId?: string) => Promise>; readonly getHealth: (signal?: AbortSignal) => Promise; readonly getSystemKinds: (signal?: AbortSignal) => Promise<{ kind: string; state: "default" | "active" | "off"; plugin: string | null; detail: string; }[]>; readonly searchMarketplace: (query?: import("./marketplace-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" | "POST" | "PUT" | "PATCH" | "DELETE")[]; 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: { ref: string; version: string; source: string; delivery: "package" | "descriptor"; installed_at: string; latest: string | null; update_available: boolean; incompatible_newer: string | null; missing_upstream: boolean; compat: { status: "unknown" | "compatible" | "incompatible"; reason: string | null; }; items: { name: string; kind: string; }[]; route_mounts: Record; }[]; quarantined: { name: string; reason: string; }[]; }>; readonly previewMarketplaceInstall: (body: import("./marketplace-client").MarketplaceInstallPreviewBody, signal?: AbortSignal) => Promise<{ ref: string; version: string; items: { item: string; kind: string; base: string; default_base: string; routes: { path: string; full_path: string; methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[]; public: boolean; }[]; }[]; collisions: { item: string; full_path: string; methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[]; conflict_owner: string; conflict_path: string; }[]; public_routes: { item: string; full_path: string; methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[]; }[]; new_public_routes: { item: string; full_path: string; methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[]; }[]; requires_public_acceptance: boolean; required_env: { name: string; secret: boolean; }[]; missing_env: string[]; delivery: "package" | "descriptor"; }>; readonly installMarketplacePlugin: (body: import("./marketplace-client").MarketplaceInstallBody) => Promise<{ ref: string; version: string; notes: string[]; advisories: { id: number; listing: string; affected_versions: string; severity: string; summary: string; created_at: string; withdrawn_at: string | null; }[]; routes: { item: string; full_path: string; methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[]; public: boolean; }[]; }>; readonly uninstallMarketplacePlugin: (body: import("./marketplace-client").MarketplaceUninstallBody) => Promise<{ ref: string; uninstalled: true; notes: string[]; }>; readonly updateMarketplacePlugin: (body: import("./marketplace-client").MarketplaceInstallBody) => Promise<{ ref: string; version: string; notes: string[]; advisories: { id: number; listing: string; affected_versions: string; severity: string; summary: string; created_at: string; withdrawn_at: string | null; }[]; routes: { item: string; full_path: string; methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[]; public: boolean; }[]; }>; readonly upgradeAllMarketplacePlugins: () => Promise<{ results: { ref: string; outcome: "failed" | "upgraded" | "up-to-date" | "no-compatible-version"; detail: string; }[]; }>; readonly getMarketplaceAdvisories: (signal?: AbortSignal) => Promise<{ advisories: { id: number; listing: string; affected_versions: string; severity: string; summary: string; created_at: string; withdrawn_at: string | null; }[]; fetched_at: string; }>; readonly getObservabilityMetrics: (params?: import("./observability-client").MetricsQuery, signal?: AbortSignal) => Promise<{ summary: { totalRuns: number; totalCost: number; totalTokens: number; averageLatencyMs: number; avgCostPerRun: number; avgTokensPerRun: number; timeToFirstTokenMs: number | null; }; timeSeries: { bucket: string | null; runs: number; cost: number; avgLatencyMs: number; totalTokens: number; }[]; byModel: { model: string; calls: number; cost: number; totalTokens: number; avgLatencyMs: number; }[]; granularity: "hour" | "day" | "week"; }>; readonly listRuns: (params?: import("./observability-client").RunsQuery, signal?: AbortSignal) => Promise<{ items: { id: string; traceId: string; createdAt: string | null; tags: string[]; status: "error" | "success"; cost: number | null; latencyMs: number | null; totalTokens: number | null; inputPreview: unknown; outputPreview: unknown; }[]; page: number; nextPage: number | null; }>; readonly getRunTrace: (traceId: string, signal?: AbortSignal) => Promise<{ traceId: string; timestamp: string | null; tags: string[]; totalCost: number | null; input: unknown; output: unknown; metadata: unknown; spans: { id: string; parentId: string | null; traceId: string | null; name: string | null; type: string | null; level: string | null; statusMessage: string | null; start: string | null; end: string | null; model: string | null; usage: unknown; metadata: unknown; input: unknown; output: unknown; nodeId: string | null; }[]; }>; readonly exportTrace: (traceId: string, signal?: AbortSignal) => Promise; readonly exportRuns: (params: import("./observability-client").RunsQuery & { format: "csv" | "json"; }, signal?: AbortSignal) => Promise; readonly listSchedules: (signal?: AbortSignal) => Promise<{ [x: string]: unknown; name: string; enabled?: boolean | undefined; schedule?: unknown; target?: unknown; args?: unknown[] | undefined; kwargs?: Record | undefined; }[]>; readonly getServerDateTime: (signal?: AbortSignal) => Promise<{ [x: string]: unknown; utc: unknown; local?: unknown; system?: unknown; }>; readonly addSchedule: (body: { tool_name: string; tool_kwargs: Record; schedule_kwargs: Record; execution_key?: string | null; state_binding?: import("..").StateBinding | null; start_expr?: import("..").TemplatedText | null; cancel_expr?: import("..").TemplatedText | null; resume_expr?: import("..").TemplatedText | null; extras_expr?: import("..").TemplatedText | null; }) => 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("./policy-client").ValidateConditionBody) => Promise<{ ok: boolean; result: boolean | null; }>; readonly listPolicyVersions: (userId: string, signal?: AbortSignal) => Promise<{ version: number; body: { condition: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; policy_data: Record; scopes: string[]; }; tags: string[]; created_at: string; is_current: boolean; }[]>; readonly rollbackPolicy: (userId: string, version: number) => Promise<{ user_id: string; active_version: number; }>; readonly logout: () => Promise<{ revoked: boolean; }>; readonly getAuthCapabilities: (signal?: AbortSignal) => Promise<{ mintable: boolean; providers: { name: string; mintable: boolean; }[]; }>; readonly getLoginMethods: (options?: { signal?: AbortSignal; }) => Promise<{ methods: ({ shape: "form"; id: string; title: string; purpose: "login" | "invite"; fields: { name: string; label: string; secret: boolean; autocomplete?: string | undefined; }[]; submit_path: string; } | { shape: "button"; id: string; label: string; href: string; icon?: string | undefined; })[]; needs_setup: boolean; setup_login?: { kinds: ("invite" | "password")[]; } | null | undefined; }>; 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("..").SetupBody) => Promise<{ owner_user_id: string; key_user_id: string; api_key: string; key_fingerprint: string; login_attached: boolean; invite_token?: string | null | undefined; login_path?: string | null | undefined; }>; readonly getMe: (signal?: AbortSignal) => Promise<{ user_id: string; owner_user_id: string | null; admin: boolean; scopes: string[]; routes: { path: string; methods: string[]; }[]; route_patterns: { pattern: string; scope_id: string; }[]; sub_mcp: { tools: string[]; transport: string; slug: string; }[]; tools: string[]; agents: string[]; mintable: boolean; principal?: { user_id: string; kind: "human" | "service"; display_name: string; } | null | undefined; }>; readonly listScopes: (signal?: AbortSignal) => Promise>; readonly addUrlToScope: (body: import("./auth-client").AddUrlToScopeBody) => Promise<{ scope_id: string; url: string; }>; readonly removeUrlFromScope: (body: { url: string; }) => Promise<{ url: string; }>; readonly removeScope: (scopeId: string) => Promise<{ scope_id: string; deleted_keys: number; }>; readonly listAuthRoutes: (signal?: AbortSignal) => Promise<{ path: string; methods: string[]; mapped: string | null; tags: string[]; summary: string; action: "read" | "write" | "fenced" | "secret" | null; }[]>; readonly listPublicRoutes: (signal?: AbortSignal) => Promise; readonly pinRoutePublic: (body: import("./auth-client").PinRoutePublicBody) => Promise<{ url: string; }>; readonly unpinPublicRoute: (url: string) => Promise<{ url: string; }>; 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("./auth-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("./auth-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<{ name: string; deleted: boolean; }>; readonly listRoleVersions: (name: string, signal?: AbortSignal) => Promise<{ versions: { 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[]; }; tags: string[]; created_at: string; is_current: boolean; }[]; audit: { version: number; body: { action: string; actor: string | null; before: unknown; after: unknown; }; tags: string[]; created_at: string; is_current: boolean; }[]; }>; 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 listTokensPayload: (signal?: AbortSignal) => Promise<{ user_id: string; description: string; scopes: string[]; policy_data: unknown; condition?: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null | undefined; principal?: { user_id: string; kind: "human" | "service"; display_name: string; } | null | undefined; orphaned?: boolean | undefined; }[]>; readonly createApiKey: (body: import("./auth-client").ApiKeyBody) => Promise; readonly editApiKey: (userId: string, body: Omit) => Promise<{ user_id: string; updated: boolean; }>; readonly revokeApiKey: (userId: string) => Promise<{ user_id: string; revoked: boolean; }>; readonly createClaimLink: (body: import("./auth-client").ClaimLinkBody) => Promise<{ claim_path: string; token: string; expires_at: string; }>; readonly listPrincipals: (signal?: AbortSignal) => Promise<{ user_id: string; kind: "human" | "service"; display_name: string; created_by: string | null; disabled: boolean; created_at: string; }[]>; readonly createPrincipal: (body: { user_id?: string; kind: "human" | "service"; display_name: string; role: string; }) => Promise<{ user_id: string; kind: "human" | "service"; display_name: string; created_by: string | null; disabled: boolean; created_at: string; }>; readonly updatePrincipal: (userId: string, body: { display_name?: string; disabled?: boolean; }) => Promise<{ user_id: string; kind: "human" | "service"; display_name: string; created_by: string | null; disabled: boolean; created_at: string; }>; readonly deletePrincipal: (userId: string) => Promise<{ user_id: string; deleted: boolean; }>; readonly getSettingsSchema: (signal?: AbortSignal) => Promise<{ groups: { name: string; module: 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("./trigger-links-client").TriggerLinkCreateBody) => Promise<{ name: string; trigger_path: string; token: string; topic: string; expires_at: string | null; }>; readonly listTriggerLinks: (signal?: AbortSignal) => Promise<{ items: { name: string; topic: string; execution_key: string; trigger_auth: "token" | "public" | "verifier" | "token+api_key" | "out-of-service"; tool_kwargs: Record | null; created_by: string | null; created_at: string; expires_at: string | null; token_hash_prefix: string; }[]; total: number; }>; readonly deleteTriggerLink: (name: string) => Promise<{ removed: boolean; name: string; }>; 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; topic_verifiers: Record; }>; trigger_auth: Record; }>; readonly registerHook: (params: import("..").HookRegister) => Promise<{ registered: boolean; name: string; }>; readonly unregisterHook: (name: string) => Promise<{ removed: boolean; name: string; }>; readonly listHookVerifiers: (signal?: AbortSignal) => Promise; readonly setTopicVerifier: (topic: string, body: import("./hooks-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: { id: string; message: string; recipient: string | null; created_at: string; audience?: string | null | undefined; media?: unknown[] | null | undefined; template?: { body_parameters: string[]; buttons: unknown[]; header_media: { caption: string | null; filename: string | null; kind: "image" | "link" | "document" | "video" | "audio"; url: string; } | null; language: string; name: string; } | null | undefined; options?: string[] | null | undefined; }[]; }>; readonly getWebEntryGate: (identity: string, signal?: AbortSignal) => Promise<{ enabled: boolean; codes: { code_id: string; label: string | null; created_at: string; expires_at: string | null; }[]; }>; readonly setWebEntryGate: (identity: string, enabled: boolean) => Promise<{ enabled: boolean; }>; readonly mintWebEntryCode: (identity: string, body: import("./web-entry-gate-client").WebEntryCodeMintBody) => Promise<{ code: string; code_id: string; expires_at: string | null; }>; readonly revokeWebEntryCode: (identity: string, codeId: string) => Promise<{ status: "revoked"; }>; readonly listConversationRoutes: (signal?: AbortSignal) => Promise<{ items: { callback_secret: string | null; callback_url: string | null; cancel_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; channel: string | null; door: "channel" | "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: string | 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; }[]; total: number; }>; readonly createOrReplaceConversationRoute: (route: import("..").ConversationRouteCreate) => Promise<{ created: boolean; route_name: string; route: { callback_secret: string | null; callback_url: string | null; cancel_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; channel: string | null; door: "channel" | "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: string | 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_secret: string | null; }>; readonly deleteConversationRoute: (routeName: string) => Promise<{ removed: boolean; route_name: string; }>; readonly listConversationThreads: (routeName: string, page: number, pageSize: number, filters?: import("./conversations-client").ConversationThreadFilters, signal?: AbortSignal) => Promise<{ total: number; page: number; page_size: number; next_page: number | null; truncated: boolean; items: { thread_id: string; client_address: string; last_activity_at: number; message_count: number; last_delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded"; }[]; }>; readonly readConversationTranscript: (query: import("./conversations-client").ConversationTranscriptQuery, signal?: AbortSignal) => Promise<{ order: "asc" | "desc"; total: number; page: number; page_size: number; next_page: number | null; truncated: boolean; items: { message_id: string; route_name: string; door: "channel" | "api"; thread_id: string; client_address: string; caller_principal: string | null; inbound_text: string; answer_status: "error" | "silent" | "merged" | "superseded" | "answered" | null; answer: string | null; successor_id: string | null; origin: "client" | "operator"; delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded"; created_at: number; updated_at: number; channel?: string | null | undefined; our_identity?: string | null | undefined; provider_message_id?: string | null | undefined; callback_url?: string | null | undefined; error?: string | null | undefined; outbound_message_ids?: string[] | undefined; attempts?: number | undefined; }[]; }>; readonly searchConversationMessages: (query: import("./conversations-client").ConversationMessageSearchQuery, signal?: AbortSignal) => Promise<{ total: number; page: number; page_size: number; next_page: number | null; truncated: boolean; items: { message_id: string; route_name: string; door: "channel" | "api"; thread_id: string; client_address: string; caller_principal: string | null; inbound_text: string; answer_status: "error" | "silent" | "merged" | "superseded" | "answered" | null; answer: string | null; successor_id: string | null; origin: "client" | "operator"; delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded"; created_at: number; updated_at: number; channel?: string | null | undefined; our_identity?: string | null | undefined; provider_message_id?: string | null | undefined; callback_url?: string | null | undefined; error?: string | null | undefined; outbound_message_ids?: string[] | undefined; attempts?: number | undefined; }[]; }>; readonly sendConversationThreadMessage: (routeName: string, body: import("./conversations-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("..").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; }>; readonly getConversationConfig: (targetKind: import("..").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("..").TargetConversationConfig) => Promise<{ created: boolean; target_kind: "tool" | "agent"; target_name: string; 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; }; }>; readonly deleteConversationConfig: (targetKind: import("..").ConversationTargetKind, targetName: string) => Promise<{ removed: boolean; target_kind: "tool" | "agent"; target_name: string; }>; readonly listFailedConversationMessages: (signal?: AbortSignal) => Promise<{ items: { message_id: string; route_name: string; door: "channel" | "api"; thread_id: string; client_address: string; caller_principal: string | null; inbound_text: string; answer_status: "error" | "silent" | "merged" | "superseded" | "answered" | null; answer: string | null; successor_id: string | null; origin: "client" | "operator"; delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded"; created_at: number; updated_at: number; channel?: string | null | undefined; our_identity?: string | null | undefined; provider_message_id?: string | null | undefined; callback_url?: string | null | undefined; error?: string | null | undefined; outbound_message_ids?: string[] | undefined; attempts?: number | undefined; }[]; total: number; }>; readonly deleteConversationThread: (routeName: string, threadId: string) => Promise<{ removed: number; route_name: string; thread_id: string; }>; readonly deleteConversationPerson: (personId: string) => Promise<{ person_id: string; removed: number; erased: boolean; }>; readonly listChannels: (signal?: AbortSignal) => Promise<{ channels: string[]; }>; readonly listInteractions: (page: number, pageSize: number, signal?: AbortSignal) => Promise<{ total: number; page: number; page_size: number; next_page: number | null; truncated: boolean; items: { interaction_id: string; group_id: string; question: string; answer_format: "text" | "external" | "confirm" | "select" | "form"; format_payload: Record; created_at: string; timeout_at: string; sensitive: boolean; server_verified?: boolean | undefined; channel?: string | undefined; recipient?: string | undefined; origin?: string | undefined; audience?: string | undefined; media?: unknown[] | undefined; }[]; }>; readonly answerInteraction: (interactionId: string, answer: unknown) => Promise<{ interaction_id: string; status: string; }>; readonly cancelInteraction: (interactionId: string) => Promise<{ interaction_id: string; status: string; }>; readonly listStudioPlugins: (signal?: AbortSignal) => Promise<{ name: string; version: string; api_version: number; entry: string; integrity: Record; contributions: { tool_panels: Record; pages: string[]; settings_tabs: string[]; nav_entries: string[]; }; }[]>; readonly listProviders: (signal?: AbortSignal) => Promise<{ providers: { id: string; display_name: string; description: string; icon_url: string; kind: "none" | "oauth"; origin: "system" | "community"; category: string; sub_services: { id: string; display_name: string; description: string; scopes: string[]; }[]; config_fields: { key: string; label: string; target: "env" | "header"; required: boolean; secret: boolean; }[]; }[]; categories: { id: string; display_name: string; sort_order: number; }[]; }>; readonly listConnections: (signal?: AbortSignal) => Promise<{ items: { connection_id: string; provider_id: string; alias: string; kind: "none" | "oauth"; account_identity: string | null; enabled_sub_services: string[]; granted_scopes: string[]; unreachable_sub_services: string[]; auth_health_state: "healthy" | "reconnect_required" | "refresh_failing"; created_at: string; }[]; total: number; unhealthy?: number | undefined; }>; readonly getConnection: (id: string, signal?: AbortSignal) => Promise<{ connection_id: string; provider_id: string; alias: string; kind: "none" | "oauth"; account_identity: string | null; enabled_sub_services: string[]; granted_scopes: string[]; unreachable_sub_services: string[]; auth_health_state: "healthy" | "reconnect_required" | "refresh_failing"; created_at: string; }>; readonly startConnect: (args: import("./connectors-client").StartConnectArgs) => Promise<{ flow_id: string; authorize_url: string; } | { connection_id: string; added_manifest_entries: string[]; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; }>; readonly disconnect: (id: string) => Promise<{ connection_id: string; upstream_revoke_outcome: "success" | "failed" | "skipped"; upstream_revoke_status: number | null; removed_manifest_entries: string[]; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; }>; readonly reconnect: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{ flow_id: string; authorize_url: string; }>; readonly patchSubServices: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{ connection_id: string; enabled_sub_services: string[]; consent_required: boolean; flow_id: string | null; authorize_url: string | null; added_manifest_entries: string[]; removed_manifest_entries: string[]; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; }>; readonly completeOAuth: (state: string, code: string, error?: string) => Promise<{ kind: "success"; connection_id: string; return_url: string; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; } | { kind: "failed"; reason: string; } | { kind: "cancelled"; message: string; }>; readonly setMcpSecretEnv: (body: import("./manifest-client").SetMcpSecretEnvBody) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly getManifestPreserved: (signal?: AbortSignal) => Promise<{ mcp: { [x: string]: unknown; managed?: { connection_id: string; provider_id: string; sub_service: string; } | null | undefined; }[]; user_tools: string[]; }>; readonly getMcpEnvRefs: (signal?: AbortSignal) => Promise<{ var: string; pointer: string; has_default: boolean; set: boolean; }[]>; readonly listSettingsProfiles: (signal?: AbortSignal) => Promise<{ name: string; description: string; }[]>; readonly getSettingsProfile: (name: string, signal?: AbortSignal) => Promise<{ description: string; env: Record; secret_keys: string[]; }>; readonly putSettingsProfile: (name: string, body: import("../schemas").SettingsProfileBody) => Promise<{ ok: true; version?: number | undefined; }>; readonly deleteSettingsProfile: (name: string) => Promise<{ ok: true; }>; readonly diffSettingsProfile: (name: string) => Promise<{ added: string[]; removed: string[]; changed: { key: string; old: string; new: string; }[]; recycle_keys: string[]; refused_keys: string[]; }>; readonly applySettingsProfile: (name: string) => Promise<{ hot: string[]; recycle: { name: string; kind: string; status: string; generation_before: number; }[]; fresh: { name: string; kind: string; generation: number; }[]; refused: { key: string; reason: string; }[]; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly listSettingsProfileVersions: (name: string, signal?: AbortSignal) => Promise<{ version: number; tags: string[]; created_at: string; is_current: boolean; }[]>; readonly getSettingsProfileVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{ version: number; tags: string[]; created_at: string; is_current: boolean; body: { description: string; env: Record; secret_keys: string[]; }; }>; readonly rollbackSettingsProfile: (name: string, version: number) => Promise<{ ok: true; version: number; }>; readonly getEnvConfig: (signal?: AbortSignal) => Promise<{ env: Record; secret_keys: string[]; }>; readonly setEnvConfig: (env: Record) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly getConfigMode: (signal?: AbortSignal) => Promise<{ config_mode: string; read_only: boolean; }>; readonly reloadConfig: (targets?: string[] | null) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; 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<{ slug: string; removed: true; }>; readonly getManifest: (signal?: AbortSignal) => Promise<{ mcp: { [x: string]: unknown; managed?: { connection_id: string; provider_id: string; sub_service: string; } | null | undefined; }[]; user_tools: string[]; }>; readonly setMcpConfig: (mcp: unknown[]) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly getMcpStatus: (signal?: AbortSignal) => Promise<{ bound: Record; failed: { title: string; status: string; }[]; }>; readonly reloadMcp: (title: string) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; readonly addToolsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly removeToolsEntry: (title: string) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly addAgentsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly removeAgentsEntry: (title: string) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly updateApiTools: (body: import("./manifest-client").ApiToolsListsBody) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly listFailedMcps: (signal?: AbortSignal) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; readonly reloadFailedMcps: () => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; readonly deregisterMcp: (title: string) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; readonly listTemplates: (signal?: AbortSignal) => Promise; readonly getTemplate: (templateId: string) => Promise<{ template: string; schema: Record; }>; readonly uploadTemplate: (path: string, content: string) => Promise<{ path: string; uploaded: true; }>; readonly deleteTemplate: (path: string) => Promise<{ path: string; deleted: true; }>; readonly deleteTemplateDir: (path: string) => Promise<{ path: string; deleted: true; }>; readonly renderTemplate: (text: import("..").TemplatedText) => Promise<{ rendered: string; }>; readonly clearTemplatesCache: () => Promise<{ cleared: true; }>; readonly listExtensions: (signal?: AbortSignal) => Promise<{ name: string; kind: string; }[]>; readonly getToolExtensions: (name: string, signal?: AbortSignal) => Promise<{ combos: (string | { name: string; config: Record; })[][]; available: { name: string; kind: string; }[]; }>; readonly setToolExtensions: (name: string, combos: readonly import("..").PresetExtensionElement[][]) => Promise<{ status: string; env_keys: number; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; }; }>; readonly getBackendInfo: (signal?: AbortSignal) => Promise<{ present: boolean; backend: string | null; module: string | null; }>; readonly listFleetWorkers: (signal?: AbortSignal) => Promise<{ workers: { name: string; kind: "backend" | "serve"; pid: number; generation: number; joined_at: string; beat_at: string; state: "ready" | "resyncing" | "recycling"; stale: boolean; last_op: { op: string; outcome: string; at: string; } | null; }[]; }>; readonly reloadFleetConfig: (targets: string[] | null) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; readonly getStorageInfo: (signal?: AbortSignal) => Promise<{ present: boolean; provider: string | null; module: string | null; }>; readonly listStorageResources: (signal?: AbortSignal) => Promise<{ resources: string[]; }>; readonly statStorageResource: (id: string, signal?: AbortSignal) => Promise<{ id: string; content_type: string | null; }>; readonly downloadStorageResource: (id: string, signal?: AbortSignal) => Promise; readonly uploadStorageResource: (body: import("./storage-client").StorageUploadBody) => Promise<{ id: string; stored: true; }>; readonly deleteStorageResource: (id: string) => Promise<{ id: string; deleted: true; }>; readonly deleteStorageDir: (path: string) => Promise<{ dir: string; deleted: true; }>; readonly listToolMeta: (signal?: AbortSignal) => Promise<{ folders: { id: string; name: string; parent_id: string | null; }[]; meta: { tool_name: string; display_name: string | null; folder_id: string | null; tags: string[]; badges: string[]; hidden: boolean | null; }[]; }>; readonly upsertToolMeta: (toolName: string, patch: import("./tool-meta-client").ToolMetaPatch) => Promise<{ tool_name: string; display_name: string | null; folder_id: string | null; tags: string[]; badges: string[]; hidden: boolean | null; }>; readonly deleteToolMeta: (toolName: string) => Promise<{ tool_name: string; deleted: true; }>; 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<{ folder_id: string; deleted: true; }>; readonly listStates: (signal?: AbortSignal) => Promise<{ default_subject_kind: string; description: string; effective_schema: Record | null; name: string; regimes: Record[] | 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: Record[] | null; retention_days: number | null; subject_kinds: string[]; updated_at: string | null; attachments: { template: string; path: string[]; parameters: Record; declarations: Record; }[]; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; }>; readonly putState: (name: string, body: import("./states-client").StateDeclarationBody) => Promise<{ default_subject_kind: string; description: string; effective_schema: Record | null; name: string; regimes: Record[] | null; retention_days: number | null; subject_kinds: string[]; updated_at: string | null; attachments: { template: string; path: string[]; parameters: Record; declarations: Record; }[]; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; }>; readonly deleteState: (name: string) => Promise<{ name: string; deleted: true; }>; readonly getStateStats: (name: string, signal?: AbortSignal) => Promise<{ records: number; per_field: Record; per_kind: Record; consumers: number; }>; readonly listStateAttachments: (name: string, signal?: AbortSignal) => Promise<{ template: string; path: string[]; parameters: Record; declarations: Record; }[]>; readonly getStateAttachment: (name: string, template: string, signal?: AbortSignal) => Promise<{ template: string; path: string[]; parameters: Record; declarations: Record; }>; readonly attachStateTemplate: (name: string, template: string, body: import("./states-client").StateAttachmentBody) => Promise<{ attached: true; state: string; template: string; }>; readonly patchStateAttachment: (name: string, template: string, body: import("./states-client").StateAttachmentBody) => Promise<{ updated: true; state: string; template: string; }>; readonly detachStateTemplate: (name: string, template: string) => Promise<{ detached: true; state: string; template: string; }>; readonly listStateSubjects: (name: string, params: { kind?: string; } & import("./states-client").StatePageQuery, signal?: AbortSignal) => Promise<{ subjects: { subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; updated_at: number; }[]; next_cursor: string | null; }>; readonly searchStateRecords: (name: string, body: { filters: Record; } & import("./states-client").StatePageQuery, signal?: AbortSignal) => Promise<{ matches: { subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; updated_at: number; }[]; next_cursor: string | null; }>; readonly getStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, signal?: AbortSignal) => Promise<{ state: string; subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; data: Record; seq: number; canonical_subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; folded_from: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }[]; } | null>; readonly putStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, data: Record) => Promise<{ state: string; subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; data: Record; seq: number; canonical_subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; folded_from: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }[]; }>; readonly patchStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, data: Record) => Promise<{ state: string; subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; data: Record; seq: number; canonical_subject: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }; folded_from: { target_kind: "tool" | "agent"; target_name: string; kind: string; key: string; }[]; }>; readonly applyStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, ops: readonly Record[]) => Promise<{ applied: boolean; data: Record | null; seq: number | null; skipped: Record[]; }>; readonly evalTemplateJq: (name: string, subject: import("./states-client").StateSubjectRef, jqName: string, params?: Record, signal?: AbortSignal) => Promise<{ name: string; purpose: "input"; value: unknown; }>; readonly applyTemplateJq: (name: string, subject: import("./states-client").StateSubjectRef, jqName: string, body?: { input?: unknown; op_id?: string; }) => Promise<{ name: string; applied: boolean; data: Record | null; seq: number | null; skipped: Record[]; }>; readonly deleteStateRecord: (name: string, subject: import("./states-client").StateSubjectRef) => Promise<{ erased: true; }>; readonly foldStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, into: import("./states-client").StateSubjectRef, mode: "switch" | "merge") => Promise<{ mode: "switch" | "merge"; from: { kind: string; key: string; }; into: { kind: string; key: string; }; already: boolean; flattened: number; }>; readonly listStateWrites: (name: string, subject: import("./states-client").StateSubjectRef, params?: import("./states-client").StatePageQuery, signal?: AbortSignal) => Promise<{ items: { seq: number; at: string; origin: { consumer: string | null; meta: Record | null; run_id: string | null; op_id: string | null; door: string; actor: string | null; turn_id: string | null; inbound_id: string | null; }; paths: (string | number)[][]; }[]; next_cursor: string | null; }>; readonly stateConsumers: (name: string, signal?: AbortSignal) => Promise<{ kind: string; name: string | null; detail: string | null; link: { token: string | null; plugin_path: string | null; search: Record | null; } | 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; 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: Record[]; template_jq: Record | undefined; }; params: string[]; purpose: "input" | "update"; reads: string[][]; writes: string[][]; }> | null; trace: Record; attached_to: number; shipped_default: boolean; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | 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; 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: Record[]; template_jq: Record | undefined; }; params: string[]; purpose: "input" | "update"; reads: string[][]; writes: string[][]; }> | null; trace: Record; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; }>; readonly putStateTemplate: (name: string, body: import("./states-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; 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: Record[]; template_jq: Record | undefined; }; params: string[]; purpose: "input" | "update"; reads: string[][]; writes: string[][]; }> | null; trace: Record; schema?: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | undefined; }>; readonly deleteStateTemplate: (name: string) => Promise<{ name: string; deleted: true; }>; readonly pruneStateRetention: () => Promise<{ pruned: Record; }>; readonly listPresets: (signal?: AbortSignal) => Promise<{ name: string; base_tool: string; description: string; active_version: number; extensions: (string | { name: string; config: Record; })[][]; output_schema: Record | null; input_schema: Record | null; conflicted: boolean; conflicted_reason: string | null; uses: string[]; used_by: string[]; }[]>; readonly createPreset: (body: import("./presets-client").CreatePresetBody) => Promise<{ name: string; base_tool: string; description: string; active_version: number; extensions: (string | { name: string; config: Record; })[][]; output_schema: Record | null; input_schema: Record | null; conflicted: boolean; conflicted_reason: string | null; uses: string[]; used_by: string[]; }>; readonly getPreset: (name: string, signal?: AbortSignal) => Promise<{ name: string; base_tool: string; description: string; active_version: number; extensions: (string | { name: string; config: Record; })[][]; output_schema: Record | null; input_schema: Record | null; conflicted: boolean; conflicted_reason: string | null; uses: string[]; used_by: string[]; fixed_kwargs: Record; }>; readonly listPresetVersions: (name: string, signal?: AbortSignal) => Promise<{ 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; }; tags: string[]; created_at: string; is_current: boolean; }[]>; readonly getPresetVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{ 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; }; tags: string[]; created_at: string; is_current: boolean; }>; readonly savePresetVersion: (name: string, body: import("./presets-client").SavePresetVersionBody) => Promise<{ 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; }; tags: string[]; created_at: string; is_current: boolean; }>; readonly rollbackPreset: (name: string, version: number) => Promise<{ name: string; active_version: number; }>; readonly deletePreset: (name: string) => Promise<{ name: string; deleted: true; }>; readonly renamePreset: (name: string, newName: string) => Promise<{ name: string; renamed_from: string; active_version: number; }>; readonly getPresetReferees: (name: string, signal?: AbortSignal) => Promise<{ name: string; referees: string[]; }>; readonly validatePreset: (body: import("./presets-client").ValidatePresetBody) => Promise<{ valid: boolean; error: string | null; }>; readonly setPresetVersionTags: (name: string, version: number, tags: readonly string[]) => Promise<{ name: string; version: number; tags: string[]; }>; readonly listTools: (signal?: AbortSignal) => Promise; readonly getToolSchema: (name: string, signal?: AbortSignal) => Promise<{ input: Record; output: Record | null; description: string | null; }>; readonly getAllToolSchemas: (signal?: AbortSignal) => Promise; output: Record | null; description: string | null; }>>; readonly runTool: (args: import("./tools-client").RunToolArgs, signal?: AbortSignal) => Promise; readonly reloadTool: (args: import("./tools-client").ToolAdminArgs) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; readonly removeTool: (args: import("./tools-client").ToolAdminArgs) => Promise<{ op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; }>; readonly submitToolRun: (args: import("..").SubmitToolRunArgs, signal?: AbortSignal) => Promise<{ run_id: string; }>; readonly getToolRun: (runId: string, signal?: AbortSignal) => Promise<{ run_id: string; tool_name: string; status: "running" | "failed" | "parked" | "succeeded" | "lost"; started_at: string; finished_at?: string | undefined; result?: unknown; error?: string | undefined; resumed_interactions?: string[] | undefined; }>; readonly listToolRuns: (toolName: string, signal?: AbortSignal) => Promise<{ run_id: string; tool_name: string; status: "running" | "failed" | "parked" | "succeeded" | "lost"; started_at: string; finished_at?: string | undefined; }[]>; readonly listToolTags: (signal?: AbortSignal) => Promise<{ name: string; tags: string[]; badges: string[]; hidden: boolean; }[]>; readonly baseUrl: string; }; export type ApiClient = ReturnType; //# sourceMappingURL=index.d.ts.map