This repository was archived by the owner on Aug 7, 2026. It is now read-only.
feat: Complete Preview2 interfaces with bidirectional pattern - #6
Merged
Conversation
Add Preview2 (blocking) versions of all interfaces following the same bidirectional architecture as Preview3, plus CI workflow for validation. ## New Preview2 Interfaces - runtime.wit: Registration and framework APIs (blocking, component imports) - handlers.wit: Callback interfaces (blocking, component exports) - client.wit: Client operations (blocking, component imports) - world.wit: Three bidirectional worlds ## Architecture Preview2 follows the same bidirectional pattern as Preview3: - Component IMPORTS runtime (register capabilities, serve) - Component EXPORTS handlers (execute tools, read resources) - Host handles protocol, transport, middleware - Component handles domain logic only Key difference: All operations are blocking (no future<T>) ## CI Workflow Added .github/workflows/ci.yml: - Validates Preview3 WIT files with Bazel - Validates Preview2 WIT files with Bazel - Checks WIT formatting with wasm-tools ## Updated Documentation - preview2/README.md: Complete architecture documentation - BUILD.bazel: Comprehensive comments explaining interfaces and worlds ## Worlds - mcp-backend-preview2: import runtime + export handlers - mcp-client-preview2: import client - mcp-proxy-preview2: import runtime + client, export handlers
Contributor
Author
CI Status✅ WIT Validation: Both Preview2 and Preview3 validate successfully with Bazel ❌ ABI Check: Failing due to tool version issue in the action itself: This is a pre-existing issue with the Options:
The important validation (Bazel build) is passing, confirming the WIT interfaces are syntactically correct and properly structured. |
- Add .pre-commit-config.yaml with Bazel-based WIT validation - Add .markdownlint.yaml for Markdown linting configuration - Update CI workflow to include pre-commit checks - Update README.md with bidirectional architecture documentation - Use Bazel tools for all WIT validation (no separate wasm-tools)
Add centered header, WIT/WebAssembly badges, and organization footer. Keep WASI proposal format intact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the Preview2 interface implementation following the same bidirectional architecture as Preview3, adding CI validation workflow.
Changes
New Preview2 Interfaces
Architecture
Both Preview2 and Preview3 now follow the same bidirectional pattern:
Key Principle:
Difference from Preview3: All operations are blocking (no `future`)
CI Workflow
Added
.github/workflows/ci.yml:Updated Documentation
Worlds
All three worlds follow bidirectional pattern:
mcp-backend-preview2:
import runtime + export handlersmcp-client-preview2:
import clientmcp-proxy-preview2:
import runtime + client, export handlersBenefits
Testing
Both Preview2 and Preview3 validate successfully:
CI will automatically run these checks on every PR.
Related