/** * Remote Integration Tools * * Fetches integration tool definitions from the API and executes calls through * integration-scoped and tool-scoped API routes. Discovery keeps the combined list * route during the compatibility window until the API exposes the configured * integration identities needed to issue scoped list requests without an N+1. * * Design: NO global registration. Tools are fetched per-request because * different projects expose different authorized integration tools. The agent runtime * calls these functions at tool-enumeration and tool-execution time. */ import type { ToolDefinition, ToolExecutionContext } from "../tool/index.js"; /** Result of listing the integration tools available to the current run. */ export type RemoteIntegrationToolDiscoveryResult = { readonly status: "ok"; readonly tools: ToolDefinition[]; } | { readonly status: "unavailable"; readonly reason: "request_failed"; }; /** Run a callback with one integration-tool discovery result shared by all continuations. */ export declare function runWithRemoteIntegrationToolDiscoveryScope(callback: () => Promise): Promise; /** * Discover integration tools for the current request context. * * A successful empty catalog returns `status: "ok"`. Request, protocol, and * response failures return `status: "unavailable"` so callers do not mistake * a failed lookup for a project with no integration tools. The agent runtime * memoizes both outcomes for the current run. Direct callers inside a * Veryfront request receive the same request-scoped behavior. */ export declare function getRemoteIntegrationToolDiscovery(context?: ToolExecutionContext): Promise; /** * Fetch integration tool definitions for the current request context. * * This compatibility helper returns an empty array for unavailable catalogs. * Use `getRemoteIntegrationToolDiscovery` when the caller must distinguish a * successful empty catalog from a discovery failure. */ export declare function getRemoteIntegrationToolDefinitions(context?: ToolExecutionContext): Promise; /** * Check if a tool name looks like a remote integration tool. * Integration tools use "integration__tool_id" format (double underscore separator). */ export declare function isRemoteIntegrationTool(toolName: string): boolean; /** * Execute a remote integration tool via the API. * Called by the agent runtime when a tool isn't found in the local registry. * The request, response, and caller-supplied cancellation signal remain * bounded for the complete network and response-body lifecycle. */ export declare function executeRemoteIntegrationTool(toolName: string, args: Record, context?: ToolExecutionContext): Promise; //# sourceMappingURL=remote-tools.d.ts.map