Every worker bot now works on a computer as its own Linux account (cb-<bot id>, no sudo), owning its folder; a workspace's folder belongs to a group its bots share. Only the coordinator works as gem, with sudo. gem, and so Chrome, can't open worker folders: downloads, uploads and files saved by name are copied by the worker's own account, and workers open no file: URLs. The computer's own services (agent, DevTools, Playwright MCP, VNC, ttyd) are kept from worker accounts by an nftables rule, so containers get NET_ADMIN; without the rule the agent refuses worker commands. The X display needs gem's cookie. File reads for a worker are checked on the open descriptor, and writes are made as the worker. Workers ask the coordinator to install system packages with request_install: a coordinator task in the super admin's conversation weighs it and answers, and the answer wakes the worker. Stop ends a worker's leftover processes on its computers. Computer image 1.2.0; the layout bump recreates every computer once.
16 lines
423 B
TypeScript
16 lines
423 B
TypeScript
/**
|
|
* What the health check and `/api/info` report, kept current by the
|
|
* services as they start and stop.
|
|
*/
|
|
export const AgentState = {
|
|
browser_binary: "",
|
|
browser_version: "",
|
|
browser_sandbox: true,
|
|
/**
|
|
* Whether worker accounts are kept off the services on loopback
|
|
* (`guardServicePorts`); without it their commands are refused.
|
|
*/
|
|
workers_guarded: false,
|
|
guard_error: "",
|
|
};
|