@oh-my-pi/pi-agent-core 15.12.1 → 15.12.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/package.json +6 -6
- package/src/agent-loop.ts +6 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-agent-core",
|
|
4
|
-
"version": "15.12.
|
|
4
|
+
"version": "15.12.3",
|
|
5
5
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"fmt": "biome format --write ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@oh-my-pi/pi-ai": "15.12.
|
|
39
|
-
"@oh-my-pi/pi-catalog": "15.12.
|
|
40
|
-
"@oh-my-pi/pi-natives": "15.12.
|
|
41
|
-
"@oh-my-pi/pi-utils": "15.12.
|
|
42
|
-
"@oh-my-pi/snapcompact": "15.12.
|
|
38
|
+
"@oh-my-pi/pi-ai": "15.12.3",
|
|
39
|
+
"@oh-my-pi/pi-catalog": "15.12.3",
|
|
40
|
+
"@oh-my-pi/pi-natives": "15.12.3",
|
|
41
|
+
"@oh-my-pi/pi-utils": "15.12.3",
|
|
42
|
+
"@oh-my-pi/snapcompact": "15.12.3",
|
|
43
43
|
"@opentelemetry/api": "^1.9.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
package/src/agent-loop.ts
CHANGED
|
@@ -815,11 +815,15 @@ async function runLoopBody(
|
|
|
815
815
|
// Agent would stop here. Drain non-interrupting asides + follow-up messages.
|
|
816
816
|
await config.onBeforeYield?.();
|
|
817
817
|
// Skip queue drains when externally aborted (same stranding hazard as above).
|
|
818
|
+
// Re-poll steering too: a steer can land between the stop-boundary dequeue
|
|
819
|
+
// above and this yield point (e.g. queued while onBeforeYield ran). Without
|
|
820
|
+
// this poll it would strand in the queue until the next manual prompt.
|
|
821
|
+
const lateSteering = signal?.aborted ? [] : (await config.getSteeringMessages?.()) || [];
|
|
818
822
|
const asideMessages = signal?.aborted ? [] : resolveAsides(await config.getAsideMessages?.());
|
|
819
823
|
const followUpMessages = signal?.aborted ? [] : (await config.getFollowUpMessages?.()) || [];
|
|
820
|
-
if (asideMessages.length > 0 || followUpMessages.length > 0) {
|
|
824
|
+
if (lateSteering.length > 0 || asideMessages.length > 0 || followUpMessages.length > 0) {
|
|
821
825
|
// Set as pending so the inner loop processes them before stopping.
|
|
822
|
-
pendingMessages = [...asideMessages, ...followUpMessages];
|
|
826
|
+
pendingMessages = [...lateSteering, ...asideMessages, ...followUpMessages];
|
|
823
827
|
continue;
|
|
824
828
|
}
|
|
825
829
|
|