Package for analyzing and automating actions on a DOM
npm install dom-automator
import { createAgent, createActionScript } from 'dom-automator'
const getCurrentDOM = async (): string => {
return '<html></html>'
}
const agent = await createAgent('Send an email to Todd that I cant make the meeting today', getCurrentDOM)
// agent.actions() is an AsyncGenerator
for await (const act of agent.actions()) {
console.log('Executing:', act)
const js = createActionScript(act)
// Act it out here
}