Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(browser): open-browser agent control verb
enesfca6f9c29992
diff --git a/src/main/canvas-control-core.test.ts b/src/main/canvas-control-core.test.tsindex 9fea50e68..bfc12b3f4 100644--- a/src/main/canvas-control-core.test.ts+++ b/src/main/canvas-control-core.test.ts@@ -30,6 +30,17 @@ describe('parseControlRequest', () => {})})+ it('open-browser requires --url', () => {+ expect(parseControlRequest('open-browser', {})).toEqual({ error: 'open-browser requires --url' })+ expect(parseControlRequest('open-browser', { url: 'https://x.dev' })).toEqual({+ verb: 'open-browser',+ args: { url: 'https://x.dev' }+ })+ })+ it('open-browser is not destructive', () => {+ expect(isDestructiveVerb('open-browser')).toBe(false)+ })+it('classifies destructive verbs', () => {expect(isDestructiveVerb('write')).toBe(true)expect(isDestructiveVerb('close')).toBe(true)diff --git a/src/main/canvas-control-core.ts b/src/main/canvas-control-core.tsindex 9c798be29..416f1062a 100644--- a/src/main/canvas-control-core.ts+++ b/src/main/canvas-control-core.ts@@ -9,6 +9,7 @@ export type ControlVerb =| 'show-image'| 'show-video'| 'show-web'+ | 'open-browser'| 'write'| 'close'@@ -24,6 +25,7 @@ const VERBS: ControlVerb[] = ['show-image','show-video','show-web',+ 'open-browser','write','close']@@ -50,6 +52,7 @@ export function parseControlRequest(if (v === 'show-web' && !args.url && !args.file && !args.html) {return { error: 'show-web requires --url, --file or --html' }}+ if (v === 'open-browser' && !args.url) return { error: 'open-browser requires --url' }return { verb: v, args }}diff --git a/src/main/canvas-control.ts b/src/main/canvas-control.tsindex a020a81d0..85c71c9bf 100644--- a/src/main/canvas-control.ts+++ b/src/main/canvas-control.ts@@ -61,6 +61,7 @@ Verbs:- \`show-image <path>\` — open an image file as a node.- \`show-video <path>\` — open a video file as a player node.- \`show-web (--url U | --file P.html | --html "<...>")\` — open a web viewer (live URL or local HTML you wrote).+- \`open-browser --url U\` — open a navigable browser (back/forward/address bar) at a URL.- \`write --node <id> --text "..."\` — type text into a terminal node. (Asks the user to confirm.)- \`close --node <id>\` — close a node. (Asks the user to confirm.)diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex a72d46555..50f310989 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -2126,6 +2126,15 @@ export function Canvas() {reply({ ok: true, message: `showing web ${id}`, result: { id } })return}+ case 'open-browser': {+ if (!args.url) {+ reply({ ok: false, error: 'open-browser requires --url' })+ return+ }+ const id = addAndConnect(createBrowserNode(nodesRef.current.length, args.url, placeBelow()))+ reply({ ok: true, message: `opened browser ${id}`, result: { id } })+ return+ }case 'write': {if (!args.node) {reply({ ok: false, error: 'write requires --node' })