Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
import type { CodexAppServerStartOptions } from "./config.js";
import type {
CodexAppServerRequestMethod,
CodexAppServerRequestParams,
CodexAppServerRequestResult,
JsonValue,
} from "./protocol.js";
import { getSharedCodexAppServerClient } from "./shared-client.js";
import { withTimeout } from "./timeout.js";
export async function requestCodexAppServerJson<M extends CodexAppServerRequestMethod>(params: {
method: M;
requestParams: CodexAppServerRequestParams<M>;
timeoutMs?: number;
startOptions?: CodexAppServerStartOptions;
authProfileId?: string;
}): Promise<CodexAppServerRequestResult<M>>;
export async function requestCodexAppServerJson<T = JsonValue | undefined>(params: {
method: string;
requestParams?: unknown;
timeoutMs?: number;
startOptions?: CodexAppServerStartOptions;
authProfileId?: string;
}): Promise<T>;
export async function requestCodexAppServerJson<T = JsonValue | undefined>(params: {
method: string;
requestParams?: unknown;
timeoutMs?: number;
startOptions?: CodexAppServerStartOptions;
authProfileId?: string;
}): Promise<T> {
const timeoutMs = params.timeoutMs ?? 60_000;
return await withTimeout(
(async () => {
const client = await getSharedCodexAppServerClient({
startOptions: params.startOptions,
timeoutMs,
authProfileId: params.authProfileId,
});
return await client.request<T>(params.method, params.requestParams, { timeoutMs });
})(),
timeoutMs,
`codex app-server ${params.method} timed out`,
);
}
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland