Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
Say "agent controller" everywhere, and drop "managed server" from the delete dialog (#977)
Abel Dantas3f98a7f6401a
diff --git a/.env.example b/.env.exampleindex 1fb0c340a..092810849 100644--- a/.env.example+++ b/.env.example@@ -151,12 +151,12 @@ ID_SERVER_NAME=localhostAGENT_REGISTRATION_TOKEN=# ── Agent management (experimental) ──────────────────────────────────────────-# Machines running an agents controller, and the agents placed on them (the+# Machines running an agent controller, and the agents placed on them (the# gateway's Machines page). Off unless FEATURE_FLAGS_ENABLED below lists# `agent_management`. When on, CONTROLLER_TOKEN_SECRET is required: at least# 32 random characters, separate from SECRET_KEYS, e.g. `openssl rand -base64 48`.CONTROLLER_TOKEN_SECRET=-# The agents controller release Core tells standalone and cloud controllers to+# The agent controller release Core tells standalone and cloud controllers to# run: they install it when idle, checking this SHA-256. All three or none;# none leaves every controller on the version it has.# CONTROLLER_RELEASE_VERSION=@@ -248,7 +248,7 @@ FRONTEND_BASE_URL=http://localhost:5173# HTTP redirect so "Open in Switch Console" is clickable on Discord, Telegram# and other http-only platforms). Leave unset to post the raw switchdash://# deeplink. Also the --server the gateway's "Add machine" dialog shows for-# enrolling an agents controller; without it the dialog shows no command.+# enrolling an agent controller; without it the dialog shows no command.# GATEWAY_PUBLIC_URL=http://localhost:8000# Public origin a messaging platform reaches Switch on: the base of the OAuthdiff --git a/.github/workflows/agent-controller-release.yml b/.github/workflows/agent-controller-release.ymlindex 7e2b68a53..14f0f5c54 100644--- a/.github/workflows/agent-controller-release.yml+++ b/.github/workflows/agent-controller-release.yml@@ -1,6 +1,6 @@name: switch-agent-controller release-# Builds the installable agents controller (console/packages/agent-controller)+# Builds the installable agent controller (console/packages/agent-controller)# and publishes it as a GitHub release: the npm package# `switch-agent-controller-<version>.tgz`, installed with# `npm install --global <its URL>`, and the `install.sh` that finds and installs@@ -97,7 +97,7 @@ jobs:"packages/agent-controller/dist-package/switch-agent-controller-$VERSION.tgz" \packages/agent-controller/install.sh \--title "switch-agent-controller $VERSION" \- --notes "The Switch agents controller $VERSION, for running managed agents on your own Linux or macOS machines.+ --notes "The Switch agent controller $VERSION, for running managed agents on your own Linux or macOS machines.Install (Node 22.13 or later): \`npm install --global https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG/switch-agent-controller-$VERSION.tgz\`, or run \`install.sh\`. Then enroll with a code from the Machines page and run \`switch-agent-controller install-service\`. An installed controller updates with \`switch-agent-controller update\`." \--latest=falsediff --git a/.github/workflows/switch-dev-cleanup.yml b/.github/workflows/switch-dev-cleanup.ymlindex d114990e7..ae3cae5a3 100644--- a/.github/workflows/switch-dev-cleanup.yml+++ b/.github/workflows/switch-dev-cleanup.yml@@ -1,7 +1,7 @@name: switch dev cleanup# Prunes old dev builds — the images and chart every push to main publishes-# under ghcr.io/<owner>/dev/, and the agents controller it publishes as a+# under ghcr.io/<owner>/dev/, and the agent controller it publishes as a# GitHub prerelease (see switch-release.yml) — so they do not grow without# bound. Only the dev/ packages and the dev controller prereleases are# touched; releases and RCs live apart. A build is deleted once it is older than 30diff --git a/.github/workflows/switch-release.yml b/.github/workflows/switch-release.ymlindex 31fef177d..8b9150cdf 100644--- a/.github/workflows/switch-release.yml+++ b/.github/workflows/switch-release.yml@@ -306,7 +306,7 @@ jobs:if-no-files-found: errorretention-days: 7- # The agents controller (console/packages/agent-controller) at this release's+ # The agent controller (console/packages/agent-controller) at this release's# version, published as the `switch-agent-controller-v<version>` GitHub# release that `install.sh` and `switch-agent-controller update` already read.# The chart below is pinned to it (switchCore.controllerRelease), so Core@@ -316,7 +316,7 @@ jobs:# of a deployment running an RC, or the dev environment, follow it. A dry run# builds, tests and packs the controller but publishes nothing.controller:- name: Package & publish agents controller+ name: Package & publish agent controllerneeds: prepruns-on: ubuntu-latestpermissions:@@ -425,7 +425,7 @@ jobs:--repo "$GITHUB_REPOSITORY" \--target "$GITHUB_SHA" \--title "switch-agent-controller $VERSION (release candidate)" \- --notes "The Switch agents controller built for the release candidate Switch $VERSION, at $GITHUB_SHA. Controllers connected to a Switch running that candidate update to it on their own once idle; bake it into a machine image for that candidate. \`install.sh\` and \`switch-agent-controller update\` leave it out.+ --notes "The Switch agent controller built for the release candidate Switch $VERSION, at $GITHUB_SHA. Controllers connected to a Switch running that candidate update to it on their own once idle; bake it into a machine image for that candidate. \`install.sh\` and \`switch-agent-controller update\` leave it out.SHA-256: \`$SHA256\`" \--prerelease \@@ -437,7 +437,7 @@ jobs:--repo "$GITHUB_REPOSITORY" \--target "$GITHUB_SHA" \--title "switch-agent-controller $VERSION (dev build of main)" \- --notes "The Switch agents controller built from main at $GITHUB_SHA, for the dev environment, whose controllers update to it on their own. Not for installing by hand; switch-dev-cleanup prunes it.+ --notes "The Switch agent controller built from main at $GITHUB_SHA, for the dev environment, whose controllers update to it on their own. Not for installing by hand; switch-dev-cleanup prunes it.SHA-256: \`$SHA256\`" \--prerelease \@@ -448,7 +448,7 @@ jobs:--repo "$GITHUB_REPOSITORY" \--target "$GITHUB_SHA" \--title "switch-agent-controller $VERSION" \- --notes "The Switch agents controller $VERSION, released with Switch $VERSION, for running managed agents on your own Linux or macOS machines.+ --notes "The Switch agent controller $VERSION, released with Switch $VERSION, for running managed agents on your own Linux or macOS machines.SHA-256: \`$SHA256\`diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9749a14b1..097a82bc1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1864,6 +1864,14 @@ version of their own to them without also giving them a release of their own.### [Unreleased]+#### Changed+- **One name for the controller.** Console, the Gateway and the docs say+ "agent controller" everywhere, matching the `switch-agent-controller`+ package, instead of a mix of "agent controller" and "agents controller".+ The delete dialog on a server's page now calls it "this Switch server that+ Console runs" rather than a "managed server", which read like "managed+ agent"; it was the only place Console showed that name.+#### Fixed- **Setting up a server notices Docker once it starts.** "Set up a server onthis computer" checked for Docker only when the step opened, so installing ordiff --git a/RELEASING.md b/RELEASING.mdindex 967e9af0e..12bcddd52 100644--- a/RELEASING.md+++ b/RELEASING.md@@ -77,7 +77,7 @@ peer still on it, and it can never be raised past what is running in the field.- builds multi-arch (`linux/amd64`, `linux/arm64`) images for `switch-core`,`gateway`, and `setup` and pushes them to the container registry tagged`<version>` and `latest`;- - builds, tests and packs the agents controller at the same version and+ - builds, tests and packs the agent controller at the same version andpublishes it as the `switch-agent-controller-v<version>` GitHub release(see "The controller a Switch release names" below);- once the images are pushed, writes each image's digest into the chart's@@ -141,7 +141,7 @@ building from source at deploy time.before the next release or RC. The server reports `0.29.1.dev512` (PEP 440),stamped on the runner like an RC. A semver pre-release, so `helm install`skips it unless given that exact `--version`. No compose artifact.-- **A dev controller too.** The run publishes the agents controller at the dev+- **A dev controller too.** The run publishes the agent controller at the devversion as a GitHub *prerelease*, `switch-agent-controller-v<dev version>`(package only, no `install.sh`), and pins it into the dev switch chart's`switchCore.controllerRelease`, so the dev environment's controllers follow@@ -272,7 +272,7 @@ canary installs find no update until the next canary is tagged.## switch-agent-controller release (separate)-The headless agents controller (`console/packages/agent-controller`), which runs+The headless agent controller (`console/packages/agent-controller`), which runsmanaged agents on a customer's own Linux or macOS machine, releases on its own tag,`switch-agent-controller-v<version>`, via`.github/workflows/agent-controller-release.yml`:diff --git a/console/AGENTS.md b/console/AGENTS.mdindex e029b4740..6cb0a0dc2 100644--- a/console/AGENTS.md+++ b/console/AGENTS.md@@ -537,7 +537,7 @@ pnpm run lint`.gitignore` stops `git add` and not an archive, a sync or `git add -f`.Moving it out is tracked separately; it is deliberately not solved bywriting it to a second location as well.-- **The embedded agents controller's credential** (`embedded-controller/`) lives only in+- **The embedded agent controller's credential** (`embedded-controller/`) lives only inthe encrypted app secrets store. It reaches the controller child on stdin(`--credential-stdin`), never on argv, in the environment or in a file, so thewatchers and sessions the controller starts cannot inherit it. Keep it that way.diff --git a/console/agents/architecture/main-process.md b/console/agents/architecture/main-process.mdindex d26042e33..eaf15cacf 100644--- a/console/agents/architecture/main-process.md+++ b/console/agents/architecture/main-process.md@@ -18,7 +18,7 @@ Two names in this list are easy to misread, because one of them changed meaning:- **agents** — The Switch-agent domain: create/rename/delete, directory detection (`detect.ts`), onboarding, remote agent discovery and reconciliation, Switch credential/settings files- **app** — App lifecycle service and controller- **dependencies** — CLI agent detection, probing, install runner, version/update services, and their remote counterparts (`remote-dependency-manager.ts`, `ssh-install-runner.ts`)-- **embedded-controller** — "Run managed agents on this computer", per signed-in Switch server: enrolls this Console as an agents controller of kind `console` through the gateway session, keeps the credential in the encrypted secrets store (never on disk in plaintext), and runs the `@switch-console/agent-controller` CLI as a child (`process.execPath` with `ELECTRON_RUN_AS_NODE=1`, bundled to `dist-sidecar/agent-controller.mjs`), handing it the credential on stdin. Console's own agents are not involved. Unlike Console's local hosts, the managed agents' watchers are detached and outlive Console; they reconnect when the controller is started again. Every start passes the server's current API URL as `--server` (the controller moves its stored identity to it), and editing a server's API URL restarts a running controller. Exit code 2 (a configuration error) is shown as an error and not retried+- **embedded-controller** — "Run managed agents on this computer", per signed-in Switch server: enrolls this Console as an agent controller of kind `console` through the gateway session, keeps the credential in the encrypted secrets store (never on disk in plaintext), and runs the `@switch-console/agent-controller` CLI as a child (`process.execPath` with `ELECTRON_RUN_AS_NODE=1`, bundled to `dist-sidecar/agent-controller.mjs`), handing it the credential on stdin. Console's own agents are not involved. Unlike Console's local hosts, the managed agents' watchers are detached and outlive Console; they reconnect when the controller is started again. Every start passes the server's current API URL as `--server` (the controller moves its stored identity to it), and editing a server's API URL restarts a running controller. Exit code 2 (a configuration error) is shown as an error and not retried- **execution-context** — Where a command runs: `local-execution-context.ts` vs `ssh-execution-context.ts`- **fs** — Filesystem operations with provider pattern (`impl/local-fs.ts`)- **locations** — An agent's working directory on a host. Replaces the upstream project/workspace split; provider pattern plus lifecycle scriptsdiff --git a/console/agents/architecture/remote-execution.md b/console/agents/architecture/remote-execution.mdindex 1475f07bf..f3407f964 100644--- a/console/agents/architecture/remote-execution.md+++ b/console/agents/architecture/remote-execution.md@@ -298,7 +298,7 @@ be loaded.A Console agent can be handed to Switch's agent management ("Move to managed"on the agent's Room watcher panel, or Move all on a machine's card): it then-runs on an agents controller instead of Console's own watcher, and "Stop+runs on an agent controller instead of Console's own watcher, and "Stopmanaging" brings it back. A local agent moves onto this computer's embeddedcontroller; an agent on an SSH host onto the controller Console installs onthat host (`src/main/core/host-controllers/`, the "This host as a machine"diff --git a/console/agents/integrations/providers.md b/console/agents/integrations/providers.mdindex be3d6dacc..56ce1be19 100644--- a/console/agents/integrations/providers.md+++ b/console/agents/integrations/providers.md@@ -30,9 +30,9 @@ reported explicitly rather than replaced with synthetic prompts.## Changing providersThe plugin and runtime registrations must name the same providers; Console and-the agents controller refuse to start otherwise. The shared environment+the agent controller refuse to start otherwise. The shared environmentallowlist is `packages/agent-providers/src/host/agent-env.ts`, plus each-runtime's `inheritEnv`, used by Console and the headless agents controller.+runtime's `inheritEnv`, used by Console and the headless agent controller.Keep MCP helpers shared when retained providers import them. Model cataloguescome from the provider on the execution host. Test both local and SSH setup;credentials and native configuration belong to that host.diff --git a/console/agents/risky-areas/sdk-sessions.md b/console/agents/risky-areas/sdk-sessions.mdindex 907949117..316eddc35 100644--- a/console/agents/risky-areas/sdk-sessions.md+++ b/console/agents/risky-areas/sdk-sessions.md@@ -11,7 +11,7 @@ for a confirmed server stop; unknown outcomes remain visible.Local and SSH hosts use the same SDK protocol but not the same process tree: alocal host and its room watcher are owned by Console and stop with it, and onlyan SSH host is deployed and detached. The one local exception is a managed agent-run by the embedded agents controller (`src/main/core/embedded-controller/`): its+run by the embedded agent controller (`src/main/core/embedded-controller/`): itswatcher is detached like a remote one, keeps running when Console quits, andreconnects when the controller is back. A Console agent moved to managed(`src/main/core/agent-migration/`) is the same: Console leaves its watcher anddiff --git a/console/agents/workflows/managed-service-sign-in.md b/console/agents/workflows/managed-service-sign-in.mdindex 59ae75261..94941d283 100644--- a/console/agents/workflows/managed-service-sign-in.md+++ b/console/agents/workflows/managed-service-sign-in.md@@ -15,7 +15,7 @@ run location is Switch cloud.## Switch cloud agentsSigning in to Switch Cloud claims and starts the user's cloud machine-(`/gateway/hosted-machines/ensure`). The machine runs the agents controller, so+(`/gateway/hosted-machines/ensure`). The machine runs the agent controller, soa Switch cloud agent is a managed agent placed on that machine's controlleronce it has enrolled and is online, created like an agent on any other machine.Provider logins reach the machine sealed to its controller ("Give login"); thediff --git a/console/apps/switch-console-desktop/electron-builder.config.ts b/console/apps/switch-console-desktop/electron-builder.config.tsindex f32cdcaf0..baa50abb0 100644--- a/console/apps/switch-console-desktop/electron-builder.config.ts+++ b/console/apps/switch-console-desktop/electron-builder.config.ts@@ -99,7 +99,7 @@ const config: Configuration = {// The remote runtime sidecar (CHOO-1059) is a pure-Node bundle SFTP'd to the// agent's VM, not loaded into the Electron process — ship it as an unpacked// resource so resolveSidecarBundlePath() finds it under process.resourcesPath.- // The agents controller bundle (agent-controller.mjs) ships beside it the same+ // The agent controller bundle (agent-controller.mjs) ships beside it the same// way, so the child Console runs it in (its own binary with// ELECTRON_RUN_AS_NODE) reads it from a plain path, as the shared host is.//diff --git a/console/apps/switch-console-desktop/scripts/build-sidecar.mjs b/console/apps/switch-console-desktop/scripts/build-sidecar.mjsindex a0e806713..b02e7cef4 100644--- a/console/apps/switch-console-desktop/scripts/build-sidecar.mjs+++ b/console/apps/switch-console-desktop/scripts/build-sidecar.mjs@@ -54,7 +54,7 @@ await build({});/**- * The agents controller Console runs as a child process when "Run managed+ * The agent controller Console runs as a child process when "Run managed* agents on this computer" is on: the same `switch-agent-controller` CLI a* headless machine runs, bundled whole because the packaged app has no* workspace to resolve its packages from. It runs on Electron's binary as Nodediff --git a/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.test.ts b/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.test.tsindex ac16b52f6..e01a00ada 100644--- a/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.test.ts+++ b/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.test.ts@@ -846,7 +846,7 @@ describe('moving every agent automatically', () => {it('leaves the agents of a server that cannot take the controller alone, saying why on the overview', async () => {world.heal = async (agent) =>agent.serverId === 'server-2'- ? { kind: 'incompatible', reason: 'Local dev accepts agents controller protocol 1-1.' }+ ? { kind: 'incompatible', reason: 'Local dev accepts agent controller protocol 1-1.' }: { kind: 'unchanged' };const migration = service();await migration.migrateEverything();diff --git a/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.ts b/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.tsindex 6e35cb673..69693d26c 100644--- a/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.ts+++ b/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration-service.ts@@ -273,7 +273,7 @@ function message(error: unknown): string {}/**- * Moves a Console agent onto an agents controller ("Move to managed") and+ * Moves a Console agent onto an agent controller ("Move to managed") and* back ("Stop managing"), one agent at a time.** A move goes straight ahead, in order:diff --git a/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration.ts b/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration.tsindex 3a18f729e..e5761bf7b 100644--- a/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration.ts+++ b/console/apps/switch-console-desktop/src/main/core/agent-migration/agent-migration.ts@@ -250,7 +250,7 @@ async function resolveSshHost();if (!overview.enrollment)return refuse(- `Make ${sshHost} a machine for this server first: managed agents run on the agents controller Console installs there.`,+ `Make ${sshHost} a machine for this server first: managed agents run on the agent controller Console installs there.`,remote?.kind === 'ok');if (overview.phase.kind === 'installing' || overview.phase.kind === 'removing')@@ -626,7 +626,7 @@ async function buildDefinition(agent: MigrationAgent) {let localControllerProtocol: Promise<string> | null = null;-/** The controller protocol this Console's agents controller speaks, as the bundle reports it. */+/** The controller protocol this Console's agent controller speaks, as the bundle reports it. */function controllerProtocol(): Promise<string> {localControllerProtocol ??= execute(process.execPath,@@ -634,7 +634,7 @@ function controllerProtocol(): Promise<string> {{ env: { ...process.env, ELECTRON_RUN_AS_NODE: '1' }, timeout: 15_000 }).then(({ stdout }) => {const protocol = stdout.trim();- if (!protocol) throw new Error('The agents controller did not report its protocol.');+ if (!protocol) throw new Error('The agent controller did not report its protocol.');return protocol;});localControllerProtocol.catch(() => {@@ -660,7 +660,7 @@ async function controllerRefusal(serverId: string): Promise<string | null> {});if (response.status !== 426) return null;const accepts = response.headers.get('switch-controller-protocol-accepts');- return `${server.name} accepts agents controller protocol ${accepts ?? 'older than this Console’s'}, but this Console’s controller speaks ${protocol}. Upgrade the server to move agents onto it.`;+ return `${server.name} accepts agent controller protocol ${accepts ?? 'older than this Console’s'}, but this Console’s controller speaks ${protocol}. Upgrade the server to move agents onto it.`;}/** Repairs the controller an agent's machine runs for its server; see `AgentMigrationDeps.targets.heal`. */@@ -734,7 +734,7 @@ async function healMachine(agent: MigrationAgent): Promise<MachineHealth> {);if (overview.phase.kind === 'update_required')throw new Error(- 'This Switch server needs a newer agents controller than this Console carries. Update Switch Console, then try again.'+ 'This Switch server needs a newer agent controller than this Console carries. Update Switch Console, then try again.');if (overview.phase.kind !== 'running' && overview.phase.kind !== 'restarting') {await embeddedControllerService.restart(serverId);diff --git a/console/apps/switch-console-desktop/src/main/core/agent-migration/managed-agents-store.ts b/console/apps/switch-console-desktop/src/main/core/agent-migration/managed-agents-store.tsindex 756972f32..38ab4ee66 100644--- a/console/apps/switch-console-desktop/src/main/core/agent-migration/managed-agents-store.ts+++ b/console/apps/switch-console-desktop/src/main/core/agent-migration/managed-agents-store.ts@@ -5,7 +5,7 @@ import { db } from '@main/db/client';import { appSettings } from '@main/db/schema';/**- * The Console agents that were moved onto an agents controller ("Move to+ * The Console agents that were moved onto an agent controller ("Move to* managed"), keyed by Console agent id.** While an agent is here, Console does not run its watcher: boot, a restoreddiff --git a/console/apps/switch-console-desktop/src/main/core/agent-runtime/impl/resolve-sidecar-bundle.ts b/console/apps/switch-console-desktop/src/main/core/agent-runtime/impl/resolve-sidecar-bundle.tsindex bdf55c617..bf9421b53 100644--- a/console/apps/switch-console-desktop/src/main/core/agent-runtime/impl/resolve-sidecar-bundle.ts+++ b/console/apps/switch-console-desktop/src/main/core/agent-runtime/impl/resolve-sidecar-bundle.ts@@ -30,7 +30,7 @@ export function resolveSharedHostBundlePath(): string {}/**- * The agents controller Console runs as a child process for "Run managed+ * The agent controller Console runs as a child process for "Run managed* agents on this computer", built beside the shared host by* `pnpm run build:sidecar`.*/diff --git a/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.test.ts b/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.test.tsindex c2947cfca..b3a02273b 100644--- a/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.test.ts+++ b/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.test.ts@@ -27,7 +27,7 @@ function nodeFloor(pkg: string): [number, number] {}describe('the Node a remote host needs', () => {- it('is at least what the agent runtime and the agents controller run on', () => {+ it('is at least what the agent runtime and the agent controller run on', () => {const [major, minor] = (descriptor('node').minVersion ?? '').split('.').map(Number);for (const pkg of ['switch-agent-runtime', 'agent-controller']) {const [needMajor, needMinor] = nodeFloor(pkg);diff --git a/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.ts b/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.tsindex 22bf66a1d..f134c4642 100644--- a/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.ts+++ b/console/apps/switch-console-desktop/src/main/core/dependencies/core-dependencies.ts@@ -63,7 +63,7 @@ export const CORE_DEPENDENCIES: DependencyDescriptor[] = [commands: ['node'],versionArgs: ['--version'],// The agent runtime connects over Node's built-in WebSocket (Node 22), and- // the agents controller Console installs for managed agents needs 22.13.+ // the agent controller Console installs for managed agents needs 22.13.// A host below this shows as needing setup, and the install below upgrades it.minVersion: '22.13.0',docUrl: 'https://nodejs.org/en/download',diff --git a/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.test.ts b/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.test.tsindex 68d35a1bd..66d23e398 100644--- a/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.test.ts+++ b/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.test.ts@@ -125,7 +125,7 @@ describe('ControllerSupervisor', () => {expect(phases.at(-1)).toEqual({kind: 'error',message:- 'The agents controller cannot run as it is set up: /data already belongs to controller c1 on https://switch.example.com, not c2.',+ 'The agent controller cannot run as it is set up: /data already belongs to controller c1 on https://switch.example.com, not c2.',});expect(finals).toEqual([]);await new Promise((resolve) => setTimeout(resolve, 30));@@ -148,7 +148,7 @@ describe('ControllerSupervisor', () => {expect(phases.at(-1)).toEqual({kind: 'error',message:- 'The agents controller cannot run as it is set up: --controller-id and --server adopt an identity together; pass both.',+ 'The agent controller cannot run as it is set up: --controller-id and --server adopt an identity together; pass both.',});await new Promise((resolve) => setTimeout(resolve, 30));expect(calls).toHaveLength(1);@@ -250,7 +250,7 @@ describe('ControllerSupervisor', () => {calls[0]!.child.emit('error', new Error('spawn ENOENT'));expect(phases.at(-1)).toEqual({kind: 'error',- message: 'The agents controller could not be started: spawn ENOENT',+ message: 'The agent controller could not be started: spawn ENOENT',});});});diff --git a/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.ts b/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.tsindex c9ae275d1..a851d820c 100644--- a/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.ts+++ b/console/apps/switch-console-desktop/src/main/core/embedded-controller/controller-supervisor.ts@@ -157,7 +157,7 @@ export class ControllerSupervisor {recheckProviders(timeoutMs: number): Promise<void> {const child = this.child;if (!child || !child.connected)- return Promise.reject(new Error('The agents controller on this computer is not running.'));+ return Promise.reject(new Error('The agent controller on this computer is not running.'));const id = randomUUID();return new Promise<void>((resolve, reject) => {const done = () => {@@ -166,7 +166,7 @@ export class ControllerSupervisor {};const timer = setTimeout(() => {done();- reject(new Error('The agents controller on this computer did not answer in time.'));+ reject(new Error('The agent controller on this computer did not answer in time.'));}, timeoutMs);const onMessage = (message: unknown) => {if (!isProviderRecheckReply(message) || message.id !== id) return;@@ -178,7 +178,7 @@ export class ControllerSupervisor {const request: ProviderRecheckRequest = { kind: PROVIDER_RECHECK_KIND, id };if (!child.send(request)) {done();- reject(new Error('Could not reach the agents controller on this computer.'));+ reject(new Error('Could not reach the agent controller on this computer.'));}});}@@ -257,7 +257,7 @@ export class ControllerSupervisor {if (failure) {this.deps.onPhase({kind: 'error',- message: `The agents controller could not be started: ${failure.message}`,+ message: `The agent controller could not be started: ${failure.message}`,});return;}@@ -268,7 +268,7 @@ export class ControllerSupervisor {if (code === EXIT_CONFIGURATION) {this.deps.onPhase({kind: 'error',- message: `The agents controller cannot run as it is set up: ${this.lastWords() ?? 'it gave no reason'}`,+ message: `The agent controller cannot run as it is set up: ${this.lastWords() ?? 'it gave no reason'}`,});return;}diff --git a/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controller-service.ts b/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controller-service.tsindex a7cd975d7..ee99ef4e7 100644--- a/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controller-service.ts+++ b/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controller-service.ts@@ -112,7 +112,7 @@ type Runner = { supervisor: ControllerSupervisor; phase: EmbeddedControllerPhase/*** "Run managed agents on this computer", per signed-in Switch server: enrolls- * this Console as an agents controller of kind `console`, keeps its credential+ * this Console as an agent controller of kind `console`, keeps its credential* in the encrypted secrets store, and runs the agent-controller CLI as a* child process for as long as it is on.*@@ -258,7 +258,7 @@ export class EmbeddedControllerService {await this.revokeQuietly(workspaceId, enrolled.controllerId);throw error;}- this.deps.log.info('Enrolled this computer as an agents controller', {+ this.deps.log.info('Enrolled this computer as an agent controller', {serverId,controllerId: enrolled.controllerId,});@@ -538,7 +538,7 @@ export class EmbeddedControllerService {private async onFinal(serverId: string, exit: ControllerFinalExit): Promise<void> {if (exit === 'upgrade_required') {this.deps.log.error(- 'Switch needs a newer agents controller than this Console carries; not restarting it until Console is updated',+ 'Switch needs a newer agent controller than this Console carries; not restarting it until Console is updated',{ serverId });this.setRunnerPhase(serverId, {diff --git a/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controllers.ts b/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controllers.tsindex d6dff4a9b..8ee64fb7b 100644--- a/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controllers.ts+++ b/console/apps/switch-console-desktop/src/main/core/embedded-controller/embedded-controllers.ts@@ -44,7 +44,7 @@ async function controllerVersion(bundle: string): Promise<string> {timeout: 15_000,});const version = stdout.trim();- if (!version) throw new Error(`The agents controller at ${bundle} did not report a version.`);+ if (!version) throw new Error(`The agent controller at ${bundle} did not report a version.`);return version;}diff --git a/console/apps/switch-console-desktop/src/main/core/host-controllers/controller.ts b/console/apps/switch-console-desktop/src/main/core/host-controllers/controller.tsindex 1d83b2d18..de043cf73 100644--- a/console/apps/switch-console-desktop/src/main/core/host-controllers/controller.ts+++ b/console/apps/switch-console-desktop/src/main/core/host-controllers/controller.ts@@ -2,7 +2,7 @@ import type { HostControllerOverview } from '@shared/core/host-controllers/host-import { createRPCController } from '@shared/lib/ipc/rpc';import { hostControllerService } from './host-controllers';-/** An SSH host as a machine for a Switch server: its agents controller, and the agents moved onto it. */+/** An SSH host as a machine for a Switch server: its agent controller, and the agents moved onto it. */export const hostControllersController = createRPCController({getOverview: (params: {sshHost: string;diff --git a/console/apps/switch-console-desktop/src/main/core/host-controllers/host-controller-service.ts b/console/apps/switch-console-desktop/src/main/core/host-controllers/host-controller-service.tsindex 7275d3c39..52fcec2d4 100644--- a/console/apps/switch-console-desktop/src/main/core/host-controllers/host-controller-service.ts+++ b/console/apps/switch-console-desktop/src/main/core/host-controllers/host-controller-service.ts@@ -113,7 +113,7 @@ export function serverUrlProblem(url: string): string | null {if (parsed.protocol === 'https:') return null;const loopback = ['localhost', '127.0.0.1', '[::1]'].includes(parsed.hostname);if (parsed.protocol === 'http:' && loopback) return null;- return `The agents controller connects to Switch only over https (or plain http to the host itself), and this server's address is ${url}.`;+ return `The agent controller connects to Switch only over https (or plain http to the host itself), and this server's address is ${url}.`;}function key(sshHost: string, serverId: string): string {@@ -259,7 +259,7 @@ export class HostControllerService {await this.deps.records.set(enrolled);this.setPhase(sshHost, serverId, { kind: 'installing', step: 'Starting the controller…' });await this.start(shell, enrolled, prepared.home);- this.deps.log.info('Installed the agents controller on an SSH host', {+ this.deps.log.info('Installed the agent controller on an SSH host', {sshHost,serverId,controllerId: enrolled.controllerId,@@ -350,7 +350,7 @@ export class HostControllerService {});}await this.deps.records.delete(sshHost, serverId);- this.deps.log.info('Removed the agents controller from an SSH host', { sshHost, serverId });+ this.deps.log.info('Removed the agent controller from an SSH host', { sshHost, serverId });});}@@ -423,7 +423,7 @@ export class HostControllerService {);if (!nodeIsNewEnough(prepared.node))throw new Error(- `${sshHost} runs Node ${prepared.node}; the agents controller needs Node ${MIN_NODE.join('.')} or later on the host.`+ `${sshHost} runs Node ${prepared.node}; the agent controller needs Node ${MIN_NODE.join('.')} or later on the host.`);const bundle = posix.join(prepared.directory, bundleName);if (!prepared.present) {@@ -454,7 +454,7 @@ export class HostControllerService {supervision: record.supervision,unit: hostControllerUnit(record.serverId),unitText: systemdUnit({- description: `Switch agents controller (Switch Console, server ${record.serverId})`,+ description: `Switch agent controller (Switch Console, server ${record.serverId})`,node: record.node,bundle: record.bundle,dataDir: absolute(record.dataDir),diff --git a/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.test.ts b/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.test.tsindex e7f6f4eca..ae967d636 100644--- a/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.test.ts+++ b/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.test.ts@@ -278,7 +278,7 @@ describe('the detached supervisor', () => {describe('the systemd unit', () => {it('runs the controller with the host’s PATH and restarts it only on exit code 1', () => {const unit = systemdUnit({- description: 'Switch agents controller',+ description: 'Switch agent controller',node: '/usr/bin/node',bundle: '/home/ada/.local/state/switch/sdk-host/agent-controller-x.mjs',dataDir: '/home/ada/.local/state/switch/agent-controller/console-server-1',diff --git a/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.ts b/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.tsindex 408de01b3..5b630bcf8 100644--- a/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.ts+++ b/console/apps/switch-console-desktop/src/main/core/host-controllers/host-scripts.ts@@ -2,7 +2,7 @@ import { z } from 'zod';/*** The scripts Console runs with `node -e` on an SSH host to install, run and- * remove the headless agents controller there. They are plain CommonJS for+ * remove the headless agent controller there. They are plain CommonJS for* whatever Node the host has: the check that it is new enough is one of them.** Paths starting `~/` are the host's home. Every script takes one argument,diff --git a/console/apps/switch-console-desktop/src/main/core/managed-switch-server/secret-values.ts b/console/apps/switch-console-desktop/src/main/core/managed-switch-server/secret-values.tsindex 5429f813f..d3ac0b682 100644--- a/console/apps/switch-console-desktop/src/main/core/managed-switch-server/secret-values.ts+++ b/console/apps/switch-console-desktop/src/main/core/managed-switch-server/secret-values.ts@@ -17,7 +17,7 @@ import { randomBytes } from 'node:crypto';* before it, still passed so the server can read what it wrote back then.** `controllerTokenSecret` is switch-core's `CONTROLLER_TOKEN_SECRET`: what it- * signs agents controllers' hour-long access tokens with. Agent management+ * signs agent controllers' hour-long access tokens with. Agent management* refuses to start without one. */export type LocalServerSecrets = {dbPassword: string;diff --git a/console/apps/switch-console-desktop/src/main/core/providers/provider-login.ts b/console/apps/switch-console-desktop/src/main/core/providers/provider-login.tsindex 3c96ce4df..6fe4fcdf2 100644--- a/console/apps/switch-console-desktop/src/main/core/providers/provider-login.ts+++ b/console/apps/switch-console-desktop/src/main/core/providers/provider-login.ts@@ -11,7 +11,7 @@ import { providerLoginExitChannel, providerLoginLineChannel } from '@shared/even* Runs a provider's own sign-in command on this computer, one attempt at a* time, relaying what it writes.*- * It runs through the login shell, as the agents controller and its sessions+ * It runs through the login shell, as the agent controller and its sessions* find the CLI, so the CLI signed in is the one they will use. Stdin is kept* open rather than closed: a command that waits for its browser round trip* would read a closed stdin as being cancelled.diff --git a/console/apps/switch-console-desktop/src/main/core/remote-hosts/controller.ts b/console/apps/switch-console-desktop/src/main/core/remote-hosts/controller.tsindex 41d1f2ea9..9c3bcbe0f 100644--- a/console/apps/switch-console-desktop/src/main/core/remote-hosts/controller.ts+++ b/console/apps/switch-console-desktop/src/main/core/remote-hosts/controller.ts@@ -89,7 +89,7 @@ export const remoteHostsController = createRPCController({*/removeHost: async (sshHost: string): Promise<void> => {try {- // Its agents controllers are revoked first: a host Console forgets would+ // Its agent controllers are revoked first: a host Console forgets would// otherwise go on running agents with nothing left here to stop them.await hostControllerService.forgetHost(sshHost);await removeRemoteHost(sshHost);diff --git a/console/apps/switch-console-desktop/src/main/core/switch-servers/controller.test.ts b/console/apps/switch-console-desktop/src/main/core/switch-servers/controller.test.tsindex 980c9e2bf..f01d17f2a 100644--- a/console/apps/switch-console-desktop/src/main/core/switch-servers/controller.test.ts+++ b/console/apps/switch-console-desktop/src/main/core/switch-servers/controller.test.ts@@ -38,7 +38,7 @@ vi.mock('@main/core/agents/write-remote-switch-settings', () => ({}));vi.mock('@main/core/agents/write-switch-settings', () => ({ writeSwitchSettings: vi.fn() }));vi.mock('@main/core/app/service', () => ({ appService: { openExternal: vi.fn() } }));-// Holds the embedded agents controllers, and through them electron and the secrets store.+// Holds the embedded agent controllers, and through them electron and the secrets store.vi.mock('@main/core/embedded-controller/embedded-controllers', () => ({embeddedControllerService: { forgetServer: vi.fn(), followServerApiUrl },}));diff --git a/console/apps/switch-console-desktop/src/main/index.ts b/console/apps/switch-console-desktop/src/main/index.tsindex a588ebb6e..7567041e4 100644--- a/console/apps/switch-console-desktop/src/main/index.ts+++ b/console/apps/switch-console-desktop/src/main/index.ts@@ -279,12 +279,12 @@ void app.whenReady().then(async () => {log.error('Failed to initialise remote watchers at startup:', e);}// The managed agents this computer runs for a server, through the embedded- // agents controller. After the dependency probe, like the watchers above:+ // agent controller. After the dependency probe, like the watchers above:// the controller resolves provider CLIs from the same environment.try {await embeddedControllerService.initialize();} catch (e) {- log.error('Failed to start the embedded agents controllers at startup:', e);+ log.error('Failed to start the embedded agent controllers at startup:', e);}// After the controllers: moving an agent onto this computer's controller needs it running.startAutoMigration();@@ -346,9 +346,9 @@ app.on('before-quit', (event) => {]).catch((e) => {log.error('Failed to stop local SDK hosts:', e);}),- // The embedded agents controllers stop, and their agents and sessions with them.+ // The embedded agent controllers stop, and their agents and sessions with them.embeddedControllerService.dispose().catch((e) => {- log.error('Failed to stop the embedded agents controllers:', e);+ log.error('Failed to stop the embedded agent controllers:', e);}),]);await locationManager.dispose().catch((e) => {diff --git a/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/managed-run-location.ts b/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/managed-run-location.tsindex 0c4ce2bfb..3e7fbf642 100644--- a/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/managed-run-location.ts+++ b/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/managed-run-location.ts@@ -34,7 +34,7 @@ export function newAgentMachineNotice(name && name !== location.label ? `${location.label} (machine “${name}”)` : location.label;return {kind: 'managed',- text: `Runs as a managed agent on ${where}: Switch places it on the machine’s agents controller, which runs it. You can bring it back to this Console later from its settings.`,+ text: `Runs as a managed agent on ${where}: Switch places it on the machine’s agent controller, which runs it. You can bring it back to this Console later from its settings.`,};}diff --git a/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/new-agent-form.tsx b/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/new-agent-form.tsxindex fc8428ca7..50df38415 100644--- a/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/new-agent-form.tsx+++ b/console/apps/switch-console-desktop/src/renderer/features/locations/components/add-agent-modal/new-agent-form.tsx@@ -170,7 +170,7 @@ export const NewAgentForm = observer(function NewAgentForm({const serverMachines = askForMachines ? (machinesQuery.data ?? null) : null;const management = serverMachines !== null;// Choosing Switch cloud claims the owner's cloud machine and starts it. Once- // its agents controller has enrolled and is online, the agent is placed on it+ // its agent controller has enrolled and is online, the agent is placed on it// like on any machine.const cloudMachineQuery = useQuery({queryKey: ['cloud-machine-ensure', selectedServerId],diff --git a/console/apps/switch-console-desktop/src/renderer/features/locations/components/settings-view/sidecar-panel.tsx b/console/apps/switch-console-desktop/src/renderer/features/locations/components/settings-view/sidecar-panel.tsxindex 3c95f7f69..e6ecc1abf 100644--- a/console/apps/switch-console-desktop/src/renderer/features/locations/components/settings-view/sidecar-panel.tsx+++ b/console/apps/switch-console-desktop/src/renderer/features/locations/components/settings-view/sidecar-panel.tsx@@ -42,7 +42,7 @@ export const SidecarPanel = observer(function SidecarPanel() {/*** This Console's own watcher for the agent. A managed agent has none: Switch- * runs it on a machine's agents controller.+ * runs it on a machine's agent controller.*/function ConsoleWatcher({ agentId }: { agentId: string }) {const queryClient = useQueryClient();@@ -61,7 +61,7 @@ function ConsoleWatcher({ agentId }: { agentId: string }) {if (runner.data === 'managed')return (<p className="text-sm text-foreground-muted">- Switch runs this agent on a machine’s agents controller, so this Console does not watch its+ Switch runs this agent on a machine’s agent controller, so this Console does not watch itsrooms.</p>);diff --git a/console/apps/switch-console-desktop/src/renderer/features/settings/agents-page/this-computer-provider-status.tsx b/console/apps/switch-console-desktop/src/renderer/features/settings/agents-page/this-computer-provider-status.tsxindex 2579b91d1..b9824a7cf 100644--- a/console/apps/switch-console-desktop/src/renderer/features/settings/agents-page/this-computer-provider-status.tsx+++ b/console/apps/switch-console-desktop/src/renderer/features/settings/agents-page/this-computer-provider-status.tsx@@ -11,7 +11,7 @@ import { reportedHeadline, reportedProvider } from './this-computer-status';/*** A provider's install and sign-in state on this computer, for Settings →- * Agent providers. When this computer's agents controller reported it to+ * Agent providers. When this computer's agent controller reported it to* Switch, that report is shown, the same one switch-buddy and the New agent* form go by; otherwise Console's own check, as before.*/@@ -69,7 +69,7 @@ export function ThisComputerProviderStatus({</Button></div><p className="mt-1 text-xs text-foreground-muted">- On this computer, as its agents controller reported it to Switch+ On this computer, as its agent controller reported it to Switch</p>{!recheck.isPending && reported.detail && (<p className="mt-2 text-foreground-muted">{reported.detail}</p>diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/buddy-providers.ts b/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/buddy-providers.tsindex 781f96b2e..17c72bd7f 100644--- a/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/buddy-providers.ts+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/buddy-providers.ts@@ -2,7 +2,7 @@ import type { OwnedMachine } from '@shared/core/managed-agents/managed-agents';import type { AgentProviderDefinition } from '@shared/core/providers/agent-provider-registry';/**- * Where a provider stands on this computer, as its agents controller last+ * Where a provider stands on this computer, as its agent controller last* reported it to Switch: what Switch checks before it will create an agent* with it, so the one answer the buddy pages go by.*diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/provider-setup.tsx b/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/provider-setup.tsxindex 3fd1a4786..7d609a0f3 100644--- a/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/provider-setup.tsx+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-buddy/provider-setup.tsx@@ -36,7 +36,7 @@ type Login = {* Pick the AI provider switch-buddy runs on, get it ready on this computer,* and create the buddy with it.*- * What a provider needs is read from what this computer's agents controller+ * What a provider needs is read from what this computer's agent controller* reports to Switch, which is what Switch checks before creating an agent.* Installing a CLI or signing it in is followed by asking the controller to* check again straight away, so the card moves on as soon as it is truediff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/server-reset-section.tsx b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/server-reset-section.tsxindex 309eaed4a..0dedfdc30 100644--- a/console/apps/switch-console-desktop/src/renderer/features/switch-servers/server-reset-section.tsx+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-servers/server-reset-section.tsx@@ -66,8 +66,8 @@ export function ServerResetSection({</DialogHeader><DialogContentArea><DialogDescription>- This permanently deletes this managed server and everything on it — all rooms,- messages, and{' '}+ This permanently deletes this Switch server that Console runs, and everything on it —+ all rooms, messages, and{' '}<strong className="text-foreground">every agent you've configured against it</strong>.This can't be undone. A fresh Start rebuilds an empty stack from scratch.</DialogDescription>diff --git a/console/apps/switch-console-desktop/src/renderer/lib/stores/use-this-computer-report.ts b/console/apps/switch-console-desktop/src/renderer/lib/stores/use-this-computer-report.tsindex 99f31d730..2ed571653 100644--- a/console/apps/switch-console-desktop/src/renderer/lib/stores/use-this-computer-report.ts+++ b/console/apps/switch-console-desktop/src/renderer/lib/stores/use-this-computer-report.ts@@ -5,7 +5,7 @@ import type { ThisComputerReport } from '@shared/core/managed-agents/managed-ageexport const THIS_COMPUTER_REPORT_KEY = ['this-computer-report'] as const;/**- * This computer's providers as its agents controller last reported them to+ * This computer's providers as its agent controller last reported them to* Switch, or null when it runs no controller with a report. Settings → Agent* providers shows this when there is one, so it says what switch-buddy and* the New agent form say; Console's own check is the fallback.diff --git a/console/apps/switch-console-desktop/src/shared/core/agent-migration/agent-migration.ts b/console/apps/switch-console-desktop/src/shared/core/agent-migration/agent-migration.tsindex 6ea6dd4e8..6ac5b104d 100644--- a/console/apps/switch-console-desktop/src/shared/core/agent-migration/agent-migration.ts+++ b/console/apps/switch-console-desktop/src/shared/core/agent-migration/agent-migration.ts@@ -1,5 +1,5 @@/**- * Moving an agent Console runs itself onto an agents controller, so that+ * Moving an agent Console runs itself onto an agent controller, so that* Switch's agent management runs it instead: "Move to managed", and back with* "Stop managing".*diff --git a/console/apps/switch-console-desktop/src/shared/core/cloud-agents/cloud-agents.ts b/console/apps/switch-console-desktop/src/shared/core/cloud-agents/cloud-agents.tsindex 369ea97f3..7140620a0 100644--- a/console/apps/switch-console-desktop/src/shared/core/cloud-agents/cloud-agents.ts+++ b/console/apps/switch-console-desktop/src/shared/core/cloud-agents/cloud-agents.ts@@ -8,7 +8,7 @@ const machineCapacitySchema = z.nullable();/**- * The owner's cloud machine. It runs the agents controller, and its agents are+ * The owner's cloud machine. It runs the agent controller, and its agents are* managed agents placed on `controller_id` (null until it has enrolled).* `sleeping` is Core's reading of desired `stopped` for `idle`; `disk` and* `memory` come from the machine's last heartbeat.diff --git a/console/apps/switch-console-desktop/src/shared/core/host-controllers/host-controllers.ts b/console/apps/switch-console-desktop/src/shared/core/host-controllers/host-controllers.tsindex 873818eb1..63d68def5 100644--- a/console/apps/switch-console-desktop/src/shared/core/host-controllers/host-controllers.ts+++ b/console/apps/switch-console-desktop/src/shared/core/host-controllers/host-controllers.ts@@ -1,7 +1,7 @@import type { PlacedManagedAgent } from '@shared/core/embedded-controller/embedded-controller';/**- * An SSH host as a machine: the headless agents controller Console installs+ * An SSH host as a machine: the headless agent controller Console installs* and runs there, enrolled with one Switch server, so that server's agent* management can run agents on the host.*/diff --git a/console/apps/switch-console-desktop/src/shared/core/managed-agents/managed-agents.ts b/console/apps/switch-console-desktop/src/shared/core/managed-agents/managed-agents.tsindex b47037515..54fcdea07 100644--- a/console/apps/switch-console-desktop/src/shared/core/managed-agents/managed-agents.ts+++ b/console/apps/switch-console-desktop/src/shared/core/managed-agents/managed-agents.ts@@ -74,7 +74,7 @@ export type MachineProvider = {};/**- * This computer's providers as its agents controller last reported them to a+ * This computer's providers as its agent controller last reported them to a* server: what Switch goes by when it creates an agent here, so what every* screen about this computer's providers shows when there is one.*/diff --git a/console/apps/switch-console-desktop/src/shared/events/embeddedControllerEvents.ts b/console/apps/switch-console-desktop/src/shared/events/embeddedControllerEvents.tsindex 347d87865..3d2f88df8 100644--- a/console/apps/switch-console-desktop/src/shared/events/embeddedControllerEvents.ts+++ b/console/apps/switch-console-desktop/src/shared/events/embeddedControllerEvents.ts@@ -1,7 +1,7 @@import type { EmbeddedControllerStateEvent } from '@shared/core/embedded-controller/embedded-controller';import { defineEvent } from '@shared/lib/ipc/events';-/** The embedded agents controller for a server changed phase. */+/** The embedded agent controller for a server changed phase. */export const embeddedControllerStateChannel = defineEvent<EmbeddedControllerStateEvent>('embedded-controller:state');diff --git a/console/apps/switch-console-desktop/src/shared/events/hostControllerEvents.ts b/console/apps/switch-console-desktop/src/shared/events/hostControllerEvents.tsindex 49733adf5..90a9cd82e 100644--- a/console/apps/switch-console-desktop/src/shared/events/hostControllerEvents.ts+++ b/console/apps/switch-console-desktop/src/shared/events/hostControllerEvents.ts@@ -1,6 +1,6 @@import type { HostControllerStateEvent } from '@shared/core/host-controllers/host-controllers';import { defineEvent } from '@shared/lib/ipc/events';-/** The agents controller on an SSH host changed: installed, removed, or a step of either. */+/** The agent controller on an SSH host changed: installed, removed, or a step of either. */export const hostControllerStateChannel =defineEvent<HostControllerStateEvent>('host-controller:state');diff --git a/console/packages/agent-controller/README.md b/console/packages/agent-controller/README.mdindex 789f5cf25..3d147861c 100644--- a/console/packages/agent-controller/README.md+++ b/console/packages/agent-controller/README.md@@ -1,4 +1,4 @@-# Switch agents controller (headless)+# Switch agent controller (headless)`switch-agent-controller` runs the Switch agents that Management assigns to thismachine and reports their status. Run one per machine. It is the headless half ofdiff --git a/console/packages/agent-controller/install.sh b/console/packages/agent-controller/install.shindex 854573bec..bc0a16188 100755--- a/console/packages/agent-controller/install.sh+++ b/console/packages/agent-controller/install.sh@@ -1,5 +1,5 @@#!/bin/sh-# Installs the Switch agents controller (switch-agent-controller) with npm,+# Installs the Switch agent controller (switch-agent-controller) with npm,# from the newest controller release on GitHub, and optionally enrolls this# machine and installs the controller as a service of this user.#diff --git a/console/packages/agent-controller/package.json b/console/packages/agent-controller/package.jsonindex 8ddc1af7f..47737befe 100644--- a/console/packages/agent-controller/package.json+++ b/console/packages/agent-controller/package.json@@ -2,7 +2,7 @@"name": "@switch-console/agent-controller","version": "0.1.1","private": true,- "description": "Headless agents controller: runs the Switch agents assigned to this machine and reports their status",+ "description": "Headless agent controller: runs the Switch agents assigned to this machine and reports their status","license": "Apache-2.0","author": {"name": "Switch Console Contributors"diff --git a/console/packages/agent-controller/src/agent-hub.ts b/console/packages/agent-controller/src/agent-hub.tsindex 42ef8308f..6270813c6 100644--- a/console/packages/agent-controller/src/agent-hub.ts+++ b/console/packages/agent-controller/src/agent-hub.ts@@ -531,7 +531,7 @@ export class AgentHub {rooms: [...(agent.rooms ?? [])].sort(),all_rooms: true,reason:- 'the agents controller no longer holds events this far back; re-read room context',+ 'the agent controller no longer holds events this far back; re-read room context',});host.cursor = agent.droppedThrough;}diff --git a/console/packages/agent-controller/src/api.ts b/console/packages/agent-controller/src/api.tsindex 09f5c97a8..bd564f50c 100644--- a/console/packages/agent-controller/src/api.ts+++ b/console/packages/agent-controller/src/api.ts@@ -55,7 +55,7 @@ export const nodeWebSocket: OpenWebSocket = (url, headers) => {).WebSocket;if (!Socket)throw new ConfigurationError(- `The agents controller needs Node 22 or newer to connect to Switch (this is ${process.version}, with no WebSocket).`+ `The agent controller needs Node 22 or newer to connect to Switch (this is ${process.version}, with no WebSocket).`);return new Socket(url, { headers });};diff --git a/console/packages/agent-controller/src/controller.ts b/console/packages/agent-controller/src/controller.tsindex 8232684fc..4bdf949f8 100644--- a/console/packages/agent-controller/src/controller.ts+++ b/console/packages/agent-controller/src/controller.ts@@ -255,7 +255,7 @@ export async function runController(}const warning = deps.secrets.startupWarning();if (warning) log.warn(warning);- log.info('Agents controller starting', {+ log.info('Agent controller starting', {controllerId: identity.controllerId,server: identity.server,version: deps.version,diff --git a/console/packages/agent-controller/src/hub-socket.ts b/console/packages/agent-controller/src/hub-socket.tsindex e833bd295..e3ec228ad 100644--- a/console/packages/agent-controller/src/hub-socket.ts+++ b/console/packages/agent-controller/src/hub-socket.ts@@ -57,7 +57,7 @@ export class HubSocket {new Promise<void>((resolve) => {if (ws.readyState === ws.CLOSED) return resolve();ws.once('close', () => resolve());- ws.close(HUB_CLOSE.restarting, 'the agents controller is restarting');+ ws.close(HUB_CLOSE.restarting, 'the agent controller is restarting');}));await Promise.race([diff --git a/console/packages/agent-controller/src/relay-forward.ts b/console/packages/agent-controller/src/relay-forward.tsindex d6d64c4d4..336368a1b 100644--- a/console/packages/agent-controller/src/relay-forward.ts+++ b/console/packages/agent-controller/src/relay-forward.ts@@ -93,12 +93,12 @@ export class UpstreamForwarder implements Forwarder {} catch (error) {if (isRevoked(error)) {this.deps.auth.revoked();- return refuse(res, 401, 'This agents controller has been revoked.');+ return refuse(res, 401, 'This agent controller has been revoked.');}return refuse(res,502,- `The agents controller could not get an access token from Switch: ${errorMessage(error)}`+ `The agent controller could not get an access token from Switch: ${errorMessage(error)}`);}let upstream: IncomingMessage;@@ -118,7 +118,7 @@ export class UpstreamForwarder implements Forwarder {return refuse(res,502,- `The agents controller could not reach Switch: ${errorMessage(error)}`+ `The agent controller could not reach Switch: ${errorMessage(error)}`);}if (upstream.statusCode === 401) {diff --git a/console/packages/agent-controller/src/relay.ts b/console/packages/agent-controller/src/relay.tsindex e9dc296a5..7a90a71db 100644--- a/console/packages/agent-controller/src/relay.ts+++ b/console/packages/agent-controller/src/relay.ts@@ -191,10 +191,10 @@ export class LocalRelay {const agentId = token ? this.tokens.get(hashToken(token)) : undefined;if (agentId) return agentId;if (!this.ready)- return new HttpRefusal(503, 'The agents controller is starting; retry in a moment.');+ return new HttpRefusal(503, 'The agent controller is starting; retry in a moment.');return new HttpRefusal(401,- 'This token is not one the agents controller issued, or its agent is no longer assigned to this machine.'+ 'This token is not one the agent controller issued, or its agent is no longer assigned to this machine.');}@@ -225,7 +225,7 @@ export class LocalRelay {if (CONNECTION_ROUTE.test(url.pathname))throw new HttpRefusal(410,- `The agents controller no longer serves the agent connection; its agent hosts hear their events on ${HUB_PATH}. Restart the agent host.`+ `The agent controller no longer serves the agent connection; its agent hosts hear their events on ${HUB_PATH}. Restart the agent host.`);this.checkForwardable(url, raw, agentId);await this.deps.forwarder.forward(req, res, {@@ -242,7 +242,7 @@ export class LocalRelay {private checkForwardable(url: URL, raw: string, agentId: string): void {const rawPath = raw.split('?')[0]!;if (/%2f|%5c/i.test(rawPath) || !FORWARDED.test(url.pathname))- throw new HttpRefusal(404, `The agents controller does not relay ${url.pathname}.`);+ throw new HttpRefusal(404, `The agent controller does not relay ${url.pathname}.`);const segment = /^\/agents\/([^/]+)\//.exec(url.pathname)?.[1];if (segment === undefined) return;const named = decodeURIComponent(segment);diff --git a/console/packages/agent-controller/src/secrets.ts b/console/packages/agent-controller/src/secrets.tsindex d34980dc7..49dbfdeff 100644--- a/console/packages/agent-controller/src/secrets.ts+++ b/console/packages/agent-controller/src/secrets.ts@@ -278,7 +278,7 @@ export class SecretServiceStore implements SecretStore {['store','--label',- 'Switch agents controller',+ 'Switch agent controller','service',SERVICE,'account',diff --git a/console/packages/agent-controller/src/separate-users.ts b/console/packages/agent-controller/src/separate-users.tsindex c003af044..347bff38a 100644--- a/console/packages/agent-controller/src/separate-users.ts+++ b/console/packages/agent-controller/src/separate-users.ts@@ -172,7 +172,7 @@ export function agentUnitTemplate('# Written by switch-agent-controller install-service --separate-users;','# run that again rather than editing this file.','[Unit]',- `Description=Switch agent %i of the agents controller run by ${config.user}`,+ `Description=Switch agent %i of the agent controller run by ${config.user}`,'StartLimitIntervalSec=600','StartLimitBurst=5','',@@ -263,7 +263,7 @@ export function controllerSystemUnit('# Written by switch-agent-controller install-service --separate-users;','# run that again rather than editing this file.','[Unit]',- `Description=Switch agents controller run by ${config.user}, each agent as a user of its own`,+ `Description=Switch agent controller run by ${config.user}, each agent as a user of its own`,'After=network-online.target','Wants=network-online.target','',diff --git a/console/packages/agent-controller/src/service.ts b/console/packages/agent-controller/src/service.tsindex 846d47783..b8314f51d 100644--- a/console/packages/agent-controller/src/service.ts+++ b/console/packages/agent-controller/src/service.ts@@ -69,7 +69,7 @@ export function systemdUnit(spec: ServiceSpec): string {const quote = (value: string) => `"${value.replace(/(["\\])/g, '\\$1')}"`;return ['[Unit]',- 'Description=Switch agents controller',+ 'Description=Switch agent controller','After=network-online.target','Wants=network-online.target','',diff --git a/console/packages/agent-providers/src/host/agent-env.ts b/console/packages/agent-providers/src/host/agent-env.tsindex fb4a2a003..aa1044857 100644--- a/console/packages/agent-providers/src/host/agent-env.ts+++ b/console/packages/agent-providers/src/host/agent-env.ts@@ -98,7 +98,7 @@ const WINDOWS_ENV = [* above, those each registered provider's runtime asks for, and the basics a* CLI needs to find itself, its home and its terminal. Matched without regard* to case on Windows, where `Path` and `PATH` are one variable.- * Console and the headless agents controller both launch hosts with it.+ * Console and the headless agent controller both launch hosts with it.*/export const EXECUTION_INHERIT_ENV: readonly string[] = [...new Set([...AGENT_ENV_VARS, ...PROVIDER_RUNTIMES.flatMap((runtime) => runtime.inheritEnv)]),diff --git a/console/packages/agent-providers/src/host/agent-host.ts b/console/packages/agent-providers/src/host/agent-host.tsindex c80041b2d..01b89aade 100644--- a/console/packages/agent-providers/src/host/agent-host.ts+++ b/console/packages/agent-providers/src/host/agent-host.ts@@ -639,7 +639,7 @@ export class AgentHostAssignments {* What a watcher hears its agent's events on, and tells Switch where its* sessions are through: its own connection to Switch (`openSwitchStream`), or* whatever hosts the watcher and holds the agent's connection for it, as an- * agents controller does for every agent on its machine.+ * agent controller does for every agent on its machine.*/export type AgentEventStream = {/** The agent host, not Switch, tells a room when it starts a session for it. */@@ -743,7 +743,7 @@ export async function runAgentHost(const placements = await SessionPlacements.open(root, () => assignments.placements());/*** This agent's sessions whose host runs here and has not said it is idle:- * the ones an agents controller restarting now would cut off mid-turn.+ * the ones an agent controller restarting now would cut off mid-turn.*/const busySessions = (): string[] => {const live = new Set(links.live());diff --git a/console/packages/agent-providers/src/host/cli-binaries.ts b/console/packages/agent-providers/src/host/cli-binaries.tsindex f99db48a7..ab7c7d741 100644--- a/console/packages/agent-providers/src/host/cli-binaries.ts+++ b/console/packages/agent-providers/src/host/cli-binaries.ts@@ -41,7 +41,7 @@ async function isFile(path: string): Promise<boolean> {/*** What sessions here last found of each vendor tool: installed, failed, or- * without a build for this machine, which the agents controller reports.+ * without a build for this machine, which the agent controller reports.*/async function record(base: string, binary: string, entry: ToolRecord): Promise<void> {const path = join(base, STATUS_FILE);diff --git a/console/packages/agent-providers/src/host/host-permissions.ts b/console/packages/agent-providers/src/host/host-permissions.tsindex 71d3cdc35..156e32406 100644--- a/console/packages/agent-providers/src/host/host-permissions.ts+++ b/console/packages/agent-providers/src/host/host-permissions.ts@@ -1,7 +1,7 @@/*** Modes for the files and directories an agent host writes into its state.*- * Private to the agent's own user by default. An agents controller that runs+ * Private to the agent's own user by default. An agent controller that runs* each agent as a Linux user of its own sets `SWITCH_HOST_SHARED_GROUP=1`: the* agent's primary group is then one the controller belongs to and no other* user does, so what the agent host writes is group-readable for thediff --git a/console/packages/agent-providers/src/host/hub-stream.ts b/console/packages/agent-providers/src/host/hub-stream.tsindex aef82fa32..9b6a1e437 100644--- a/console/packages/agent-providers/src/host/hub-stream.ts+++ b/console/packages/agent-providers/src/host/hub-stream.ts@@ -9,7 +9,7 @@ import { z } from 'zod';import type { AgentEventStream, OpenAgentStream } from './agent-host';/**- * The agents controller's hub, over a WebSocket on the controller's loopback+ * The agent controller's hub, over a WebSocket on the controller's loopback* relay: how an agent host in a process of its own (an `isolated` agent) hears* its agent's events. The controller holds the agent's connection to Switch* and hands each event to the hub; the hub hands it here, one at a time, and@@ -132,7 +132,7 @@ class HubEventStream implements AgentEventStream {});return;}- const error = reason || `the agents controller hub closed (${code})`;+ const error = reason || `the agent controller hub closed (${code})`;this.deps.onDisconnected?.({ error });if (helloed) {backoff = INITIAL_BACKOFF_MS;@@ -141,7 +141,7 @@ class HubEventStream implements AgentEventStream {failures++;// The first failure, then powers of two: a long outage costs a few lines.if ((failures & (failures - 1)) === 0)- log.warn(`The agents controller hub is unreachable (${error}); retrying.`);+ log.warn(`The agent controller hub is unreachable (${error}); retrying.`);const wait = code === HUB_CLOSE.restarting ? INITIAL_BACKOFF_MS : backoff;await sleep(Math.round(wait * (0.5 + Math.random() * 0.5)), signal);backoff = Math.min(backoff * 2, MAX_BACKOFF_MS);@@ -152,7 +152,7 @@ class HubEventStream implements AgentEventStream {private connectOnce(): Promise<{ code: number; reason: string; helloed: boolean }> {return new Promise((resolve) => {const Socket = (globalThis as { WebSocket?: HeaderedWebSocket }).WebSocket;- if (!Socket) throw new Error('The agents controller hub needs Node 22 or newer.');+ if (!Socket) throw new Error('The agent controller hub needs Node 22 or newer.');const socket = new Socket(this.url, {headers: { Authorization: `Bearer ${this.deps.creds.token}` },});@@ -176,7 +176,7 @@ class HubEventStream implements AgentEventStream {try {parsed = JSON.parse(String(message.data)) as HubServerMessage;} catch {- this.deps.log.error('Dropped a message from the agents controller hub that is not JSON');+ this.deps.log.error('Dropped a message from the agent controller hub that is not JSON');return;}if (parsed.type === 'result') {diff --git a/console/packages/agent-providers/src/host/provider-login.ts b/console/packages/agent-providers/src/host/provider-login.tsindex 12bc7815a..bda6f551a 100644--- a/console/packages/agent-providers/src/host/provider-login.ts+++ b/console/packages/agent-providers/src/host/provider-login.ts@@ -31,7 +31,7 @@ export type HostedCredential = z.infer<typeof hostedCredentialSchema>;* use `credential`: the provider's token variable, or the directory* `materializeHostedProvider` writes its login file into under `root`, or for* Claude on Vertex AI the project, the region and that file. What- * an agents controller puts in the agent's configuration, so the sessions+ * an agent controller puts in the agent's configuration, so the sessions* get it whatever environment they would otherwise inherit.*/export function providerLoginEnvironment(diff --git a/console/packages/agent-providers/src/host/provider-recheck.ts b/console/packages/agent-providers/src/host/provider-recheck.tsindex 1c1f2cb56..b938ec2f6 100644--- a/console/packages/agent-providers/src/host/provider-recheck.ts+++ b/console/packages/agent-providers/src/host/provider-recheck.ts@@ -1,5 +1,5 @@/**- * Switch Console asking the agents controller it runs on this computer to+ * Switch Console asking the agent controller it runs on this computer to* check every provider again now, over the controller's IPC channel.** The controller otherwise checks each provider at most every ten minutes, sodiff --git a/console/packages/agent-providers/src/host/service-access.ts b/console/packages/agent-providers/src/host/service-access.tsindex 2b99ce9c6..af736d5d3 100644--- a/console/packages/agent-providers/src/host/service-access.ts+++ b/console/packages/agent-providers/src/host/service-access.ts@@ -6,7 +6,7 @@ import { validServiceToken } from './service-github';* Google), as Switch grants it.** A session reads the agent's grants when it starts or resumes, through the- * agent's own Switch endpoint: its own key, or the agents controller's relay,+ * agent's own Switch endpoint: its own key, or the agent controller's relay,* which forwards `/agents/{id}/...` as the controller. A grant gives the* session its service's skill and, through the agent host, the service's* tokens. A change of access reaches its tokens within half a minutediff --git a/console/packages/agent-providers/src/host/shared-config.ts b/console/packages/agent-providers/src/host/shared-config.tsindex 9fcab6598..f5c9a1bef 100644--- a/console/packages/agent-providers/src/host/shared-config.ts+++ b/console/packages/agent-providers/src/host/shared-config.ts@@ -247,7 +247,7 @@ export async function sessionServiceGrants(config: SharedHostConfig): Promise<Se}/**- * The provider login an agents controller hands this agent host with its+ * The provider login an agent controller hands this agent host with its* credentials, when the machine has none of its own for the provider and* Switch gave it one; null when it hands none.*/@@ -272,7 +272,7 @@ export async function readSharedCredentials(config: SharedHostConfig) {SWITCH_API_ENDPOINT: z.string().min(1),SWITCH_API_TOKEN: z.string().min(1),SWITCH_AGENT_ID: z.string().min(1),- // Set when an agents controller runs the agent host in a process of+ // Set when an agent controller runs the agent host in a process of// its own: the hub it hears its events on instead of Switch.SWITCH_AGENT_HUB: z.string().min(1).optional(),}),diff --git a/console/packages/agent-providers/src/host/shared-daemon.ts b/console/packages/agent-providers/src/host/shared-daemon.tsindex f2221da0e..dfc5f8725 100644--- a/console/packages/agent-providers/src/host/shared-daemon.ts+++ b/console/packages/agent-providers/src/host/shared-daemon.ts@@ -159,7 +159,7 @@ async function main(): Promise<void> {login,config.execution?.binaryPath ?? config.start.provider);- // An agents controller running this agent host in a process of its own+ // An agent controller running this agent host in a process of its own// names its hub: the agent's events come from there, not from Switch.const hub = config.execution? (await readSharedCredentials(config)).SWITCH_AGENT_HUBdiff --git a/console/packages/agent-providers/src/host/watch-flags.ts b/console/packages/agent-providers/src/host/watch-flags.tsindex 8ae999e54..b0a4ba478 100644--- a/console/packages/agent-providers/src/host/watch-flags.ts+++ b/console/packages/agent-providers/src/host/watch-flags.ts@@ -107,7 +107,7 @@ const CONFIG_FILE = 'config.json';/*** Calls `listener` each time the agent host's `config.json` under `root` is* replaced, until `signal` fires or the returned function is called. It is- * how whoever runs the agent host (the agents controller, Console) hands it a+ * how whoever runs the agent host (the agent controller, Console) hands it a* new definition: they rewrite the file, and the running host hears it.** Writers replace the file by rename, so the directory is watched. Where thediff --git a/console/packages/agent-providers/src/sealed-login.ts b/console/packages/agent-providers/src/sealed-login.tsindex 85263cf55..65c80bc6d 100644--- a/console/packages/agent-providers/src/sealed-login.ts+++ b/console/packages/agent-providers/src/sealed-login.ts@@ -14,7 +14,7 @@ import { z } from 'zod';import { parseVertexLogin } from './vertex-login';/**- * Provider logins sealed to an agents controller's own key, so Switch stores+ * Provider logins sealed to an agent controller's own key, so Switch stores* and relays only ciphertext. The controller makes an X25519 keypair and* gives Switch the public half; Console seals a login to it; only the* controller can open it. Switch Core checks the envelope's shape and the keydiff --git a/console/packages/switch-agent-runtime/src/event-stream.ts b/console/packages/switch-agent-runtime/src/event-stream.tsindex 127736663..eff540f43 100644--- a/console/packages/switch-agent-runtime/src/event-stream.ts+++ b/console/packages/switch-agent-runtime/src/event-stream.ts@@ -188,7 +188,7 @@ export interface EventStreamLogger {export interface SessionCommand {/*** The session it is for. Null when Switch knows only the room it was typed- * in (`roomId`), as for an agent run by an agents controller: the agent+ * in (`roomId`), as for an agent run by an agent controller: the agent* decides which of its sessions that is.*/sessionId: string | null;@@ -467,7 +467,7 @@ export class SwitchEventStream {/*** Whether this client tells a room it is starting a session for it, rather- * than the server: an agents controller leaves it to the agent, Switch+ * than the server: an agent controller leaves it to the agent, Switch* itself does it for an agent connected on its own.*/get announcesSessionStarts(): boolean {diff --git a/core/switch_core/bridges/agent/auth.py b/core/switch_core/bridges/agent/auth.pyindex b0f64b458..7c8d4e514 100644--- a/core/switch_core/bridges/agent/auth.py+++ b/core/switch_core/bridges/agent/auth.py@@ -293,7 +293,7 @@ class BearerAuthMiddleware:):await _controller_refusal(MANAGED_BY_CONTROLLER,- f"Agent {agent.id} is run by an agents controller, which acts "+ f"Agent {agent.id} is run by an agent controller, which acts ""for it; its own credential is not accepted while it is.",409,)(scope, receive, send)diff --git a/core/switch_core/bridges/agent/protocol/agent_connections.py b/core/switch_core/bridges/agent/protocol/agent_connections.pyindex c6b46fe26..dc300bd83 100644--- a/core/switch_core/bridges/agent/protocol/agent_connections.py+++ b/core/switch_core/bridges/agent/protocol/agent_connections.py@@ -506,7 +506,7 @@ class AgentConnection:return self.position.get(OWN_EVENTS, 0)-# The `(transport, client)` an agent run by an agents controller counts under:+# The `(transport, client)` an agent run by an agent controller counts under:# it travels on its controller's connection, whatever that connection uses.CONTROLLER_LABEL = ("controller", "agents-controller")@@ -603,7 +603,7 @@ class AgentConnectionRegistry:# replaced wholesale, and a placement another connection takes is# reported to the one that lost it.self._placement_owners: dict[str, dict[str, str]] = {}- # Agents run by an agents controller hold no connection here: their+ # Agents run by an agent controller hold no connection here: their# presence is their controller's. Every presence question below asks# it first for those agents, and this registry for the rest.self.controllers = ControllerPresence(on_bound=self._close_for_controller)@@ -884,7 +884,7 @@ class AgentConnectionRegistry:cid,Closure(code="closed",- message="this agent is now run by an agents controller, which "+ message="this agent is now run by an agent controller, which ""receives its events; its own connection is closed",room_id=None,),@@ -1734,7 +1734,7 @@ class AgentConnectionRegistry:Counted like `live_agent_ids`: an agent is one, however manyconnections it holds, but an agent connected two different ways countsonce under each, so the labels can sum to more than the agent count.- An agent run by an agents controller has no connection of its own and+ An agent run by an agent controller has no connection of its own andcounts under `CONTROLLER_LABEL` while its controller is live.Only what this process holds: each process reports its own, so thediff --git a/core/switch_core/bridges/agent/protocol/controller_presence.py b/core/switch_core/bridges/agent/protocol/controller_presence.pyindex f69b9a938..ffe3fbb28 100644--- a/core/switch_core/bridges/agent/protocol/controller_presence.py+++ b/core/switch_core/bridges/agent/protocol/controller_presence.py@@ -1,6 +1,6 @@"""Controller-backed agents: who runs them, and whether that runner is there.-An agent placed on an agents controller has no connection of its own. Its+An agent placed on an agent controller has no connection of its own. Itscontroller holds one stream for every agent bound to it, and the agent isreachable exactly while that stream is: attached, and beating within the sameTTL an agent connection beats in (`connections.HEARTBEAT_TTL_SECONDS`). Corediff --git a/core/switch_core/bridges/agent/protocol/controller_stream.py b/core/switch_core/bridges/agent/protocol/controller_stream.pyindex 2e9581975..a7dfee7b5 100644--- a/core/switch_core/bridges/agent/protocol/controller_stream.py+++ b/core/switch_core/bridges/agent/protocol/controller_stream.py@@ -1,4 +1,4 @@-"""One stream per agents controller, sent on its socket+"""One stream per agent controller, sent on its socket(`/v1/controllers/{id}/connection/ws`).A read-side merge over the per-agent `EventBuffer`: every agent bound to thediff --git a/core/switch_core/bridges/agent/protocol/statuses.py b/core/switch_core/bridges/agent/protocol/statuses.pyindex e3099023a..17c9dc6ab 100644--- a/core/switch_core/bridges/agent/protocol/statuses.py+++ b/core/switch_core/bridges/agent/protocol/statuses.py@@ -196,7 +196,7 @@ async def agent_statuses_by_room(def controller_statuses(agents: list[Agent], connections: AgentConnectionRegistry) -> dict[str, AgentStatus]:- """Presence for agents run by an agents controller.+ """Presence for agents run by an agent controller.Switch knows only whether such an agent is connected, not where itssessions are: whatever its `connection_model`, it is LIVE while itsdiff --git a/core/switch_core/config.py b/core/switch_core/config.pyindex ddbc632c0..b263c3400 100644--- a/core/switch_core/config.py+++ b/core/switch_core/config.py@@ -94,7 +94,7 @@ _SHA256_HEX_RE = re.compile(r"[0-9a-f]{64}")@dataclass(frozen=True)class ControllerRelease:- """The agents controller package every controller is told to run."""+ """The agent controller package every controller is told to run."""version: strurl: str@@ -311,7 +311,7 @@ class SwitchConfig(BaseSettings):gateway_signup_max_per_hour: int = Field(default=20, ge=1)# How many cloud machines the bound tenant may have at once; 0 means this# server cannot run them. The `hosted_agents` flag is what offers them.- # Cloud machines run the agents controller, so above 0 this needs the+ # Cloud machines run the agent controller, so above 0 this needs the# `agent_management` flag.hosted_launch_capacity: int = Field(default=0, ge=0, le=100)hosted_idle_stop_minutes: int = Field(default=30, ge=0, le=1440)@@ -558,7 +558,7 @@ class SwitchConfig(BaseSettings):# agent-bridge app) so the "Open in Switch Console" link is clickable on platforms# that only linkify http(s) (Discord, and any future http-only bridge). When# unset, the raw `switchdash://` deeplink is posted as-is. Also the- # `--server` an agents controller enrolls against, which the gateway's Add+ # `--server` an agent controller enrolls against, which the gateway's Add# machine dialog shows; unset, it shows no enrollment command.gateway_public_url: str | None = None@@ -771,7 +771,7 @@ class SwitchConfig(BaseSettings):# `report_within_s`; a controller that has not reported for three of these# is shown as unknown and refused new placements.controller_status_interval_seconds: int = 60- # The agents controller release every controller is told to run, in+ # The agent controller release every controller is told to run, in# answer to its status report. Set all three or none: with none, no# controller is told anything and each keeps the version it has. A# controller downloads the package from the URL, refuses it unless its@@ -881,7 +881,7 @@ class SwitchConfig(BaseSettings):raise ValueError("HOSTED_LAUNCH_CAPACITY needs the "f"{AGENT_MANAGEMENT!r} feature flag: cloud machines run the "- "agents controller."+ "agent controller.")return selfif not self.controller_token_secret:diff --git a/core/switch_core/db/models.py b/core/switch_core/db/models.pyindex b5ee6af5c..301a66b69 100644--- a/core/switch_core/db/models.py+++ b/core/switch_core/db/models.py@@ -398,7 +398,7 @@ class CloudMachine(Base):class MachineWorkspace(TenantScoped, Base):- """A workspace on its owner's cloud machine: the agents controller the+ """A workspace on its owner's cloud machine: the agent controller themachine runs for this workspace, enrolled with a one-time code minted here.The owner's managed agents placed on that controller run on the machine."""diff --git a/core/switch_core/db/stores/hosted_machine_store.py b/core/switch_core/db/stores/hosted_machine_store.pyindex 8796646f9..e0ec380d0 100644--- a/core/switch_core/db/stores/hosted_machine_store.py+++ b/core/switch_core/db/stores/hosted_machine_store.py@@ -28,7 +28,7 @@ MACHINES_FULL = "Every Switch cloud machine on this server is in use. Try againMACHINE_BEING_REMOVED = ("Your previous cloud machine is being removed. Try again in a minute.")-#: How many workspaces one machine serves: each runs its own agents controller.+#: How many workspaces one machine serves: each runs its own agent controller.MAX_MACHINE_WORKSPACES = 8MACHINE_WORKSPACES_FULL = (f"Your cloud machine already serves {MAX_MACHINE_WORKSPACES} workspaces, the most "diff --git a/core/switch_core/delivery/recipient.py b/core/switch_core/delivery/recipient.pyindex 8030d0f64..230486e4e 100644--- a/core/switch_core/delivery/recipient.py+++ b/core/switch_core/delivery/recipient.py@@ -1317,7 +1317,7 @@ class AgentRecipient:async def _controller_unavailable_reply(self, session: AsyncSession, agent: Agent, meta: RoomMeta, asker_handle: str) -> str | None:- """Why an agent run by an agents controller cannot answer here.+ """Why an agent run by an agent controller cannot answer here.Never "open Switch Console": a managed agentis started by its controller, so the reply names what stands in thediff --git a/core/switch_core/gateway/cloud_controllers.py b/core/switch_core/gateway/cloud_controllers.pyindex 9e559bd80..a8c7ad374 100644--- a/core/switch_core/gateway/cloud_controllers.py+++ b/core/switch_core/gateway/cloud_controllers.py@@ -1,4 +1,4 @@-"""Switch cloud machines, which run the agents controller.+"""Switch cloud machines, which run the agent controller.A cloud machine is its owner's, whichever workspaces it serves(`CloudMachine`). For each workspace it boots a `switch-agent-controller` ofdiff --git a/core/switch_core/gateway/schemas.py b/core/switch_core/gateway/schemas.pyindex 0a54c040d..68b785e28 100644--- a/core/switch_core/gateway/schemas.py+++ b/core/switch_core/gateway/schemas.py@@ -328,7 +328,7 @@ class AgentSessionDetail(BaseModel):`lifecycle` is `heartbeat` or `explicit` for an `agent_sessions` row,`connection` for an agent's own live connection, and `controller` for a- controller-backed agent's session, which its agents controller (a machine)+ controller-backed agent's session, which its agent controller (a machine)runs; `controller_id` names that controller, and is null otherwise."""diff --git a/core/switch_core/observability/catalogue.py b/core/switch_core/observability/catalogue.pyindex 25355d406..436670b65 100644--- a/core/switch_core/observability/catalogue.py+++ b/core/switch_core/observability/catalogue.py@@ -504,7 +504,7 @@ AGENT_CONNECTIONS_OPENED = _spec(# `transport` is `websocket`, `sse` (an old client on the event stream, kept# for a compatibility window that ends when this stays at zero), `detached`# (the stream dropped, and the connection waits out its heartbeat window), or-# `controller` (run by an agents controller, on that controller's connection).+# `controller` (run by an agent controller, on that controller's connection).AGENTS_CONNECTED = _spec("switch.agents.connected","gauge",diff --git a/core/tests/switch_core/bridges/agent/protocol/test_controller_presence.py b/core/tests/switch_core/bridges/agent/protocol/test_controller_presence.pyindex 77d134954..d79f14bd5 100644--- a/core/tests/switch_core/bridges/agent/protocol/test_controller_presence.py+++ b/core/tests/switch_core/bridges/agent/protocol/test_controller_presence.py@@ -1,4 +1,4 @@-"""Presence for agents run by an agents controller.+"""Presence for agents run by an agent controller.A controller-backed agent holds no connection of its own: it is live while itscontroller's stream is attached and beating, and every presence reader asks thediff --git a/core/tests/switch_core/gateway/test_chats_warm.py b/core/tests/switch_core/gateway/test_chats_warm.pyindex 64a07ac92..c581dd8b4 100644--- a/core/tests/switch_core/gateway/test_chats_warm.py+++ b/core/tests/switch_core/gateway/test_chats_warm.py@@ -127,7 +127,7 @@ async def test_creating_a_chat_with_an_agent_no_controller_hosts_starts_nothing(]-async def test_a_warm_reaches_the_agents_controller(chats: _Harness) -> None:+async def test_a_warm_reaches_the_agent_controller(chats: _Harness) -> None:agent = await chats.agent("helper", owner=chats.alice)controller = _on_controller(chats.connections, agent)room_id = await chats.new_chat(chats.alice, agent, "c1")diff --git a/core/tests/switch_core/gateway/test_cloud_controller_machines.py b/core/tests/switch_core/gateway/test_cloud_controller_machines.pyindex 387d8fe8d..df32e5205 100644--- a/core/tests/switch_core/gateway/test_cloud_controller_machines.py+++ b/core/tests/switch_core/gateway/test_cloud_controller_machines.py@@ -1,4 +1,4 @@-"""Switch cloud machines that run the agents controller, end to end against Postgres.+"""Switch cloud machines that run the agent controller, end to end against Postgres.The hosted controller prepares a cloud machine; Core hands it aone-time enrollment code (the same one on every retry of a revision); thediff --git a/core/tests/switch_core/test_ingress_agent_api_paths.py b/core/tests/switch_core/test_ingress_agent_api_paths.pyindex 49e2be5f7..c9a88450d 100644--- a/core/tests/switch_core/test_ingress_agent_api_paths.py+++ b/core/tests/switch_core/test_ingress_agent_api_paths.py@@ -67,7 +67,7 @@ def _served_prefixes() -> set[str]:gateway_ui=None,)prefixes = set(_ADDED_IN_MAIN)- # The agents controller's routes join the agent bridge app only when agent+ # The agent controller's routes join the agent bridge app only when agent# management is on (`management/wiring.py`), so they are read from their# router here.for route in [*app.routes, *controller_router.routes]:diff --git a/deploy/hosted/README.md b/deploy/hosted/README.mdindex 82d6e306b..a7568a28a 100644--- a/deploy/hosted/README.md+++ b/deploy/hosted/README.md@@ -23,7 +23,7 @@ This directory holds what runs the machines:exposed port.Machines never join the cluster. They reach Switch over its public,-authenticated HTTPS API, as any agents controller does.+authenticated HTTPS API, as any agent controller does.## How a user gets a machine@@ -34,7 +34,7 @@ controller for this workspace once it has reported. A machine serves up to 8workspaces. Self sign-up claims one too, so it warmswhile the user signs in. The hosted controller polls Core for the machines thatshould exist, creates the data volume, and launches the VM with a bundle as its-user data. The machine runs one agents controller per workspace seated on it,+user data. The machine runs one agent controller per workspace seated on it,and the bundle (version 5) lists them in Core's order, each under its seat keywith either the controller it enrolled as or a one-time enrollment code. Themachine enrolls each controller with its code, and their status reports arediff --git a/deploy/hosted/controller/src/switch_hosted_controller/gateway.py b/deploy/hosted/controller/src/switch_hosted_controller/gateway.pyindex 27b353215..54bba3efc 100644--- a/deploy/hosted/controller/src/switch_hosted_controller/gateway.py+++ b/deploy/hosted/controller/src/switch_hosted_controller/gateway.py@@ -385,7 +385,7 @@ class Gateway:}def bundle(self, prepared: dict, machine: Machine) -> dict:- """The bundle a machine boots its agents controllers from, its+ """The bundle a machine boots its agent controllers from, itsinstance's user data: one controller per workspace seated on themachine, each the controller it enrolled as or the one-time code itenrolls with until it has one. Never a long-lived credential: thediff --git a/deploy/hosted/machine/install.sh b/deploy/hosted/machine/install.shindex 81ca9d385..b46ac246d 100644--- a/deploy/hosted/machine/install.sh+++ b/deploy/hosted/machine/install.sh@@ -1,5 +1,5 @@#!/bin/sh-# Bakes a Switch cloud machine image that runs the agents controller.+# Bakes a Switch cloud machine image that runs the agent controller.## install.sh <switch-agent-controller .tgz> <node-sha256> [agent-users]#@@ -68,7 +68,7 @@ if ! getent passwd "$controller_user" >/dev/null; thengroupadd --system --gid "$controller_uid" "$controller_user"useradd --system --uid "$controller_uid" --gid "$controller_uid" \--no-create-home --home-dir /nonexistent --shell /usr/sbin/nologin \- --comment "Switch agents controller" "$controller_user"+ --comment "Switch agent controller" "$controller_user"fi[ "$(id -u "$controller_user")" -eq "$controller_uid" ] || {echo "$controller_user exists with another uid than $controller_uid" >&2diff --git a/deploy/hosted/machine/switch-machine-boot.service b/deploy/hosted/machine/switch-machine-boot.serviceindex eaea986fe..1bbfbb367 100644--- a/deploy/hosted/machine/switch-machine-boot.service+++ b/deploy/hosted/machine/switch-machine-boot.service@@ -1,5 +1,5 @@[Unit]-Description=Mount this Switch cloud machine's data volume and start its agents controllers+Description=Mount this Switch cloud machine's data volume and start its agent controllersWants=network-online.targetAfter=network-online.targetdiff --git a/deploy/hosted/machine/switch_machine_boot.py b/deploy/hosted/machine/switch_machine_boot.pyindex b09fde051..6199e0189 100644--- a/deploy/hosted/machine/switch_machine_boot.py+++ b/deploy/hosted/machine/switch_machine_boot.py@@ -1,5 +1,5 @@#!/usr/bin/env python3-"""Boot a Switch cloud machine that runs one agents controller per workspace.+"""Boot a Switch cloud machine that runs one agent controller per workspace.Runs as root, once per boot, before the controllers' services(`switch-machine-boot.service`). It reads the bundle the hosted controller@@ -625,7 +625,7 @@ def ensure_identities(commands: Commands, config: MachineConfig, seat: Seat) ->seat.uid,str(seat.gid),seat.gid,- "Switch agents controller",+ "Switch agent controller",)_ensure_group(commands, seat.agents_group, seat.agents_gid)for slot in range(1, config.agent_users + 1):diff --git a/deploy/hosted/machine/tests/test_boot.py b/deploy/hosted/machine/tests/test_boot.pyindex 26c9bfb66..2454c3335 100644--- a/deploy/hosted/machine/tests/test_boot.py+++ b/deploy/hosted/machine/tests/test_boot.py@@ -1,4 +1,4 @@-"""The boot of a Switch cloud machine that runs one agents controller per workspace."""+"""The boot of a Switch cloud machine that runs one agent controller per workspace."""from __future__ import annotations@@ -485,7 +485,7 @@ def test_another_index_gets_its_users_with_their_fixed_ids():"2200",*nologin,"--comment",- "Switch agents controller",+ "Switch agent controller","switch-controller-1",],["/usr/sbin/groupadd", "--system", "--gid", "2201", "switch-agents-2200"],diff --git a/deploy/remote/helm/switch/README.md b/deploy/remote/helm/switch/README.mdindex f5f60d1db..2d01a43c6 100644--- a/deploy/remote/helm/switch/README.md+++ b/deploy/remote/helm/switch/README.md@@ -269,7 +269,7 @@ AGENT_MANAGEMENT_ENABLED- CONTROLLER_TOKEN_SECRET-`). Otherwise Helm merges its### Controller updates-`switchCore.controllerRelease` names the agents controller release switch-core+`switchCore.controllerRelease` names the agent controller release switch-coretells every controller to run (cloud machines, and `switch-agent-controller`on SSH hosts and laptops; Switch Console's own controller updates with Console):diff --git a/deploy/remote/helm/switch/samples/ingress.example.yaml b/deploy/remote/helm/switch/samples/ingress.example.yamlindex d3c2e51da..11f6fa26e 100644--- a/deploy/remote/helm/switch/samples/ingress.example.yaml+++ b/deploy/remote/helm/switch/samples/ingress.example.yaml@@ -52,7 +52,7 @@ spec:- path: /deeplinkpathType: Prefixbackend: { service: { name: RELEASE-switch-core, port: { number: 8000 } } }- # Agents controllers: enrollment, tokens, assignment, status and+ # Agent controllers: enrollment, tokens, assignment, status and# their event stream (/v1/management/..., /v1/controllers/...).- path: /v1pathType: Prefixdiff --git a/deploy/remote/helm/switch/values.yaml b/deploy/remote/helm/switch/values.yamlindex 64ec55928..90509400d 100644--- a/deploy/remote/helm/switch/values.yaml+++ b/deploy/remote/helm/switch/values.yaml@@ -68,7 +68,7 @@ ingress:- /agent-sessions- /version- /deeplink- # Agents controllers: enrollment, tokens, assignment, status and their+ # Agent controllers: enrollment, tokens, assignment, status and their# event stream (/v1/management/..., /v1/controllers/...).- /v1- /mcp@@ -210,7 +210,7 @@ switchCore:googleWorkspaceClientSecret: ""hostedControllerSecret: ""# How many cloud machines may run at once; 0 means this server cannot run- # them. Cloud machines run the agents controller, so above 0 this needs the+ # them. Cloud machines run the agent controller, so above 0 this needs the# "agent_management" feature flag. The "hosted_agents" flag is what offers# them in Switch Console.hostedLaunchCapacity: 0@@ -400,7 +400,7 @@ switchCore:# people mention the agent again. FOLLOW_THE_CONVERSATION_WINDOW_SECONDS,# 1 to 3600.windowSeconds: 300- # The agents controller release switch-core tells every controller to run+ # The agent controller release switch-core tells every controller to run# (CONTROLLER_RELEASE_VERSION / _URL / _SHA256), except Switch Console's own,# which updates with Console. A controller that runs# another version downloads the package from `url`, refuses it unless itsdiff --git a/docs/design/agent-controllers-v1.md b/docs/design/agent-controllers-v1.mdindex ee6645fd4..2ee35d90d 100644--- a/docs/design/agent-controllers-v1.md+++ b/docs/design/agent-controllers-v1.md@@ -2,7 +2,7 @@Status: in progress. This is the implementation spec for the first slice of theagent-controller design. It covers the **Core management module behind a flag** and the-**headless agents controller**. The full target contract is+**headless agent controller**. The full target contract is`controller-contract-v1.md` (to be added alongside); this file says what v1 builds, andwhere it deliberately stops short.@@ -12,7 +12,7 @@ where it deliberately stops short.`agent_management` feature flag is on): the source of truth for managed agents. It holds agentdefinitions, which controller each one runs on, controller enrollment and credentials,controller status, and operations.-- **Agents controller** (`console/packages/agent-controller`, a Node CLI): one per+- **Agent controller** (`console/packages/agent-controller`, a Node CLI): one permachine. It pulls its assignment, runs each assigned agent through the existingshared-host agent host (the same `--watch-*` runtime the Console sidecar uses), and reportsstatus.@@ -318,7 +318,7 @@ has not reported recently, the provider is not installed or not logged in there,ends with the reason code in parentheses. Another person's machine, by id or name, getsexactly the answer a missing one does.-## Headless agents controller (`console/packages/agent-controller`)+## Headless agent controller (`console/packages/agent-controller`)- CLI `switch-agent-controller`, released as its own npm package on`switch-agent-controller-v*` GitHub releases, with an `install.sh` (see RELEASING.md):diff --git a/docs/design/controller-contract-v1.md b/docs/design/controller-contract-v1.mdindex 4e86ac251..f4f1c483a 100644--- a/docs/design/controller-contract-v1.md+++ b/docs/design/controller-contract-v1.md@@ -1,6 +1,6 @@-# Agents controller contract, v1 (draft)+# Agent controller contract, v1 (draft)-The full contract between an **agents controller** and the Switch server (**Management** plus **Core**).+The full contract between an **agent controller** and the Switch server (**Management** plus **Core**).Step 1 of the roadmap turns this into OpenAPI and JSON Schema files plus recorded fixtures. The types below are the source for those files.---diff --git a/docs/design/service-connections-v1.md b/docs/design/service-connections-v1.mdindex 9942acf90..b295465a7 100644--- a/docs/design/service-connections-v1.md+++ b/docs/design/service-connections-v1.md@@ -621,7 +621,7 @@ vendor's HTTP side is faked.## Rollout-Deploy Core, then update Console and the agents controllers (cloud machines+Deploy Core, then update Console and the agent controllers (cloud machinesincluded), then drop `provider_connections` in the next release.## Operating a self-hosted Core with GitHubdiff --git a/docs/design/service-connections-v2.md b/docs/design/service-connections-v2.mdindex 7d6b6a6f1..8e875847b 100644--- a/docs/design/service-connections-v2.md+++ b/docs/design/service-connections-v2.md@@ -222,7 +222,7 @@ reads `.zip` too on Windows) and installs it under`~/.local/state/switch/tools/<binary>/<sha256>/`, once per machine. Upgrading atool is a catalog change; a machine without a build is told so when the toolis called. What each install found (installed, failed, no build here) is kept-in that folder's `status.json`, and the agents controller reports it with `git`+in that folder's `status.json`, and the agent controller reports it with `git`and `gh` in its status (`ok`, `missing` or `unsupported`).Pinning the build in the catalog means Core names a binary that session hostsdiff --git a/gateway/src/data/api.ts b/gateway/src/data/api.tsindex 0fe9b913d..2085af73e 100644--- a/gateway/src/data/api.ts+++ b/gateway/src/data/api.ts@@ -79,11 +79,11 @@ export interface AgentSessionDetail {room_id: string | null;room_name: string | null;// `heartbeat` / `explicit` (a session row), `connection` (the agent's own- // connection) or `controller` (run by the agents controller it is placed on).+ // connection) or `controller` (run by the agent controller it is placed on).lifecycle: string;state: string;last_seen_at: string;- // The agents controller running it, for a `controller` session; else null.+ // The agent controller running it, for a `controller` session; else null.controller_id: string | null;}diff --git a/gateway/src/pages/agents/sessionLabels.test.tsx b/gateway/src/pages/agents/sessionLabels.test.tsxindex 670166acb..29dc9b15a 100644--- a/gateway/src/pages/agents/sessionLabels.test.tsx+++ b/gateway/src/pages/agents/sessionLabels.test.tsx@@ -24,14 +24,14 @@ describe("sessionRunner", () => {).toEqual({label: "Run by a machine",detail:- "Run by agents controller ctrl-1 on the machine the agent is placed on, working in this room.",+ "Run by agent controller ctrl-1 on the machine the agent is placed on, working in this room.",});expect(sessionRunner(session({ lifecycle: "controller", controller_id: "ctrl-1", room_id: null, room_name: null }),)?.detail,).toBe(- "Run by agents controller ctrl-1 on the machine the agent is placed on, running, with no session working in a room yet.",+ "Run by agent controller ctrl-1 on the machine the agent is placed on, running, with no session working in a room yet.",);});diff --git a/gateway/src/pages/agents/sessionLabels.ts b/gateway/src/pages/agents/sessionLabels.tsindex bc2ee6d2e..380a6adeb 100644--- a/gateway/src/pages/agents/sessionLabels.ts+++ b/gateway/src/pages/agents/sessionLabels.ts@@ -8,7 +8,7 @@ export interface SessionRunner {}/**- * A controller-backed agent's sessions are run by the agents controller of the+ * A controller-backed agent's sessions are run by the agent controller of the* machine it is placed on, not by a connection of its own; say so, and name the* controller. Null for every other session, which the agent runs itself.*/@@ -20,8 +20,8 @@ export function sessionRunner(session: AgentSessionDetail): SessionRunner | nullreturn {label: "Run by a machine",detail: session.controller_id- ? `Run by agents controller ${session.controller_id} on the machine the agent is placed on, ${place}.`- : `Run by the agents controller of the machine the agent is placed on, ${place}.`,+ ? `Run by agent controller ${session.controller_id} on the machine the agent is placed on, ${place}.`+ : `Run by the agent controller of the machine the agent is placed on, ${place}.`,};}diff --git a/gateway/src/pages/machines/AddMachineDialog.tsx b/gateway/src/pages/machines/AddMachineDialog.tsxindex b02ca2929..433a4c252 100644--- a/gateway/src/pages/machines/AddMachineDialog.tsx+++ b/gateway/src/pages/machines/AddMachineDialog.tsx@@ -55,7 +55,7 @@ function CopyBlock({ text, label }: { text: string; label: string }) {/*** Issues a one-time enrollment code and shows the commands that install a- * machine's agents controller and enroll it with that code. The code is shown+ * machine's agent controller and enroll it with that code. The code is shown* once: closing the dialog discards it, and a new open issues a new one. The* optional name and description go into the commands, so the machine enrolls* with them.@@ -103,7 +103,7 @@ export default function AddMachineDialog({<DialogTitle>Add a machine</DialogTitle><DialogContent><DialogContentText sx={{ mb: 2 }}>- Run the agents controller on the machine that should run your agents (a laptop, your+ Run the agent controller on the machine that should run your agents (a laptop, yourown VM or a server). Enroll it once with the code below; it then runs whatever agentsyou place on it here. It needs Linux or macOS with Node 22.13 or later, and the CLI ofeach provider your agents use (such as <code>claude</code> or <code>codex</code>),diff --git a/gateway/src/pages/machines/MachinesPage.tsx b/gateway/src/pages/machines/MachinesPage.tsxindex 129c7b465..654e8af65 100644--- a/gateway/src/pages/machines/MachinesPage.tsx+++ b/gateway/src/pages/machines/MachinesPage.tsx@@ -668,7 +668,7 @@ export default function MachinesPage() {<Box><Typography variant="h5">Machines</Typography><Typography variant="body2" color="text.secondary">- Computers running an agents controller. Each one runs the agents you place on it+ Computers running an agent controller. Each one runs the agents you place on itand reports what it sees.</Typography></Box>diff --git a/scripts/prune_dev_packages.py b/scripts/prune_dev_packages.pyindex b7391e315..603de6f58 100644--- a/scripts/prune_dev_packages.py+++ b/scripts/prune_dev_packages.py@@ -2,7 +2,7 @@"""Delete old dev builds from GHCR, and the dev controller releases.Every push to main publishes the images and chart under `<owner>/dev/…`-(see .github/workflows/switch-release.yml), and the agents controller as a+(see .github/workflows/switch-release.yml), and the agent controller as aGitHub prerelease tagged `switch-agent-controller-v<x.y.z>-dev.<n>.g<sha>`. Those packages hold nothing but devbuilds, so pruning them cannot touch a release. A version is deleted when it isolder than `--max-age-days` AND older than the `--keep` newest tagged builds,