import type { Agent, OneShotAgentOutput } from '@vibe-agent-toolkit/agent-schema'; /** * Brand types for session identity (strong typing) */ export type ConnectionId = string & { readonly __brand: 'ConnectionId'; }; export type ConversationId = string & { readonly __brand: 'ConversationId'; }; export type RuntimeSessionId = string & { readonly __brand: 'RuntimeSessionId'; }; export type TraceId = string & { readonly __brand: 'TraceId'; }; /** * MCP tool definition that will be exposed to MCP clients */ export interface MCPToolDefinition { name: string; description: string; inputSchema: Record; } /** * MCP tool result (what MCP clients receive) */ export interface MCPToolResult { content: Array<{ type: 'text'; text: string; }>; isError?: boolean; } /** * Agent registration entry */ export interface AgentRegistration { name: string; agent: Agent>; adapter?: ArchetypeAdapter; } /** * Gateway configuration */ export interface GatewayConfig { agents: AgentRegistration[]; transport: 'stdio' | 'http'; observability?: ObservabilityProvider; } /** * Archetype adapter interface (stateless for Phase 1) */ export interface ArchetypeAdapter { readonly name: string; /** * Converts agent to MCP tool definition */ createToolDefinition(agent: Agent): MCPToolDefinition; /** * Executes agent and returns MCP-formatted result */ execute(agent: Agent, args: Record, connectionId: ConnectionId): Promise; } /** * Observability provider interface (OTel-aligned) */ export interface ObservabilityProvider { getLogger(): Logger; getTracer(): Tracer; getMeter(): Meter; } /** * Logger interface (simplified for Phase 1) */ export interface Logger { info(message: string, context?: Record): void; error(message: string, error?: Error, context?: Record): void; warn(message: string, context?: Record): void; debug(message: string, context?: Record): void; } /** * Tracer interface (no-op for Phase 1, OTel-aligned) */ export interface Tracer { startActiveSpan(name: string, fn: (span: Span) => Promise): Promise; } /** * Span interface (no-op for Phase 1, OTel-aligned) */ export interface Span { setAttribute(key: string, value: string | number | boolean): void; recordException(error: Error): void; setStatus(status: { code: number; }): void; end(): void; } /** * Meter interface (no-op for Phase 1, OTel-aligned) */ export interface Meter { createCounter(name: string): Counter; createHistogram(name: string): Histogram; } /** * Counter interface (no-op for Phase 1) */ export interface Counter { add(value: number, attributes?: Record): void; } /** * Histogram interface (no-op for Phase 1) */ export interface Histogram { record(value: number, attributes?: Record): void; } /** * Helper to create branded ConnectionId */ export declare function createConnectionId(id: string): ConnectionId; /** * Helper to create branded ConversationId */ export declare function createConversationId(id: string): ConversationId; //# sourceMappingURL=types.d.ts.map