@debugg-ai/debugg-ai-mcp 1.0.37 → 1.0.38
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.
|
@@ -132,7 +132,10 @@ export async function testPageChangesHandler(input, context, progressCallback) {
|
|
|
132
132
|
if (ctx.tunnelId)
|
|
133
133
|
touchTunnelById(ctx.tunnelId);
|
|
134
134
|
const nodeCount = exec.nodeExecutions?.length ?? 0;
|
|
135
|
-
const
|
|
135
|
+
const brainStepCount = (exec.nodeExecutions ?? [])
|
|
136
|
+
.filter(n => n.nodeType === 'brain.step').length;
|
|
137
|
+
// Prefer actual brain.step node count over API stepsTaken (which may lag)
|
|
138
|
+
const stepsTaken = Math.max(brainStepCount, exec.state?.stepsTaken ?? 0);
|
|
136
139
|
if (nodeCount !== lastNodeCount || stepsTaken !== lastStepsTaken || exec.status !== 'pending') {
|
|
137
140
|
lastNodeCount = nodeCount;
|
|
138
141
|
lastStepsTaken = stepsTaken;
|
|
@@ -157,7 +160,21 @@ export async function testPageChangesHandler(input, context, progressCallback) {
|
|
|
157
160
|
let message;
|
|
158
161
|
if (exec.status === 'running') {
|
|
159
162
|
if (stepsTaken > 0) {
|
|
160
|
-
|
|
163
|
+
// Extract the latest brain.step to show what the agent is doing
|
|
164
|
+
const latestStep = (exec.nodeExecutions ?? [])
|
|
165
|
+
.filter(n => n.nodeType === 'brain.step' && n.outputData?.decision)
|
|
166
|
+
.sort((a, b) => b.executionOrder - a.executionOrder)[0];
|
|
167
|
+
if (latestStep?.outputData?.decision) {
|
|
168
|
+
const d = latestStep.outputData.decision;
|
|
169
|
+
const action = d.actionType ?? d.action_type ?? 'working';
|
|
170
|
+
const intent = d.intent;
|
|
171
|
+
message = intent
|
|
172
|
+
? `Step ${stepsTaken}: [${action}] ${intent}`
|
|
173
|
+
: `Step ${stepsTaken}: ${action}`;
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
message = `Agent evaluating app... (step ${stepsTaken})`;
|
|
177
|
+
}
|
|
161
178
|
}
|
|
162
179
|
else if (nodeCount === 0) {
|
|
163
180
|
message = 'Browser agent starting up...';
|