@oh-my-pi/pi-agent-core 18.11.2 → 18.11.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 +6 -0
- package/dist/types/types.d.ts +3 -1
- package/package.json +8 -8
- package/src/agent.ts +2 -3
- package/src/types.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.11.3] - 2026-10-16
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `prepareQueuedMessages` receives which queue (`steering` or `followUp`) a batch came from ([#16026](https://github.com/can1357/oh-my-pi/pull/16026))
|
|
10
|
+
|
|
5
11
|
## [18.11.2] - 2026-10-16
|
|
6
12
|
|
|
7
13
|
### Added
|
package/dist/types/types.d.ts
CHANGED
|
@@ -12,8 +12,10 @@ export interface QueuedMessagePreparation {
|
|
|
12
12
|
/** Append context after the originals; undefined stops this attempt, retaining originals unless explicitly removed. */
|
|
13
13
|
commit(): readonly AgentMessage[] | undefined;
|
|
14
14
|
}
|
|
15
|
+
/** Which agent queue a batch came from: steering amends the running task, follow-ups start the next one. */
|
|
16
|
+
export type QueuedMessageQueue = "steering" | "followUp";
|
|
15
17
|
/** Prepare an exclusively claimed batch. Undefined delivers unchanged; the signal also aborts when the claim is cancelled. */
|
|
16
|
-
export type PrepareQueuedMessages = (messages: readonly AgentMessage[], signal: AbortSignal) => QueuedMessagePreparation | undefined | Promise<QueuedMessagePreparation | undefined>;
|
|
18
|
+
export type PrepareQueuedMessages = (messages: readonly AgentMessage[], signal: AbortSignal, queue: QueuedMessageQueue) => QueuedMessagePreparation | undefined | Promise<QueuedMessagePreparation | undefined>;
|
|
17
19
|
/** Called once an aside has been inserted into the agent's live context. */
|
|
18
20
|
export declare const ASIDE_MESSAGE_COMMIT: unique symbol;
|
|
19
21
|
/** Symbol-keyed handoff for one finalized, tool-owned stream speculation session. */
|
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": "18.11.
|
|
4
|
+
"version": "18.11.3",
|
|
5
5
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": {
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
"fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@oh-my-pi/pi-ai": "18.11.
|
|
42
|
-
"@oh-my-pi/pi-catalog": "18.11.
|
|
43
|
-
"@oh-my-pi/pi-natives": "18.11.
|
|
44
|
-
"@oh-my-pi/pi-utils": "18.11.
|
|
45
|
-
"@oh-my-pi/pi-wire": "18.11.
|
|
46
|
-
"@oh-my-pi/snapcompact": "18.11.
|
|
41
|
+
"@oh-my-pi/pi-ai": "18.11.3",
|
|
42
|
+
"@oh-my-pi/pi-catalog": "18.11.3",
|
|
43
|
+
"@oh-my-pi/pi-natives": "18.11.3",
|
|
44
|
+
"@oh-my-pi/pi-utils": "18.11.3",
|
|
45
|
+
"@oh-my-pi/pi-wire": "18.11.3",
|
|
46
|
+
"@oh-my-pi/snapcompact": "18.11.3",
|
|
47
47
|
"@opentelemetry/api": "^1.9.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@oh-my-pi/omptype": "18.11.
|
|
50
|
+
"@oh-my-pi/omptype": "18.11.3",
|
|
51
51
|
"@opentelemetry/context-async-hooks": "^2.9.0",
|
|
52
52
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
53
53
|
"@types/bun": "^1.3.14"
|
package/src/agent.ts
CHANGED
|
@@ -60,6 +60,7 @@ import type {
|
|
|
60
60
|
AgentTurnEndContext,
|
|
61
61
|
AsideMessage,
|
|
62
62
|
PrepareQueuedMessages,
|
|
63
|
+
QueuedMessageQueue,
|
|
63
64
|
SpeculativeToolExecutionConfig,
|
|
64
65
|
StreamFn,
|
|
65
66
|
ToolCallContext,
|
|
@@ -385,8 +386,6 @@ interface CursorToolResultEntry {
|
|
|
385
386
|
additionalContext?: string;
|
|
386
387
|
}
|
|
387
388
|
|
|
388
|
-
type QueuedMessageQueue = "steering" | "followUp";
|
|
389
|
-
|
|
390
389
|
interface LiveSteeredEntry {
|
|
391
390
|
message: AgentMessage;
|
|
392
391
|
controller: AbortController | undefined;
|
|
@@ -1009,7 +1008,7 @@ export class Agent {
|
|
|
1009
1008
|
this.#queuedMessageClaims[queue] = claim;
|
|
1010
1009
|
const preparationSignal = AbortSignal.any([signal, claim.controller.signal]);
|
|
1011
1010
|
try {
|
|
1012
|
-
const preparation = await prepare(messages, preparationSignal);
|
|
1011
|
+
const preparation = await prepare(messages, preparationSignal, queue);
|
|
1013
1012
|
signal.throwIfAborted();
|
|
1014
1013
|
if (preparationSignal.aborted || this.#queuedMessageClaims[queue] !== claim) return [];
|
|
1015
1014
|
const additional = preparation?.commit();
|
package/src/types.ts
CHANGED
|
@@ -38,10 +38,14 @@ export interface QueuedMessagePreparation {
|
|
|
38
38
|
commit(): readonly AgentMessage[] | undefined;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/** Which agent queue a batch came from: steering amends the running task, follow-ups start the next one. */
|
|
42
|
+
export type QueuedMessageQueue = "steering" | "followUp";
|
|
43
|
+
|
|
41
44
|
/** Prepare an exclusively claimed batch. Undefined delivers unchanged; the signal also aborts when the claim is cancelled. */
|
|
42
45
|
export type PrepareQueuedMessages = (
|
|
43
46
|
messages: readonly AgentMessage[],
|
|
44
47
|
signal: AbortSignal,
|
|
48
|
+
queue: QueuedMessageQueue,
|
|
45
49
|
) => QueuedMessagePreparation | undefined | Promise<QueuedMessagePreparation | undefined>;
|
|
46
50
|
|
|
47
51
|
/** Called once an aside has been inserted into the agent's live context. */
|