@juicesharp/rpiv-warp 2.14.0 → 2.14.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 +8 -0
- package/docs/events.md +12 -2
- package/index.ts +18 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to `@juicesharp/rpiv-warp` are documented here.
|
|
|
5
5
|
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.14.2] - 2026-10-23
|
|
9
|
+
|
|
10
|
+
## [2.14.1] - 2026-10-23
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Works with Pi 1.2 and later.** Pi 1.2 also fires `before_agent_start` for runs an extension starts with `pi.sendMessage(..., { triggerTurn: true })`, and those runs carry no prompt. rpiv-warp read the prompt anyway, so such a run blanked the Warp tab's query and announced a new turn with an empty prompt. A run started that way now keeps the last user query and sends no `session_start` or `prompt_submit`; the spinner, heartbeat and `stop` still fire. Older Pi versions behave as before. Thanks @jagaliano. ([#305](https://github.com/juicesharp/rpiv-mono/pull/305))
|
|
15
|
+
|
|
8
16
|
## [2.14.0] - 2026-10-23
|
|
9
17
|
|
|
10
18
|
## [2.13.10] - 2026-10-23
|
package/docs/events.md
CHANGED
|
@@ -11,8 +11,8 @@ no slash commands, no widgets, and no keyboard shortcuts.
|
|
|
11
11
|
| Pi event | Emits | Side effects |
|
|
12
12
|
| --- | --- | --- |
|
|
13
13
|
| `session_start` | `session_start` — only when `reason === "startup"` | none |
|
|
14
|
-
| `before_agent_start` | nothing | captures the prompt for `prompt_submit` and the heartbeat |
|
|
15
|
-
| `agent_start` | `session_start` (defensive re-announce)
|
|
14
|
+
| `before_agent_start` | nothing | captures the user prompt for `prompt_submit` and the heartbeat; a custom (`triggerTurn`) run captures nothing |
|
|
15
|
+
| `agent_start` | for a user run, `session_start` (defensive re-announce) then `prompt_submit`; for a custom (`triggerTurn`) run, nothing | starts the tab-title spinner, cancels the pending idle timer, starts the heartbeat |
|
|
16
16
|
| `agent_end` | one `tool_complete` per outstanding blocking call, then `stop` | stops the spinner, stops the heartbeat, arms the 300 ms idle timer |
|
|
17
17
|
| `tool_call` | `question_asked` — only for a tool in `blockingTools` | records the call's input, stops the spinner, pauses the heartbeat |
|
|
18
18
|
| `tool_execution_end` | `tool_complete` — only for a tool in `blockingTools` | restarts the spinner, resumes the heartbeat |
|
|
@@ -22,6 +22,16 @@ no slash commands, no widgets, and no keyboard shortcuts.
|
|
|
22
22
|
other than `"startup"`, so none of them notify — you are already looking at the
|
|
23
23
|
terminal in those cases.
|
|
24
24
|
|
|
25
|
+
### User runs vs custom (`triggerTurn`) runs
|
|
26
|
+
|
|
27
|
+
Pi 1.2.0 fires `before_agent_start` for both a submitted prompt (`messageType: "user"`,
|
|
28
|
+
carrying `prompt`) and a run started by `pi.sendMessage(..., { triggerTurn: true })`
|
|
29
|
+
(`messageType: "custom"`, no `prompt`). Only a user run carries the query Warp shows, so for
|
|
30
|
+
a custom run the extension leaves the captured query untouched and skips the defensive
|
|
31
|
+
`session_start` and the `prompt_submit` at `agent_start`. The spinner, heartbeat, and the
|
|
32
|
+
`stop` at `agent_end` still fire, so a background turn shows activity without blanking or
|
|
33
|
+
re-announcing the tab's query.
|
|
34
|
+
|
|
25
35
|
### Why `agent_end` drains blocking calls
|
|
26
36
|
|
|
27
37
|
Pressing ESC during a blocking tool aborts it, and an aborted tool never fires
|
package/index.ts
CHANGED
|
@@ -29,6 +29,11 @@ interface PendingBlockingCall {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
let pendingQuery = "";
|
|
32
|
+
// True while the in-flight run was started by `pi.sendMessage(..., { triggerTurn: true })`
|
|
33
|
+
// rather than a user prompt. Set at `before_agent_start` and kept through `agent_end`:
|
|
34
|
+
// retries and pre-settle continuations re-emit `agent_start` without a new
|
|
35
|
+
// `before_agent_start`.
|
|
36
|
+
let activeRunIsCustom = false;
|
|
32
37
|
let idleTimer: ReturnType<typeof setTimeout> | undefined;
|
|
33
38
|
let heartbeatInterval: ReturnType<typeof setInterval> | undefined;
|
|
34
39
|
let heartbeatMs = DEFAULT_HEARTBEAT_MS;
|
|
@@ -40,6 +45,7 @@ const pendingBlockingCalls = new Map<string, PendingBlockingCall>();
|
|
|
40
45
|
|
|
41
46
|
export function __resetState(): void {
|
|
42
47
|
pendingQuery = "";
|
|
48
|
+
activeRunIsCustom = false;
|
|
43
49
|
if (idleTimer !== undefined) {
|
|
44
50
|
clearTimeout(idleTimer);
|
|
45
51
|
idleTimer = undefined;
|
|
@@ -166,12 +172,20 @@ export default function (pi: ExtensionAPI): void {
|
|
|
166
172
|
});
|
|
167
173
|
|
|
168
174
|
pi.on("before_agent_start", async (event) => {
|
|
169
|
-
|
|
175
|
+
// A custom run carries no prompt; keep the query of the last user run.
|
|
176
|
+
if (event.messageType === "custom") {
|
|
177
|
+
activeRunIsCustom = true;
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
activeRunIsCustom = false;
|
|
181
|
+
pendingQuery = event.prompt;
|
|
170
182
|
});
|
|
171
183
|
|
|
172
184
|
pi.on("agent_start", async (_event, ctx) => {
|
|
173
|
-
|
|
174
|
-
|
|
185
|
+
if (!activeRunIsCustom) {
|
|
186
|
+
emit(buildSessionStartPayload(ctx)); // Item 2: defensive re-announce
|
|
187
|
+
emit(buildPromptSubmitPayload(ctx, pendingQuery));
|
|
188
|
+
}
|
|
175
189
|
startSpinner(titleSuffix(ctx));
|
|
176
190
|
cancelIdleTimer(); // Item 3: cancel pending idle from previous turn
|
|
177
191
|
startHeartbeat(ctx, heartbeatMs); // Item 4: heartbeat
|
|
@@ -211,6 +225,7 @@ export default function (pi: ExtensionAPI): void {
|
|
|
211
225
|
cancelIdleTimer();
|
|
212
226
|
stopHeartbeat();
|
|
213
227
|
pendingQuery = "";
|
|
228
|
+
activeRunIsCustom = false;
|
|
214
229
|
pendingBlockingCalls.clear();
|
|
215
230
|
stopSpinner();
|
|
216
231
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-warp",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Pi extension. Native Warp terminal notifications, dispatched via OSC 777 on Pi lifecycle events.",
|
|
6
6
|
"keywords": [
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
"@earendil-works/pi-coding-agent": "*"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@juicesharp/rpiv-config": "^2.14.
|
|
62
|
+
"@juicesharp/rpiv-config": "^2.14.2"
|
|
63
63
|
}
|
|
64
64
|
}
|