From fdbce416807eca6f8b2c8bee10005be625891cdb Mon Sep 17 00:00:00 2001 From: JAE Date: Fri, 27 Mar 2026 17:48:22 +0000 Subject: [PATCH] fix: add build:all script - packages must build in dependency order Root cause of all web UI bugs: web-ui depends on jae-ai and jae-agent-core being compiled first. Without their dist/ output, all tool imports (bash, browser, web-search, voice-tts, memory) silently fail, causing the entire app to crash at load time. New scripts: - build:all: builds packages in correct order - build:example: builds all + example app - dev:example: builds all + starts dev server --- package.json | 121 ++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index 34cf08f..dcee600 100644 --- a/package.json +++ b/package.json @@ -1,61 +1,64 @@ { - "name": "jae-monorepo", - "private": true, - "type": "module", - "workspaces": [ - "packages/*", - "packages/web-ui/example", - "packages/coding-agent/examples/extensions/with-deps", - "packages/coding-agent/examples/extensions/custom-provider-anthropic", - "packages/coding-agent/examples/extensions/custom-provider-gitlab-duo", - "packages/coding-agent/examples/extensions/custom-provider-qwen-cli" - ], - "scripts": { - "clean": "npm run clean --workspaces", - "build": "cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build && cd ../mom && npm run build && cd ../web-ui && npm run build && cd ../pods && npm run build", - "dev": "concurrently --names \"ai,agent,coding-agent,mom,web-ui,tui\" --prefix-colors \"cyan,yellow,red,white,green,magenta\" \"cd packages/ai && npm run dev\" \"cd packages/agent && npm run dev\" \"cd packages/coding-agent && npm run dev\" \"cd packages/mom && npm run dev\" \"cd packages/web-ui && npm run dev\" \"cd packages/tui && npm run dev\"", - "dev:tsc": "concurrently --names \"ai,web-ui\" --prefix-colors \"cyan,green\" \"cd packages/ai && npm run dev:tsc\" \"cd packages/web-ui && npm run dev:tsc\"", - "check": "biome check --write --error-on-warnings . && tsgo --noEmit && npm run check:browser-smoke && cd packages/web-ui && npm run check", - "check:browser-smoke": "node scripts/check-browser-smoke.mjs", - "profile:tui": "node scripts/profile-coding-agent-node.mjs --mode tui", - "profile:rpc": "node scripts/profile-coding-agent-node.mjs --mode rpc", - "test": "npm run test --workspaces --if-present", - "version:patch": "npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", - "version:minor": "npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", - "version:major": "npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", - "version:set": "npm version -ws", - "prepublishOnly": "npm run clean && npm run build && npm run check", - "publish": "npm run prepublishOnly && npm publish -ws --access public", - "publish:dry": "npm run prepublishOnly && npm publish -ws --access public --dry-run", - "release:patch": "node scripts/release.mjs patch", - "release:minor": "node scripts/release.mjs minor", - "release:major": "node scripts/release.mjs major", - "prepare": "husky" - }, - "devDependencies": { - "@biomejs/biome": "2.3.5", - "@types/node": "^22.10.5", - "@typescript/native-preview": "7.0.0-dev.20260120.1", - "concurrently": "^9.2.1", - "husky": "^9.1.7", - "tsx": "^4.20.3", - "typescript": "^5.9.2", - "shx": "^0.4.0" - }, - "engines": { - "node": ">=20.0.0" - }, - "version": "0.0.3", - "dependencies": { - "@mariozechner/jiti": "^2.6.5", - "@jaeswift/jae-coding-agent": "^0.30.2", - "get-east-asian-width": "^1.4.0" - }, - "overrides": { - "rimraf": "6.1.2", - "fast-xml-parser": "5.3.8", - "gaxios": { - "rimraf": "6.1.2" - } - } + "name": "jae-monorepo", + "private": true, + "type": "module", + "workspaces": [ + "packages/*", + "packages/web-ui/example", + "packages/coding-agent/examples/extensions/with-deps", + "packages/coding-agent/examples/extensions/custom-provider-anthropic", + "packages/coding-agent/examples/extensions/custom-provider-gitlab-duo", + "packages/coding-agent/examples/extensions/custom-provider-qwen-cli" + ], + "scripts": { + "clean": "npm run clean --workspaces", + "build": "cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../coding-agent && npm run build && cd ../mom && npm run build && cd ../web-ui && npm run build && cd ../pods && npm run build", + "dev": "concurrently --names \"ai,agent,coding-agent,mom,web-ui,tui\" --prefix-colors \"cyan,yellow,red,white,green,magenta\" \"cd packages/ai && npm run dev\" \"cd packages/agent && npm run dev\" \"cd packages/coding-agent && npm run dev\" \"cd packages/mom && npm run dev\" \"cd packages/web-ui && npm run dev\" \"cd packages/tui && npm run dev\"", + "dev:tsc": "concurrently --names \"ai,web-ui\" --prefix-colors \"cyan,green\" \"cd packages/ai && npm run dev:tsc\" \"cd packages/web-ui && npm run dev:tsc\"", + "check": "biome check --write --error-on-warnings . && tsgo --noEmit && npm run check:browser-smoke && cd packages/web-ui && npm run check", + "check:browser-smoke": "node scripts/check-browser-smoke.mjs", + "profile:tui": "node scripts/profile-coding-agent-node.mjs --mode tui", + "profile:rpc": "node scripts/profile-coding-agent-node.mjs --mode rpc", + "test": "npm run test --workspaces --if-present", + "version:patch": "npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", + "version:minor": "npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", + "version:major": "npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install", + "version:set": "npm version -ws", + "prepublishOnly": "npm run clean && npm run build && npm run check", + "publish": "npm run prepublishOnly && npm publish -ws --access public", + "publish:dry": "npm run prepublishOnly && npm publish -ws --access public --dry-run", + "release:patch": "node scripts/release.mjs patch", + "release:minor": "node scripts/release.mjs minor", + "release:major": "node scripts/release.mjs major", + "prepare": "husky", + "build:all": "npm run build -w packages/ai && npm run build -w packages/tui && npm run build -w packages/agent && npm run build -w packages/web-ui", + "build:example": "npm run build:all && cd packages/web-ui/example && npm run build", + "dev:example": "npm run build:all && cd packages/web-ui/example && npm run dev" + }, + "devDependencies": { + "@biomejs/biome": "2.3.5", + "@types/node": "^22.10.5", + "@typescript/native-preview": "7.0.0-dev.20260120.1", + "concurrently": "^9.2.1", + "husky": "^9.1.7", + "tsx": "^4.20.3", + "typescript": "^5.9.2", + "shx": "^0.4.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "version": "0.0.3", + "dependencies": { + "@mariozechner/jiti": "^2.6.5", + "@jaeswift/jae-coding-agent": "^0.30.2", + "get-east-asian-width": "^1.4.0" + }, + "overrides": { + "rimraf": "6.1.2", + "fast-xml-parser": "5.3.8", + "gaxios": { + "rimraf": "6.1.2" + } + } }