π OpenHands: AI-Driven Development
chore: bump agent-server default to 1.22.1 (#477)
Hiep Le2d5a52d4beea
diff --git a/AGENTS.md b/AGENTS.mdindex 8e69fed867..618882ff57 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -170,7 +170,7 @@- `/api/automation/*` β automation backend (:18001)- `/api/*`, `/sockets`, etc. β agent server (:18000)- `/*` (default) β frontend server (:3001), either Vite or static depending on launcher mode- - Environment variables: `PORT` (ingress port, default: 8000), `OH_AUTOMATION_GIT_REF` (git ref, overrides default version), `OH_AUTOMATION_VERSION` (default: `1.0.0a2`), `AUTOMATION_LOCAL_API_KEY` (optional, use a fixed key; default: persisted generated key), `OH_AUTOMATION_API_KEY_PATH` (override the persisted default key path)+ - Environment variables: `PORT` (ingress port, default: 8000), `OH_AUTOMATION_GIT_REF` (git ref, overrides default version), `OH_AUTOMATION_VERSION` (default: `1.0.0a3`), `AUTOMATION_LOCAL_API_KEY` (optional, use a fixed key; default: persisted generated key), `OH_AUTOMATION_API_KEY_PATH` (override the persisted default key path)- `scripts/check-sdk-version-sync.mjs` checks the released `openhands-automation` package against `DEFAULT_AUTOMATION_SDK_VERSION` in `scripts/dev-with-automation.mjs`; that value may intentionally lag `DEFAULT_AGENT_SERVER_VERSION` while automation has not yet published a matching release.- Access points: `http://localhost:8000/` (main UI), `http://localhost:8000/api/automation/docs` (API docs)- Security: `AUTOMATION_LOCAL_API_KEY` defaults to a generated key persisted across restarts because static frontend builds bake it into `VITE_AUTOMATION_API_KEY`. Set the env var explicitly to rotate or pin it. The cipher key (`OH_SECRET_KEY`) keeps a static default for local dev since it's used for encrypting/decrypting persisted settings values.@@ -260,9 +260,9 @@- Worktree policy (this conversation): commits are made on the worktree branch and the user expects the worktree to stay attached to that branch. Do NOT run `git switch --detach` in the worktree and reattach the branch to the main workspace after each commit β only do that when the user explicitly asks. See `~/.openhands/skills/worktree-switch/SKILL.md` for the manual procedure the user invokes.-- Files tab diff-view default logic: keyed off `useHasAttachedSource()` (`src/hooks/use-has-attached-source.ts`), which is true when the user explicitly attached *either* a repo (`conversation.selected_repository`) *or* a local workspace (`getStoredConversationMetadata(id).selected_workspace`, persisted by `createConversation` when `workingDirOverride` is supplied). The agent-server pre-initialises every conversation workspace as a git worktree for its own change tracking, so do NOT use a filesystem probe (`git status` / `useUnifiedGetGitChanges`) as the attachment signal β that was tried in earlier iterations and made every fresh no-attachment conversation incorrectly default to diff view. The companion `useHasGitCommits` probe (`src/hooks/query/use-has-git-commits.ts`) then suppresses diff view for attached-but-empty cases (unborn HEAD, non-git workspace).+- Files tab diff-view default logic: keyed off `useHasAttachedSource()` (`src/hooks/use-has-attached-source.ts`), which is true when the user explicitly attached _either_ a repo (`conversation.selected_repository`) _or_ a local workspace (`getStoredConversationMetadata(id).selected_workspace`, persisted by `createConversation` when `workingDirOverride` is supplied). The agent-server pre-initialises every conversation workspace as a git worktree for its own change tracking, so do NOT use a filesystem probe (`git status` / `useUnifiedGetGitChanges`) as the attachment signal β that was tried in earlier iterations and made every fresh no-attachment conversation incorrectly default to diff view. The companion `useHasGitCommits` probe (`src/hooks/query/use-has-git-commits.ts`) then suppresses diff view for attached-but-empty cases (unborn HEAD, non-git workspace).-- Files tab diff-view default logic: keyed off `useHasAttachedSource()` (`src/hooks/use-has-attached-source.ts`), which is true when the user explicitly attached *either* a repo (`conversation.selected_repository`) *or* a local workspace (`getStoredConversationMetadata(id).selected_workspace`, persisted by `createConversation` when `workingDirOverride` is supplied). The agent-server pre-initialises every conversation workspace as a git worktree for its own change tracking, so do NOT use a filesystem probe (`git status` / `useUnifiedGetGitChanges`) as the attachment signal β that was tried in earlier iterations and made every fresh no-attachment conversation incorrectly default to diff view. The companion `useHasGitCommits` probe (`src/hooks/query/use-has-git-commits.ts`) then suppresses diff view for attached-but-empty cases (unborn HEAD, non-git workspace).+- Files tab diff-view default logic: keyed off `useHasAttachedSource()` (`src/hooks/use-has-attached-source.ts`), which is true when the user explicitly attached _either_ a repo (`conversation.selected_repository`) _or_ a local workspace (`getStoredConversationMetadata(id).selected_workspace`, persisted by `createConversation` when `workingDirOverride` is supplied). The agent-server pre-initialises every conversation workspace as a git worktree for its own change tracking, so do NOT use a filesystem probe (`git status` / `useUnifiedGetGitChanges`) as the attachment signal β that was tried in earlier iterations and made every fresh no-attachment conversation incorrectly default to diff view. The companion `useHasGitCommits` probe (`src/hooks/query/use-has-git-commits.ts`) then suppresses diff view for attached-but-empty cases (unborn HEAD, non-git workspace).- Collapsible thinking: `ThinkAction` events and LLM extended reasoning (`reasoning_content` / `thinking_blocks` on `ActionEvent`) are rendered as collapsible sections via `CollapsibleThinking` (`src/components/conversation-events/chat/event-message-components/collapsible-thinking.tsx`). Collapsed by default to keep the chat compact β the thinking is often in English regardless of the user's conversation language. The `getReasoningContent()` helper in `event-thought-helpers.ts` extracts the content, preferring `reasoning_content` (plain string) and falling back to Anthropic `thinking_blocks`. i18n keys: `THINKING$TITLE`, `THINKING$EXPAND`, `THINKING$COLLAPSE`. Tests: `__tests__/components/conversation-events/chat/event-message-think-action.test.tsx`.diff --git a/__tests__/scripts/dev-with-automation.test.ts b/__tests__/scripts/dev-with-automation.test.tsindex 38284eae40..2f7eed62ed 100644--- a/__tests__/scripts/dev-with-automation.test.ts+++ b/__tests__/scripts/dev-with-automation.test.ts@@ -81,9 +81,7 @@ describe("buildAutomationCommand", () => {});expect(cmd.command).toBe("uvx");- expect(cmd.args).toContain(- `git+${DEFAULT_AUTOMATION_REPO}@abc123def456`,- );+ expect(cmd.args).toContain(`git+${DEFAULT_AUTOMATION_REPO}@abc123def456`);expect(cmd.source).toBe("git (abc123def456)");});@@ -93,9 +91,7 @@ describe("buildAutomationCommand", () => {});expect(cmd.command).toBe("uvx");- expect(cmd.args).toContain(- `${DEFAULT_AUTOMATION_PACKAGE}==1.0.0`,- );+ expect(cmd.args).toContain(`${DEFAULT_AUTOMATION_PACKAGE}==1.0.0`);expect(cmd.source).toBe("PyPI (1.0.0)");});@@ -106,9 +102,7 @@ describe("buildAutomationCommand", () => {});expect(cmd.command).toBe("uvx");- expect(cmd.args).toContain(- `git+${DEFAULT_AUTOMATION_REPO}@main`,- );+ expect(cmd.args).toContain(`git+${DEFAULT_AUTOMATION_REPO}@main`);expect(cmd.args).not.toContain(`${DEFAULT_AUTOMATION_PACKAGE}==1.0.0`);expect(cmd.source).toBe("git (main)");});@@ -268,7 +262,10 @@ describe("buildConfig", () => {});it("passes verbose flag through", async () => {- const config = await buildConfig({ verbose: true }, envWithIsolatedKeyPath());+ const config = await buildConfig(+ { verbose: true },+ envWithIsolatedKeyPath(),+ );expect(config.verbose).toBe(true);});@@ -330,41 +327,56 @@ describe("buildConfig", () => {});it("reads sessionApiKey from VITE_SESSION_API_KEY as fallback", async () => {- const config = await buildConfig({}, { VITE_SESSION_API_KEY: "vite-session-key" });+ const config = await buildConfig(+ {},+ { VITE_SESSION_API_KEY: "vite-session-key" },+ );expect(config.sessionApiKey).toBe("vite-session-key");});it("SESSION_API_KEY takes precedence over VITE_SESSION_API_KEY", async () => {- const config = await buildConfig({}, {- SESSION_API_KEY: "session-key",- VITE_SESSION_API_KEY: "vite-key",- });+ const config = await buildConfig(+ {},+ {+ SESSION_API_KEY: "session-key",+ VITE_SESSION_API_KEY: "vite-key",+ },+ );expect(config.sessionApiKey).toBe("session-key");});it("reads sessionApiKey from OH_SESSION_API_KEYS_0 (agent-server V1 env)", async () => {- const config = await buildConfig({}, { OH_SESSION_API_KEYS_0: "v1-session-key" });+ const config = await buildConfig(+ {},+ { OH_SESSION_API_KEYS_0: "v1-session-key" },+ );expect(config.sessionApiKey).toBe("v1-session-key");});it("SESSION_API_KEY takes precedence over OH_SESSION_API_KEYS_0", async () => {- const config = await buildConfig({}, {- SESSION_API_KEY: "v0-key",- OH_SESSION_API_KEYS_0: "v1-key",- });+ const config = await buildConfig(+ {},+ {+ SESSION_API_KEY: "v0-key",+ OH_SESSION_API_KEYS_0: "v1-key",+ },+ );expect(config.sessionApiKey).toBe("v0-key");});it("SESSION_API_KEY takes precedence over all other session key env vars", async () => {- const config = await buildConfig({}, {- SESSION_API_KEY: "v0-key",- OH_SESSION_API_KEYS_0: "v1-key",- VITE_SESSION_API_KEY: "vite-key",- });+ const config = await buildConfig(+ {},+ {+ SESSION_API_KEY: "v0-key",+ OH_SESSION_API_KEYS_0: "v1-key",+ VITE_SESSION_API_KEY: "vite-key",+ },+ );expect(config.sessionApiKey).toBe("v0-key");});@@ -382,7 +394,7 @@ describe("default constants", () => {});it("has expected default automation version", () => {- expect(DEFAULT_AUTOMATION_VERSION).toBe("1.0.0a2");+ expect(DEFAULT_AUTOMATION_VERSION).toBe("1.0.0a3");});it("has expected default backend port", () => {@@ -426,17 +438,13 @@ describe("dev-with-automation CLI", () => {});it("exits promptly when uvx is missing", async () => {- const child = spawn(- process.execPath,- ["scripts/dev-with-automation.mjs"],- {- cwd: repoRoot,- env: {- PATH: "",- },- stdio: ["ignore", "pipe", "pipe"],+ const child = spawn(process.execPath, ["scripts/dev-with-automation.mjs"], {+ cwd: repoRoot,+ env: {+ PATH: "",},- );+ stdio: ["ignore", "pipe", "pipe"],+ });let output = "";child.stdout.on("data", (chunk) => {diff --git a/scripts/check-sdk-version-sync.mjs b/scripts/check-sdk-version-sync.mjsindex 320393cbcf..1e45048ef1 100644--- a/scripts/check-sdk-version-sync.mjs+++ b/scripts/check-sdk-version-sync.mjs@@ -19,7 +19,7 @@** Usage:* node scripts/check-sdk-version-sync.mjs- * EXPECTED_SDK_VERSION=1.22.0 node scripts/check-sdk-version-sync.mjs+ * EXPECTED_SDK_VERSION=1.22.1 node scripts/check-sdk-version-sync.mjs* node scripts/check-sdk-version-sync.mjs --check-pypi** Environment variables:@@ -80,7 +80,7 @@ Triggering from other repos:-H "Authorization: token \$GITHUB_TOKEN" \\-H "Accept: application/vnd.github.v3+json" \\https://api.github.com/repos/OpenHands/agent-canvas/dispatches \\- -d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.22.0"}}'+ -d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.22.1"}}'`);process.exit(0);}@@ -282,9 +282,9 @@ async function fetchPyPIDependencies(packageName, version) {* Parse PyPI requires_dist array and extract SDK package versions** PyPI returns dependencies in PEP 508 format like:- * "openhands-sdk>=1.22.0,<2.0.0"- * "openhands-tools==1.22.0"- * "openhands-workspace (>=1.22.0)"+ * "openhands-sdk>=1.22.1,<2.0.0"+ * "openhands-tools==1.22.1"+ * "openhands-workspace (>=1.22.1)"*/function parseSdkVersionsFromRequiresDist(requiresDist) {const versions = {};@@ -298,7 +298,7 @@ function parseSdkVersionsFromRequiresDist(requiresDist) {}// Extract the version number - look for patterns like:- // ">=1.22.0", "==1.22.0", "(>=1.22.0)", "~=1.22.0"+ // ">=1.22.1", "==1.22.1", "(>=1.22.1)", "~=1.22.1"// After the package name and before any comma or closing parenconst versionPattern = /[><=~!]+\s*([0-9]+(?:\.[0-9]+)*)/;const match = dep.match(versionPattern);diff --git a/scripts/dev-with-automation.mjs b/scripts/dev-with-automation.mjsindex 92242d93e7..f30ed4412a 100644--- a/scripts/dev-with-automation.mjs+++ b/scripts/dev-with-automation.mjs@@ -70,10 +70,10 @@ const DEFAULT_AUTOMATION_REPO = "https://github.com/OpenHands/automation";const DEFAULT_AUTOMATION_PACKAGE = "openhands-automation";// Default automation version (released PyPI version)// Set OH_AUTOMATION_GIT_REF to use a git branch/SHA instead-const DEFAULT_AUTOMATION_VERSION = "1.0.0a2";+const DEFAULT_AUTOMATION_VERSION = "1.0.0a3";// SDK version used by DEFAULT_AUTOMATION_VERSION. This can intentionally lag// DEFAULT_AGENT_SERVER_VERSION while automation releases catch up.-const DEFAULT_AUTOMATION_SDK_VERSION = "1.22.0";+const DEFAULT_AUTOMATION_SDK_VERSION = "1.22.1";const DEFAULT_BACKEND_PORT = 18000;const DEFAULT_AUTOMATION_PORT = 18001;// Where the auto-generated default automation API key is persisted. Static@@ -237,15 +237,31 @@ function buildAutomationCommand(env = process.env) {if (gitRef) {// Use git ref - refresh to ensure latest commit is fetchedconst gitUrl = `git+${repoUrl}@${gitRef}`;- uvxArgs.push("--refresh", "--from", gitUrl, "uvicorn", "openhands.automation.app:app");+ uvxArgs.push(+ "--refresh",+ "--from",+ gitUrl,+ "uvicorn",+ "openhands.automation.app:app",+ );source = `git (${gitRef})`;} else if (version) {// Use specific PyPI version- uvxArgs.push("--from", `${DEFAULT_AUTOMATION_PACKAGE}==${version}`, "uvicorn", "openhands.automation.app:app");+ uvxArgs.push(+ "--from",+ `${DEFAULT_AUTOMATION_PACKAGE}==${version}`,+ "uvicorn",+ "openhands.automation.app:app",+ );source = `PyPI (${version})`;} else {// Default to released PyPI version- uvxArgs.push("--from", `${DEFAULT_AUTOMATION_PACKAGE}==${DEFAULT_AUTOMATION_VERSION}`, "uvicorn", "openhands.automation.app:app");+ uvxArgs.push(+ "--from",+ `${DEFAULT_AUTOMATION_PACKAGE}==${DEFAULT_AUTOMATION_VERSION}`,+ "uvicorn",+ "openhands.automation.app:app",+ );source = `PyPI (${DEFAULT_AUTOMATION_VERSION}, default)`;}@@ -282,16 +298,32 @@ async function buildConfig(args, env = process.env) {// Log any port changesif (ports.ingress !== preferredIngressPort) {- logService("ports", `Port ${preferredIngressPort} busy, using ${ports.ingress} for ingress`, c.yellow);+ logService(+ "ports",+ `Port ${preferredIngressPort} busy, using ${ports.ingress} for ingress`,+ c.yellow,+ );}if (ports.backend !== preferredBackendPort) {- logService("ports", `Port ${preferredBackendPort} busy, using ${ports.backend} for agent-server`, c.yellow);+ logService(+ "ports",+ `Port ${preferredBackendPort} busy, using ${ports.backend} for agent-server`,+ c.yellow,+ );}if (ports.automation !== preferredAutomationPort) {- logService("ports", `Port ${preferredAutomationPort} busy, using ${ports.automation} for automation`, c.yellow);+ logService(+ "ports",+ `Port ${preferredAutomationPort} busy, using ${ports.automation} for automation`,+ c.yellow,+ );}if (ports.vite !== preferredVitePort) {- logService("ports", `Port ${preferredVitePort} busy, using ${ports.vite} for vite`, c.yellow);+ logService(+ "ports",+ `Port ${preferredVitePort} busy, using ${ports.vite} for vite`,+ c.yellow,+ );}const vscodePort = ports.backend + 1000;@@ -303,7 +335,7 @@ async function buildConfig(args, env = process.env) {const localApiKey =env.AUTOMATION_LOCAL_API_KEY ||getOrCreatePersistedApiKey(automationApiKeyPath, "automation");-+// Session API key for agent-server auth// Build a preliminary safe config to get the auto-generated session key// This ensures both agent-server and frontend use the same key@@ -407,12 +439,16 @@ function registerShutdownHook(hook) {}function spawnService(name, command, args, options = {}) {- const proc = spawn(command, args, getProcessTreeSpawnOptions({- stdio: ["ignore", "pipe", "pipe"],- env: { ...process.env, ...options.env },- cwd: options.cwd,- shell: process.platform === "win32",- }));+ const proc = spawn(+ command,+ args,+ getProcessTreeSpawnOptions({+ stdio: ["ignore", "pipe", "pipe"],+ env: { ...process.env, ...options.env },+ cwd: options.cwd,+ shell: process.platform === "win32",+ }),+ );const color = options.color || c.reset;@@ -482,7 +518,11 @@ async function waitForService(name, url, timeoutMs = 30000) {// βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββfunction startAgentServer(config) {- logService("agent-server", `Starting on port ${config.agentServerPort}...`, c.blue);+ logService(+ "agent-server",+ `Starting on port ${config.agentServerPort}...`,+ c.blue,+ );const agentServerCmd = buildAgentServerCommand(process.env);logService("agent-server", `Using ${agentServerCmd.source}`, c.dim);@@ -500,17 +540,27 @@ function startAgentServer(config) {spawnService("agent-server",agentServerCmd.command,- [...agentServerCmd.args, "--host", "127.0.0.1", "--port", String(config.agentServerPort)],+ [+ ...agentServerCmd.args,+ "--host",+ "127.0.0.1",+ "--port",+ String(config.agentServerPort),+ ],{cwd: safeConfig.workspacesPath,env: agentServerEnv,color: c.blue,- }+ },);}function startAutomationBackend(config) {- logService("automation", `Starting on port ${config.autoBackendPort}...`, c.green);+ logService(+ "automation",+ `Starting on port ${config.autoBackendPort}...`,+ c.green,+ );const automationCmd = buildAutomationCommand(process.env);logService("automation", `Using ${automationCmd.source}`, c.dim);@@ -520,8 +570,10 @@ function startAutomationBackend(config) {automationCmd.command,[...automationCmd.args,- "--host", "127.0.0.1",- "--port", config.autoBackendPort.toString(),+ "--host",+ "127.0.0.1",+ "--port",+ config.autoBackendPort.toString(),],{cwd: config.stateDir,@@ -540,7 +592,7 @@ function startAutomationBackend(config) {OPENHANDS_SUPPRESS_BANNER: "1",},color: c.green,- }+ },);}@@ -587,20 +639,29 @@ function startIngress(config) {"node",[ingressScript,- "--port", config.ingressPort.toString(),- "--route", `/api/automation=http://localhost:${config.autoBackendPort}`,- "--route", `/api=http://localhost:${config.agentServerPort}`,- "--route", `/sockets=http://localhost:${config.agentServerPort}`,- "--route", `/server_info=http://localhost:${config.agentServerPort}`,- "--route", `/health=http://localhost:${config.agentServerPort}`,- "--route", `/ready=http://localhost:${config.agentServerPort}`,- "--route", `/alive=http://localhost:${config.agentServerPort}`,- "--default", `http://localhost:${config.vitePort}`,+ "--port",+ config.ingressPort.toString(),+ "--route",+ `/api/automation=http://localhost:${config.autoBackendPort}`,+ "--route",+ `/api=http://localhost:${config.agentServerPort}`,+ "--route",+ `/sockets=http://localhost:${config.agentServerPort}`,+ "--route",+ `/server_info=http://localhost:${config.agentServerPort}`,+ "--route",+ `/health=http://localhost:${config.agentServerPort}`,+ "--route",+ `/ready=http://localhost:${config.agentServerPort}`,+ "--route",+ `/alive=http://localhost:${config.agentServerPort}`,+ "--default",+ `http://localhost:${config.vitePort}`,],{cwd: projectRoot,color: c.yellow,- }+ },);}@@ -615,14 +676,17 @@ function startVite(config) {// Point Vite at the ingress (so client-side fetches work)VITE_BACKEND_HOST: `127.0.0.1:${config.ingressPort}`,VITE_BACKEND_BASE_URL: `http://127.0.0.1:${config.ingressPort}`,- VITE_WORKING_DIR: config.viteWorkingDir ?? join(config.stateDir, "workspaces"),+ VITE_WORKING_DIR:+ config.viteWorkingDir ?? join(config.stateDir, "workspaces"),VITE_FRONTEND_PORT: config.vitePort.toString(),// Session API key for frontend to authenticate with agent-serverVITE_SESSION_API_KEY: config.sessionApiKey,// Automation API key for frontend to authenticate with automation backendVITE_AUTOMATION_API_KEY: config.localApiKey,// Session API key for agent-server auth (when SESSION_API_KEY is set)- ...(config.sessionApiKey && { VITE_SESSION_API_KEY: config.sessionApiKey }),+ ...(config.sessionApiKey && {+ VITE_SESSION_API_KEY: config.sessionApiKey,+ }),},color: c.magenta,});@@ -642,14 +706,11 @@ function startVite(config) {* @returns {Promise<boolean>} True if seeding succeeded, false otherwise*/async function seedAutomationSecret(config, options = {}) {- const {- maxRetries = 5,- retryDelayMs = 2000,- timeoutMs = 10000,- } = options;+ const { maxRetries = 5, retryDelayMs = 2000, timeoutMs = 10000 } = options;const secretName = "OPENHANDS_AUTOMATION_API_KEY";- const secretDescription = "API key for authenticating with the automation backend";+ const secretDescription =+ "API key for authenticating with the automation backend";logService("secrets", `Seeding ${secretName} into agent-server...`, c.dim);@@ -687,13 +748,21 @@ async function seedAutomationSecret(config, options = {}) {// Don't retry on authentication errors - they won't resolve with retriesif (response.status === 401 || response.status === 403) {- logService("secrets", `Warning: Failed to seed secret (${response.status}): ${text}`, c.yellow);+ logService(+ "secrets",+ `Warning: Failed to seed secret (${response.status}): ${text}`,+ c.yellow,+ );return false;}// Retry on server errors or service unavailableif (attempt < maxRetries) {- logService("secrets", `Retry ${attempt}/${maxRetries} after ${response.status}...`, c.dim);+ logService(+ "secrets",+ `Retry ${attempt}/${maxRetries} after ${response.status}...`,+ c.dim,+ );await delay(retryDelayMs);}} catch (err) {@@ -701,41 +770,53 @@ async function seedAutomationSecret(config, options = {}) {// Connection errors likely mean server isn't ready - wait and retryif (attempt < maxRetries) {- logService("secrets", `Retry ${attempt}/${maxRetries}: ${err.message}`, c.dim);+ logService(+ "secrets",+ `Retry ${attempt}/${maxRetries}: ${err.message}`,+ c.dim,+ );await delay(retryDelayMs);}}}- logService("secrets", `Warning: Failed to seed secret after ${maxRetries} attempts: ${lastError}`, c.yellow);+ logService(+ "secrets",+ `Warning: Failed to seed secret after ${maxRetries} attempts: ${lastError}`,+ c.yellow,+ );return false;}function printBanner(config) {console.log("");console.log(- `${c.green}${c.bold}ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${c.reset}`+ `${c.green}${c.bold}ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${c.reset}`,);console.log(- `${c.green}${c.bold}β${c.reset} ${c.bold}Agent Canvas + Automation Stack${c.reset} ${c.green}${c.bold}β${c.reset}`+ `${c.green}${c.bold}β${c.reset} ${c.bold}Agent Canvas + Automation Stack${c.reset} ${c.green}${c.bold}β${c.reset}`,);console.log(- `${c.green}${c.bold}β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£${c.reset}`+ `${c.green}${c.bold}β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£${c.reset}`,);console.log(- `${c.green}${c.bold}β${c.reset} ${c.green}${c.bold}β${c.reset}`+ `${c.green}${c.bold}β${c.reset} ${c.green}${c.bold}β${c.reset}`,);console.log(- `${c.green}${c.bold}β${c.reset} Main UI: ${c.cyan}http://localhost:${config.ingressPort}/${c.reset}`.padEnd(75) + `${c.green}${c.bold}β${c.reset}`+ `${c.green}${c.bold}β${c.reset} Main UI: ${c.cyan}http://localhost:${config.ingressPort}/${c.reset}`.padEnd(+ 75,+ ) + `${c.green}${c.bold}β${c.reset}`,);console.log(- `${c.green}${c.bold}β${c.reset} API Docs: ${c.cyan}http://localhost:${config.ingressPort}/api/automation/docs${c.reset}`.padEnd(75) + `${c.green}${c.bold}β${c.reset}`+ `${c.green}${c.bold}β${c.reset} API Docs: ${c.cyan}http://localhost:${config.ingressPort}/api/automation/docs${c.reset}`.padEnd(+ 75,+ ) + `${c.green}${c.bold}β${c.reset}`,);console.log(- `${c.green}${c.bold}β${c.reset} ${c.green}${c.bold}β${c.reset}`+ `${c.green}${c.bold}β${c.reset} ${c.green}${c.bold}β${c.reset}`,);console.log(- `${c.green}${c.bold}ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${c.reset}`+ `${c.green}${c.bold}ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ${c.reset}`,);console.log("");console.log(`${c.dim}State directory: ${config.stateDir}${c.reset}`);@@ -809,7 +890,7 @@ async function main(options = {}) {const agentServerReady = await waitForService("agent-server",`http://localhost:${config.agentServerPort}/server_info`,- 60000 // 60 second timeout for initial startup+ 60000, // 60 second timeout for initial startup);// 2. Seed automation API key into agent-server secrets@@ -818,7 +899,11 @@ async function main(options = {}) {if (agentServerReady) {await seedAutomationSecret(config);} else {- logService("secrets", "Skipping secret seeding - agent-server not ready", c.yellow);+ logService(+ "secrets",+ "Skipping secret seeding - agent-server not ready",+ c.yellow,+ );}// 3. Start automation backend@@ -853,22 +938,32 @@ function startStaticFrontend(config, staticDir) {"node",[staticServerScript,- "--dir", staticDir,- "--host", "0.0.0.0",- "--port", String(config.vitePort),+ "--dir",+ staticDir,+ "--host",+ "0.0.0.0",+ "--port",+ String(config.vitePort),// Proxy routes to backends (same as ingress but for direct access to vitePort)- "--route", `/api/automation=http://localhost:${config.autoBackendPort}`,- "--route", `/api=http://localhost:${config.agentServerPort}`,- "--route", `/sockets=http://localhost:${config.agentServerPort}`,- "--route", `/server_info=http://localhost:${config.agentServerPort}`,- "--route", `/health=http://localhost:${config.agentServerPort}`,- "--route", `/ready=http://localhost:${config.agentServerPort}`,- "--route", `/alive=http://localhost:${config.agentServerPort}`,+ "--route",+ `/api/automation=http://localhost:${config.autoBackendPort}`,+ "--route",+ `/api=http://localhost:${config.agentServerPort}`,+ "--route",+ `/sockets=http://localhost:${config.agentServerPort}`,+ "--route",+ `/server_info=http://localhost:${config.agentServerPort}`,+ "--route",+ `/health=http://localhost:${config.agentServerPort}`,+ "--route",+ `/ready=http://localhost:${config.agentServerPort}`,+ "--route",+ `/alive=http://localhost:${config.agentServerPort}`,],{cwd: config.canvasPath,color: c.magenta,- }+ },);}