refactor(runtime-host): convert protocol export * to named re-exports
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 502
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 716
Description
## Summary
`packages/runtime-host/src/protocol/index.ts` uses `export *` re-exports from 30+ modules, making the protocol boundary type surface hard to audit. An accidental re-export of an internal type becomes a protocol commitment, but the `RUNTIME_HOST_COMPATIBILITY_EPOCH` system only catches explicit wire-breaking changes.
## Evidence
- `packages/runtime-host/src/protocol/index.ts:64-89` — 25 `export * from` statements
- `protocol/` has 49 files
- `RUNTIME_HOST_COMPATIBILITY_EPOCH` is currently at 50, incremented for wire-breaking changes
- An internal type accidentally re-exported through `export *` becomes part of the public protocol surface
## Proposed Solution
Convert `export *` to named re-exports in `protocol/index.ts`. This makes every exported symbol explicit and auditable.
Benefits:
- Every new protocol export requires an intentional decision
- Prevents accidental leakage of internal types
- Makes protocol surface area reviewable in code review
- Compatible with the existing compatibility epoch system
## Acceptance Criteria
- [ ] `protocol/index.ts` uses named re-exports instead of `export *`
- [ ] All existing public protocol types are preserved
- [ ] No internal types are accidentally exported
- [ ] Protocol surface area diff is visible in PR reviews
## Labels
refactor, help wanted
Contributor guide
Assessment
This issue has not been assessed yet.