/** * Kubernetes sidecar manifest renderer (DEC-058 / Scenario A of DEC-056). * * Produces a `containers` + `volumes` fragment that can be merged into an * existing Pod spec (typically a `remote` session Pod) so the * runtime CLI container and an `h2a mcp-serve` sidecar share the same * `/.h2a/` directory through an `emptyDir`. * * Two image modes: * * - `npm-runtime` (default) — uses a generic `node:22-alpine` image and * `npm i -g @sentropic/h2a@` at Pod start. No custom image * to build. Trade-off: ~10s install latency on Pod start. Suitable for * PoC and demos. * * - explicit image reference (e.g. `ghcr.io/rhanka/h2a-cli:0.1.20`) — uses * the given image which is expected to provide `h2a` on PATH. No install * at runtime. Suitable for production once a real image is published. * * The renderer is pure: no I/O, no filesystem access. The caller decides * whether to print the YAML or merge it into an existing manifest. */ export interface K8sSidecarOptions { /** * Instance id to declare to h2a at session open. Defaults to a placeholder * of `remote:${SESSION_ID}` if running inside the * `@sentropic/remote` context — that env var is expected to be * injected by the parent control plane. */ readonly instance?: string; /** * Host hint passed to `h2a_session_open`. Defaults to "remote". */ readonly host?: string; /** * Filesystem path where `/.h2a/` lives inside the session Pod. * Default `/workspace/.h2a`, matching `remote`'s PVC mount. */ readonly root?: string; /** * Image strategy: `"npm-runtime"` (default) or a concrete OCI image * reference (e.g. `"ghcr.io/rhanka/h2a-cli:0.1.20"`). */ readonly image?: string; /** * Version pinned for the `npm i -g` line when `image = "npm-runtime"`. * Defaults to `latest`. Pin to a known X.Y.Z for reproducible Pods. */ readonly cliVersion?: string; /** * Sidecar container name. Default `h2a-mcp`. */ readonly containerName?: string; /** * Shared volume name. Default `h2a-workspace`. The caller is responsible * for ensuring the main runtime container mounts the same volume at the * same path. */ readonly volumeName?: string; /** * Resource requests/limits. Conservative defaults aligned with the * `sentropic-remote` tenant contract (DEC-056). */ readonly resources?: { readonly requests?: { cpu?: string; memory?: string; }; readonly limits?: { cpu?: string; memory?: string; }; }; } export interface K8sSidecarFragment { /** Container spec to append to `spec.containers[]`. */ readonly container: Record; /** Volume spec to append to `spec.volumes[]`. */ readonly volume: Record; /** Volume mount the caller must also append to the main runtime container. */ readonly mainContainerVolumeMount: Record; /** Convenience: the rendered YAML of the full fragment. */ readonly yaml: string; } /** * Render a sidecar fragment suitable for merging into a `remote` * session Pod (or any host Pod that runs an interactive CLI and wants to * coordinate via h2a). Returns both the structured pieces (for programmatic * merging) and a YAML rendering (for `--print` style CLI use). */ export declare function renderK8sSidecar(options?: K8sSidecarOptions): K8sSidecarFragment; //# sourceMappingURL=k8s-sidecar.d.ts.map