mirror of
https://github.com/bitbaum/openclaw.git
synced 2026-12-05 16:38:21 +01:00
* feat(nodes): opt-in container isolation for node-hosted worker sessions nodeHost.workerRuns.isolation=container runs each worker session inside a Docker-compatible container (docker/OrbStack/podman): stdio launch transport, exactly two bind mounts (bundle read-only, workspace read-write), allowlisted env, and the container itself as the durable launch identity — created stopped and journaled before the descriptor is delivered, killed/removed on cancel, fence, shutdown, and recovery, with an owned-orphan sweep at startup. Missing or changed engines disable hosting with an explicit diagnostic instead of falling back to bare processes. Additive nullable worker_container_json column on node_worker_launches (schema version unchanged). * fix(test): base-shape fixture skips additive columns of stripped tables node_worker_launches is excluded from claw-scoped state schemas, so the read-only compat fixture cannot drop its additive column there; drop only columns whose owning table exists. * fix(test): guard split destructuring in base-shape fixture * test(state): record worker_container_json in the canonical additive-column list * fix(nodes): harden container isolation per review findings - Revalidate the engine daemon target immediately before container creation; a replaced daemon receives zero create/start requests (regression proves it). - A pending launch keeps its worker slot until the journaled container is killed/removed; cancellation cannot free capacity over a live container. - Windows node hosts fail closed at startup for isolation=container with an actionable diagnostic (native paths cannot be container mount targets). - Container identity moves from an additive column to the same-version companion table node_worker_launch_containers (bare STRICT, lazily ensured on first container write, pruned with the launch journal): the launch table is contract-optional and shipped readers reject additive columns there. An exact v9 predecessor now provably opens and uses the journal after the candidate populated container rows.
41 lines
1.6 KiB
TypeScript
41 lines
1.6 KiB
TypeScript
// Defines node-host-local capability configuration types.
|
|
import type { McpServerConfig } from "./types.mcp.js";
|
|
export type NodeHostBrowserProxyConfig = {
|
|
/** Enable the browser proxy on the node host (default: true). */
|
|
enabled?: boolean;
|
|
/** Optional allowlist of profile names exposed via the proxy; when set, create/delete profile routes are blocked on the proxy surface. */
|
|
allowProfiles?: string[];
|
|
};
|
|
|
|
export type NodeHostConfig = {
|
|
/** Sensitive native agent execution exposed by the headless node host. */
|
|
agentRuns?: {
|
|
claude?: {
|
|
/** Advertise approval-gated Claude CLI turns when the binary is installed. */
|
|
enabled?: boolean;
|
|
};
|
|
};
|
|
/** Full OpenClaw session hosting from Gateway-managed worker bundles. */
|
|
workerRuns?: {
|
|
/** Allow this paired node to host worker sessions (default: false). */
|
|
enabled?: boolean;
|
|
/** Integer worker slots (default: one per available CPU core). */
|
|
capacity?: number;
|
|
/** Worker process boundary: direct host execution or a container (default: none). */
|
|
isolation?: "none" | "container";
|
|
/** Optional Node 22+ container image override for isolated worker sessions. */
|
|
containerImage?: string;
|
|
};
|
|
/** Browser proxy settings for node hosts. */
|
|
browserProxy?: NodeHostBrowserProxyConfig;
|
|
/** MCP servers started and exposed by the headless node host. */
|
|
mcp?: {
|
|
servers?: Record<string, McpServerConfig>;
|
|
};
|
|
/** Skills published by the headless node host. */
|
|
skills?: {
|
|
/** Scan and publish ~/.openclaw/skills (default: true). */
|
|
enabled?: boolean;
|
|
};
|
|
};
|