import { McpClient, type Tool } from "@strands-agents/sdk"; import { Config, type NamedMcpTransport } from "./config.js"; import { type McpOAuthService } from "./oauth/index.js"; import type { McpTransport } from "./types.js"; export declare const HOOMAN_CHANNEL = "hooman/channel"; export declare const HOOMAN_CHANNEL_PERMISSION = "hooman/channel/permission"; export type ChannelMessageMeta = { subscription: ChannelSubscription; source?: string; user?: string; session?: string; thread?: string; }; export type ChannelMessage = { prompt: string; attachments: string[]; meta: ChannelMessageMeta; }; export type ChannelPermissionBehavior = "allow_once" | "allow_always" | "deny"; export type ChannelSubscription = { server: string; channel: string; }; export type ChannelSubscriptionHandle = { unsubscribe: () => void; subscriptions: ChannelSubscription[]; }; type ChannelPermissionRequest = { requestId: string; tool: string; description: string; preview: string; source?: string; user?: string; session?: string; thread?: string; }; export type ServerAuthStatus = { name: string; transportType: McpTransport["type"]; status: "unsupported" | "authenticated" | "expired" | "unauthenticated"; }; /** * Holds one {@link McpClient} per named entry in {@link Config}. Call {@link reload} * after changing the file on disk (or construct and then {@link reload} once). */ export declare class Manager { private readonly config; private readonly acp; private readonly servers; private instances; private readonly oauth; private readonly permissions; constructor(config: Config, acp?: boolean, servers?: readonly NamedMcpTransport[], oauth?: McpOAuthService); /** Lazily builds clients from the current in-memory config (reloads file first). */ get clients(): ReadonlyMap; /** * Rereads the config file, replaces all clients, and best-effort disconnects * previous clients (stdio subprocesses, HTTP sessions). */ reload(): void; disconnect(): Promise; listServers(): NamedMcpTransport[]; getServer(name: string): NamedMcpTransport | undefined; authenticate(name: string): Promise; logout(name: string, scope?: "all" | "client" | "tokens" | "discovery"): Promise; listAuthStatuses(): Promise; /** * Lists tools from every configured MCP client with names prefixed by a * slugified server config key (see {@link PrefixedMcpTool}). */ listPrefixedTools(): Promise; /** * Collects optional server-level instructions from each connected MCP server. */ listServerInstructions(): Promise; subscribeToChannels(channels: readonly string[], onMessage: (message: ChannelMessage) => void): Promise; supportsChannelPermission(server: string): Promise; requestChannelPermission(server: string, request: ChannelPermissionRequest, timeoutMs?: number): Promise; private toChannelPrompt; } export {};