Extracted from alkhub_ts packages/core/operations/ and packages/core/mcp/. - Runtime-agnostic (injected fs/env deps, no Deno globals) - Direct @logtape/logtape import instead of logger wrapper - PendingRequestMap with pubsub-wired call protocol - Peer-dep isolation for MCP adapter (sub-path export) - Schema const naming convention (XSchema + X type alias) - 68 tests passing, build + lint + test all green
1.5 KiB
1.5 KiB
Architecture
This document has been decomposed into modular documents. See docs/architecture/ for the current architecture specification.
| Document | Content |
|---|---|
| architecture/README.md | Overview, why this exists, what it provides, consumer context, threat model |
| architecture/api-surface.md | All public types, registry API, call protocol API, subscribe, env, adapters |
| architecture/call-protocol.md | PendingRequestMap, CallHandler, call≡subscribe semantics, events, error model, access control |
| architecture/adapters.md | from_schema, from_openapi, from_mcp, scanner — how they work, how to add new adapters |
| architecture/build-distribution.md | Dependencies, project structure, sub-path exports, peer deps, build tooling |
Design Decisions
| ADR | Decision |
|---|---|
| 001 | Direct @logtape/logtape import instead of wrapper module |
| 002 | Inject filesystem dependencies for runtime agnosticism |
| 003 | Peer dependencies for adapter isolation (MCP SDK, @std/path) |
| 004 | Schema const naming convention (AccessControlSchema + AccessControl type) |