feat(browser): versioned screenshot geometry and safe visual-target resolution for Dewee vision
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 8/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- ai-infra-agents, security
Direzione di ricerca
Start with docs/connected-browser-relay-contract.md and src/browser/adapters/cdp/screenshot.ts, where fitScreenshot and quadsToRects compute the encoded image and mask rectangles, then read src/browser/{protocol,snapshot,executor}.ts for the grant and generation checks. Done means the screenshot result gains optional, versioned geometry metadata while v1 callers still work, and the metadata is validated against a bound capture. Scope spans the extension and Dewee's schemas, so confirm the split with maintainers before coding.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Goal
Extend the connected-browser screenshot protocol so a separately authorized Dewee visual-decision provider can safely localize a target in a captured image without mis-clicks, leaked pixels, stale screenshot reuse or any extension-side TypeSafe credentials.
This is the extension-owned half of https://github.com/nextlevelbuilder/dewee/issues/1364, not a new agent/model inside the extension.
Verified current implementation
main@1296da7,docs/connected-browser-relay-contract.mdv1: the extension is an executor only;screenshotrequires advanced capability and returns{tab,url,mime:"image/jpeg",data_base64}, ≤1.5 MiB, with owner/grant bindings. Actions operate on ephemeral elementref+generation.src/browser/adapters/cdp/screenshot.ts:fitScreenshotchooses JPEG quality and scaling;quadsToRectscomputes mask rectangles in image pixels. Current result does not expose the final scale/geometry metadata required for trustworthy server-side box mapping.src/browser/{protocol,snapshot,executor,approvals,policy,sensitive}.ts: existing strict command allowlist, generation checks, redaction, approvals and trust boundaries.- Existing issue #25 redacts sensitive contenteditable snapshots; do not duplicate or weaken that work.
- Dewee Browser Use policy/evals: https://github.com/nextlevelbuilder/dewee/issues/1224 and /1225; preview model gates: /1363.
Work
- Versioned screenshot metadata contract: keep v1 response backward-compatible; optionally return capture ID/digest, capture time, tab/session/grant binding, DOM/snapshot generation, trusted origin, source PNG image dimensions and final encoded JPEG dimensions, encoding scale/crop, viewport dimensions, devicePixelRatio, browser/page zoom and scroll offsets where reliably measured. Do not assert geometry that was not measured. No raw Chrome tab IDs to agent.
- Privacy and provenance: keep existing masking before external inference; complete sensitive editable/redaction hardening (#25) before enabling. Identify which rectangles are masked without revealing confidential values. Never upload screenshots without runtime's user/tenant consent; never store screenshot persistently. Ensure frame-origins are still grant-bound.
- Safe visual resolution (optional protocol extension): a returned normalized bounding-box hint is untrusted. Convert to local image pixels using exact capture metadata and validate finite ordered edges in [0,1]. Only resolve to an existing, currently granted semantic element ref when a trusted local DOM/accessibility hit-test verifies target is interactable. Revalidate capture generation, current tab/origin, viewport, scroll and permissions immediately before interact.
- Keep executor narrow: do NOT add arbitrary
click(x,y), remote JavaScript, CDP commands, selectors or code execution. Do not let a model change grants, approval policy, target tab, origin or use 'managed' as hidden fallback. - Approval and recovery: high-risk submit/publish/delete/payment still requires existing human review; ambiguous/multiple targets, hidden/covered elements, missing target and stale geometry return an explicit typed refusal or resnapshot suggestion. Fail closed if snapshot metadata is missing on a new visual-control request.
- Cross-repo protocol coordination: update extension
docs/connected-browser-relay-contract.mdand Dewee's ADR/transport schemas together. Version/capability negotiate so existing extension builds work without sending new fields; old Gateway safely ignores optional metadata but MUST NOT claim it supports visual actions. - Diagnostics/tests: unit + E2E tests for Retina/non-Retina DPR, zoom, viewport resize, scroll, screenshot downscale, masking alignment, out-of-range/NaN boxes, overlapping objects, tab navigation races, revoked grants, malicious page content, race with local human input and no duplicate side-effect on reconnect.
Acceptance
- Existing v1 connected browser read/interact flows remain compatible and maintain current protections.
- Captured and encoded pixel coordinate spaces map consistently under all supported scaling/zoom conditions, with exact validation against a bound capture.
- A stale, ambiguous, unsupported or origin-mismatched hint can NEVER become an interaction.
- No TypeSafe key, model-selection or authority logic in the extension; all external image-model calls remain Dewee runtime-owned behind explicit egress consent.
- Automated and human-approval paths remain unchanged absent a fresh, verified semantic target.
- Pausing/stopping/revoking the device/grant during localization immediately blocks further action.
Dependencies and non-duplication
- Requires Dewee #1364 (visual inference + policy) and #1363 (opt-in Jev 1.14 capability).
- Related existing #25 (redact sensitive contenteditable), Dewee #1224/#1225/#1355.
- TypeSafe Box returns a box even for absent objects, so presence validation belongs to Dewee; extension's job is geometry, proof and safe execution only.
- Release background: https://typesafe.ai/blog/jev-1-14
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 1
- Merge medio
- 2g 5h
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextlevelbuilder/dewee-chrome-ext
-
feat(browser/ux): visible in-tab AI control indicator, action highlight and optional agent cursorApertaai-handle enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
-
feat(browser): structured observations v2 and policy-checked micro-batching for adaptive decisionsApertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
feat(quality): QGP browser postconditions, DOM-first verification và opt-in visual escalationApertaenhancement security
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
-
enhancement security
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
nextlevelbuilder/dewee-chrome-ext#35 · 2 commenti ·
-
security(browser): block off-grant navigations in agent tabs before the request leaves ChromeForse di nuovo libera @mrgoonie l’ha presa 48 giorni fa e non c’è nessuna pull request aperta. Apertaneeds-design security
nextlevelbuilder/dewee-chrome-ext#33 · 1 assegnatario ·
Tutte le issue di nextlevelbuilder/dewee-chrome-ext
Issue simili
-
prio:low scope:hud
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OliverRomhagen/vrigstad-joyride#953 ·
I maintainer di solito rispondono entro 1 giorno
-
review-followup
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
griffinwork40/agent-afk#5446 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
kacper-szewczyk/Ticknest#346 ·
I maintainer di solito rispondono entro 1 giorno
-
echarts geo: a GeoJSON URL that returns 200 with a body that is not JSON is fetched on each refreshApertabug plugin/echarts/geo
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
Yeachan-Heo/gajae-code#8230 ·
I maintainer di solito rispondono entro 1 giorno