feat(api): complete phase 2.4 control plane

This commit is contained in:
chick
2026-07-17 00:37:11 +08:00
parent c2702b5fc6
commit 7b91dbbad1
40 changed files with 4526 additions and 74 deletions
@@ -0,0 +1,16 @@
import type { ConnectionTransport } from '../../application/connections/connection-probe.js';
import type { UpstreamSessionClientOptions } from '../../application/connections/upstream-session-client.js';
import { SafeUpstreamGateway, type SafeUpstreamTransport } from './safe-upstream-gateway.js';
export interface SafeControlPlaneUpstream extends ConnectionTransport {
request: UpstreamSessionClientOptions['request'];
}
export function createSafeControlPlaneUpstream(
transport: SafeUpstreamTransport,
): SafeControlPlaneUpstream {
const gateway = new SafeUpstreamGateway({ transport });
return {
get: (url) => transport.get(url),
request: (request) => gateway.request(request),
};
}