/** * Shared utilities for Photon * * Centralized utility functions to eliminate code duplication * across cli.ts, beam.ts, and photon-cli-runner.ts. */ /** * Default bundled photons that ship with the runtime. * Available in CLI, STDIO, and Beam. */ export declare const DEFAULT_BUNDLED_PHOTONS: string[]; /** * Extended bundled photons for Beam (includes tunnel for port forwarding UI) */ export declare const BEAM_BUNDLED_PHOTONS: string[]; /** * Get path to a bundled photon (ships with runtime) * * @param name - Photon name (without .photon.ts extension) * @param callerDir - __dirname of the calling module (used to resolve relative paths) * @param bundledList - List of bundled photon names to check against * @returns Absolute path to photon file, or null if not found * * @example * ```typescript * // From cli.ts (dist/cli.js) * const photonPath = getBundledPhotonPath('maker', __dirname); * * // From beam.ts (dist/auto-ui/beam.js) * const photonPath = getBundledPhotonPath('tunnel', __dirname, BEAM_BUNDLED_PHOTONS); * ``` */ export declare function getBundledPhotonPath(name: string, callerDir: string, bundledList?: string[]): string | null; /** * Detect the available package manager — prefers bun, falls back to npm. * Result is cached for the process lifetime. */ export declare function detectPM(): 'bun' | 'npm' | 'npm.cmd'; /** * Get the package runner command (bunx/npx) matching the detected PM. */ export declare function detectRunner(): 'bunx' | 'npx'; export declare function mcpCommand(photonName: string): { command: string; args: string[]; }; /** * Get the install command for a global package. */ export declare function globalInstallCmd(pkg: string): string; /** * Safely extract error message from unknown error type */ export declare function getErrorMessage(error: unknown): string; //# sourceMappingURL=shared-utils.d.ts.map