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/
15 lines
513 B
TypeScript
15 lines
513 B
TypeScript
import path from "path"
|
|
import { fileURLToPath } from "url"
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = path.dirname(__filename)
|
|
const dir = path.resolve(__dirname, "..")
|
|
|
|
process.chdir(dir)
|
|
|
|
const modelsUrl = process.env.OPENCODE_MODELS_URL || "https://models.dev"
|
|
export const modelsData = process.env.MODELS_DEV_API_JSON
|
|
? await Bun.file(process.env.MODELS_DEV_API_JSON).text()
|
|
: await fetch(`${modelsUrl}/api.json`).then((x) => x.text())
|
|
console.log("Loaded models.dev snapshot")
|