$ bun test . bun test v1.2.23 (cf136713)  tmp/src/demo.spec.ts: ✓ sum test > adds 1 + 2 to equal 3 [0.01ms]  tmp/src/routes/page.svelte.spec.ts: ✓ Page component > should have basic functionality  src/tools/__tests__/examination.test.ts: ✓ examination tool > Basic functionality > should export examination tool [62.88ms] ✓ examination tool > Basic functionality > should have correct tool description [0.10ms] ✓ examination tool > Basic functionality > should handle empty project [0.51ms] ✓ examination tool > Basic functionality > should handle non-existent file [0.07ms] Unit test execution failed: ENOENT: no such file or directory, open '/test/project/package.json' path: "/test/project/package.json", syscall: "open", errno: -2, code: "ENOENT"  ✓ examination tool > Project detection > should detect Node.js project [3.23ms] Unit test execution failed: ENOENT: no such file or directory, open '/test/project/package.json' path: "/test/project/package.json", syscall: "open", errno: -2, code: "ENOENT"  ✓ examination tool > Project detection > should detect TypeScript project [1.55ms] Unit test execution failed: ENOENT: no such file or directory, open '/test/project/package.json' path: "/test/project/package.json", syscall: "open", errno: -2, code: "ENOENT"  ✓ examination tool > Project detection > should handle projects without TypeScript [0.28ms] ✓ examination tool > File handling > should handle specific file path [0.21ms] ✓ examination tool > File handling > should handle directory paths [0.60ms] ✓ examination tool > Error handling > should handle file system errors gracefully [0.14ms] Unit test execution failed: ENOENT: no such file or directory, open '/test/project/package.json' path: "/test/project/package.json", syscall: "open", errno: -2, code: "ENOENT"  ✓ examination tool > Error handling > should handle invalid JSON gracefully [0.17ms] TypeScript spawn failed: 277 | return ""; 278 | }); 279 | 280 | // Ensure spawn fails 281 | bunSpawnSpy.mockImplementation(() => { 282 | throw new Error("npx not found"); ^ error: npx not found  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/__tests__/examination.test.ts:282:19)  at getTypeScriptDiagnostics (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/examination.ts:158:18)  at getTypeScriptDiagnostics (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/examination.ts:145:3)  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/examination.ts:744:11)  at async  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/__tests__/examination.test.ts:286:40)  Unit test execution failed: ENOENT: no such file or directory, open '/test/project/package.json' path: "/test/project/package.json", syscall: "open", errno: -2, code: "ENOENT"  ✓ examination tool > Error handling > should handle subprocess failures silently [0.58ms] Unit test execution failed: ENOENT: no such file or directory, open '/test/project/package.json' path: "/test/project/package.json", syscall: "open", errno: -2, code: "ENOENT"  ✓ examination tool > Tool configuration > should detect Biome configuration [0.26ms] Unit test execution failed: ENOENT: no such file or directory, open '/test/project/package.json' path: "/test/project/package.json", syscall: "open", errno: -2, code: "ENOENT"  ✓ examination tool > Tool configuration > should detect ESLint configuration [0.36ms] ✓ examination tool > Performance and reliability > should complete quickly with mocked file system [0.12ms] ✓ examination tool > Performance and reliability > should handle concurrent executions [0.12ms] ✓ examination tool > Performance and reliability > should handle edge case paths [0.29ms] ✓ examination tool > Tool metadata validation > should have valid tool structure [0.06ms] ✓ examination tool > Tool metadata validation > should have basic tool properties [0.04ms] ✓ examination tool > Tool metadata validation > should handle missing path parameter [0.05ms]  src/tools/__tests__/code-grep.test.ts: ✓ code-grep tool > should find console.log statements [31.92ms] ✓ code-grep tool > should find import statements [24.02ms] ✓ code-grep tool > should find destructured imports [3.13ms] ✓ code-grep tool > should find function definitions [4.25ms] ✓ code-grep tool > should find type annotations [4.20ms] ✓ code-grep tool > should find class definitions with methods [4.23ms] ✓ code-grep tool > should filter by language [4.04ms] ✓ code-grep tool > should include context when requested [1.13ms] ✓ code-grep tool > should respect maxMatches limit [1.57ms] ✓ code-grep tool > should handle non-existent patterns gracefully [1.79ms] ✓ code-grep tool > should handle invalid paths gracefully [2.65ms] ✓ code-grep tool > should find variable declarations [1.89ms] ✓ code-grep tool > should work with multiple file extensions [4.68ms] ✓ code-grep tool > should find code in Vue single file components [2.38ms] ✓ code-grep tool > should find Vue import statements [3.35ms] ✓ code-grep tool > should find code in Svelte components [2.08ms] ✓ code-grep tool > should find Svelte function definitions [1.96ms] ✓ code-grep tool > should find code in Astro files (frontmatter) [2.54ms] ✓ code-grep tool > should find code in Astro script sections [2.98ms] ✓ code-grep tool > should filter by component file types [1.97ms] ✓ code-grep tool > should handle component files with different script lang attributes [2.14ms] ✓ code-grep tool > should correctly map line numbers in component files [1.65ms]  src/tools/__tests__/terminal.test.ts: ✓ terminal tool > should execute simple command successfully [13.45ms] ✓ terminal tool > should handle empty output with success exit code [12.07ms] ✓ terminal tool > should handle command failure [19.02ms] ✓ terminal tool > should handle non-existent command [10.35ms] ✓ terminal tool > should change to specified directory [7.27ms] ✓ terminal tool > should handle file operations [11.42ms] ✓ terminal tool > should handle stderr output [5.87ms] ✓ terminal tool > should combine stdout and stderr [5.83ms] ✓ terminal tool > should handle multiline output [6.14ms] ✓ terminal tool > should handle commands with special characters [9.38ms] ✓ terminal tool > should handle large output truncation [10.09ms] ✓ terminal tool > should handle file listing [11.26ms] ✓ terminal tool > should handle environment variables [8.33ms] ✓ terminal tool > should handle command with pipes [12.27ms] ✓ terminal tool > should handle command with redirection [9.62ms] ✓ terminal tool > should return error for invalid directory [1.54ms] ✓ terminal tool > should handle concurrent command execution [9.04ms] ✓ terminal tool > should handle git commands [58.93ms] ✓ terminal tool > should handle file creation and verification [13.12ms] ✓ terminal tool > should handle commands that use working directory [6.72ms] ✓ terminal tool > should preserve output formatting [5.90ms] ✓ terminal tool > should have correct tool metadata [0.32ms] ✓ terminal tool > should prevent long-running commands [0.51ms] ✓ terminal tool > should handle empty command [6.28ms] ✓ terminal tool > should handle command with quotes [5.33ms] ✓ terminal tool > should handle unicode characters in output [9.55ms] ✓ terminal tool > should handle commands with newlines in arguments [5.32ms] ✓ terminal tool > should use default timeout of 300 seconds [4.90ms] ✓ terminal tool > should accept custom timeout parameter [5.16ms] ✓ terminal tool > should return error for timeout less than 1 second [0.52ms] ✓ terminal tool > should return error for timeout greater than 600 seconds [0.49ms] ✓ terminal tool > should timeout after specified duration [1004.71ms] ✓ terminal tool > should accept maximum timeout of 600 seconds [11.99ms] ✓ terminal tool > should handle timeout with partial output [1003.72ms]  src/tools/__tests__/edit-file.test.ts: ✓ editFile tool > File creation > should create new file with empty old_string [2.87ms] ✓ editFile tool > File creation > should create file with multiline content [0.92ms] ✓ editFile tool > File creation > should create parent directories when creating new file [1.23ms] ✓ editFile tool > File creation > should error when trying to create file that already exists [0.84ms] ✓ editFile tool > File editing > should perform simple text replacement [0.91ms] ✓ editFile tool > File editing > should handle multiline text replacement [0.75ms] ✓ editFile tool > File editing > should handle multiple occurrences with expected_occurrences [0.71ms] ✓ editFile tool > File editing > should error when occurrence count doesn't match expected [0.51ms] ✓ editFile tool > File editing > should preserve original content when old_string and new_string are identical [0.60ms] ✓ editFile tool > File editing > should handle line ending normalization [1.23ms] ✓ editFile tool > Flexible matching > should handle whitespace-flexible matching [1.37ms] ✓ editFile tool > Flexible matching > should preserve indentation with flexible matching [1.26ms] ✓ editFile tool > Flexible matching > should maintain relative indentation in multiline replacements [0.95ms] ✓ editFile tool > Error handling > should error when editing non-existent file [0.34ms] ✓ editFile tool > Error handling > should error when old_string is not found [0.53ms] ✓ editFile tool > Error handling > should provide helpful suggestions in error messages [0.56ms] ✓ editFile tool > Error handling > should handle file read errors gracefully [0.32ms] ✓ editFile tool > Diff generation > should generate proper diff output [0.66ms] ✓ editFile tool > Diff generation > should show line count in diff for multiline changes [0.76ms] ✓ editFile tool > Diff generation > should return 'No changes' when content is identical after replacement [0.73ms] ✓ editFile tool > Special cases > should handle special characters in text [0.97ms] ✓ editFile tool > Special cases > should handle replacing entire file content [1.88ms] ✓ editFile tool > Special cases > should handle empty file content [0.91ms] ✓ editFile tool > Special cases > should handle large file edits efficiently [1.39ms] ✓ editFile tool > Special cases > should handle adding content to empty sections [0.96ms] ✓ editFile tool > Special cases > should handle zero occurrences with flexible matching fallback [0.88ms] ✓ editFile tool > Tool metadata > should have correct tool description and schema [0.36ms] ✓ editFile tool > Edge cases and validation > should handle default expected_occurrences of 1 [0.80ms] ✓ editFile tool > Edge cases and validation > should return consistent error object structure [0.46ms] ✓ editFile tool > Edge cases and validation > should provide helpful context in error messages for LLM agents [0.84ms]  src/tools/__tests__/file-system.test.ts: ✓ fileSystem tool > stats operation > should calculate directory statistics [5.87ms] ✓ fileSystem tool > stats operation > should count hidden items separately [1.77ms] ✓ fileSystem tool > stats operation > should include hidden items when requested [1.10ms] ✓ fileSystem tool > info operation > should get file info successfully [1.38ms] ✓ fileSystem tool > info operation > should get directory info successfully [0.61ms] ✓ fileSystem tool > info operation > should handle empty file [0.73ms] ✓ fileSystem tool > info operation > should return error object when path is not provided [0.46ms] ✓ fileSystem tool > info operation > should return error object for non-existent file [0.49ms] ✓ fileSystem tool > env operation > should return environment info with system and project data [1.82ms] ✓ fileSystem tool > env operation > should handle missing .chara.json file [0.56ms] ✓ fileSystem tool > env operation > should handle invalid .chara.json file [0.98ms] ✓ fileSystem tool > env operation > should work with includeSystem=false [0.42ms] ✓ fileSystem tool > env operation > should work with includeProject=false [0.48ms] ✓ fileSystem tool > env operation > should use current directory as default [0.45ms] ✓ fileSystem tool > env operation > should return error object for invalid .chara.json [0.92ms] ✓ fileSystem tool > env operation > should handle directory read errors [0.41ms] ✓ fileSystem tool > error handling > should return error object for unknown action [1.23ms] ✓ fileSystem tool > error handling > should handle non-existent directories gracefully [1.31ms] ✓ fileSystem tool > error handling > should handle permission errors gracefully [1.11ms] ✓ fileSystem tool > error handling > should return error object for invalid directory [0.84ms] ✓ fileSystem tool > error handling > should handle maxDepth overflow protection [0.46ms] ✓ fileSystem tool > special cases > should handle unicode filenames [1.73ms] ✓ fileSystem tool > special cases > should handle long filenames [0.96ms] ✓ fileSystem tool > special cases > should handle concurrent operations [1.09ms] ✓ fileSystem tool > LLM agent error handling > should return structured error objects for all operation types [0.48ms] ✓ fileSystem tool > LLM agent error handling > should provide helpful suggestions for common LLM mistakes [0.46ms] ✓ fileSystem tool > LLM agent error handling > should handle system resource protection with error objects [0.34ms] ✓ fileSystem tool > LLM agent error handling > should maintain consistent error object structure [0.48ms] ✓ fileSystem tool > LLM agent error handling > should always return error objects instead of throwing [0.44ms] ✓ fileSystem tool > tool metadata > should have correct tool description [0.24ms] ✓ fileSystem tool > tool metadata > should have proper parameter validation [0.27ms]  src/tools/__tests__/thinking.test.ts: ✓ thinking tool > should process a simple thought successfully [0.35ms] ✓ thinking tool > should handle revision thoughts correctly [0.08ms] ✓ thinking tool > should handle branching thoughts correctly [0.07ms] ✓ thinking tool > should adjust total thoughts when current exceeds estimate [0.04ms] ✓ thinking tool > should handle final thought correctly [0.04ms] ✓ thinking tool > should handle multiline thoughts correctly [0.02ms] ✓ thinking tool > should track multiple branches correctly [0.08ms] ✓ thinking tool > should handle needsMoreThoughts parameter [0.03ms] ✓ thinking tool > should validate revision parameters correctly [0.06ms] ✓ thinking tool > should validate branch parameters correctly [0.03ms] ✓ thinking tool > should validate revisesThought number correctly [0.01ms] ✓ thinking tool > should validate branchFromThought number correctly [0.06ms] ✓ thinking tool > should maintain state across multiple thoughts [0.05ms] ✓ thinking tool > should handle complex thinking scenario with revisions and branches [0.07ms] ✓ thinking tool > should have correct tool metadata [0.03ms] ✓ thinking tool > should format thoughts with proper structure [0.03ms] ✓ thinking tool > should include JSON summary in output [0.07ms] ✓ thinking tool > should handle unicode characters in thoughts [0.10ms] ✓ thinking tool > should handle very long thoughts [0.14ms] ✓ thinking tool > should handle engineering-focused system design scenario [0.10ms] ✓ thinking tool > should handle engineering trade-off analysis with revisions [0.06ms] ✓ thinking tool > should validate engineering methodology in descriptions [0.03ms]  src/tools/__tests__/directory.test.ts: ✓ directory tool > list operation > should list files and directories [0.97ms] ✓ directory tool > list operation > should handle empty directory [0.25ms] ✓ directory tool > list operation > should include hidden files when requested [0.15ms] ✓ directory tool > list operation > should exclude hidden files by default [0.08ms] ✓ directory tool > list operation > should include file sizes when requested [0.35ms] ✓ directory tool > list operation > should skip .chara directories [0.11ms] ✓ directory tool > list operation > should respect .gitignore patterns [0.09ms] ✓ directory tool > list operation > should include ignored files when respectGitignore is false [0.12ms] ✓ directory tool > list operation > should show important hidden files even when includeHidden is false [0.10ms] ✓ directory tool > tree operation > should return tree structure [0.55ms] ✓ directory tool > tree operation > should respect maxDepth limit [0.12ms] ✓ directory tool > tree operation > should include file sizes when requested [0.11ms] ✓ directory tool > tree operation > should handle empty directories [0.09ms] ✓ directory tool > error handling > should return error object for unknown action [0.05ms] ✓ directory tool > error handling > should handle non-existent directories gracefully [0.15ms] ✓ directory tool > error handling > should handle permission errors gracefully [0.06ms] ✓ directory tool > error handling > should validate maxDepth parameter [0.05ms] ✓ directory tool > special cases > should handle unicode filenames [0.11ms] ✓ directory tool > special cases > should handle very long filenames [0.08ms] ✓ directory tool > special cases > should handle large directory with many files [0.28ms] ✓ directory tool > special cases > should handle files with special characters [0.10ms] ✓ directory tool > tool metadata > should have correct tool description [0.06ms] ✓ directory tool > tool metadata > should have proper parameter validation [0.05ms] ✓ directory tool > default parameters > should use current directory when no path provided [0.07ms] ✓ directory tool > default parameters > should use default values for optional parameters [0.06ms]  src/tools/__tests__/agent-tools-integration.test.ts: ✓ Agent Tools Integration > Chat Agent Tools > should include essential development tools [0.02ms] ✓ Agent Tools Integration > Chat Agent Tools > should not include analysis-only tools [0.01ms] ✓ Agent Tools Integration > Chat Agent Tools > should not include redundant search tools ✓ Agent Tools Integration > Tool Function Validation > should have valid tool functions in chat tools [0.06ms] ✓ Agent Tools Integration > Security Validation > should have appropriate tool access controls [0.02ms] ✓ Agent Tools Integration > Performance Optimization > should have appropriate tool counts [0.02ms] ✓ Agent Tools Integration > Backward Compatibility > should maintain original tools export [0.04ms]  src/tools/__tests__/move-file.test.ts: ✓ moveFile tool > should move file successfully [1.89ms] ✓ moveFile tool > should rename file in same directory [1.01ms] ✓ moveFile tool > should move file to different directory [1.23ms] ✓ moveFile tool > should move directory successfully [2.55ms] ✓ moveFile tool > should rename directory [1.35ms] ✓ moveFile tool > should move file with special characters [1.01ms] ✓ moveFile tool > should move file to nested directory [1.49ms] ✓ moveFile tool > should preserve file permissions [0.85ms] ✓ moveFile tool > should handle empty file [1.00ms] ✓ moveFile tool > should handle large file [2.73ms] ✓ moveFile tool > should throw error for non-existent source [1.26ms] ✓ moveFile tool > should overwrite destination when it already exists [1.66ms] ✓ moveFile tool > should throw error when trying to move to non-existent directory [0.74ms] ✓ moveFile tool > should handle moving hidden files [3.43ms] ✓ moveFile tool > should handle concurrent moves [2.10ms] ✓ moveFile tool > should move file across directory boundaries [1.42ms] ✓ moveFile tool > should have correct tool metadata [0.41ms] ✓ moveFile tool > should handle binary-like content [0.81ms] ✓ moveFile tool > should handle files with very long names [1.03ms] ✓ moveFile tool > should handle moving directory with many files [15.99ms]  src/tools/__tests__/write-file.test.ts: ✓ writeFile tool > creating new files > should create a new file with simple content [2.09ms] ✓ writeFile tool > creating new files > should create a new file with empty content [0.70ms] ✓ writeFile tool > creating new files > should create a new file with multiline content [0.91ms] ✓ writeFile tool > creating new files > should create a new file with special characters [2.35ms] ✓ writeFile tool > creating new files > should create a new file with JSON content [1.33ms] ✓ writeFile tool > creating new files > should create a new file with large content [0.91ms] ✓ writeFile tool > overwriting existing files > should overwrite an existing file [0.85ms] ✓ writeFile tool > overwriting existing files > should overwrite an existing file with empty content [0.62ms] ✓ writeFile tool > overwriting existing files > should overwrite an existing file multiple times [1.16ms] ✓ writeFile tool > overwriting existing files > should overwrite a large existing file [1.18ms] ✓ writeFile tool > directory handling > should create parent directories when creating a file [2.15ms] ✓ writeFile tool > directory handling > should create multiple levels of nested directories [2.52ms] ✓ writeFile tool > directory handling > should handle files with special characters in directory names [1.46ms] ✓ writeFile tool > content types > should handle binary-like content [1.00ms] ✓ writeFile tool > content types > should handle code content with various languages [2.55ms] ✓ writeFile tool > content types > should handle content with different line endings [1.23ms] ✓ writeFile tool > content types > should handle content with tabs and spaces [0.93ms] ✓ writeFile tool > auto-detection behavior > should correctly detect when file exists vs doesn't exist [0.79ms] ✓ writeFile tool > auto-detection behavior > should handle rapid successive writes [1.31ms] ✓ writeFile tool > error handling > should handle file system errors gracefully [0.51ms] ✓ writeFile tool > error handling > should handle very long file paths [0.97ms] ✓ writeFile tool > error handling > should provide helpful error messages [0.64ms] ✓ writeFile tool > edge cases > should handle files with no extension [1.61ms] ✓ writeFile tool > edge cases > should handle files with multiple dots in name [0.86ms] ✓ writeFile tool > edge cases > should handle hidden files [0.59ms] ✓ writeFile tool > edge cases > should handle files in hidden directories [1.09ms] ✓ writeFile tool > tool metadata > should have correct tool description [0.47ms] ✓ writeFile tool > tool metadata > should have properly defined parameters [0.38ms] ✓ writeFile tool > performance > should handle multiple small files efficiently [14.87ms] ✓ writeFile tool > performance > should handle large content efficiently [1.57ms] ✓ writeFile tool > return value validation > should return consistent structure for successful operations [0.83ms] ✓ writeFile tool > return value validation > should return consistent structure for error operations [0.54ms]  src/tools/__tests__/examination.unit.test.ts: ✓ examination tool - unit tests with spies > project detection > should detect Node.js project with package.json [0.63ms] ✓ examination tool - unit tests with spies > project detection > should detect TypeScript project [0.20ms] ✓ examination tool - unit tests with spies > project detection > should detect Biome when configured [0.16ms] ✓ examination tool - unit tests with spies > project detection > should detect ESLint when configured [0.17ms] ✓ examination tool - unit tests with spies > project detection > should detect Prettier when configured [0.36ms] ✓ examination tool - unit tests with spies > diagnostic parsing > should parse TypeScript compiler output correctly [0.46ms] ✓ examination tool - unit tests with spies > diagnostic parsing > should parse ESLint JSON output correctly [0.25ms] ✓ examination tool - unit tests with spies > diagnostic parsing > should parse Biome JSON output correctly [0.22ms] ✓ examination tool - unit tests with spies > tool execution tracking > should show executed checks with status [0.39ms] ✓ examination tool - unit tests with spies > tool execution tracking > should show reasons for skipped checks [0.40ms] ✓ examination tool - unit tests with spies > tool execution tracking > should show diagnostic counts for executed checks [0.29ms] ✓ examination tool - unit tests with spies > file-specific analysis > should handle specific file path [0.18ms] ✓ examination tool - unit tests with spies > file-specific analysis > should handle non-existent file path [0.10ms] ✓ examination tool - unit tests with spies > file-specific analysis > should skip tools not applicable to single files [0.14ms] ✓ examination tool - unit tests with spies > error handling > should handle projects without Node.js/TypeScript setup [0.02ms] TypeScript spawn failed: 538 | devDependencies: { typescript: "^5.0.0" }, 539 | }), 540 | ), 541 | ); 542 | bunSpawnSpy.mockImplementation(() => { 543 | throw new Error("Tool execution failed"); ^ error: Tool execution failed  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/__tests__/examination.unit.test.ts:543:19)  at getTypeScriptDiagnostics (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/examination.ts:158:18)  at getTypeScriptDiagnostics (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/examination.ts:145:3)  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/examination.ts:744:11)  at async  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/__tests__/examination.unit.test.ts:546:40)  ✓ examination tool - unit tests with spies > error handling > should handle tool execution errors gracefully [0.46ms] ESLint check failed: 225 | 226 | const stdout = await new Response(proc.stdout).text(); 227 | await proc.exited; 228 | 229 | if (stdout.trim()) { 230 | const results = JSON.parse(stdout); ^ SyntaxError: JSON Parse error: Unexpected identifier "invalid"  at getESLintDiagnostics (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/tools/examination.ts:230:28)  ✓ examination tool - unit tests with spies > error handling > should handle malformed JSON output from tools [0.50ms] ✓ examination tool - unit tests with spies > output formatting > should format project-wide summary correctly [0.15ms] ✓ examination tool - unit tests with spies > output formatting > should group diagnostics by source in detailed view [0.25ms] ✓ examination tool - unit tests with spies > output formatting > should handle no issues found case [0.10ms] ✓ examination tool - unit tests with spies > performance optimizations > should complete quickly with mocked operations [0.20ms] ✓ examination tool - unit tests with spies > performance optimizations > should handle concurrent tool execution efficiently [52.20ms]  src/tools/__tests__/grep.test.ts: ✓ grep tool > should find simple text pattern [5.38ms] ✓ grep tool > should handle case-insensitive search [2.65ms] ✓ grep tool > should support regex patterns [2.11ms] ✓ grep tool > should handle fixed string matching [4.41ms] ✓ grep tool > should support invert matching [11.41ms] ✓ grep tool > should show context lines [5.68ms] ✓ grep tool > should use context parameter for both before and after [3.23ms] ✓ grep tool > should limit results with maxCount [5.02ms] ✓ grep tool > should search multiple files [3.10ms] ✓ grep tool > should search directories recursively [4.36ms] ✓ grep tool > should filter files by pattern [3.58ms] ✓ grep tool > should handle wildcard file patterns [3.11ms] ✓ grep tool > should disable line numbers when requested [5.11ms] ✓ grep tool > should handle empty files [2.28ms] ✓ grep tool > should handle non-existent files gracefully [2.34ms] ✓ grep tool > should handle special regex characters [2.55ms] ✓ grep tool > should handle unicode characters [2.14ms] ✓ grep tool > should handle large files [2.28ms] ✓ grep tool > should handle invalid regex gracefully [0.86ms] ✓ grep tool > should search in current directory when path is directory [2.06ms] ✓ grep tool > should handle mixed file and directory paths [5.20ms] ✓ grep tool > should truncate large result sets [2.28ms] ✓ grep tool > should handle multiline matches correctly [2.13ms] ✓ grep tool > should show match positions [1.67ms] ✓ grep tool > should handle case-insensitive file patterns [1.68ms] ✓ grep tool > should handle binary files gracefully [2.40ms] ✓ grep tool > should have correct tool metadata [0.34ms] ✓ grep tool > should handle concurrent searches [2.88ms] ✓ grep tool > should handle complex regex patterns [2.64ms] ✓ grep tool > should handle word boundary patterns [2.46ms] ✓ grep tool > should support fallback to current directory when disabled [1.41ms] ✓ grep tool > should have fallback enabled by default [36.19ms]  src/tools/__tests__/mkdir.test.ts: ✓ mkdir tool > directory creation > should create directory successfully with relative path [0.46ms] ✓ mkdir tool > directory creation > should create nested directories with recursive option [0.05ms] ✓ mkdir tool > directory creation > should handle absolute paths [0.06ms] ✓ mkdir tool > directory creation > should treat path with trailing slash correctly [0.05ms] ✓ mkdir tool > edge cases and error handling > should handle empty path [0.10ms] ✓ mkdir tool > edge cases and error handling > should handle whitespace-only path [0.04ms] ✓ mkdir tool > edge cases and error handling > should handle existing directory gracefully with recursive mode [0.04ms] ✓ mkdir tool > edge cases and error handling > should handle recursive=false for nested paths [0.12ms] ✓ mkdir tool > edge cases and error handling > should provide helpful error suggestions [0.13ms] ✓ mkdir tool > relative path handling > should create directories with various relative paths [0.05ms] ✓ mkdir tool > relative path handling > should handle parent directory references [0.16ms] ✓ mkdir tool > tool metadata > should have correct tool description [0.02ms] ✓ mkdir tool > tool metadata > should have proper parameter validation [0.01ms] ✓ mkdir tool > tool metadata > should have required path parameter [0.02ms] ✓ mkdir tool > tool metadata > should have recursive parameter with default true [0.48ms] ✓ mkdir tool > tool metadata > should not have file-related parameters [0.28ms] ✓ mkdir tool > unicode and special characters > should handle unicode directory names [0.05ms] ✓ mkdir tool > unicode and special characters > should handle special characters in directory names [0.05ms] ✓ mkdir tool > unicode and special characters > should handle very long directory names [0.04ms] ✓ mkdir tool > concurrent operations > should handle concurrent directory creation [0.11ms] ✓ mkdir tool > concurrent operations > should handle concurrent nested directory creation [0.04ms] ✓ mkdir tool > error handling scenarios > should handle various error types [0.07ms] ✓ mkdir tool > error handling scenarios > should return error structure for problematic paths [0.06ms] ✓ mkdir tool > error handling scenarios > should handle very long path names [0.05ms] ✓ mkdir tool > error handling scenarios > should handle space issues [0.02ms] ✓ mkdir tool > error handling scenarios > should handle normal directory creation [0.06ms] ✓ mkdir tool > path normalization > should normalize relative paths correctly [0.02ms] ✓ mkdir tool > path normalization > should handle multiple slashes [0.04ms] ✓ mkdir tool > path normalization > should handle dot notation [0.06ms] ✓ mkdir tool > return value structure > should return proper success structure [0.05ms] ✓ mkdir tool > return value structure > should return proper error structure [0.03ms]  src/tools/__tests__/fetch.test.ts: ✓ fetch tool > should fetch simple text content [0.57ms] ✓ fetch tool > should convert HTML to markdown [14.85ms] ✓ fetch tool > should return raw HTML when raw=true [0.13ms] ✓ fetch tool > should handle content truncation [0.08ms] ✓ fetch tool > should handle pagination with startIndex [0.07ms] ✓ fetch tool > should handle startIndex beyond content length [0.05ms] ✓ fetch tool > should return error message for HTTP errors [0.04ms] ✓ fetch tool > should return error message for network timeouts [0.09ms] ✓ fetch tool > should return error message for network errors [0.03ms] ✓ fetch tool > should return error message for invalid URLs [0.06ms] ✓ fetch tool > should handle redirects [0.03ms] ✓ fetch tool > should clean up HTML content properly [0.54ms] ✓ fetch tool > should handle different HTML elements [0.48ms] ✓ fetch tool > should have correct tool metadata ✓ fetch tool > should handle JSON content [0.10ms] ✓ fetch tool > should handle empty content [0.06ms] ✓ fetch tool > should handle concurrent fetch requests [0.10ms] ✓ fetch tool > should handle markdown conversion errors gracefully [0.13ms] ✓ fetch tool > should handle unknown errors [0.06ms] ✓ fetch tool > should validate parameter ranges [0.05ms] ✓ fetch tool > should not have ignoreRobotsTxt parameter [0.02ms] ✓ fetch tool > should handle various HTTP error codes [0.08ms]  src/tools/__tests__/find.test.ts: ✓ find tool > successful operations > should find all files with default pattern [6.99ms] ✓ find tool > successful operations > should find JavaScript files [5.46ms] ✓ find tool > successful operations > should find TypeScript files [3.65ms] ✓ find tool > successful operations > should find files with pipe-separated patterns [5.40ms] ✓ find tool > successful operations > should include hidden files when requested [3.21ms] ✓ find tool > successful operations > should exclude hidden files by default [5.42ms] ✓ find tool > successful operations > should respect gitignore files [2.99ms] ✓ find tool > successful operations > should ignore gitignore when disabled [3.63ms] ✓ find tool > successful operations > should exclude patterns correctly [4.21ms] ✓ find tool > successful operations > should return structured result object [4.37ms] ✓ find tool > error handling > should handle invalid path gracefully (returns empty results) [2.72ms] ✓ find tool > error handling > should return error object for complex pattern with too many wildcards [2.58ms] ✓ find tool > error handling > should return error object for pattern with too many segments [3.01ms] ✓ find tool > error handling > should return error object for too many pipe-separated patterns [1.99ms] ✓ find tool > error handling > should return error object for pattern that is too long [1.87ms] ✓ find tool > error handling > should return error object for pattern with high complexity score [3.47ms] ✓ find tool > error handling > should handle empty pattern gracefully [3.10ms] ✓ find tool > error handling > should handle whitespace-only pattern [2.97ms] ✓ find tool > pattern preprocessing > should preprocess simple filename patterns [3.28ms] ✓ find tool > pattern preprocessing > should handle contains patterns [3.10ms] ✓ find tool > pattern preprocessing > should not modify patterns that already start with ** [2.89ms] ✓ find tool > default exclusions > should always exclude .chara directory [4.14ms] ✓ find tool > default exclusions > should always exclude node_modules directory [3.24ms] ✓ find tool > default exclusions > should always exclude .git directory [3.00ms] ✓ find tool > result formatting > should format results with file and directory indicators [2.46ms] ✓ find tool > result formatting > should return 'No matches found' when no results [3.54ms] ✓ find tool > result structure > should return correct result structure for files [4.20ms]  src/tools/__tests__/read-file.test.ts: ✓ readFile tool > should read file content successfully [0.85ms] ✓ readFile tool > should read empty file [0.07ms] ✓ readFile tool > should read file with special characters [0.09ms] ✓ readFile tool > should read multiline file [0.05ms] ✓ readFile tool > should read JSON file [0.05ms] ✓ readFile tool > should return error object for non-existent file [0.14ms] ✓ readFile tool > should return error object when trying to read directory [0.07ms] ✓ readFile tool > should read file with line range [0.07ms] ✓ readFile tool > should read from start_line to end of file when end_line not specified [0.06ms] ✓ readFile tool > should handle edge cases with line ranges [0.10ms] ✓ readFile tool > should return outline for large files [0.37ms] ✓ readFile tool > should generate outline for code files [0.85ms] ✓ readFile tool > should return error object for absolute paths [0.05ms] ✓ readFile tool > should return error object for path traversal attempts [0.04ms] ✓ readFile tool > should return error object for excluded file patterns [0.08ms] ✓ readFile tool > should return error object for private file patterns [0.12ms] ✓ readFile tool > should preserve line endings [0.05ms] ✓ readFile tool > should handle binary files gracefully [0.08ms] ✓ readFile tool > should return error object for invalid line number parameters [0.06ms] ✓ readFile tool > should handle permission errors gracefully [0.08ms] ✓ readFile tool > should handle unicode filenames [0.14ms] ✓ readFile tool > should handle files in nested directories [0.06ms] ✓ readFile tool > should handle markdown outline generation [0.65ms] ✓ readFile tool > should handle python code outline [0.59ms] ✓ readFile tool > should handle rust code outline [0.69ms] ✓ readFile tool > should handle file with no recognizable symbols [2.77ms] ✓ readFile tool > should return error for missing path parameter [0.16ms] ✓ readFile tool > should have correct tool metadata [0.03ms]  src/tools/__tests__/dev-server.test.ts: ✓ devServer tool > Tool metadata > should have correct tool description [0.05ms] ✓ devServer tool > Tool metadata > should have proper parameter validation [0.04ms] ✓ devServer tool > Tool metadata > should have execute function ✓ devServer tool > Process listing > should list all processes when no processId provided [0.49ms] ✓ devServer tool > Process listing > should handle empty process list [0.07ms] ✓ devServer tool > Process listing > should format process information correctly [0.03ms] ✓ devServer tool > Process diagnostics > should handle non-existent process gracefully [0.07ms] ✓ devServer tool > Process diagnostics > should validate processId parameter [0.02ms] ✓ devServer tool > Process diagnostics > should handle custom endpoint parameter [0.03ms] ✓ devServer tool > Process diagnostics > should handle custom HTTP method [0.03ms] ✓ devServer tool > Process diagnostics > should handle timeout parameter [0.02ms] ✓ devServer tool > HTTP testing functionality > should handle connection failures gracefully [0.03ms] ✓ devServer tool > HTTP testing functionality > should handle invalid URLs gracefully [0.03ms] ✓ devServer tool > HTTP testing functionality > should format HTTP response information [0.02ms] ✓ devServer tool > Log capture functionality > should capture fresh logs after HTTP call ✓ devServer tool > Log capture functionality > should handle processes without logs [0.01ms] ✓ devServer tool > Log capture functionality > should limit log output appropriately [0.04ms] ✓ devServer tool > Error handling > should handle runner service errors gracefully [0.02ms] ✓ devServer tool > Error handling > should handle invalid parameters gracefully [0.01ms] ✓ devServer tool > Error handling > should handle network timeouts [0.03ms] ✓ devServer tool > Output formatting > should return well-formatted markdown output [0.02ms] ✓ devServer tool > Output formatting > should include timestamps in output [0.02ms] ✓ devServer tool > Output formatting > should truncate long responses appropriately [0.03ms] ✓ devServer tool > Integration with runner service > should properly interface with runner service [0.03ms] ✓ devServer tool > Integration with runner service > should handle runner service unavailability [0.02ms] ✓ devServer tool > Parameter combinations > should handle all parameters together [0.03ms] ✓ devServer tool > Parameter combinations > should use default values for missing parameters [0.02ms] ✓ devServer tool > Performance > should complete within reasonable time [0.04ms] ✓ devServer tool > Performance > should handle concurrent requests [0.08ms] ✓ devServer tool > Security considerations > should sanitize process output [0.02ms] ✓ devServer tool > Security considerations > should validate endpoint URLs [0.01ms]  src/tools/__tests__/project-info.test.ts: ✓ projectInfo tool > should have correct tool metadata [0.06ms] ✓ projectInfo tool > should execute successfully with default parameters [168.61ms] ✓ projectInfo tool > should execute successfully with current directory [150.46ms] ✓ projectInfo tool > should handle partial feature flags [8.41ms] ✓ projectInfo tool > should detect package manager correctly [151.44ms] ✓ projectInfo tool > should detect workspace information [160.09ms] ✓ projectInfo tool > should handle non-existent paths gracefully [24.96ms] ✓ projectInfo tool > should include available scripts when present [155.25ms] ✓ projectInfo tool > should include dependencies information [146.37ms] ✓ projectInfo tool > should include timestamp in output [145.60ms] ✓ projectInfo tool > should handle errors gracefully [1.86ms] ✓ projectInfo tool > should format output as markdown [152.34ms] ✓ projectInfo tool > should validate parameter types correctly [0.15ms]  src/providers/__tests__/new-provider-structure.test.ts: ✓ New Provider Structure > should export all required providers [0.09ms] ✓ New Provider Structure > should export individual provider instances [0.05ms] ✓ New Provider Structure > provider instances should have correct properties [0.06ms] ✓ New Provider Structure > provider instances should implement BaseProvider interface [0.06ms] ✓ New Provider Structure > providers should be able to check initialization capability [0.79ms] ✓ New Provider Structure > providers should fail initialization without required config [0.24ms] ✓ New Provider Structure > providers should be able to create provider factories [3.08ms] ✓ New Provider Structure > providers should have fetchModels method [0.15ms] ✓ New Provider Structure > AbstractProvider should provide default implementations [0.05ms] ✓ New Provider Structure > allProviders registry should contain all provider instances [0.07ms] ✓ New Provider Structure > providerKeys should match allProviders keys [0.04ms]  src/providers/__tests__/registry.test.ts: ✓ ProvidersRegistry > should not initialize providers automatically [0.56ms] ✓ ProvidersRegistry > should initialize providers when initialize() is called [4.98ms] ✓ ProvidersRegistry > should handle multiple initialize() calls gracefully [1.71ms] ✓ ProvidersRegistry > should reinitialize providers when initialize() is called again [1.09ms] ✓ ProvidersRegistry > should clear state properly during reinitialize [0.68ms] ✓ ProvidersRegistry > should throw error when accessing uninitialized registry methods [0.42ms] ✓ ProvidersRegistry > should work normally after initialization [0.42ms] ✓ ProvidersRegistry > should handle getModel correctly after initialization [0.41ms] ✓ ProvidersRegistry > should handle missing model name [0.34ms] ✓ ProvidersRegistry > should handle non-existent provider [0.51ms] ✓ ProvidersRegistry > should return initialization errors [0.37ms] ✓ ProvidersRegistry > should handle reinitialize after failed initialization [0.60ms] ✓ ProvidersRegistry > should handle initialize as both first-time and reinitialization [1.04ms]  src/providers/__tests__/provider-configs.test.ts: ✓ ProviderConfigs > getAllProviderInitializers should return all provider methods [0.25ms] ✓ ProviderConfigs > initializeProvider method should handle API key validation [0.13ms] ✓ ProviderConfigs > registerProvider should add a new provider [0.05ms] ✓ ProviderConfigs > removed providers should not be available [0.23ms] ✓ ProviderConfigs > getProvider should return null for removed providers [0.04ms] ✓ ProviderConfigs > all remaining providers should have fetchModelsMethod [0.06ms] ✓ ProviderConfigs > provider initialization should work for remaining providers with proper env vars [0.33ms] ✓ ProviderConfigs > registerProvider should validate input [0.04ms]  src/agents/__tests__/suggestion-agent.test.ts: ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ✓ Suggestion Agent > parseSuggestionsFromResponse > should parse suggestions separated by <---> [0.13ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle responses without separators [0.01ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should clean up markdown formatting [0.01ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should filter out empty suggestions [0.03ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle mixed formatting and empty sections [0.01ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle responses with only separators [0.02ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle responses with trailing/leading whitespace [0.01ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle complex markdown patterns [0.02ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle suggestions with newlines [0.04ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle empty input [0.02ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle input with only whitespace [0.01ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle multiple consecutive separators ✓ Suggestion Agent > parseSuggestionsFromResponse > should preserve special characters in suggestions [0.02ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle suggestions with code blocks [0.01ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle very long suggestions [0.02ms] ✓ Suggestion Agent > parseSuggestionsFromResponse > should handle Unicode characters [0.03ms] ✓ Suggestion Agent > Response Format Validation > should handle malformed separators [0.01ms] ✓ Suggestion Agent > Response Format Validation > should handle case sensitivity  src/agents/__tests__/chat-agent.test.ts: ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenAI provider initialization failed: Provider OpenAI cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): Anthropic provider initialization failed: Provider Anthropic cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized ERROR (agents): DeepSeek provider initialization failed: Provider DeepSeek cannot be initialized ERROR (agents): DIAL provider initialization failed: Provider DIAL cannot be initialized ERROR (agents): Google provider initialization failed: Provider Google cannot be initialized ERROR (agents): Moonshot provider initialization failed: Provider Moonshot cannot be initialized ERROR (agents): OpenRouter provider initialization failed: Provider OpenRouter cannot be initialized WARN (agents): No provider found for key: non-existent-provider INFO (agents): Registered legacy provider Custom Provider with key "custom-provider" WARN (agents): No provider found for key: mistral WARN (agents): No provider found for key: groq WARN (agents): No provider found for key: xai WARN (agents): No provider found for key: bedrock WARN (agents): No provider found for key: huggingface ERROR (agents): Invalid provider key: null ERROR (agents): Provider configuration for invalid must include a valid createProviderFn ✓ Chat Agent > Message Cleaning > should remove toolCall tags from message content ✓ Chat Agent > Message Cleaning > should remove multiple toolCall tags from message content [0.03ms] ✓ Chat Agent > Message Cleaning > should handle messages without toolCall tags [0.03ms] ✓ Chat Agent > Message Cleaning > should handle empty messages [0.01ms] ✓ Chat Agent > Message Cleaning > should handle messages with only toolCall tags [0.02ms] ✓ Chat Agent > Message Cleaning > should handle complex toolCall tag patterns [0.02ms] ✓ Chat Agent > Message Cleaning > should not affect non-string content [0.02ms] ✓ Chat Agent > Message Cleaning > should preserve other message properties [0.03ms]  src/controllers/__tests__/models.test.ts: ✓ Models Controller Integration > should have the correct structure for enhanced model response [0.07ms] ✓ Models Controller Integration > should handle model response without enhanced fields [0.04ms] ✓ Models Controller Integration > should validate response format structure [0.04ms] ✓ Models Whitelist Configuration > should have correct default whitelist model structure [0.03ms] ✓ Models Whitelist Configuration > should support filtering by recommendation status [0.04ms] ✓ Models Whitelist Configuration > should support filtering by tool support [0.02ms] ✓ Models Whitelist Configuration > should support filtering by provider [0.02ms] ✓ Models Controller Error Handling > should handle missing settings gracefully [0.02ms] ✓ Models Controller Error Handling > should validate query parameters [0.01ms] ✓ Models Controller Error Handling > should maintain CORS headers format  src/services/__tests__/events.test.ts: ✓ TypedEventEmitter > Basic Event Handling > should add and trigger event listeners [0.16ms] ✓ TypedEventEmitter > Basic Event Handling > should handle multiple listeners for the same event [0.21ms] ✓ TypedEventEmitter > Basic Event Handling > should handle events with different data types [0.07ms] ✓ TypedEventEmitter > Once Listeners > should trigger once listeners only once [0.06ms] ✓ TypedEventEmitter > Once Listeners > should handle multiple once listeners [0.11ms] ✓ TypedEventEmitter > Removing Listeners > should remove specific listener with off [0.06ms] ✓ TypedEventEmitter > Removing Listeners > should remove all listeners for an event [0.05ms] ✓ TypedEventEmitter > Removing Listeners > should remove all listeners for all events [0.03ms] ✓ TypedEventEmitter > Listener Management > should return correct listener count [0.04ms] ✓ TypedEventEmitter > Listener Management > should return event names with listeners [0.04ms] ✓ TypedEventEmitter > Listener Management > should return listeners for an event [0.06ms] ✓ TypedEventEmitter > Advanced Features > should support prepend listeners [0.04ms] ✓ TypedEventEmitter > Advanced Features > should support prepend once listeners [0.06ms] ✓ TypedEventEmitter > Advanced Features > should support addListener and removeListener aliases [0.05ms] ✓ TypedEventEmitter > Error Handling > should return boolean from emit [0.03ms] ✓ TypedEventEmitter > Error Handling > should handle error events according to Node.js EventEmitter behavior [0.11ms] ✓ TypedEventEmitter > Error Handling > should throw on error events with no listeners [0.84ms] ✓ TypedEventEmitter > Method Chaining > should support method chaining [0.08ms] ✓ TypedEventEmitter > Raw Listeners > should return raw listeners including wrapped once listeners [0.06ms] ✓ TypedEventEmitter > Memory Management > should clean up listeners properly [0.03ms] ✓ TypedEventEmitter > Memory Management > should handle removing non-existent listeners gracefully [0.03ms] ✓ TypedEventEmitter > Type Safety > should maintain type safety with complex event data [0.05ms]  src/services/__tests__/runner.test.ts: ✓ RunnerService > basic functionality > should create a RunnerService instance [0.18ms] ✓ RunnerService > basic functionality > should have expected methods [0.05ms] ✓ RunnerService > basic functionality > should return empty processes initially [0.02ms] ✓ RunnerService > basic functionality > should return null for non-existent process info [0.02ms] ✓ RunnerService > basic functionality > should return false for non-existent process running check [0.03ms] ✓ RunnerService > basic functionality > should return false when stopping non-existent process [0.07ms] ✓ RunnerService > basic functionality > should return false when restarting non-existent process [0.31ms] ✓ RunnerService > basic functionality > should return false when updating non-existent process info [0.05ms] ✓ RunnerService > server info validation > should validate RunnerOptions interface requirements [0.04ms] ✓ RunnerService > server info validation > should validate ServerInfo interface structure [0.03ms] ✓ RunnerService > real process integration > should start and manage a simple echo process [106.95ms] Command non-existent-command-12345 not available: 188 | port: undefined, 189 | }, 190 | }); 191 | 192 | // Spawn the process 193 | const subprocess = Bun.spawn([String(mainCommand), ...args], { ^ error: Executable not found in $PATH: "non-existent-command-12345" path: "non-existent-command-12345", errno: -2, code: "ENOENT"  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:193:30)  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:154:5)  at start (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:145:15)  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/__tests__/runner.test.ts:199:22)  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/__tests__/runner.test.ts:197:52)  ✓ RunnerService > real process integration > should handle process that doesn't exist [0.97ms] ✓ RunnerService > event system > should emit events in correct format [0.23ms] ✓ RunnerService > error handling > should handle malformed options gracefully [0.09ms] Command next dev not available: 188 | port: undefined, 189 | }, 190 | }); 191 | 192 | // Spawn the process 193 | const subprocess = Bun.spawn([String(mainCommand), ...args], { ^ error: Executable not found in $PATH: "next" path: "next", errno: -2, code: "ENOENT"  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:193:30)  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:154:5)  at start (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:145:15)  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/__tests__/runner.test.ts:335:42)  Command nodemon app.js not available: 188 | port: undefined, 189 | }, 190 | }); 191 | 192 | // Spawn the process 193 | const subprocess = Bun.spawn([String(mainCommand), ...args], { ^ error: Executable not found in $PATH: "nodemon" path: "nodemon", errno: -2, code: "ENOENT"  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:193:30)  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:154:5)  at start (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:145:15)  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/__tests__/runner.test.ts:335:42)  Command unknown-command not available: 188 | port: undefined, 189 | }, 190 | }); 191 | 192 | // Spawn the process 193 | const subprocess = Bun.spawn([String(mainCommand), ...args], { ^ error: Executable not found in $PATH: "unknown-command" path: "unknown-command", errno: -2, code: "ENOENT"  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:193:30)  at startWithId (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:154:5)  at start (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/runner/index.ts:145:15)  at  (/Users/Andrii_Kucherenko/Workspace/lab/chara/packages/agents/src/services/__tests__/runner.test.ts:335:42)  ✓ RunnerService > error handling > should auto-detect process names based on command [26.92ms] ✓ RunnerService > restart functionality > should handle restart with same command [111.42ms] ✓ RunnerService > restart functionality > should handle restart with new command [113.62ms] ✓ RunnerService > update process info functionality > should update process name [6.06ms] ✓ RunnerService > update process info functionality > should update server URL [5.38ms] ✓ RunnerService > update process info functionality > should update both name and URL [5.44ms] ✓ RunnerService > event-based control > should handle get-status requests for specific process [210.33ms] ✓ RunnerService > event-based control > should handle get-status requests for all processes [218.99ms] ✓ RunnerService > event-based control > should handle restart requests via events [1713.58ms] ✓ RunnerService > event-based control > should handle restart requests with same command [1714.22ms] ✓ RunnerService > event-based control > should emit error for failed restart requests [101.65ms] ✓ RunnerService singleton > should export a singleton instance [0.75ms]  src/services/__tests__/isogit-singleton.test.ts: ✓ IsoGitService Singleton > should export a singleton instance ✓ IsoGitService Singleton > should always return the same instance [0.06ms] ✓ IsoGitService Singleton > should have all expected methods [0.02ms] ✓ IsoGitService Singleton > should be different from new instance [0.02ms]  src/providers/providers/__tests__/gemini-cli.test.ts: ✓ GeminiCLIProvider > should have correct provider metadata [0.24ms] ✓ GeminiCLIProvider > should implement BaseProvider interface [0.05ms] ✓ GeminiCLIProvider > should fetch predefined models [0.17ms] ✓ GeminiCLIProvider > should have working health check [0.10ms] ✓ GeminiCLIProvider > should handle canInitialize gracefully [0.17ms]  src/services/chat/__tests__/index.test.ts: ✓ Chat Service Index > Exported Services > should export chatHooksManager [0.03ms] ✓ Chat Service Index > Exported Services > should export chatProcessor [0.05ms] ✓ Chat Service Index > Exported Services > should export subscriptionManager [0.02ms] ✓ Chat Service Index > Exported Services > should export ChatService and chatService [0.02ms] ✓ Chat Service Index > Exported Types > should export ChatSubscription type [0.02ms] ✓ Chat Service Index > Exported Types > should export ChatStatus type [0.02ms] ✓ Chat Service Index > Exported Types > should export event types [0.03ms] ✓ Chat Service Index > Exported Types > should export chat event response types [0.03ms] ✓ Chat Service Index > Exported Types > should export union ChatEvent type [0.02ms] ✓ Chat Service Index > Exported Types > should export hook interface types [0.03ms] ✓ Chat Service Index > Exported Types > should export callback interface types [0.02ms] ✓ Chat Service Index > Exported Types > should export ChatAgentHooks type [0.01ms] ✓ Chat Service Index > Service Integration > should have working service instances [0.05ms] ✓ Chat Service Index > Service Integration > should maintain singleton instances [0.12ms] ✓ Chat Service Index > Type Compatibility > should allow proper type narrowing for ChatEvent [0.08ms] ✓ Chat Service Index > Type Compatibility > should support all chat status values [0.04ms] ✓ Chat Service Index > Type Compatibility > should support all chat modes [0.02ms] ✓ Chat Service Index > Type Compatibility > should support all chunk types [0.02ms] ✓ Chat Service Index > Module Structure > should export all required members [0.03ms] ✓ Chat Service Index > Module Structure > should not export internal implementation details [0.01ms]  src/services/chat/__tests__/subscription-manager.test.ts: ✓ SubscriptionManager > subscribeToChat > should subscribe a client to a chat successfully ✓ SubscriptionManager > subscribeToChat > should handle multiple clients subscribing to the same chat [0.04ms] ✓ SubscriptionManager > subscribeToChat > should handle one client subscribing to multiple chats [0.03ms] ✓ SubscriptionManager > subscribeToChat > should generate unique subscription IDs [0.09ms] ✓ SubscriptionManager > unsubscribeFromChat > should unsubscribe a client from a chat successfully [0.11ms] ✓ SubscriptionManager > unsubscribeFromChat > should handle unsubscribing from non-existent subscription [0.03ms] ✓ SubscriptionManager > unsubscribeFromChat > should only remove the correct client when multiple clients are subscribed [0.04ms] ✓ SubscriptionManager > unsubscribeFromChat > should remove chat subscription list when no subscribers remain [0.03ms] ✓ SubscriptionManager > unsubscribeFromAllChats > should unsubscribe client from all chats [0.14ms] ✓ SubscriptionManager > unsubscribeFromAllChats > should return 0 when client has no active subscriptions [0.05ms] ✓ SubscriptionManager > unsubscribeFromAllChats > should not affect other clients' subscriptions [0.04ms] ✓ SubscriptionManager > cleanupClientSubscriptions > should clean up all subscriptions for a disconnected client [0.05ms] ✓ SubscriptionManager > cleanupClientSubscriptions > should handle cleanup for client with no subscriptions [0.04ms] ✓ SubscriptionManager > sendToClient > should send event to client successfully [0.05ms] ✓ SubscriptionManager > sendToClient > should handle WebSocket send errors and cleanup client [0.31ms] ✓ SubscriptionManager > broadcastToChat > should broadcast event to all subscribers of a chat [0.40ms] ✓ SubscriptionManager > broadcastToChat > should return 0 when no subscribers exist ✓ SubscriptionManager > broadcastToChat > should handle partial broadcast failures and clean up failed clients [0.21ms] ✓ SubscriptionManager > broadcastToChat > should broadcast different event types correctly [0.06ms] ✓ SubscriptionManager > Utility Methods > getSubscriberCount should return correct count [0.05ms] ✓ SubscriptionManager > Utility Methods > hasSubscribers should return correct boolean [0.02ms] ✓ SubscriptionManager > Utility Methods > getAllSubscribedChats should return all chat IDs with subscriptions [0.04ms] ✓ SubscriptionManager > Utility Methods > getClientSubscriptions should return correct chat IDs for client [0.02ms] ✓ SubscriptionManager > Memory Management > clear should remove all subscriptions [0.02ms] ✓ SubscriptionManager > Edge Cases > should handle subscribing the same client to the same chat multiple times [0.01ms] ✓ SubscriptionManager > Edge Cases > should handle very large numbers of subscriptions [7.43ms] ✓ SubscriptionManager > Edge Cases > should handle concurrent subscribe/unsubscribe operations [0.29ms]  src/services/chat/__tests__/chat-processor-legacy.test.ts: ✓ ChatProcessor > setTools > should set MCP tools correctly [0.09ms] ✓ ChatProcessor > setTools > should handle empty tools object [0.02ms] ✓ ChatProcessor > setTools > should handle complex tools object [0.03ms] ✓ ChatProcessor > setTools > should handle tools with various data types [0.03ms] ✓ ChatProcessor > setTools > should handle sequential tool updates [0.03ms] ✓ ChatProcessor > getActiveChats > should return empty array when no chats are active [0.04ms] ✓ ChatProcessor > getActiveChats > should maintain state consistency [0.02ms] ✓ ChatProcessor > isProcessing > should return false for non-processing chat ✓ ChatProcessor > isProcessing > should handle invalid chat IDs gracefully [0.04ms] ✓ ChatProcessor > isProcessing > should return consistent results [0.02ms] ✓ ChatProcessor > handleChatCancel > should handle cancel for non-existent chat gracefully [0.04ms] ✓ ChatProcessor > handleChatCancel > should handle invalid chat IDs gracefully [0.09ms] ✓ ChatProcessor > handleChatCancel > should handle rapid cancellation requests [0.05ms] ✓ ChatProcessor > destroy > should be safe to call multiple times [0.02ms] ✓ ChatProcessor > destroy > should cleanup resources properly [0.05ms] ✓ ChatProcessor > clear > should clear active chat controllers [0.02ms] ✓ ChatProcessor > clear > should be safe to call multiple times [0.01ms] ✓ ChatProcessor > handleChatSend data validation > should handle basic chat data structure [0.05ms] ✓ ChatProcessor > handleChatSend data validation > should handle chat data with overrides [0.03ms] ✓ ChatProcessor > handleChatSend data validation > should validate required chat data fields [0.03ms] ✓ ChatProcessor > handleChatSend data validation > should handle different chat modes [0.02ms] ✓ ChatProcessor > handleChatSend data validation > should handle complex message structures [0.02ms] ✓ ChatProcessor > handleChatSend data validation > should handle edge case chat data [0.04ms] ✓ ChatProcessor > ChatProcessor State Management > should maintain internal state correctly [0.02ms] ✓ ChatProcessor > ChatProcessor State Management > should handle multiple concurrent operations [0.03ms] ✓ ChatProcessor > ChatProcessor State Management > should properly cleanup resources [0.06ms] ✓ ChatProcessor > ChatProcessor State Management > should handle state transitions [0.04ms] ✓ ChatProcessor > Error Handling > should handle malformed tool definitions [0.03ms] ✓ ChatProcessor > Error Handling > should handle extreme values [0.04ms] ✓ ChatProcessor > Error Handling > should recover from error states [0.03ms] ✓ ChatProcessor > Memory Management > should handle rapid destroy/clear cycles [0.03ms] ✓ ChatProcessor > Memory Management > should handle large tool objects [0.08ms] ✓ ChatProcessor > Memory Management > should prevent memory leaks [0.13ms] ✓ ChatProcessor > Concurrency > should handle concurrent state operations [0.35ms] ✓ ChatProcessor > Concurrency > should maintain consistency during concurrent access [0.15ms] ✓ ChatProcessor > Concurrency > should handle rapid method calls [0.35ms] ✓ ChatProcessor > Integration Readiness > should expose all required public methods [0.05ms] ✓ ChatProcessor > Integration Readiness > should maintain object integrity after operations [0.03ms] ✓ ChatProcessor > Integration Readiness > should handle AI SDK v5 tool call states ✓ ChatProcessor > Integration Readiness > should support streaming protocol [0.08ms] ✓ ChatProcessor > Integration Readiness > should handle chunk broadcasting structure [0.02ms] ✓ ChatProcessor > Tool Call Management > should handle tool call lifecycle states [0.06ms] ✓ ChatProcessor > Tool Call Management > should handle tool call error scenarios [0.03ms]  src/services/chat/__tests__/status-manager.test.ts: ✓ StatusManager > updateChatStatus > should create new status for non-existent chat [0.24ms] ✓ StatusManager > updateChatStatus > should update existing chat status [0.04ms] ✓ StatusManager > updateChatStatus > should handle partial updates [0.03ms] ✓ StatusManager > updateChatStatus > should handle error status updates [0.02ms] ✓ StatusManager > updateChatStatus > should return the updated status object [0.04ms] ✓ StatusManager > getChatStatus > should return undefined for non-existent chat [0.04ms] ✓ StatusManager > getChatStatus > should return correct status for existing chat [0.02ms] ✓ StatusManager > getChatStatus > should return most recent status after multiple updates [0.03ms] ✓ StatusManager > getActiveChats > should return empty array when no chats are active [0.02ms] ✓ StatusManager > getActiveChats > should return only chats with in_progress status [0.05ms] ✓ StatusManager > getActiveChats > should update active chats when status changes [0.06ms] ✓ StatusManager > getAllChatStatuses > should return empty map when no chats exist [0.02ms] ✓ StatusManager > getAllChatStatuses > should return all chat statuses [0.02ms] ✓ StatusManager > getAllChatStatuses > should return a copy of the internal map [0.04ms] ✓ StatusManager > isChatInProgress > should return false for non-existent chat [0.02ms] ✓ StatusManager > isChatInProgress > should return true for chat with in_progress status [0.02ms] ✓ StatusManager > isChatInProgress > should return false for chat with other statuses [0.04ms] ✓ StatusManager > deleteChatStatus > should delete existing chat status and return true [0.03ms] ✓ StatusManager > deleteChatStatus > should return false for non-existent chat [0.04ms] ✓ StatusManager > deleteChatStatus > should remove chat from active chats list [0.05ms] ✓ StatusManager > getStatusCounts > should return zero counts when no chats exist [0.07ms] ✓ StatusManager > getStatusCounts > should return correct counts for various statuses [0.04ms] ✓ StatusManager > getStatusCounts > should update counts when statuses change [0.04ms] ✓ StatusManager > clear > should remove all chat statuses [0.05ms] ✓ StatusManager > destroy > should clear all statuses and cleanup interval [0.02ms] ✓ StatusManager > destroy > should be safe to call multiple times [0.03ms] ✓ StatusManager > Status Cleanup > should not cleanup in_progress chats [0.07ms] ✓ StatusManager > Status Cleanup > should handle chats with no activity timestamps [0.03ms] ✓ StatusManager > Complex Status Updates > should handle rapid status changes [0.04ms] ✓ StatusManager > Complex Status Updates > should handle complex status objects [0.04ms] ✓ StatusManager > Complex Status Updates > should preserve undefined values when updating [0.02ms] ✓ StatusManager > Memory and Performance > should handle large numbers of chat statuses [0.75ms] ✓ StatusManager > Memory and Performance > should handle concurrent operations [0.21ms]  src/services/chat/__tests__/hooks.test.ts: ✓ ChatHooksManager > Hook Registration > should register hooks successfully [1.43ms] ✓ ChatHooksManager > Hook Registration > should merge hooks when registered multiple times [0.13ms] ✓ ChatHooksManager > Hook Registration > should override hooks when same hook is registered twice [0.09ms] ✓ ChatHooksManager > onChatStart > should call onChatStart hook with correct parameters [0.07ms] ✓ ChatHooksManager > onChatStart > should handle errors in onChatStart hook gracefully [0.33ms] ✓ ChatHooksManager > onChatStart > should do nothing when onChatStart hook is not registered [0.06ms] ✓ ChatHooksManager > onChatComplete > should call onChatComplete hook with correct parameters [0.06ms] ✓ ChatHooksManager > onChatComplete > should call onChatComplete hook without usage parameter [0.05ms] ✓ ChatHooksManager > onChatComplete > should handle errors in onChatComplete hook gracefully [0.13ms] ✓ ChatHooksManager > onChatError > should call onChatError hook with correct parameters [0.11ms] ✓ ChatHooksManager > onChatError > should handle errors in onChatError hook gracefully [0.18ms] ✓ ChatHooksManager > onChatCancel > should call onChatCancel hook with correct parameters [0.07ms] ✓ ChatHooksManager > onChatCancel > should handle errors in onChatCancel hook gracefully [0.32ms] ✓ ChatHooksManager > onStatusUpdate > should call onStatusUpdate hook with correct parameters [0.14ms] ✓ ChatHooksManager > onStatusUpdate > should handle errors in onStatusUpdate hook gracefully [0.31ms] ✓ ChatHooksManager > onMessageUpdate > should call onMessageUpdate hook with correct parameters [0.14ms] ✓ ChatHooksManager > onMessageUpdate > should call onMessageUpdate hook without commit parameter [0.08ms] ✓ ChatHooksManager > onMessageUpdate > should handle errors in onMessageUpdate hook gracefully [0.33ms] ✓ ChatHooksManager > Error Handling > should handle async errors in all hooks [0.58ms] ✓ ChatHooksManager > Error Handling > should handle synchronous errors in hooks [0.18ms] ✓ ChatHooksManager > Hook Execution Order > should execute multiple operations in sequence [11.40ms] ✓ ChatHooksManager > Complex Data Handling > should handle complex ChatSendEvent data [0.11ms] ✓ ChatHooksManager > Complex Data Handling > should handle complex ChatStatus data [0.10ms]  src/services/chat/__tests__/chat-processor.test.ts: ✓ Functional Chat Processor - Unit Tests > UIMessage Format Validation > should create valid UIMessage with text parts [0.17ms] ✓ Functional Chat Processor - Unit Tests > UIMessage Format Validation > should create valid UIMessage with tool call parts [0.06ms] ✓ Functional Chat Processor - Unit Tests > UIMessage Format Validation > should handle metadata correctly [0.04ms] ✓ Functional Chat Processor - Unit Tests > UIMessage Format Validation > should generate unique IDs [0.01ms] ✓ Functional Chat Processor - Unit Tests > UIMessage Format Validation > should handle different message roles [0.04ms] ✓ Functional Chat Processor - Unit Tests > Message Transformation Logic > should extract text content from UIMessage parts [0.04ms] ✓ Functional Chat Processor - Unit Tests > Message Transformation Logic > should extract tool calls from UIMessage parts [0.05ms] ✓ Functional Chat Processor - Unit Tests > Message Transformation Logic > should handle mixed content types [0.04ms] ✓ Functional Chat Processor - Unit Tests > Data Structure Validation > should validate ChatProcessorOptions structure [0.02ms] ✓ Functional Chat Processor - Unit Tests > Data Structure Validation > should validate ChatStore interface [0.02ms] ✓ Functional Chat Processor - Unit Tests > Utility Functions > should create conversation from messages [0.04ms] ✓ Functional Chat Processor - Unit Tests > Utility Functions > should append message to conversation [0.03ms] ✓ Functional Chat Processor - Unit Tests > Utility Functions > should handle empty conversations [0.02ms] ✓ Functional Chat Processor - Unit Tests > Utility Functions > should create user message helper [0.02ms] ✓ Functional Chat Processor - Unit Tests > Utility Functions > should validate message content extraction [0.07ms] ✓ Functional Chat Processor - Unit Tests > Error Handling Patterns > should handle invalid message structures gracefully [0.03ms] ✓ Functional Chat Processor - Unit Tests > Error Handling Patterns > should handle missing optional fields [0.05ms] ✓ Functional Chat Processor - Unit Tests > Error Handling Patterns > should validate required fields [0.03ms] ✓ Functional Chat Processor - Unit Tests > Configuration and Options > should handle different modes [0.02ms] ✓ Functional Chat Processor - Unit Tests > Configuration and Options > should validate model names [0.01ms] ✓ Functional Chat Processor - Unit Tests > Configuration and Options > should handle abort signal creation [0.05ms] ✓ Functional Chat Processor - Unit Tests > Type Safety and Compatibility > should ensure UIMessage compatibility with AI SDK [0.04ms] ✓ Functional Chat Processor - Unit Tests > Type Safety and Compatibility > should handle conversation arrays [0.06ms] ✓ Functional Chat Processor - Unit Tests > Type Safety and Compatibility > should support different part types [0.01ms]  746 pass  0 fail 2931 expect() calls Ran 746 tests across 36 files. [9.92s]