hdresearch / nolita

Work with web-enabled agents quickly — whether running a quick task or bootstrapping a full-stack product.
https://nolita.ai
MIT License
79 stars 3 forks source link

Ty/pages #53

Closed AlephNotation closed 2 months ago

AlephNotation commented 2 months ago

this introduces a page primitive. This thing is very cool

AlephNotation commented 2 months ago

I think my changes address your comments.

The idea here is that it would be very nice if the HDR Page could act as a drop in replacement for puppeteer pages. Even if people aren't interested in using the AgentBrowser class, they can still get a lot done via the new Page class. A lot of this was inspired by our recent discussion with users.

I have refactored basically all of the browser related classes to reflect this and I addressed all of your comments.

matildepark commented 2 months ago

The idea here is that it would be very nice if the HDR Page could act as a drop in replacement for puppeteer pages. Even if people aren't interested in using the AgentBrowser class, they can still get a lot done via the new Page class. A lot of this was inspired by our recent discussion with users.

I wasn't aware of the pre-existing Puppeteer API. I understand a drop-in interface is convenient; we could always just abandon Browser for Page (and punt up a major version changing the API) since the existing API doesn't really expose anything in the Browser class; or we could maintain both classes. Unsure if shimming the Browser class is ideal from a maintenance perspective? What do you think?

I think the only other thing on my mind for this PR is to surface the ability to control the session through the server.ts endpoint (i.e. surfacing objective and/or commands as inputs). I can do the bin version and write up the README changes.

I also notice that it consistently gets lost trying to get my email from my site now (or it gives a false positive giving me the Creative Commons email, instead). Unsure when that started, could just be unrelated. It gets the HDR emails fine though I thought it got lost at first.

matildepark commented 2 months ago

Talked out of band; just waiting on server.ts command integration then I'll stamp, merge, then work on npx interactive sessions...