/** * Shared child-process `DeployHandle` plumbing for the loopback process targets * (`local`, `nix`). Both stand a workspace up as a host child process reached * over `ws://127.0.0.1:`; the only differences are the command they spawn * and the config they accept. The handle lifecycle (ready → health via pid * liveness → buffered logs → SIGTERM stop) is identical, so it lives here once. */ import { type PortableSubprocess } from "@skaile/workspaces/core"; import { type DeployContext, type DeployHandle } from "@skaile/workspaces/plugin-registry"; import { LineBuffer } from "./stream-lines.js"; /** Minimum payload a process target persists to re-attach on restore. */ export interface ProcessPayload { pid: number; port: number; } /** A spawned child plus the buffer its stdout/stderr are pumped into. */ export interface SpawnedProcess { proc: PortableSubprocess; buffer: LineBuffer; } /** True when a pid is alive (signal 0 probes without delivering a signal). */ export declare function pidAlive(pid: number): boolean; /** Spawn `command args` and pump both stdout and stderr into one LineBuffer. */ export declare function spawnProcess(command: string, args: string[], opts: { cwd: string; env: Record; }): SpawnedProcess; /** * Build the `DeployHandle` for a process target via the shared * {@link makeDeployHandle} factory. `proc` is `null` for a restored handle * (re-attached by pid — no live stream, so `logs()` yields nothing and the * handle starts already `ready`). `defaultReadyTimeoutMs` is the timeout * `ready` gets when `waitReady()` is called without one. */ export declare function buildProcessHandle

(payload: P, ctx: DeployContext, ready: (timeoutMs: number, signal: AbortSignal) => Promise, proc: SpawnedProcess | null, defaultReadyTimeoutMs: number): DeployHandle

; //# sourceMappingURL=process-handle.d.ts.map