@evalops/maestro 0.10.21 → 0.10.22
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/agent/agent.d.ts +1 -0
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +15 -4
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/swarm/executor.d.ts.map +1 -1
- package/dist/agent/swarm/executor.js +68 -3
- package/dist/agent/swarm/executor.js.map +1 -1
- package/dist/agent/swarm/types.d.ts +3 -0
- package/dist/agent/swarm/types.d.ts.map +1 -1
- package/dist/agent/swarm/types.js.map +1 -1
- package/dist/agent/transport.d.ts.map +1 -1
- package/dist/agent/transport.js +7 -1
- package/dist/agent/transport.js.map +1 -1
- package/dist/audit/logger.d.ts +1 -1
- package/dist/bootstrap/tools-setup.d.ts.map +1 -1
- package/dist/bootstrap/tools-setup.js +3 -2
- package/dist/bootstrap/tools-setup.js.map +1 -1
- package/dist/cli/commands/a2a.d.ts.map +1 -1
- package/dist/cli/commands/a2a.js +141 -8
- package/dist/cli/commands/a2a.js.map +1 -1
- package/dist/cli/commands/codex.d.ts.map +1 -1
- package/dist/cli/commands/codex.js +4 -3
- package/dist/cli/commands/codex.js.map +1 -1
- package/dist/cli/commands/hosted-runner.d.ts +1 -0
- package/dist/cli/commands/hosted-runner.d.ts.map +1 -1
- package/dist/cli/commands/hosted-runner.js +31 -2
- package/dist/cli/commands/hosted-runner.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +2 -9
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli-tui/commands/a2a-handlers.d.ts.map +1 -1
- package/dist/cli-tui/commands/a2a-handlers.js +55 -0
- package/dist/cli-tui/commands/a2a-handlers.js.map +1 -1
- package/dist/cli.js +3924 -1972
- package/dist/codex/compatibility.d.ts +17 -1
- package/dist/codex/compatibility.d.ts.map +1 -1
- package/dist/codex/compatibility.js +57 -1
- package/dist/codex/compatibility.js.map +1 -1
- package/dist/guardian/config.d.ts +8 -6
- package/dist/guardian/config.d.ts.map +1 -1
- package/dist/guardian/config.js +33 -7
- package/dist/guardian/config.js.map +1 -1
- package/dist/guardian/runner.d.ts.map +1 -1
- package/dist/guardian/runner.js +54 -9
- package/dist/guardian/runner.js.map +1 -1
- package/dist/mcp/config.d.ts.map +1 -1
- package/dist/mcp/config.js +2 -0
- package/dist/mcp/config.js.map +1 -1
- package/dist/mcp/fathom-cua.d.ts +3 -0
- package/dist/mcp/fathom-cua.d.ts.map +1 -0
- package/dist/mcp/fathom-cua.js +158 -0
- package/dist/mcp/fathom-cua.js.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/node_modules/@evalops/contracts/package.json +1 -1
- package/dist/node_modules/@evalops/tui/package.json +1 -1
- package/dist/platform/a2a-cockpit.d.ts +90 -0
- package/dist/platform/a2a-cockpit.d.ts.map +1 -0
- package/dist/platform/a2a-cockpit.js +302 -0
- package/dist/platform/a2a-cockpit.js.map +1 -0
- package/dist/platform/a2a-fleet.d.ts +14 -0
- package/dist/platform/a2a-fleet.d.ts.map +1 -1
- package/dist/platform/a2a-fleet.js +66 -1
- package/dist/platform/a2a-fleet.js.map +1 -1
- package/dist/platform/a2a-ownership.d.ts +27 -0
- package/dist/platform/a2a-ownership.d.ts.map +1 -0
- package/dist/platform/a2a-ownership.js +149 -0
- package/dist/platform/a2a-ownership.js.map +1 -0
- package/dist/platform/a2a-task-ledger.d.ts.map +1 -1
- package/dist/platform/a2a-task-ledger.js +29 -5
- package/dist/platform/a2a-task-ledger.js.map +1 -1
- package/dist/server/agent-trajectory-replay-lab.d.ts +36 -0
- package/dist/server/agent-trajectory-replay-lab.d.ts.map +1 -0
- package/dist/server/agent-trajectory-replay-lab.js +48 -0
- package/dist/server/agent-trajectory-replay-lab.js.map +1 -0
- package/dist/server/any-agent-control-plane-proof.d.ts +42 -0
- package/dist/server/any-agent-control-plane-proof.d.ts.map +1 -0
- package/dist/server/any-agent-control-plane-proof.js +175 -0
- package/dist/server/any-agent-control-plane-proof.js.map +1 -0
- package/dist/server/app-context.d.ts +1 -0
- package/dist/server/app-context.d.ts.map +1 -1
- package/dist/server/app-context.js.map +1 -1
- package/dist/server/handlers/a2a-cockpit.d.ts +3 -0
- package/dist/server/handlers/a2a-cockpit.d.ts.map +1 -0
- package/dist/server/handlers/a2a-cockpit.js +71 -0
- package/dist/server/handlers/a2a-cockpit.js.map +1 -0
- package/dist/server/handlers/headless-sessions.d.ts.map +1 -1
- package/dist/server/handlers/headless-sessions.js +17 -2
- package/dist/server/handlers/headless-sessions.js.map +1 -1
- package/dist/server/handlers/session-artifacts.d.ts.map +1 -1
- package/dist/server/handlers/session-artifacts.js +20 -3
- package/dist/server/handlers/session-artifacts.js.map +1 -1
- package/dist/server/handlers/session-replay-lab.d.ts +13 -0
- package/dist/server/handlers/session-replay-lab.d.ts.map +1 -0
- package/dist/server/handlers/session-replay-lab.js +80 -0
- package/dist/server/handlers/session-replay-lab.js.map +1 -0
- package/dist/server/handlers/stats.js +1 -1
- package/dist/server/handlers/stats.js.map +1 -1
- package/dist/server/handlers/status.d.ts +44 -3
- package/dist/server/handlers/status.d.ts.map +1 -1
- package/dist/server/handlers/status.js +227 -17
- package/dist/server/handlers/status.js.map +1 -1
- package/dist/server/headless-runtime-service.d.ts +17 -0
- package/dist/server/headless-runtime-service.d.ts.map +1 -1
- package/dist/server/headless-runtime-service.js +143 -3
- package/dist/server/headless-runtime-service.js.map +1 -1
- package/dist/server/hosted-agent-runtime-progress.d.ts +17 -0
- package/dist/server/hosted-agent-runtime-progress.d.ts.map +1 -1
- package/dist/server/hosted-agent-runtime-progress.js +352 -15
- package/dist/server/hosted-agent-runtime-progress.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +14 -0
- package/dist/server/routes.js.map +1 -1
- package/dist/services/intelligent-router/index.d.ts +1 -1
- package/dist/services/intelligent-router/index.d.ts.map +1 -1
- package/dist/services/intelligent-router/index.js +1 -1
- package/dist/services/intelligent-router/index.js.map +1 -1
- package/dist/services/intelligent-router/normalize.d.ts +10 -2
- package/dist/services/intelligent-router/normalize.d.ts.map +1 -1
- package/dist/services/intelligent-router/normalize.js +20 -1
- package/dist/services/intelligent-router/normalize.js.map +1 -1
- package/dist/services/intelligent-router/service.d.ts.map +1 -1
- package/dist/services/intelligent-router/service.js +35 -0
- package/dist/services/intelligent-router/service.js.map +1 -1
- package/dist/services/intelligent-router/types.d.ts +13 -0
- package/dist/services/intelligent-router/types.d.ts.map +1 -1
- package/dist/services/intelligent-router/types.js +1 -0
- package/dist/services/intelligent-router/types.js.map +1 -1
- package/dist/telemetry/cli-command-aggregator.d.ts +1 -0
- package/dist/telemetry/cli-command-aggregator.d.ts.map +1 -1
- package/dist/telemetry/cli-command-aggregator.js +23 -0
- package/dist/telemetry/cli-command-aggregator.js.map +1 -1
- package/dist/telemetry/maestro-event-bus.d.ts.map +1 -1
- package/dist/telemetry/maestro-event-bus.js +11 -5
- package/dist/telemetry/maestro-event-bus.js.map +1 -1
- package/dist/telemetry/maestro-event-catalog.d.ts +15 -1
- package/dist/telemetry/maestro-event-catalog.d.ts.map +1 -1
- package/dist/telemetry/maestro-event-catalog.js +30 -0
- package/dist/telemetry/maestro-event-catalog.js.map +1 -1
- package/dist/version.json +2 -2
- package/package.json +289 -283
|
@@ -98,9 +98,23 @@ export declare class HostedAgentRuntimeProgressRecorder {
|
|
|
98
98
|
private readonly recordedTaskWorkItemIds;
|
|
99
99
|
private pending;
|
|
100
100
|
private turnIndex;
|
|
101
|
+
private autoRetrySequence;
|
|
102
|
+
private activeAutoRetrySequence;
|
|
103
|
+
private lastAutoRetryAttempt;
|
|
101
104
|
private terminalRecorded;
|
|
102
105
|
constructor(options: HostedAgentRuntimeProgressRecorderOptions);
|
|
103
106
|
recordAgentEvent(event: AgentEvent): void;
|
|
107
|
+
private recordFinalStatusEvent;
|
|
108
|
+
private recordStatusEvent;
|
|
109
|
+
private recordCompactionEvent;
|
|
110
|
+
private recordAutoRetryStart;
|
|
111
|
+
private recordAutoRetryEnd;
|
|
112
|
+
private recordDiagnosticDelta;
|
|
113
|
+
private recordToolBatchSummary;
|
|
114
|
+
private recordToolPhaseSummary;
|
|
115
|
+
private recordToolExecutionUpdate;
|
|
116
|
+
private recordToolArtifactEvent;
|
|
117
|
+
private recordToolRetryEvent;
|
|
104
118
|
recordServerRequestEvent(event: ServerRequestLifecycleEvent): void;
|
|
105
119
|
recordPromptFailure(message: string): void;
|
|
106
120
|
recordTaskProgressEvent(event: HostedAgentRuntimeTaskProgressEvent): void;
|
|
@@ -133,6 +147,9 @@ export declare class HostedAgentRuntimeProgressRecorder {
|
|
|
133
147
|
private taskProgressId;
|
|
134
148
|
private toolStepId;
|
|
135
149
|
private workItemId;
|
|
150
|
+
private resolveAutoRetryStartSequence;
|
|
151
|
+
private resolveAutoRetryEndSequence;
|
|
152
|
+
private autoRetryStepId;
|
|
136
153
|
private waitId;
|
|
137
154
|
private checkpointId;
|
|
138
155
|
private resumeEventId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-agent-runtime-progress.d.ts","sourceRoot":"","sources":["../../src/server/hosted-agent-runtime-progress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAqB,MAAM,mBAAmB,CAAC;AASvE,OAAO,EAEN,yBAAyB,EACzB,kCAAkC,EAClC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAEN,6BAA6B,EAK7B,8BAA8B,EAG9B,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,MAAM,qCAAqC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W,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC5C,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"hosted-agent-runtime-progress.d.ts","sourceRoot":"","sources":["../../src/server/hosted-agent-runtime-progress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAqB,MAAM,mBAAmB,CAAC;AASvE,OAAO,EAEN,yBAAyB,EACzB,kCAAkC,EAClC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAEN,6BAA6B,EAK7B,8BAA8B,EAG9B,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAM/E,KAAK,4BAA4B,GAC9B,MAAM,GACN,YAAY,GACZ,OAAO,GACP,YAAY,CAAC;AAEhB,KAAK,4BAA4B,GAC9B,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,WAAW,CAAC;AAEf,MAAM,WAAW,mCAAmC;IACnD,MAAM,EAAE,4BAA4B,CAAC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,4BAA4B,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,IAA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C,2BAA2B;IAWnC,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,QAAQ;CAGhB;AAED,wBAAgB,wCAAwC,CACvD,OAAO,EAAE,yCAAyC,GAChD,kCAAkC,GAAG,SAAS,CAKhD"}
|
|
@@ -81,6 +81,13 @@ function stringArray(value) {
|
|
|
81
81
|
}
|
|
82
82
|
return value.filter((item) => typeof item === "string" && item.length > 0);
|
|
83
83
|
}
|
|
84
|
+
function compactStringArray(value, maxItems = 32) {
|
|
85
|
+
const compacted = value
|
|
86
|
+
.map((item) => compactString(item, 160))
|
|
87
|
+
.filter((item) => Boolean(item))
|
|
88
|
+
.slice(0, maxItems);
|
|
89
|
+
return compacted.length > 0 ? compacted : undefined;
|
|
90
|
+
}
|
|
84
91
|
function codexSubagentToolName(toolName) {
|
|
85
92
|
const tool = toolName.startsWith(CODEX_SUBAGENT_TOOL_PREFIX)
|
|
86
93
|
? toolName.slice(CODEX_SUBAGENT_TOOL_PREFIX.length)
|
|
@@ -299,6 +306,32 @@ function materializedToolExecutionId(event) {
|
|
|
299
306
|
}
|
|
300
307
|
return toolExecutionId;
|
|
301
308
|
}
|
|
309
|
+
function toolResultMetrics(result) {
|
|
310
|
+
const content = Array.isArray(result.content) ? result.content : [];
|
|
311
|
+
const textBlocks = content.filter((block) => isRecord(block) &&
|
|
312
|
+
block.type === "text" &&
|
|
313
|
+
typeof block.text === "string");
|
|
314
|
+
const imageMimeTypes = content
|
|
315
|
+
.map((block) => isRecord(block) && block.type === "image"
|
|
316
|
+
? compactString(block.mimeType, 128)
|
|
317
|
+
: undefined)
|
|
318
|
+
.filter((mimeType) => Boolean(mimeType));
|
|
319
|
+
return {
|
|
320
|
+
content_block_count: content.length,
|
|
321
|
+
text_block_count: textBlocks.length,
|
|
322
|
+
text_total_chars: textBlocks.reduce((total, block) => total + block.text.length, 0),
|
|
323
|
+
image_block_count: imageMimeTypes.length,
|
|
324
|
+
image_mime_types: imageMimeTypes.length > 0 ? imageMimeTypes : undefined,
|
|
325
|
+
details_keys: objectKeys(result.details),
|
|
326
|
+
result_error: typeof result.isError === "boolean" ? result.isError : undefined,
|
|
327
|
+
result_tool_execution_id: typeof result.toolExecutionId === "string"
|
|
328
|
+
? result.toolExecutionId
|
|
329
|
+
: undefined,
|
|
330
|
+
result_approval_request_id: typeof result.approvalRequestId === "string"
|
|
331
|
+
? result.approvalRequestId
|
|
332
|
+
: undefined,
|
|
333
|
+
};
|
|
334
|
+
}
|
|
302
335
|
function waitTypeForRequest(kind) {
|
|
303
336
|
switch (kind) {
|
|
304
337
|
case "approval":
|
|
@@ -418,6 +451,9 @@ export class HostedAgentRuntimeProgressRecorder {
|
|
|
418
451
|
this.recordedTaskWorkItemIds = new Set();
|
|
419
452
|
this.pending = Promise.resolve();
|
|
420
453
|
this.turnIndex = 0;
|
|
454
|
+
this.autoRetrySequence = 0;
|
|
455
|
+
this.activeAutoRetrySequence = null;
|
|
456
|
+
this.lastAutoRetryAttempt = 0;
|
|
421
457
|
this.terminalRecorded = false;
|
|
422
458
|
this.sessionId = options.sessionId;
|
|
423
459
|
this.hostedRunner = options.hostedRunner;
|
|
@@ -452,21 +488,69 @@ export class HostedAgentRuntimeProgressRecorder {
|
|
|
452
488
|
});
|
|
453
489
|
return;
|
|
454
490
|
case "agent_end":
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
:
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
491
|
+
{
|
|
492
|
+
const stepId = this.stepId("agent", `end-${this.turnIndex}`);
|
|
493
|
+
this.recordStep({
|
|
494
|
+
id: stepId,
|
|
495
|
+
name: "Agent run completed",
|
|
496
|
+
stepKind: event.aborted || event.stopReason === "error"
|
|
497
|
+
? PlatformAgentRunStepKindValue.Error
|
|
498
|
+
: PlatformAgentRunStepKindValue.System,
|
|
499
|
+
state: event.aborted || event.stopReason === "error"
|
|
500
|
+
? PlatformAgentRunStepStateValue.Failed
|
|
501
|
+
: PlatformAgentRunStepStateValue.Succeeded,
|
|
502
|
+
output: this.basePayload({
|
|
503
|
+
event_type: event.type,
|
|
504
|
+
aborted: event.aborted ?? false,
|
|
505
|
+
stop_reason: event.stopReason,
|
|
506
|
+
}),
|
|
507
|
+
});
|
|
508
|
+
this.recordFinalStatusEvent(event, stepId);
|
|
509
|
+
}
|
|
510
|
+
return;
|
|
511
|
+
case "status":
|
|
512
|
+
this.recordStatusEvent(event);
|
|
513
|
+
return;
|
|
514
|
+
case "compaction":
|
|
515
|
+
this.recordCompactionEvent(event);
|
|
516
|
+
return;
|
|
517
|
+
case "auto_retry_start":
|
|
518
|
+
this.recordAutoRetryStart(event);
|
|
519
|
+
return;
|
|
520
|
+
case "auto_retry_end":
|
|
521
|
+
this.recordAutoRetryEnd(event);
|
|
522
|
+
return;
|
|
523
|
+
case "diagnostic_delta":
|
|
524
|
+
this.recordDiagnosticDelta(event);
|
|
525
|
+
return;
|
|
526
|
+
case "tool_batch_summary":
|
|
527
|
+
this.recordToolBatchSummary(event);
|
|
528
|
+
return;
|
|
529
|
+
case "tool_phase_summary":
|
|
530
|
+
this.recordToolPhaseSummary(event);
|
|
531
|
+
return;
|
|
532
|
+
case "tool_execution_update":
|
|
533
|
+
this.recordToolExecutionUpdate(event);
|
|
534
|
+
return;
|
|
535
|
+
case "tool_retry_required":
|
|
536
|
+
this.recordApprovalWait({
|
|
537
|
+
id: event.request.id,
|
|
538
|
+
callId: event.request.toolCallId,
|
|
539
|
+
toolName: event.request.toolName,
|
|
540
|
+
reason: event.request.summary ?? event.request.errorMessage,
|
|
541
|
+
kind: "tool_retry",
|
|
542
|
+
});
|
|
543
|
+
this.recordToolRetryEvent(event);
|
|
544
|
+
return;
|
|
545
|
+
case "tool_retry_resolved":
|
|
546
|
+
this.resumeWait({
|
|
547
|
+
id: event.request.id,
|
|
548
|
+
kind: "tool_retry",
|
|
549
|
+
resolution: event.decision.action,
|
|
550
|
+
resolvedBy: event.decision.resolvedBy,
|
|
551
|
+
reason: event.decision.reason,
|
|
469
552
|
});
|
|
553
|
+
this.recordToolRetryEvent(event);
|
|
470
554
|
return;
|
|
471
555
|
case "turn_start":
|
|
472
556
|
this.turnIndex += 1;
|
|
@@ -537,6 +621,7 @@ export class HostedAgentRuntimeProgressRecorder {
|
|
|
537
621
|
});
|
|
538
622
|
this.updateCodexSubagentWorkItem(event);
|
|
539
623
|
this.recordToolDerivedTaskProgress(event);
|
|
624
|
+
this.recordToolArtifactEvent(event);
|
|
540
625
|
return;
|
|
541
626
|
case "action_approval_required":
|
|
542
627
|
this.recordApprovalWait({
|
|
@@ -567,6 +652,226 @@ export class HostedAgentRuntimeProgressRecorder {
|
|
|
567
652
|
return;
|
|
568
653
|
}
|
|
569
654
|
}
|
|
655
|
+
recordFinalStatusEvent(event, stepId) {
|
|
656
|
+
const finalStatus = event.aborted || event.stopReason === "error" ? "failed" : "succeeded";
|
|
657
|
+
this.recordEvent({
|
|
658
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
659
|
+
message: "Maestro agent final status recorded",
|
|
660
|
+
stepId,
|
|
661
|
+
attributes: this.basePayload({
|
|
662
|
+
event_type: "agent_final_status",
|
|
663
|
+
final_status: finalStatus,
|
|
664
|
+
aborted: event.aborted ?? false,
|
|
665
|
+
stop_reason: event.stopReason,
|
|
666
|
+
message_count: event.messages.length,
|
|
667
|
+
partial_accepted: Boolean(event.partialAccepted),
|
|
668
|
+
}),
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
recordStatusEvent(event) {
|
|
672
|
+
this.recordEvent({
|
|
673
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
674
|
+
message: "Maestro status recorded",
|
|
675
|
+
attributes: this.basePayload({
|
|
676
|
+
event_type: event.type,
|
|
677
|
+
status: compactString(event.status),
|
|
678
|
+
detail_keys: objectKeys(event.details),
|
|
679
|
+
}),
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
recordCompactionEvent(event) {
|
|
683
|
+
this.recordEvent({
|
|
684
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
685
|
+
message: "Maestro context compaction recorded",
|
|
686
|
+
attributes: this.basePayload({
|
|
687
|
+
event_type: event.type,
|
|
688
|
+
first_kept_entry_index: event.firstKeptEntryIndex,
|
|
689
|
+
tokens_before: event.tokensBefore,
|
|
690
|
+
auto: event.auto ?? false,
|
|
691
|
+
custom_instructions_present: Boolean(event.customInstructions),
|
|
692
|
+
summary_chars: event.summary.length,
|
|
693
|
+
timestamp: event.timestamp,
|
|
694
|
+
}),
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
recordAutoRetryStart(event) {
|
|
698
|
+
const sequence = this.resolveAutoRetryStartSequence(event.attempt);
|
|
699
|
+
this.recordStep({
|
|
700
|
+
id: this.autoRetryStepId(event.attempt, sequence),
|
|
701
|
+
name: `Auto retry ${event.attempt}`,
|
|
702
|
+
stepKind: PlatformAgentRunStepKindValue.System,
|
|
703
|
+
state: PlatformAgentRunStepStateValue.Waiting,
|
|
704
|
+
input: this.basePayload({
|
|
705
|
+
event_type: event.type,
|
|
706
|
+
attempt: event.attempt,
|
|
707
|
+
max_attempts: event.maxAttempts,
|
|
708
|
+
delay_ms: event.delayMs,
|
|
709
|
+
error_message: compactString(event.errorMessage, 512),
|
|
710
|
+
}),
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
recordAutoRetryEnd(event) {
|
|
714
|
+
const sequence = this.resolveAutoRetryEndSequence();
|
|
715
|
+
this.recordStep({
|
|
716
|
+
id: this.autoRetryStepId(event.attempt, sequence),
|
|
717
|
+
name: `Auto retry ${event.attempt}`,
|
|
718
|
+
stepKind: event.success
|
|
719
|
+
? PlatformAgentRunStepKindValue.System
|
|
720
|
+
: PlatformAgentRunStepKindValue.Error,
|
|
721
|
+
state: event.success
|
|
722
|
+
? PlatformAgentRunStepStateValue.Succeeded
|
|
723
|
+
: PlatformAgentRunStepStateValue.Failed,
|
|
724
|
+
errorMessage: event.success
|
|
725
|
+
? undefined
|
|
726
|
+
: compactString(event.finalError, 512),
|
|
727
|
+
output: this.basePayload({
|
|
728
|
+
event_type: event.type,
|
|
729
|
+
success: event.success,
|
|
730
|
+
attempt: event.attempt,
|
|
731
|
+
final_error: compactString(event.finalError, 512),
|
|
732
|
+
}),
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
recordDiagnosticDelta(event) {
|
|
736
|
+
this.recordEvent({
|
|
737
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
738
|
+
message: "Maestro diagnostic delta recorded",
|
|
739
|
+
stepId: this.toolStepId(event.toolCallId),
|
|
740
|
+
attributes: this.basePayload({
|
|
741
|
+
event_type: event.type,
|
|
742
|
+
tool_call_id: event.toolCallId,
|
|
743
|
+
tool_name: event.toolName,
|
|
744
|
+
display_path: compactString(event.displayPath, 512),
|
|
745
|
+
used_delta: event.usedDelta,
|
|
746
|
+
introduced_count: event.introducedCount,
|
|
747
|
+
repaired_count: event.repairedCount,
|
|
748
|
+
remaining_count: event.remainingCount,
|
|
749
|
+
fingerprint: event.fingerprint,
|
|
750
|
+
repair_attempt: event.repairAttempt,
|
|
751
|
+
max_repair_attempts: event.maxRepairAttempts,
|
|
752
|
+
will_auto_follow_up: event.willAutoFollowUp,
|
|
753
|
+
reason: compactString(event.reason),
|
|
754
|
+
}),
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
recordToolBatchSummary(event) {
|
|
758
|
+
this.recordEvent({
|
|
759
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
760
|
+
message: "Maestro tool batch summary recorded",
|
|
761
|
+
attributes: this.basePayload({
|
|
762
|
+
event_type: event.type,
|
|
763
|
+
summary: compactString(event.summary, 512),
|
|
764
|
+
summary_labels: compactStringArray(event.summaryLabels),
|
|
765
|
+
tool_call_ids: compactStringArray(event.toolCallIds),
|
|
766
|
+
tool_names: compactStringArray(event.toolNames),
|
|
767
|
+
calls_succeeded: event.callsSucceeded,
|
|
768
|
+
calls_failed: event.callsFailed,
|
|
769
|
+
}),
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
recordToolPhaseSummary(event) {
|
|
773
|
+
this.recordEvent({
|
|
774
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
775
|
+
message: "Maestro tool phase summary recorded",
|
|
776
|
+
attributes: this.basePayload({
|
|
777
|
+
event_type: event.type,
|
|
778
|
+
model_tool_call_count: event.modelToolCallCount,
|
|
779
|
+
model_emitted_tool_call_count: event.modelEmittedToolCallCount,
|
|
780
|
+
schedulable_wave_count: event.schedulableWaveCount,
|
|
781
|
+
parallelized_call_count: event.parallelizedCallCount,
|
|
782
|
+
actually_parallelized_call_count: event.actuallyParallelizedCallCount,
|
|
783
|
+
serialized_call_count: event.serializedCallCount,
|
|
784
|
+
delayed_call_count: event.delayedCallCount,
|
|
785
|
+
blocked_by_mutation_count: event.blockedByMutationCount,
|
|
786
|
+
mcp_opt_in_call_count: event.mcpOptInCallCount,
|
|
787
|
+
mcp_opt_in_use_count: event.mcpOptInUseCount,
|
|
788
|
+
cache_hit_count: event.cacheHitCount,
|
|
789
|
+
total_tool_wait_ms: event.totalToolWaitMs,
|
|
790
|
+
tool_wait_time_ms: event.toolWaitTimeMs,
|
|
791
|
+
serialization_reasons: event.serializationReasons,
|
|
792
|
+
batch_shaping_feedback: event.batchShapingFeedback,
|
|
793
|
+
}),
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
recordToolExecutionUpdate(event) {
|
|
797
|
+
const partialToolExecutionId = materializedToolExecutionId(event) ??
|
|
798
|
+
materializedToolExecutionId({
|
|
799
|
+
toolCallId: event.toolCallId,
|
|
800
|
+
toolExecutionId: event.partialResult.toolExecutionId,
|
|
801
|
+
});
|
|
802
|
+
this.recordEvent({
|
|
803
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
804
|
+
message: "Maestro tool execution update recorded",
|
|
805
|
+
stepId: this.toolStepId(event.toolCallId),
|
|
806
|
+
attributes: this.basePayload({
|
|
807
|
+
event_type: event.type,
|
|
808
|
+
tool_call_id: event.toolCallId,
|
|
809
|
+
tool_execution_id: partialToolExecutionId,
|
|
810
|
+
tool_name: event.toolName,
|
|
811
|
+
display_name: event.displayName,
|
|
812
|
+
summary_label: event.summaryLabel,
|
|
813
|
+
arg_keys: objectKeys(event.args),
|
|
814
|
+
...toolResultMetrics(event.partialResult),
|
|
815
|
+
}),
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
recordToolArtifactEvent(event) {
|
|
819
|
+
const metadata = event.skillMetadata;
|
|
820
|
+
if (!metadata) {
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
this.recordEvent({
|
|
824
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
825
|
+
message: "Maestro tool artifact evidence recorded",
|
|
826
|
+
stepId: this.toolStepId(event.toolCallId),
|
|
827
|
+
artifactId: metadata.artifactId,
|
|
828
|
+
attributes: this.basePayload({
|
|
829
|
+
event_type: "tool_artifact_recorded",
|
|
830
|
+
tool_call_id: event.toolCallId,
|
|
831
|
+
tool_execution_id: materializedToolExecutionId(event),
|
|
832
|
+
tool_name: event.toolName,
|
|
833
|
+
display_name: event.displayName,
|
|
834
|
+
summary_label: event.summaryLabel,
|
|
835
|
+
skill_name: metadata.name,
|
|
836
|
+
skill_hash: metadata.hash,
|
|
837
|
+
skill_source: metadata.source,
|
|
838
|
+
skill_artifact_id: metadata.artifactId,
|
|
839
|
+
skill_version: metadata.version,
|
|
840
|
+
skill_scope: metadata.scope,
|
|
841
|
+
skill_workspace_id: metadata.workspaceId,
|
|
842
|
+
skill_owner_id: metadata.ownerId,
|
|
843
|
+
source_path: compactString(metadata.sourcePath, 512),
|
|
844
|
+
}),
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
recordToolRetryEvent(event) {
|
|
848
|
+
this.recordEvent({
|
|
849
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
850
|
+
message: event.type === "tool_retry_required"
|
|
851
|
+
? "Maestro tool retry required"
|
|
852
|
+
: "Maestro tool retry resolved",
|
|
853
|
+
stepId: this.toolStepId(event.request.toolCallId),
|
|
854
|
+
waitId: this.waitId(event.request.id),
|
|
855
|
+
attributes: this.basePayload({
|
|
856
|
+
event_type: event.type,
|
|
857
|
+
request_id: event.request.id,
|
|
858
|
+
tool_call_id: event.request.toolCallId,
|
|
859
|
+
tool_name: event.request.toolName,
|
|
860
|
+
error_message: compactString(event.request.errorMessage, 512),
|
|
861
|
+
summary: compactString(event.request.summary, 512),
|
|
862
|
+
attempt: event.request.attempt,
|
|
863
|
+
max_attempts: event.request.maxAttempts,
|
|
864
|
+
arg_keys: objectKeys(event.request.args),
|
|
865
|
+
...(event.type === "tool_retry_resolved"
|
|
866
|
+
? {
|
|
867
|
+
resolution: event.decision.action,
|
|
868
|
+
resolved_by: event.decision.resolvedBy,
|
|
869
|
+
reason: compactString(event.decision.reason, 512),
|
|
870
|
+
}
|
|
871
|
+
: {}),
|
|
872
|
+
}),
|
|
873
|
+
});
|
|
874
|
+
}
|
|
570
875
|
recordServerRequestEvent(event) {
|
|
571
876
|
if (event.type === "registered") {
|
|
572
877
|
this.recordApprovalWait({
|
|
@@ -592,8 +897,9 @@ export class HostedAgentRuntimeProgressRecorder {
|
|
|
592
897
|
});
|
|
593
898
|
}
|
|
594
899
|
recordPromptFailure(message) {
|
|
900
|
+
const stepId = this.stepId("error", `${Date.now()}`);
|
|
595
901
|
this.recordStep({
|
|
596
|
-
id:
|
|
902
|
+
id: stepId,
|
|
597
903
|
name: "Prompt failed",
|
|
598
904
|
stepKind: PlatformAgentRunStepKindValue.Error,
|
|
599
905
|
state: PlatformAgentRunStepStateValue.Failed,
|
|
@@ -602,6 +908,15 @@ export class HostedAgentRuntimeProgressRecorder {
|
|
|
602
908
|
event_type: "prompt_failure",
|
|
603
909
|
}),
|
|
604
910
|
});
|
|
911
|
+
this.recordEvent({
|
|
912
|
+
type: PlatformRuntimeEventTypeValue.AgentProgressRecorded,
|
|
913
|
+
message: "Maestro prompt failure recorded",
|
|
914
|
+
stepId,
|
|
915
|
+
attributes: this.basePayload({
|
|
916
|
+
event_type: "prompt_failure",
|
|
917
|
+
error_message: compactString(message, 512),
|
|
918
|
+
}),
|
|
919
|
+
});
|
|
605
920
|
}
|
|
606
921
|
recordTaskProgressEvent(event) {
|
|
607
922
|
const runId = nonEmptyString(this.hostedRunner?.agentRunId);
|
|
@@ -1625,6 +1940,28 @@ export class HostedAgentRuntimeProgressRecorder {
|
|
|
1625
1940
|
workItemId(toolCallId) {
|
|
1626
1941
|
return this.stepId("work", toolCallId);
|
|
1627
1942
|
}
|
|
1943
|
+
resolveAutoRetryStartSequence(attempt) {
|
|
1944
|
+
if (this.activeAutoRetrySequence === null ||
|
|
1945
|
+
attempt <= this.lastAutoRetryAttempt) {
|
|
1946
|
+
this.autoRetrySequence += 1;
|
|
1947
|
+
this.activeAutoRetrySequence = this.autoRetrySequence;
|
|
1948
|
+
}
|
|
1949
|
+
this.lastAutoRetryAttempt = attempt;
|
|
1950
|
+
return this.activeAutoRetrySequence;
|
|
1951
|
+
}
|
|
1952
|
+
resolveAutoRetryEndSequence() {
|
|
1953
|
+
if (this.activeAutoRetrySequence === null) {
|
|
1954
|
+
this.autoRetrySequence += 1;
|
|
1955
|
+
this.activeAutoRetrySequence = this.autoRetrySequence;
|
|
1956
|
+
}
|
|
1957
|
+
const sequence = this.activeAutoRetrySequence;
|
|
1958
|
+
this.activeAutoRetrySequence = null;
|
|
1959
|
+
this.lastAutoRetryAttempt = 0;
|
|
1960
|
+
return sequence;
|
|
1961
|
+
}
|
|
1962
|
+
autoRetryStepId(attempt, sequence) {
|
|
1963
|
+
return this.stepId("retry", `auto-${sequence}-attempt-${attempt}`);
|
|
1964
|
+
}
|
|
1628
1965
|
waitId(requestId) {
|
|
1629
1966
|
return this.stepId("wait", requestId);
|
|
1630
1967
|
}
|