ai-engineering-loop 2.1.0 → 2.2.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.
@@ -5,6 +5,7 @@ const { stableEdgeId } = require('./recipe-graph.js');
5
5
  const { listRunInteractions } = require('./run-interactions.js');
6
6
  const { loadRun } = require('./run-state.js');
7
7
  const { inspectRunArtifact } = require('./run-history.js');
8
+ const { inspectNodeRun } = require('./node-evidence.js');
8
9
  const { redactHomePaths, redactSecrets } = require('./safe-context.js');
9
10
  const { workflowStatus } = require('./workflow-runtime.js');
10
11
 
@@ -138,17 +139,7 @@ function runNodeIo(rootDir, runId, nodeId) {
138
139
  event.type === 'WORKFLOW_CREATED' ||
139
140
  (event.changes || []).some((change) => change.nodeId === nodeId)
140
141
  ).map(({ initialNodes, ...event }) => event);
141
- const finishedIndex = relevantEvents.findLastIndex((event) =>
142
- ['NODE_COMPLETED', 'NODE_FAILED'].includes(event.type)
143
- );
144
- const finished = relevantEvents[finishedIndex];
145
- const started = finishedIndex < 0
146
- ? null
147
- : relevantEvents.slice(0, finishedIndex).findLast((event) => event.type === 'NODE_STARTED');
148
- const durationMs = runtime.status !== 'RUNNING' &&
149
- started && finished && Date.parse(finished.at) >= Date.parse(started.at)
150
- ? Date.parse(finished.at) - Date.parse(started.at)
151
- : null;
142
+ const inspected = inspectNodeRun(rootDir, run, node, runtime, workflow.events);
152
143
  let agentInteractions = [];
153
144
  let agentInteractionsAvailable = true;
154
145
  try {
@@ -159,7 +150,8 @@ function runNodeIo(rootDir, runId, nodeId) {
159
150
  return redactedValue({
160
151
  runId,
161
152
  node: publicNode(node, workflow.state, workflow.plan.nodes.indexOf(node)),
162
- durationMs,
153
+ durationMs: inspected.durationMs,
154
+ finishedAt: inspected.finishedAt,
163
155
  loopIteration: runtime.loopIteration || null,
164
156
  agentInteractionScope: 'RUN',
165
157
  agentInteractionsAvailable,
@@ -175,10 +167,13 @@ function runNodeIo(rootDir, runId, nodeId) {
175
167
  reason: runtime.reason || null,
176
168
  loopGroupId: runtime.loopGroupId || null,
177
169
  loopIteration: runtime.loopIteration || null,
170
+ summary: inspected.nodeEvidence?.summary || null,
178
171
  artifact: safeArtifact(rootDir, runId, runtime.artifact)
179
172
  },
180
173
  evidence: safeArtifact(rootDir, runId, runtime.artifact),
181
- timeline: relevantEvents
174
+ nodeEvidence: inspected.nodeEvidence,
175
+ timeline: relevantEvents,
176
+ timelineGroups: inspected.timelineGroups
182
177
  });
183
178
  }
184
179
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-engineering-loop",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "A visual workspace that helps AI coding agents plan, build, review, and ship reliable software.",
5
5
  "main": "bin/ai-engineering-loop.js",
6
6
  "bin": {