@xl0/pi-lovely-agents 0.1.1 → 0.1.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.
- package/CHANGELOG.md +66 -0
- package/README.md +50 -15
- package/extensions/lovely-agents/agent.ts +174 -450
- package/extensions/lovely-agents/bash.ts +65 -111
- package/extensions/lovely-agents/child-session.ts +65 -69
- package/extensions/lovely-agents/config.ts +18 -19
- package/extensions/lovely-agents/coordinator.ts +53 -186
- package/extensions/lovely-agents/definitions.ts +33 -24
- package/extensions/lovely-agents/index.ts +76 -156
- package/extensions/lovely-agents/lifecycle.ts +68 -162
- package/extensions/lovely-agents/management.ts +113 -350
- package/extensions/lovely-agents/notifications.ts +16 -45
- package/extensions/lovely-agents/prune.ts +198 -0
- package/extensions/lovely-agents/rendering.ts +11 -24
- package/extensions/lovely-agents/state.ts +282 -277
- package/extensions/lovely-agents/task-panel.ts +49 -40
- package/extensions/lovely-agents/tools.ts +74 -121
- package/extensions/lovely-agents/utils.ts +27 -0
- package/node_modules/@xl0/pi-lovely-config/CHANGELOG.md +12 -0
- package/node_modules/@xl0/pi-lovely-config/README.md +44 -2
- package/node_modules/@xl0/pi-lovely-config/package.json +3 -2
- package/node_modules/@xl0/pi-lovely-config/src/config.ts +87 -45
- package/node_modules/@xl0/pi-lovely-config/src/ui.ts +48 -21
- package/package.json +10 -8
- package/skills/agent/SKILL.md +15 -9
- package/skills/agent-creator/SKILL.md +1 -1
- package/extensions/lovely-agents/provider-limits.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.3] - 2026-09-20
|
|
6
|
+
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- Remove foreground mode and the `backgroundAgents` setting: agent calls wait up to `waitMs` and then detach, and Follow-ups are always accepted without waiting for their result.
|
|
10
|
+
- Remove provider-limit suspension, automatic recovery, and the `/continue` command: a run that hits a quota or rate limit fails like any other provider error and notifies the parent.
|
|
11
|
+
- Remove the `active/` task index and the discard support for unsupported metadata versions; such records remain a diagnostic until deleted by hand.
|
|
12
|
+
- Ignore project Agent Definitions and workspace settings unless Pi evaluated project trust or a `/trust` decision is saved; ignored resources are reported as warnings. Ancestor `.pi/agents` directories owned by another user are skipped.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Accept a list of Task References in `task_discard` and `task_stop`, so cleaning up many tasks takes one call; a bad reference is reported without abandoning the rest.
|
|
17
|
+
- Require Pi 0.86.1 or newer; child prompts are now rendered by Pi, with the tool list and rules added as prompt sections.
|
|
18
|
+
- Replace the shipped `scripts/prune-tasks.ts` with **`/lovely-agents` → Prune discarded tasks**, which shows a dry run and asks before deleting.
|
|
19
|
+
- Write Bash output straight to `output.log` from the command, preserving the order of stdout and stderr, and read tails on demand instead of copying them into task metadata while it runs.
|
|
20
|
+
- Log agent inputs in `history.md` as the child session receives them, mark run ends as `<run N outcome>`, and no longer fail a run when writing the history log fails.
|
|
21
|
+
- Report a single descendant count per agent task instead of per-state summaries, and omit descendants from notifications.
|
|
22
|
+
- Use one task ordering everywhere: Agents before Bash, active states first, newest created first.
|
|
23
|
+
- Keep Lovely tools and their schemas static instead of hiding tools and parameters as settings change; disabled Bash and depth limits are rejected when called, and `waitMs` is ignored while background agents are disabled.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Fix a scheduler deadlock when an agent waits on several tasks in parallel at full capacity.
|
|
28
|
+
- Return the execution permit of a promoted Follow-up when the task is stopped before it starts.
|
|
29
|
+
- Stop detached descendants when an `agent` call is cancelled before detachment.
|
|
30
|
+
- Deliver notifications to idle or suspended child agents without starting a turn outside the scheduler.
|
|
31
|
+
- Resend notifications dropped when the parent turn is aborted before they are delivered.
|
|
32
|
+
- Reclaim a stale session lease left by a crashed process whose PID this process reuses.
|
|
33
|
+
- Settle Bash tasks when the shell exits, killing leftover background jobs that keep its pipes open.
|
|
34
|
+
- Include tool-specific guidelines in child system prompts.
|
|
35
|
+
- Reject symlinked task directories before reading or mutating task metadata.
|
|
36
|
+
- Keep tasks controllable after the system clock steps backwards.
|
|
37
|
+
- Reopen a provider gate after successful tool-use turns, not only final replies.
|
|
38
|
+
- Limit streaming reply snapshots to two durable writes per second.
|
|
39
|
+
- Accept Bash stdin sent immediately after a task is reported running, instead of failing before the process is spawned.
|
|
40
|
+
- Stop timed `task_output` waits from failing when the directory watcher reports an already-renamed temporary metadata file.
|
|
41
|
+
- Keep unrelated staged changes out of the release commit.
|
|
42
|
+
- Show a persistent session-ownership warning and disable Lovely Agents initialization when another Pi process owns the session's tasks.
|
|
43
|
+
|
|
44
|
+
## [0.1.2] - 2026-09-10
|
|
45
|
+
|
|
46
|
+
### Breaking Changes
|
|
47
|
+
|
|
48
|
+
- Keep discarded task files at their original paths and return `taskDirectory` with `state: "discarded"` from `task_discard`.
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- Retrieve retained results by run index with `task_output(run: N)`, including after discard, and identify runs in results and completion notices.
|
|
53
|
+
- Browse non-discarded tasks through an `active/` index and safely prune discarded tasks with the dry-run-first `scripts/prune-tasks.ts` command.
|
|
54
|
+
- Report child progress in task inspection and the panel with `task_update` without notifying the parent.
|
|
55
|
+
- Scroll live output with keyboard navigation, Bash tail-following, and visible exit codes or termination signals.
|
|
56
|
+
- Read shorter Bash output tails with `task_output(lines: N)`.
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- Group Agents and Bash separately and list active tasks first.
|
|
61
|
+
- Show the latest Bash output in UTF-8-safe completion previews.
|
|
62
|
+
- Clarify Steer acceptance and Follow-up conversion, and expose process-wide capacity and Bash queue reasons.
|
|
63
|
+
- Guide agents to delegate independent implementation work and keep coupled changes in the parent.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- Keep output waits attached to the selected run across Follow-ups.
|
|
68
|
+
- Deliver pending completion notifications for discarded tasks.
|
|
69
|
+
- Prevent another Pi process from claiming tasks whose cleanup failed.
|
|
70
|
+
|
|
5
71
|
## [0.1.1] - 2026-09-06
|
|
6
72
|
|
|
7
73
|
- Publish through GitHub Actions with npm provenance.
|
package/README.md
CHANGED
|
@@ -83,14 +83,19 @@ agents get the normal tools and extensions; a role description is not a sandbox.
|
|
|
83
83
|
|
|
84
84
|
Open **`/lovely-agents` → Tasks**, or press **Down with an empty editor** to focus
|
|
85
85
|
the task list below it.
|
|
86
|
+
Agents and Bash appear in separate groups, active tasks first within each group.
|
|
86
87
|
|
|
87
88
|
- **Arrow keys** select a task; **Enter** opens its actions.
|
|
88
|
-
- **Live output**
|
|
89
|
+
- **Live output** scrolls with arrows, PgUp/PgDn, Home/End. Bash opens at the
|
|
90
|
+
bottom and follows new output; scrolling up pauses following, End resumes it.
|
|
91
|
+
Its fixed header includes the exit code and termination signal.
|
|
89
92
|
- **Inputs / history** shows earlier requests and results.
|
|
90
93
|
- **Follow-up** adds another request after the agent's current work.
|
|
91
|
-
- **Steer**
|
|
94
|
+
- **Steer** queues input for a live streaming run. Without a live target it becomes
|
|
95
|
+
a Follow-up. Queued input can be lost on stop.
|
|
92
96
|
- **Stop** cancels the work but keeps its files. An agent can take a new request later.
|
|
93
|
-
- **Discard** stops and
|
|
97
|
+
- **Discard** stops it and removes it from active work. Files stay in place and
|
|
98
|
+
results remain readable, but it cannot receive new input.
|
|
94
99
|
- **Esc** returns to the editor.
|
|
95
100
|
|
|
96
101
|
You can also ask Pi directly:
|
|
@@ -102,6 +107,14 @@ You can also ask Pi directly:
|
|
|
102
107
|
Tool calls and notifications are compact by default. **Ctrl+O** expands their
|
|
103
108
|
full contents.
|
|
104
109
|
|
|
110
|
+
Children can call `task_update({ progress: "Root cause found; testing the fix" })`
|
|
111
|
+
to report meaningful milestones or blockers in up to 240 characters. Progress
|
|
112
|
+
replaces the initial-input preview in the panel and appears in task inspection.
|
|
113
|
+
It does not rename the task, change its lifecycle state, notify or wake the parent.
|
|
114
|
+
Each new run clears the report; earlier reports remain with their run's result.
|
|
115
|
+
Default-tool children get this tool automatically. If a Definition has an explicit
|
|
116
|
+
`tools` list, include `task_update` to allow progress reporting.
|
|
117
|
+
|
|
105
118
|
## Background Bash
|
|
106
119
|
|
|
107
120
|
Ask Pi to run a long command in the background:
|
|
@@ -110,6 +123,8 @@ Ask Pi to run a long command in the background:
|
|
|
110
123
|
|
|
111
124
|
The command appears alongside agent tasks. You can inspect its output or stop
|
|
112
125
|
it from the same menu. Normal, short Bash commands still work as before.
|
|
126
|
+
Detached completion automatically notifies Pi and wakes an idle parent.
|
|
127
|
+
Synchronous completion and explicit stops do not send a completion notice.
|
|
113
128
|
|
|
114
129
|
For a command that needs input, **Write stdin** sends exactly what you type;
|
|
115
130
|
include a newline if the command expects one. **Close stdin** sends EOF: “there
|
|
@@ -124,16 +139,20 @@ Background Bash currently supports Linux and macOS, not Windows.
|
|
|
124
139
|
Open **`/lovely-agents` → Configuration**. Settings can apply to all projects or
|
|
125
140
|
just this workspace; workspace settings win.
|
|
126
141
|
|
|
127
|
-
**Background
|
|
128
|
-
|
|
129
|
-
work running. Turning either switch off does not stop tasks already accepted.
|
|
142
|
+
**Background Bash** is on by default. Turning it off does not stop tasks already
|
|
143
|
+
accepted.
|
|
130
144
|
|
|
131
145
|
Agent work and Bash jobs have separate concurrency limits, both initially 4.
|
|
132
146
|
Extra work queues until a slot is free. Pi initially waits up to 30 seconds for
|
|
133
147
|
an agent result before leaving it in the background.
|
|
148
|
+
These limits are shared process-wide, not per conversation. The roster reports
|
|
149
|
+
held/max execution permits; task lists show only the current parent's tasks.
|
|
134
150
|
|
|
135
|
-
Under **Models**, choose additional models Pi may use for agents.
|
|
136
|
-
|
|
151
|
+
Under **Models**, choose additional models Pi may use for agents. Unavailable
|
|
152
|
+
entries warn and are skipped without dropping available ones; saved IDs remain
|
|
153
|
+
intact. An empty selection includes the parent model, but a nonempty selection
|
|
154
|
+
with no available entries does not fall back to it. You can also configure
|
|
155
|
+
these optional shortcuts:
|
|
137
156
|
|
|
138
157
|
| Alias | Suggested use |
|
|
139
158
|
| --- | --- |
|
|
@@ -152,24 +171,40 @@ Long results aren't lost. Pi's output-reading tool returns at most **2,000 lines
|
|
|
152
171
|
or 50 KiB** at a time, with a truncation notice and a file path when capped.
|
|
153
172
|
These are snapshots, not pages to assemble by repeatedly reading. Full agent
|
|
154
173
|
replies are in `history.md`; full Bash output is in `output.log`.
|
|
174
|
+
Each agent assignment has a 1-based run index, shown in tool results and notices.
|
|
175
|
+
`task_output(id, run: 2)` retrieves that run even after later Follow-ups start.
|
|
176
|
+
Omit `run` for the current snapshot; `lines: 20` requests a shorter Bash tail.
|
|
177
|
+
Older runs completed before this feature may require reading `history.md`.
|
|
155
178
|
|
|
156
|
-
If Pi asks to wait for a result, the wait ends when the run finishes
|
|
157
|
-
|
|
179
|
+
If Pi asks to wait for a result, the wait ends when the run finishes or reaches
|
|
180
|
+
the requested timeout. A timeout returns the
|
|
158
181
|
latest output—it does not stop the task.
|
|
182
|
+
The wait stays attached to the selected run; a later Follow-up cannot replace
|
|
183
|
+
its answer. Prefer completion notices or a meaningful wait over short polling.
|
|
159
184
|
|
|
160
185
|
Tasks belong to the Pi conversation that started them. **`/reload` keeps work
|
|
161
186
|
running; quitting or switching conversations stops it.** After a crash, lost
|
|
162
187
|
work is marked interrupted rather than silently restarted. Agent conversations
|
|
163
188
|
can receive a new request; Bash commands must be started again.
|
|
164
189
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
an error or was aborted, **`/continue`** resumes it and eligible paused agents.
|
|
190
|
+
An agent that hits a provider quota or rate limit fails like any other provider
|
|
191
|
+
error; Pi is notified and can send it a Follow-up once the limit clears.
|
|
168
192
|
|
|
169
193
|
Task files live in `.pi/lovely-agents/` under your working directory and are
|
|
170
194
|
ignored by Git. They include conversation history and command output, so treat
|
|
171
|
-
them as potentially sensitive.
|
|
172
|
-
|
|
195
|
+
them as potentially sensitive. Each task keeps its original
|
|
196
|
+
`<parent-session>/<task-id>/` path.
|
|
197
|
+
Keep tasks until dependent work is integrated, then discard what is no longer
|
|
198
|
+
needed.
|
|
199
|
+
|
|
200
|
+
There is no automatic deletion. **`/lovely-agents` → Prune discarded tasks**
|
|
201
|
+
shows what would be deleted in this workspace and asks before deleting.
|
|
202
|
+
|
|
203
|
+
Pruning skips nothing silently: it refuses while another Pi process has a
|
|
204
|
+
session open here, and retains non-discarded tasks, pending
|
|
205
|
+
notifications, unknown/corrupt records, and unsafe or still-needed descendants.
|
|
206
|
+
Crash leftovers stay until
|
|
207
|
+
their parent is reopened; abandoned sessions are not automatically collected.
|
|
173
208
|
|
|
174
209
|
## Development
|
|
175
210
|
|