@giladbarnea/pi-user-agents 0.0.10 → 0.0.12
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/INTERNALS.md +1 -1
- package/PARSER_SPEC.md +5 -3
- package/README.md +2 -6
- package/autocomplete.ts +9 -2
- package/package.json +1 -1
- package/runner.ts +6 -1
- package/tool-render/FORK.md +2 -2
package/INTERNALS.md
CHANGED
|
@@ -113,7 +113,7 @@ Type `/agent -` and the option menu opens immediately — no Tab is required. Sh
|
|
|
113
113
|
|
|
114
114
|
The finite value menus are thinking levels, live providers, live models, and the session's live tool catalog. Models from the configured `enabledModels` scope lead the unfiltered model menu; once you type a query, Pi's fuzzy relevance controls the order and scope only breaks equal-score ties. `--provider` narrows the model menu for either `-m` or `--model`. A completed boolean, thinking level, provider, or model leaves exactly one trailing space.
|
|
115
115
|
|
|
116
|
-
`--tools`/`-t` and `--exclude-tools`/`-xt` complete one comma-delimited segment at a time. Accepting `grep` produces `--tools grep│` — the menu closes without inserting a space or comma. Type `,` to open the next segment immediately; already selected tools are omitted. Type a normal space when the tool list is finished.
|
|
116
|
+
`--tools`/`-t` and `--exclude-tools`/`-xt` complete one comma-delimited segment at a time. Accepting `grep` produces `--tools grep│` — the menu closes without inserting a space or comma. Type `,` to open the next segment immediately; already selected tools are omitted. Type a normal space when the tool list is finished. In `--tools`, a `+name`/`-name` entry keeps its sign: `+gr` completes to `+grep`.
|
|
117
117
|
|
|
118
118
|
Free-form values are guarded instead of guessed. Selecting `--system-prompt` produces `/agent --system-prompt "│" `, with the cursor between the quotes and the trailing separator already preserved.
|
|
119
119
|
|
package/PARSER_SPEC.md
CHANGED
|
@@ -205,7 +205,8 @@ The finite value domains implemented today are:
|
|
|
205
205
|
- tool names from the live public `pi.getAllTools()` catalog for `--tools`/`-t` and
|
|
206
206
|
`--exclude-tools`/`-xt`.
|
|
207
207
|
|
|
208
|
-
Tool completion is local to the active comma-delimited segment.
|
|
208
|
+
Tool completion is local to the active comma-delimited segment. In `--tools`, a leading `+` or
|
|
209
|
+
`-` stays in place and completion replaces only the name after it. Accepting a tool replaces only
|
|
209
210
|
that segment and closes the menu without adding a space or comma. Typing `,` immediately opens
|
|
210
211
|
the next segment and excludes every tool already selected elsewhere in the value. The user
|
|
211
212
|
types a normal space to finish the complete tool list. Other non-path value options remain
|
|
@@ -247,8 +248,9 @@ source spans:
|
|
|
247
248
|
- `value` — the value consumed by a leading value-taking option. A quoted value's span
|
|
248
249
|
includes its surrounding quotes;
|
|
249
250
|
- `invalid-value` — a leading closed-set value rejected by the same validation used at
|
|
250
|
-
submission and session creation: Pi's argument parser for thinking levels
|
|
251
|
-
|
|
251
|
+
submission and session creation: Pi's argument parser for thinking levels and tool-list
|
|
252
|
+
syntax (`+name`/`-name` entries cannot mix with plain names), exact live model IDs or
|
|
253
|
+
user-defined aliases, and the live provider and tool catalogs;
|
|
252
254
|
- `blocked` — a blocked option in args mode, plus the value a blocked value-taking option
|
|
253
255
|
would consume (`--theme ./theme.json` yields two `blocked` tokens). Unlike
|
|
254
256
|
`parseAgentCommand`, the scan never throws: it records the first blocked token and keeps
|
package/README.md
CHANGED
|
@@ -61,9 +61,7 @@ The first preserves the session's knowledge before the context window fills, wit
|
|
|
61
61
|
|
|
62
62
|
Every agent gets a row in a widget under the editor: status, task, model, turn count, tool uses, elapsed time, a one-cell context meter, and the last line of live activity.
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
<img src="screenshots/below-editor-widget.png" width="100%" alt="The user agents widget under the editor, showing one finished agent and its latest output">
|
|
66
|
-
</a>
|
|
64
|
+
[](https://raw.githubusercontent.com/giladbarnea/pi-user-agents/main/screenshots/below-editor-widget.png)
|
|
67
65
|
|
|
68
66
|
<div align="center"><em>The widget sits under the editor and stays out of your way.</em></div>
|
|
69
67
|
|
|
@@ -71,9 +69,7 @@ Every agent gets a row in a widget under the editor: status, task, model, turn c
|
|
|
71
69
|
|
|
72
70
|
Press `←` or `↓` from the editor to focus the widget. The selected row shows a short session ID and offers the same agent actions as the overlay. Press `Enter` to open the full conversation, streaming live and following the tail as it grows. Tool calls render as proper views — `read`, `edit`, `write`, `grep`, `find`, `ls`, and `bash` each get a dedicated format, everything else a readable generic one.
|
|
73
71
|
|
|
74
|
-
|
|
75
|
-
<img src="screenshots/overlay.png" width="100%" alt="The agent overlay: a rendered bash call, its output, a todo update, and the final response, over the dimmed main conversation">
|
|
76
|
-
</a>
|
|
72
|
+
[](https://raw.githubusercontent.com/giladbarnea/pi-user-agents/main/screenshots/overlay.png)
|
|
77
73
|
|
|
78
74
|
<div align="center"><em>The overlay, over a main conversation that never paused.</em></div>
|
|
79
75
|
|
package/autocomplete.ts
CHANGED
|
@@ -322,13 +322,20 @@ function getToolSegment(
|
|
|
322
322
|
): ToolSegment {
|
|
323
323
|
const value = line.slice(expectation.replacementStart, expectation.replacementEnd);
|
|
324
324
|
const cursorOffset = cursorCol - expectation.replacementStart;
|
|
325
|
-
const
|
|
325
|
+
const commaEnd = value.lastIndexOf(",", cursorOffset - 1) + 1;
|
|
326
|
+
// Pi's --tools takes +name/-name entries; completion replaces only the name after the sign.
|
|
327
|
+
const signLength =
|
|
328
|
+
expectation.option.semanticId === "tools" && /^[+-]/.test(value.slice(commaEnd, cursorOffset))
|
|
329
|
+
? 1
|
|
330
|
+
: 0;
|
|
331
|
+
const segmentStart = commaEnd + signLength;
|
|
326
332
|
const nextComma = value.indexOf(",", cursorOffset);
|
|
327
333
|
const segmentEnd = nextComma === -1 ? value.length : nextComma;
|
|
328
334
|
const selectedNames = new Set(
|
|
329
335
|
value
|
|
330
336
|
.split(",")
|
|
331
|
-
.filter((_name, index) => index !== value.slice(0,
|
|
337
|
+
.filter((_name, index) => index !== value.slice(0, commaEnd).split(",").length - 1)
|
|
338
|
+
.map((name) => name.replace(/^[+-]/, "")),
|
|
332
339
|
);
|
|
333
340
|
return {
|
|
334
341
|
fragment: value.slice(segmentStart, cursorOffset),
|
package/package.json
CHANGED
package/runner.ts
CHANGED
|
@@ -422,7 +422,12 @@ export function createAgentValueValidator(
|
|
|
422
422
|
}
|
|
423
423
|
if (option.completionDomain === "tool") {
|
|
424
424
|
const parsed = parseArgs([option.names[0]!, value]);
|
|
425
|
-
|
|
425
|
+
if (parsed.diagnostics.some((diagnostic) => diagnostic.type === "error")) return false;
|
|
426
|
+
// A --tools list of +name/-name entries names its tools after the sign.
|
|
427
|
+
const requestedNames =
|
|
428
|
+
option.semanticId === "tools"
|
|
429
|
+
? parsed.tools?.map((entry) => entry.replace(/^[+-]/, ""))
|
|
430
|
+
: parsed.excludeTools;
|
|
426
431
|
const knownNames = new Set(getToolNames());
|
|
427
432
|
return (requestedNames ?? []).every((name) => knownNames.has(name));
|
|
428
433
|
}
|
package/tool-render/FORK.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Provenance and boundary for the overlay's vendored historical tool renderer
|
|
3
|
-
last_updated: 2026-
|
|
3
|
+
last_updated: 2026-11-01T23-46
|
|
4
4
|
---
|
|
5
5
|
# The overlay renders tool history itself
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ longer be registered.
|
|
|
14
14
|
|
|
15
15
|
## Sources
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- [V-Stack, now Kendex](https://github.com/vanillagreencom/kendex/tree/main/pi-extensions/pi-tool-renderer/extensions/tool-renderer) — `read`, `edit`, `write`, `grep`, `find`, `ls`, originally copied through the former local curated extension. The local fork has been removed; this link identifies the upstream source, not a runtime dependency.
|
|
18
18
|
- `/Users/giladbarnea/.pi/agent/extensions/bash-rich-highlight/index.ts` — `bash`.
|
|
19
19
|
|
|
20
20
|
Both are **disabled** in committed `agent/settings.json`, while `pi-user-agents` is enabled.
|