Public declaration syntax from forge-ts/packages/forge-core/src/provider.ts Original source SHA-256: 23f7404f594990af9783d145f03d01eb785c909bdc91913739bd6c65f32d5fe1 Function bodies and constant values are omitted. This is not the complete implementation. Source line 27 export class ProviderRef { readonly namespace: string; readonly model: string; readonly full: string; static parse(input: string): ProviderRef; toString(): string; toJSON(): { namespace: string; model: string; full: string }; } Source line 88 export interface ProviderMetadata { /** Human-readable name. */ readonly name: string; /** Provider namespace (e.g., "openai"). */ readonly namespace: string; /** Whether the provider supports tool calling. */ readonly supportsToolCalling: boolean; /** Whether the provider supports structured output. */ readonly supportsStructuredOutput: boolean; /** Whether the provider supports streaming. */ readonly supportsStreaming: boolean; /** Whether the provider supports image input. */ readonly supportsImageInput: boolean; /** Provider-session runtime capabilities for coding-style integrations. */ readonly runtimeCapabilities: ProviderRuntimeCapabilities; } Source line 108 export enum RuntimeCapability { ToolCalls = 'tool_calls', DelegatedAgents = 'delegated_agents', TerminalSession = 'terminal_session', StructuredPatch = 'structured_patch', Attachments = 'attachments', Interrupts = 'interrupts', ResumeSession = 'resume_session', ApprovalCheckpoints = 'approval_checkpoints', UsageStreaming = 'usage_streaming', TranscriptExport = 'transcript_export', } Source line 124 export class ProviderRuntimeCapabilities { readonly baselineContract: boolean; readonly capabilities: readonly RuntimeCapability[]; constructor( baselineContract = false, capabilities: readonly RuntimeCapability[] = [] ); static baseline(): ProviderRuntimeCapabilities; withCapability(capability: RuntimeCapability): ProviderRuntimeCapabilities; supports(capability: RuntimeCapability): boolean; } Source line 152 export interface ProviderNegotiationRequest { readonly providerRef: string; readonly requireBaselineContract: boolean; readonly requiredCapabilities: readonly RuntimeCapability[]; } Source line 158 export interface ProviderNegotiationResult { readonly providerRef: string; readonly baselineContract: boolean; readonly negotiatedCapabilities: readonly RuntimeCapability[]; } Source line 164 export enum ProviderSessionState { Created = 'created', Ready = 'ready', Running = 'running', Interrupted = 'interrupted', Completed = 'completed', Cancelled = 'cancelled', Failed = 'failed', Expired = 'expired', Closed = 'closed', } Source line 176 export interface ProviderUsageSummary { readonly inputTokens: number; readonly outputTokens: number; readonly totalTokens: number; } Source line 182 export interface ProviderSessionEvent { readonly sessionId: string; readonly state: ProviderSessionState; readonly message?: string; readonly usage?: ProviderUsageSummary; } Source line 203 export class ProviderRegistry { register(providerRef: string, model: LanguageModel): void; registerWithRuntime( providerRef: string, model: LanguageModel, runtimeCapabilities: ProviderRuntimeCapabilities ): void; get(providerRef: string): LanguageModel | undefined; require(providerRef: string): LanguageModel; metadata(providerRef: string): ProviderMetadata | undefined; negotiate(request: ProviderNegotiationRequest): ProviderNegotiationResult; list(): string[]; get size(): number; get isEmpty(): boolean; }