@oh-my-pi/pi-agent-core 14.1.0 → 14.1.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/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.0",
4
+ "version": "14.1.2",
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,8 +35,9 @@
35
35
  "fmt": "biome format --write ."
36
36
  },
37
37
  "dependencies": {
38
- "@oh-my-pi/pi-ai": "14.1.0",
39
- "@oh-my-pi/pi-utils": "14.1.0"
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"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@sinclair/typebox": "^0.34",
package/src/agent-loop.ts CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  type ToolResultMessage,
11
11
  validateToolArguments,
12
12
  } from "@oh-my-pi/pi-ai";
13
+ import { sanitizeText } from "@oh-my-pi/pi-natives";
13
14
  import type {
14
15
  AgentContext,
15
16
  AgentEvent,
@@ -582,7 +583,12 @@ async function executeToolCalls(
582
583
  toolCallId: toolCall.id,
583
584
  toolName: toolCall.name,
584
585
  args: argsForExecution,
585
- partialResult,
586
+ partialResult: {
587
+ ...partialResult,
588
+ content: partialResult.content.map(c =>
589
+ c.type === "text" ? { ...c, text: sanitizeText(c.text) } : c,
590
+ ),
591
+ },
586
592
  });
587
593
  },
588
594
  toolContext,