@clearideas/agent-runtime-step-standard 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.
Files changed (2) hide show
  1. package/dist/index.js +17 -2
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { compilePromptTemplate, RunCancelledError, RunSuspendedError, } from "@clearideas/agent-runtime-core";
1
+ import { compilePromptTemplate, RunCancelledError, RunSuspendedError, withoutMessagesView, } from "@clearideas/agent-runtime-core";
2
2
  const getMappedVariable = (variables, path) => {
3
3
  let current = variables;
4
4
  for (const segment of path.split(".")) {
@@ -40,12 +40,20 @@ export class SubRunStepExecutor {
40
40
  ? []
41
41
  : [[target, structuredClone(value)]];
42
42
  }))
43
- : structuredClone(context.variables);
43
+ : withoutMessagesView(context.manifest, structuredClone(context.variables));
44
44
  const variables = Object.entries(variableState).map(([key, value]) => ({ key, value }));
45
+ // Only a step that sets history forwards it, signed for the same scope.
46
+ const forwarded = context.history?.explicit
47
+ ? context.history.messages
48
+ : undefined;
49
+ const forwardedSignature = forwarded
50
+ ? await context.history.sign(forwarded)
51
+ : undefined;
45
52
  await context.emit("sub-run.started", {
46
53
  hasInlineManifest: context.step.manifest != null,
47
54
  hasManifestReference: context.step.manifestRef != null,
48
55
  mappedVariableCount: variables.length,
56
+ ...(forwarded ? { forwardedMessages: forwarded.length } : {}),
49
57
  });
50
58
  const resumeContinuation = context.resume?.continuation?.type === "sub-run" &&
51
59
  context.resume.continuation.stepId === context.step.id &&
@@ -73,6 +81,13 @@ export class SubRunStepExecutor {
73
81
  ? { manifestReference: context.step.manifestRef }
74
82
  : {}),
75
83
  variables,
84
+ ...(forwarded ? { messages: structuredClone(forwarded) } : {}),
85
+ ...(forwardedSignature
86
+ ? { messagesSignature: forwardedSignature }
87
+ : {}),
88
+ ...(forwarded && context.history?.scope != null
89
+ ? { messagesScope: context.history.scope }
90
+ : {}),
76
91
  ...(resumeContinuation
77
92
  ? { continuation: structuredClone(resumeContinuation) }
78
93
  : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clearideas/agent-runtime-step-standard",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Approval, webhook, and sandboxed code executors for Clear Ideas Agent Runtime.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Clear Ideas Incorporated",
@@ -36,15 +36,15 @@
36
36
  "postpack": "node ../../scripts/cleanup-package-license.mjs"
37
37
  },
38
38
  "dependencies": {
39
- "@clearideas/agent-runtime-contracts": "0.7.0",
40
- "@clearideas/agent-runtime-core": "0.7.0"
39
+ "@clearideas/agent-runtime-contracts": "0.8.0",
40
+ "@clearideas/agent-runtime-core": "0.8.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^7.0.2",
44
44
  "vitest": "^5.1.0"
45
45
  },
46
46
  "engines": {
47
- "node": ">=24"
47
+ "node": ">=22.20.0"
48
48
  },
49
49
  "homepage": "https://github.com/clearideas/agent-runtime#readme",
50
50
  "bugs": {