@oh-my-pi/pi-agent-core 17.2.9 → 17.2.10
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/README.md +4 -4
- package/package.json +8 -8
- package/src/compaction/compaction.ts +4 -1
- package/src/compaction/openai.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [17.2.10] - 2026-08-06
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed an issue in remote OpenAI response compaction replay where output-only `status` fields were incorrectly sent back as input, affecting persisted native and V1/V2 replacement history.
|
|
10
|
+
|
|
5
11
|
## [17.2.9] - 2026-08-05
|
|
6
12
|
|
|
7
13
|
### Fixed
|
package/README.md
CHANGED
|
@@ -279,17 +279,17 @@ const agent = new Agent({
|
|
|
279
279
|
|
|
280
280
|
## Tools
|
|
281
281
|
|
|
282
|
-
Define tools using `AgentTool` with
|
|
282
|
+
Define tools using `AgentTool` with an omptype parameter schema.
|
|
283
283
|
|
|
284
284
|
```typescript
|
|
285
|
-
import {
|
|
285
|
+
import { type } from "@oh-my-pi/omptype";
|
|
286
286
|
|
|
287
287
|
const readFileTool: AgentTool = {
|
|
288
288
|
name: "read_file",
|
|
289
289
|
label: "Read File", // For UI display
|
|
290
290
|
description: "Read a file's contents",
|
|
291
|
-
parameters:
|
|
292
|
-
path:
|
|
291
|
+
parameters: type({
|
|
292
|
+
path: type("string").describe("File path"),
|
|
293
293
|
}),
|
|
294
294
|
execute: async (toolCallId, params, signal, onUpdate, context) => {
|
|
295
295
|
const content = await fs.readFile(params.path, "utf-8");
|
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": "17.2.
|
|
4
|
+
"version": "17.2.10",
|
|
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,16 +35,16 @@
|
|
|
35
35
|
"fmt": "biome format --write ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@oh-my-pi/pi-ai": "17.2.
|
|
39
|
-
"@oh-my-pi/pi-catalog": "17.2.
|
|
40
|
-
"@oh-my-pi/pi-natives": "17.2.
|
|
41
|
-
"@oh-my-pi/pi-utils": "17.2.
|
|
42
|
-
"@oh-my-pi/pi-wire": "17.2.
|
|
43
|
-
"@oh-my-pi/snapcompact": "17.2.
|
|
38
|
+
"@oh-my-pi/pi-ai": "17.2.10",
|
|
39
|
+
"@oh-my-pi/pi-catalog": "17.2.10",
|
|
40
|
+
"@oh-my-pi/pi-natives": "17.2.10",
|
|
41
|
+
"@oh-my-pi/pi-utils": "17.2.10",
|
|
42
|
+
"@oh-my-pi/pi-wire": "17.2.10",
|
|
43
|
+
"@oh-my-pi/snapcompact": "17.2.10",
|
|
44
44
|
"@opentelemetry/api": "^1.9.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@oh-my-pi/omptype": "17.2.
|
|
47
|
+
"@oh-my-pi/omptype": "17.2.10",
|
|
48
48
|
"@opentelemetry/context-async-hooks": "^2.9.0",
|
|
49
49
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
50
50
|
"@types/bun": "^1.3.14"
|
|
@@ -26,6 +26,7 @@ import * as AIError from "@oh-my-pi/pi-ai/error";
|
|
|
26
26
|
import { createOpenAICodexCompactionRequestContext } from "@oh-my-pi/pi-ai/providers/openai-codex-responses";
|
|
27
27
|
import { convertTools } from "@oh-my-pi/pi-ai/providers/openai-responses";
|
|
28
28
|
import { buildResponsesInput, resolveOpenAICompatPolicy } from "@oh-my-pi/pi-ai/providers/openai-shared";
|
|
29
|
+
import { stripOpenAIResponsesOutputOnlyStatusesForReplay } from "@oh-my-pi/pi-ai/utils";
|
|
29
30
|
import { preferredDialect } from "@oh-my-pi/pi-catalog/identity";
|
|
30
31
|
import { clampThinkingLevelForModel } from "@oh-my-pi/pi-catalog/model-thinking";
|
|
31
32
|
import { isRecord, logger, prompt, stringifyJson } from "@oh-my-pi/pi-utils";
|
|
@@ -1351,7 +1352,9 @@ function buildOpenAiResponsesCompactionInput(
|
|
|
1351
1352
|
}
|
|
1352
1353
|
nativeInput.push(item);
|
|
1353
1354
|
}
|
|
1354
|
-
return
|
|
1355
|
+
return stripOpenAIResponsesOutputOnlyStatusesForReplay(
|
|
1356
|
+
previousReplacementHistory ? [...previousReplacementHistory, ...nativeInput] : nativeInput,
|
|
1357
|
+
);
|
|
1355
1358
|
}
|
|
1356
1359
|
|
|
1357
1360
|
/**
|
package/src/compaction/openai.ts
CHANGED
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
getOpenAIResponsesHistoryItems,
|
|
38
38
|
getOpenAIResponsesHistoryPayload,
|
|
39
39
|
normalizeResponsesToolCallId,
|
|
40
|
+
stripOpenAIResponsesOutputOnlyStatusesForReplay,
|
|
40
41
|
} from "@oh-my-pi/pi-ai/utils";
|
|
41
42
|
import { captureOpenAIHttpError } from "@oh-my-pi/pi-ai/utils/openai-http";
|
|
42
43
|
import {
|
|
@@ -739,7 +740,7 @@ export function buildOpenAiNativeHistory(
|
|
|
739
740
|
msgIndex++;
|
|
740
741
|
}
|
|
741
742
|
|
|
742
|
-
return input;
|
|
743
|
+
return stripOpenAIResponsesOutputOnlyStatusesForReplay(input);
|
|
743
744
|
}
|
|
744
745
|
|
|
745
746
|
// ============================================================================
|