feat: agent integration overhaul - unified output pipeline#14
Open
aram-devdocs wants to merge 4 commits intomainfrom
Open
feat: agent integration overhaul - unified output pipeline#14aram-devdocs wants to merge 4 commits intomainfrom
aram-devdocs wants to merge 4 commits intomainfrom
Conversation
Major refactoring of agent integration architecture: ## Phase 1: Foundation - Contracts and Types - Add NormalizedEntry types in events/normalized.rs - Add structured ExecutionError types in errors/execution.rs - Add new channel constants for raw/normalized/error streams ## Phase 2: Core Pipeline Components - Create LineBuffer service for byte accumulation and ANSI stripping - Create EventNormalizer service for UnifiedAgentEvent transformation - Create PermissionDetector service with multi-pattern detection ## Phase 3: Unified Output Pipeline - Replace AgentOutputSink with AgentOutputPipeline in orchestrator - Delete legacy ProcessBuffer (dual buffering eliminated) - Delete legacy ProcessManager (functionality consolidated) ## Phase 4: Enhanced Permission Handling - Add comprehensive regex patterns for all prompt formats - Add permission timeout tracking with auto-timeout mechanism - Add PermissionStatus::TimedOut variant ## Phase 5: Tool State Consolidation - Remove in-memory tool tracking (DB is single source of truth) - Add execution context fields (command, file_path, duration_ms) - Enhanced tool state service methods ## Phase 6: Streaming Architecture - Dual WebSocket channels (raw-output, normalized) - Tool state channel for real-time updates - Incremental event fetching with afterSequence parameter ## Phase 7: Provider Abstraction Improvements - Extended AgentProvider trait with new methods - Updated all providers (claude_code, gemini_cli, codex_cli, mock) ## Phase 8: Database Schema Updates - Migration 016: Enhanced permissions table - Migration 017: Permission timed out status - Migration 018: Enhanced tool states table - Migration 019: Normalized events table ## Phase 9: Frontend Updates - New TypeScript types generated - New hooks for dual streams (useAgentRawStream, useAgentNormalizedEvents) - Updated event subscriptions for new channels ## Phase 10: Cleanup and Validation - Removed all legacy code (process_buffer.rs, process_manager.rs) - Updated module exports - Updated CLAUDE.md documentation - Added integration tests Co-Authored-By: Claude <noreply@anthropic.com>
|
| Status | Validator | Errors | Warnings |
|---|---|---|---|
| zod-coverage | 0 | 107 | |
| ✅ | routes | 0 | 0 |
| ✅ | storybook | 0 | 0 |
| test-coverage | 0 | 1 | |
| rust-services | 0 | 3 | |
| ✅ | primitives | 0 | 0 |
| ✅ | a11y | 0 | 0 |
Total: 0 errors, 111 warnings
View full report
{
"timestamp": "2026-01-14T22:06:58.059Z",
"status": "warn",
"totalErrors": 0,
"totalWarnings": 111,
"totalInfos": 0,
"validators": [
{
"name": "zod-coverage",
"status": "warn",
"errors": 0,
"warnings": 107,
"infos": 0,
"executionTimeMs": 1781
},
{
"name": "routes",
"status": "pass",
"errors": 0,
"warnings": 0,
"infos": 0,
"executionTimeMs": 1466
},
{
"name": "storybook",
"status": "pass",
"errors": 0,
"warnings": 0,
"infos": 0,
"executionTimeMs": 775
},
{
"name": "test-coverage",
"status": "warn",
"errors": 0,
"warnings": 1,
"infos": 0,
"executionTimeMs": 694
},
{
"name": "rust-services",
"status": "warn",
"errors": 0,
"warnings": 3,
"infos": 0,
"executionTimeMs": 748
},
{
"name": "primitives",
"status": "pass",
"errors": 0,
"warnings": 0,
"infos": 0,
"executionTimeMs": 1843
},
{
"name": "a11y",
"status": "pass",
"errors": 0,
"warnings": 0,
"infos": 0,
"executionTimeMs": 1880
}
],
"reports": [
{
"validator": "zod-coverage",
"timestamp": "2026-01-14T22:06:50.606Z",
"status": "warn",
"errorCount": 0,
"warningCount": 107,
"infoCount": 0,
"violations": [
{
"file": "packages/validation/schemas.ts",
"line": 376,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"providerIdSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const providerIdSchema = z.enum(['claude-code', 'gemini-cli', 'codex-cli', 'mock']);",
"metadata": {
"schemaName": "providerIdSchema",
"correspondingType": "ProviderId"
}
},
{
"file": "packages/validation/schemas.ts",
"line": 409,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"updateStepSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const updateStepSchema = z.object({",
"metadata": {
"schemaName": "updateStepSchema",
"correspondingType": "UpdateStepRequest"
}
},
{
"file": "packages/validation/schemas.ts",
"line": 459,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"sessionSummarySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const sessionSummarySchema = z.object({",
"metadata": {
"schemaName": "sessionSummarySchema",
"correspondingType": "SessionSummary"
}
},
{
"file": "packages/validation/schemas.ts",
"line": 563,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"normalizedEntrySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const normalizedEntrySchema = z.object({",
"metadata": {
"schemaName": "normalizedEntrySchema",
"correspondingType": "NormalizedEntry"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 28,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"agentMessageRoleSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const agentMessageRoleSchema = z.enum(['user', 'assistant', 'system']);",
"metadata": {
"schemaName": "agentMessageRoleSchema",
"correspondingType": "AgentMessageRole"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 34,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"auditActionSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const auditActionSchema = z.enum([",
"metadata": {
"schemaName": "auditActionSchema",
"correspondingType": "AuditAction"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 56,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"auditActorSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const auditActorSchema = z.enum(['system', 'user', 'agent']);",
"metadata": {
"schemaName": "auditActorSchema",
"correspondingType": "AuditActor"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 62,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"auditEntityTypeSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const auditEntityTypeSchema = z.enum([",
"metadata": {
"schemaName": "auditEntityTypeSchema",
"correspondingType": "AuditEntityType"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 86,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"cliToolTypeSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const cliToolTypeSchema = z.enum([",
"metadata": {
"schemaName": "cliToolTypeSchema",
"correspondingType": "CliToolType"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 100,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"completionStatusSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const completionStatusSchema = z.enum([",
"metadata": {
"schemaName": "completionStatusSchema",
"correspondingType": "CompletionStatus"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 150,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"eventSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const eventSchema = z.enum([",
"metadata": {
"schemaName": "eventSchema",
"correspondingType": "Event"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 163,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"eventTypeSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const eventTypeSchema = z.enum([",
"metadata": {
"schemaName": "eventTypeSchema",
"correspondingType": "EventType"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 182,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"executionErrorSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const executionErrorSchema = z.enum(['spawn', 'reason', 'command', 'cwd']);",
"metadata": {
"schemaName": "executionErrorSchema",
"correspondingType": "ExecutionError"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 221,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"permissionDeniedReasonSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const permissionDeniedReasonSchema = z.enum([",
"metadata": {
"schemaName": "permissionDeniedReasonSchema",
"correspondingType": "PermissionDeniedReason"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 296,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"toolResultStatusSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const toolResultStatusSchema = z.enum(['success', 'error', 'cancelled']);",
"metadata": {
"schemaName": "toolResultStatusSchema",
"correspondingType": "ToolResultStatus"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 314,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"workflowVariableSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const workflowVariableSchema = z.enum([",
"metadata": {
"schemaName": "workflowVariableSchema",
"correspondingType": "WorkflowVariable"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 333,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"wsClientMessageSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const wsClientMessageSchema = z.enum(['subscribe', 'channel']);",
"metadata": {
"schemaName": "wsClientMessageSchema",
"correspondingType": "WsClientMessage"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 339,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"wsServerMessageSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const wsServerMessageSchema = z.enum(['connected', 'client_id']);",
"metadata": {
"schemaName": "wsServerMessageSchema",
"correspondingType": "WsServerMessage"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 359,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"applyWorkflowToTaskRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const applyWorkflowToTaskRequestSchema = z.object({",
"metadata": {
"schemaName": "applyWorkflowToTaskRequestSchema",
"correspondingType": "ApplyWorkflowToTaskRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 418,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"createProcessRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const createProcessRequestSchema = z.object({",
"metadata": {
"schemaName": "createProcessRequestSchema",
"correspondingType": "CreateProcessRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 464,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"createStepRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const createStepRequestSchema = z.object({",
"metadata": {
"schemaName": "createStepRequestSchema",
"correspondingType": "CreateStepRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 490,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"createWorkflowTemplateRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const createWorkflowTemplateRequestSchema = z.object({",
"metadata": {
"schemaName": "createWorkflowTemplateRequestSchema",
"correspondingType": "CreateWorkflowTemplateRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 514,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"deleteAllSettingsRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const deleteAllSettingsRequestSchema = z.object({",
"metadata": {
"schemaName": "deleteAllSettingsRequestSchema",
"correspondingType": "DeleteAllSettingsRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 523,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"deleteSettingRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const deleteSettingRequestSchema = z.object({",
"metadata": {
"schemaName": "deleteSettingRequestSchema",
"correspondingType": "DeleteSettingRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 532,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"deleteWorkflowTemplateRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const deleteWorkflowTemplateRequestSchema = z.object({",
"metadata": {
"schemaName": "deleteWorkflowTemplateRequestSchema",
"correspondingType": "DeleteWorkflowTemplateRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 552,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"generateBranchNameRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const generateBranchNameRequestSchema = z.object({",
"metadata": {
"schemaName": "generateBranchNameRequestSchema",
"correspondingType": "GenerateBranchNameRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 562,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"generateWorktreePathRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const generateWorktreePathRequestSchema = z.object({",
"metadata": {
"schemaName": "generateWorktreePathRequestSchema",
"correspondingType": "GenerateWorktreePathRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 574,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getAllSettingsRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getAllSettingsRequestSchema = z.object({",
"metadata": {
"schemaName": "getAllSettingsRequestSchema",
"correspondingType": "GetAllSettingsRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 583,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getCommitsRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getCommitsRequestSchema = z.object({",
"metadata": {
"schemaName": "getCommitsRequestSchema",
"correspondingType": "GetCommitsRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 595,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getCurrentBranchRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getCurrentBranchRequestSchema = z.object({",
"metadata": {
"schemaName": "getCurrentBranchRequestSchema",
"correspondingType": "GetCurrentBranchRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 604,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getDiffRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getDiffRequestSchema = z.object({",
"metadata": {
"schemaName": "getDiffRequestSchema",
"correspondingType": "GetDiffRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 615,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getHeadCommitRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getHeadCommitRequestSchema = z.object({",
"metadata": {
"schemaName": "getHeadCommitRequestSchema",
"correspondingType": "GetHeadCommitRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 624,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getSettingOrDefaultRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getSettingOrDefaultRequestSchema = z.object({",
"metadata": {
"schemaName": "getSettingOrDefaultRequestSchema",
"correspondingType": "GetSettingOrDefaultRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 634,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getSettingRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getSettingRequestSchema = z.object({",
"metadata": {
"schemaName": "getSettingRequestSchema",
"correspondingType": "GetSettingRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 643,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getTaskCommitsRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getTaskCommitsRequestSchema = z.object({",
"metadata": {
"schemaName": "getTaskCommitsRequestSchema",
"correspondingType": "GetTaskCommitsRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 653,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getTaskDiffRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getTaskDiffRequestSchema = z.object({",
"metadata": {
"schemaName": "getTaskDiffRequestSchema",
"correspondingType": "GetTaskDiffRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 662,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"getWorkflowTemplateRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const getWorkflowTemplateRequestSchema = z.object({",
"metadata": {
"schemaName": "getWorkflowTemplateRequestSchema",
"correspondingType": "GetWorkflowTemplateRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 672,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"hasUncommittedChangesRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const hasUncommittedChangesRequestSchema = z.object({",
"metadata": {
"schemaName": "hasUncommittedChangesRequestSchema",
"correspondingType": "HasUncommittedChangesRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 681,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"killProcessRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const killProcessRequestSchema = z.object({",
"metadata": {
"schemaName": "killProcessRequestSchema",
"correspondingType": "KillProcessRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 690,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"listProcessesRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const listProcessesRequestSchema = z.object({",
"metadata": {
"schemaName": "listProcessesRequestSchema",
"correspondingType": "ListProcessesRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 703,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"listWorkflowTemplatesRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const listWorkflowTemplatesRequestSchema = z.object({",
"metadata": {
"schemaName": "listWorkflowTemplatesRequestSchema",
"correspondingType": "ListWorkflowTemplatesRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 713,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"listWorktreesRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const listWorktreesRequestSchema = z.object({",
"metadata": {
"schemaName": "listWorktreesRequestSchema",
"correspondingType": "ListWorktreesRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 722,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"parseWorkflowRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const parseWorkflowRequestSchema = z.object({",
"metadata": {
"schemaName": "parseWorkflowRequestSchema",
"correspondingType": "ParseWorkflowRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 731,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"permissionRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const permissionRequestSchema = z.object({",
"metadata": {
"schemaName": "permissionRequestSchema",
"correspondingType": "PermissionRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 776,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"searchRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const searchRequestSchema = z.object({",
"metadata": {
"schemaName": "searchRequestSchema",
"correspondingType": "SearchRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 797,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"setDefaultExecutorProfileRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const setDefaultExecutorProfileRequestSchema = z.object({",
"metadata": {
"schemaName": "setDefaultExecutorProfileRequestSchema",
"correspondingType": "SetDefaultExecutorProfileRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 815,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"setSettingRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const setSettingRequestSchema = z.object({",
"metadata": {
"schemaName": "setSettingRequestSchema",
"correspondingType": "SetSettingRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 825,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"settingExistsRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const settingExistsRequestSchema = z.object({",
"metadata": {
"schemaName": "settingExistsRequestSchema",
"correspondingType": "SettingExistsRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 851,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"startProcessRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const startProcessRequestSchema = z.object({",
"metadata": {
"schemaName": "startProcessRequestSchema",
"correspondingType": "StartProcessRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 869,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"substituteWorkflowVariablesRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const substituteWorkflowVariablesRequestSchema = z.object({",
"metadata": {
"schemaName": "substituteWorkflowVariablesRequestSchema",
"correspondingType": "SubstituteWorkflowVariablesRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 916,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"updateMessageRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const updateMessageRequestSchema = z.object({",
"metadata": {
"schemaName": "updateMessageRequestSchema",
"correspondingType": "UpdateMessageRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 930,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"updateProcessRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const updateProcessRequestSchema = z.object({",
"metadata": {
"schemaName": "updateProcessRequestSchema",
"correspondingType": "UpdateProcessRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 963,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"updateStepRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const updateStepRequestSchema = z.object({",
"metadata": {
"schemaName": "updateStepRequestSchema",
"correspondingType": "UpdateStepRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 988,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"updateWorkflowStepRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const updateWorkflowStepRequestSchema = z.object({",
"metadata": {
"schemaName": "updateWorkflowStepRequestSchema",
"correspondingType": "UpdateWorkflowStepRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1000,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"updateWorkflowTemplateRequestSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const updateWorkflowTemplateRequestSchema = z.object({",
"metadata": {
"schemaName": "updateWorkflowTemplateRequestSchema",
"correspondingType": "UpdateWorkflowTemplateRequest"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1014,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"agentEventRecordSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const agentEventRecordSchema = z.object({",
"metadata": {
"schemaName": "agentEventRecordSchema",
"correspondingType": "AgentEventRecord"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1027,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"agentSessionSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const agentSessionSchema = z.object({",
"metadata": {
"schemaName": "agentSessionSchema",
"correspondingType": "AgentSession"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1044,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"agentSessionSummarySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const agentSessionSummarySchema = z.object({",
"metadata": {
"schemaName": "agentSessionSummarySchema",
"correspondingType": "AgentSessionSummary"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1061,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"agentSessionWithStateSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const agentSessionWithStateSchema = z.object({",
"metadata": {
"schemaName": "agentSessionWithStateSchema",
"correspondingType": "AgentSessionWithState"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1076,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"agentStatsSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const agentStatsSchema = z.object({",
"metadata": {
"schemaName": "agentStatsSchema",
"correspondingType": "AgentStats"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1089,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"artifactFileSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const artifactFileSchema = z.object({",
"metadata": {
"schemaName": "artifactFileSchema",
"correspondingType": "ArtifactFile"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1101,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"auditLogSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const auditLogSchema = z.object({",
"metadata": {
"schemaName": "auditLogSchema",
"correspondingType": "AuditLog"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1115,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"auditLogSummarySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const auditLogSummarySchema = z.object({",
"metadata": {
"schemaName": "auditLogSummarySchema",
"correspondingType": "AuditLogSummary"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1127,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"authStatusResponseSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const authStatusResponseSchema = z.object({",
"metadata": {
"schemaName": "authStatusResponseSchema",
"correspondingType": "AuthStatusResponse"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1135,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"branchSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const branchSchema = z.object({",
"metadata": {
"schemaName": "branchSchema",
"correspondingType": "Branch"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1147,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"chatSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const chatSchema = z.object({",
"metadata": {
"schemaName": "chatSchema",
"correspondingType": "Chat"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1174,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"chatSummarySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const chatSummarySchema = z.object({",
"metadata": {
"schemaName": "chatSummarySchema",
"correspondingType": "ChatSummary"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1190,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"claudeEventDataSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const claudeEventDataSchema = z.object({",
"metadata": {
"schemaName": "claudeEventDataSchema",
"correspondingType": "ClaudeEventData"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1200,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"cliInstalledResponseSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const cliInstalledResponseSchema = z.object({",
"metadata": {
"schemaName": "cliInstalledResponseSchema",
"correspondingType": "CliInstalledResponse"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1224,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"commitSummarySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const commitSummarySchema = z.object({",
"metadata": {
"schemaName": "commitSummarySchema",
"correspondingType": "CommitSummary"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1235,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"dataChangedEventSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const dataChangedEventSchema = z.object({",
"metadata": {
"schemaName": "dataChangedEventSchema",
"correspondingType": "DataChangedEvent"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1248,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"dbWorktreeSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const dbWorktreeSchema = z.object({",
"metadata": {
"schemaName": "dbWorktreeSchema",
"correspondingType": "DbWorktree"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1264,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"dbWorktreeSummarySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const dbWorktreeSummarySchema = z.object({",
"metadata": {
"schemaName": "dbWorktreeSummarySchema",
"correspondingType": "DbWorktreeSummary"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1276,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"defaultShellResponseSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const defaultShellResponseSchema = z.object({",
"metadata": {
"schemaName": "defaultShellResponseSchema",
"correspondingType": "DefaultShellResponse"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1286,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"deleteAllSettingsResponseSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const deleteAllSettingsResponseSchema = z.object({",
"metadata": {
"schemaName": "deleteAllSettingsResponseSchema",
"correspondingType": "DeleteAllSettingsResponse"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1317,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"executionProcessSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const executionProcessSchema = z.object({",
"metadata": {
"schemaName": "executionProcessSchema",
"correspondingType": "ExecutionProcess"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1338,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"executorProfileSchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const executorProfileSchema = z.object({",
"metadata": {
"schemaName": "executorProfileSchema",
"correspondingType": "ExecutorProfile"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1355,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"executorProfileSummarySchema\" is defined but never used in validation",
"severity": "warning",
"suggestion": "Either use this schema in validation logic or remove it if unnecessary",
"snippet": "export const executorProfileSummarySchema = z.object({",
"metadata": {
"schemaName": "executorProfileSummarySchema",
"correspondingType": "ExecutorProfileSummary"
}
},
{
"file": "packages/validation/schemas-generated.ts",
"line": 1383,
"column": 1,
"rule": "zod/unused-schema",
"message": "Schema \"fi
... (truncated, see artifacts for full report)Generated by OpenFlow Validation Suite
This commit introduces a complete SDK-based agent system that replaces regex-based permission detection with structured canUseTool callbacks. Key changes: - Add agent-service TypeScript package wrapping @anthropic-ai/claude-agent-sdk - Add AgentServiceBridge in Rust for HTTP/WebSocket communication - Add SDK-based Tauri commands (run_executor_sdk, respond_agent_permission_sdk) - Add SDK-based hooks (useRunExecutorSdk, useRespondAgentPermissionSdk) - Update useChatSession to use SDK flow for permission handling - Fix WebSocket URL format (add trailing slash before query params) - Fix permission ID mismatch by using agent-service IDs in database The SDK flow provides: - Type-safe permission handling via canUseTool callback - Structured tool inputs (no text parsing required) - Reliable permission request/response routing - Better maintainability than regex pattern matching Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move clearEvents() call before createMessage.mutate() to eliminate race condition where both displayItems (from events) and messages (from database) showed the same content simultaneously. The content is already extracted into local variables before this point, so clearing events early prevents the brief overlap where both sources rendered the same response. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix OutputPipeline "not found" errors by returning empty string instead of error when pipeline is cleaned up after session completes - Fix duplicate response display by only persisting text content to messages (tool calls already shown during streaming) - Fix missing loading state by showing StreamingResponse when isRunning is true (shows spinner even with empty displayItems) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major refactoring of the agent integration architecture to create a unified output pipeline that replaces the legacy dual-buffering approach with a single, coherent data flow.
Changes
Phase 1: Foundation - Contracts and Types
NormalizedEntrytypes inevents/normalized.rsfor canonical event formatExecutionErrortypes inerrors/execution.rsPhase 2: Core Pipeline Components
LineBufferservice for byte accumulation and ANSI strippingEventNormalizerservice forUnifiedAgentEventtransformationPermissionDetectorservice with multi-pattern detectionPhase 3: Unified Output Pipeline
AgentOutputSinkwithAgentOutputPipelinein orchestratorProcessBuffer(dual buffering eliminated)ProcessManager(functionality consolidated)Phase 4: Enhanced Permission Handling
PermissionStatus::TimedOutvariantPhase 5: Tool State Consolidation
Phase 6: Streaming Architecture
afterSequenceparameterPhase 7: Provider Abstraction Improvements
AgentProvidertrait with new methodsPhase 8: Database Schema Updates
Phase 9: Frontend Updates
useAgentRawStream,useAgentNormalizedEvents)Phase 10: Cleanup and Validation
process_buffer.rs,process_manager.rs)Test Plan
pnpm test) - 8,961 tests passingpnpm typecheck)pnpm lint)pnpm validate:arch)cargo test)pnpm tauri dev)Related Issues
Addresses agent integration architecture issues:
Architecture
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com