Skip to content

fix(server): give Prime Agent scoped browser tools - #78

Merged
rynfar merged 1 commit into
pylonfrom
fix/prime-agent-browser-tools
Aug 25, 2026
Merged

fix(server): give Prime Agent scoped browser tools#78
rynfar merged 1 commit into
pylonfrom
fix/prime-agent-browser-tools

Conversation

@rynfar

@rynfar rynfar commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

Prime Agent sessions honored the browser-access permission in Pylon, but neither daemon mode nor ACP compatibility mode received Pylon’s thread-scoped t3-code preview server. The permission therefore appeared enabled while native preview_* tools were unavailable.

Fix

  • pass the existing McpProviderSession endpoint and bearer header into Prime ACP session/new requests
  • attach the same server to daemon sessions through Prime Agent 0.8.0’s public owner-scoped MCP API before the first snapshot
  • restore MCP ownership before publishing a reconnect resync, and fail closed if recovery is not authoritative
  • release only Pylon’s owner and t3-code server during teardown
  • revoke scoped credentials on explicit stop, failed teardown, stopAll, and authoritative autonomous session exit
  • document the behavior and disabled-access path

Closes #77.

Verification

  • vp test run apps/server/src/provider/Layers/PrimeAgentAdapter.test.ts apps/server/src/provider/prime/PrimeAgentDaemonAdapter.test.ts apps/server/src/provider/prime/PrimeAgentDaemonSessionRuntime.test.ts apps/server/src/provider/Layers/ProviderService.test.ts apps/server/src/mcp/McpSessionRegistry.test.ts — 220 passed
  • vp test run apps/server/src/provider/Layers/CursorAdapter.test.ts apps/server/src/provider/Layers/GrokAdapter.test.ts apps/server/src/provider/Layers/ProviderService.test.ts — 81 passed
  • vp run -F t3 typecheck — passed
  • targeted lint on all nine changed TypeScript files — 0 warnings, 0 errors
  • git diff --check origin/pylon...HEAD — passed
  • real Pylon desktop client with an isolated runtime home and Prime Agent 0.8.0 — native preview_open, preview_type, preview_click, preview_snapshot, preview_recording_start, and preview_recording_stop completed against a local fixture; the final snapshot showed Pylon Browser Verification, pylon-browser-pass, and count 1; the saved MP4 was 37,395 bytes

Implemented by GPT-5.6 Sol using Prime Agent.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Aug 25, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.4 KiB 13.4 KiB +10 B (+0.1%) 15.1 KiB
Codex Thread snapshot wire 6.9 KiB 6.9 KiB +4 B (+0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.6 KiB +6 B (+0.1%) 7.8 KiB
Codex Live turn WebSocket decoded 55.0 KiB 55.0 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 16 16 0 (0.0%) 21
Claude Total thread wire 13.5 KiB 13.4 KiB −6 B (−0.0%) 15.1 KiB
Claude Thread snapshot wire 6.9 KiB 6.9 KiB +2 B (+0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.6 KiB −8 B (−0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 55.8 KiB 55.8 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 16 16 0 (0.0%) 21

Baseline: 8320f07 · PR result: cd53159 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 109.4 KiB
  • Claude decoded thread snapshot: 110.0 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar
rynfar merged commit 14bad65 into pylon Aug 25, 2026
14 checks passed
@rynfar
rynfar deleted the fix/prime-agent-browser-tools branch August 25, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prime Agent sessions do not receive Pylon browser tools

1 participant