diff --git a/package-lock.json b/package-lock.json index 55d69010..83d6e6fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3850,8 +3850,8 @@ "version": "0.9.0", "license": "MIT", "dependencies": { - "@mariozechner/pi-ai": "^0.8.5", - "@mariozechner/pi-tui": "^0.8.5" + "@mariozechner/pi-ai": "^0.9.0", + "@mariozechner/pi-tui": "^0.9.0" }, "devDependencies": { "@types/node": "^24.3.0", @@ -3862,42 +3862,6 @@ "node": ">=20.0.0" } }, - "packages/agent/node_modules/@mariozechner/pi-ai": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-ai/-/pi-ai-0.8.5.tgz", - "integrity": "sha512-13ZYEaS/V5EFoISPyB5oZomSsJSCVhTKUaUeiwXlzBzpbLOaBOfOwQmfQ7hRniE2S0OlQFFp4af1ljMhnrsQzQ==", - "license": "MIT", - "dependencies": { - "@anthropic-ai/sdk": "^0.61.0", - "@google/genai": "^1.30.0", - "@sinclair/typebox": "^0.34.41", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "chalk": "^5.6.2", - "openai": "5.21.0", - "partial-json": "^0.1.7", - "zod-to-json-schema": "^3.24.6" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/agent/node_modules/@mariozechner/pi-tui": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-tui/-/pi-tui-0.8.5.tgz", - "integrity": "sha512-mpwsXuVBTc5Ls1kKBigA5KabpsiqP53NQYshFWayYTwYxQRE7bfXocYd3Glsrv7aCMs7SlgB7LZYVjqzz8e3fQ==", - "license": "MIT", - "dependencies": { - "@types/mime-types": "^2.1.4", - "chalk": "^5.5.0", - "marked": "^15.0.12", - "mime-types": "^3.0.1", - "string-width": "^8.1.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, "packages/agent/node_modules/@types/node": { "version": "24.10.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", @@ -3908,22 +3872,6 @@ "undici-types": "~7.16.0" } }, - "packages/agent/node_modules/string-width": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", - "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "packages/agent/node_modules/undici-types": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", @@ -3977,9 +3925,9 @@ "version": "0.9.0", "license": "MIT", "dependencies": { - "@mariozechner/pi-agent": "^0.8.5", - "@mariozechner/pi-ai": "^0.8.5", - "@mariozechner/pi-tui": "^0.8.5", + "@mariozechner/pi-agent": "^0.9.0", + "@mariozechner/pi-ai": "^0.9.0", + "@mariozechner/pi-tui": "^0.9.0", "chalk": "^5.5.0", "diff": "^8.0.2", "glob": "^11.0.3" @@ -3997,55 +3945,6 @@ "node": ">=20.0.0" } }, - "packages/coding-agent/node_modules/@mariozechner/pi-agent": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-agent/-/pi-agent-0.8.5.tgz", - "integrity": "sha512-HdzmOKf1NRi+edM6DNOpXYCooxTR2n9NhRKlMyDy87fwmK6mGIl99C8+vYS5x/kLrNBKBnfjVH2B2FwftiUthA==", - "license": "MIT", - "dependencies": { - "@mariozechner/pi-ai": "^0.8.5", - "@mariozechner/pi-tui": "^0.8.5" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/coding-agent/node_modules/@mariozechner/pi-ai": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-ai/-/pi-ai-0.8.5.tgz", - "integrity": "sha512-13ZYEaS/V5EFoISPyB5oZomSsJSCVhTKUaUeiwXlzBzpbLOaBOfOwQmfQ7hRniE2S0OlQFFp4af1ljMhnrsQzQ==", - "license": "MIT", - "dependencies": { - "@anthropic-ai/sdk": "^0.61.0", - "@google/genai": "^1.30.0", - "@sinclair/typebox": "^0.34.41", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "chalk": "^5.6.2", - "openai": "5.21.0", - "partial-json": "^0.1.7", - "zod-to-json-schema": "^3.24.6" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/coding-agent/node_modules/@mariozechner/pi-tui": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-tui/-/pi-tui-0.8.5.tgz", - "integrity": "sha512-mpwsXuVBTc5Ls1kKBigA5KabpsiqP53NQYshFWayYTwYxQRE7bfXocYd3Glsrv7aCMs7SlgB7LZYVjqzz8e3fQ==", - "license": "MIT", - "dependencies": { - "@types/mime-types": "^2.1.4", - "chalk": "^5.5.0", - "marked": "^15.0.12", - "mime-types": "^3.0.1", - "string-width": "^8.1.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, "packages/coding-agent/node_modules/@types/node": { "version": "24.10.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", @@ -4084,7 +3983,7 @@ "version": "0.9.0", "license": "MIT", "dependencies": { - "@mariozechner/pi-agent": "^0.8.5", + "@mariozechner/pi-agent": "^0.9.0", "chalk": "^5.5.0" }, "bin": { @@ -4095,71 +3994,6 @@ "node": ">=20.0.0" } }, - "packages/pods/node_modules/@mariozechner/pi-agent": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-agent/-/pi-agent-0.8.5.tgz", - "integrity": "sha512-HdzmOKf1NRi+edM6DNOpXYCooxTR2n9NhRKlMyDy87fwmK6mGIl99C8+vYS5x/kLrNBKBnfjVH2B2FwftiUthA==", - "license": "MIT", - "dependencies": { - "@mariozechner/pi-ai": "^0.8.5", - "@mariozechner/pi-tui": "^0.8.5" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/pods/node_modules/@mariozechner/pi-ai": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-ai/-/pi-ai-0.8.5.tgz", - "integrity": "sha512-13ZYEaS/V5EFoISPyB5oZomSsJSCVhTKUaUeiwXlzBzpbLOaBOfOwQmfQ7hRniE2S0OlQFFp4af1ljMhnrsQzQ==", - "license": "MIT", - "dependencies": { - "@anthropic-ai/sdk": "^0.61.0", - "@google/genai": "^1.30.0", - "@sinclair/typebox": "^0.34.41", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "chalk": "^5.6.2", - "openai": "5.21.0", - "partial-json": "^0.1.7", - "zod-to-json-schema": "^3.24.6" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/pods/node_modules/@mariozechner/pi-tui": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-tui/-/pi-tui-0.8.5.tgz", - "integrity": "sha512-mpwsXuVBTc5Ls1kKBigA5KabpsiqP53NQYshFWayYTwYxQRE7bfXocYd3Glsrv7aCMs7SlgB7LZYVjqzz8e3fQ==", - "license": "MIT", - "dependencies": { - "@types/mime-types": "^2.1.4", - "chalk": "^5.5.0", - "marked": "^15.0.12", - "mime-types": "^3.0.1", - "string-width": "^8.1.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/pods/node_modules/string-width": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", - "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "packages/proxy": { "name": "@mariozechner/pi-proxy", "version": "0.9.0", @@ -4217,8 +4051,8 @@ "license": "MIT", "dependencies": { "@lmstudio/sdk": "^1.5.0", - "@mariozechner/pi-ai": "^0.8.5", - "@mariozechner/pi-tui": "^0.8.5", + "@mariozechner/pi-ai": "^0.9.0", + "@mariozechner/pi-tui": "^0.9.0", "docx-preview": "^0.3.7", "jszip": "^3.10.1", "lucide": "^0.544.0", @@ -4236,58 +4070,6 @@ "@mariozechner/mini-lit": "^0.2.0", "lit": "^3.3.1" } - }, - "packages/web-ui/node_modules/@mariozechner/pi-ai": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-ai/-/pi-ai-0.8.5.tgz", - "integrity": "sha512-13ZYEaS/V5EFoISPyB5oZomSsJSCVhTKUaUeiwXlzBzpbLOaBOfOwQmfQ7hRniE2S0OlQFFp4af1ljMhnrsQzQ==", - "license": "MIT", - "dependencies": { - "@anthropic-ai/sdk": "^0.61.0", - "@google/genai": "^1.30.0", - "@sinclair/typebox": "^0.34.41", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "chalk": "^5.6.2", - "openai": "5.21.0", - "partial-json": "^0.1.7", - "zod-to-json-schema": "^3.24.6" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/web-ui/node_modules/@mariozechner/pi-tui": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@mariozechner/pi-tui/-/pi-tui-0.8.5.tgz", - "integrity": "sha512-mpwsXuVBTc5Ls1kKBigA5KabpsiqP53NQYshFWayYTwYxQRE7bfXocYd3Glsrv7aCMs7SlgB7LZYVjqzz8e3fQ==", - "license": "MIT", - "dependencies": { - "@types/mime-types": "^2.1.4", - "chalk": "^5.5.0", - "marked": "^15.0.12", - "mime-types": "^3.0.1", - "string-width": "^8.1.0" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "packages/web-ui/node_modules/string-width": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", - "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/packages/coding-agent/src/main.ts b/packages/coding-agent/src/main.ts index d7376197..dbd9be63 100644 --- a/packages/coding-agent/src/main.ts +++ b/packages/coding-agent/src/main.ts @@ -745,7 +745,9 @@ export async function main(args: string[]) { // Having initial messages doesn't make it non-interactive anymore const isInteractive = !parsed.print && parsed.mode === undefined; const mode = parsed.mode || "text"; - const shouldPrintMessages = isInteractive || mode === "text"; + // Only print informational messages in interactive mode + // Non-interactive modes (-p, --mode json, --mode rpc) should be silent except for output + const shouldPrintMessages = isInteractive; // Non-interactive mode: fail early if no model available if (!isInteractive && !initialModel) {