mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-07 04:08:45 +02:00
feat: surface workflow diagnostics
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -2504,6 +2504,21 @@ export class AryxAppService extends EventEmitter<AppServiceEvents> {
|
||||
agentName: event.agentName,
|
||||
});
|
||||
return;
|
||||
case 'workflow-diagnostic':
|
||||
this.emitSessionEvent({
|
||||
sessionId,
|
||||
kind: 'workflow-diagnostic',
|
||||
occurredAt,
|
||||
agentId: event.agentId,
|
||||
agentName: event.agentName,
|
||||
diagnosticSeverity: event.severity,
|
||||
diagnosticKind: event.diagnosticKind,
|
||||
diagnosticMessage: event.message,
|
||||
executorId: event.executorId,
|
||||
subworkflowId: event.subworkflowId,
|
||||
exceptionType: event.exceptionType,
|
||||
});
|
||||
return;
|
||||
case 'assistant-usage':
|
||||
this.emitSessionEvent({
|
||||
sessionId,
|
||||
|
||||
@@ -15,6 +15,7 @@ import type {
|
||||
AssistantUsageEvent,
|
||||
AssistantIntentEvent,
|
||||
ReasoningDeltaEvent,
|
||||
WorkflowDiagnosticEvent,
|
||||
} from '@shared/contracts/sidecar';
|
||||
import type { ChatMessageRecord } from '@shared/domain/session';
|
||||
|
||||
@@ -27,7 +28,8 @@ export type TurnScopedEvent =
|
||||
| PendingMessagesModifiedEvent
|
||||
| AssistantUsageEvent
|
||||
| AssistantIntentEvent
|
||||
| ReasoningDeltaEvent;
|
||||
| ReasoningDeltaEvent
|
||||
| WorkflowDiagnosticEvent;
|
||||
|
||||
export interface RunTurnPendingCommand {
|
||||
kind: 'run-turn';
|
||||
|
||||
@@ -454,6 +454,7 @@ export class SidecarClient {
|
||||
case 'session-usage':
|
||||
case 'session-compaction':
|
||||
case 'pending-messages-modified':
|
||||
case 'workflow-diagnostic':
|
||||
case 'assistant-usage':
|
||||
case 'assistant-intent':
|
||||
case 'reasoning-delta':
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user