/** * Asset discovery + binding for Photon instances. * * Wraps `discoverAssets` from photon-core with the runtime-specific bits: * method-level `@ui` linking, `ui://` URI generation for the MCP Apps * extension, and exposing the metadata on `this.assets` without breaking * the inherited `assets(subpath)` callable on Photon subclasses. * * Extracted from PhotonLoader so the loader doesn't need to know how * UI assets get woven onto an instance. */ import { type PhotonAssets } from '@portel/photon-core'; type LogFn = (message: string, meta?: Record) => void; export declare class AssetResolver { private readonly log; constructor(log: LogFn); /** * Discover assets from a photon source. Delegates to photon-core for the * filesystem walk, then layers in method-level `@ui` links and `ui://` URIs. */ discover(photonPath: string, source: string): Promise; /** * Expose discovered asset metadata on the instance without breaking * `Photon.assets(subpath)`. * * Photon subclasses inherit a callable `assets(subpath)` method. We bind * it to the instance and decorate the function object with metadata so * both `this.assets('templates')` and `this.assets.ui` work. Plain * classes with no inherited method receive the metadata object directly. */ attachToInstance(instance: Record, assets: PhotonAssets | undefined): void; /** * Generate ui:// URIs for all UI assets (MCP Apps Extension, SEP-1865). * URI format: ui:/// */ private generateAssetURIs; private resolveDeclaredPaths; private discoverPathlessUIAssets; private applyPathlessUIAssets; private resolvePathlessUIAssets; private extractClassPathlessUIIds; /** * Apply method-level `@ui` annotations to link UI assets to tools. * Called after auto-discovery so all UI assets are available to look up. */ private applyMethodUILinks; } export {}; //# sourceMappingURL=asset-resolver.d.ts.map