refactor(ts): complete legacy host removal — drop fastify/commander/zod, delete MCP SDK server, remove ManagedRuntime facades

Finishes the remaining EFFECT_NATIVE_REWRITE_PLAN stages in one verified slice:
- fastify, @fastify/websocket, commander, zod removed from all package manifests
- legacy @modelcontextprotocol/sdk stdio server deleted; effect/unstable/ai McpServer is canonical
- no ManagedRuntime or Effect.runPromise program facades remain in production source
- gateway server/rpc-contract and client rpc/socket moved onto Effect v4 native http/rpc/socket layers

Gates (force-run, no cache): check:tsgo, build, test (96 tests / 11 tasks) all green.
Native-class inventory: zero blocking production classes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
elpresidank 2026-06-11 06:29:29 -05:00
parent a26463afc1
commit cf12defcd8
30 changed files with 1506 additions and 456 deletions

View file

@ -12,6 +12,7 @@ import { Clock, Effect, Exit, HashMap, HashSet, Option, Random, Scope, Synchroni
import {
loadMessagingRuntimeConfig,
makeNatsBackend,
makeNatsBackendScoped,
makePubSubService,
makeRequestResponseFactoryService,
messagingDeliveryError,
@ -401,3 +402,17 @@ export function makeDispatcherManager(config: GatewayConfig): DispatcherManager
publishToTopic,
};
}
export const makeDispatcherManagerScoped = Effect.fn("makeDispatcherManagerScoped")(function* (
config: GatewayConfig,
) {
if (config.pubsub !== undefined) {
return makeDispatcherManager(config);
}
const pubsub = yield* makeNatsBackendScoped(config.natsUrl ?? "nats://localhost:4222");
return makeDispatcherManager({
...config,
pubsub,
});
});