agent-orchestrator/packages
i-trytoohard 19d2a34f6a
fix(web): externalize ao-core and better-sqlite3 from Next.js bundle (#1944)
* fix(web): externalize ao-core and better-sqlite3 from Next.js bundle

Fixes #1930.

Next.js bundles @aoagents/ao-core (via transpilePackages) and bakes
import.meta.url as the build machine's absolute path into the output.
At runtime on any other machine (especially Windows), createRequire()
receives a non-existent file:// URL and fails.

Adding @aoagents/ao-core and better-sqlite3 to serverExternalPackages
tells Next.js to not bundle these — they're resolved at runtime from
node_modules, so import.meta.url resolves to the actual install path.

This fixes:
- events-db.ts: createRequire(import.meta.url)("better-sqlite3")
- update-cache.ts: createRequire(fileURLToPath(import.meta.url))
- The Windows ERR_INVALID_ARG_VALUE error in the user report

* fix(web): move ao-core from transpilePackages to serverExternalPackages

Next.js errors when a package is in both lists:
  'transpilePackages' conflicts with 'serverExternalPackages'

Remove @aoagents/ao-core from transpilePackages and keep it only
in serverExternalPackages. This prevents webpack from bundling
ao-core and baking import.meta.url as the build machine's path.
2026-05-20 18:19:28 +05:30
..
ao fix(cli): rebuild better-sqlite3 on install + quieter ABI-mismatch warning (closes #1822) (#1824) 2026-05-18 04:02:26 +05:30
cli feat(notifier): make notifier system robust with manual harness and desktop setup (#1736) 2026-05-19 14:48:40 +05:30
core refactor(agent-claude-code): replace terminal-regex activity detection with hooks (closes #1941) (#1945) 2026-05-20 18:17:35 +05:30
integration-tests feat(notifier): make notifier system robust with manual harness and desktop setup (#1736) 2026-05-19 14:48:40 +05:30
notifier-macos feat(notifier): make notifier system robust with manual harness and desktop setup (#1736) 2026-05-19 14:48:40 +05:30
plugins refactor(agent-claude-code): replace terminal-regex activity detection with hooks (closes #1941) (#1945) 2026-05-20 18:17:35 +05:30
web fix(web): externalize ao-core and better-sqlite3 from Next.js bundle (#1944) 2026-05-20 18:19:28 +05:30