@cr1ms0n/pi-subagent 0.8.1 → 0.8.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/CHANGELOG.md CHANGED
@@ -12,7 +12,15 @@
12
12
  The entries below are retained upstream history from @parke.dev/pi-subagent.
13
13
 
14
14
 
15
- ## Unreleased
15
+ ## 0.8.2 — 2026-09-10
16
+
17
+ ### Background completion delivery
18
+
19
+ - Automatic terminal notifications for `async: true` runs now use Pi's `steer`
20
+ delivery queue with `triggerTurn: true`, making completion messages available
21
+ before the parent's next LLM call. Foreground runs, explicit management
22
+ actions, message content, batching, persistence, and usage accounting are
23
+ unchanged.
16
24
 
17
25
  ### Machine-wide worktree GC
18
26
 
@@ -5,9 +5,9 @@
5
5
  > the plan: the inline spinner uses a wall-clock frame (Pi's working indicator
6
6
  > drives repaints, so no timer is owned); the ledger command landed as
7
7
  > `/subagent-cost` via `ctx.ui.notify`. Phase 4 shipped as the background-only
8
- > ambient widget plus batched `followUp` completion notifications with
9
- > flush-time wait-suppression (see docs/UX.md). The `description` param is the
10
- > task label across all surfaces. This document is retained as design rationale.
8
+ > ambient widget plus batched `steer` completion notifications with flush-time
9
+ > wait-suppression (see docs/UX.md). The `description` param is the task label
10
+ > across all surfaces. This document is retained as design rationale.
11
11
 
12
12
  Goal: remove the duplicated cost footer, make inline chat rendering clean and
13
13
  smooth, and align every surface with Pi's native conventions. Informed by a
@@ -137,7 +137,7 @@ Files: `src/extension.ts`, new `src/notifications.ts`.
137
137
  ```
138
138
 
139
139
  Cleared when no background runs. Config: `widget: "background" | "off"`.
140
- - **Completion notifications** via `pi.sendMessage(…, { deliverAs: "followUp",
140
+ - **Completion notifications** via `pi.sendMessage(…, { deliverAs: "steer",
141
141
  triggerTurn: true })` + `registerMessageRenderer`: themed compact box for the
142
142
  human (state, stats, first-line preview, artifact/session pointers),
143
143
  structured payload for the model. Replaces the bare `ctx.ui.notify` toast.
package/docs/UX.md CHANGED
@@ -66,11 +66,11 @@ Cleared when the last background run settles. Spinner and elapsed animate on
66
66
  a 250ms interval that exists only while background runs are live.
67
67
 
68
68
  ### Completion notifications (background runs only)
69
- When an async run reaches a terminal state, a `followUp` message (custom type
70
- `subagent-completion`) notifies the parent LLM so it reacts without polling.
71
- The human sees a themed compact box (state glyph, label, stats, one-line
72
- preview, artifact pointers); the LLM sees plain text with run ids and a
73
- `wait { id }` pointer.
69
+ When an async run reaches a terminal state, a `steer` message (custom type
70
+ `subagent-completion`) is queued for the parent LLM before its next LLM call,
71
+ so it can react without polling. The human sees a themed compact box (state
72
+ glyph, label, stats, one-line preview, artifact pointers); the LLM sees plain
73
+ text with run ids and a `wait { id }` pointer.
74
74
 
75
75
  - Successes within a short window batch into one message (no fanout spam);
76
76
  failures bypass batching and flush immediately, carrying held successes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cr1ms0n/pi-subagent",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Community fork of Luke Parke's pi-subagent with explicit model policy and model visibility for Pi",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/config.ts CHANGED
@@ -83,7 +83,7 @@ export interface SubagentConfig {
83
83
  */
84
84
  widget: WidgetMode;
85
85
  /**
86
- * Batched completion followUp messages for async runs. `"off"` disables the
86
+ * Batched completion messages for async runs. `"off"` disables the
87
87
  * CompletionBatcher so the parent is not notified on finish.
88
88
  */
89
89
  notifications: NotificationMode;
package/src/extension.ts CHANGED
@@ -763,7 +763,7 @@ export default function registerSubagent(pi: ExtensionAPI): void {
763
763
  runtime.unsubscribeLedger = runtime.registry.subscribe((event) => {
764
764
  if (event.sessionKey === runtime.key) runtime.ledgerDirty = true;
765
765
  });
766
- // Background-run completion notifications: batched followUp messages so
766
+ // Background-run completion notifications: batched steer messages so
767
767
  // the parent LLM reacts without polling. Foreground runs deliver inline.
768
768
  // `notifications: "off"` skips construction; subscribe still uses optional chain.
769
769
  if (runtime.config.notifications !== "off") {
@@ -806,7 +806,7 @@ export default function registerSubagent(pi: ExtensionAPI): void {
806
806
  ].join("\n"),
807
807
  display: true,
808
808
  details,
809
- }, { deliverAs: "followUp", triggerTurn: true });
809
+ }, { deliverAs: "steer", triggerTurn: true });
810
810
  });
811
811
  }
812
812
 
@@ -2,8 +2,8 @@
2
2
  * Background-run completion notifications.
3
3
  *
4
4
  * When an async run reaches a terminal state, the parent LLM is notified with
5
- * a followUp message (delivered when the agent is idle / between turns) so it
6
- * can react without polling status/wait. Matches the notification-as-delivery
5
+ * a steer message (queued for delivery before the next LLM call) so it can
6
+ * react without polling status/wait. Matches the notification-as-delivery
7
7
  * semantics of `wait`: whichever path delivers first wins via markDelivered.
8
8
  *
9
9
  * Batching: successes completing within a short window group into a single