/** * Deploy handle contract + the `resolveDeployTarget` precedence resolver. * * A `DeployHandle` is the live, restorable result of standing up a workspace on * a deploy target. `resolveDeployTarget` picks which target+config to use with * an explicit override > yaml > default chain. */ import type { PluginRegistry, TargetMeta } from "./registry.js"; import type { DeployTarget } from "./targets.js"; /** * Live handle to a deployed workspace. `payload` is the target's own opaque * persistence slice (written to `.skaile/deploy/handle.json` and fed back into * `restore()`); the registry wrapper never inspects it. */ export interface DeployHandle { readonly wsUrl: string; /** Redacted form of the auth token, safe to log. */ readonly wsAuth?: string; readonly state: "starting" | "ready" | "stopping" | "stopped" | "errored"; readonly payload: S; waitReady(timeoutMs?: number): Promise; health(): Promise<{ healthy: boolean; detail?: string; }>; logs?(opts?: { sinceMs?: number; follow?: boolean; }): AsyncIterable<{ ts: number; line: string; }>; stop(): Promise; } /** * List the registered deploy targets as lightweight `{ id, displayName }` rows, * the symmetric counterpart to `listDrivers()` / `listConnectors()`. Reads the * process-wide `pluginRegistry` by default, so call * `registerBuiltinDeployTargets()` (and load any plugins) first — unregistered * targets do not appear. Enough to populate a target picker without resolving a * config; use `getDeployTarget(id)` for the full target. */ export declare function listDeployTargets(registry?: PluginRegistry): readonly TargetMeta[]; /** * Look up a single registered deploy target by id, or `undefined` if none is * registered under that id. Thin wrapper over `pluginRegistry.get`, mirroring * `getConnector()`; unlike `resolveDeployTarget` it neither applies the * override/yaml/default precedence nor parses a config. */ export declare function getDeployTarget(id: string, registry?: PluginRegistry): DeployTarget | undefined; /** Outcome of `resolveDeployTarget`: the chosen target, its parsed config, and where it came from. */ export interface DeployResolution { target: DeployTarget; config: unknown; provenance: { source: "default" | "yaml" | "override"; reason?: string; }; } /** * Resolve which deploy target + config to use, with explicit precedence: * CLI override > `skaile.yaml` `deploy:` block > the built-in `local` default. * Config is parsed through the chosen target's `configSchema`, so validation * failures propagate to the caller. */ export declare function resolveDeployTarget(yaml: { deploy?: { target: string; config?: unknown; }; }, override?: { target: string; config?: unknown; reason: string; }, registry?: PluginRegistry): Promise; //# sourceMappingURL=deploy-handle.d.ts.map