Repository navigation
Description
Outcome
Ordinary governed and strict Pi workers use web_search, fetch_content, get_search_content and source_check through a constrained, recorded bridge to a host-owned executor that runs the pinned upstream extension in a trusted Pi session, including subscription/current-model search. Provider configuration and credentials never reach the worker.
Why now
Part of the epic #1863 (ordinary Pi web tools execute on the host with isolated, resumable results). The epic carries every maintainer ruling of 2026-10-15; this task delivers the executor, the bridge and the four core tools. Read the executor comparison, especially "Full-extension authority map" and "Common bridge and governance design" items 1-7, and the binding direction in docs/decisions/governed-writable-workers.md:4644-4667.
Today an ordinary Pi worker gets the host's auth.json, models.json and settings.json (or only settings.json on the host inference relay) copied into private state (packages/ui-backend-pi/src/worker-launch.ts:99-102; initialize, packages/ui-backend-pi/src/worker-entry.ts:100-107), with PI_CODING_AGENT_DIR pointed at that state (packages/ui-backend-pi/src/worker-launch.ts:187). The host's web-search.json is resolved from PI_CODING_AGENT_DIR, XDG or HOME (resolveWebSearchConfigPath, packages/ui-sdk/src/server/web-search.ts:188-192), so the worker and the host select different web-search configuration, and putting provider credentials in the worker is ruled out. The worker RPC schema has a bounded, grant-checked bridge but no search method (piWorkerMessage, packages/ui-backend-pi/src/worker-protocol.ts:71-87).
Rulings this task implements (all 2026-10-15, recorded on #1863): architecture C, host-owned execution and credentials; executor A, the full upstream extension in an actual trusted Pi session; workflow A, only web_search, fetch_content, get_search_content and source_check; credential exclusion A, no browser-cookie/profile/keyring acquisition and no credential commands; subscription/current-model search is required.
Shared context
Rulings (all 2026-10-15, recorded on #1863): architecture C, host-owned execution and credentials; executor A, the full upstream extension in an actual trusted Pi session; workflow A, only the four core tools; credential exclusion A, no browser-cookie/profile/keyring acquisition and no credential commands; subscription/current-model search is required. Design: docs/plans/host-owned-web-search.md, "Full-extension authority map" and "Common bridge and governance design" items 1-7.
Constraints and non-goals
- Persisting results across executor shutdown, restart or chat resume (backends: restore same-session web results across executor restart and chat resume within bounded retention #2766) and fork inheritance (backends: give forks an owned snapshot of retained web results with independent lifecycle #2767) stay outside this epic.
- Noninteractive model workflows (backends: add noninteractive model workflows to host-owned web execution #1987), curator/review UI (ui-server: adapt curator and review workflows to host-owned web execution #1988) and opt-in browser or credential-command adapters (backends: specify opt-in browser and command credential adapters for web execution #1989) stay excluded.
- No upgrade of pi-web-access beyond the pinned comparison artifact without its own review. No generic provider seam or public plugin/transport seam. No widening of worker credentials or masks, and no change to restricted autonomous inference.
- Keyless, offline tests with fictional Odysseus inputs and loopback-only provider transport.
Breakdown
Split on 2026-11-08 at the maintainer's request. Order: #3685, then #3686, then #3687 and #3688 in parallel.
| Original acceptance criterion | Now in |
|---|---|
| Four tools execute in the host executor, real keyless worker test | #3686 |
| Subscription/current-model search through real host-owned auth | #3688 |
| Credential sentinels unreadable; no repository code in the credentialed process; parent bytes unchanged | #3686 |
| Deferred workflows/excluded credential modes return unsupported and are reported unavailable | #3685 (bridge result), #3686 (settings, catalog, brief) |
| Bridge tests: forged identities, unknown fields, out-of-subset providers, replayed handles, cancellation, deadline, executor death | #3685 (death/restart of the real executor also in #3686) |
| Egress, redirect, data-routing, taint, attribution and budget controls; unknown cost stays unknown | #3687 |
| Restricted autonomous turns get no web tool; other behaviour unchanged | #3685 |
| Named forwarding, authority and cancellation mutations | Each child, for its own guards |
Definition of done
All four children are closed and the original criteria above are met. docs/decisions/governed-writable-workers.md is amended with the executor, workflow and credential rulings (#3686). The Pi README describes host-owned web tools instead of the extension refusal for web. #2766 and #2767 can start.
2026-11-08: converted from a task to an epic and split into #3685-#3688 at the maintainer's request. The original scope and criteria are preserved in the table above. Earlier body revisions are in this issue's edit history.
2026-11-10 triage at main 3aadc8df5: repaired the binding-direction and initialize citations. Breakdown, rulings and readiness unchanged.
Activity
schlessera commentedon Nov 8, 2026
Readiness review, 2026-11-08: I re-verified the citations at
1619741f2and corrected them in the body. Worker state copying now lives inworker-launch.ts:99-102, withPI_CODING_AGENT_DIRset at:187.piWorkerMessageis atworker-protocol.ts:71-87. The host-owned direction section is atgoverned-writable-workers.md:4646-4670. I also added one consequence of #3600 that the source settles: the forwarding tools must be curated worker tools whose results pass the input-safety collector, because managed workers now refuse every loaded extension. No scope or ruling changed. #1863 now sits under the new parent epic #3669, beside #3658 (readiness gate, PR #3673), #3667 (MCP) and #3668 (subagents).3 remaining items
chore(tracker): track epic #2765 under Hardening
chore(tracker): track epic #2765 under Hardening
chore(tracker): track epic #2765 under Hardening
chore(tracker): track epic #2765 under Hardening
CONTRACT: fix(backends): run Pi on curated tools by default and refus…
CONTRACT: feat(ui-sdk): define the host-owned web tool contracts and …
CONTRACT: feat(ui-sdk): define the host-owned web tool contracts and …
CONTRACT: feat(ui-sdk): define the host-owned web tool contracts and …
CONTRACT: feat(backends): forward Pi's four web tools over a constrai…
schlessera commentedon Nov 9, 2026
State, 2026-11-09: #3685 is done. The bridge, the four forwarding tools and the internal executor boundary merged in #3775 (
297f6a7d1). Next: #3686, the trusted executor that runs the pinned extension in a host Pi session and wires the broker in production. Its only blocker is now closed. #3687 and #3688 follow #3686.schlessera commentedon Nov 10, 2026
2026-11-10 triage at main
3aadc8df5: repaired the binding-direction citation (governed-writable-workers.md:4644-4667) and theinitializerange (worker-entry.ts:100-107). The breakdown is unchanged since the 2026-11-09 state note.CONTRACT: feat(backends): run Pi's web tools in a trusted host execut…
schlessera commentedon Nov 13, 2026
All four children are done: #3685 (bridge), #3686 (trusted host executor, #3968), #3687 (mandatory egress route #3990 and per-call admission #3991) and #3688 (host-owned Pi auth, #3992). Main is green on each squash. Open follow-up: a live-login qualification of subscription and current-model search, as #3688 and the decision record say.