@oh-my-pi/pi-agent-core 14.6.5 → 14.7.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 +13 -0
- package/README.md +4 -4
- package/package.json +4 -4
- package/src/agent.ts +2 -2
- package/src/types.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [14.7.0] - 2026-05-04
|
|
6
|
+
### Breaking Changes
|
|
7
|
+
|
|
8
|
+
- Changed `Agent` API types so `systemPrompt` is now a list of prompt strings, requiring callers to pass and update system prompts via string arrays
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Removed automatic project-context injection into each model call from loop logic
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
|
|
16
|
+
- Removed the `projectPrompt` field from agent state/context and the `setProjectPrompt` mutator
|
|
17
|
+
|
|
5
18
|
## [14.6.2] - 2026-05-03
|
|
6
19
|
|
|
7
20
|
### Fixed
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ import { getModel } from "@oh-my-pi/pi-ai";
|
|
|
16
16
|
|
|
17
17
|
const agent = new Agent({
|
|
18
18
|
initialState: {
|
|
19
|
-
systemPrompt: "You are a helpful assistant.",
|
|
19
|
+
systemPrompt: ["You are a helpful assistant."],
|
|
20
20
|
model: getModel("anthropic", "claude-sonnet-4-20250514"),
|
|
21
21
|
},
|
|
22
22
|
});
|
|
@@ -132,7 +132,7 @@ The last message in context must be `user` or `toolResult` (not `assistant`).
|
|
|
132
132
|
const agent = new Agent({
|
|
133
133
|
// Initial state
|
|
134
134
|
initialState: {
|
|
135
|
-
systemPrompt: string,
|
|
135
|
+
systemPrompt: string[],
|
|
136
136
|
model: Model,
|
|
137
137
|
thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh",
|
|
138
138
|
tools: AgentTool<any>[],
|
|
@@ -163,7 +163,7 @@ const agent = new Agent({
|
|
|
163
163
|
|
|
164
164
|
```typescript
|
|
165
165
|
interface AgentState {
|
|
166
|
-
systemPrompt: string;
|
|
166
|
+
systemPrompt: string[];
|
|
167
167
|
model: Model;
|
|
168
168
|
thinkingLevel: ThinkingLevel;
|
|
169
169
|
tools: AgentTool<any>[];
|
|
@@ -348,7 +348,7 @@ For direct control without the Agent class:
|
|
|
348
348
|
import { agentLoop, agentLoopContinue } from "@oh-my-pi/pi-agent";
|
|
349
349
|
|
|
350
350
|
const context: AgentContext = {
|
|
351
|
-
systemPrompt: "You are helpful.",
|
|
351
|
+
systemPrompt: ["You are helpful."],
|
|
352
352
|
messages: [],
|
|
353
353
|
tools: [],
|
|
354
354
|
};
|
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.
|
|
4
|
+
"version": "14.7.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.
|
|
39
|
-
"@oh-my-pi/pi-natives": "14.
|
|
40
|
-
"@oh-my-pi/pi-utils": "14.
|
|
38
|
+
"@oh-my-pi/pi-ai": "14.7.0",
|
|
39
|
+
"@oh-my-pi/pi-natives": "14.7.0",
|
|
40
|
+
"@oh-my-pi/pi-utils": "14.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@sinclair/typebox": "^0.34.49",
|
package/src/agent.ts
CHANGED
|
@@ -206,7 +206,7 @@ interface CursorToolResultEntry {
|
|
|
206
206
|
|
|
207
207
|
export class Agent {
|
|
208
208
|
#state: AgentState = {
|
|
209
|
-
systemPrompt:
|
|
209
|
+
systemPrompt: [],
|
|
210
210
|
model: getBundledModel("google", "gemini-2.5-flash-lite-preview-06-17"),
|
|
211
211
|
thinkingLevel: undefined,
|
|
212
212
|
tools: [],
|
|
@@ -453,7 +453,7 @@ export class Agent {
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
// State mutators
|
|
456
|
-
setSystemPrompt(v: string) {
|
|
456
|
+
setSystemPrompt(v: string[]) {
|
|
457
457
|
this.#state.systemPrompt = v;
|
|
458
458
|
}
|
|
459
459
|
|
package/src/types.ts
CHANGED
|
@@ -191,7 +191,7 @@ export type AgentMessage = Message | CustomAgentMessages[keyof CustomAgentMessag
|
|
|
191
191
|
* Agent state containing all configuration and conversation data.
|
|
192
192
|
*/
|
|
193
193
|
export interface AgentState {
|
|
194
|
-
systemPrompt: string;
|
|
194
|
+
systemPrompt: string[];
|
|
195
195
|
model: Model;
|
|
196
196
|
thinkingLevel?: Effort;
|
|
197
197
|
tools: AgentTool<any>[];
|
|
@@ -283,7 +283,7 @@ export interface AgentTool<TParameters extends TSchema = TSchema, TDetails = any
|
|
|
283
283
|
|
|
284
284
|
// AgentContext is like Context but uses AgentTool
|
|
285
285
|
export interface AgentContext {
|
|
286
|
-
systemPrompt: string;
|
|
286
|
+
systemPrompt: string[];
|
|
287
287
|
messages: AgentMessage[];
|
|
288
288
|
tools?: AgentTool<any>[];
|
|
289
289
|
}
|