426e9eeabd
Benchmark Bridge Tests / benchmark (bunx @biomejs/biome check packages/lifeops-bench/src, benchmark-lint) (push) Waiting to run
Benchmark Bridge Tests / benchmark (bunx vitest run --config packages/lifeops-bench/vitest.config.ts --root packages/lifeops-bench --passWithNoTests, benchmark-tests) (push) Waiting to run
Build Agent Image / build-and-push (push) Waiting to run
Chat shell gestures / Chat shell gesture + parity e2e (push) Waiting to run
Cloud Gateway Discord / Test (push) Waiting to run
Cloud Gateway Webhook / Test (push) Waiting to run
Cloud Tests / lint-and-types (push) Waiting to run
Cloud Tests / unit-tests (push) Waiting to run
Cloud Tests / integration-tests (push) Waiting to run
Cloud Tests / e2e-tests (push) Blocked by required conditions
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Deploy Apps Worker (Product 2) / Determine environment (push) Waiting to run
Deploy Apps Worker (Product 2) / Deploy apps worker to apps-control host (${{ needs.determine-env.outputs.environment }}) (push) Blocked by required conditions
Deploy Eliza Provisioning Worker / Determine environment (push) Waiting to run
Deploy Eliza Provisioning Worker / Deploy worker to Hetzner host (${{ needs.determine-env.outputs.environment }} @ ${{ needs.determine-env.outputs.deployment_sha }}) (push) Blocked by required conditions
Dev Smoke / Classify changed paths (push) Waiting to run
Dev Smoke / bun run dev onboarding chat (push) Blocked by required conditions
Dev Smoke / Vite HMR dependency-level smoke (push) Blocked by required conditions
Electrobun Submodule Guard / electrobun gitlink is fetchable (push) Waiting to run
Publish @elizaos/example-code / check_npm (push) Waiting to run
Publish @elizaos/example-code / publish_npm (push) Blocked by required conditions
Publish @elizaos/plugin-elizacloud / verify_version (push) Waiting to run
Publish @elizaos/plugin-elizacloud / publish_npm (push) Blocked by required conditions
Sandbox Live Smoke / Sandbox live smoke (push) Waiting to run
Snap Build & Test / Build Snap (amd64) (push) Waiting to run
Snap Build & Test / Build Snap (arm64) (push) Waiting to run
supply-chain / sbom (push) Waiting to run
supply-chain / vulnerability-scan (push) Waiting to run
Build, Push & Deploy to Phala Cloud / build-and-push (push) Waiting to run
Test Packaging / Validate Packaging Configs (push) Waiting to run
Test Packaging / PyPI on Python ${{ matrix.python }} (push) Waiting to run
Test Packaging / Pack & Test JS Tarballs (push) Waiting to run
Test Packaging / elizaos CLI global-install smoke (node + bun) (push) Waiting to run
UI Fixture E2E / ui-fixture-e2e (push) Waiting to run
UI Fixture E2E / fixture-e2e (push) Waiting to run
UI Story Gate / story-gate (push) Waiting to run
vault-ci / test (macos-latest) (push) Waiting to run
vault-ci / test (ubuntu-latest) (push) Waiting to run
vault-ci / test (windows-latest) (push) Waiting to run
vault-ci / app-core wiring tests (push) Waiting to run
verify-patches / verify patches/CHECKSUMS.sha256 (push) Waiting to run
Voice Benchmark Smoke / voice-emotion fixture smoke (push) Waiting to run
Voice Benchmark Smoke / voiceagentbench fixture smoke (push) Waiting to run
Voice Benchmark Smoke / voicebench-quality unit smoke (push) Waiting to run
Voice Benchmark Smoke / voicebench TypeScript unit (no audio) (push) Waiting to run
Voice Benchmark Smoke / voice bench smoke summary (push) Blocked by required conditions
Windows CI / windows ([bun run --cwd packages/app-core test bun run --cwd packages/elizaos test bun run --cwd packages/cloud/shared test], app-and-cli) (push) Waiting to run
Windows CI / windows ([bun run --cwd packages/scenario-runner test bun run --cwd packages/vault test bun run --cwd packages/security test bun run --cwd plugins/plugin-coding-tools test], framework-packages) (push) Waiting to run
Windows CI / windows ([bun run --cwd plugins/plugin-elizacloud test bun run --cwd plugins/plugin-discord test bun run --cwd plugins/plugin-anthropic test bun run --cwd plugins/plugin-openai test bun run --cwd plugins/plugin-app-control test bun run --cwd plugins/pl… (push) Waiting to run
Windows CI / windows ([node packages/scripts/run-turbo.mjs run build --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/agent --concurrency=4 node packages/scripts/run-bash-linux-only.mjs scripts/verify-riscv64-buildpaths.sh node packages/scripts/run… (push) Waiting to run
Windows CI / windows ([node packages/scripts/run-turbo.mjs run typecheck --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/cloud-shared --concurrency=4 bun run --cwd packages/core test bun run --cwd packages/shared test], core-runtime, 75) (push) Waiting to run
Test Packaging / Build & Test PyPI Package (push) Waiting to run
Voice Workbench / headless workbench (mocked backends) (push) Has been cancelled
Voice Workbench / real acoustic lane (nightly, provisioned only) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / lint-and-format (push) Has been cancelled
ci / build (push) Has been cancelled
ci / dev-startup (push) Has been cancelled
gitleaks / gitleaks (push) Has been cancelled
Markdown Links / Relative Markdown Links (push) Has been cancelled
Quality (Extended) / Homepage Build (PR smoke) (push) Has been cancelled
Quality (Extended) / Comment-only diff guard (push) Has been cancelled
Quality (Extended) / Format + Type Safety Ratchet (push) Has been cancelled
Quality (Extended) / Develop Gate (secret scan + UI determinism) (push) Has been cancelled
Quality (Extended) / Develop Gate (lint) (push) Has been cancelled
278 lines
8.3 KiB
TypeScript
278 lines
8.3 KiB
TypeScript
/**
|
|
* Vitest config for this plugin's unit tests. Aliases React and every
|
|
* `@elizaos/plugin-*` / `@elizaos/app-core` / `@elizaos/core` / `@elizaos/shared`
|
|
* import to source (or an in-package test shim) so tests run against a
|
|
* pre-built dist-less workspace.
|
|
*/
|
|
import { createRequire } from "node:module";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
const repoRoot = path.resolve(here, "../..");
|
|
const require = createRequire(import.meta.url);
|
|
|
|
// Alias all @elizaos/plugin-* packages that agent/src imports to their source
|
|
// so vitest can resolve them without a pre-built dist. Anchors the find
|
|
// pattern to the exact module so subpath imports like
|
|
// `@elizaos/plugin-local-inference/runtime` resolve via the package's exports
|
|
// map (or the explicit subpath aliases below) instead of being rewritten to
|
|
// `<src>/runtime`, which yields ENOTDIR when <src> points to a single file.
|
|
function pluginAlias(name: string, srcPath?: string) {
|
|
const src = srcPath ?? path.join(repoRoot, `plugins/${name}/src/index.ts`);
|
|
return { find: new RegExp(`^@elizaos/${name}$`), replacement: src };
|
|
}
|
|
|
|
export default defineConfig({
|
|
root: here,
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: /^react$/,
|
|
replacement: path.dirname(require.resolve("react/package.json")),
|
|
},
|
|
{
|
|
find: /^react\/jsx-runtime$/,
|
|
replacement: require.resolve("react/jsx-runtime"),
|
|
},
|
|
{
|
|
find: /^react-dom$/,
|
|
replacement: path.dirname(require.resolve("react-dom/package.json")),
|
|
},
|
|
{
|
|
find: /^react-dom\/client$/,
|
|
replacement: require.resolve("react-dom/client"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/ui$/,
|
|
replacement: path.join(repoRoot, "packages/ui/src/browser.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/ui\/agent-surface$/,
|
|
replacement: path.join(
|
|
repoRoot,
|
|
"packages/ui/src/agent-surface/index.ts",
|
|
),
|
|
},
|
|
{
|
|
find: /^@elizaos\/ui\/events$/,
|
|
replacement: path.join(repoRoot, "packages/ui/src/events/index.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/shared\/local-inference$/,
|
|
replacement: path.join(
|
|
repoRoot,
|
|
"packages/shared/src/local-inference/index.ts",
|
|
),
|
|
},
|
|
{
|
|
find: /^@elizaos\/app-core$/,
|
|
replacement: path.join(here, "__tests__/app-core-shim.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/ui\/spatial$/,
|
|
replacement: path.join(repoRoot, "packages/ui/src/spatial/index.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/app-core\/registry$/,
|
|
replacement: path.join(
|
|
repoRoot,
|
|
"packages/app-core/src/registry/index.ts",
|
|
),
|
|
},
|
|
{
|
|
find: /^@elizaos\/app-core\/(.+)$/,
|
|
replacement: path.join(repoRoot, "packages/app-core/src/$1.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/core$/,
|
|
replacement: path.join(repoRoot, "packages/core/src/index.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/shared$/,
|
|
replacement: path.join(repoRoot, "packages/shared/src/index.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/ui\/spatial$/,
|
|
replacement: path.join(repoRoot, "packages/ui/src/spatial/index.ts"),
|
|
},
|
|
// All plugins in plugins/ that have no pre-built dist — point vitest at
|
|
// source so it can resolve without built artifacts.
|
|
pluginAlias("plugin-agent-orchestrator"),
|
|
pluginAlias("plugin-agent-skills"),
|
|
pluginAlias(
|
|
"plugin-anthropic",
|
|
path.join(repoRoot, "plugins/plugin-anthropic/index.ts"),
|
|
),
|
|
pluginAlias("plugin-aosp-local-inference"),
|
|
pluginAlias("plugin-app-control"),
|
|
pluginAlias("plugin-background-runner"),
|
|
pluginAlias("plugin-bluebubbles"),
|
|
pluginAlias(
|
|
"plugin-bluesky",
|
|
path.join(repoRoot, "plugins/plugin-bluesky/index.ts"),
|
|
),
|
|
pluginAlias("plugin-browser"),
|
|
pluginAlias("plugin-calendly"),
|
|
pluginAlias("plugin-capacitor-bridge"),
|
|
pluginAlias("plugin-cli"),
|
|
pluginAlias(
|
|
"plugin-codex-cli",
|
|
path.join(repoRoot, "plugins/plugin-codex-cli/index.ts"),
|
|
),
|
|
pluginAlias("plugin-coding-tools"),
|
|
pluginAlias("plugin-commands"),
|
|
pluginAlias("plugin-computeruse"),
|
|
pluginAlias("plugin-native-filesystem"),
|
|
pluginAlias(
|
|
"plugin-discord",
|
|
path.join(repoRoot, "plugins/plugin-discord/index.ts"),
|
|
),
|
|
pluginAlias("plugin-discord-local"),
|
|
pluginAlias("plugin-edge-tts"),
|
|
pluginAlias("plugin-elevenlabs"),
|
|
pluginAlias("plugin-elizacloud"),
|
|
pluginAlias(
|
|
"plugin-farcaster",
|
|
path.join(repoRoot, "plugins/plugin-farcaster/index.ts"),
|
|
),
|
|
pluginAlias("plugin-feishu"),
|
|
pluginAlias("plugin-form"),
|
|
pluginAlias("plugin-github"),
|
|
pluginAlias("plugin-google"),
|
|
pluginAlias("plugin-google-chat"),
|
|
pluginAlias(
|
|
"plugin-google-genai",
|
|
path.join(repoRoot, "plugins/plugin-google-genai/index.ts"),
|
|
),
|
|
pluginAlias(
|
|
"plugin-groq",
|
|
path.join(repoRoot, "plugins/plugin-groq/index.ts"),
|
|
),
|
|
pluginAlias("plugin-health"),
|
|
// @elizaos/ui's DynamicViewLoader statically imports this plugin-health
|
|
// subpath; the keyless lane has no built plugin-health dist, so anchor the
|
|
// exact subpath to source (the barrel alias above only matches the bare
|
|
// specifier). Matches plugin-contacts/phone/wallet-ui/facewear.
|
|
{
|
|
find: /^@elizaos\/plugin-health\/screen-time\/mobile-signal-setup$/,
|
|
replacement: path.join(
|
|
repoRoot,
|
|
"plugins/plugin-health/src/screen-time/mobile-signal-setup.ts",
|
|
),
|
|
},
|
|
pluginAlias("plugin-imessage"),
|
|
pluginAlias(
|
|
"plugin-inmemorydb",
|
|
path.join(repoRoot, "plugins/plugin-inmemorydb/index.ts"),
|
|
),
|
|
pluginAlias("plugin-instagram"),
|
|
pluginAlias("plugin-line"),
|
|
pluginAlias("plugin-linear"),
|
|
pluginAlias(
|
|
"plugin-lmstudio",
|
|
path.join(repoRoot, "plugins/plugin-lmstudio/index.ts"),
|
|
),
|
|
pluginAlias(
|
|
"plugin-local-ai",
|
|
path.join(repoRoot, "plugins/plugin-local-ai/index.ts"),
|
|
),
|
|
pluginAlias("plugin-local-inference"),
|
|
// plugin-local-inference exposes subpath exports (`/runtime`, `/routes`,
|
|
// `/services`) consumed via `@elizaos/app-core`; alias each to source so
|
|
// vitest can resolve them without a built dist.
|
|
{
|
|
find: /^@elizaos\/plugin-local-inference\/runtime$/,
|
|
replacement: path.join(
|
|
repoRoot,
|
|
"plugins/plugin-local-inference/src/runtime/index.ts",
|
|
),
|
|
},
|
|
{
|
|
find: /^@elizaos\/plugin-local-inference\/routes$/,
|
|
replacement: path.join(
|
|
repoRoot,
|
|
"plugins/plugin-local-inference/src/routes/index.ts",
|
|
),
|
|
},
|
|
{
|
|
find: /^@elizaos\/plugin-local-inference\/services$/,
|
|
replacement: path.join(
|
|
repoRoot,
|
|
"plugins/plugin-local-inference/src/services/index.ts",
|
|
),
|
|
},
|
|
pluginAlias("plugin-local-storage"),
|
|
pluginAlias(
|
|
"plugin-localdb",
|
|
path.join(repoRoot, "plugins/plugin-localdb/index.ts"),
|
|
),
|
|
pluginAlias("plugin-matrix"),
|
|
pluginAlias("plugin-mcp"),
|
|
pluginAlias("plugin-music"),
|
|
pluginAlias("plugin-ngrok"),
|
|
pluginAlias("plugin-nostr"),
|
|
pluginAlias(
|
|
"plugin-ollama",
|
|
path.join(repoRoot, "plugins/plugin-ollama/index.ts"),
|
|
),
|
|
pluginAlias(
|
|
"plugin-openai",
|
|
path.join(repoRoot, "plugins/plugin-openai/index.ts"),
|
|
),
|
|
pluginAlias(
|
|
"plugin-openrouter",
|
|
path.join(repoRoot, "plugins/plugin-openrouter/index.ts"),
|
|
),
|
|
pluginAlias(
|
|
"plugin-pdf",
|
|
path.join(repoRoot, "plugins/plugin-pdf/index.ts"),
|
|
),
|
|
pluginAlias("plugin-registry"),
|
|
pluginAlias(
|
|
"plugin-shell",
|
|
path.join(repoRoot, "plugins/plugin-shell/index.ts"),
|
|
),
|
|
pluginAlias("plugin-shopify"),
|
|
pluginAlias("plugin-signal"),
|
|
pluginAlias("plugin-slack"),
|
|
pluginAlias("plugin-sql"),
|
|
pluginAlias("plugin-streaming"),
|
|
pluginAlias("plugin-suno"),
|
|
pluginAlias("plugin-tailscale"),
|
|
pluginAlias("plugin-tee"),
|
|
pluginAlias("plugin-telegram"),
|
|
pluginAlias("plugin-todos"),
|
|
pluginAlias("plugin-tunnel"),
|
|
pluginAlias("plugin-twitch"),
|
|
pluginAlias("plugin-video"),
|
|
pluginAlias("plugin-vision"),
|
|
pluginAlias("plugin-wallet"),
|
|
pluginAlias("plugin-web-search"),
|
|
pluginAlias("plugin-wechat"),
|
|
pluginAlias("plugin-whatsapp"),
|
|
pluginAlias("plugin-workflow"),
|
|
pluginAlias("plugin-x"),
|
|
pluginAlias("plugin-x402"),
|
|
pluginAlias(
|
|
"plugin-xai",
|
|
path.join(repoRoot, "plugins/plugin-xai/index.ts"),
|
|
),
|
|
pluginAlias(
|
|
"plugin-zai",
|
|
path.join(repoRoot, "plugins/plugin-zai/index.ts"),
|
|
),
|
|
],
|
|
},
|
|
test: {
|
|
environment: "node",
|
|
include: [
|
|
"src/**/*.test.ts",
|
|
"src/**/*.test.tsx",
|
|
"__tests__/**/*.test.ts",
|
|
],
|
|
exclude: ["dist/**", "node_modules/**"],
|
|
},
|
|
});
|