@oh-my-pi/pi-agent-core 13.0.2 → 13.1.1
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 +5 -0
- package/package.json +4 -4
- package/src/agent-loop.ts +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [13.1.0] - 2026-02-23
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Removed per-tool `agent__intent` field description from injected schema to reduce token usage; intent format is now documented once in the system prompt instead of repeated in every tool definition
|
|
5
10
|
## [12.19.0] - 2026-02-22
|
|
6
11
|
### Changed
|
|
7
12
|
|
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": "13.
|
|
4
|
+
"version": "13.1.1",
|
|
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",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"test": "bun test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@oh-my-pi/pi-ai": "13.
|
|
35
|
-
"@oh-my-pi/pi-tui": "13.
|
|
36
|
-
"@oh-my-pi/pi-utils": "13.
|
|
34
|
+
"@oh-my-pi/pi-ai": "13.1.1",
|
|
35
|
+
"@oh-my-pi/pi-tui": "13.1.1",
|
|
36
|
+
"@oh-my-pi/pi-utils": "13.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@sinclair/typebox": "^0.34",
|
package/src/agent-loop.ts
CHANGED
|
@@ -138,21 +138,23 @@ function injectIntentIntoSchema(schema: unknown): unknown {
|
|
|
138
138
|
? requiredValue.filter((item): item is string => typeof item === "string")
|
|
139
139
|
: [];
|
|
140
140
|
if (INTENT_FIELD in properties) {
|
|
141
|
-
|
|
141
|
+
const { [INTENT_FIELD]: intentProp, ...rest } = properties;
|
|
142
|
+
const needsReorder = Object.keys(properties)[0] !== INTENT_FIELD;
|
|
143
|
+
const needsRequired = !required.includes(INTENT_FIELD);
|
|
144
|
+
if (!needsReorder && !needsRequired) return schema;
|
|
142
145
|
return {
|
|
143
146
|
...schemaRecord,
|
|
144
|
-
|
|
147
|
+
...(needsReorder ? { properties: { [INTENT_FIELD]: intentProp, ...rest } } : {}),
|
|
148
|
+
...(needsRequired ? { required: [...required, INTENT_FIELD] } : {}),
|
|
145
149
|
};
|
|
146
150
|
}
|
|
147
151
|
return {
|
|
148
152
|
...schemaRecord,
|
|
149
153
|
properties: {
|
|
150
|
-
...properties,
|
|
151
154
|
[INTENT_FIELD]: {
|
|
152
155
|
type: "string",
|
|
153
|
-
description:
|
|
154
|
-
"Describe intent as one sentence in present participle form (e.g., Inserting comment before the function) with no trailing period",
|
|
155
156
|
},
|
|
157
|
+
...properties,
|
|
156
158
|
},
|
|
157
159
|
required: [...required, INTENT_FIELD],
|
|
158
160
|
};
|