vibecodingmachine-core 2026.3.14-1528 → 2026.6.17-1835

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.
Files changed (414) hide show
  1. package/package.json +7 -2
  2. package/src/agents/Agent.js +1 -1
  3. package/src/agents/AgentAdditionService.js +1 -1
  4. package/src/agents/AgentCheckDiscoveryService.js +2 -2
  5. package/src/agents/AgentCheckService.js +16 -16
  6. package/src/agents/AgentCheckStatisticsService.js +11 -11
  7. package/src/agents/AgentInstallationService.js +6 -6
  8. package/src/agents/AgentSetupService.js +15 -15
  9. package/src/agents/AgentStatus.js +8 -8
  10. package/src/agents/AgentVerificationService.js +39 -39
  11. package/src/agents/ConfigurationSchemaValidator.js +8 -8
  12. package/src/agents/EnvironmentConfigurationManager.js +28 -28
  13. package/src/agents/InstallationErrorHandler.js +11 -11
  14. package/src/agents/InstallationLog.js +18 -18
  15. package/src/agents/InstallationMethod.js +1 -1
  16. package/src/agents/InstallationOrchestrator.js +37 -37
  17. package/src/agents/InstallationProgressReporter.js +13 -13
  18. package/src/agents/InstallationRetryManager.js +20 -20
  19. package/src/agents/InstallationType.js +14 -14
  20. package/src/agents/OperationTypes.js +12 -12
  21. package/src/agents/PerformanceMetricsCollector.js +59 -59
  22. package/src/agents/SecurityValidationService.js +17 -17
  23. package/src/agents/SimpleAgentCheckService.js +79 -74
  24. package/src/agents/VerificationTest.js +26 -26
  25. package/src/agents/VerificationType.js +5 -5
  26. package/src/agents/WindowsPermissionHandler.js +30 -30
  27. package/src/agents/config/AgentDefaultsRegistry.js +3 -3
  28. package/src/agents/config-managers/ConfigUtils.js +5 -5
  29. package/src/agents/config-managers/DefaultConfig.js +1 -1
  30. package/src/agents/config-managers/EnvVarLoader.js +7 -7
  31. package/src/agents/config-managers/FileConfigLoader.js +22 -22
  32. package/src/agents/config-managers/TypeConverters.js +1 -1
  33. package/src/agents/config-managers/VariableMappings.js +7 -7
  34. package/src/agents/discovery/AgentDiscoveryService-refactored.js +8 -8
  35. package/src/agents/discovery/AgentDiscoveryService.js +14 -14
  36. package/src/agents/discovery/agent-validator.js +4 -4
  37. package/src/agents/discovery/discovery-results.js +1 -1
  38. package/src/agents/discovery/discovery-scanner.js +29 -29
  39. package/src/agents/discovery/discovery-utils.js +6 -6
  40. package/src/agents/discovery/executable-analyzer.js +27 -27
  41. package/src/agents/discovery/history-manager.js +2 -2
  42. package/src/agents/logging/AgentLogger.js +20 -20
  43. package/src/agents/status/AgentStatusManager.js +30 -30
  44. package/src/agents/storage/FileManager.js +15 -15
  45. package/src/agents/validation.js +4 -4
  46. package/src/agents/verification/AgentCommunicationTester.js +46 -46
  47. package/src/agents/verification/BaseVerifier.js +31 -31
  48. package/src/agents/verification/CommandVerifier.js +34 -34
  49. package/src/agents/verification/FileOperationVerifier.js +14 -14
  50. package/src/agents/verification/ResultAnalyzer-refactored.js +7 -7
  51. package/src/agents/verification/ResultAnalyzer.js +29 -29
  52. package/src/agents/verification/TestRequirementManager.js +49 -49
  53. package/src/agents/verification/VerificationRunner.js +18 -18
  54. package/src/agents/verification/analysis-utils.js +27 -27
  55. package/src/agents/verification/batch-analyzer.js +55 -55
  56. package/src/agents/verification/pattern-recognizer.js +49 -49
  57. package/src/agents/verification/report-generator.js +9 -9
  58. package/src/agents/verification/test-analyzer.js +29 -29
  59. package/src/agents/windows/BaseWindowsInstaller.js +22 -22
  60. package/src/agents/windows/ChocolateyInstaller.js +31 -31
  61. package/src/agents/windows/DirectInstaller.js +23 -23
  62. package/src/agents/windows/InstallerFactory.js +16 -16
  63. package/src/agents/windows/NpmInstaller.js +39 -39
  64. package/src/agents/windows/PowerShellInstaller.js +27 -27
  65. package/src/agents/windows/VSCodeExtensionInstaller.js +10 -10
  66. package/src/agents/windows/WinGetInstaller.js +23 -23
  67. package/src/analysis/analysis-engine.js +35 -35
  68. package/src/analysis/analysis-reporter.js +7 -7
  69. package/src/analysis/ast-analyzer.js +28 -28
  70. package/src/analysis/boundary-detector-refactored.js +35 -35
  71. package/src/analysis/boundary-detector.js +35 -35
  72. package/src/analysis/boundary-scanner.js +52 -52
  73. package/src/analysis/boundary-types.js +3 -3
  74. package/src/analysis/boundary-utils.js +33 -33
  75. package/src/analysis/categorizer.js +20 -20
  76. package/src/analysis/codebase-scanner.js +22 -22
  77. package/src/analysis/detection-methods.js +25 -25
  78. package/src/analysis/line-counter.js +14 -14
  79. package/src/analysis/report/analysis-report.js +9 -9
  80. package/src/analysis/report/package-analyzer.js +33 -33
  81. package/src/analysis/report/recommendation-generator.js +29 -29
  82. package/src/analysis/report/statistics-generator.js +53 -53
  83. package/src/analysis/reports/analysis-report-model.js +4 -4
  84. package/src/analysis/reports/recommendation-generator.js +25 -25
  85. package/src/analysis/reports/report-generators.js +9 -9
  86. package/src/analysis/reports/statistics-calculator.js +23 -23
  87. package/src/analysis/reports/trend-analyzer.js +19 -19
  88. package/src/analysis/strategy-generator.js +5 -5
  89. package/src/auth/shared-auth-storage.js +15 -7
  90. package/src/auto-mode/AutoModeBusinessLogic.js +9 -15
  91. package/src/auto-mode/auto-mode-streaks.js +104 -0
  92. package/src/auto-mode/direct-run-recovery.js +99 -0
  93. package/src/auto-mode/rate-limit-budget.js +169 -0
  94. package/src/auto-mode/rate-limit-handler.js +218 -0
  95. package/src/auto-mode/rate-limit-store.js +174 -0
  96. package/src/auto-mode/stage-change-log.js +60 -0
  97. package/src/auto-mode/stage-stall-tracker.js +123 -0
  98. package/src/auto-mode-error-detector/error-detector.js +135 -0
  99. package/src/autonomous-mode/feature-implementer.js +20 -24
  100. package/src/beta-request.js +1 -1
  101. package/src/chat-management/chat-manager.js +3 -3
  102. package/src/commands/base.js +8 -8
  103. package/src/commands/disable-requirement.js +2 -2
  104. package/src/commands/disable-spec.js +2 -2
  105. package/src/commands/enable-requirement.js +2 -2
  106. package/src/commands/enable-spec.js +2 -2
  107. package/src/commands/help.js +5 -5
  108. package/src/commands/registry.js +12 -12
  109. package/src/commands/requirements.js +2 -2
  110. package/src/commands/resolver.js +7 -7
  111. package/src/commands/settings.js +79 -4
  112. package/src/compliance/compliance-manager.js +10 -10
  113. package/src/compliance/compliance-prompt.js +6 -6
  114. package/src/config/refactoring-config.js +6 -6
  115. package/src/database/migrations.js +1 -1
  116. package/src/database/user-database-client.js +1 -1
  117. package/src/database/user-schema.js +2 -2
  118. package/src/feedback/feedback-config-manager.js +95 -0
  119. package/src/feedback/feedback-manager.js +501 -0
  120. package/src/feedback/ui-preferences-manager.js +87 -0
  121. package/src/git/commit-manager.js +475 -0
  122. package/src/health-tracking/health-reporter.js +14 -14
  123. package/src/health-tracking/ide-health-tracker.js +17 -3
  124. package/src/health-tracking/json-storage.js +4 -4
  125. package/src/ide-integration/agent-test-runner.js +275 -0
  126. package/src/ide-integration/aider/commands/configuration-manager.js +39 -0
  127. package/src/ide-integration/aider/commands/installation-manager.js +111 -0
  128. package/src/ide-integration/aider/processes/process-manager.js +37 -0
  129. package/src/ide-integration/aider/utils/ollama-manager.js +154 -0
  130. package/src/ide-integration/aider-cli-manager.cjs +16 -241
  131. package/src/ide-integration/applescript-antigravity-quota.cjs +515 -0
  132. package/src/ide-integration/applescript-cursor-quota.cjs +351 -0
  133. package/src/ide-integration/applescript-ide-opener.cjs +489 -0
  134. package/src/ide-integration/applescript-kiro-quota.cjs +549 -0
  135. package/src/ide-integration/applescript-manager-core.js +30 -12
  136. package/src/ide-integration/applescript-manager.cjs +45 -3201
  137. package/src/ide-integration/applescript-manager.js +34 -16
  138. package/src/ide-integration/applescript-response-reader.cjs +658 -0
  139. package/src/ide-integration/applescript-send-text.cjs +307 -0
  140. package/src/ide-integration/applescript-status-continuation.cjs +581 -0
  141. package/src/ide-integration/applescript-utils.js +203 -192
  142. package/src/ide-integration/cdp-handlers/connection-handler.js +2 -2
  143. package/src/ide-integration/cdp-handlers/continuation-handler.js +7 -7
  144. package/src/ide-integration/cdp-handlers/text-sender.js +1 -1
  145. package/src/ide-integration/cdp-manager.js +2 -2
  146. package/src/ide-integration/cli-direct-runner.js +483 -0
  147. package/src/ide-integration/cli-session-manager.js +180 -0
  148. package/src/ide-integration/cline-cli-manager.js +24 -24
  149. package/src/ide-integration/continuation-handler.js +18 -18
  150. package/src/ide-integration/continue-cli-manager.js +14 -14
  151. package/src/ide-integration/ide-openers/claude-opener.js +23 -7
  152. package/src/ide-integration/ide-openers/other-ides-opener.js +17 -63
  153. package/src/ide-integration/ide-status-checker.js +20 -20
  154. package/src/ide-integration/macos-ide-manager.js +55 -4
  155. package/src/ide-integration/macos-quota-checker.js +1 -1
  156. package/src/ide-integration/macos-text-sender.js +204 -68
  157. package/src/ide-integration/quota-detector.cjs +11 -11
  158. package/src/ide-integration/quota-detector.js +11 -11
  159. package/src/ide-integration/response-reader.js +10 -10
  160. package/src/ide-integration/windows/cursor-automation.js +304 -0
  161. package/src/ide-integration/windows/ide-automation.js +735 -0
  162. package/src/ide-integration/windows/window-operations.js +183 -0
  163. package/src/ide-integration/windows-automation-manager.js +92 -865
  164. package/src/ide-integration/windows-ide-manager.js +13 -13
  165. package/src/index.cjs +87 -6
  166. package/src/index.js +56 -41
  167. package/src/installation/config-manager.js +247 -0
  168. package/src/installation/config-paths.js +64 -0
  169. package/src/installation/fs-validators.js +166 -0
  170. package/src/installation/index.js +30 -0
  171. package/src/installation/path-resolver.js +73 -0
  172. package/src/installation/types.js +57 -0
  173. package/src/installation/version-detector.js +233 -0
  174. package/src/items/item-conversation.js +101 -0
  175. package/src/items/items-migrator.js +358 -0
  176. package/src/items/items-slug.js +55 -0
  177. package/src/items/items-store-io.js +257 -0
  178. package/src/items/items-store.js +541 -0
  179. package/src/localization/index.js +3 -3
  180. package/src/localization/translations/en-part1.js +1 -1
  181. package/src/localization/translations/en-part2.js +1 -1
  182. package/src/localization/translations/es-part1.js +1 -1
  183. package/src/localization/translations/es-part2.js +1 -1
  184. package/src/models/compliance-report.js +44 -44
  185. package/src/models/file-analysis.js +33 -33
  186. package/src/models/plan-manager.js +44 -44
  187. package/src/models/refactoring-models.js +4 -4
  188. package/src/models/refactoring-plan-refactored.js +2 -2
  189. package/src/models/refactoring-plan.js +5 -5
  190. package/src/monitoring/alert-system.js +84 -84
  191. package/src/monitoring/compliance-progress-tracker.js +19 -19
  192. package/src/monitoring/continuous-scan-notifications.js +54 -54
  193. package/src/monitoring/continuous-scanner.js +24 -24
  194. package/src/monitoring/file-monitor/file-analyzer.js +23 -23
  195. package/src/monitoring/file-monitor/file-monitor.js +20 -20
  196. package/src/monitoring/file-monitor/watcher.js +18 -18
  197. package/src/monitoring/file-monitor.js +1 -1
  198. package/src/monitoring/notification-handlers/base-handler.js +3 -3
  199. package/src/monitoring/notification-handlers/error-handler.js +1 -1
  200. package/src/monitoring/notification-handlers/index.js +1 -1
  201. package/src/monitoring/notification-handlers/new-violation-handler.js +5 -5
  202. package/src/monitoring/notification-handlers/progress-handler.js +2 -2
  203. package/src/monitoring/notification-handlers/resolved-violation-handler.js +4 -4
  204. package/src/monitoring/notification-handlers/threshold-handler.js +1 -1
  205. package/src/monitoring/notification-manager.js +36 -36
  206. package/src/monitoring/scanner-core.js +43 -43
  207. package/src/monitoring/scanner-events.js +26 -26
  208. package/src/monitoring/violation-notification-system.js +10 -10
  209. package/src/progress/metrics-aggregator.js +194 -0
  210. package/src/progress/metrics-store.js +263 -0
  211. package/src/provider-registry.js +5 -5
  212. package/src/quota-management/index.js +2 -2
  213. package/src/refactoring/boundaries/cohesion-analyzer.js +21 -21
  214. package/src/refactoring/boundaries/extraction-result.js +1 -1
  215. package/src/refactoring/boundaries/extraction-strategies.js +27 -27
  216. package/src/refactoring/boundaries/module-boundary.js +8 -8
  217. package/src/refactoring/boundary/boundary-detector-refactored.js +1 -1
  218. package/src/refactoring/boundary/boundary-detector.js +26 -26
  219. package/src/refactoring/boundary/boundary-types.js +21 -21
  220. package/src/refactoring/boundary/detectors/boundary-analyzers.js +34 -34
  221. package/src/refactoring/boundary/detectors/boundary-core.js +14 -14
  222. package/src/refactoring/boundary/detectors/class-detector.js +28 -28
  223. package/src/refactoring/boundary/detectors/config-detector.js +28 -28
  224. package/src/refactoring/boundary/detectors/constant-detector.js +28 -28
  225. package/src/refactoring/boundary/detectors/function-detector.js +28 -28
  226. package/src/refactoring/boundary/detectors/module-detector.js +29 -29
  227. package/src/refactoring/boundary/detectors/object-detector.js +28 -28
  228. package/src/refactoring/boundary/detectors/type-detectors.js +34 -34
  229. package/src/refactoring/boundary/detectors/utility-detector.js +28 -28
  230. package/src/refactoring/boundary/extraction-strategies.js +61 -61
  231. package/src/refactoring/boundary-extraction-result.js +3 -3
  232. package/src/refactoring/boundary-extraction-strategies.js +28 -28
  233. package/src/refactoring/boundary-extractor.js +13 -13
  234. package/src/refactoring/boundary-types.js +1 -1
  235. package/src/refactoring/circular/circular-dependency.js +4 -4
  236. package/src/refactoring/circular/cycle-detection.js +10 -10
  237. package/src/refactoring/circular/dependency-node.js +1 -1
  238. package/src/refactoring/circular/dependency-result.js +1 -1
  239. package/src/refactoring/circular/dependency-types.js +2 -2
  240. package/src/refactoring/circular/graph-builder.js +25 -25
  241. package/src/refactoring/circular/resolution-strategy.js +1 -1
  242. package/src/refactoring/circular/strategy-generator.js +28 -28
  243. package/src/refactoring/circular-dependency-resolver-original.js +70 -70
  244. package/src/refactoring/circular-dependency-resolver.js +19 -19
  245. package/src/refactoring/code-mover-refactored.js +31 -31
  246. package/src/refactoring/code-mover.js +53 -53
  247. package/src/refactoring/execution-status.js +1 -1
  248. package/src/refactoring/execution-strategies.js +28 -28
  249. package/src/refactoring/file-splitter-core.js +58 -58
  250. package/src/refactoring/file-splitter-types.js +1 -1
  251. package/src/refactoring/file-splitter.js +1 -1
  252. package/src/refactoring/functionality-validator.js +90 -90
  253. package/src/refactoring/import-manager-refactored.js +42 -42
  254. package/src/refactoring/import-manager.js +57 -57
  255. package/src/refactoring/import-models.js +1 -1
  256. package/src/refactoring/import-parser.js +41 -41
  257. package/src/refactoring/module-boundary.js +3 -3
  258. package/src/refactoring/move-executor.js +45 -45
  259. package/src/refactoring/move-utils.js +27 -27
  260. package/src/refactoring/operation-executor.js +7 -7
  261. package/src/refactoring/plan-creator.js +3 -3
  262. package/src/refactoring/plan-executor.js +21 -21
  263. package/src/refactoring/plan-validator.js +10 -10
  264. package/src/refactoring/refactoring-executor-result.js +1 -1
  265. package/src/refactoring/refactoring-executor.js +5 -5
  266. package/src/refactoring/refactoring-operation.js +3 -3
  267. package/src/refactoring/refactoring-plan.js +2 -2
  268. package/src/refactoring/refactoring-rollback.js +1 -1
  269. package/src/refactoring/rollback-handlers/RollbackExecutor.js +12 -12
  270. package/src/refactoring/rollback-handlers/RollbackManager.js +34 -34
  271. package/src/refactoring/rollback-handlers/RollbackOperation.js +2 -2
  272. package/src/refactoring/rollback-handlers/RollbackResult.js +5 -5
  273. package/src/refactoring/rollback-handlers/RollbackStatistics.js +8 -8
  274. package/src/refactoring/test-validator.js +19 -19
  275. package/src/refactoring/validation/baseline-runner.js +10 -10
  276. package/src/refactoring/validation/report-generator.js +16 -16
  277. package/src/refactoring/validation/result-comparator.js +10 -10
  278. package/src/refactoring/validation/test-suite.js +2 -2
  279. package/src/refactoring/validation/test-validation-result.js +2 -2
  280. package/src/refactoring/validation/validation-runner.js +16 -16
  281. package/src/refactoring/validation/validation-status.js +1 -1
  282. package/src/repos/repos-store.js +220 -0
  283. package/src/requirement-management/default-requirement-manager.js +20 -20
  284. package/src/requirement-management/requirement-file-parser.js +3 -3
  285. package/src/requirement-management/requirement-sequencer.js +17 -17
  286. package/src/rui/base.js +6 -6
  287. package/src/rui/commands/AgentCommandParser.js +6 -6
  288. package/src/rui/commands/AgentCommands.js +26 -26
  289. package/src/rui/commands/AgentResponseFormatter.js +12 -12
  290. package/src/rui/commands/parsers/CommandMapper.js +5 -5
  291. package/src/rui/commands/parsers/CommandValidator.js +5 -5
  292. package/src/rui/commands/parsers/ComponentExtractor.js +4 -4
  293. package/src/rui/commands/parsers/TokenParser.js +6 -6
  294. package/src/rui/commands/parsers/tokenizer.js +9 -9
  295. package/src/rui/index.js +5 -5
  296. package/src/rui/registry.js +5 -5
  297. package/src/rui/resolver.js +3 -3
  298. package/src/screenshot/analysis-engine.js +249 -0
  299. package/src/screenshot/capture-engine.js +251 -0
  300. package/src/screenshot/verification-loop.js +191 -0
  301. package/src/scripts/verify-full-compliance.js +32 -32
  302. package/src/spec-management/queue-storage.js +320 -0
  303. package/src/spec-management/retry-manager.js +243 -0
  304. package/src/spec-management/spec-counter.js +301 -0
  305. package/src/spec-management/spec-fingerprint.js +148 -0
  306. package/src/spec-management/spec-logger.js +329 -0
  307. package/src/spec-management/spec-scanner.js +313 -0
  308. package/src/sync/aws-setup.js +41 -41
  309. package/src/sync/remote-control-server.js +50 -50
  310. package/src/sync/sync-engine-conflicts.js +10 -10
  311. package/src/sync/sync-engine-core.js +9 -9
  312. package/src/sync/sync-engine-file-ops.js +7 -7
  313. package/src/sync/sync-engine.js +12 -12
  314. package/src/task-generation/automated-task-generator.js +20 -20
  315. package/src/task-generation/prioritizer.js +39 -39
  316. package/src/task-generation/task-list-updater.js +29 -29
  317. package/src/task-generation/task-management-integration.js +92 -92
  318. package/src/task-generation/task-manager-integration.js +18 -18
  319. package/src/task-generation/violation-task-generator.js +54 -54
  320. package/src/task-management/continuous-scan-integration.js +25 -25
  321. package/src/ui/ChatInterface.js +1 -1
  322. package/src/ui/ChromeExtensionAdapter.js +309 -0
  323. package/src/ui/FeedbackComponent.js +334 -0
  324. package/src/utils/analyzer.js +18 -18
  325. package/src/utils/cleanup.js +28 -28
  326. package/src/utils/config-helpers.js +64 -4
  327. package/src/utils/constants.js +19 -0
  328. package/src/utils/current-requirement-operations.js +63 -11
  329. package/src/utils/dependency-mapper.js +8 -8
  330. package/src/utils/duplicate-detector.js +29 -29
  331. package/src/utils/error-reporter.js +6 -6
  332. package/src/utils/file-monitor.js +20 -20
  333. package/src/utils/git-branch-manager.js +157 -1
  334. package/src/utils/import-updater.js +10 -10
  335. package/src/utils/refactor-plan.js +22 -22
  336. package/src/utils/refactoring-tools.js +7 -7
  337. package/src/utils/repo-helpers.cjs +16 -11
  338. package/src/utils/repo-helpers.js +15 -8
  339. package/src/utils/report-generator.js +1 -1
  340. package/src/utils/report-generators/analysis-generator.js +4 -4
  341. package/src/utils/report-generators/base-generator.js +7 -7
  342. package/src/utils/report-generators/compliance-generator.js +2 -2
  343. package/src/utils/report-generators/format-handlers.js +16 -16
  344. package/src/utils/report-generators/refactoring-generator.js +1 -1
  345. package/src/utils/report-generators/validation-generator.js +3 -3
  346. package/src/utils/reports/report-analysis.js +13 -13
  347. package/src/utils/reports/report-types.js +1 -1
  348. package/src/utils/reports/summary-generators.js +4 -4
  349. package/src/utils/requirement-enable-disable.js +69 -44
  350. package/src/utils/requirement-file-management.js +10 -28
  351. package/src/utils/requirement-helpers/requirement-file-ops.js +22 -17
  352. package/src/utils/requirement-helpers/requirement-mover.js +13 -13
  353. package/src/utils/requirement-helpers/requirement-parser.js +6 -10
  354. package/src/utils/requirement-helpers/requirement-status.js +20 -18
  355. package/src/utils/requirement-helpers-new.js +8 -8
  356. package/src/utils/requirement-helpers-refactored.js +1 -1
  357. package/src/utils/requirement-helpers.js +1 -1
  358. package/src/utils/requirement-loader.js +238 -0
  359. package/src/utils/requirement-movement.js +46 -46
  360. package/src/utils/requirement-writer.js +466 -0
  361. package/src/utils/rollback/rollback-handlers.js +2 -2
  362. package/src/utils/rollback/rollback-operation.js +1 -1
  363. package/src/utils/rollback/rollback-recorder.js +4 -4
  364. package/src/utils/rollback/rollback-state-manager.js +5 -5
  365. package/src/utils/rollback/rollback-types.js +1 -1
  366. package/src/utils/rollback/rollback-utils.js +4 -4
  367. package/src/utils/rollback-manager-original.js +14 -14
  368. package/src/utils/rollback-manager.js +4 -4
  369. package/src/utils/smoke-test-cli.js +20 -20
  370. package/src/utils/smoke-test-gui.js +34 -34
  371. package/src/utils/smoke-test-orchestrator.js +24 -24
  372. package/src/utils/smoke-test-runner.js +5 -5
  373. package/src/utils/smoke-test-web.js +22 -22
  374. package/src/utils/spec-loader.js +308 -0
  375. package/src/utils/spec-writer.js +295 -0
  376. package/src/utils/specification-enable-disable.js +10 -10
  377. package/src/utils/task-parser.js +141 -0
  378. package/src/utils/test-comparator.js +2 -2
  379. package/src/utils/test-config.js +1 -1
  380. package/src/utils/test-executor.js +7 -7
  381. package/src/utils/test-parser.js +4 -4
  382. package/src/utils/test-runner-baseline.js +5 -5
  383. package/src/utils/test-runner-core.js +2 -2
  384. package/src/utils/test-runner-report.js +1 -1
  385. package/src/utils/test-runner-validation.js +9 -9
  386. package/src/utils/test-runner.js +1 -1
  387. package/src/utils/validation-framework.js +27 -27
  388. package/src/utils/verification-summary-validator.js +51 -0
  389. package/src/validation/comparison-analyzer.js +34 -34
  390. package/src/validation/compliance-analyzer.js +23 -23
  391. package/src/validation/compliance-report-generator.js +23 -23
  392. package/src/validation/compliance-reporter-new.js +18 -18
  393. package/src/validation/compliance-reporter-refactored.js +18 -18
  394. package/src/validation/compliance-reporter.js +45 -30
  395. package/src/validation/compliance-rules.js +12 -12
  396. package/src/validation/compliance-utils.js +20 -20
  397. package/src/validation/constitution-validator-new.js +16 -16
  398. package/src/validation/constitution-validator.js +1 -1
  399. package/src/validation/file-validators.js +13 -13
  400. package/src/validation/html-generator.js +27 -27
  401. package/src/validation/line-limit/file-analyzer.js +15 -15
  402. package/src/validation/line-limit/line-limit-validator.js +10 -10
  403. package/src/validation/line-limit/validation-result.js +6 -6
  404. package/src/validation/line-limit-core.js +29 -29
  405. package/src/validation/line-limit-reporter.js +20 -20
  406. package/src/validation/line-limit-result.js +3 -3
  407. package/src/validation/line-limit-validator.js +5 -5
  408. package/src/validation/metrics/category-calculator.js +9 -9
  409. package/src/validation/metrics/metrics-helpers.js +16 -16
  410. package/src/validation/metrics/overview-calculator.js +2 -2
  411. package/src/validation/metrics/overview-metrics.js +1 -1
  412. package/src/validation/metrics/quality-calculator.js +22 -22
  413. package/src/validation/metrics/size-calculator.js +3 -3
  414. package/src/validation/metrics-calculator.js +2 -2
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * Discovery Scanner
3
- *
3
+ *
4
4
  * Core scanning logic for agent discovery.
5
5
  */
6
6
 
7
- const {
8
- commandExists,
9
- getCommandHelp,
10
- scanDirectory,
7
+ const {
8
+ commandExists,
9
+ getCommandHelp,
10
+ scanDirectory,
11
11
  isAgentTool,
12
- getFileMetadata
12
+ getFileMetadata
13
13
  } = require('./discovery-utils');
14
14
 
15
15
  const { DiscoveredAgent, DiscoveryResult } = require('./discovery-results');
@@ -24,9 +24,9 @@ const execAsync = promisify(exec);
24
24
  class DiscoveryScanner {
25
25
  constructor(options = {}) {
26
26
  this.discoveryPaths = options.discoveryPaths || [
27
- '/usr/local/bin',
28
- '/opt/bin',
29
- '/usr/bin/local/bin',
27
+ '/usr/local/bin',
28
+ '/opt/bin',
29
+ '/usr/bin/local/bin',
30
30
  '/snap/bin'
31
31
  ];
32
32
  this.timeout = options.timeout || 30000;
@@ -41,7 +41,7 @@ class DiscoveryScanner {
41
41
  */
42
42
  async scanAllPaths(sessionId = null) {
43
43
  const result = new DiscoveryResult(sessionId);
44
-
44
+
45
45
  try {
46
46
  if (this.logger) {
47
47
  await this.logger.info('Starting discovery scan', {
@@ -53,7 +53,7 @@ class DiscoveryScanner {
53
53
  result.metadata.pathsScanned = [...this.discoveryPaths];
54
54
 
55
55
  // Scan all directories concurrently with limit
56
- const scanPromises = this.discoveryPaths.map(path =>
56
+ const scanPromises = this.discoveryPaths.map(path =>
57
57
  this.scanPath(path, result)
58
58
  );
59
59
 
@@ -89,7 +89,7 @@ class DiscoveryScanner {
89
89
 
90
90
  // Process files with concurrency limit
91
91
  const chunks = this.chunkArray(files, this.maxConcurrency);
92
-
92
+
93
93
  for (const chunk of chunks) {
94
94
  await Promise.allSettled(
95
95
  chunk.map(file => this.processFile(file, result))
@@ -111,7 +111,7 @@ class DiscoveryScanner {
111
111
  try {
112
112
  // Check if it's an agent tool
113
113
  const isAgent = await isAgentTool(fileInfo);
114
-
114
+
115
115
  if (!isAgent) {
116
116
  return;
117
117
  }
@@ -126,12 +126,12 @@ class DiscoveryScanner {
126
126
 
127
127
  // Create discovered agent
128
128
  const agent = new DiscoveredAgent(fileInfo, commandHelp);
129
-
129
+
130
130
  result.addAgent(agent);
131
131
 
132
132
  } catch (error) {
133
- result.addWarning(`Failed to process file: ${fileInfo.name}`, {
134
- error: error.message
133
+ result.addWarning(`Failed to process file: ${fileInfo.name}`, {
134
+ error: error.message
135
135
  });
136
136
  }
137
137
  }
@@ -151,11 +151,11 @@ class DiscoveryScanner {
151
151
  'agent', 'ai', 'assistant', 'chat', 'llm', 'model',
152
152
  'openai', 'anthropic', 'claude', 'gpt', 'gemini'
153
153
  ];
154
-
155
- const keywordMatches = agentKeywords.filter(keyword =>
154
+
155
+ const keywordMatches = agentKeywords.filter(keyword =>
156
156
  helpLower.includes(keyword.toLowerCase())
157
157
  ).length;
158
-
158
+
159
159
  confidence += (keywordMatches / agentKeywords.length) * 0.4;
160
160
  }
161
161
 
@@ -164,20 +164,20 @@ class DiscoveryScanner {
164
164
  const nameKeywords = [
165
165
  'agent', 'ai', 'assistant', 'chat', 'llm', 'claude', 'gpt'
166
166
  ];
167
-
168
- const nameMatches = nameKeywords.filter(keyword =>
167
+
168
+ const nameMatches = nameKeywords.filter(keyword =>
169
169
  nameLower.includes(keyword.toLowerCase())
170
170
  ).length;
171
-
171
+
172
172
  confidence += (nameMatches / nameKeywords.length) * 0.3;
173
173
 
174
174
  // Path analysis (20% weight)
175
175
  const pathLower = agent.path.toLowerCase();
176
176
  const pathIndicators = ['agent', 'ai', 'tools', 'bin'];
177
- const pathMatches = pathIndicators.filter(indicator =>
177
+ const pathMatches = pathIndicators.filter(indicator =>
178
178
  pathLower.includes(indicator.toLowerCase())
179
179
  ).length;
180
-
180
+
181
181
  confidence += (pathMatches / pathIndicators.length) * 0.2;
182
182
 
183
183
  // Executable status (10% weight)
@@ -210,14 +210,14 @@ class DiscoveryScanner {
210
210
 
211
211
  // Verify high-confidence agents
212
212
  const highConfidenceAgents = result.agents.filter(a => a.confidence > 0.7);
213
-
213
+
214
214
  for (const agent of highConfidenceAgents) {
215
215
  try {
216
216
  const isVerified = await this.verifyAgent(agent);
217
217
  agent.setVerified(isVerified);
218
218
  } catch (error) {
219
- result.addWarning(`Failed to verify agent: ${agent.name}`, {
220
- error: error.message
219
+ result.addWarning(`Failed to verify agent: ${agent.name}`, {
220
+ error: error.message
221
221
  });
222
222
  }
223
223
  }
@@ -232,7 +232,7 @@ class DiscoveryScanner {
232
232
  try {
233
233
  // Try to run the agent with --version or --help
234
234
  const verifyCommands = ['--version', '--help', '-v', '-h'];
235
-
235
+
236
236
  for (const cmd of verifyCommands) {
237
237
  try {
238
238
  await execAsync(`${agent.path} ${cmd}`, {
@@ -243,7 +243,7 @@ class DiscoveryScanner {
243
243
  // Try next command
244
244
  }
245
245
  }
246
-
246
+
247
247
  return false;
248
248
  } catch (error) {
249
249
  return false;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Discovery Utilities
3
- *
3
+ *
4
4
  * Utility functions for agent discovery operations.
5
5
  */
6
6
 
@@ -33,9 +33,9 @@ async function commandExists(command) {
33
33
  */
34
34
  async function getCommandHelp(command, timeout = 5000) {
35
35
  return new Promise((resolve) => {
36
- const child = spawn(command, ['--help'], {
36
+ const child = spawn(command, ['--help'], {
37
37
  stdio: ['pipe', 'pipe', 'pipe'],
38
- timeout
38
+ timeout
39
39
  });
40
40
 
41
41
  let stdout = '';
@@ -98,7 +98,7 @@ async function scanDirectory(dirPath) {
98
98
  */
99
99
  async function isAgentTool(fileInfo) {
100
100
  const { name, path: filePath } = fileInfo;
101
-
101
+
102
102
  // Skip common non-agent executables
103
103
  const skipPatterns = [
104
104
  /^(ls|cd|pwd|cat|echo|rm|cp|mv|mkdir|chmod|chown)/,
@@ -119,8 +119,8 @@ async function isAgentTool(fileInfo) {
119
119
  'agent', 'ai', 'assistant', 'chat', 'llm', 'model',
120
120
  'openai', 'anthropic', 'claude', 'gpt', 'gemini'
121
121
  ];
122
-
123
- return agentKeywords.some(keyword =>
122
+
123
+ return agentKeywords.some(keyword =>
124
124
  help.toLowerCase().includes(keyword.toLowerCase())
125
125
  );
126
126
  } catch (error) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Agent Discovery - Executable Analyzer
3
- *
3
+ *
4
4
  * Analyzes executable files to determine if they are agent tools.
5
5
  */
6
6
 
@@ -22,7 +22,7 @@ async function analyzeExecutable(filePath, logger = null) {
22
22
  // Get file info
23
23
  const stat = await fs.stat(filePath);
24
24
  const fileName = path.basename(filePath);
25
-
25
+
26
26
  // Basic agent information
27
27
  const agentInfo = {
28
28
  id: generateAgentId(fileName),
@@ -80,7 +80,7 @@ function sanitizeAgentName(fileName) {
80
80
  */
81
81
  function detectAgentType(fileName) {
82
82
  const name = fileName.toLowerCase();
83
-
83
+
84
84
  if (name.includes('ai') || name.includes('agent') || name.includes('assistant')) {
85
85
  return 'ai-agent';
86
86
  }
@@ -90,7 +90,7 @@ function detectAgentType(fileName) {
90
90
  if (name.includes('bot') || name.includes('automation')) {
91
91
  return 'automation-bot';
92
92
  }
93
-
93
+
94
94
  return 'unknown';
95
95
  }
96
96
 
@@ -104,14 +104,14 @@ async function extractVersion(agentInfo, filePath, logger) {
104
104
  try {
105
105
  // Try common version flags
106
106
  const versionFlags = ['--version', '-v', '--version', '-V'];
107
-
107
+
108
108
  for (const flag of versionFlags) {
109
109
  try {
110
- const { stdout } = await execAsync(`${filePath} ${flag}`, {
110
+ const { stdout } = await execAsync(`${filePath} ${flag}`, {
111
111
  timeout: 5000,
112
112
  env: { ...process.env, NO_COLOR: '1' }
113
113
  });
114
-
114
+
115
115
  const version = parseVersionOutput(stdout);
116
116
  if (version) {
117
117
  agentInfo.version = version;
@@ -142,21 +142,21 @@ async function extractVersion(agentInfo, filePath, logger) {
142
142
  */
143
143
  function parseVersionOutput(output) {
144
144
  const lines = output.trim().split('\n');
145
-
145
+
146
146
  for (const line of lines) {
147
147
  // Look for version patterns
148
148
  const versionMatch = line.match(/(\d+\.\d+(\.\d+)?)/);
149
149
  if (versionMatch) {
150
150
  return versionMatch[1];
151
151
  }
152
-
152
+
153
153
  // Look for "version X.Y.Z" patterns
154
154
  const versionWordMatch = line.match(/version\s+(\d+\.\d+(\.\d+)?)/i);
155
155
  if (versionWordMatch) {
156
156
  return versionWordMatch[1];
157
157
  }
158
158
  }
159
-
159
+
160
160
  return null;
161
161
  }
162
162
 
@@ -172,14 +172,14 @@ function extractVersionFromContent(content) {
172
172
  /const\s+VERSION\s*=\s*['"`]([^'"`]+)['"`]/i,
173
173
  /__version__\s*=\s*['"`]([^'"`]+)['"`]/i
174
174
  ];
175
-
175
+
176
176
  for (const pattern of patterns) {
177
177
  const match = content.match(pattern);
178
178
  if (match) {
179
179
  return match[1];
180
180
  }
181
181
  }
182
-
182
+
183
183
  return null;
184
184
  }
185
185
 
@@ -192,11 +192,11 @@ function extractVersionFromContent(content) {
192
192
  async function extractDescription(agentInfo, filePath, logger) {
193
193
  try {
194
194
  // Try help flag
195
- const { stdout } = await execAsync(`${filePath} --help`, {
195
+ const { stdout } = await execAsync(`${filePath} --help`, {
196
196
  timeout: 5000,
197
197
  env: { ...process.env, NO_COLOR: '1' }
198
198
  });
199
-
199
+
200
200
  const description = parseDescriptionFromHelp(stdout);
201
201
  if (description) {
202
202
  agentInfo.description = description;
@@ -215,22 +215,22 @@ async function extractDescription(agentInfo, filePath, logger) {
215
215
  */
216
216
  function parseDescriptionFromHelp(helpOutput) {
217
217
  const lines = helpOutput.trim().split('\n');
218
-
218
+
219
219
  // Look for description in first few lines
220
220
  for (let i = 0; i < Math.min(5, lines.length); i++) {
221
221
  const line = lines[i].trim();
222
-
222
+
223
223
  // Skip empty lines and common help headers
224
224
  if (!line || line.startsWith('Usage:') || line.startsWith('Options:')) {
225
225
  continue;
226
226
  }
227
-
227
+
228
228
  // Return first meaningful line as description
229
229
  if (line.length > 10 && !line.startsWith('-')) {
230
230
  return line.substring(0, 200); // Limit length
231
231
  }
232
232
  }
233
-
233
+
234
234
  return '';
235
235
  }
236
236
 
@@ -242,41 +242,41 @@ function parseDescriptionFromHelp(helpOutput) {
242
242
  */
243
243
  async function detectCapabilities(agentInfo, filePath, logger) {
244
244
  const capabilities = [];
245
-
245
+
246
246
  try {
247
247
  // Check if it's a script
248
248
  const content = await fs.readFile(filePath, 'utf8');
249
-
249
+
250
250
  if (content.includes('chat') || content.includes('conversation')) {
251
251
  capabilities.push('chat');
252
252
  }
253
-
253
+
254
254
  if (content.includes('code') || content.includes('programming')) {
255
255
  capabilities.push('code-generation');
256
256
  }
257
-
257
+
258
258
  if (content.includes('file') || content.includes('document')) {
259
259
  capabilities.push('file-processing');
260
260
  }
261
-
261
+
262
262
  if (content.includes('web') || content.includes('http')) {
263
263
  capabilities.push('web-interaction');
264
264
  }
265
-
265
+
266
266
  // Check for common CLI patterns
267
267
  if (content.includes('process.argv') || content.includes('yargs') || content.includes('commander')) {
268
268
  capabilities.push('cli-interface');
269
269
  }
270
-
270
+
271
271
  } catch (error) {
272
272
  if (logger) {
273
273
  await logger.debug(`Capability detection failed for ${filePath}: ${error.message}`);
274
274
  }
275
275
  }
276
-
276
+
277
277
  // Add default capabilities based on file type
278
278
  capabilities.push('help');
279
-
279
+
280
280
  agentInfo.capabilities = capabilities;
281
281
  }
282
282
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Agent Discovery - History Manager
3
- *
3
+ *
4
4
  * Manages discovery history and status tracking.
5
5
  */
6
6
 
@@ -190,7 +190,7 @@ async function getDiscoveryStatistics(fileManager) {
190
190
  lastDiscovery: status.lastDiscovery,
191
191
  totalAgentsDiscovered: status.totalDiscovered || 0,
192
192
  validAgents: status.validAgents || 0,
193
- duplicateRate: status.totalDiscovered > 0 ?
193
+ duplicateRate: status.totalDiscovered > 0 ?
194
194
  ((status.duplicates || 0) / status.totalDiscovered * 100).toFixed(2) + '%' : '0%',
195
195
  agentTypes: {},
196
196
  recentOperations: history.slice(-10).reverse()
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Agent Logger
3
- *
3
+ *
4
4
  * Provides structured logging for agent operations.
5
5
  * Follows constitutional requirements: <555 lines, test-first approach.
6
6
  */
@@ -82,11 +82,11 @@ class AgentLogger {
82
82
  if (!this.shouldLog('error')) return;
83
83
 
84
84
  const logEntry = this.formatMessage('error', message, meta);
85
-
85
+
86
86
  if (this.console) {
87
87
  console.error(`[ERROR] ${logEntry.timestamp} - ${message}`, meta);
88
88
  }
89
-
89
+
90
90
  await this.writeToFile('error', logEntry);
91
91
  }
92
92
 
@@ -100,11 +100,11 @@ class AgentLogger {
100
100
  if (!this.shouldLog('warn')) return;
101
101
 
102
102
  const logEntry = this.formatMessage('warn', message, meta);
103
-
103
+
104
104
  if (this.console) {
105
105
  console.warn(`[WARN] ${logEntry.timestamp} - ${message}`, meta);
106
106
  }
107
-
107
+
108
108
  await this.writeToFile('agent', logEntry);
109
109
  }
110
110
 
@@ -118,11 +118,11 @@ class AgentLogger {
118
118
  if (!this.shouldLog('info')) return;
119
119
 
120
120
  const logEntry = this.formatMessage('info', message, meta);
121
-
121
+
122
122
  if (this.console) {
123
123
  console.info(`[INFO] ${logEntry.timestamp} - ${message}`, meta);
124
124
  }
125
-
125
+
126
126
  await this.writeToFile('agent', logEntry);
127
127
  }
128
128
 
@@ -136,11 +136,11 @@ class AgentLogger {
136
136
  if (!this.shouldLog('debug')) return;
137
137
 
138
138
  const logEntry = this.formatMessage('debug', message, meta);
139
-
139
+
140
140
  if (this.console) {
141
141
  console.debug(`[DEBUG] ${logEntry.timestamp} - ${message}`, meta);
142
142
  }
143
-
143
+
144
144
  await this.writeToFile('debug', logEntry);
145
145
  }
146
146
 
@@ -247,7 +247,7 @@ class AgentLogger {
247
247
  */
248
248
  async logVerificationResult(agentId, testType, passed, duration, meta = {}) {
249
249
  const level = passed ? 'info' : 'warn';
250
- const message = passed
250
+ const message = passed
251
251
  ? `Verification ${testType} passed for ${agentId}`
252
252
  : `Verification ${testType} failed for ${agentId}`;
253
253
 
@@ -429,10 +429,10 @@ class AgentLogger {
429
429
  fileManager: this.fileManager,
430
430
  console: this.console
431
431
  });
432
-
432
+
433
433
  // Add context to all log messages
434
434
  childLogger.context = context;
435
-
435
+
436
436
  // Override log methods to include context
437
437
  ['error', 'warn', 'info', 'debug'].forEach(level => {
438
438
  const originalMethod = childLogger[level];
@@ -440,7 +440,7 @@ class AgentLogger {
440
440
  await originalMethod.call(childLogger, message, { ...this.context, ...meta });
441
441
  };
442
442
  });
443
-
443
+
444
444
  return childLogger;
445
445
  }
446
446
 
@@ -452,12 +452,12 @@ class AgentLogger {
452
452
  */
453
453
  async getAgentLogs(agentId, options = {}) {
454
454
  const { limit = 50, level = null, since = null } = options;
455
-
455
+
456
456
  const logs = await this.fileManager.readLogs('agent', {
457
457
  limit: limit * 3, // Get more to filter
458
458
  since
459
459
  });
460
-
460
+
461
461
  return logs
462
462
  .filter(log => log.agentId === agentId)
463
463
  .filter(log => !level || log.level === level.toUpperCase())
@@ -471,7 +471,7 @@ class AgentLogger {
471
471
  */
472
472
  async getErrorLogs(options = {}) {
473
473
  const { limit = 50, since = null } = options;
474
-
474
+
475
475
  return await this.fileManager.readLogs('error', {
476
476
  limit,
477
477
  since
@@ -485,25 +485,25 @@ class AgentLogger {
485
485
  */
486
486
  async cleanOldLogs(olderThanDays = 30) {
487
487
  const results = {};
488
-
488
+
489
489
  try {
490
490
  results.agent = await this.fileManager.cleanOldLogs('agent', olderThanDays);
491
491
  } catch (error) {
492
492
  results.agent = { error: error.message };
493
493
  }
494
-
494
+
495
495
  try {
496
496
  results.error = await this.fileManager.cleanOldLogs('error', olderThanDays);
497
497
  } catch (error) {
498
498
  results.error = { error: error.message };
499
499
  }
500
-
500
+
501
501
  try {
502
502
  results.debug = await this.fileManager.cleanOldLogs('debug', olderThanDays);
503
503
  } catch (error) {
504
504
  results.debug = { error: error.message };
505
505
  }
506
-
506
+
507
507
  return results;
508
508
  }
509
509
  }