Ship a self-contained standalone server with the npm package so
`npm i -g ironclaw` can serve the web UI without runtime `npm install`
or `next build`. This eliminates the fragile first-boot build step
and cuts the cold-start time for the gateway web app.
Changes:
- next.config.ts: enable `output: "standalone"` and set
`outputFileTracingRoot` to the monorepo root so pnpm workspace
deps are traced correctly. Remove the now-unnecessary manual
webpack externals for Node.js built-ins.
- package.json: update `files` to ship only the standalone build
output, static assets, and public dir (instead of the entire
`apps/web/` tree). Add `web:build` and `web:prepack` to the
`prepack` script so the standalone server is built and its
static/public assets are copied into place before publish. Bump
version to 2026.2.10-1.5.
- server-web-app.ts: rewrite the web app lifecycle to prefer the
pre-built standalone `server.js` in production. Add
`resolveStandaloneServerJs`, `hasStandaloneBuild`,
`hasLegacyNextBuild`, and `isInWorkspace` helpers. In dev
workspaces, fall back to building on-the-fly or legacy
`next start`. Export key functions for testability.
- server-web-app.test.ts: add comprehensive unit tests covering
path resolution, standalone/legacy build detection,
ensureWebAppBuilt scenarios (skip, disabled, dev, standalone,
legacy, missing), startWebAppIfEnabled (skip, disabled, null
config, missing dir, standalone start, missing build error,
default port, graceful stop).
- workspace-sidebar.tsx: update sidebar branding to "Ironclaw".
Published as ironclaw@2026.2.10-1.5.
Co-authored-by: Cursor <cursoragent@cursor.com>