chore(platform-infra): commit parallel proxy updates

This commit is contained in:
Codex
2026-07-08 20:00:20 +02:00
parent c827967b62
commit 56ff8a2bf2
8 changed files with 316 additions and 33 deletions
@@ -285,6 +285,7 @@ export function readManualBindingSources(value: unknown, key: string): CodexPool
kind: readManualBindingKind(rawSource.kind, `${path}.kind`),
provider: readManualBindingProvider(rawSource.provider, `${path}.provider`),
description: readManualAccountReason(rawSource.description, `${path}.description`),
hostProxyRef: readManualBindingHostProxyRef(rawSource.hostProxyRef, `${path}.hostProxyRef`),
fixedProxy: null,
};
if (source.kind === "proxy" && source.provider === "fixed-http-proxy") {
@@ -359,6 +360,16 @@ export function readManualBindingProvider(value: unknown, key: string): CodexPoo
return text;
}
export function readManualBindingHostProxyRef(value: unknown, key: string): string | null {
if (value === undefined || value === null) return null;
const text = stringValue(value)?.trim() ?? "";
if (text.length === 0) return null;
if (!/^config\/platform-infra\/host-proxy\.yaml#targets\.[A-Za-z0-9_-]+$/u.test(text)) {
throw new Error(`${codexPoolConfigPath}.${key} must point at config/platform-infra/host-proxy.yaml#targets.<id>`);
}
return text;
}
export function validateManualBindingSourceId(value: string, key: string): void {
if (!/^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/u.test(value)) throw new Error(`${codexPoolConfigPath}.${key} has an unsupported source id format`);
}
@@ -169,6 +169,7 @@ export function manualBindingSourcePlan(source: CodexPoolManualBindingSource): R
kind: source.kind,
provider: source.provider,
description: source.description,
hostProxyRef: source.hostProxyRef,
fixedProxy: source.fixedProxy,
};
}
@@ -209,6 +209,7 @@ export interface CodexPoolManualBindingSource {
kind: CodexPoolManualBindingKind;
provider: CodexPoolManualBindingProvider;
description: string | null;
hostProxyRef: string | null;
fixedProxy: CodexPoolManualFixedProxyConfig | null;
}