mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
The Client API carrier's `agentPresets` member was the one member of its class without an `IApiClient[...]` annotation. Inferring it inlined `AgentPresetEntry` into the emitted declaration by the specifier TS picks — the host `index.ts` — dragging the whole gateway, and with it the host `Context` merges, into every Client program importing the carrier. Annotated like its siblings. `ApiRemoteAgentOptions.setup` now takes the inspected session rather than its header alone: this layer resolves a resumed session's preset from the LOG, because a session that switched while blank ran its turns under the newer composition and the header is written once at creation. Conflicts: apps/web/tests/snapshots/*/*.expected.md packages/client/ui-conversation/src/client/skeleton/InputBar.tsx packages/host/apiproxy/src/api-proxy.ts scripts/doc-budgets.manifest.json
api/ — Remote API layers
English | 中文
The application-facing Remote stack. remotes owns BFF policy and the selected business API, while gateway implements the TypeRT unary RPC endpoints shared by Host and Client environments.
| Package | Role | ctx key |
|---|---|---|
remotes/ |
Host Agent/Session lookup policy and Client Remote contribution assembly | no service; configures ctx.typert and consumes ctx.remote |
gateway/ |
Host TypeRT dispatcher and Client Remote endpoint | ctx.typertGateway / ctx.remote |
The runtime dependency direction is remotes → gateway → connection → webserver: the BFF consumes the shared TypeRTClientRemote contract, Gateway delegates transport to Connection, and Connection mounts on the HTTP server. Cordis service injection and Client module metadata preserve this order without importing the concrete Gateway from the Remotes Client entry.
Known Limitations and Deferred Work
- Connection and WebServer remain at
client/connectionandhost/webserver; a later package-only move can place them underapi/connectionandapi/webserverwithout changing their service contracts. - The legacy API Proxy remains at
host/apiproxyas the fallback for methods not yet migrated to Remote. It consumes the Host resolver owned byapi-remotesso migrated and legacy methods retain one Agent/Session identity policy.