Skip to content

feat(egress): Expose credentialed egress to plugin tools - #685

Merged
dcramer merged 6 commits into
mainfrom
ref/shared-credentialed-egress-660
Jun 29, 2026
Merged

dcramer merged 6 commits into
mainfrom
ref/shared-credentialed-egress-660

Conversation

@dcramer

@dcramer dcramer commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

Plugin tool registration contexts now receive a host-owned ctx.egress.fetch(...) capability for provider HTTP calls. The fetch path resolves the provider host, carries the declared operation into plugin grant and response hooks, selects the provider grant, injects credentials through the shared credentialed egress engine, and routes auth-required failures through the existing plugin auth pause orchestration.

The sandbox proxy remains on the same forwarding path, but the credentialed executor now accepts caller-owned ports for lease cleanup and auth/permission handling. That lets host/plugin calls reuse the provider request engine without pretending to originate from sandbox network forwarding, while upstream permission-denied responses still return to plugin callers for normal response handling. Plugin egress also rejects non-HTTPS provider URLs before issuing credentials.

Focused coverage exercises plugin egress, plugin tool registration, and the sandbox proxy path, including operation propagation and upstream 403 pass-through. The integration suite now includes a fake host-registered plugin tool that executes through the agent tool wrapper, calls ctx.egress.fetch(...), and proves the mocked provider receives host-injected credentials.

Refs GH-660

Move the verified provider forwarding path out of the sandbox proxy tree so future host/plugin egress callers can share the same credentialed request engine. The sandbox proxy remains the only caller in this slice, preserving existing auth, permission, and response-hook behavior.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 29, 2026 9:37pm

Request Review

Expose host-owned provider egress to plugin tools through ctx.egress.fetch and route those requests through the shared credentialed forwarding engine. Auth-required responses now reuse the existing plugin auth orchestration path instead of requiring sandbox-originated HTTP.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: low PR risk score: low labels Jun 29, 2026
@dcramer dcramer changed the title ref(egress): Move credentialed provider forwarding feat(egress): Expose credentialed egress to plugin tools Jun 29, 2026
Thread plugin egress operations into credential grant hooks and make plugin tool egress a required runtime context value instead of a throwing fallback.

Preserve upstream permission-denied responses for plugin callers while keeping auth-required handling routed through plugin auth orchestration.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
Add an integration path where a registered plugin tool executes through the agent tool wrapper and calls ctx.egress.fetch with host-managed credentials.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
dcramer and others added 2 commits June 29, 2026 14:28
Keep the plugin egress unit coverage focused on auth-required and permission-denied failure paths now that the integration test covers the host plugin tool happy path.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
Keep plugin egress auth handling on a typed local port and reject non-HTTPS provider URLs before credential issuance.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer merged commit 77a8d14 into main Jun 29, 2026
19 checks passed
@dcramer
dcramer deleted the ref/shared-credentialed-egress-660 branch June 29, 2026 21:48

This branch was successfully deployed

1 active deployment
Preview – junior-docs — c9a616c4 Deployed Jun 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant