mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
2.1 KiB
2.1 KiB
Contributing to pi-chrome
Thanks for considering a contribution. pi-chrome aims to be the de-facto browser-control toolkit for Pi agents — that means a few non-negotiables.
Non-negotiables
- No re-login. Every change must keep working against the user's already-signed-in Chrome profile. Anything that requires a fresh profile or extra auth steps is out of scope.
- Verifiable action results. Input tools must return structured details and support
includeSnapshotwhere verification matters. Agents need enough evidence to avoid blind retries. - Chrome real input. Interactive controls use Chrome's input layer through
chrome.debugger; do not re-expose synthetic/untrusted input as public UX. - Benchmarks gate features. Add a page in
test-suite/that fails before your change and passes after. We accept PRs faster when there's a green/red verdict to point at.
Local dev
# Link from a checkout
pi install ./pi-chrome
# Run the benchmark dashboard
cd test-suite
python3 -m http.server 8765
# open http://127.0.0.1:8765/ in the Chrome window pi-chrome controls
Adding a new tool
- Register in
extensions/chrome-profile-bridge/index.ts(theregister*Toolcalls near line 840+). - Implement the handler in
extensions/chrome-profile-bridge/browser-extension/service_worker.js. - Return structured details and support
includeSnapshotfor user-visible state changes when relevant. - Add a benchmark page under
test-suite/challenges/and a manifest entry. - Update
README.md"What an agent gets" table. - Add a
CHANGELOG.mdentry.
Filing a bug
Include:
/chrome doctoroutputpi-chromeversion + extension version (thedoctoroutput prints both)- The exact tool call + the result envelope you got
- Page URL or a minimal repro page in
test-suite/
Releasing
- Bump
package.jsonversion. - Move
CHANGELOG.mdnotes from the working section to the new version header. npm publish --access public.
Code of conduct
Be kind, be precise, ship things. PRs that break the "no re-login" promise will be closed with a note explaining which non-negotiable they hit.