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
@@ -3,7 +3,7 @@ import { Kysely, PostgresDialect } from "kysely";
import pg from "pg";
import { PgTokenBucket } from "../../src/rate-limit.ts";
const [url, schema, key, n, capacity, rate] = Deno.args as [string, string, string, string, string, string];
const [url, schema, key, n, capacity, rate] = process.argv.slice(2) as [string, string, string, string, string, string];
const db = new Kysely<unknown>({
dialect: new PostgresDialect({
pool: new pg.Pool({ connectionString: url, max: 1, options: `-c search_path=${schema},public` }),
+3 -2
View File
@@ -1,4 +1,5 @@
import { fileURLToPath } from "node:url";
import { Command } from "@umt/runtime";
import { Kysely, PostgresDialect, sql } from "kysely";
import pg from "pg";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
@@ -70,8 +71,8 @@ describe.skipIf(skip)("PgTokenBucket(真实 PG)", () => {
const rate = 20;
const perProc = 12;
const procs = [0, 1, 2].map(() =>
new Deno.Command(Deno.execPath(), {
args: ["run", "-A", script, url, schema, "t:procs", String(perProc), String(capacity), String(rate)],
new Command(process.execPath, {
args: [script, url, schema, "t:procs", String(perProc), String(capacity), String(rate)],
stdout: "piped",
stderr: "piped",
}).output(),