Skip to content

fix(runtime): wire manifest bridge policy into TypeScript apps - #415

Open
zuohuadong wants to merge 2 commits into
vercel-labs:mainfrom
zuohuadong:codex/ts-core-manifest-bridge-policy
Open

fix(runtime): wire manifest bridge policy into TypeScript apps#415
zuohuadong wants to merge 2 commits into
vercel-labs:mainfrom
zuohuadong:codex/ts-core-manifest-bridge-policy

Conversation

@zuohuadong

Copy link
Copy Markdown

Problem

TypeScript apps derive permissions and navigation origins from app.zon, but the generated TypeScript runner leaves RunOptions.builtin_bridge at its default disabled policy. Built-in bridge commands declared in app.zon are therefore denied at runtime even when the manifest explicitly grants them.

Fix

  • Convert the manifest's top-level permissions and bridge command permissions/origins into native_sdk.BridgePolicy at comptime.
  • Keep the policy fail-closed when the bridge block or command list is absent or empty.
  • Pass the derived policy through ts_core_main.zig into runner.runWithOptions.
  • Add regression coverage for absent, empty, and declared policies, including permission and origin checks.

Verification

  • zig build test-app-runner --summary all (3/3 tests passed)
  • zig build test --summary all (passed)
  • zig fmt --check src/app_runner/root.zig src/app_runner/ts_core_main.zig
  • git diff --check

scripts/gate.sh fast upstream/main reached the affected suites, but its broader matrix is environment-blocked by missing @typescript/old, Android/Xcode SDKs, and an external arocc download; those failures are unrelated to this two-file change.

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@gustbul is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants