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/
20 lines
643 B
TypeScript
20 lines
643 B
TypeScript
const raw = process.argv[2]
|
|
if (!raw) throw new Error("Missing worker payload")
|
|
|
|
const value = JSON.parse(raw)
|
|
if (!value || typeof value !== "object") {
|
|
throw new Error("Invalid worker payload")
|
|
}
|
|
|
|
const msg = Object.fromEntries(Object.entries(value))
|
|
if (typeof msg.file !== "string" || typeof msg.spec !== "string" || typeof msg.target !== "string") {
|
|
throw new Error("Invalid worker payload")
|
|
}
|
|
if (typeof msg.id !== "string") throw new Error("Invalid worker payload")
|
|
|
|
process.env.OPENCODE_PLUGIN_META_FILE = msg.file
|
|
|
|
const { PluginMeta } = await import("../../src/plugin/meta")
|
|
|
|
await PluginMeta.touch(msg.spec, msg.target, msg.id)
|