pi-landstrip 0.18.5 → 0.18.6
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/dist/index.ts +45 -11
- package/package.json +2 -2
package/dist/index.ts
CHANGED
|
@@ -1721,6 +1721,22 @@ var packageDir = dirname4(fileURLToPath(import.meta.url));
|
|
|
1721
1721
|
var MAX_TASK_OUTPUT_BYTES = 64 * 1024;
|
|
1722
1722
|
var INSPECTOR_BODY_LINES = 16;
|
|
1723
1723
|
var PI_THINKING_LEVELS = new Set(["off", "minimal", "low", "medium", "high", "xhigh", "max"]);
|
|
1724
|
+
var AGENTS_HELP_ROWS = [
|
|
1725
|
+
["Tab", "Next tab"],
|
|
1726
|
+
["Shift+Tab", "Change scope"],
|
|
1727
|
+
["↑ / ↓", "Select or scroll"],
|
|
1728
|
+
["← / →", "Sibling task"],
|
|
1729
|
+
["Enter", "Open / activate / save"],
|
|
1730
|
+
["Esc", "Back / close"],
|
|
1731
|
+
["Ctrl+C", "Close"],
|
|
1732
|
+
["D / Space", "Toggle agent"],
|
|
1733
|
+
["Space", "Toggle sandbox"],
|
|
1734
|
+
["I", "Use global value"],
|
|
1735
|
+
["0-9 / + / -", "Set subagent limit"],
|
|
1736
|
+
["P / Backspace", "Parent task"],
|
|
1737
|
+
["Ctrl+G", "Edit agent"],
|
|
1738
|
+
["Ctrl+D", "Delete agent"]
|
|
1739
|
+
];
|
|
1724
1740
|
var MIN_SUPPORTED_PI_VERSION = [0, 82, 0];
|
|
1725
1741
|
var cachedPiPackage;
|
|
1726
1742
|
var piPackageResolved = false;
|
|
@@ -2420,8 +2436,12 @@ ${this.primaryAgent.prompt}` };
|
|
|
2420
2436
|
...lines2.map((line) => boxRow(theme, width, line)),
|
|
2421
2437
|
boxBottom(theme, width)
|
|
2422
2438
|
];
|
|
2439
|
+
const pad = (value, cellWidth) => {
|
|
2440
|
+
const clipped = truncateToWidth2(value, cellWidth);
|
|
2441
|
+
return `${clipped}${" ".repeat(Math.max(0, cellWidth - visibleWidth2(clipped)))}`;
|
|
2442
|
+
};
|
|
2423
2443
|
const tabLabel = (label, active) => active ? theme.fg("accent", theme.bold(`[${label}]`)) : theme.fg("muted", label);
|
|
2424
|
-
const tabs = `${tabLabel("Agents", tab === "agents")} ${tabLabel("Tasks", tab === "tasks")} ${tabLabel("Settings", tab === "settings")} ${theme.fg("dim", `· ${scope === "project" ? "Project" : "Global"} scope`)}`;
|
|
2444
|
+
const tabs = `${tabLabel("Agents", tab === "agents")} ${tabLabel("Tasks", tab === "tasks")} ${tabLabel("Settings", tab === "settings")} ${tabLabel("Help", tab === "help")} ${theme.fg("dim", `· ${scope === "project" ? "Project" : "Global"} scope`)}`;
|
|
2425
2445
|
if (tab === "agents") {
|
|
2426
2446
|
const start = Math.max(0, Math.min(selectedAgent - 3, agents.length - 7));
|
|
2427
2447
|
const shown2 = agents.slice(start, start + 7);
|
|
@@ -2431,10 +2451,6 @@ ${this.primaryAgent.prompt}` };
|
|
|
2431
2451
|
const disabledWidth = 8;
|
|
2432
2452
|
const fixedWidth = 4 + nameWidth + 1 + modeWidth + 1 + sourceWidth + 1 + disabledWidth;
|
|
2433
2453
|
const modelWidth = Math.max(10, Math.min(30, contentWidth - fixedWidth - 1));
|
|
2434
|
-
const pad = (value, cellWidth) => {
|
|
2435
|
-
const clipped = truncateToWidth2(value, cellWidth);
|
|
2436
|
-
return `${clipped}${" ".repeat(Math.max(0, cellWidth - visibleWidth2(clipped)))}`;
|
|
2437
|
-
};
|
|
2438
2454
|
const lines2 = [
|
|
2439
2455
|
tabs,
|
|
2440
2456
|
"",
|
|
@@ -2491,8 +2507,11 @@ ${this.primaryAgent.prompt}` };
|
|
|
2491
2507
|
lines2.push(` ${theme.fg("error", diagnostic)}`);
|
|
2492
2508
|
}
|
|
2493
2509
|
}
|
|
2494
|
-
|
|
2495
|
-
|
|
2510
|
+
if (confirmingDeleteAgent) {
|
|
2511
|
+
lines2.push("", theme.fg("error", `Delete @${confirmingDeleteAgent}? enter confirm esc cancel`));
|
|
2512
|
+
} else if (saving) {
|
|
2513
|
+
lines2.push("", theme.fg("dim", "Saving…"));
|
|
2514
|
+
}
|
|
2496
2515
|
return box(lines2);
|
|
2497
2516
|
}
|
|
2498
2517
|
if (tab === "settings") {
|
|
@@ -2518,7 +2537,19 @@ ${this.primaryAgent.prompt}` };
|
|
|
2518
2537
|
if (selectedMaxSubagents() === 0) {
|
|
2519
2538
|
lines2.push(` ${theme.fg("dim", "Subagents disabled")}`);
|
|
2520
2539
|
}
|
|
2521
|
-
|
|
2540
|
+
if (saving)
|
|
2541
|
+
lines2.push("", theme.fg("dim", "Saving…"));
|
|
2542
|
+
return box(lines2);
|
|
2543
|
+
}
|
|
2544
|
+
if (tab === "help") {
|
|
2545
|
+
const shortcutWidth = Math.max(visibleWidth2("Shortcut"), ...AGENTS_HELP_ROWS.map(([shortcut]) => visibleWidth2(shortcut)));
|
|
2546
|
+
const descriptionWidth = Math.max(1, contentWidth - shortcutWidth - 4);
|
|
2547
|
+
const lines2 = [
|
|
2548
|
+
tabs,
|
|
2549
|
+
"",
|
|
2550
|
+
theme.fg("dim", ` ${pad("Shortcut", shortcutWidth)} Description`),
|
|
2551
|
+
...AGENTS_HELP_ROWS.map(([shortcut, description]) => ` ${theme.fg("accent", pad(shortcut, shortcutWidth))} ${theme.fg("text", truncateToWidth2(description, descriptionWidth))}`)
|
|
2552
|
+
];
|
|
2522
2553
|
return box(lines2);
|
|
2523
2554
|
}
|
|
2524
2555
|
if (!detail) {
|
|
@@ -2535,7 +2566,6 @@ ${this.primaryAgent.prompt}` };
|
|
|
2535
2566
|
lines2.push(`${cursor} ${indent}${taskState(theme, task2)} ${theme.fg("accent", `@${task2.agent}`)} ${theme.fg("text", task2.description)} ${theme.fg("dim", task2.id.slice(0, 8))}`);
|
|
2536
2567
|
}
|
|
2537
2568
|
}
|
|
2538
|
-
lines2.push("", theme.fg("dim", "↑↓ select enter inspect tab next ⇧tab scope esc close"));
|
|
2539
2569
|
return box(lines2);
|
|
2540
2570
|
}
|
|
2541
2571
|
const task = tasks[selectedTask];
|
|
@@ -2568,7 +2598,6 @@ ${this.primaryAgent.prompt}` };
|
|
|
2568
2598
|
if (transcript.length > INSPECTOR_BODY_LINES) {
|
|
2569
2599
|
lines.push(theme.fg("dim", `${scroll + 1}-${scroll + shown.length} of ${transcript.length}`));
|
|
2570
2600
|
}
|
|
2571
|
-
lines.push(theme.fg("dim", "Parent p/backspace Prev ← Next → ↑↓ scroll tab next ⇧tab scope esc back"));
|
|
2572
2601
|
return box(lines.map((line) => truncateToWidth2(line, contentWidth)));
|
|
2573
2602
|
},
|
|
2574
2603
|
handleInput: (data) => {
|
|
@@ -2616,7 +2645,7 @@ ${this.primaryAgent.prompt}` };
|
|
|
2616
2645
|
return;
|
|
2617
2646
|
}
|
|
2618
2647
|
if (matchesKey(data, "tab")) {
|
|
2619
|
-
const tabs = ["agents", "tasks", "settings"];
|
|
2648
|
+
const tabs = ["agents", "tasks", "settings", "help"];
|
|
2620
2649
|
tab = tabs[(tabs.indexOf(tab) + 1) % tabs.length] ?? "agents";
|
|
2621
2650
|
detail = false;
|
|
2622
2651
|
editing = false;
|
|
@@ -2766,6 +2795,11 @@ ${this.primaryAgent.prompt}` };
|
|
|
2766
2795
|
tui.requestRender();
|
|
2767
2796
|
return;
|
|
2768
2797
|
}
|
|
2798
|
+
if (tab === "help") {
|
|
2799
|
+
if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c"))
|
|
2800
|
+
done();
|
|
2801
|
+
return;
|
|
2802
|
+
}
|
|
2769
2803
|
if (!detail) {
|
|
2770
2804
|
if (matchesKey(data, "escape") || matchesKey(data, "ctrl+c"))
|
|
2771
2805
|
done();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-landstrip",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.6",
|
|
4
4
|
"description": "Sandboxed Bash and process-backed agents for Pi",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"landstrip",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"ci:test": "npm run test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@landstrip/landstrip": "^0.18.
|
|
42
|
+
"@landstrip/landstrip": "^0.18.6",
|
|
43
43
|
"jsonc-parser": "^3.3.1",
|
|
44
44
|
"minimatch": "^10.2.5",
|
|
45
45
|
"yaml": "^2.9.0"
|