import { fileURLToPath } from "node:url"; import { defineConfig } from "vitest/config"; const host = fileURLToPath(new URL("../../../", import.meta.url)); // Vendored compatibility gate: use the real Selesai host, never a mixture of // upstream development dependencies and the fork's coding-agent classes. export default defineConfig({ test: { environment: "node", testTimeout: 30000, env: { PI_OFFLINE: "1" }, exclude: ["**/node_modules/**"], }, resolve: { alias: [ { find: "@earendil-works/pi-coding-agent", replacement: `${host}dist/index.js` }, { find: "@selesai/code", replacement: `${host}dist/index.js` }, { find: /^@earendil-works\/pi-ai\/(.+)$/, replacement: `${host}node_modules/@earendil-works/pi-ai/dist/$1.js`, }, { find: "@earendil-works/pi-ai", replacement: `${host}node_modules/@earendil-works/pi-ai/dist/index.js`, }, { find: "@earendil-works/pi-tui", replacement: `${host}node_modules/@earendil-works/pi-tui/dist/index.js`, }, ], }, });