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:
20
packages/opencode/test/fixture/flag.ts
Normal file
20
packages/opencode/test/fixture/flag.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { WorkspaceV2 } from "@opencode-ai/core/workspace"
|
||||
import { Flag } from "@opencode-ai/core/flag/flag"
|
||||
import { Effect, Scope } from "effect"
|
||||
|
||||
/**
|
||||
* Scoped override for `Flag.OPENCODE_WORKSPACE_ID`. Saves the previous value
|
||||
* on entry and restores it via finalizer when the surrounding scope closes —
|
||||
* preserves the original try/finally semantics regardless of test outcome.
|
||||
*/
|
||||
export function withFixedWorkspaceID(id: WorkspaceV2.ID): Effect.Effect<void, never, Scope.Scope> {
|
||||
return Effect.gen(function* () {
|
||||
const previous = Flag.OPENCODE_WORKSPACE_ID
|
||||
Flag.OPENCODE_WORKSPACE_ID = id
|
||||
yield* Effect.addFinalizer(() =>
|
||||
Effect.sync(() => {
|
||||
Flag.OPENCODE_WORKSPACE_ID = previous
|
||||
}),
|
||||
)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user