/** * Photon Service * * Manages Photon lifecycle (TypeScript-based MCPs): * - Dynamic photon loading and unloading * - Atomic updates with state rollback * - Tool registry management */ import type { OrchestratorContext } from '../interfaces/orchestrator-context.js'; import type { OrchestratorService } from '../interfaces/service-container.js'; import type { ToolInfo } from '../types/discovery.js'; /** * Internal MCP Manager interface (external dependency) */ export interface InternalMCPManager { loadPhotons(): Promise; } /** * Photon Service implementation */ export declare class PhotonService implements OrchestratorService { private context; private internalMCPManager; private initialized; private stateBackup; private lockedPhotons; private lockQueues; constructor(context: OrchestratorContext); /** * Initialize the service */ initialize(): Promise; /** * Set the internal MCP manager (injected from orchestrator) */ setInternalMCPManager(manager: InternalMCPManager): void; /** * Add a new photon dynamically */ addPhoton(photonName: string, _photonPath: string): Promise; /** * Remove a photon dynamically */ removePhoton(photonName: string): Promise; /** * Update a photon dynamically */ updatePhoton(photonName: string, _photonPath: string): Promise; /** * Get photon tools by name */ getPhotonTools(photonName: string): ToolInfo[]; /** * Remove photon tools from state */ private removePhotonFromState; /** * Get mutable state (for modifications) */ private getMutableState; /** * Save current state for atomic operations */ private saveState; /** * Restore previous state after failure */ private restoreState; /** * Clear state backup after success */ private clearStateBackup; /** * Acquire lock for a photon */ private acquireLock; /** * Release lock for a photon */ private releaseLock; /** * Cleanup */ cleanup(): Promise; } /** * Create a photon service instance */ export declare function createPhotonService(context: OrchestratorContext): PhotonService; //# sourceMappingURL=photon-service.d.ts.map