Repository navigation
feat(browser): teach a bot a task by doing it once - #159
Merged
Merged
Conversation
With the browser in their hands, the owner starts a lesson: each click, field typed in, key and address becomes a step by what it means, read from the page by the isolated-world script before the step reaches it. What is typed is never read, and addresses lose their query. At the end the owner names the task and makes it a routine, or sends it for the bot to remember.
httpsphl
enabled auto-merge
October 4, 2026 18:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 8 of the ideas from 2026-10-04, the last one. New spec section 21.13 (milestone N3.5).
Daemon
browser.teach {botId, on}(only from the connection holding the browser): starts a lesson with anopenstep for the active tab, or ends it and returns the steps.BrowserState.lessoncarries the steps live; giving the browser back, closing the connection or the browser drops it.lesson.rs: with a lesson on, each owner move is read before it reaches the page, through the isolated-world script (actions.jsgainsat(x, y)andfocused(), which return only role, name and whether it is a password field):clickwith the name of the nearest element with a role;typestep per field,secretfor password fields;press; an address the owner types →open.tests/common/browsing.rs.App
Test plan
cargo fmt,clippy -D warnings,cargo test --workspace(newtests/browser_lesson.rswith the real Edge: steps,secret, nothing typed kept; unit tests for addresses and steps), Edge tests run 3 more timespnpm check(newlesson.test.tsx: words, live strip, send, routine prefill)