chore: initialize qiming workspace repository

This commit is contained in:
Codex
2026-05-29 14:22:48 +08:00
commit bfd67a0f2c
10750 changed files with 1885711 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { describe, expect, test } from "bun:test"
import { Config } from "../../src/config"
import { ConfigParse } from "../../src/config/parse"
describe("config.sandbox schema", () => {
test("accepts sandbox in strict config", () => {
const data = ConfigParse.schema(Config.Info.zod, {
sandbox: {
sandbox_mode: "strict",
helper_path: "C:\\helper\\qiming-sandbox-helper.exe",
mode: "workspace-write",
network_enabled: true,
},
}, "test.json")
expect(data.sandbox?.sandbox_mode).toBe("strict")
expect(data.sandbox?.helper_path).toContain("qiming-sandbox-helper")
})
test("rejects unknown top-level keys", () => {
expect(() =>
ConfigParse.schema(Config.Info.zod, {
sandbox: { sandbox_mode: "strict" },
unknown_sandbox_key: true,
} as Record<string, unknown>, "test.json"),
).toThrow()
})
})