@xl0/pi-lovely-agents 0.1.2 → 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 CHANGED
@@ -2,6 +2,45 @@
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
+
5
44
  ## [0.1.2] - 2026-09-10
6
45
 
7
46
  ### Breaking Changes
package/README.md CHANGED
@@ -92,7 +92,7 @@ Agents and Bash appear in separate groups, active tasks first within each group.
92
92
  - **Inputs / history** shows earlier requests and results.
93
93
  - **Follow-up** adds another request after the agent's current work.
94
94
  - **Steer** queues input for a live streaming run. Without a live target it becomes
95
- a Follow-up; foreground busy tasks reject it. Queued input can be lost on stop.
95
+ a Follow-up. Queued input can be lost on stop.
96
96
  - **Stop** cancels the work but keeps its files. An agent can take a new request later.
97
97
  - **Discard** stops it and removes it from active work. Files stay in place and
98
98
  results remain readable, but it cannot receive new input.
@@ -139,9 +139,8 @@ Background Bash currently supports Linux and macOS, not Windows.
139
139
  Open **`/lovely-agents` → Configuration**. Settings can apply to all projects or
140
140
  just this workspace; workspace settings win.
141
141
 
142
- **Background agents** and **Background Bash** are both on by default. Turn off
143
- Background agents if you want Pi to wait for agents to finish instead of leaving
144
- 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.
145
144
 
146
145
  Agent work and Bash jobs have separate concurrency limits, both initially 4.
147
146
  Extra work queues until a slot is free. Pi initially waits up to 30 seconds for
@@ -149,8 +148,11 @@ an agent result before leaving it in the background.
149
148
  These limits are shared process-wide, not per conversation. The roster reports
150
149
  held/max execution permits; task lists show only the current parent's tasks.
151
150
 
152
- Under **Models**, choose additional models Pi may use for agents. You can also
153
- configure these optional shortcuts:
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:
154
156
 
155
157
  | Alias | Suggested use |
156
158
  | --- | --- |
@@ -174,8 +176,8 @@ Each agent assignment has a 1-based run index, shown in tool results and notices
174
176
  Omit `run` for the current snapshot; `lines: 20` requests a shorter Bash tail.
175
177
  Older runs completed before this feature may require reading `history.md`.
176
178
 
177
- If Pi asks to wait for a result, the wait ends when the run finishes, pauses on
178
- a provider limit, or reaches the requested timeout. A timeout returns the
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
179
181
  latest output—it does not stop the task.
180
182
  The wait stays attached to the selected run; a later Follow-up cannot replace
181
183
  its answer. Prefer completion notices or a meaningful wait over short polling.
@@ -185,29 +187,23 @@ running; quitting or switching conversations stops it.** After a crash, lost
185
187
  work is marked interrupted rather than silently restarted. Agent conversations
186
188
  can receive a new request; Bash commands must be started again.
187
189
 
188
- Background agents pause on provider quota or rate limits. A successful request
189
- using the affected model can resume them. If your main conversation ended with
190
- 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.
191
192
 
192
193
  Task files live in `.pi/lovely-agents/` under your working directory and are
193
194
  ignored by Git. They include conversation history and command output, so treat
194
195
  them as potentially sensitive. Each task keeps its original
195
- `<parent-session>/<task-id>/` path. The parent's `active/` directory links to all
196
- non-discarded tasks, including idle specialists. It is a browsing index, rebuilt
197
- when that parent is reopened—not the authority for execution or deletion.
196
+ `<parent-session>/<task-id>/` path.
198
197
  Keep tasks until dependent work is integrated, then discard what is no longer
199
- needed. Existing old `archive/` contents are left untouched.
198
+ needed.
200
199
 
201
- There is no automatic deletion. From the package checkout/install directory:
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
202
 
203
- ```bash
204
- bun scripts/prune-tasks.ts /path/to/workspace # dry-run
205
- bun scripts/prune-tasks.ts /path/to/workspace --apply # permanently delete eligible tasks
206
- ```
207
-
208
- Pruning requires closed parent sessions and retains non-discarded tasks, pending
203
+ Pruning skips nothing silently: it refuses while another Pi process has a
204
+ session open here, and retains non-discarded tasks, pending
209
205
  notifications, unknown/corrupt records, and unsafe or still-needed descendants.
210
- Missing `active/` links never authorize deletion. Crash leftovers stay until
206
+ Crash leftovers stay until
211
207
  their parent is reopened; abandoned sessions are not automatically collected.
212
208
 
213
209
  ## Development