@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
37 lines • 2.19 kB
TypeScript
import type { ExtensionAPI, ExtensionUIContext } from "../../../types.ts";
import type { ToolSearchService } from "../../tool-search/service.ts";
import type { McpCachedServerCatalog } from "../catalog-cache.ts";
import type { ResolvedMcpConfig } from "../config-schema.ts";
import type { ServerConnection } from "../connection.ts";
import type { McpOutputArtifacts } from "../guard/output-guard.ts";
import type { McpInvocationResolver } from "../invocation.ts";
import { type McpLogger } from "../log.ts";
import type { McpPromptServer } from "../prompts.ts";
import type { McpRequestOriginFor } from "../request-origin.ts";
import { type McpResourceServer } from "../resources.ts";
import type { McpCatalogRegistrationOptions } from "./register.ts";
import { type McpTierBRegistration } from "./tier-b.ts";
export type McpSessionRegistration = McpTierBRegistration & {
resourceServers: McpResourceServer[];
promptServers: McpPromptServer[];
};
export interface McpDirectRegistrationEntry {
readonly requestOrigin?: McpRequestOriginFor;
readonly bindPresentation?: (ui: ExtensionUIContext) => void;
readonly name: string;
readonly connection: ServerConnection;
readonly logger: McpLogger;
readonly agentDir?: string;
readonly artifacts?: McpOutputArtifacts;
readonly cachedCatalog?: McpCachedServerCatalog;
readonly ensureFresh?: () => Promise<void>;
readonly ensureCachedToolConnected?: () => Promise<void>;
readonly invocation?: McpInvocationResolver;
/** A startup connect still owns this server's catalog; its refresh registers it. */
readonly startupCatalogPending?: boolean;
/** Service admission and registry updates never enumerate a remote server. */
readonly localCatalogOnly?: boolean;
readonly onRegistered?: (identity: string) => void;
}
export declare function registerDirectMcpTools(pi: Pick<ExtensionAPI, "getActiveTools" | "setActiveTools" | "registerTool">, config: ResolvedMcpConfig, entries: Iterable<McpDirectRegistrationEntry>, toolSearchService: ToolSearchService, options?: McpCatalogRegistrationOptions): Promise<McpSessionRegistration | undefined>;
//# sourceMappingURL=session.d.ts.map