onbuzz 3.6.1 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/__test-utils__/fixtures/malformedJson.js +31 -0
- package/src/__test-utils__/globalSetup.js +9 -0
- package/src/__test-utils__/globalTeardown.js +12 -0
- package/src/__test-utils__/mockFactories.js +101 -0
- package/src/analyzers/__tests__/CSSAnalyzer.test.js +41 -0
- package/src/analyzers/__tests__/ConfigValidator.test.js +362 -0
- package/src/analyzers/__tests__/ESLintAnalyzer.test.js +271 -0
- package/src/analyzers/__tests__/JavaScriptAnalyzer.test.js +40 -0
- package/src/analyzers/__tests__/PrettierFormatter.test.js +197 -0
- package/src/analyzers/__tests__/PythonAnalyzer.test.js +208 -0
- package/src/analyzers/__tests__/SecurityAnalyzer.test.js +303 -0
- package/src/analyzers/__tests__/SparrowAnalyzer.test.js +270 -0
- package/src/analyzers/__tests__/TypeScriptAnalyzer.test.js +187 -0
- package/src/core/__tests__/agentPool.test.js +601 -0
- package/src/core/__tests__/agentScheduler.test.js +576 -0
- package/src/core/__tests__/contextManager.test.js +252 -0
- package/src/core/__tests__/flowExecutor.test.js +262 -0
- package/src/core/__tests__/messageProcessor.test.js +627 -0
- package/src/core/__tests__/orchestrator.test.js +257 -0
- package/src/core/__tests__/stateManager.test.js +375 -0
- package/src/core/agentPool.js +11 -1
- package/src/index.js +25 -9
- package/src/interfaces/terminal/__tests__/smoke/imports.test.js +3 -5
- package/src/services/__tests__/agentActivityService.test.js +319 -0
- package/src/services/__tests__/apiKeyManager.test.js +206 -0
- package/src/services/__tests__/benchmarkService.test.js +184 -0
- package/src/services/__tests__/budgetService.test.js +211 -0
- package/src/services/__tests__/contextInjectionService.test.js +205 -0
- package/src/services/__tests__/conversationCompactionService.test.js +280 -0
- package/src/services/__tests__/credentialVault.test.js +469 -0
- package/src/services/__tests__/errorHandler.test.js +314 -0
- package/src/services/__tests__/fileAttachmentService.test.js +278 -0
- package/src/services/__tests__/flowContextService.test.js +199 -0
- package/src/services/__tests__/memoryService.test.js +450 -0
- package/src/services/__tests__/modelRouterService.test.js +388 -0
- package/src/services/__tests__/modelsService.test.js +261 -0
- package/src/services/__tests__/portRegistry.test.js +123 -0
- package/src/services/__tests__/projectDetector.test.js +34 -0
- package/src/services/__tests__/promptService.test.js +242 -0
- package/src/services/__tests__/qualityInspector.test.js +97 -0
- package/src/services/__tests__/scheduleService.test.js +308 -0
- package/src/services/__tests__/serviceRegistry.test.js +74 -0
- package/src/services/__tests__/skillsService.test.js +402 -0
- package/src/services/__tests__/tokenCountingService.test.js +48 -0
- package/src/tools/__tests__/agentCommunicationTool.test.js +500 -0
- package/src/tools/__tests__/agentDelayTool.test.js +342 -0
- package/src/tools/__tests__/asyncToolManager.test.js +344 -0
- package/src/tools/__tests__/baseTool.test.js +420 -0
- package/src/tools/__tests__/codeMapTool.test.js +348 -0
- package/src/tools/__tests__/fileContentReplaceTool.test.js +309 -0
- package/src/tools/__tests__/fileSystemTool.test.js +717 -0
- package/src/tools/__tests__/fileTreeTool.test.js +274 -0
- package/src/tools/__tests__/helpTool.test.js +204 -0
- package/src/tools/__tests__/jobDoneTool.test.js +296 -0
- package/src/tools/__tests__/memoryTool.test.js +297 -0
- package/src/tools/__tests__/seekTool.test.js +282 -0
- package/src/tools/__tests__/skillsTool.test.js +226 -0
- package/src/tools/__tests__/staticAnalysisTool.test.js +509 -0
- package/src/tools/__tests__/taskManagerTool.test.js +725 -0
- package/src/tools/__tests__/terminalTool.test.js +384 -0
- package/src/tools/__tests__/userPromptTool.test.js +297 -0
- package/src/tools/__tests__/webTool.e2e.test.js +25 -11
- package/src/tools/webTool.js +6 -12
- package/src/types/__tests__/agent.test.js +499 -0
- package/src/types/__tests__/contextReference.test.js +606 -0
- package/src/types/__tests__/conversation.test.js +555 -0
- package/src/types/__tests__/toolCommand.test.js +584 -0
- package/src/types/contextReference.js +1 -1
- package/src/utilities/__tests__/attachmentValidator.test.js +80 -0
- package/src/utilities/__tests__/configManager.test.js +397 -0
- package/src/utilities/__tests__/constants.test.js +49 -0
- package/src/utilities/__tests__/directoryAccessManager.test.js +388 -0
- package/src/utilities/__tests__/fileProcessor.test.js +104 -0
- package/src/utilities/__tests__/jsonRepair.test.js +104 -0
- package/src/utilities/__tests__/logger.test.js +129 -0
- package/src/utilities/__tests__/platformUtils.test.js +87 -0
- package/src/utilities/__tests__/structuredFileValidator.test.js +263 -0
- package/src/utilities/__tests__/tagParser.test.js +887 -0
- package/src/utilities/__tests__/toolConstants.test.js +94 -0
- package/src/utilities/tagParser.js +2 -2
- package/src/tools/browserTool.js +0 -897
- package/src/utilities/platformUtils.test.js +0 -98
- /package/src/tools/{filesystemTool.js → fileSystemTool.js} +0 -0
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Platform Utilities Test
|
|
3
|
-
*
|
|
4
|
-
* Quick smoke test for platformUtils module
|
|
5
|
-
* Run with: node src/utilities/platformUtils.test.js
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
getPlatform,
|
|
10
|
-
isMacOS,
|
|
11
|
-
isWindows,
|
|
12
|
-
isLinux,
|
|
13
|
-
getUserShell,
|
|
14
|
-
getShellPath,
|
|
15
|
-
getSystemRestrictedPaths,
|
|
16
|
-
getPlatformBlockedExtensions,
|
|
17
|
-
normalizePath,
|
|
18
|
-
pathsEqual,
|
|
19
|
-
pathStartsWith,
|
|
20
|
-
getDefaultUserAgent,
|
|
21
|
-
getMacOSPythonPaths,
|
|
22
|
-
getPlatformInfo
|
|
23
|
-
} from './platformUtils.js';
|
|
24
|
-
|
|
25
|
-
console.log('═══════════════════════════════════════════════════════════');
|
|
26
|
-
console.log(' Platform Utilities Test');
|
|
27
|
-
console.log('═══════════════════════════════════════════════════════════\n');
|
|
28
|
-
|
|
29
|
-
// Platform Detection
|
|
30
|
-
console.log('Platform Detection:');
|
|
31
|
-
console.log(` Platform: ${getPlatform()}`);
|
|
32
|
-
console.log(` isMacOS: ${isMacOS()}`);
|
|
33
|
-
console.log(` isWindows: ${isWindows()}`);
|
|
34
|
-
console.log(` isLinux: ${isLinux()}`);
|
|
35
|
-
console.log('');
|
|
36
|
-
|
|
37
|
-
// Shell Detection
|
|
38
|
-
console.log('Shell Detection:');
|
|
39
|
-
console.log(` User Shell: ${getUserShell()}`);
|
|
40
|
-
console.log(` Shell Path: ${getShellPath()}`);
|
|
41
|
-
console.log(` $SHELL env: ${process.env.SHELL || '(not set)'}`);
|
|
42
|
-
console.log('');
|
|
43
|
-
|
|
44
|
-
// Restricted Paths
|
|
45
|
-
const restrictedPaths = getSystemRestrictedPaths();
|
|
46
|
-
console.log(`System Restricted Paths (${restrictedPaths.length} total):`);
|
|
47
|
-
restrictedPaths.slice(0, 5).forEach(p => console.log(` - ${p}`));
|
|
48
|
-
if (restrictedPaths.length > 5) {
|
|
49
|
-
console.log(` ... and ${restrictedPaths.length - 5} more`);
|
|
50
|
-
}
|
|
51
|
-
console.log('');
|
|
52
|
-
|
|
53
|
-
// Blocked Extensions
|
|
54
|
-
const blockedExts = getPlatformBlockedExtensions();
|
|
55
|
-
console.log(`Blocked Extensions: ${blockedExts.join(', ')}`);
|
|
56
|
-
console.log('');
|
|
57
|
-
|
|
58
|
-
// Path Normalization Tests
|
|
59
|
-
console.log('Path Normalization:');
|
|
60
|
-
const testPath1 = '/Users/Test/Documents';
|
|
61
|
-
const testPath2 = '/users/test/documents';
|
|
62
|
-
console.log(` Path 1: ${testPath1}`);
|
|
63
|
-
console.log(` Path 2: ${testPath2}`);
|
|
64
|
-
console.log(` Normalized 1: ${normalizePath(testPath1)}`);
|
|
65
|
-
console.log(` Normalized 2: ${normalizePath(testPath2)}`);
|
|
66
|
-
console.log(` Are Equal: ${pathsEqual(testPath1, testPath2)} (expected: ${isMacOS() || isWindows()})`);
|
|
67
|
-
console.log('');
|
|
68
|
-
|
|
69
|
-
// Path Comparison
|
|
70
|
-
console.log('Path Comparison:');
|
|
71
|
-
console.log(` "/System/Library".startsWith("/System"): ${pathStartsWith('/System/Library', '/System')}`);
|
|
72
|
-
console.log(` "/system/library".startsWith("/System"): ${pathStartsWith('/system/library', '/System')} (case test)`);
|
|
73
|
-
console.log('');
|
|
74
|
-
|
|
75
|
-
// User Agent
|
|
76
|
-
console.log('Default User Agent:');
|
|
77
|
-
const ua = getDefaultUserAgent();
|
|
78
|
-
console.log(` ${ua.substring(0, 60)}...`);
|
|
79
|
-
console.log('');
|
|
80
|
-
|
|
81
|
-
// macOS Python Paths
|
|
82
|
-
if (isMacOS()) {
|
|
83
|
-
const pythonPaths = getMacOSPythonPaths();
|
|
84
|
-
console.log('macOS Python Paths:');
|
|
85
|
-
pythonPaths.forEach(p => console.log(` - ${p}`));
|
|
86
|
-
console.log('');
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Full Platform Info
|
|
90
|
-
console.log('Full Platform Info:');
|
|
91
|
-
const info = getPlatformInfo();
|
|
92
|
-
Object.entries(info).forEach(([key, value]) => {
|
|
93
|
-
console.log(` ${key}: ${value}`);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
console.log('\n═══════════════════════════════════════════════════════════');
|
|
97
|
-
console.log(' All tests completed!');
|
|
98
|
-
console.log('═══════════════════════════════════════════════════════════\n');
|
|
File without changes
|