+- note: A controller/tegg refactor arc. (1) Folded the `Egg*` inner-object shell subclasses into the runtime base classes (decorators moved onto `RootProtoManager`/`ControllerRegisterFactory`/`ControllerLoadUnitHook`/`ControllerPrototypeHook`; hosts re-export the bases). (2) Made the egg HTTP register a container citizen: `EggHTTPRegisterProvider` (@InnerObjectProto) replaces the static-TeggScope-slot `EggHTTPControllerRegister`, mirroring the fetch host's provider. (2b, commit `0e59ce453`) Did the same for the egg MCP register: mount the per-app `EggMcpRouter` on `app.mcpRouter` in the controller boot (it needs the live `app`, so it is still built imperatively) so its compat proto reaches inner objects; an `EggMCPRegisterProvider` optional-injects `@EggQualifier(EggType.APP) mcpRouter` and plugs in the MCP creator. With both HTTP and MCP on providers, the imperative enqueue/drain bypass `ControllerRegisterDefaults` (and `ControllerRegisterFactory.applyDefaultRegisters`) is DELETED — egg and standalone now differ only in their router/mcpRouter implementations. Added the first running egg MCP-controller test (`mcp-proxy/test/mcp-tegg-register.test.ts`: teggController + mcpProxy + a tegg `@MCPController`, asserts `app.mcpRouter` mounted and `GET /mcp/stateless/stream` → 405). (3) The load-bearing change: instead of ModuleHandler hand-providing `logger`/`runtimeConfig`/`router` as PRIVATE `ProvidedInnerObjectProto`s, it now feeds `EggAppLoader.buildAppSingletonCompatClazzList(PRIVATE)` into the inner-object graph via `InnerObjectLoadUnitBuilder.addCompatibleClazzList`, so inner objects inject app properties through the same `() => app[name]` compat protos business modules use. Enablers/gotchas: `EggCompatibleProtoImpl` now honors the descriptor accessLevel (was hardcoded PUBLIC) so the inner-unit copies are PRIVATE and don't collide with the app load unit's PUBLIC copies; CONTEXT-scoped compat protos are excluded (inner objects are singletons); compat protos are fed AFTER scanned inner objects and skip name clashes (inner object wins); `moduleConfigs` stays an explicit provided instance (blacklisted in EggAppLoader + wants a `ModuleConfigs` wrapper); an app property whose name is also a ctx property (`router`) needs `@EggQualifier(EggType.APP)` because `EggQualifierProtoHook` stamps a plain inject CONTEXT-first. Regression green (tegg/controller/mcp-client/aop/eventbus/config/schedule/service-worker) modulo the pre-existing 5000ms-suite-default flaky (`ControllerMetaManager` boot-error, `MultiApp` isolate — both pass in isolation) and dal tests needing MySQL.
0 commit comments