Skip to content

feat(contracts): define bounded embedded browser messages - #63

Draft
John-Ryan21337 wants to merge 1 commit into
cafeai:devfrom
John-Ryan21337:adoption/cafe-dev-browser-contracts-20260911
Draft

John-Ryan21337 wants to merge 1 commit into
cafeai:devfrom
John-Ryan21337:adoption/cafe-dev-browser-contracts-20260911

Conversation

@John-Ryan21337

@John-Ryan21337 John-Ryan21337 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What Changed

Adds bounded schemas for embedded-browser tabs, viewport controls, redacted snapshots, action results, and thread/provider browser requests. This is an optional interface proposal extracted from the working Club Code browser. It does not register IPC, RPC, MCP tools, settings, or a browser UI.

Browser-specific identities and payloads have finite limits. Browser timestamps require valid canonical UTC values. Decoding never grants access: native ownership, origin sharing, request expiry, revocation, and target freshness remain runtime responsibilities.

Why

The complete browser spans native Electron views, the renderer, and provider tooling. A schema-only boundary lets maintainers review the interface before deciding whether to adopt those components. It has no prerequisite PR and is based on current dev at 99fbaec89da429924171c89d66a8f3455e42d9b0.

The full working implementation and feature adoption guide are in Club Code publication PR #66. Later native/browser and broker integrations depend on this interface; merging this PR alone does not provide browsing. It does not replace current Cafe provider versions or adapters.

Validation

  • Independent audit-and-repair of bounds and timestamp validation.
  • Focused browser contracts: 11 tests passed; full contracts: 175 passed at final commit 9ba96db2.
  • Full repository test graph: 10 tasks passed. It began before the two-file audit refinement; the complete affected contracts suite was rerun afterward.
  • Final yarn fmt, yarn lint, and full yarn typecheck passed. Lint reports existing warnings.
  • Final yarn build:desktop --force passed, with fresh nonempty desktop/server/web artifacts verified.
  • No activated UI or runtime behavior; no native browsing claim follows from schema tests.
  • Upstream CI passed at this head: Ubuntu, Windows, macOS, all three native desktop packages, and Linux AppImage.

Checklist

  • This PR is small and focused: one schema module, one export, one test file.
  • I explained what changed and why.
  • No UI changes; screenshots and video are not applicable.

日本語:現行Cafe dev向けのブラウザー通信スキーマです。UI・エンドポイント・権限は有効にしません。
実装全体の採用を決める前に、境界と上限を個別に確認できます。後続のネイティブ表示・エージェント連携には別の実装が必要です。

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant