@codesoul-co/hypha-mcp / connection-manager
- Package index:
@codesoul-co/hypha-mcp - Source:
packages/mcp/src/connection-manager.ts - Exports: 18
Using this module
Use the Connection manager module for using the public contracts and operations for this capability boundary. It exports 2 classes, 4 constants, 2 functions, 9 interfaces, 1 type.
Import from the package entrypoint
import {
MCPConnectionManager,
SDKMCPConnectionSessionFactory,
mcpConnectionRecordDefinition,
mcpConnectionRecordExample,
mcpConnectionRecordJsonSchema,
mcpConnectionRecordSchema,
assertRemoteEgressAllowed,
createGuardedMCPFetch,
} from '@codesoul-co/hypha-mcp';
import type {
GuardedMCPFetchOptions,
MCPConnectionManagerOptions,
MCPConnectionRecord,
MCPConnectionSession,
MCPConnectionSessionFactory,
MCPConnectionStatus,
MCPRemoteContentArtifact,
MCPRemoteContentArtifactPort,
} from '@codesoul-co/hypha-mcp';
// The complete export list is documented below.Usage patterns
- Use the 10 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 2 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
- The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 4 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Runtime validation example
import { mcpConnectionRecordSchema } from '@codesoul-co/hypha-mcp';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = mcpConnectionRecordSchema.parse(input);Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
MCPConnectionManager | class | new MCPConnectionManager(options: MCPConnectionManagerOptions): MCPConnectionManager | MCP Connection Manager class with 16 public constructor or member entries; its exact declarations are listed below. |
SDKMCPConnectionSessionFactory | class | new SDKMCPConnectionSessionFactory(options?: SDKMCPConnectionSessionFactoryOptions): SDKMCPConnectionSessionFactory | SDKMCP Connection Session Factory class with 2 public constructor or member entries; its exact declarations are listed below. |
mcpConnectionRecordDefinition | constant | const mcpConnectionRecordDefinition: SpecSchemaDefinition<MCPConnectionRecord> | MCP Connection Record Definition constant exported by the connection-manager module. |
mcpConnectionRecordExample | constant | const mcpConnectionRecordExample: MCPConnectionRecord | Valid example value for MCP Connection Record. |
mcpConnectionRecordJsonSchema | constant | const mcpConnectionRecordJsonSchema: JsonSchema | JSON Schema for MCP Connection Record. |
mcpConnectionRecordSchema | constant | const mcpConnectionRecordSchema: z.ZodObject<{ id: z.ZodString; serverId: z.ZodString; revision: z.ZodNumber; state: z.ZodEnum<["disconnected", "starting", "initializing", "ready", "degraded", "reconnecting", "closing", "closed", "failed"]>; transportType: z.ZodEnum<["stdio", "streamable_http", "custom"]>; negotiatedProtocolVersion: z.ZodOptional<z.ZodString>; clientInfo: z.ZodOptional<z.ZodRecord<z.ZodString, z.Z... | Runtime schema for MCP Connection Record. |
assertRemoteEgressAllowed | function | assertRemoteEgressAllowed(endpoint: string, policy: MCPServerProfile["egressPolicy"]): Promise<void> | Assert Remote Egress Allowed function with 1 public call signature; parameters and return types are listed below. |
createGuardedMCPFetch | function | createGuardedMCPFetch(options?: GuardedMCPFetchOptions): MCPFetch | Applies the remote MCP egress policy to every request and redirect hop. Credentials are resolved immediately before each request so rotations take effect without rebuilding declarative profiles. |
GuardedMCPFetchOptions | interface | interface GuardedMCPFetchOptions | Guarded MCP Fetch Options interface with 4 public fields or methods. |
MCPConnectionManagerOptions | interface | interface MCPConnectionManagerOptions | MCP Connection Manager Options interface with 12 public fields or methods. |
MCPConnectionRecord | interface | interface MCPConnectionRecord | MCP Connection Record interface with 18 public fields or methods. |
MCPConnectionSession | interface | interface MCPConnectionSession | MCP Connection Session interface with 9 public fields or methods. |
MCPConnectionSessionFactory | interface | interface MCPConnectionSessionFactory | MCP Connection Session Factory interface with 1 public fields or methods. |
MCPConnectionStatus | interface | interface MCPConnectionStatus | MCP Connection Status interface with 2 public fields or methods. |
MCPRemoteContentArtifact | interface | interface MCPRemoteContentArtifact | MCP Remote Content Artifact interface with 3 public fields or methods. |
MCPRemoteContentArtifactPort | interface | interface MCPRemoteContentArtifactPort | MCP Remote Content Artifact Port interface with 1 public fields or methods. |
SDKMCPConnectionSessionFactoryOptions | interface | interface SDKMCPConnectionSessionFactoryOptions | SDKMCP Connection Session Factory Options interface with 5 public fields or methods. |
MCPConnectionState | type | type MCPConnectionState = 'disconnected' | 'starting' | 'initializing' | 'ready' | 'degraded' | 'reconnecting' | 'closing' | 'closed' | 'failed' | Public type alias for MCP Connection State; the declaration contains its complete type expression. |
MCPConnectionManager
MCP Connection Manager class with 16 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MCPConnectionManager } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export declare class MCPConnectionManager implements MCPGateway {
constructor(options: MCPConnectionManagerOptions);
onListChanged(listener: (serverId: string) => Promise<void> | void): () => void;
register(profile: MCPServerProfile): MCPConnectionRecord;
connect(serverId: string): Promise<MCPConnectionRecord>;
get(serverId: string): Promise<MCPConnectionRecord | null>;
status(serverId: string): Promise<MCPConnectionStatus>;
health(serverId?: string): Promise<Record<string, ProviderHealth>>;
reconnect(serverId: string): Promise<MCPConnectionRecord>;
cancelRequest(requestId: string): Promise<void>;
disconnect(serverId: string, reason?: string): Promise<void>;
closeAll(): Promise<void>;
discover(integration: MCPIntegrationSpec): Promise<MCPCapabilityDescriptor[]>;
normalize(capability: MCPCapabilityDescriptor): Promise<NormalizedMCPCapability>;
call(request: MCPToolCallRequest): Promise<unknown>;
readResource(request: MCPResourceReadRequest): Promise<MCPResourceResult>;
getPrompt(request: MCPPromptRequest): Promise<MCPPromptResult>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
call | method | call(request: MCPToolCallRequest): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
cancelRequest | method | cancelRequest(requestId: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
closeAll | method | closeAll(): Promise<void> | Public method; parameters and return type are shown in the signature. |
connect | method | connect(serverId: string): Promise<MCPConnectionRecord> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options: MCPConnectionManagerOptions): MCPConnectionManager | Creates an instance of this class. |
disconnect | method | disconnect(serverId: string, reason?: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
discover | method | discover(integration: MCPIntegrationSpec): Promise<MCPCapabilityDescriptor[]> | Public method; parameters and return type are shown in the signature. |
get | method | get(serverId: string): Promise<MCPConnectionRecord | null> | Public method; parameters and return type are shown in the signature. |
getPrompt | method | getPrompt(request: MCPPromptRequest): Promise<MCPPromptResult> | Public method; parameters and return type are shown in the signature. |
health | method | health(serverId?: string): Promise<Record<string, ProviderHealth>> | Public method; parameters and return type are shown in the signature. |
normalize | method | normalize(capability: MCPCapabilityDescriptor): Promise<NormalizedMCPCapability> | Public method; parameters and return type are shown in the signature. |
onListChanged | method | onListChanged(listener: (serverId: string) => Promise<void> | void): () => void | Public method; parameters and return type are shown in the signature. |
readResource | method | readResource(request: MCPResourceReadRequest): Promise<MCPResourceResult> | Public method; parameters and return type are shown in the signature. |
reconnect | method | reconnect(serverId: string): Promise<MCPConnectionRecord> | Public method; parameters and return type are shown in the signature. |
register | method | register(profile: MCPServerProfile): MCPConnectionRecord | Public method; parameters and return type are shown in the signature. |
status | method | status(serverId: string): Promise<MCPConnectionStatus> | Public method; parameters and return type are shown in the signature. |
SDKMCPConnectionSessionFactory
SDKMCP Connection Session Factory class with 2 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { SDKMCPConnectionSessionFactory } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export declare class SDKMCPConnectionSessionFactory implements MCPConnectionSessionFactory {
constructor(options?: SDKMCPConnectionSessionFactoryOptions);
create(profile: MCPServerProfile): MCPConnectionSession;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options?: SDKMCPConnectionSessionFactoryOptions): SDKMCPConnectionSessionFactory | Creates an instance of this class. |
create | method | create(profile: MCPServerProfile): MCPConnectionSession | Public method; parameters and return type are shown in the signature. |
mcpConnectionRecordDefinition
MCP Connection Record Definition constant exported by the connection-manager module.
- Kind: constant
- Import:
import { mcpConnectionRecordDefinition } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export declare const mcpConnectionRecordDefinition: SpecSchemaDefinition<MCPConnectionRecord>;mcpConnectionRecordExample
Valid example value for MCP Connection Record.
- Kind: constant
- Import:
import { mcpConnectionRecordExample } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export declare const mcpConnectionRecordExample: MCPConnectionRecord;mcpConnectionRecordJsonSchema
JSON Schema for MCP Connection Record.
- Kind: constant
- Import:
import { mcpConnectionRecordJsonSchema } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export declare const mcpConnectionRecordJsonSchema: JsonSchema;mcpConnectionRecordSchema
Runtime schema for MCP Connection Record.
- Kind: constant
- Import:
import { mcpConnectionRecordSchema } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const mcpConnectionRecordSchema: (typeof import('@codesoul-co/hypha-mcp'))['mcpConnectionRecordSchema'];This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.
assertRemoteEgressAllowed
Assert Remote Egress Allowed function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertRemoteEgressAllowed } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export declare function assertRemoteEgressAllowed(endpoint: string, policy: MCPServerProfile['egressPolicy']): Promise<void>;Call signature
assertRemoteEgressAllowed(endpoint: string, policy: MCPServerProfile["egressPolicy"]): Promise<void>Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
endpoint | string | Yes | Required parameter; accepted values are defined by the type column. |
policy | { allowedHosts?: string[]; denyPrivateNetworks?: boolean; requireTls?: boolean; maxRedirects?: number; allowCrossOriginRedirects?: boolean; } | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
Promise<void> - Description: The return contract is defined by the type shown above.
createGuardedMCPFetch
Applies the remote MCP egress policy to every request and redirect hop. Credentials are resolved immediately before each request so rotations take effect without rebuilding declarative profiles.
- Kind: function
- Import:
import { createGuardedMCPFetch } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export declare function createGuardedMCPFetch(options?: GuardedMCPFetchOptions): MCPFetch;Call signature
createGuardedMCPFetch(options?: GuardedMCPFetchOptions): MCPFetchApplies the remote MCP egress policy to every request and redirect hop. Credentials are resolved immediately before each request so rotations take effect without rebuilding declarative profiles.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | GuardedMCPFetchOptions | No | Optional parameter; accepted values are defined by the type column. |
Returns
- Type:
MCPFetch - Description: The return contract is defined by the type shown above.
GuardedMCPFetchOptions
Guarded MCP Fetch Options interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { GuardedMCPFetchOptions } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface GuardedMCPFetchOptions {
policy?: MCPServerProfile['egressPolicy'];
fetch?: MCPFetch;
resolveHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
resolveAuthorization?: () => Promise<string | undefined> | string | undefined;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fetch | method | fetch?(input: string | URL | Request, init?: RequestInit): Promise<Response> | Public method; parameters and return type are shown in the signature. |
policy | property | policy?: { allowedHosts?: string[]; denyPrivateNetworks?: boolean; requireTls?: boolean; maxRedirects?: number; allowCrossOriginRedirects?: boolean; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
resolveAuthorization | method | resolveAuthorization?(): Promise<string | undefined> | string | undefined | Public method; parameters and return type are shown in the signature. |
resolveHeaders | method | resolveHeaders?(): Promise<Record<string, string>> | Record<string, string> | Public method; parameters and return type are shown in the signature. |
MCPConnectionManagerOptions
MCP Connection Manager Options interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { MCPConnectionManagerOptions } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface MCPConnectionManagerOptions {
sessionFactory: MCPConnectionSessionFactory;
trace?: TraceRecorder;
traceContext?: {
runId: string;
stepId?: string;
sessionId?: string;
};
now?: () => string;
monotonicNow?: () => number;
sleep?: (ms: number) => Promise<void>;
random?: () => number;
onListChanged?: (serverId: string) => Promise<void> | void;
telemetry?: TelemetryRecorder;
contentArtifacts?: MCPRemoteContentArtifactPort;
reconnectCoordinator?: MCPReconnectCoordinator;
reconnectOwnerId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
contentArtifacts | property | contentArtifacts?: MCPRemoteContentArtifactPort | Public property; its type, readonly modifier and optionality are shown in the signature. |
monotonicNow | method | monotonicNow?(): number | Public method; parameters and return type are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
onListChanged | method | onListChanged?(serverId: string): Promise<void> | void | Public method; parameters and return type are shown in the signature. |
random | method | random?(): number | Public method; parameters and return type are shown in the signature. |
reconnectCoordinator | property | reconnectCoordinator?: MCPReconnectCoordinator | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconnectOwnerId | property | reconnectOwnerId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionFactory | property | sessionFactory: MCPConnectionSessionFactory | Public property; its type, readonly modifier and optionality are shown in the signature. |
sleep | method | sleep?(ms: number): Promise<void> | Public method; parameters and return type are shown in the signature. |
telemetry | property | telemetry?: TelemetryRecorder | Public property; its type, readonly modifier and optionality are shown in the signature. |
trace | property | trace?: TraceRecorder | Public property; its type, readonly modifier and optionality are shown in the signature. |
traceContext | property | traceContext?: { runId: string; stepId?: string; sessionId?: string; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPConnectionRecord
MCP Connection Record interface with 18 public fields or methods.
- Kind: interface
- Import:
import type { MCPConnectionRecord } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface MCPConnectionRecord {
id: string;
serverId: string;
revision: number;
state: MCPConnectionState;
transportType: MCPTransportSpec['type'];
negotiatedProtocolVersion?: string;
clientInfo?: Record<string, unknown>;
serverInfo?: Record<string, unknown>;
serverCapabilities?: Record<string, unknown>;
startedAt?: string;
readyAt?: string;
lastActivityAt?: string;
lastHealthCheckAt?: string;
closedAt?: string;
activeRequestCount: number;
reconnectAttempts: number;
error?: NormalizedMCPError;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activeRequestCount | property | activeRequestCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
clientInfo | property | clientInfo?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
closedAt | property | closedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
error | property | error?: NormalizedMCPError | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastActivityAt | property | lastActivityAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastHealthCheckAt | property | lastHealthCheckAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
negotiatedProtocolVersion | property | negotiatedProtocolVersion?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
readyAt | property | readyAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconnectAttempts | property | reconnectAttempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverCapabilities | property | serverCapabilities?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverId | property | serverId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverInfo | property | serverInfo?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
startedAt | property | startedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
state | property | state: MCPConnectionState | Public property; its type, readonly modifier and optionality are shown in the signature. |
transportType | property | transportType: "custom" | "stdio" | "streamable_http" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPConnectionSession
MCP Connection Session interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { MCPConnectionSession } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface MCPConnectionSession {
connect(signal?: AbortSignal): Promise<{
negotiatedProtocolVersion?: string;
serverInfo?: Record<string, unknown>;
serverCapabilities?: Record<string, unknown>;
}>;
listCapabilities(signal?: AbortSignal): Promise<MCPCapabilityDescriptor[]>;
callTool(capabilityId: string, input: unknown, options?: {
signal?: AbortSignal;
timeoutMs?: number;
onProgress?: (progress: unknown) => void;
}): Promise<unknown>;
readResource?(uri: string, options?: {
signal?: AbortSignal;
timeoutMs?: number;
}): Promise<MCPResourceResult>;
getPrompt?(name: string, args?: Record<string, string>, options?: {
signal?: AbortSignal;
timeoutMs?: number;
}): Promise<MCPPromptResult>;
ping(signal?: AbortSignal): Promise<void>;
close(): Promise<void>;
onClose?: (error?: Error) => void;
onListChanged?: () => void;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
callTool | method | callTool(capabilityId: string, input: unknown, options?: { signal?: AbortSignal; timeoutMs?: number; onProgress?: (progress: unknown) => void; }): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
close | method | close(): Promise<void> | Public method; parameters and return type are shown in the signature. |
connect | method | connect(signal?: AbortSignal): Promise<{ negotiatedProtocolVersion?: string; serverInfo?: Record<string, unknown>; serverCapabilities?: Record<string, unknown>; }> | Public method; parameters and return type are shown in the signature. |
getPrompt | method | getPrompt?(name: string, args?: Record<string, string>, options?: { signal?: AbortSignal; timeoutMs?: number; }): Promise<MCPPromptResult> | Public method; parameters and return type are shown in the signature. |
listCapabilities | method | listCapabilities(signal?: AbortSignal): Promise<MCPCapabilityDescriptor[]> | Public method; parameters and return type are shown in the signature. |
onClose | method | onClose?(error?: Error): void | Public method; parameters and return type are shown in the signature. |
onListChanged | method | onListChanged?(): void | Public method; parameters and return type are shown in the signature. |
ping | method | ping(signal?: AbortSignal): Promise<void> | Public method; parameters and return type are shown in the signature. |
readResource | method | readResource?(uri: string, options?: { signal?: AbortSignal; timeoutMs?: number; }): Promise<MCPResourceResult> | Public method; parameters and return type are shown in the signature. |
MCPConnectionSessionFactory
MCP Connection Session Factory interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { MCPConnectionSessionFactory } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface MCPConnectionSessionFactory {
create(profile: MCPServerProfile): MCPConnectionSession;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
create | method | create(profile: MCPServerProfile): MCPConnectionSession | Public method; parameters and return type are shown in the signature. |
MCPConnectionStatus
MCP Connection Status interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MCPConnectionStatus } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface MCPConnectionStatus {
record: MCPConnectionRecord | null;
health: ProviderHealth;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
health | property | health: ProviderHealth | Public property; its type, readonly modifier and optionality are shown in the signature. |
record | property | record: MCPConnectionRecord | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPRemoteContentArtifact
MCP Remote Content Artifact interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MCPRemoteContentArtifact } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface MCPRemoteContentArtifact {
artifactRef: string;
contentHash: string;
sizeBytes: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactRef | property | artifactRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
contentHash | property | contentHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sizeBytes | property | sizeBytes: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPRemoteContentArtifactPort
MCP Remote Content Artifact Port interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { MCPRemoteContentArtifactPort } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface MCPRemoteContentArtifactPort {
store(input: {
serverId: string;
kind: 'resource' | 'prompt';
capabilityId: string;
mediaType: string;
bytes: Uint8Array;
contentHash: string;
provenance: Record<string, unknown>;
}): Promise<MCPRemoteContentArtifact>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
store | method | store(input: { serverId: string; kind: "resource" | "prompt"; capabilityId: string; mediaType: string; bytes: Uint8Array; contentHash: string; provenance: Record<string, unknown>; }): Promise<MCPRemoteContentArtifact> | Public method; parameters and return type are shown in the signature. |
SDKMCPConnectionSessionFactoryOptions
SDKMCP Connection Session Factory Options interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { SDKMCPConnectionSessionFactoryOptions } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export interface SDKMCPConnectionSessionFactoryOptions {
clientInfo?: {
name: string;
version: string;
};
resolveHeadersRef?: (ref: string) => Promise<Record<string, string>> | Record<string, string>;
resolveAuthorizationRef?: (ref: string) => Promise<string> | string;
resolveWorkingDirectoryRef?: (ref: string) => Promise<string> | string;
resolveEnvironmentRefs?: (refs: string[]) => Promise<Record<string, string>> | Record<string, string>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
clientInfo | property | clientInfo?: { name: string; version: string; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
resolveAuthorizationRef | method | resolveAuthorizationRef?(ref: string): Promise<string> | string | Public method; parameters and return type are shown in the signature. |
resolveEnvironmentRefs | method | resolveEnvironmentRefs?(refs: string[]): Promise<Record<string, string>> | Record<string, string> | Public method; parameters and return type are shown in the signature. |
resolveHeadersRef | method | resolveHeadersRef?(ref: string): Promise<Record<string, string>> | Record<string, string> | Public method; parameters and return type are shown in the signature. |
resolveWorkingDirectoryRef | method | resolveWorkingDirectoryRef?(ref: string): Promise<string> | string | Public method; parameters and return type are shown in the signature. |
MCPConnectionState
Public type alias for MCP Connection State; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MCPConnectionState } from '@codesoul-co/hypha-mcp'; - Source module:
connection-manager
Declaration
export type MCPConnectionState = 'disconnected' | 'starting' | 'initializing' | 'ready' | 'degraded' | 'reconnecting' | 'closing' | 'closed' | 'failed';