import { ResourceContext, ResourceEntry, type EntryOwnerRef, type ParsedResourceResult, type ResourceMetadata, type ResourceReadExtra, type ResourceRecord, type ResourceSafeTransformResult, type ResourceTemplateMetadata, type ResourceTemplateRecord, type ScopeEntry } from '../common'; import type HookRegistry from '../hooks/hook.registry'; import type ProviderRegistry from '../provider/provider.registry'; export declare class ResourceInstance = Record, Out = unknown> extends ResourceEntry { private readonly _providers; readonly scope: ScopeEntry; readonly hooks: HookRegistry; /** * Get the provider registry for this resource. * Used by flows to build context-aware providers for CONTEXT-scoped dependencies. */ get providers(): ProviderRegistry; /** Parsed URI template info for template resources */ private templateInfo?; constructor(record: ResourceRecord | ResourceTemplateRecord, providers: ProviderRegistry, owner: EntryOwnerRef); protected initialize(): Promise; getMetadata(): ResourceMetadata | ResourceTemplateMetadata; /** * Get an argument completer for a template parameter. * * Supports two patterns (both have full DI access via `this.get()`): * * 1. **Convention-based (preferred):** Define `${argName}Completer` on the resource class. * Example: `async accountNameCompleter(partial: string) { ... }` * * 2. **Override-based:** Override `getArgumentCompleter(argName)` on the resource class. * * Convention-based completers take priority over override-based ones. */ getArgumentCompleter(argName: string): ((partial: string) => Promise<{ values: string[]; total?: number; hasMore?: boolean; }> | { values: string[]; total?: number; hasMore?: boolean; }) | null; /** * Match a URI against this resource. * For static resources: exact match against uri * For templates: pattern match and extract parameters */ matchUri(uri: string): { matches: boolean; params: Params; }; /** * Create a resource context (class or function wrapper). */ create(uri: string, params: Params, ctx: ResourceReadExtra): ResourceContext; /** * Convert the raw resource return value into an MCP ReadResourceResult. */ parseOutput(raw: Out): ParsedResourceResult; /** * Safe version of parseOutput that returns success/error instead of throwing. */ safeParseOutput(raw: Out): ResourceSafeTransformResult; } //# sourceMappingURL=resource.instance.d.ts.map