@oh-my-pi/pi-agent-core 3.33.0 → 3.34.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/README.md +2 -2
- package/package.json +3 -3
- package/src/agent-loop.ts +1 -1
- package/src/agent.ts +1 -8
- package/src/proxy.ts +2 -2
- package/src/types.ts +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @oh-my-pi/pi-agent
|
|
2
2
|
|
|
3
|
-
Stateful agent with tool execution and event streaming. Built on `@
|
|
3
|
+
Stateful agent with tool execution and event streaming. Built on `@oh-my-pi/pi-ai`.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ npm install @oh-my-pi/pi-agent
|
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { Agent } from "@oh-my-pi/pi-agent";
|
|
15
|
-
import { getModel } from "@
|
|
15
|
+
import { getModel } from "@oh-my-pi/pi-ai";
|
|
16
16
|
|
|
17
17
|
const agent = new Agent({
|
|
18
18
|
initialState: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-agent-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0",
|
|
4
4
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"test": "vitest --run"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@
|
|
17
|
-
"@oh-my-pi/pi-tui": "3.
|
|
16
|
+
"@oh-my-pi/pi-ai": "3.34.0",
|
|
17
|
+
"@oh-my-pi/pi-tui": "3.34.0"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"ai",
|
package/src/agent-loop.ts
CHANGED
package/src/agent.ts
CHANGED
|
@@ -3,14 +3,7 @@
|
|
|
3
3
|
* No transport abstraction - calls streamSimple via the loop.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
getModel,
|
|
8
|
-
type ImageContent,
|
|
9
|
-
type Message,
|
|
10
|
-
type Model,
|
|
11
|
-
streamSimple,
|
|
12
|
-
type TextContent,
|
|
13
|
-
} from "@mariozechner/pi-ai";
|
|
6
|
+
import { getModel, type ImageContent, type Message, type Model, streamSimple, type TextContent } from "@oh-my-pi/pi-ai";
|
|
14
7
|
import { agentLoop, agentLoopContinue } from "./agent-loop";
|
|
15
8
|
import type {
|
|
16
9
|
AgentContext,
|
package/src/proxy.ts
CHANGED
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
type SimpleStreamOptions,
|
|
13
13
|
type StopReason,
|
|
14
14
|
type ToolCall,
|
|
15
|
-
} from "@
|
|
16
|
-
import { parseStreamingJson } from "@
|
|
15
|
+
} from "@oh-my-pi/pi-ai";
|
|
16
|
+
import { parseStreamingJson } from "@oh-my-pi/pi-ai/src/utils/json-parse";
|
|
17
17
|
|
|
18
18
|
// Create stream class matching ProxyMessageEventStream
|
|
19
19
|
class ProxyMessageEventStream extends EventStream<AssistantMessageEvent, AssistantMessage> {
|
package/src/types.ts
CHANGED