Skip to content

fix(browserbase): handle optional command output - #1970

Open
NathanFlurry wants to merge 2 commits into
mainfrom
fix/browserbase-check-types
Open

fix(browserbase): handle optional command output#1970
NathanFlurry wants to merge 2 commits into
mainfrom
fix/browserbase-check-types

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member
  • Assert command output is present before parsing the Browserbase response.
  • Restore the browserbase example typecheck under strict TypeScript settings.

@the-company-company

Copy link
Copy Markdown

Co · session: Fix agentos main CI (clippy 1.98 + browserbase types)

  • Auto-fix ; feedback on this pull request flows to the session and gets addressed
  • Review ; Co reviews new pushes

@co <ask> hands Co a task · @co mute pauses · @co archive ends the session

@railway-app

railway-app Bot commented Sep 10, 2026

Copy link
Copy Markdown

🚅 Environment agentos-pr-1970 in rivet-frontend has no services deployed.

@the-company-company the-company-company Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 1 medium-severity finding

Reviewed commit a9fcbc9.

Comment thread examples/browserbase/client.ts Outdated
});

const page = JSON.parse(stdout) as { statusCode: number; content: string };
const page = JSON.parse(stdout!) as { statusCode: number; content: string };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Medium · Capture the JSON response before parsing stdout

process.exec defaults to output.capture: "none"; the sidecar therefore returns stdout as undefined unless the caller opts in to capture it. The non-null assertion only hides that contract from TypeScript, and JSON.parse(stdout!) still throws whenever this example is run.

Pass output: { capture: "all" } with env for this call and the matching direct-client call (then retain an explicit assertion or guard as appropriate).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4f02710. Both Browserbase client examples now request output: { capture: "all" } and fail clearly if the command still returns no stdout. pnpm --dir examples/browserbase check-types passes.

@the-company-company the-company-company Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found

Reviewed commit 4f02710.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant