Fix symlinked skill directories not being discovered

Release v0.27.4
This commit is contained in:
Mario Zechner 2025-12-24 03:32:54 +01:00
parent f8619c1564
commit 20b24cf5a4
13 changed files with 193 additions and 109 deletions

40
package-lock.json generated
View file

@ -6447,11 +6447,11 @@
},
"packages/agent": {
"name": "@mariozechner/pi-agent-core",
"version": "0.27.3",
"version": "0.27.4",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-ai": "^0.27.3",
"@mariozechner/pi-tui": "^0.27.3"
"@mariozechner/pi-ai": "^0.27.4",
"@mariozechner/pi-tui": "^0.27.4"
},
"devDependencies": {
"@types/node": "^24.3.0",
@ -6481,7 +6481,7 @@
},
"packages/ai": {
"name": "@mariozechner/pi-ai",
"version": "0.27.3",
"version": "0.27.4",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "0.71.2",
@ -6523,12 +6523,12 @@
},
"packages/coding-agent": {
"name": "@mariozechner/pi-coding-agent",
"version": "0.27.3",
"version": "0.27.4",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-agent-core": "^0.27.3",
"@mariozechner/pi-ai": "^0.27.3",
"@mariozechner/pi-tui": "^0.27.3",
"@mariozechner/pi-agent-core": "^0.27.4",
"@mariozechner/pi-ai": "^0.27.4",
"@mariozechner/pi-tui": "^0.27.4",
"chalk": "^5.5.0",
"cli-highlight": "^2.1.11",
"diff": "^8.0.2",
@ -6568,13 +6568,13 @@
},
"packages/mom": {
"name": "@mariozechner/pi-mom",
"version": "0.27.3",
"version": "0.27.4",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sandbox-runtime": "^0.0.16",
"@mariozechner/pi-agent-core": "^0.27.3",
"@mariozechner/pi-ai": "^0.27.3",
"@mariozechner/pi-coding-agent": "^0.27.3",
"@mariozechner/pi-agent-core": "^0.27.4",
"@mariozechner/pi-ai": "^0.27.4",
"@mariozechner/pi-coding-agent": "^0.27.4",
"@sinclair/typebox": "^0.34.0",
"@slack/socket-mode": "^2.0.0",
"@slack/web-api": "^7.0.0",
@ -6613,10 +6613,10 @@
},
"packages/pods": {
"name": "@mariozechner/pi",
"version": "0.27.3",
"version": "0.27.4",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-agent-core": "^0.27.3",
"@mariozechner/pi-agent-core": "^0.27.4",
"chalk": "^5.5.0"
},
"bin": {
@ -6629,7 +6629,7 @@
},
"packages/proxy": {
"name": "@mariozechner/pi-proxy",
"version": "0.27.3",
"version": "0.27.4",
"dependencies": {
"@hono/node-server": "^1.14.0",
"hono": "^4.6.16"
@ -6645,7 +6645,7 @@
},
"packages/tui": {
"name": "@mariozechner/pi-tui",
"version": "0.27.3",
"version": "0.27.4",
"license": "MIT",
"dependencies": {
"@types/mime-types": "^2.1.4",
@ -6689,12 +6689,12 @@
},
"packages/web-ui": {
"name": "@mariozechner/pi-web-ui",
"version": "0.27.3",
"version": "0.27.4",
"license": "MIT",
"dependencies": {
"@lmstudio/sdk": "^1.5.0",
"@mariozechner/pi-ai": "^0.27.3",
"@mariozechner/pi-tui": "^0.27.3",
"@mariozechner/pi-ai": "^0.27.4",
"@mariozechner/pi-tui": "^0.27.4",
"docx-preview": "^0.3.7",
"jszip": "^3.10.1",
"lucide": "^0.544.0",
@ -6715,7 +6715,7 @@
},
"packages/web-ui/example": {
"name": "pi-web-ui-example",
"version": "1.15.3",
"version": "1.15.4",
"dependencies": {
"@mariozechner/mini-lit": "^0.2.0",
"@mariozechner/pi-ai": "file:../../ai",

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-agent-core",
"version": "0.27.3",
"version": "0.27.4",
"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.27.3",
"@mariozechner/pi-tui": "^0.27.3"
"@mariozechner/pi-ai": "^0.27.4",
"@mariozechner/pi-tui": "^0.27.4"
},
"keywords": [
"ai",

View file

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

View file

@ -2874,6 +2874,74 @@ export const MODELS = {
} satisfies Model<"openai-completions">,
},
"openrouter": {
"bytedance-seed/seed-1.6-flash": {
id: "bytedance-seed/seed-1.6-flash",
name: "ByteDance Seed: Seed 1.6 Flash",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.075,
output: 0.3,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 16384,
} satisfies Model<"openai-completions">,
"bytedance-seed/seed-1.6": {
id: "bytedance-seed/seed-1.6",
name: "ByteDance Seed: Seed 1.6",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.25,
output: 2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 32768,
} satisfies Model<"openai-completions">,
"minimax/minimax-m2.1": {
id: "minimax/minimax-m2.1",
name: "MiniMax: MiniMax M2.1",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text"],
cost: {
input: 0.3,
output: 1.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 204800,
maxTokens: 131072,
} satisfies Model<"openai-completions">,
"z-ai/glm-4.7": {
id: "z-ai/glm-4.7",
name: "Z.AI: GLM 4.7",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: true,
input: ["text"],
cost: {
input: 0.39999999999999997,
output: 1.5,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 202752,
maxTokens: 65535,
} satisfies Model<"openai-completions">,
"google/gemini-3-flash-preview": {
id: "google/gemini-3-flash-preview",
name: "Google: Gemini 3 Flash Preview",
@ -2957,7 +3025,7 @@ export const MODELS = {
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 4096,
maxTokens: 262144,
} satisfies Model<"openai-completions">,
"openai/gpt-5.2-chat": {
id: "openai/gpt-5.2-chat",
@ -3240,13 +3308,13 @@ export const MODELS = {
reasoning: true,
input: ["text"],
cost: {
input: 0.23900000000000002,
output: 0.378,
cacheRead: 0.11,
input: 0.224,
output: 0.32,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 163840,
maxTokens: 163840,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"prime-intellect/intellect-3": {
id: "prime-intellect/intellect-3",
@ -4316,7 +4384,7 @@ export const MODELS = {
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 8192,
contextWindow: 32768,
maxTokens: 7168,
} satisfies Model<"openai-completions">,
"openai/gpt-4o-audio-preview": {
@ -6036,9 +6104,9 @@ export const MODELS = {
contextWindow: 32768,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"anthropic/claude-3.5-haiku": {
id: "anthropic/claude-3.5-haiku",
name: "Anthropic: Claude 3.5 Haiku",
"anthropic/claude-3.5-haiku-20241022": {
id: "anthropic/claude-3.5-haiku-20241022",
name: "Anthropic: Claude 3.5 Haiku (2024-10-22)",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
@ -6053,9 +6121,9 @@ export const MODELS = {
contextWindow: 200000,
maxTokens: 8192,
} satisfies Model<"openai-completions">,
"anthropic/claude-3.5-haiku-20241022": {
id: "anthropic/claude-3.5-haiku-20241022",
name: "Anthropic: Claude 3.5 Haiku (2024-10-22)",
"anthropic/claude-3.5-haiku": {
id: "anthropic/claude-3.5-haiku",
name: "Anthropic: Claude 3.5 Haiku",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
@ -6181,13 +6249,13 @@ export const MODELS = {
reasoning: false,
input: ["text"],
cost: {
input: 0.07,
output: 0.26,
input: 0.12,
output: 0.39,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 32768,
maxTokens: 32768,
maxTokens: 16384,
} satisfies Model<"openai-completions">,
"mistralai/pixtral-12b": {
id: "mistralai/pixtral-12b",
@ -6291,21 +6359,21 @@ export const MODELS = {
contextWindow: 128000,
maxTokens: 16384,
} satisfies Model<"openai-completions">,
"meta-llama/llama-3.1-405b-instruct": {
id: "meta-llama/llama-3.1-405b-instruct",
name: "Meta: Llama 3.1 405B Instruct",
"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: 3.5,
output: 3.5,
input: 0.39999999999999997,
output: 0.39999999999999997,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 130815,
contextWindow: 131072,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"meta-llama/llama-3.1-8b-instruct": {
@ -6325,21 +6393,21 @@ export const MODELS = {
contextWindow: 131072,
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",
"meta-llama/llama-3.1-405b-instruct": {
id: "meta-llama/llama-3.1-405b-instruct",
name: "Meta: Llama 3.1 405B Instruct",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 0.39999999999999997,
output: 0.39999999999999997,
input: 3.5,
output: 3.5,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 131072,
contextWindow: 10000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"mistralai/mistral-nemo": {
@ -6478,23 +6546,6 @@ export const MODELS = {
contextWindow: 128000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"openai/gpt-4o-2024-05-13": {
id: "openai/gpt-4o-2024-05-13",
name: "OpenAI: GPT-4o (2024-05-13)",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text", "image"],
cost: {
input: 5,
output: 15,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 128000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"openai/gpt-4o": {
id: "openai/gpt-4o",
name: "OpenAI: GPT-4o",
@ -6529,6 +6580,23 @@ export const MODELS = {
contextWindow: 128000,
maxTokens: 64000,
} satisfies Model<"openai-completions">,
"openai/gpt-4o-2024-05-13": {
id: "openai/gpt-4o-2024-05-13",
name: "OpenAI: GPT-4o (2024-05-13)",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text", "image"],
cost: {
input: 5,
output: 15,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 128000,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"meta-llama/llama-3-70b-instruct": {
id: "meta-llama/llama-3-70b-instruct",
name: "Meta: Llama 3 70B Instruct",
@ -6648,23 +6716,6 @@ export const MODELS = {
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)",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 1,
output: 2,
cacheRead: 0,
cacheWrite: 0,
},
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",
@ -6682,6 +6733,23 @@ export const MODELS = {
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)",
api: "openai-completions",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
reasoning: false,
input: ["text"],
cost: {
input: 1,
output: 2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 4095,
maxTokens: 4096,
} satisfies Model<"openai-completions">,
"mistralai/mistral-tiny": {
id: "mistralai/mistral-tiny",
name: "Mistral Tiny",

View file

@ -2,6 +2,12 @@
## [Unreleased]
## [0.27.4] - 2025-12-24
### Fixed
- **Symlinked skill directories**: Skills in symlinked directories (e.g., `~/.pi/agent/skills/my-skills -> /path/to/skills`) are now correctly discovered and loaded.
## [0.27.3] - 2025-12-24
### Added

View file

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

View file

@ -1,4 +1,4 @@
import { existsSync, readdirSync, readFileSync } from "fs";
import { existsSync, readdirSync, readFileSync, statSync } from "fs";
import { minimatch } from "minimatch";
import { homedir } from "os";
import { basename, dirname, join, resolve } from "path";
@ -187,19 +187,29 @@ function loadSkillsFromDirInternal(dir: string, source: string, format: SkillFor
continue;
}
if (entry.isSymbolicLink()) {
continue;
}
const fullPath = join(dir, entry.name);
// For symlinks, check if they point to a directory and follow them
let isDirectory = entry.isDirectory();
let isFile = entry.isFile();
if (entry.isSymbolicLink()) {
try {
const stats = statSync(fullPath);
isDirectory = stats.isDirectory();
isFile = stats.isFile();
} catch {
// Broken symlink, skip it
continue;
}
}
if (format === "recursive") {
// Recursive format: scan directories, look for SKILL.md files
if (entry.isDirectory()) {
if (isDirectory) {
const subResult = loadSkillsFromDirInternal(fullPath, source, format);
skills.push(...subResult.skills);
warnings.push(...subResult.warnings);
} else if (entry.isFile() && entry.name === "SKILL.md") {
} else if (isFile && entry.name === "SKILL.md") {
const result = loadSkillFromFile(fullPath, source);
if (result.skill) {
skills.push(result.skill);
@ -208,7 +218,7 @@ function loadSkillsFromDirInternal(dir: string, source: string, format: SkillFor
}
} else if (format === "claude") {
// Claude format: only one level deep, each directory must contain SKILL.md
if (!entry.isDirectory()) {
if (!isDirectory) {
continue;
}

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi",
"version": "0.27.3",
"version": "0.27.4",
"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.27.3",
"@mariozechner/pi-agent-core": "^0.27.4",
"chalk": "^5.5.0"
},
"devDependencies": {}

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-proxy",
"version": "0.27.3",
"version": "0.27.4",
"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.27.3",
"version": "0.27.4",
"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": "pi-web-ui-example",
"version": "1.15.3",
"version": "1.15.4",
"private": true,
"type": "module",
"scripts": {

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-web-ui",
"version": "0.27.3",
"version": "0.27.4",
"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.27.3",
"@mariozechner/pi-tui": "^0.27.3",
"@mariozechner/pi-ai": "^0.27.4",
"@mariozechner/pi-tui": "^0.27.4",
"docx-preview": "^0.3.7",
"jszip": "^3.10.1",
"lucide": "^0.544.0",