Release v0.18.6

This commit is contained in:
Mario Zechner 2025-12-12 10:53:53 +01:00
parent e26058a21c
commit dba2674681
13 changed files with 57 additions and 45 deletions

40
package-lock.json generated
View file

@ -6538,11 +6538,11 @@
}, },
"packages/agent": { "packages/agent": {
"name": "@mariozechner/pi-agent-core", "name": "@mariozechner/pi-agent-core",
"version": "0.18.5", "version": "0.18.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mariozechner/pi-ai": "^0.18.5", "@mariozechner/pi-ai": "^0.18.6",
"@mariozechner/pi-tui": "^0.18.5" "@mariozechner/pi-tui": "^0.18.6"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^24.3.0", "@types/node": "^24.3.0",
@ -6572,7 +6572,7 @@
}, },
"packages/ai": { "packages/ai": {
"name": "@mariozechner/pi-ai", "name": "@mariozechner/pi-ai",
"version": "0.18.5", "version": "0.18.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@anthropic-ai/sdk": "0.71.2", "@anthropic-ai/sdk": "0.71.2",
@ -6614,12 +6614,12 @@
}, },
"packages/coding-agent": { "packages/coding-agent": {
"name": "@mariozechner/pi-coding-agent", "name": "@mariozechner/pi-coding-agent",
"version": "0.18.5", "version": "0.18.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mariozechner/pi-agent-core": "^0.18.5", "@mariozechner/pi-agent-core": "^0.18.6",
"@mariozechner/pi-ai": "^0.18.5", "@mariozechner/pi-ai": "^0.18.6",
"@mariozechner/pi-tui": "^0.18.5", "@mariozechner/pi-tui": "^0.18.6",
"chalk": "^5.5.0", "chalk": "^5.5.0",
"diff": "^8.0.2", "diff": "^8.0.2",
"glob": "^11.0.3", "glob": "^11.0.3",
@ -6657,13 +6657,13 @@
}, },
"packages/mom": { "packages/mom": {
"name": "@mariozechner/pi-mom", "name": "@mariozechner/pi-mom",
"version": "0.18.5", "version": "0.18.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@anthropic-ai/sandbox-runtime": "^0.0.16", "@anthropic-ai/sandbox-runtime": "^0.0.16",
"@mariozechner/pi-agent-core": "^0.18.5", "@mariozechner/pi-agent-core": "^0.18.6",
"@mariozechner/pi-ai": "^0.18.5", "@mariozechner/pi-ai": "^0.18.6",
"@mariozechner/pi-coding-agent": "^0.18.5", "@mariozechner/pi-coding-agent": "^0.18.6",
"@sinclair/typebox": "^0.34.0", "@sinclair/typebox": "^0.34.0",
"@slack/socket-mode": "^2.0.0", "@slack/socket-mode": "^2.0.0",
"@slack/web-api": "^7.0.0", "@slack/web-api": "^7.0.0",
@ -6701,10 +6701,10 @@
}, },
"packages/pods": { "packages/pods": {
"name": "@mariozechner/pi", "name": "@mariozechner/pi",
"version": "0.18.5", "version": "0.18.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mariozechner/pi-agent-core": "^0.18.5", "@mariozechner/pi-agent-core": "^0.18.6",
"chalk": "^5.5.0" "chalk": "^5.5.0"
}, },
"bin": { "bin": {
@ -6717,7 +6717,7 @@
}, },
"packages/proxy": { "packages/proxy": {
"name": "@mariozechner/pi-proxy", "name": "@mariozechner/pi-proxy",
"version": "0.18.5", "version": "0.18.6",
"dependencies": { "dependencies": {
"@hono/node-server": "^1.14.0", "@hono/node-server": "^1.14.0",
"hono": "^4.6.16" "hono": "^4.6.16"
@ -6733,7 +6733,7 @@
}, },
"packages/tui": { "packages/tui": {
"name": "@mariozechner/pi-tui", "name": "@mariozechner/pi-tui",
"version": "0.18.5", "version": "0.18.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/mime-types": "^2.1.4", "@types/mime-types": "^2.1.4",
@ -6777,12 +6777,12 @@
}, },
"packages/web-ui": { "packages/web-ui": {
"name": "@mariozechner/pi-web-ui", "name": "@mariozechner/pi-web-ui",
"version": "0.18.5", "version": "0.18.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@lmstudio/sdk": "^1.5.0", "@lmstudio/sdk": "^1.5.0",
"@mariozechner/pi-ai": "^0.18.5", "@mariozechner/pi-ai": "^0.18.6",
"@mariozechner/pi-tui": "^0.18.5", "@mariozechner/pi-tui": "^0.18.6",
"docx-preview": "^0.3.7", "docx-preview": "^0.3.7",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"lucide": "^0.544.0", "lucide": "^0.544.0",
@ -6803,7 +6803,7 @@
}, },
"packages/web-ui/example": { "packages/web-ui/example": {
"name": "pi-web-ui-example", "name": "pi-web-ui-example",
"version": "1.6.5", "version": "1.6.6",
"dependencies": { "dependencies": {
"@mariozechner/mini-lit": "^0.2.0", "@mariozechner/mini-lit": "^0.2.0",
"@mariozechner/pi-ai": "file:../../ai", "@mariozechner/pi-ai": "file:../../ai",

View file

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

View file

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

View file

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

View file

@ -1,6 +1,11 @@
# Changelog # Changelog
## [Unreleased] ## [0.18.6] - 2025-12-12
### Fixed
- Duplicate message in context when message has attachments (sync from log didn't strip attachment section before comparing)
- Use `<slack_attachments>` delimiter for attachments in messages (easier to parse/strip)
## [0.18.5] - 2025-12-12 ## [0.18.5] - 2025-12-12

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi-mom", "name": "@mariozechner/pi-mom",
"version": "0.18.5", "version": "0.18.6",
"description": "Slack bot that delegates messages to the pi coding agent", "description": "Slack bot that delegates messages to the pi coding agent",
"type": "module", "type": "module",
"bin": { "bin": {
@ -21,9 +21,9 @@
}, },
"dependencies": { "dependencies": {
"@anthropic-ai/sandbox-runtime": "^0.0.16", "@anthropic-ai/sandbox-runtime": "^0.0.16",
"@mariozechner/pi-agent-core": "^0.18.5", "@mariozechner/pi-agent-core": "^0.18.6",
"@mariozechner/pi-ai": "^0.18.5", "@mariozechner/pi-ai": "^0.18.6",
"@mariozechner/pi-coding-agent": "^0.18.5", "@mariozechner/pi-coding-agent": "^0.18.6",
"@sinclair/typebox": "^0.34.0", "@sinclair/typebox": "^0.34.0",
"@slack/socket-mode": "^2.0.0", "@slack/socket-mode": "^2.0.0",
"@slack/web-api": "^7.0.0", "@slack/web-api": "^7.0.0",

View file

@ -588,7 +588,7 @@ function createRunner(sandboxConfig: SandboxConfig, channelId: string, channelDi
// Add attachment paths if any (convert to absolute paths in execution environment) // Add attachment paths if any (convert to absolute paths in execution environment)
if (ctx.message.attachments && ctx.message.attachments.length > 0) { if (ctx.message.attachments && ctx.message.attachments.length > 0) {
const attachmentPaths = ctx.message.attachments.map((a) => `${workspacePath}/${a.local}`).join("\n"); const attachmentPaths = ctx.message.attachments.map((a) => `${workspacePath}/${a.local}`).join("\n");
userMessage += `\n\nAttachments:\n${attachmentPaths}`; userMessage += `\n\n<slack_attachments>\n${attachmentPaths}\n</slack_attachments>`;
} }
// Debug: write context to last_prompt.jsonl // Debug: write context to last_prompt.jsonl

View file

@ -604,7 +604,7 @@ export function syncLogToContext(channelDir: string, excludeAfterTs?: string): n
} }
// For deduplication, we need to track what's already in context // For deduplication, we need to track what's already in context
// Read context and extract user message content // Read context and extract user message content (strip attachments section for comparison)
const existingMessages = new Set<string>(); const existingMessages = new Set<string>();
if (existsSync(contextFile)) { if (existsSync(contextFile)) {
const contextContent = readFileSync(contextFile, "utf-8"); const contextContent = readFileSync(contextFile, "utf-8");
@ -613,9 +613,16 @@ export function syncLogToContext(channelDir: string, excludeAfterTs?: string): n
try { try {
const entry = JSON.parse(line); const entry = JSON.parse(line);
if (entry.type === "message" && entry.message?.role === "user") { if (entry.type === "message" && entry.message?.role === "user") {
const content = let content =
typeof entry.message.content === "string" ? entry.message.content : entry.message.content?.[0]?.text; typeof entry.message.content === "string" ? entry.message.content : entry.message.content?.[0]?.text;
if (content) existingMessages.add(content); // Strip attachments section for comparison (live messages have it, log messages don't)
if (content) {
const attachmentsIdx = content.indexOf("\n\n<slack_attachments>\n");
if (attachmentsIdx !== -1) {
content = content.substring(0, attachmentsIdx);
}
existingMessages.add(content);
}
} }
} catch {} } catch {}
} }

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
{ {
"name": "pi-web-ui-example", "name": "pi-web-ui-example",
"version": "1.6.5", "version": "1.6.6",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

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