feat: surface workflow diagnostics

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David KayaandCopilot committed 2026-04-01 18:50:56 +02:00
1 parent b434dd86b4
commit 11b36827f5
12 files changed
+527 -4

No files matched your search

+23
View File
@@ -384,6 +384,28 @@ export interface PendingMessagesModifiedEvent {
agentName?: string;
}
export type WorkflowDiagnosticSeverity = 'warning' | 'error';
export type WorkflowDiagnosticKind =
| 'workflow-warning'
| 'workflow-error'
| 'executor-failed'
| 'subworkflow-warning'
| 'subworkflow-error';
export interface WorkflowDiagnosticEvent {
type: 'workflow-diagnostic';
requestId: string;
sessionId: string;
severity: WorkflowDiagnosticSeverity;
diagnosticKind: WorkflowDiagnosticKind;
message: string;
agentId?: string;
agentName?: string;
executorId?: string;
subworkflowId?: string;
exceptionType?: string;
}
export interface CopilotSessionInfo {
copilotSessionId: string;
managedByAryx: boolean;
@@ -563,6 +585,7 @@ export type SidecarEvent =
| SessionUsageEvent
| SessionCompactionEvent
| PendingMessagesModifiedEvent
| WorkflowDiagnosticEvent
| ApprovalRequestedEvent
| UserInputRequestedEvent
| McpOauthRequiredEvent
+16 -2
View File
@@ -1,7 +1,12 @@
import type { SessionRunRecord } from '@shared/domain/runTimeline';
import type { ChatMessageKind } from '@shared/domain/session';
import type { QuotaSnapshot, ToolCallFileChangePreview } from '@shared/contracts/sidecar';
import type {
QuotaSnapshot,
ToolCallFileChangePreview,
WorkflowDiagnosticKind,
WorkflowDiagnosticSeverity,
} from '@shared/contracts/sidecar';
export type SessionActivityType = 'thinking' | 'tool-calling' | 'handoff' | 'completed';
@@ -19,7 +24,8 @@ export type SessionEventKind =
| 'session-usage'
| 'session-compaction'
| 'pending-messages-modified'
| 'assistant-usage';
| 'assistant-usage'
| 'workflow-diagnostic';
export type SubagentEventKind = 'started' | 'completed' | 'failed' | 'selected' | 'deselected';
@@ -86,4 +92,12 @@ export interface SessionEventRecord {
usageDuration?: number;
usageTotalNanoAiu?: number;
usageQuotaSnapshots?: Record<string, QuotaSnapshot>;
// Workflow diagnostic fields
diagnosticSeverity?: WorkflowDiagnosticSeverity;
diagnosticKind?: WorkflowDiagnosticKind;
diagnosticMessage?: string;
executorId?: string;
subworkflowId?: string;
exceptionType?: string;
}