Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions assistant/src/browser/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ const DISPATCH_HANDLERS: Record<BrowserOperation, OperationHandler> = {
* @param input - Flat input object matching the operation's field schema.
* @param context - Tool execution context (conversation ID, signal, etc.).
* @returns The tool execution result from the underlying handler.
* @throws If the operation identifier is not recognized.
* If the operation identifier is not recognized, returns an error
* result (`isError: true`) rather than throwing.
*/
export async function executeBrowserOperation(
operation: BrowserOperation,
Expand All @@ -220,8 +221,8 @@ export async function executeBrowserOperation(
* constraints. Used by the CLI command builder to generate subcommands.
*
* The `browser_mode` and `activity` fields are omitted from per-operation
* metadata because they are common to all operations and handled by the
* CLI framework as global options.
* metadata because they are not exposed through the CLI. Operations
* invoked via the CLI always use the default browser mode.
*/
export const BROWSER_OPERATION_META: readonly BrowserOperationMeta[] = [
{
Expand Down
4 changes: 4 additions & 0 deletions assistant/src/cli/commands/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,17 @@ function buildSubcommand(parent: Command, meta: BrowserOperationMeta): void {
}
}

// Browser operations can be long-running (page loads, auth
// challenges, downloads up to 120s, etc.), so use a generous
// IPC timeout that exceeds any server-side operation timeout.
const ipcResult = await cliIpcCall<BrowserExecuteResult>(
"browser_execute",
{
operation: meta.operation,
input,
sessionId,
},
{ timeoutMs: 180_000 },
);

if (!ipcResult.ok) {
Expand Down
Loading