Skip to content

jakebodea/buddy

Repository files navigation

Buddy

Buddy is a Chrome Manifest V3 extension written in TypeScript. It adds:

  • a dedicated Buddy assistant window
  • a static page bridge content script that runs the DOM tools on the current page
  • a manual/dev mode page that can run the same DOM tools without the LLM
  • BYO OpenAI API key settings stored locally in extension storage

What It Can Do

Buddy exposes four page tools:

  • get_page_context
  • highlight_element
  • click_element
  • fill_form_field

The AI path uses AI SDK tool calling. Clicks and fills require approval in the Buddy window before they run.

Local Setup

npm install
npm run build

The unpacked extension output is written to dist/.

Load The Extension

  1. Open chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked
  4. Select the dist/ folder in this project

If you previously loaded an older Buddy build, remove that unpacked extension first, then load the new dist/ again so Chrome does not keep a stale broken worker around.

First Test Run

  1. Open any normal web page you control or trust.
  2. Click the Buddy extension action once on that tab.
  3. Buddy should open as a separate popup-style extension window bound to that tab.
  4. Use the Manual, Chat, Debug, and Settings tabs inside that Buddy window.
  5. In manual mode:
    • save your OpenAI API key
    • keep the default model gpt-5.4-mini
    • click Get Page Context
  6. Confirm you see:
    • a markdown-like page snapshot
    • eNN element IDs
    • raw tool output in the debug panel

Manual Tool Testing

After Get Page Context succeeds:

  1. Copy an element ID like e12
  2. Test Highlight Element
    • the manual tab has a real Highlight button that should trigger the spotlight effect on the bound page
  3. Test Click Element
  4. Test Fill Form Field

Important:

  • after click_element or fill_form_field, the old snapshot is invalid
  • run Get Page Context again before the next page action

AI Chat Testing

Once your API key is saved:

  1. Open Buddy on a page with the extension action
  2. Ask something like:
Read this page and tell me what the primary action is.

Then try:

Find the email field and fill it with test@example.com

Buddy should:

  1. call get_page_context
  2. decide on the target element
  3. request approval before filling or clicking
  4. execute the action only after approval

Test Commands

npm test
npm run test:e2e

Notes:

  • npm test runs the current unit/component test suite
  • npm run test:e2e currently runs a scaffolded Playwright extension test file that is intentionally skipped until a persistent Chromium extension harness is added

Known MVP Constraints

  • Chrome only
  • main document only
  • no cross-origin iframe support yet
  • no account/auth system yet
  • no packaged icons yet

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages