import { type ProjectScopedRemoteToolCatalogOptions, type ProjectScopedRemoteToolDefaultProjectId, type ProjectScopedRemoteToolOptions, type RemoteMCPToolSourceConfig, type RemoteToolSource, type ToolExecutionContext } from "../../tool/index.js"; import { type AgentServiceMcpServerConfig } from "../service/mcp-server-config.js"; import type { AgentMcpToolPolicy } from "../types.js"; import type { RuntimeClientProfile } from "../runtime/client-profile.js"; import { type ConfirmedAgentProjectContextSwitch } from "../project/context.js"; import { type ProjectSteeringMutationResult, type ProjectSteeringPaths } from "../project/steering-mutation.js"; /** Handler for hosted project remote tool source mutation. */ export type HostedProjectRemoteToolSourceMutationHandler = (mutation: ProjectSteeringMutationResult) => Promise | void; /** Handler for hosted project remote tool source project switch. */ export type HostedProjectRemoteToolSourceProjectSwitchHandler = (projectId: string, confirmedProject?: Readonly) => Promise | void; /** Input payload for hosted project remote tool source prepare tool. */ export type HostedProjectRemoteToolSourcePrepareToolInput = (input: { toolName: string; toolInput: Record; context?: ToolExecutionContext; }) => Record; /** Public API contract for hosted project remote tool source retry policy. */ export type HostedProjectRemoteToolSourceRetryPolicy = (input: { toolName: string; toolInput: Record; activeProjectId: string | null; activeBranchId: string | null; error: unknown; }) => boolean; /** Input payload for create hosted project remote tool source. */ export type CreateHostedProjectRemoteToolSourceInput = { source: RemoteToolSource; defaultProjectId?: ProjectScopedRemoteToolDefaultProjectId; getActiveBranchId?: () => string | null | undefined; allowedToolNames?: ReadonlySet | null; /** * Narrower execution gate for the remote tool catalog. When set, only tools * in this Set can be listed or executed, overriding `allowedToolNames`. The * Set is held by reference, so growing it exposes tools without re-creating * the catalog. * * `null` is not a fallback: it overrides `allowedToolNames` and disables name * filtering entirely. Omit the property to keep `allowedToolNames` as the * gate. * * @deprecated No framework path supplies this. It is retained because * `CreateHostedProjectRemoteToolSourceInput` is public API, and dropping it * would silently widen the catalog to `allowedToolNames` for any caller that * relies on it as the gate. */ activatedRemoteToolNames?: ReadonlySet | null; projectScopedRemoteToolOptions?: ProjectScopedRemoteToolOptions; filterToolDefinitions?: ProjectScopedRemoteToolCatalogOptions["filterToolDefinitions"]; prepareToolInput?: HostedProjectRemoteToolSourcePrepareToolInput; retryToolName?: string; shouldRetryWithTool?: HostedProjectRemoteToolSourceRetryPolicy; steeringPaths?: ProjectSteeringPaths; onProjectSwitch?: HostedProjectRemoteToolSourceProjectSwitchHandler; onSteeringMutation?: HostedProjectRemoteToolSourceMutationHandler; }; /** * Create a project-scoped remote tool source. The source retains its last * successful catalog for the active project during transient discovery * failures and retries refreshes with bounded backoff. */ export declare function createHostedProjectRemoteToolSource(input: CreateHostedProjectRemoteToolSourceInput): RemoteToolSource; /** Input payload for create hosted project remote tool sources. */ export type CreateHostedProjectRemoteToolSourcesInput = Omit & { authToken: string; apiMcpUrl: string; studioMcpUrl?: string | null; mcpServers?: readonly AgentServiceMcpServerConfig[]; clientProfile?: RuntimeClientProfile | null; getProjectId: () => string | null | undefined; conversationId?: string; createRemoteToolSource?: (config: RemoteMCPToolSourceConfig) => RemoteToolSource; onStudioProjectSwitch?: HostedProjectRemoteToolSourceProjectSwitchHandler; }; export declare function createHostedMcpToolPolicySource(source: RemoteToolSource, policy: AgentMcpToolPolicy | undefined): RemoteToolSource; /** Create hosted project remote tool sources. */ export declare function createHostedProjectRemoteToolSources(input: CreateHostedProjectRemoteToolSourcesInput): RemoteToolSource[]; //# sourceMappingURL=project-remote-tool-source.d.ts.map