feat(aircoding): AirCoding V2 baseline — deterministic multi-agent architecture

Forked from OpenCode v1.17.4 with multi-agent system:
- 5 agents: aircoding, scheduler, worker, architect, reviewer
- Deterministic DAG scheduling engine (coordinator_tick)
- Tool whitelists as hard enforcement
- AirCoding validation plugin
- System prompt injection for routing
- V1 requirements: C4 docs, ADR, AGENTS.md, debug-log.md
- Design documents in docs/
This commit is contained in:
airlongdian
2026-06-13 21:41:54 +08:00
commit af3016fe27
5757 changed files with 1170017 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import { expect, test } from "bun:test"
import { testRender } from "@opentui/solid"
import { abbreviateHome } from "../src/runtime"
import { TuiPathsProvider, useTuiPaths } from "../src/context/runtime"
test("abbreviates paths within home boundaries", () => {
expect(abbreviateHome("/home/test", "/home/test")).toBe("~")
expect(abbreviateHome("/home/test/project", "/home/test")).toBe("~/project")
expect(abbreviateHome("/home/tester/project", "/home/test")).toBe("/home/tester/project")
expect(abbreviateHome("/tmp/project", "/home/test")).toBe("/tmp/project")
})
test("provides focused immutable runtime inputs", async () => {
let paths: ReturnType<typeof useTuiPaths>
function Runtime() {
paths = useTuiPaths()
return <text>{paths.cwd}</text>
}
const app = await testRender(
() => (
<TuiPathsProvider value={{ cwd: "/work", home: "/home/test", state: "/state", worktree: "/worktree" }}>
<Runtime />
</TuiPathsProvider>
),
{ width: 40, height: 3 },
)
try {
await app.renderOnce()
expect(app.captureCharFrame()).toContain("/work")
expect(Object.isFrozen(paths!)).toBe(true)
} finally {
app.renderer.destroy()
}
})