diff --git a/apps/cli/ai/runtimes/pi/index.ts b/apps/cli/ai/runtimes/pi/index.ts index 7d0608a3af..a6d847ca65 100644 --- a/apps/cli/ai/runtimes/pi/index.ts +++ b/apps/cli/ai/runtimes/pi/index.ts @@ -43,6 +43,7 @@ import { type SiteRuntime, } from '@studio/common/lib/site-runtime'; import { getAiPayloadsPath, getConfigDirectory } from '@studio/common/lib/well-known-paths'; +import { type TSchema } from 'typebox'; import { buildSystemPrompt } from 'cli/ai/system-prompt'; import { resolveStudioToolDefinitions, withChatArtifactEmission } from 'cli/ai/tools'; import { createAskUserQuestionTool } from 'cli/ai/tools/ask-user-question'; @@ -613,7 +614,10 @@ function buildAgentTools( const skillToolDef = createSkillTool(); const skillTool: AgentToolAny[] = skillToolDef ? [ skillToolDef ] : []; - const renameTool = ( tool: AgentToolAny, name: string ): AgentToolAny => ( { + const renameTool = < S extends TSchema >( + tool: AgentTool< S >, + name: string + ): AgentTool< S > => ( { ...tool, name, label: name, diff --git a/apps/cli/package.json b/apps/cli/package.json index c3ae7e04bb..e23562c7e4 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -24,8 +24,8 @@ "dependencies": { "@anthropic-ai/sdk": "^0.91.1", "@earendil-works/pi-agent-core": "0.81.0", - "@earendil-works/pi-ai": "0.81.0", - "@earendil-works/pi-coding-agent": "0.81.0", + "@earendil-works/pi-ai": "0.82.1", + "@earendil-works/pi-coding-agent": "0.82.1", "@earendil-works/pi-tui": "0.81.0", "@formatjs/intl-localematcher": "^0.5.4", "@inquirer/prompts": "^8.5.2", diff --git a/apps/studio/package.json b/apps/studio/package.json index fedcf2bb2f..796e44aa00 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -60,7 +60,7 @@ "@automattic/generate-password": "^0.2.0", "@automattic/interpolate-components": "^1.2.1", "@base-ui/react": "^1.3.0", - "@earendil-works/pi-coding-agent": "0.81.0", + "@earendil-works/pi-coding-agent": "0.82.1", "@electron-forge/cli": "^7.11.2", "@electron-forge/maker-deb": "^7.11.2", "@electron-forge/maker-dmg": "^7.11.2", diff --git a/package-lock.json b/package-lock.json index 999da79a93..4358ed163f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,8 +56,8 @@ "dependencies": { "@anthropic-ai/sdk": "^0.91.1", "@earendil-works/pi-agent-core": "0.81.0", - "@earendil-works/pi-ai": "0.81.0", - "@earendil-works/pi-coding-agent": "0.81.0", + "@earendil-works/pi-ai": "0.82.1", + "@earendil-works/pi-coding-agent": "0.82.1", "@earendil-works/pi-tui": "0.81.0", "@formatjs/intl-localematcher": "^0.5.4", "@inquirer/prompts": "^8.5.2", @@ -111,6 +111,31 @@ "node": ">=22.0.0" } }, + "apps/cli/node_modules/@earendil-works/pi-ai": { + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.82.1.tgz", + "integrity": "sha512-3WFYRhEp3lQB3444EhPMBcM7zSaEUE3eJgHOR7s4081NLqbw/FsWilIKWXSua0Gv3sRr7m9xMidR3pPDE7jI/A==", + "license": "MIT", + "dependencies": { + "@anthropic-ai/sdk": "0.91.1", + "@aws-sdk/client-bedrock-runtime": "3.1048.0", + "@google/genai": "1.52.0", + "@mistralai/mistralai": "2.2.6", + "@opentelemetry/api": "1.9.0", + "@smithy/node-http-handler": "4.7.3", + "http-proxy-agent": "7.0.2", + "https-proxy-agent": "7.0.6", + "openai": "6.26.0", + "partial-json": "0.1.7", + "typebox": "1.1.38" + }, + "bin": { + "pi-ai": "dist/cli.js" + }, + "engines": { + "node": ">=22.19.0" + } + }, "apps/cli/node_modules/@inquirer/ansi": { "version": "2.0.7", "license": "MIT", @@ -407,6 +432,15 @@ } } }, + "apps/cli/node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + } + }, "apps/cli/node_modules/@types/archiver": { "version": "8.0.0", "dev": true, @@ -416,6 +450,15 @@ "@types/readdir-glob": "*" } }, + "apps/cli/node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "apps/cli/node_modules/chardet": { "version": "2.1.1", "license": "MIT" @@ -433,6 +476,32 @@ "url": "https://paulmillr.com/funding/" } }, + "apps/cli/node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "apps/cli/node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "apps/cli/node_modules/iconv-lite": { "version": "0.7.2", "license": "MIT", @@ -544,7 +613,7 @@ "@automattic/generate-password": "^0.2.0", "@automattic/interpolate-components": "^1.2.1", "@base-ui/react": "^1.3.0", - "@earendil-works/pi-coding-agent": "0.81.0", + "@earendil-works/pi-coding-agent": "0.82.1", "@electron-forge/cli": "^7.11.2", "@electron-forge/maker-deb": "^7.11.2", "@electron-forge/maker-dmg": "^7.11.2", @@ -4153,15 +4222,15 @@ } }, "node_modules/@earendil-works/pi-coding-agent": { - "version": "0.81.0", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-coding-agent/-/pi-coding-agent-0.81.0.tgz", - "integrity": "sha512-2p0Dnx+3fkPLga8M82eg14ZYNLcFLhqxxKyVVfqUSIio9Xx4p7UjvJtopx/6PTeJKmdJl1/xOm/c02AFcJ+l/g==", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-coding-agent/-/pi-coding-agent-0.82.1.tgz", + "integrity": "sha512-zbkAhoIuDPMF3pKuja0ajZabrMWU29FUMV9A/XMXT/XC1yXs5xt6t6t13GogQFsDrDqbFP4DkZQO1w8rWRAzYA==", "hasShrinkwrap": true, "license": "MIT", "dependencies": { - "@earendil-works/pi-agent-core": "^0.81.0", - "@earendil-works/pi-ai": "^0.81.0", - "@earendil-works/pi-tui": "^0.81.0", + "@earendil-works/pi-agent-core": "^0.82.1", + "@earendil-works/pi-ai": "^0.82.1", + "@earendil-works/pi-tui": "^0.82.1", "@silvia-odwyer/photon-node": "0.3.4", "chalk": "5.6.2", "cross-spawn": "7.0.6", @@ -4624,11 +4693,12 @@ } }, "node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-agent-core": { - "version": "0.81.0", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.81.0.tgz", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.82.1.tgz", "license": "MIT", "dependencies": { - "@earendil-works/pi-ai": "^0.81.0", + "@earendil-works/pi-ai": "^0.82.1", + "diff": "8.0.4", "ignore": "7.0.5", "typebox": "1.1.38", "yaml": "2.9.0" @@ -4638,8 +4708,8 @@ } }, "node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-ai": { - "version": "0.81.0", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.81.0.tgz", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.82.1.tgz", "license": "MIT", "dependencies": { "@anthropic-ai/sdk": "0.91.1", @@ -4662,8 +4732,8 @@ } }, "node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-tui": { - "version": "0.81.0", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.81.0.tgz", + "version": "0.82.1", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.82.1.tgz", "license": "MIT", "dependencies": { "get-east-asian-width": "1.6.0", @@ -5742,9 +5812,9 @@ } }, "node_modules/@earendil-works/pi-coding-agent/node_modules/protobufjs": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.4.tgz", - "integrity": "sha512-RJJPTTpvFfHcWLkIa2JFWK4XvtSzS0yEWDmunqHXli1h3JlkbcQZXDZdcWxv+JK3Xsl5/UFDPZ0iGm7DAengYw==", + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.5.tgz", + "integrity": "sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==", "hasInstallScript": true, "license": "BSD-3-Clause", "dependencies": { @@ -31404,7 +31474,7 @@ "zod": "^4.0.0" }, "devDependencies": { - "@earendil-works/pi-coding-agent": "0.81.0", + "@earendil-works/pi-coding-agent": "0.82.1", "@types/lockfile": "^1.0.4", "@types/yauzl": "^2.10.3", "@wp-playground/blueprints": "3.1.43" diff --git a/packages/common/package.json b/packages/common/package.json index 4a94175fa1..d392e9ddf7 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -24,7 +24,7 @@ "zod": "^4.0.0" }, "devDependencies": { - "@earendil-works/pi-coding-agent": "0.81.0", + "@earendil-works/pi-coding-agent": "0.82.1", "@types/lockfile": "^1.0.4", "@types/yauzl": "^2.10.3", "@wp-playground/blueprints": "3.1.43"