@clearideas/agent-runtime-step-loop 0.7.0 → 0.8.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/dist/index.js +5 -4
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { applyStatePatch, setVariableAtPath, } from "@clearideas/agent-runtime-core";
|
|
1
|
+
import { applyStatePatch, setVariableAtPath, withoutMessagesView, } from "@clearideas/agent-runtime-core";
|
|
2
2
|
const clone = (value) => structuredClone(value);
|
|
3
3
|
const asObject = (value) => value != null && typeof value === "object" && !Array.isArray(value)
|
|
4
4
|
? value
|
|
@@ -61,8 +61,9 @@ const isLoopContinuation = (value, stepId) => value?.type === "loop" &&
|
|
|
61
61
|
typeof value.iterationIndex === "number" &&
|
|
62
62
|
typeof value.childIndex === "number" &&
|
|
63
63
|
Array.isArray(value.outputs);
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
/** An iteration's variables for `loop.previous`, without runtime-provided views. */
|
|
65
|
+
const snapshotIterationVariables = (manifest, state) => {
|
|
66
|
+
const result = withoutMessagesView(manifest, clone(state));
|
|
66
67
|
delete result.loop;
|
|
67
68
|
return result;
|
|
68
69
|
};
|
|
@@ -228,7 +229,7 @@ export class LoopStepExecutor {
|
|
|
228
229
|
index: iteration,
|
|
229
230
|
iteration: iteration + 1,
|
|
230
231
|
output: clone(normalizedResult),
|
|
231
|
-
variables: snapshotIterationVariables(local),
|
|
232
|
+
variables: snapshotIterationVariables(context.manifest, local),
|
|
232
233
|
};
|
|
233
234
|
local.loop = {
|
|
234
235
|
index: iteration,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clearideas/agent-runtime-step-loop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Sequential condition and goal loop executor for Clear Ideas Agent Runtime.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Clear Ideas Incorporated",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"postpack": "node ../../scripts/cleanup-package-license.mjs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@clearideas/agent-runtime-contracts": "0.
|
|
40
|
-
"@clearideas/agent-runtime-core": "0.
|
|
39
|
+
"@clearideas/agent-runtime-contracts": "0.8.0",
|
|
40
|
+
"@clearideas/agent-runtime-core": "0.8.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@clearideas/agent-runtime-condition-jexl": "0.
|
|
43
|
+
"@clearideas/agent-runtime-condition-jexl": "0.8.0",
|
|
44
44
|
"typescript": "^7.0.2",
|
|
45
45
|
"vitest": "^5.1.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
|
-
"node": ">=
|
|
48
|
+
"node": ">=22.20.0"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/clearideas/agent-runtime#readme",
|
|
51
51
|
"bugs": {
|