import { controllerMcpTypedRequestPath } from '../dist_ts_interfaces/index.js'; import { type IAGLHomePaths } from './classes.aglhome.js'; import { type IControllerProcessIdentity } from './classes.processinspection.js'; declare const controllerMcpDescriptorSchemaVersion: 1; export type TControllerMcpDescriptorErrorCode = 'CONTROLLER_UNAVAILABLE' | 'FENCED'; export declare class ControllerMcpDescriptorError extends Error { readonly code: TControllerMcpDescriptorErrorCode; constructor(codeArg: TControllerMcpDescriptorErrorCode, messageArg: string, optionsArg?: ErrorOptions); } export interface IControllerMcpDescriptor { schemaVersion: typeof controllerMcpDescriptorSchemaVersion; packageName: string; packageVersion: string; protocolVersion: number; upgradeManagementVersion: number; controllerPort: number; lifecycleGeneration: string; origin: string; privatePort: number; path: typeof controllerMcpTypedRequestPath; controllerPid: number; processGroupId: number; processFingerprint: string; processStartTicks: string; token: string; publishedAt: number; } export interface IControllerMcpDescriptorFileIdentity { device: string; inode: string; } export interface IControllerMcpDescriptorRecord { descriptor: IControllerMcpDescriptor; fileIdentity: IControllerMcpDescriptorFileIdentity; } export interface IControllerMcpDescriptorAccessOptions { paths?: IAGLHomePaths; readProcessIdentity?: (pidArg: number) => Promise; } export interface IControllerMcpDescriptorPublisherOptions extends IControllerMcpDescriptorAccessOptions { controllerPort: number; } export interface IPublishControllerMcpDescriptorInput { lifecycleGeneration: string; privatePort: number; processIdentity: IControllerProcessIdentity; } export declare const serializeControllerMcpDescriptor: (descriptorArg: IControllerMcpDescriptor) => string; export declare const readLiveControllerMcpDescriptor: (controllerPortArg: number, optionsArg?: IControllerMcpDescriptorAccessOptions) => Promise; export declare class ControllerMcpDescriptorPublisher { private readonly paths; private readonly readProcessIdentity; private readonly controllerPort; private published?; private pendingCleanup?; private lifecycleOperation; constructor(optionsArg: IControllerMcpDescriptorPublisherOptions); get descriptor(): IControllerMcpDescriptor | undefined; publish(inputArg: IPublishControllerMcpDescriptorInput): Promise; removeOwned(): Promise; private runLifecycleOperation; private createRemovalCleanupState; private assertExpectedRecord; private cleanupOwnedPath; private retryPendingCleanup; private publishExclusive; private recoverInterruptedPublications; } export {};