@pasko70/pibo 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
Binary file
|
package/dist/mcp/errors.js
CHANGED
|
@@ -187,7 +187,7 @@ export function unknownOptionError(option) {
|
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
189
189
|
suggestion =
|
|
190
|
-
'Valid options: -c/--config, -
|
|
190
|
+
'Valid options: -c/--config, -d/--with-descriptions';
|
|
191
191
|
}
|
|
192
192
|
return {
|
|
193
193
|
code: ErrorCode.CLIENT_ERROR,
|
package/dist/mcp/index.js
CHANGED
|
@@ -328,7 +328,7 @@ Commands:
|
|
|
328
328
|
|
|
329
329
|
Options:
|
|
330
330
|
-v, --version Show version number
|
|
331
|
-
-d, --with-descriptions
|
|
331
|
+
-d, --with-descriptions Show full tool descriptions (default: first 100 chars)
|
|
332
332
|
-c, --config <path> Path to mcp_servers.json config file
|
|
333
333
|
--no-setup Skip registry setup commands during install
|
|
334
334
|
|
package/dist/mcp/output.js
CHANGED
|
@@ -27,6 +27,29 @@ function color(text, colorCode) {
|
|
|
27
27
|
return text;
|
|
28
28
|
return `${colorCode}${text}${colors.reset}`;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Default character budget for truncated tool descriptions in compact views.
|
|
32
|
+
* Single-line summaries stay readable while keeping server overviews short.
|
|
33
|
+
*/
|
|
34
|
+
export const TOOL_DESCRIPTION_TRUNCATE_LENGTH = 100;
|
|
35
|
+
/**
|
|
36
|
+
* Return a compact, single-line summary of a tool description.
|
|
37
|
+
*
|
|
38
|
+
* - Prefers the first paragraph (text before a blank line or line break).
|
|
39
|
+
* - Truncates at `maxLength` characters with an ellipsis suffix when needed.
|
|
40
|
+
* - Returns undefined when there is no description to summarize.
|
|
41
|
+
*/
|
|
42
|
+
export function truncateToolDescription(description, maxLength = TOOL_DESCRIPTION_TRUNCATE_LENGTH) {
|
|
43
|
+
if (!description)
|
|
44
|
+
return undefined;
|
|
45
|
+
// Collapse whitespace so newlines and runs of spaces become single spaces.
|
|
46
|
+
const normalized = description.replace(/\s+/g, ' ').trim();
|
|
47
|
+
if (!normalized)
|
|
48
|
+
return undefined;
|
|
49
|
+
if (normalized.length <= maxLength)
|
|
50
|
+
return normalized;
|
|
51
|
+
return `${normalized.slice(0, Math.max(0, maxLength - 1)).trimEnd()}…`;
|
|
52
|
+
}
|
|
30
53
|
/**
|
|
31
54
|
* Format server list for display
|
|
32
55
|
*/
|
|
@@ -44,8 +67,12 @@ export function formatServerList(servers, withDescriptions) {
|
|
|
44
67
|
lines.push(` ${color(`Instructions: ${firstLine}${suffix}`, colors.dim)}`);
|
|
45
68
|
}
|
|
46
69
|
for (const tool of server.tools) {
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
// Always try to show a short summary so agents can pick a tool without -d.
|
|
71
|
+
const summary = withDescriptions
|
|
72
|
+
? tool.description
|
|
73
|
+
: truncateToolDescription(tool.description);
|
|
74
|
+
if (summary) {
|
|
75
|
+
lines.push(` • ${tool.name} - ${color(summary, colors.dim)}`);
|
|
49
76
|
}
|
|
50
77
|
else {
|
|
51
78
|
lines.push(` • ${tool.name}`);
|
|
@@ -63,9 +90,12 @@ export function formatSearchResults(results, withDescriptions) {
|
|
|
63
90
|
for (const result of results) {
|
|
64
91
|
const server = color(result.server, colors.cyan);
|
|
65
92
|
const tool = color(result.tool.name, colors.green);
|
|
66
|
-
// Always show
|
|
67
|
-
|
|
68
|
-
|
|
93
|
+
// Always show a short summary so agents can decide without -d; full text on -d.
|
|
94
|
+
const summary = withDescriptions
|
|
95
|
+
? result.tool.description
|
|
96
|
+
: truncateToolDescription(result.tool.description);
|
|
97
|
+
if (summary) {
|
|
98
|
+
lines.push(`${server} ${tool} ${color(summary, colors.dim)}`);
|
|
69
99
|
}
|
|
70
100
|
else {
|
|
71
101
|
lines.push(`${server} ${tool}`);
|
|
@@ -87,6 +117,13 @@ export function formatServerDetails(serverName, config, tools, withDescriptions
|
|
|
87
117
|
lines.push(`${color('Transport:', colors.bold)} stdio`);
|
|
88
118
|
lines.push(`${color('Command:', colors.bold)} ${config.command} ${(config.args || []).join(' ')}`);
|
|
89
119
|
}
|
|
120
|
+
// Surface the agent-facing Pibo description so it is visible without -d.
|
|
121
|
+
const piboDescription = config.pibo?.description?.trim();
|
|
122
|
+
if (piboDescription) {
|
|
123
|
+
lines.push('');
|
|
124
|
+
lines.push(`${color('Description:', colors.bold)}`);
|
|
125
|
+
lines.push(` ${piboDescription}`);
|
|
126
|
+
}
|
|
90
127
|
if (instructions) {
|
|
91
128
|
lines.push('');
|
|
92
129
|
lines.push(`${color('Instructions:', colors.bold)}`);
|
|
@@ -101,8 +138,11 @@ export function formatServerDetails(serverName, config, tools, withDescriptions
|
|
|
101
138
|
lines.push(`${color(`Tools (${tools.length}):`, colors.bold)}`);
|
|
102
139
|
for (const tool of tools) {
|
|
103
140
|
lines.push(` ${color(tool.name, colors.green)}`);
|
|
104
|
-
|
|
105
|
-
|
|
141
|
+
const toolSummary = withDescriptions
|
|
142
|
+
? tool.description
|
|
143
|
+
: truncateToolDescription(tool.description);
|
|
144
|
+
if (toolSummary) {
|
|
145
|
+
lines.push(` ${color(toolSummary, colors.dim)}`);
|
|
106
146
|
}
|
|
107
147
|
// Show parameters from schema
|
|
108
148
|
const schema = tool.inputSchema;
|
package/package.json
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pasko70/pibo",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"imports": {
|
|
6
|
-
"vscode": "./src/apps/chat-vscode/extension/src/vscode-shim.js"
|
|
7
|
-
},
|
|
8
|
-
"description": "Minimal TypeScript wrapper around Pi Coding Agent.",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist",
|
|
11
|
-
"context",
|
|
12
|
-
"skills/builtin/**",
|
|
13
|
-
"docs/ops/**",
|
|
14
|
-
"README.md",
|
|
15
|
-
"src/mcp/LICENSE.mcp-cli"
|
|
16
|
-
],
|
|
17
|
-
"bin": {
|
|
18
|
-
"pibo": "dist/bin/pibo.js",
|
|
19
|
-
"rg": "dist/bin/rg.js"
|
|
20
|
-
},
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=24"
|
|
23
|
-
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"dev": "tsx src/bin/pibo.ts",
|
|
26
|
-
"profile": "tsx src/bin/pibo.ts profile",
|
|
27
|
-
"tui": "tsx src/bin/pibo.ts tui",
|
|
28
|
-
"tui:routed": "tsx src/bin/pibo.ts tui:routed",
|
|
29
|
-
"tui:gateway": "tsx src/bin/pibo.ts tui gateway-producer",
|
|
30
|
-
"gateway": "tsx src/bin/pibo.ts gateway",
|
|
31
|
-
"gateway:web": "npm run web-ui:build && tsx src/bin/pibo.ts gateway:web",
|
|
32
|
-
"client": "tsx src/bin/pibo.ts client",
|
|
33
|
-
"chat-ui:build": "vite build --config src/apps/chat-ui/vite.config.ts",
|
|
34
|
-
"chat-ui:typecheck": "tsc -p src/apps/chat-ui/tsconfig.json --noEmit",
|
|
35
|
-
"context-files-ui:build": "vite build --config src/apps/context-files-ui/vite.config.ts",
|
|
36
|
-
"context-files-ui:typecheck": "tsc -p src/apps/context-files-ui/tsconfig.json --noEmit",
|
|
37
|
-
"web-ui:build": "npm run chat-ui:build && npm run context-files-ui:build",
|
|
38
|
-
"vscode:typecheck": "tsc -p src/apps/chat-vscode/extension/tsconfig.json --noEmit && tsc -p src/apps/chat-vscode/extension/webview/tsconfig.json --noEmit",
|
|
39
|
-
"vscode:webview:build": "vite build --config src/apps/chat-vscode/extension/webview/vite.config.ts",
|
|
40
|
-
"vscode:extension:build": "esbuild src/apps/chat-vscode/extension/src/extension.ts --bundle --platform=node --target=node24 --format=cjs --outfile=src/apps/chat-vscode/dist/extension/extension.cjs --external:vscode --sourcemap=inline",
|
|
41
|
-
"vscode:package": "node scripts/vscode-package.mjs",
|
|
42
|
-
"release": "node scripts/release.mjs",
|
|
43
|
-
"release:github": "node scripts/create-github-release.mjs",
|
|
44
|
-
"build": "tsc -p tsconfig.json && npm run web-ui:build && npm run vscode:webview:build && node scripts/ensure-bin-executable.mjs",
|
|
45
|
-
"start": "node dist/bin/pibo.js",
|
|
46
|
-
"test": "npm run build && node --test test/*.test.mjs test/chat-vscode/*.test.mjs",
|
|
47
|
-
"check:product-vocab": "node scripts/legacy-product-vocabulary-gate.mjs",
|
|
48
|
-
"validate:ink-web-derived": "node scripts/ink-cli-web-derived-parity-validate.mjs",
|
|
49
|
-
"compute:limited-worker-smoke": "node scripts/compute-limited-worker-smoke.mjs",
|
|
50
|
-
"typecheck": "tsc -p tsconfig.json --noEmit && npm run chat-ui:typecheck && npm run context-files-ui:typecheck && npm run vscode:typecheck",
|
|
51
|
-
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
52
|
-
"prepack": "npm run build"
|
|
53
|
-
},
|
|
54
|
-
"dependencies": {
|
|
55
|
-
"@mariozechner/pi-ai": "^0.73.1",
|
|
56
|
-
"@mariozechner/pi-coding-agent": "^0.73.1",
|
|
57
|
-
"@mdxeditor/editor": "^3.55.0",
|
|
58
|
-
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
59
|
-
"@tailwindcss/vite": "^4.2.4",
|
|
60
|
-
"@tanstack/react-query": "^5.100.7",
|
|
61
|
-
"@tanstack/react-router": "^1.168.25",
|
|
62
|
-
"@tanstack/react-start": "^1.167.50",
|
|
63
|
-
"@uiw/react-json-view": "^2.0.0-alpha.41",
|
|
64
|
-
"@vscode/ripgrep": "^1.18.0",
|
|
65
|
-
"@xyflow/react": "12.10.2",
|
|
66
|
-
"better-auth": "^1.6.9",
|
|
67
|
-
"commander": "^14.0.3",
|
|
68
|
-
"ink": "^7.0.3",
|
|
69
|
-
"lexical": "^0.35.0",
|
|
70
|
-
"lucide-react": "^0.545.0",
|
|
71
|
-
"prismjs": "^1.30.0",
|
|
72
|
-
"react": "^19.2.5",
|
|
73
|
-
"react-dom": "^19.2.5",
|
|
74
|
-
"react-markdown": "^10.1.0",
|
|
75
|
-
"react-virtuoso": "^4.18.6",
|
|
76
|
-
"remark-gfm": "^4.0.1",
|
|
77
|
-
"tailwindcss": "^4.2.4"
|
|
78
|
-
},
|
|
79
|
-
"devDependencies": {
|
|
80
|
-
"@tanstack/router-plugin": "^1.167.28",
|
|
81
|
-
"@types/node": "^25.6.0",
|
|
82
|
-
"@types/prismjs": "^1.26.6",
|
|
83
|
-
"@types/react": "^19.2.14",
|
|
84
|
-
"@types/react-dom": "^19.2.3",
|
|
85
|
-
"@vitejs/plugin-react": "^6.0.1",
|
|
86
|
-
"@vscode/vsce": "^3.6.0",
|
|
87
|
-
"esbuild": "^0.27.7",
|
|
88
|
-
"tsx": "^4.21.0",
|
|
89
|
-
"typescript": "^6.0.3",
|
|
90
|
-
"vite": "^8.0.10",
|
|
91
|
-
"vite-tsconfig-paths": "^5.1.4"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@pasko70/pibo",
|
|
3
|
+
"version": "1.4.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"imports": {
|
|
6
|
+
"vscode": "./src/apps/chat-vscode/extension/src/vscode-shim.js"
|
|
7
|
+
},
|
|
8
|
+
"description": "Minimal TypeScript wrapper around Pi Coding Agent.",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"context",
|
|
12
|
+
"skills/builtin/**",
|
|
13
|
+
"docs/ops/**",
|
|
14
|
+
"README.md",
|
|
15
|
+
"src/mcp/LICENSE.mcp-cli"
|
|
16
|
+
],
|
|
17
|
+
"bin": {
|
|
18
|
+
"pibo": "dist/bin/pibo.js",
|
|
19
|
+
"rg": "dist/bin/rg.js"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=24"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "tsx src/bin/pibo.ts",
|
|
26
|
+
"profile": "tsx src/bin/pibo.ts profile",
|
|
27
|
+
"tui": "tsx src/bin/pibo.ts tui",
|
|
28
|
+
"tui:routed": "tsx src/bin/pibo.ts tui:routed",
|
|
29
|
+
"tui:gateway": "tsx src/bin/pibo.ts tui gateway-producer",
|
|
30
|
+
"gateway": "tsx src/bin/pibo.ts gateway",
|
|
31
|
+
"gateway:web": "npm run web-ui:build && tsx src/bin/pibo.ts gateway:web",
|
|
32
|
+
"client": "tsx src/bin/pibo.ts client",
|
|
33
|
+
"chat-ui:build": "vite build --config src/apps/chat-ui/vite.config.ts",
|
|
34
|
+
"chat-ui:typecheck": "tsc -p src/apps/chat-ui/tsconfig.json --noEmit",
|
|
35
|
+
"context-files-ui:build": "vite build --config src/apps/context-files-ui/vite.config.ts",
|
|
36
|
+
"context-files-ui:typecheck": "tsc -p src/apps/context-files-ui/tsconfig.json --noEmit",
|
|
37
|
+
"web-ui:build": "npm run chat-ui:build && npm run context-files-ui:build",
|
|
38
|
+
"vscode:typecheck": "tsc -p src/apps/chat-vscode/extension/tsconfig.json --noEmit && tsc -p src/apps/chat-vscode/extension/webview/tsconfig.json --noEmit",
|
|
39
|
+
"vscode:webview:build": "vite build --config src/apps/chat-vscode/extension/webview/vite.config.ts",
|
|
40
|
+
"vscode:extension:build": "esbuild src/apps/chat-vscode/extension/src/extension.ts --bundle --platform=node --target=node24 --format=cjs --outfile=src/apps/chat-vscode/dist/extension/extension.cjs --external:vscode --sourcemap=inline",
|
|
41
|
+
"vscode:package": "node scripts/vscode-package.mjs",
|
|
42
|
+
"release": "node scripts/release.mjs",
|
|
43
|
+
"release:github": "node scripts/create-github-release.mjs",
|
|
44
|
+
"build": "tsc -p tsconfig.json && npm run web-ui:build && npm run vscode:webview:build && node scripts/ensure-bin-executable.mjs",
|
|
45
|
+
"start": "node dist/bin/pibo.js",
|
|
46
|
+
"test": "npm run build && node --test test/*.test.mjs test/chat-vscode/*.test.mjs",
|
|
47
|
+
"check:product-vocab": "node scripts/legacy-product-vocabulary-gate.mjs",
|
|
48
|
+
"validate:ink-web-derived": "node scripts/ink-cli-web-derived-parity-validate.mjs",
|
|
49
|
+
"compute:limited-worker-smoke": "node scripts/compute-limited-worker-smoke.mjs",
|
|
50
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && npm run chat-ui:typecheck && npm run context-files-ui:typecheck && npm run vscode:typecheck",
|
|
51
|
+
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
52
|
+
"prepack": "npm run build"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@mariozechner/pi-ai": "^0.73.1",
|
|
56
|
+
"@mariozechner/pi-coding-agent": "^0.73.1",
|
|
57
|
+
"@mdxeditor/editor": "^3.55.0",
|
|
58
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
59
|
+
"@tailwindcss/vite": "^4.2.4",
|
|
60
|
+
"@tanstack/react-query": "^5.100.7",
|
|
61
|
+
"@tanstack/react-router": "^1.168.25",
|
|
62
|
+
"@tanstack/react-start": "^1.167.50",
|
|
63
|
+
"@uiw/react-json-view": "^2.0.0-alpha.41",
|
|
64
|
+
"@vscode/ripgrep": "^1.18.0",
|
|
65
|
+
"@xyflow/react": "12.10.2",
|
|
66
|
+
"better-auth": "^1.6.9",
|
|
67
|
+
"commander": "^14.0.3",
|
|
68
|
+
"ink": "^7.0.3",
|
|
69
|
+
"lexical": "^0.35.0",
|
|
70
|
+
"lucide-react": "^0.545.0",
|
|
71
|
+
"prismjs": "^1.30.0",
|
|
72
|
+
"react": "^19.2.5",
|
|
73
|
+
"react-dom": "^19.2.5",
|
|
74
|
+
"react-markdown": "^10.1.0",
|
|
75
|
+
"react-virtuoso": "^4.18.6",
|
|
76
|
+
"remark-gfm": "^4.0.1",
|
|
77
|
+
"tailwindcss": "^4.2.4"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@tanstack/router-plugin": "^1.167.28",
|
|
81
|
+
"@types/node": "^25.6.0",
|
|
82
|
+
"@types/prismjs": "^1.26.6",
|
|
83
|
+
"@types/react": "^19.2.14",
|
|
84
|
+
"@types/react-dom": "^19.2.3",
|
|
85
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
86
|
+
"@vscode/vsce": "^3.6.0",
|
|
87
|
+
"esbuild": "^0.27.7",
|
|
88
|
+
"tsx": "^4.21.0",
|
|
89
|
+
"typescript": "^6.0.3",
|
|
90
|
+
"vite": "^8.0.10",
|
|
91
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
92
|
+
}
|
|
93
|
+
}
|