mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 02:38:26 +00:00
fix: restore tsc build and plugin install tests
This commit is contained in:
@@ -109,7 +109,9 @@ export function buildGatewayConnectionDetails(
|
||||
};
|
||||
}
|
||||
|
||||
export async function callGateway<T = unknown>(opts: CallGatewayOptions): Promise<T> {
|
||||
export async function callGateway<T = Record<string, unknown>>(
|
||||
opts: CallGatewayOptions,
|
||||
): Promise<T> {
|
||||
const timeoutMs = opts.timeoutMs ?? 10_000;
|
||||
const config = opts.config ?? loadConfig();
|
||||
const isRemoteMode = config.gateway?.mode === "remote";
|
||||
|
||||
@@ -411,7 +411,7 @@ export class GatewayClient {
|
||||
return null;
|
||||
}
|
||||
|
||||
async request<T = unknown>(
|
||||
async request<T = Record<string, unknown>>(
|
||||
method: string,
|
||||
params?: unknown,
|
||||
opts?: { expectFinal?: boolean },
|
||||
|
||||
@@ -329,7 +329,7 @@ describeLive("gateway live (cli backend)", () => {
|
||||
providerId === "codex-cli"
|
||||
? `Please include the token CLI-BACKEND-${nonce} in your reply.`
|
||||
: `Reply with exactly: CLI backend OK ${nonce}.`;
|
||||
const payload = await client.request<Record<string, unknown>>(
|
||||
const payload = await client.request(
|
||||
"agent",
|
||||
{
|
||||
sessionKey,
|
||||
@@ -356,7 +356,7 @@ describeLive("gateway live (cli backend)", () => {
|
||||
providerId === "codex-cli"
|
||||
? `Please include the token CLI-RESUME-${resumeNonce} in your reply.`
|
||||
: `Reply with exactly: CLI backend RESUME OK ${resumeNonce}.`;
|
||||
const resumePayload = await client.request<Record<string, unknown>>(
|
||||
const resumePayload = await client.request(
|
||||
"agent",
|
||||
{
|
||||
sessionKey,
|
||||
@@ -383,7 +383,7 @@ describeLive("gateway live (cli backend)", () => {
|
||||
const imageBase64 = renderCatNoncePngBase64(imageCode);
|
||||
const runIdImage = randomUUID();
|
||||
|
||||
const imageProbe = await client.request<Record<string, unknown>>(
|
||||
const imageProbe = await client.request(
|
||||
"agent",
|
||||
{
|
||||
sessionKey,
|
||||
|
||||
@@ -603,10 +603,10 @@ async function runGatewayModelSuite(params: GatewayModelSuiteParams) {
|
||||
// Ensure session exists + override model for this run.
|
||||
// Reset between models: avoids cross-provider transcript incompatibilities
|
||||
// (notably OpenAI Responses requiring reasoning replay for function_call items).
|
||||
await client.request<Record<string, unknown>>("sessions.reset", {
|
||||
await client.request("sessions.reset", {
|
||||
key: sessionKey,
|
||||
});
|
||||
await client.request<Record<string, unknown>>("sessions.patch", {
|
||||
await client.request("sessions.patch", {
|
||||
key: sessionKey,
|
||||
model: modelKey,
|
||||
});
|
||||
@@ -1164,11 +1164,11 @@ describeLive("gateway live (dev agent, profile keys)", () => {
|
||||
try {
|
||||
const sessionKey = `agent:${agentId}:live-zai-fallback`;
|
||||
|
||||
await client.request<Record<string, unknown>>("sessions.patch", {
|
||||
await client.request("sessions.patch", {
|
||||
key: sessionKey,
|
||||
model: "anthropic/claude-opus-4-5",
|
||||
});
|
||||
await client.request<Record<string, unknown>>("sessions.reset", {
|
||||
await client.request("sessions.reset", {
|
||||
key: sessionKey,
|
||||
});
|
||||
|
||||
@@ -1200,7 +1200,7 @@ describeLive("gateway live (dev agent, profile keys)", () => {
|
||||
throw new Error(`anthropic tool probe missing nonce: ${toolText}`);
|
||||
}
|
||||
|
||||
await client.request<Record<string, unknown>>("sessions.patch", {
|
||||
await client.request("sessions.patch", {
|
||||
key: sessionKey,
|
||||
model: "zai/glm-4.7",
|
||||
});
|
||||
|
||||
@@ -109,7 +109,7 @@ describe("gateway e2e", () => {
|
||||
try {
|
||||
const sessionKey = "agent:dev:mock-openai";
|
||||
|
||||
await client.request<Record<string, unknown>>("sessions.patch", {
|
||||
await client.request("sessions.patch", {
|
||||
key: sessionKey,
|
||||
model: "openai/gpt-5.2",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user