Identified missing dev script error.
UnderstandAdded dev script to package.json.
Editrunning npm run dev, getting
[coding-agent] npm error Lifecycle script dev failed with error:
[coding-agent] npm error workspace @mariozechner/pi-coding-agent@0.50.7
[coding-agent] npm error location /Users/badlogic/workspaces/pi-mono/packages/coding-agent
[coding-agent] npm error Missing script: "dev"
[coding-agent] npm error
[coding-agent] npm error To see a list of scripts, run:
[coding-agent] npm error npm run --workspace=@mariozechner/pi-coding-agent@0.50.7
[coding-agent] cd packages/coding-agent && npm run dev exited with code 1
The user is running npm run dev and getting an error that the dev script is missing in the coding-agent package. Let me check the package.json to see what scripts are available.
>cat packages/coding-agent/package.json | grep -A 20 '"scripts"'"scripts": {
"clean": "shx rm -rf dist",
"build": "tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js && npm run copy-assets",
"build:binary": "npm run build && bun build --compile ./dist/cli.js --outfile dist/pi && npm run copy-binary-assets",
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
"test": "vitest --run",
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@mariozechner/clipboard": "^0.3.0",
"@mariozechner/jiti": "^2.6.2",
"@mariozechner/pi-agent-core": "^0.50.7",
"@mariozechner/pi-ai": "^0.50.7",
"@mariozechner/pi-tui": "^0.50.7",
"@silvia-odwyer/photon-node": "^0.3.4",
"chalk": "^5.5.0",
"cli-highlight": "^2.1.11",
"diff": "^8.0.2",
"file-type": "^21.1.1",
"glob": "^11.0.3",I see, there's no dev script in the coding-agent package. Let me check the root package.json to see what dev is supposed to do.
>cat package.json | grep -A 30 '"scripts"'"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 . && tsgo --noEmit && cd packages/web-ui && npm run check",
"test": "npm run test --workspaces --if-present",
"version:patch": "npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && 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 && 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 && 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"
},
"engines": {
"node": ">=20.0.0"
},The root npm run dev script expects each workspace to have a dev script, but coding-agent doesn't have one. Let me check what other packages have for their dev script to understand the pattern.
>grep -A 2 '"dev"' packages/ai/package.json packages/agent/package.json packages/tui/package.json packages/mom/package.json packages/web-ui/package.json 2>/dev/nullpackages/ai/package.json: "dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
packages/ai/package.json- "dev:tsc": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
packages/ai/package.json- "test": "vitest --run",
--
packages/agent/package.json: "dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
packages/agent/package.json- "test": "vitest --run",
packages/agent/package.json- "prepublishOnly": "npm run clean && npm run build"
--
packages/tui/package.json: "dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
packages/tui/package.json- "test": "node --test --import tsx test/*.test.ts",
packages/tui/package.json- "prepublishOnly": "npm run clean && npm run build"
--
packages/mom/package.json: "dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
packages/mom/package.json- "prepublishOnly": "npm run clean && npm run build"
packages/mom/package.json- },
--
packages/web-ui/package.json: "dev": "concurrently --names \"build,example\" --prefix-colors \"cyan,green\" \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tailwindcss -i ./src/app.css -o ./dist/app.css --watch\" \"npm run dev --prefix example\"",
packages/web-ui/package.json- "dev:tsc": "concurrently --names \"build\" --prefix-colors \"cyan\" \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tailwindcss -i ./src/app.css -o ./dist/app.css --watch\"",
packages/web-ui/package.json- "check": "biome check --write . && tsc --noEmit && cd example && biome check --write . && tsc --noEmit"I see the pattern. The coding-agent package is missing the dev script. I should add it following the same pattern as the other packages:
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",Let me add it to the coding-agent package.json.
The coding-agent package is missing the dev script. Let me add it:
Now I'll add the dev script following the same pattern as other packages.
Good, the dev script has been added. The script follows the same pattern as other packages like ai, agent, tui, and mom. Now npm run dev should work from the root.
Added the missing dev script to packages/coding-agent/package.json. It now matches the pattern used by other packages: tsgo -p tsconfig.build.json --watch --preserveWatchOutput
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",