The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.
JavaScript agent-skillsai-agentautomationbrowserbrowser-automationclaude-codecodexhermes-agentskillsskills-sh
feat(ego-browser): name the new permission prompts in user-control stops
Zhuowei Wangb64f29221a32
diff --git a/docs/native-bindings-api.md b/docs/native-bindings-api.mdindex 7b80ba9..d0f2057 100644--- a/docs/native-bindings-api.md+++ b/docs/native-bindings-api.md@@ -298,9 +298,21 @@ usbserialhidprotocol_handler+clipboard+local_network_access+storage_access+window_management+local_fonts+permission_promptmanual_takeover```+`local_network_access` covers both the local network and the loopback prompt.+`permission_prompt` covers any other permission prompt or device chooser that+has no dedicated key, such as a prompt that groups several requests.+`manual_takeover` means the user or the agent handed the task over; it is not+reported for a permission prompt.+For example, a location prompt returns:```jsdiff --git a/package/ego-browser/src/ego-errors.test.mjs b/package/ego-browser/src/ego-errors.test.mjsindex 3196d73..0acae43 100644--- a/package/ego-browser/src/ego-errors.test.mjs+++ b/package/ego-browser/src/ego-errors.test.mjs@@ -76,6 +76,54 @@ test("invokeEgo recognizes a permission reason from a rejected native call", asy);});+for (const [reason, firstLine] of [+ [+ "clipboard",+ "A browser permission prompt for clipboard access has appeared.",+ ],+ [+ "local_network_access",+ "A browser permission prompt for local network access has appeared.",+ ],+ [+ "storage_access",+ "A browser permission prompt for storage access has appeared.",+ ],+ [+ "window_management",+ "A browser permission prompt for window management has appeared.",+ ],+ [+ "local_fonts",+ "A browser permission prompt for local font access has appeared.",+ ],+ [+ "permission_prompt",+ "A browser permission prompt or device chooser has appeared.",+ ],+]) {+ test(`the ${reason} reason names the prompt the user must handle`, () => {+ const { code, message } = resolveEgoError({+ error: reason,+ error_code: "EGO_TASK_SPACE_USER_IN_CONTROL",+ });+ assert.equal(code, "EGO_TASK_SPACE_USER_IN_CONTROL");+ const lines = message.split("\n");+ assert.equal(lines[0], firstLine);+ assert.match(message, /Wait for the user to handle the prompt/);+ assert.match(message, /takeOverTaskSpace\(spaceId\)/);+ });+}++test("manual_takeover keeps the generic user-control guidance", () => {+ const { message } = resolveEgoError({+ error: "manual_takeover",+ error_code: "EGO_TASK_SPACE_USER_IN_CONTROL",+ });+ assert.match(message, /Control of this task space is with the user/);+ assert.doesNotMatch(message, /permission prompt/);+});+test("user-control reason lookup ignores inherited object properties", () => {const { message } = resolveEgoError({error: "constructor",diff --git a/package/ego-browser/src/ego-errors.ts b/package/ego-browser/src/ego-errors.tsindex 99825a3..1c5de16 100644--- a/package/ego-browser/src/ego-errors.ts+++ b/package/ego-browser/src/ego-errors.ts@@ -89,6 +89,14 @@ const USER_CONTROL_REASON_MESSAGES = Object.freeze({),hid: userPromptGuidance("A browser device chooser for HID has appeared."),protocol_handler: permissionPrompt("protocol handler registration"),+ clipboard: permissionPrompt("clipboard access"),+ local_network_access: permissionPrompt("local network access"),+ storage_access: permissionPrompt("storage access"),+ window_management: permissionPrompt("window management"),+ local_fonts: permissionPrompt("local font access"),+ permission_prompt: userPromptGuidance(+ "A browser permission prompt or device chooser has appeared.",+ ),manual_takeover: USER_CONTROL_GUIDANCE,});