Skip to content

Add Jev browser agent loop example - #98

Merged
rgarcia merged 14 commits into
mainfrom
hypeship/jev-browser-loop
Sep 18, 2026
Merged

rgarcia merged 14 commits into
mainfrom
hypeship/jev-browser-loop

Conversation

@rgarcia

@rgarcia rgarcia commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

summary

  • add a custom Jev browser-agent loop that observes viewport-visible controls through BrowserExecutor and builds a bounded, operation-aware candidate space
  • derive click, text, and select capabilities from each control's underlying DOM element so non-editable comboboxes are never offered to TYPE_TEXT
  • use document-stable node identities and target-specific guards instead of remapping snapshot-scoped references after a full freshness observation
  • keep navigation inside the loop and call the text resolver only after Jev selects a field or navigation operation
  • execute ordinary interactions with direct browser primitives while retaining navigation-safe browser_act waits
  • automatically open the live view in the default browser for interactive macOS runs
  • suppress repeated state/action transitions and expose controls inside visible cross-origin frames

This remains a separate Browser Loop-backed approach from #97's local prototype and evaluation.

design

Jev receives the goal, viewport text, visible elements, current values, executable operations, and recent action history. It chooses one bounded operation and target. Code owns text generation, URL validation, target freshness, execution, and termination limits.

The viewport observer assigns stable element identities for the life of the document, excludes covered and offscreen controls, keeps transparent native controls that receive pointer input, and exposes scroll controls for the active scroll container. A stale target causes a fresh observation and policy decision without executing or remapping the previous choice.

validation

  • npm run typecheck
  • npm run check:lockfile
  • npm test --workspace @onkernel/browser-loop — 441 passing
  • example npm run typecheck && npm test — 17 passing
  • controlled Google Flights flow for CVG → SFO on December 14, 2026:
    • ticket type is click-only while airport inputs support text entry
    • autocomplete suggestions remain directly clickable
    • the date picker exposes Done, scrolling reveals December 14, and the search reaches matching results
    • the results page exposes the Stops control and all four stop-filter radio choices, including Nonstop only
  • controlled restaurant reservation flow:
    • repeated top/bottom scroll transitions are suppressed before a third execution
    • the loop selects the visible reservation link instead of continuing the cycle
    • the embedded reservation widget exposes date, time, party-size, and submit controls
  • live Jev + Kernel browser coverage for navigation, forms, autocomplete, history, scrolling, waits, completion, stale decisions, no-progress detection, and password exclusion

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/actions.ts
Comment thread packages/browser-loop/examples/jev-system-one/agent.ts
Comment thread packages/browser-loop/examples/jev-system-one/actions.ts
@rgarcia
rgarcia force-pushed the hypeship/jev-browser-loop branch 2 times, most recently from ed61ba3 to 6b90099 Compare September 17, 2026 18:58

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/package.json Outdated
Comment thread packages/browser-loop/examples/jev-system-one/types.ts
@rgarcia
rgarcia force-pushed the hypeship/jev-browser-loop branch from 6b90099 to b83192d Compare September 17, 2026 19:11

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/actions.ts Outdated
@rgarcia
rgarcia force-pushed the hypeship/jev-browser-loop branch from b83192d to 3bb5073 Compare September 17, 2026 19:20

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/actions.ts Outdated
@rgarcia
rgarcia force-pushed the hypeship/jev-browser-loop branch from 3bb5073 to 20ad4b0 Compare September 17, 2026 19:27
@rgarcia
rgarcia force-pushed the hypeship/jev-browser-loop branch from 20ad4b0 to c9f1a0e Compare September 17, 2026 19:34

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/agent.ts Outdated

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/snapshot.ts
Comment thread packages/browser-loop/examples/jev-system-one/snapshot.ts
Comment thread packages/browser-loop/examples/jev-system-one/browser.ts Outdated

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/agent.ts
Comment thread packages/browser-loop/examples/jev-system-one/accessibility.ts Outdated

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/snapshot.ts Outdated
Comment thread packages/browser-loop/examples/jev-system-one/accessibility.ts

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread packages/browser-loop/examples/jev-system-one/snapshot.ts Outdated

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d924abe. Configure here.

Comment thread packages/browser-loop/examples/jev-system-one/text.ts
Comment thread packages/browser-loop/examples/jev-system-one/browser.ts
@rgarcia
rgarcia merged commit 3a249b2 into main Sep 18, 2026
5 checks passed
@AnnaXWang
AnnaXWang deleted the hypeship/jev-browser-loop branch September 18, 2026 15:53
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