/** * Which harness the orchestrator runs on. * * The orchestrator's runtime is `runtimeType` in * `/teams/orchestrator/config.json` — the same field * `PUT /api/orchestrator/runtime` and StorageService.updateOrchestratorRuntimeType * write, and the one the orchestrator is launched with (a `DEFAULT_RUNTIME` * env var still overrides it at boot). Setting the orc harness also sets * `settings.general.defaultRuntime`, so new team members default to the one * harness first-time setup installed. * * This module writes the file directly (same lock key and atomic write as * StorageService) instead of instantiating StorageService, so the CLI can use * it without starting the backend's logger. `get` never creates the file: * a fresh machine reports null ("not chosen yet"). * * @module services/harness/orc-harness.store */ import type { HarnessId } from './harness.types.js'; /** Updates `settings.general.defaultRuntime`. */ export type DefaultRuntimeUpdater = (harnessId: HarnessId) => Promise; /** Injectable dependencies. */ export interface OrcHarnessStoreDeps { /** Crewly home dir (defaults to CREWLY_HOME / ~/.crewly, resolved per call) */ crewlyHome?: () => string; /** Settings updater; defaults to the backend SettingsService singleton */ updateDefaultRuntime?: DefaultRuntimeUpdater; } /** Reads and writes the orchestrator's harness. */ export declare class OrcHarnessStore { private readonly crewlyHome; private readonly updateDefaultRuntime; /** * @param deps - Injectable dependencies (all optional) */ constructor(deps?: OrcHarnessStoreDeps); /** * Orchestrator config file path. * * @returns `/teams/orchestrator/config.json` */ getFilePath(): string; /** * The orchestrator's runtime, if one is recorded. * * @returns Runtime id, or null when nothing is recorded yet */ get(): Promise; /** * Set the orchestrator's harness (and the default runtime for new members). * * Takes effect the next time the orchestrator starts. * * @param harnessId - Harness id * @returns The harness id now recorded */ set(harnessId: HarnessId): Promise; } //# sourceMappingURL=orc-harness.store.d.ts.map