// Local vitest config scoped to THIS example only, a convenience for iterating // on the agent-observatory gate in isolation. It mirrors the root config's // `@openprose/reactor` → prebuilt-dist aliases (the example dir has no local // node_modules), and includes BOTH the deterministic offline gate and the // key-gated live test so a run can confirm the live body passing-skips // offline. The shared root gate excludes `*.live.test.ts`; this local config // keeps them in scope on purpose. // // REACTOR_OFFLINE=1 npx vitest run \ // --config tests/open-prose/examples/agent-observatory/vitest.local.config.ts import { fileURLToPath } from "node:url"; import { defineConfig } from "vitest/config"; const reactorDist = (sub: string) => fileURLToPath( new URL(`../../../../packages/reactor/dist/${sub}`, import.meta.url), ); export default defineConfig({ resolve: { alias: [ { find: "@openprose/reactor/agents", replacement: reactorDist("agents/index.js"), }, { find: "@openprose/reactor/adapters", replacement: reactorDist("adapters/index.js"), }, { find: "@openprose/reactor/run/types", replacement: reactorDist("run/types.js"), }, { find: "@openprose/reactor/run", replacement: reactorDist("run/index.js"), }, { find: "@openprose/reactor/internals", replacement: reactorDist("internals/index.js"), }, { find: "@openprose/reactor", replacement: reactorDist("index.js") }, ], }, test: { environment: "node", include: [ fileURLToPath(new URL("./agent-observatory.test.ts", import.meta.url)), fileURLToPath( new URL("./agent-observatory.live.test.ts", import.meta.url), ), ], exclude: ["**/node_modules/**"], }, });