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 - V1 requirements: C4 docs, ADR, AGENTS.md, debug-log.md - Design documents in docs/
This commit is contained in:
17
packages/llm/test/lib/sse.ts
Normal file
17
packages/llm/test/lib/sse.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Helpers for building deterministic SSE bodies in tests.
|
||||
*
|
||||
* Inline template-literal SSE strings are hard to write and review when chunks
|
||||
* contain JSON; this helper accepts plain values and serializes them, so test
|
||||
* authors only think about the chunk shapes, not the wire format.
|
||||
*/
|
||||
export const sseEvents = (...chunks: ReadonlyArray<unknown>): string =>
|
||||
`${chunks.map(formatChunk).join("")}data: [DONE]\n\n`
|
||||
|
||||
const formatChunk = (chunk: unknown) => `data: ${typeof chunk === "string" ? chunk : JSON.stringify(chunk)}\n\n`
|
||||
|
||||
/**
|
||||
* Build an SSE body from already-serialized strings (used when the chunk shape
|
||||
* itself is part of what's being tested, e.g. malformed chunks).
|
||||
*/
|
||||
export const sseRaw = (...lines: ReadonlyArray<string>): string => lines.map((line) => `${line}\n\n`).join("")
|
||||
Reference in New Issue
Block a user