@aexhq/agentloop-pi 5.0.0 → 5.1.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 +7 -4
- package/dist/loop.component.wasm +0 -0
- package/package.json +2 -2
- package/src/logic.mjs +2 -9
package/README.md
CHANGED
|
@@ -48,10 +48,13 @@ Transcript changes and `ctx.kv.read/put/delete` use Brain's state services. KV m
|
|
|
48
48
|
committed inline; missing keys remain distinct from stored JSON null. A later model or
|
|
49
49
|
Tool failure preserves acknowledged writes; turn output contains only the result. Retained
|
|
50
50
|
native model blocks pass through unchanged, and user images enter model context as media.
|
|
51
|
+
Version 5.1 also presents successful Tool outputs shaped as
|
|
52
|
+
`{ type: "aex_tool_output", version: 1, content, media: [{ type: "image", url }] }`
|
|
53
|
+
as Tool-result content and image media. Browser and MCP extensions use this presentation
|
|
54
|
+
convention; ordinary JSON results keep their existing behavior.
|
|
51
55
|
Compaction explicitly resets the response format and installs a summary only after `end_turn`;
|
|
52
56
|
a truncated, refused, or unknown summary leaves the original saved context intact.
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
immutable loop implementation
|
|
56
|
-
|
|
57
|
-
as an implicit upgrade step.
|
|
58
|
+
Version 5.1 targets Brain 0.22 and preserves the existing WIT. Existing sessions keep their
|
|
59
|
+
immutable loop implementation; create new sessions to adopt the updated loop. Keep matching
|
|
60
|
+
server/artifacts for recovery. An upgrade does not migrate or delete session data.
|
package/dist/loop.component.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/agentloop-pi",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Pi-style parallel-Tool Brain extension",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"prepack": "npm run build"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@aexhq/brain": "0.
|
|
38
|
+
"@aexhq/brain": "0.22.0",
|
|
39
39
|
"zod": "4.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {}
|
package/src/logic.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { toolPlacement } from "../../../shared/tool-placement.mjs";
|
|
2
2
|
import { observeEvents } from "../../../shared/loop-events.mjs";
|
|
3
|
+
import { toolResult } from "../../../shared/tool-output.mjs";
|
|
3
4
|
|
|
4
5
|
const CHECKPOINT_PREFIX = "Context checkpoint from earlier in this conversation:\n\n";
|
|
5
6
|
|
|
@@ -132,15 +133,7 @@ export async function runPi(input, context) {
|
|
|
132
133
|
const byCall = new Map(results.map((result) => [result.call_id, result]));
|
|
133
134
|
transcript.push({
|
|
134
135
|
role: "user",
|
|
135
|
-
content: calls.map(({ call_id }) =>
|
|
136
|
-
const result = byCall.get(call_id);
|
|
137
|
-
return {
|
|
138
|
-
type: "tool_result",
|
|
139
|
-
tool_use_id: call_id,
|
|
140
|
-
content: result === undefined ? "Tool produced no result." : result.output,
|
|
141
|
-
is_error: result === undefined ? true : result.is_error,
|
|
142
|
-
};
|
|
143
|
-
}),
|
|
136
|
+
content: calls.map(({ call_id }) => toolResult(call_id, byCall.get(call_id))),
|
|
144
137
|
});
|
|
145
138
|
}
|
|
146
139
|
}
|