Release v0.9.2

This commit is contained in:
Mario Zechner 2025-11-24 19:32:55 +01:00
parent 68ca83441b
commit 52325adb97
11 changed files with 80 additions and 58 deletions

14
package-lock.json generated
View file

@ -3847,7 +3847,7 @@
},
"packages/agent": {
"name": "@mariozechner/pi-agent-core",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-ai": "^0.9.1",
@ -3881,7 +3881,7 @@
},
"packages/ai": {
"name": "@mariozechner/pi-ai",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.61.0",
@ -3922,7 +3922,7 @@
},
"packages/coding-agent": {
"name": "@mariozechner/pi-coding-agent",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-agent-core": "^0.9.1",
@ -3964,7 +3964,7 @@
},
"packages/pods": {
"name": "@mariozechner/pi",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-agent-core": "^0.9.1",
@ -3980,7 +3980,7 @@
},
"packages/proxy": {
"name": "@mariozechner/pi-proxy",
"version": "0.9.1",
"version": "0.9.2",
"dependencies": {
"@hono/node-server": "^1.14.0",
"hono": "^4.6.16"
@ -3996,7 +3996,7 @@
},
"packages/tui": {
"name": "@mariozechner/pi-tui",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"dependencies": {
"@types/mime-types": "^2.1.4",
@ -4031,7 +4031,7 @@
},
"packages/web-ui": {
"name": "@mariozechner/pi-web-ui",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"dependencies": {
"@lmstudio/sdk": "^1.5.0",

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-agent-core",
"version": "0.9.1",
"version": "0.9.2",
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
"type": "module",
"main": "./dist/index.js",
@ -18,8 +18,8 @@
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@mariozechner/pi-ai": "^0.9.1",
"@mariozechner/pi-tui": "^0.9.1"
"@mariozechner/pi-ai": "^0.9.2",
"@mariozechner/pi-tui": "^0.9.2"
},
"keywords": [
"ai",

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-ai",
"version": "0.9.1",
"version": "0.9.2",
"description": "Unified LLM API with automatic model discovery and provider configuration",
"type": "module",
"main": "./dist/index.js",

View file

@ -5085,23 +5085,6 @@ export const MODELS = {
contextWindow: 128000,
maxTokens: 16384,
} satisfies Model<"openai-completions">,
"meta-llama/llama-3.1-70b-instruct": {
id: "meta-llama/llama-3.1-70b-instruct",
name: "Meta: Llama 3.1 70B Instruct",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 0.39999999999999997,
output: 0.39999999999999997,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"meta-llama/llama-3.1-8b-instruct": {
id: "meta-llama/llama-3.1-8b-instruct",
name: "Meta: Llama 3.1 8B Instruct",
@ -5136,6 +5119,23 @@ export const MODELS = {
contextWindow: 130815,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"meta-llama/llama-3.1-70b-instruct": {
id: "meta-llama/llama-3.1-70b-instruct",
name: "Meta: Llama 3.1 70B Instruct",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 0.39999999999999997,
output: 0.39999999999999997,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"mistralai/mistral-nemo": {
id: "mistralai/mistral-nemo",
name: "Mistral: Mistral Nemo",
@ -5442,23 +5442,6 @@ export const MODELS = {
contextWindow: 128000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"openai/gpt-4-turbo-preview": {
id: "openai/gpt-4-turbo-preview",
name: "OpenAI: GPT-4 Turbo Preview",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 10,
output: 30,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 128000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"openai/gpt-3.5-turbo-0613": {
id: "openai/gpt-3.5-turbo-0613",
name: "OpenAI: GPT-3.5 Turbo (older v0613)",
@ -5476,6 +5459,23 @@ export const MODELS = {
contextWindow: 4095,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"openai/gpt-4-turbo-preview": {
id: "openai/gpt-4-turbo-preview",
name: "OpenAI: GPT-4 Turbo Preview",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 10,
output: 30,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 128000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"mistralai/mistral-small": {
id: "mistralai/mistral-small",
name: "Mistral Small",

View file

@ -1,5 +1,11 @@
# Changelog
## [0.9.2] - 2025-11-24
### Fixed
- **Edit Tool Dollar Sign Bug**: Fixed critical bug in the `edit` tool where `String.replace()` was interpreting `$` as a special replacement pattern (e.g., `$$`, `$&`, `$'`). When trying to insert `$` into code (like adding a dollar sign to a template literal), the replacement would silently fail and produce unchanged content, but the tool would incorrectly report success. Now uses `indexOf` + `substring` for raw string replacement without special character interpretation. Also added verification that content actually changed, rejecting with a clear error if the replacement produces identical content. ([#53](https://github.com/badlogic/pi-mono/issues/53))
## [0.9.0] - 2025-11-21
### Added

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-coding-agent",
"version": "0.9.1",
"version": "0.9.2",
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
"type": "module",
"bin": {
@ -22,9 +22,9 @@
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@mariozechner/pi-agent-core": "^0.9.1",
"@mariozechner/pi-ai": "^0.9.1",
"@mariozechner/pi-tui": "^0.9.1",
"@mariozechner/pi-agent-core": "^0.9.2",
"@mariozechner/pi-ai": "^0.9.2",
"@mariozechner/pi-tui": "^0.9.2",
"chalk": "^5.5.0",
"diff": "^8.0.2",
"glob": "^11.0.3"

View file

@ -213,8 +213,24 @@ export const editTool: AgentTool<typeof editSchema> = {
return;
}
// Perform replacement
const newContent = content.replace(oldText, newText);
// Perform replacement using indexOf + substring (raw string replace, no special character interpretation)
// String.replace() interprets $ in the replacement string, so we do manual replacement
const index = content.indexOf(oldText);
const newContent = content.substring(0, index) + newText + content.substring(index + oldText.length);
// Verify the replacement actually changed something
if (content === newContent) {
if (signal) {
signal.removeEventListener("abort", onAbort);
}
reject(
new Error(
`No changes made to ${path}. The replacement produced identical content. This might indicate an issue with special characters or the text not existing as expected.`,
),
);
return;
}
await writeFile(absolutePath, newContent, "utf-8");
// Check if aborted after writing

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi",
"version": "0.9.1",
"version": "0.9.2",
"description": "CLI tool for managing vLLM deployments on GPU pods",
"type": "module",
"bin": {
@ -34,7 +34,7 @@
"node": ">=20.0.0"
},
"dependencies": {
"@mariozechner/pi-agent-core": "^0.9.1",
"@mariozechner/pi-agent-core": "^0.9.2",
"chalk": "^5.5.0"
},
"devDependencies": {}

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-proxy",
"version": "0.9.1",
"version": "0.9.2",
"type": "module",
"description": "CORS and authentication proxy for pi-ai",
"main": "dist/index.js",

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-tui",
"version": "0.9.1",
"version": "0.9.2",
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
"type": "module",
"main": "dist/index.js",

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-web-ui",
"version": "0.9.1",
"version": "0.9.2",
"description": "Reusable web UI components for AI chat interfaces powered by @mariozechner/pi-ai",
"type": "module",
"main": "dist/index.js",
@ -18,8 +18,8 @@
},
"dependencies": {
"@lmstudio/sdk": "^1.5.0",
"@mariozechner/pi-ai": "^0.9.1",
"@mariozechner/pi-tui": "^0.9.1",
"@mariozechner/pi-ai": "^0.9.2",
"@mariozechner/pi-tui": "^0.9.2",
"docx-preview": "^0.3.7",
"jszip": "^3.10.1",
"lucide": "^0.544.0",