






















@@ -1,6 +1,11 @@
11import { mkdtempSync } from "node:fs";
22import os from "node:os";
33import path from "node:path";
4+import {
5+finalizeDebugProxyCapture,
6+getDebugProxyCaptureStore,
7+initializeDebugProxyCapture,
8+} from "openclaw/plugin-sdk/proxy-capture";
49import { describe, expect, it, vi } from "vitest";
510import { installDebugProxyTestResetHooks } from "../test-support/debug-proxy-env-test-helpers.js";
611import { createStreamingErrorResponse } from "../test-support/streaming-error-response.js";
@@ -255,7 +260,6 @@ describe("openai tts", () => {
255260new Response(Buffer.from("audio-bytes"), { status: 200 }),
256261) as unknown as typeof globalThis.fetch;
257262258-const { getDebugProxyCaptureStore } = await import("../../src/proxy-capture/store.sqlite.js");
259263const store = getDebugProxyCaptureStore(
260264process.env.OPENCLAW_DEBUG_PROXY_DB_PATH,
261265process.env.OPENCLAW_DEBUG_PROXY_BLOB_DIR,
@@ -304,9 +308,7 @@ describe("openai tts", () => {
304308new Response(Buffer.from("audio-bytes"), { status: 200 }),
305309) as unknown as typeof globalThis.fetch;
306310307-const runtime = await import("../../src/proxy-capture/runtime.js");
308-const { getDebugProxyCaptureStore } = await import("../../src/proxy-capture/store.sqlite.js");
309-runtime.initializeDebugProxyCapture("test");
311+initializeDebugProxyCapture("test");
310312311313await openaiTTS({
312314text: "hello",
@@ -318,7 +320,7 @@ describe("openai tts", () => {
318320timeoutMs: 5_000,
319321});
320322await new Promise((resolve) => setTimeout(resolve, 0));
321-runtime.finalizeDebugProxyCapture();
323+finalizeDebugProxyCapture();
322324323325const store = getDebugProxyCaptureStore(
324326process.env.OPENCLAW_DEBUG_PROXY_DB_PATH,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。