/** * Progress event emitted during install. The dashboard API streams * these over SSE so the UI can show a live install log; the CLI * prints them to stdout. Non-progress final outcome goes in the * resolved `InstallResult`. */ export type InstallEvent = { type: "log"; line: string; } | { type: "step"; name: string; } | { type: "warn"; line: string; }; export type ProgressHandler = (event: InstallEvent) => void; export interface InstallOptions { /** Git URL or local path. */ source: string; /** Override the derived module name. */ name?: string; /** Skip pnpm install + pnpm build. */ noBuild?: boolean; /** Register the source path as-is instead of cloning/copying. */ pathOnly?: boolean; /** Write host paths to config instead of container paths. */ native?: boolean; /** Override the host install root (default: PRZM_CORTEX_HOME_HOST/modules). */ hostRoot?: string; /** Override the container modules root (default: /root/.cortex/modules). */ containerRoot?: string; /** Override the config write target (default: active workspace). */ writeTargetRoot?: string; /** Callback for streaming progress. Default: no-op. */ onProgress?: ProgressHandler; } export interface InstallResult { ok: boolean; name: string; hostPath: string; containerPath: string; /** The cortex.local.yaml path that got written. */ configPath?: string; /** `true` when the path was newly added, `false` when already registered. */ added?: boolean; /** Tools the module exports, discovered during validation. */ toolNames: string[]; /** Terminal reason when `ok: false`. */ error?: string; } export declare function runModuleCommand(args: readonly string[]): Promise; /** * Pure install flow. Emits progress events via `onProgress` and * resolves with a structured result. The CLI and the dashboard API * both call this — progress lines go to stdout + SSE respectively. */ export declare function installModule(opts: InstallOptions): Promise; export declare function looksLikeGitUrl(s: string): boolean; export declare function deriveName(source: string): string; /** Translate a container path back to a host path, or undefined if it's outside the mount. */ export declare function toHostPath(containerPath: string, containerRoot: string, hostRoot: string): string | undefined; /** Translate a host path to its equivalent container path. */ export declare function toContainerPath(hostPath: string, hostRoot: string, containerRoot: string): string | undefined; //# sourceMappingURL=module-install.d.ts.map