pi-lean-ctx 3.3.6 → 3.4.2
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.
- package/extensions/index.ts +22 -13
- package/package.json +1 -1
package/extensions/index.ts
CHANGED
|
@@ -274,11 +274,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
274
274
|
pi.registerTool({
|
|
275
275
|
...baseBashTool,
|
|
276
276
|
description:
|
|
277
|
-
"Execute a bash command through lean-ctx compression
|
|
278
|
-
promptSnippet: "Run shell commands
|
|
277
|
+
"Execute a bash command through lean-ctx compression.",
|
|
278
|
+
promptSnippet: "Run shell commands (compressed output)",
|
|
279
279
|
promptGuidelines: [
|
|
280
|
-
"Use
|
|
281
|
-
"lean-ctx
|
|
280
|
+
"Use for any shell command—output (auto-compressed)",
|
|
281
|
+
"Avoid for interactive prompts; lean-ctx buffers output.",
|
|
282
282
|
],
|
|
283
283
|
async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
284
284
|
try {
|
|
@@ -307,10 +307,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
307
307
|
label: "Read",
|
|
308
308
|
description:
|
|
309
309
|
"Read file contents through lean-ctx with automatic mode selection (full/map/signatures) based on file type and size.",
|
|
310
|
-
promptSnippet: "
|
|
310
|
+
promptSnippet: "Smart file read",
|
|
311
311
|
promptGuidelines: [
|
|
312
|
-
"
|
|
313
|
-
"
|
|
312
|
+
"Auto-selects mode: full (<8KB), map (8-96KB), signatures (>96KB) for code.",
|
|
313
|
+
"Text/configs always full-read; images passthrough.",
|
|
314
314
|
],
|
|
315
315
|
parameters: readSchema,
|
|
316
316
|
renderCall(args, theme, context) {
|
|
@@ -411,8 +411,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
411
411
|
name: "ls",
|
|
412
412
|
label: "ls",
|
|
413
413
|
description: "List directory contents through lean-ctx compression.",
|
|
414
|
-
promptSnippet: "
|
|
415
|
-
promptGuidelines: [
|
|
414
|
+
promptSnippet: "Directory listing (Compressed)",
|
|
415
|
+
promptGuidelines: [
|
|
416
|
+
"ls → compressed output (respects .gitignore).",
|
|
417
|
+
"Use limit param to truncate long lists.",
|
|
418
|
+
],
|
|
416
419
|
parameters: lsSchema,
|
|
417
420
|
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
418
421
|
const requestedPath = normalizePathArg(params.path || ".");
|
|
@@ -430,8 +433,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
430
433
|
name: "find",
|
|
431
434
|
label: "find",
|
|
432
435
|
description: "Find files by glob pattern through lean-ctx compression.",
|
|
433
|
-
promptSnippet: "
|
|
434
|
-
promptGuidelines: [
|
|
436
|
+
promptSnippet: "File search (Compressed)",
|
|
437
|
+
promptGuidelines: [
|
|
438
|
+
"find [pattern] → lean-ctx compressed results.",
|
|
439
|
+
"Combines with .gitignore; use limit to cap results.",
|
|
440
|
+
],
|
|
435
441
|
parameters: findSchema,
|
|
436
442
|
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
437
443
|
const requestedPath = normalizePathArg(params.path || ".");
|
|
@@ -449,8 +455,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
449
455
|
name: "grep",
|
|
450
456
|
label: "grep",
|
|
451
457
|
description: "Search file contents through ripgrep + lean-ctx compression.",
|
|
452
|
-
promptSnippet: "
|
|
453
|
-
promptGuidelines: [
|
|
458
|
+
promptSnippet: "Compressed code search (grouped results)",
|
|
459
|
+
promptGuidelines: [
|
|
460
|
+
"rg → lean-ctx compressed output (line numbers, no color).",
|
|
461
|
+
"Supports standard rg flags: -i, -F, -C, -m, --glob.",
|
|
462
|
+
],
|
|
454
463
|
parameters: grepSchema,
|
|
455
464
|
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
456
465
|
const requestedPath = normalizePathArg(params.path || ".");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-lean-ctx",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Pi Coding Agent extension with first-class MCP support — routes bash, read, grep, find, and ls through lean-ctx CLI, and exposes all 46 lean-ctx MCP tools (ctx_session, ctx_knowledge, ctx_semantic_search, ctx_impact, ctx_architecture, ctx_workflow, ctx_gain, etc.) natively in Pi",
|
|
5
5
|
"keywords": ["pi-package", "lean-ctx", "token-optimization", "compression", "mcp"],
|
|
6
6
|
"license": "Apache-2.0",
|