@oh-my-pi/pi-agent-core 14.1.2 → 14.2.0

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
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [14.2.0] - 2026-04-23
6
+
7
+ ### Changed
8
+
9
+ - Changed tool dispatch to match model-returned tool calls by either internal tool name or custom wire name, enabling custom OpenAI tool names such as `apply_patch`.
10
+
5
11
  ## [14.0.1] - 2026-04-08
6
12
  ### Added
7
13
 
@@ -316,4 +322,4 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
316
322
 
317
323
  - `Agent` constructor now has all options optional (empty options use defaults).
318
324
 
319
- - `queueMessage()` is now synchronous (no longer returns a Promise).
325
+ - `queueMessage()` is now synchronous (no longer returns a Promise).
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": "14.1.2",
4
+ "version": "14.2.0",
5
5
  "description": "General-purpose agent with transport abstraction, state management, and attachment support",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Boluk",
@@ -35,9 +35,9 @@
35
35
  "fmt": "biome format --write ."
36
36
  },
37
37
  "dependencies": {
38
- "@oh-my-pi/pi-ai": "14.1.2",
39
- "@oh-my-pi/pi-natives": "14.1.2",
40
- "@oh-my-pi/pi-utils": "14.1.2"
38
+ "@oh-my-pi/pi-ai": "14.2.0",
39
+ "@oh-my-pi/pi-natives": "14.2.0",
40
+ "@oh-my-pi/pi-utils": "14.2.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@sinclair/typebox": "^0.34",
package/src/agent-loop.ts CHANGED
@@ -454,7 +454,13 @@ async function executeToolCalls(
454
454
 
455
455
  const records = toolCalls.map(toolCall => ({
456
456
  toolCall,
457
- tool: tools?.find(t => t.name === toolCall.name),
457
+ // Tools emitted via OpenAI's custom-tool path (e.g. `apply_patch` on GPT-5)
458
+ // come back under their wire-level name, which may differ from the
459
+ // harness-internal `name`. Match on either, preferring `name` for
460
+ // determinism if both somehow collide.
461
+ tool:
462
+ tools?.find(t => t.name === toolCall.name) ??
463
+ tools?.find(t => t.customWireName !== undefined && t.customWireName === toolCall.name),
458
464
  args: toolCall.arguments as Record<string, unknown>,
459
465
  started: false,
460
466
  result: undefined as AgentToolResult<any> | undefined,