refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries

This commit is contained in:
root committed 2026-10-13 14:37:03 +08:00
1 parent 3f1c6d02f6
commit 27c0f27434
268 files changed
+7468 -7852

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ describe.skipIf(!up)("发现页接口", () => {
settings: plainSettings(() => db),
capabilities: createCapabilityRegistry({ logger }),
} as ServerContext;
const metaFetch: typeof fetch = async (input, init) => {
const metaFetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response> = async (input, init) => {
const u = new URL(typeof input === "string" ? input : input instanceof URL ? input.href : input.url);
meta.push(`${init?.method ?? "GET"} ${u.host}${u.pathname}${u.search}`);
if (u.pathname.startsWith("/rexxar/api/v2/subject_collection/")) return doubanReply();
+1 -1
View File
@@ -153,7 +153,7 @@ describe.skipIf(!up)("全局搜索", () => {
capabilities: createCapabilityRegistry({ logger }),
} as ServerContext;
// 挂起的站点:请求一直不返回,直到被中止(单站超时)
const fetchImpl: typeof fetch = (input, init) => {
const fetchImpl: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response> = (input, init) => {
const url = new URL(input instanceof Request ? input.url : String(input));
if (url.hostname !== SLOW_HOST) return fetch(input, init);
slowCalls++;