0xray 2.1.2 → 2.1.4

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 (250) hide show
  1. package/.opencode/codex.codex +1 -1
  2. package/.opencode/commands/dependency-audit.md +3 -3
  3. package/.opencode/enforcer-config.json +2 -2
  4. package/AGENTS.md +2 -1
  5. package/README.md +12 -11
  6. package/dist/AGENTS.md +2 -1
  7. package/dist/CHANGELOG.md +38 -0
  8. package/dist/README.md +12 -11
  9. package/dist/agents/code-reviewer.js +1 -1
  10. package/dist/analytics/routing-refiner.js +1 -1
  11. package/dist/cli/index.js +11 -1
  12. package/dist/cli/server.js +3 -3
  13. package/dist/core/activity-logger.d.ts +2 -2
  14. package/dist/core/activity-logger.js +4 -4
  15. package/dist/core/boot-orchestrator.d.ts +1 -1
  16. package/dist/core/boot-orchestrator.js +13 -28
  17. package/dist/core/bridge.mjs +3 -3
  18. package/dist/core/codex-formatter.js +2 -2
  19. package/dist/core/codex-injector.d.ts +0 -1
  20. package/dist/core/codex-injector.js +2 -3
  21. package/dist/core/config-loader.d.ts +1 -1
  22. package/dist/core/config-loader.js +1 -1
  23. package/dist/core/config-paths.d.ts +0 -2
  24. package/dist/core/config-paths.js +7 -8
  25. package/dist/core/context-loader.d.ts +1 -1
  26. package/dist/core/context-loader.js +1 -1
  27. package/dist/core/errors.d.ts +3 -0
  28. package/dist/core/errors.js +10 -0
  29. package/dist/core/features-config.js +1 -1
  30. package/dist/core/framework-logger.d.ts +3 -3
  31. package/dist/core/framework-logger.js +17 -9
  32. package/dist/core/index.d.ts +2 -2
  33. package/dist/core/index.js +4 -2
  34. package/dist/core/logging-config.d.ts +2 -1
  35. package/dist/core/logging-config.js +7 -7
  36. package/dist/enforcement/loaders/codex-loader.js +1 -1
  37. package/dist/execution/opencode-cli-invoker.js +5 -5
  38. package/dist/governance/governance-service.js +1 -1
  39. package/dist/index.d.ts +3 -3
  40. package/dist/index.js +3 -3
  41. package/dist/inference/inference-cycle.d.ts +1 -1
  42. package/dist/inference/inference-cycle.js +10 -10
  43. package/dist/integrations/base/Integration.js +1 -1
  44. package/dist/integrations/base/registry.js +19 -19
  45. package/dist/integrations/grok/grok-cli.js +17 -17
  46. package/dist/integrations/grok/hooks/pre-tool-use.js +1 -1
  47. package/dist/integrations/hermes-agent/bridge.mjs +1 -1
  48. package/dist/integrations/openclaw/api-server.d.ts +0 -1
  49. package/dist/integrations/openclaw/api-server.js +7 -10
  50. package/dist/integrations/openclaw/client.d.ts +0 -1
  51. package/dist/integrations/openclaw/client.js +22 -24
  52. package/dist/integrations/openclaw/hooks/xray-hooks.d.ts +0 -1
  53. package/dist/integrations/openclaw/hooks/xray-hooks.js +17 -18
  54. package/dist/integrations/plugins/plugin-registry.js +5 -5
  55. package/dist/mcps/architect-tools.server.d.ts +2 -4
  56. package/dist/mcps/architect-tools.server.js +112 -195
  57. package/dist/mcps/auto-format.server.d.ts +2 -4
  58. package/dist/mcps/auto-format.server.js +49 -95
  59. package/dist/mcps/boot-orchestrator.server.d.ts +2 -4
  60. package/dist/mcps/boot-orchestrator.server.js +73 -105
  61. package/dist/mcps/config/server-config-registry.js +3 -3
  62. package/dist/mcps/enforcer-tools.server.d.ts +2 -4
  63. package/dist/mcps/enforcer-tools.server.js +202 -285
  64. package/dist/mcps/estimation.server.d.ts +2 -4
  65. package/dist/mcps/estimation.server.js +63 -107
  66. package/dist/mcps/framework-compliance-audit.server.d.ts +2 -4
  67. package/dist/mcps/framework-compliance-audit.server.js +53 -82
  68. package/dist/mcps/framework-help.server.d.ts +2 -4
  69. package/dist/mcps/framework-help.server.js +63 -101
  70. package/dist/mcps/governance.server.js +2 -2
  71. package/dist/mcps/knowledge-skills/api-design.server.d.ts +2 -4
  72. package/dist/mcps/knowledge-skills/api-design.server.js +35 -67
  73. package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +2 -10
  74. package/dist/mcps/knowledge-skills/architecture-patterns.server.js +35 -74
  75. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.d.ts +2 -4
  76. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +143 -162
  77. package/dist/mcps/knowledge-skills/code-analyzer.server.d.ts +3 -4
  78. package/dist/mcps/knowledge-skills/code-analyzer.server.js +20 -45
  79. package/dist/mcps/knowledge-skills/code-review.server.d.ts +2 -4
  80. package/dist/mcps/knowledge-skills/code-review.server.js +109 -143
  81. package/dist/mcps/knowledge-skills/content-creator.server.d.ts +2 -4
  82. package/dist/mcps/knowledge-skills/content-creator.server.js +205 -226
  83. package/dist/mcps/knowledge-skills/database-design.server.d.ts +2 -4
  84. package/dist/mcps/knowledge-skills/database-design.server.js +117 -151
  85. package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +2 -4
  86. package/dist/mcps/knowledge-skills/devops-deployment.server.js +71 -160
  87. package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +2 -4
  88. package/dist/mcps/knowledge-skills/git-workflow.server.js +36 -68
  89. package/dist/mcps/knowledge-skills/growth-strategist.server.d.ts +2 -4
  90. package/dist/mcps/knowledge-skills/growth-strategist.server.js +303 -324
  91. package/dist/mcps/knowledge-skills/log-monitor.server.d.ts +2 -4
  92. package/dist/mcps/knowledge-skills/log-monitor.server.js +141 -160
  93. package/dist/mcps/knowledge-skills/mobile-development.server.d.ts +2 -4
  94. package/dist/mcps/knowledge-skills/mobile-development.server.js +92 -209
  95. package/dist/mcps/knowledge-skills/multimodal-looker.server.d.ts +2 -4
  96. package/dist/mcps/knowledge-skills/multimodal-looker.server.js +123 -159
  97. package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +2 -5
  98. package/dist/mcps/knowledge-skills/performance-optimization.server.js +155 -296
  99. package/dist/mcps/knowledge-skills/project-analysis.server.d.ts +2 -4
  100. package/dist/mcps/knowledge-skills/project-analysis.server.js +75 -226
  101. package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +2 -4
  102. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +63 -156
  103. package/dist/mcps/knowledge-skills/security-audit.server.d.ts +2 -4
  104. package/dist/mcps/knowledge-skills/security-audit.server.js +102 -136
  105. package/dist/mcps/knowledge-skills/seo-consultant.server.d.ts +2 -4
  106. package/dist/mcps/knowledge-skills/seo-consultant.server.js +80 -203
  107. package/dist/mcps/knowledge-skills/session-management.server.d.ts +2 -4
  108. package/dist/mcps/knowledge-skills/session-management.server.js +50 -203
  109. package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +2 -4
  110. package/dist/mcps/knowledge-skills/skill-invocation.server.js +168 -347
  111. package/dist/mcps/knowledge-skills/strategist.server.d.ts +2 -11
  112. package/dist/mcps/knowledge-skills/strategist.server.js +72 -122
  113. package/dist/mcps/knowledge-skills/tech-writer.server.d.ts +2 -4
  114. package/dist/mcps/knowledge-skills/tech-writer.server.js +87 -300
  115. package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +2 -4
  116. package/dist/mcps/knowledge-skills/testing-best-practices.server.js +147 -182
  117. package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +2 -4
  118. package/dist/mcps/knowledge-skills/testing-strategy.server.js +78 -153
  119. package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +2 -5
  120. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +90 -399
  121. package/dist/mcps/lint.server.d.ts +2 -4
  122. package/dist/mcps/lint.server.js +51 -92
  123. package/dist/mcps/mcp-client.js +2 -2
  124. package/dist/mcps/model-health-check.server.d.ts +2 -4
  125. package/dist/mcps/model-health-check.server.js +32 -60
  126. package/dist/mcps/performance-analysis.server.d.ts +2 -4
  127. package/dist/mcps/performance-analysis.server.js +57 -88
  128. package/dist/mcps/processor-pipeline.server.d.ts +2 -4
  129. package/dist/mcps/processor-pipeline.server.js +69 -100
  130. package/dist/mcps/registry.json +1 -1
  131. package/dist/mcps/researcher.server.d.ts +3 -5
  132. package/dist/mcps/researcher.server.js +81 -154
  133. package/dist/mcps/security-scan.server.d.ts +2 -4
  134. package/dist/mcps/security-scan.server.js +54 -96
  135. package/dist/mcps/shared/knowledge-skill-base.d.ts +14 -0
  136. package/dist/mcps/shared/knowledge-skill-base.js +45 -0
  137. package/dist/{security → mcps/shared}/security-scanner.js +1 -1
  138. package/dist/mcps/state-manager.server.d.ts +2 -4
  139. package/dist/mcps/state-manager.server.js +115 -160
  140. package/dist/orchestrator/orchestrator.d.ts +1 -1
  141. package/dist/orchestrator/orchestrator.js +1 -1
  142. package/dist/orchestrator/universal-registry-bridge.js +1 -1
  143. package/dist/plugin/xray-codex-injection.d.ts +1 -1
  144. package/dist/plugin/xray-codex-injection.js +1 -1
  145. package/dist/postprocessor/PostProcessor.d.ts +4 -44
  146. package/dist/postprocessor/PostProcessor.js +39 -553
  147. package/dist/postprocessor/analysis/CodeChangeAnalyzer.d.ts +11 -0
  148. package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +50 -0
  149. package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.d.ts +11 -0
  150. package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js +356 -0
  151. package/dist/postprocessor/config/ProcessorConfigLoader.d.ts +44 -0
  152. package/dist/postprocessor/config/ProcessorConfigLoader.js +21 -0
  153. package/dist/postprocessor/reporting/PostProcessorReporter.d.ts +19 -0
  154. package/dist/postprocessor/reporting/PostProcessorReporter.js +96 -0
  155. package/dist/postprocessor/triggers/GitHookTrigger.js +11 -11
  156. package/dist/processors/implementations/refactoring-logging-processor-wrapper.d.ts +32 -0
  157. package/dist/processors/implementations/refactoring-logging-processor-wrapper.js +95 -1
  158. package/dist/processors/processor-manager.js +346 -314
  159. package/dist/reporting/report-formatter.js +1 -1
  160. package/dist/security/security-hardener.d.ts +69 -2
  161. package/dist/security/security-hardener.js +129 -1
  162. package/dist/skills/registry.json +1 -1
  163. package/dist/state/index.d.ts +3 -5
  164. package/dist/state/index.js +1 -7
  165. package/dist/state/state-manager.d.ts +1 -1
  166. package/dist/state/state-manager.js +2 -3
  167. package/package.json +13 -10
  168. package/scripts/node/universal-version-manager.js +11 -11
  169. package/src/mcps/architect-tools.server.ts +112 -215
  170. package/src/mcps/auto-format.server.ts +50 -110
  171. package/src/mcps/boot-orchestrator.server.ts +75 -121
  172. package/src/mcps/config/__tests__/server-config-registry.test.ts +21 -12
  173. package/src/mcps/config/server-config-registry.ts +3 -3
  174. package/src/mcps/enforcer-tools.server.ts +212 -310
  175. package/src/mcps/estimation.server.ts +62 -122
  176. package/src/mcps/framework-compliance-audit.server.ts +52 -97
  177. package/src/mcps/framework-help.server.ts +64 -114
  178. package/src/mcps/governance.server.ts +2 -2
  179. package/src/mcps/knowledge-skills/api-design.server.ts +32 -77
  180. package/src/mcps/knowledge-skills/architecture-patterns.server.ts +31 -87
  181. package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +165 -193
  182. package/src/mcps/knowledge-skills/code-analyzer.server.ts +20 -55
  183. package/src/mcps/knowledge-skills/code-review.server.ts +114 -161
  184. package/src/mcps/knowledge-skills/content-creator.server.ts +218 -255
  185. package/src/mcps/knowledge-skills/database-design.server.ts +118 -165
  186. package/src/mcps/knowledge-skills/devops-deployment.server.ts +67 -172
  187. package/src/mcps/knowledge-skills/git-workflow.server.ts +32 -77
  188. package/src/mcps/knowledge-skills/growth-strategist.server.ts +324 -361
  189. package/src/mcps/knowledge-skills/log-monitor.server.ts +160 -187
  190. package/src/mcps/knowledge-skills/mobile-development.server.ts +89 -223
  191. package/src/mcps/knowledge-skills/multimodal-looker.server.ts +128 -175
  192. package/src/mcps/knowledge-skills/performance-optimization.server.ts +156 -329
  193. package/src/mcps/knowledge-skills/project-analysis.server.ts +72 -248
  194. package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +59 -171
  195. package/src/mcps/knowledge-skills/security-audit.server.ts +104 -151
  196. package/src/mcps/knowledge-skills/seo-consultant.server.ts +80 -220
  197. package/src/mcps/knowledge-skills/session-management.server.ts +51 -232
  198. package/src/mcps/knowledge-skills/skill-invocation.server.ts +165 -372
  199. package/src/mcps/knowledge-skills/strategist.server.ts +72 -143
  200. package/src/mcps/knowledge-skills/tech-writer.server.ts +85 -350
  201. package/src/mcps/knowledge-skills/testing-best-practices.server.ts +146 -195
  202. package/src/mcps/knowledge-skills/testing-strategy.server.ts +75 -161
  203. package/src/mcps/knowledge-skills/ui-ux-design.server.ts +93 -487
  204. package/src/mcps/lint.server.ts +53 -107
  205. package/src/mcps/mcp-client.ts +2 -2
  206. package/src/mcps/model-health-check.server.ts +34 -71
  207. package/src/mcps/performance-analysis.server.ts +60 -104
  208. package/src/mcps/processor-pipeline.server.ts +72 -110
  209. package/src/mcps/registry.json +1 -1
  210. package/src/mcps/researcher.server.ts +88 -177
  211. package/src/mcps/security-scan.server.ts +55 -104
  212. package/src/mcps/shared/knowledge-skill-base.ts +62 -0
  213. package/src/mcps/shared/prompt-security-validator.ts +199 -0
  214. package/src/mcps/shared/security-scanner.ts +599 -0
  215. package/src/mcps/state-manager.server.ts +117 -175
  216. package/src/opencode/codex.codex +1 -1
  217. package/src/opencode/commands/dependency-audit.md +3 -3
  218. package/src/opencode/enforcer-config.json +2 -2
  219. package/src/skills/registry.json +1 -1
  220. package/xray/codex.json +1 -1
  221. package/xray/config.json +1 -1
  222. package/xray/features.json +1 -1
  223. package/xray/integrations.json +3 -3
  224. package/dist/integrations/hermes-agent/__pycache__/__init__.cpython-313.pyc +0 -0
  225. package/dist/integrations/hermes-agent/__pycache__/conftest.cpython-313-pytest-9.0.2.pyc +0 -0
  226. package/dist/integrations/hermes-agent/__pycache__/schemas.cpython-313.pyc +0 -0
  227. package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313-pytest-9.0.2.pyc +0 -0
  228. package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313.pyc +0 -0
  229. package/dist/integrations/hermes-agent/__pycache__/tools.cpython-313.pyc +0 -0
  230. package/dist/integrations/hermes-agent/conftest.py +0 -14
  231. package/dist/integrations/hermes-agent/test_plugin.py +0 -1103
  232. package/dist/processors/implementations/refactoring-logging-processor.d.ts +0 -31
  233. package/dist/processors/implementations/refactoring-logging-processor.js +0 -96
  234. package/dist/processors/implementations/session-capture-processor.d.ts +0 -14
  235. package/dist/processors/implementations/session-capture-processor.js +0 -37
  236. package/dist/scripts/activate-kernel-pipeline.d.ts +0 -7
  237. package/dist/scripts/activate-kernel-pipeline.js +0 -101
  238. package/dist/security/index.d.ts +0 -13
  239. package/dist/security/index.js +0 -13
  240. package/dist/security/security-agent-coordinator.d.ts +0 -72
  241. package/dist/security/security-agent-coordinator.js +0 -204
  242. package/dist/security/security-auditor.d.ts +0 -56
  243. package/dist/security/security-auditor.js +0 -584
  244. package/dist/security/security-hardening-system.d.ts +0 -239
  245. package/dist/security/security-hardening-system.js +0 -727
  246. package/dist/security/security-orchestration-layer.d.ts +0 -119
  247. package/dist/security/security-orchestration-layer.js +0 -496
  248. /package/dist/{security → mcps/shared}/prompt-security-validator.d.ts +0 -0
  249. /package/dist/{security → mcps/shared}/prompt-security-validator.js +0 -0
  250. /package/dist/{security → mcps/shared}/security-scanner.d.ts +0 -0
@@ -103,329 +103,361 @@ export class ProcessorManager {
103
103
  return new Ctor(...resolved);
104
104
  }
105
105
  registerBuiltInFactories() {
106
- const f = this.factories;
107
- f.set("preValidate", {
108
- execute: async (ctx) => {
109
- const { PreValidateProcessor } = await import("./implementations/pre-validate-processor.js");
110
- const p = new PreValidateProcessor();
111
- const r = await p.execute(ctx);
112
- return r.data;
113
- },
114
- init: async () => {
115
- frameworkLogger.log("processor-manager", "initializing pre-validate processor", "info");
116
- },
117
- });
118
- f.set("codexCompliance", {
119
- execute: async (ctx) => {
120
- const { CodexComplianceProcessor } = await import("./implementations/codex-compliance-processor.js");
121
- const p = new CodexComplianceProcessor();
122
- const r = await p.execute(ctx);
123
- return r.data;
124
- },
125
- init: async () => {
126
- frameworkLogger.log("processor-manager", "initializing codex compliance processor", "info");
127
- },
128
- });
129
- f.set("logProtection", {
130
- execute: async (ctx) => {
131
- const { LogProtectionProcessor } = await import("./implementations/log-protection-processor.js");
132
- const p = new LogProtectionProcessor();
133
- const filePath = ctx.filePath || ctx.toolInput?.args?.filePath;
134
- const operation = ctx.operation || ctx.toolInput?.args?.operation;
135
- const result = await p.execute({ filePath, operation });
136
- return result.data;
137
- },
138
- });
139
- f.set("versionCompliance", {
140
- execute: async (ctx) => {
141
- const { VersionComplianceProcessor } = await import("./implementations/version-compliance-processor.js");
142
- const p = new VersionComplianceProcessor(process.cwd());
143
- const result = await p.validateVersionCompliance();
144
- return {
145
- success: result.compliant,
146
- errors: result.errors || [],
147
- warnings: result.warnings || [],
148
- checkedAt: new Date().toISOString(),
149
- };
150
- },
151
- init: async () => {
152
- frameworkLogger.log("processor-manager", "initializing version compliance processor", "info");
153
- try {
106
+ const factoryConfigs = [
107
+ {
108
+ name: "preValidate",
109
+ execute: async (ctx) => {
110
+ const { PreValidateProcessor } = await import("./implementations/pre-validate-processor.js");
111
+ const p = new PreValidateProcessor();
112
+ const r = await p.execute(ctx);
113
+ return r.data;
114
+ },
115
+ init: async () => {
116
+ frameworkLogger.log("processor-manager", "initializing pre-validate processor", "info");
117
+ },
118
+ },
119
+ {
120
+ name: "codexCompliance",
121
+ execute: async (ctx) => {
122
+ const { CodexComplianceProcessor } = await import("./implementations/codex-compliance-processor.js");
123
+ const p = new CodexComplianceProcessor();
124
+ const r = await p.execute(ctx);
125
+ return r.data;
126
+ },
127
+ init: async () => {
128
+ frameworkLogger.log("processor-manager", "initializing codex compliance processor", "info");
129
+ },
130
+ },
131
+ {
132
+ name: "logProtection",
133
+ execute: async (ctx) => {
134
+ const { LogProtectionProcessor } = await import("./implementations/log-protection-processor.js");
135
+ const p = new LogProtectionProcessor();
136
+ const filePath = ctx.filePath || ctx.toolInput?.args?.filePath;
137
+ const operation = ctx.operation || ctx.toolInput?.args?.operation;
138
+ const result = await p.execute({ filePath, operation });
139
+ return result.data;
140
+ },
141
+ },
142
+ {
143
+ name: "versionCompliance",
144
+ execute: async (ctx) => {
154
145
  const { VersionComplianceProcessor } = await import("./implementations/version-compliance-processor.js");
155
146
  const p = new VersionComplianceProcessor(process.cwd());
156
147
  const result = await p.validateVersionCompliance();
157
- if (!result.compliant) {
158
- frameworkLogger.log("processor-manager", "version-compliance", "info", {
159
- message: "Version compliance issues detected - commits may be blocked",
160
- errors: result.errors,
161
- warnings: result.warnings,
162
- });
148
+ return {
149
+ success: result.compliant,
150
+ errors: result.errors || [],
151
+ warnings: result.warnings || [],
152
+ checkedAt: new Date().toISOString(),
153
+ };
154
+ },
155
+ init: async () => {
156
+ frameworkLogger.log("processor-manager", "initializing version compliance processor", "info");
157
+ try {
158
+ const { VersionComplianceProcessor } = await import("./implementations/version-compliance-processor.js");
159
+ const p = new VersionComplianceProcessor(process.cwd());
160
+ const result = await p.validateVersionCompliance();
161
+ if (!result.compliant) {
162
+ frameworkLogger.log("processor-manager", "version-compliance", "info", {
163
+ message: "Version compliance issues detected - commits may be blocked",
164
+ errors: result.errors,
165
+ warnings: result.warnings,
166
+ });
167
+ }
168
+ else {
169
+ frameworkLogger.log("processor-manager", "version-compliance", "info", {
170
+ message: `Version compliance verified: NPM ${result.npmVersion}, UVM ${result.uvmVersion}`,
171
+ });
172
+ }
163
173
  }
164
- else {
165
- frameworkLogger.log("processor-manager", "version-compliance", "info", {
166
- message: `Version compliance verified: NPM ${result.npmVersion}, UVM ${result.uvmVersion}`,
174
+ catch (error) {
175
+ frameworkLogger.log("processor-manager", "version-compliance-init-error", "error", {
176
+ error: error instanceof Error ? error.message : String(error),
167
177
  });
168
178
  }
169
- }
170
- catch (error) {
171
- frameworkLogger.log("processor-manager", "version-compliance-init-error", "error", {
172
- error: error instanceof Error ? error.message : String(error),
173
- });
174
- }
175
- },
176
- });
177
- f.set("errorBoundary", {
178
- execute: async (ctx) => {
179
- const { ErrorBoundaryProcessor } = await import("./implementations/error-boundary-processor.js");
180
- const p = new ErrorBoundaryProcessor();
181
- const r = await p.execute(ctx);
182
- return r.data;
183
- },
184
- init: async () => {
185
- frameworkLogger.log("processor-manager", "initializing error boundary processor", "info");
186
- },
187
- });
188
- f.set("testExecution", {
189
- execute: async (ctx) => {
190
- const { TestExecutionProcessor } = await import("./implementations/test-execution-processor.js");
191
- const p = new TestExecutionProcessor();
192
- const r = await p.execute(ctx);
193
- return r.data;
194
- },
195
- init: async () => {
196
- frameworkLogger.log("processor-manager", "initializing test execution processor", "info");
197
- },
198
- });
199
- f.set("regressionTesting", {
200
- execute: async (ctx) => {
201
- const { RegressionTestingProcessor } = await import("./implementations/regression-testing-processor.js");
202
- const p = new RegressionTestingProcessor();
203
- const r = await p.execute(ctx);
204
- return r.data;
205
- },
206
- init: async () => {
207
- frameworkLogger.log("processor-manager", "initializing regression testing processor", "info");
208
- },
209
- });
210
- f.set("stateValidation", {
211
- execute: async (ctx) => {
212
- const { StateValidationProcessor } = await import("./implementations/state-validation-processor.js");
213
- const p = new StateValidationProcessor(this.stateManager);
214
- const r = await p.execute(ctx);
215
- return r.data;
216
- },
217
- init: async () => {
218
- frameworkLogger.log("processor-manager", "initializing state validation processor", "info");
219
- },
220
- });
221
- f.set("refactoringLogging", {
222
- execute: async (ctx) => {
223
- const { RefactoringLoggingProcessorWrapper } = await import("./implementations/refactoring-logging-processor-wrapper.js");
224
- const p = new RefactoringLoggingProcessorWrapper();
225
- const r = await p.execute(ctx);
226
- return r.data;
227
- },
228
- });
229
- f.set("testAutoCreation", {
230
- execute: async (ctx) => {
231
- const { testAutoCreationProcessor } = await import("./implementations/test-auto-creation-processor.js");
232
- const result = await testAutoCreationProcessor.execute(ctx);
233
- return { success: result.success, message: result.message, data: result.data };
234
- },
235
- init: async () => {
236
- frameworkLogger.log("processor-manager", "initializing test auto-creation processor", "info");
237
- },
238
- });
239
- f.set("coverageAnalysis", {
240
- execute: async (ctx) => {
241
- const { CoverageAnalysisProcessor } = await import("./implementations/coverage-analysis-processor.js");
242
- const p = new CoverageAnalysisProcessor();
243
- const r = await p.execute(ctx);
244
- return r.data;
245
- },
246
- });
247
- f.set("agentsMdValidation", {
248
- execute: async (ctx) => {
249
- const { AgentsMdValidationProcessor } = await import("./implementations/agents-md-validation-processor.js");
250
- const p = new AgentsMdValidationProcessor(process.cwd());
251
- const result = await p.execute({
252
- tool: ctx.tool || "validate",
253
- operation: ctx.operation || "pre-commit",
254
- });
255
- return {
256
- success: result.success,
257
- blocked: result.blocked,
258
- message: result.message,
259
- errors: result.result?.errors || [],
260
- warnings: result.result?.warnings || [],
261
- checkedAt: new Date().toISOString(),
262
- };
263
- },
264
- init: async () => {
265
- frameworkLogger.log("processor-manager", "initializing AGENTS.md validation processor", "info");
266
- try {
179
+ },
180
+ },
181
+ {
182
+ name: "errorBoundary",
183
+ execute: async (ctx) => {
184
+ const { ErrorBoundaryProcessor } = await import("./implementations/error-boundary-processor.js");
185
+ const p = new ErrorBoundaryProcessor();
186
+ const r = await p.execute(ctx);
187
+ return r.data;
188
+ },
189
+ init: async () => {
190
+ frameworkLogger.log("processor-manager", "initializing error boundary processor", "info");
191
+ },
192
+ },
193
+ {
194
+ name: "testExecution",
195
+ execute: async (ctx) => {
196
+ const { TestExecutionProcessor } = await import("./implementations/test-execution-processor.js");
197
+ const p = new TestExecutionProcessor();
198
+ const r = await p.execute(ctx);
199
+ return r.data;
200
+ },
201
+ init: async () => {
202
+ frameworkLogger.log("processor-manager", "initializing test execution processor", "info");
203
+ },
204
+ },
205
+ {
206
+ name: "regressionTesting",
207
+ execute: async (ctx) => {
208
+ const { RegressionTestingProcessor } = await import("./implementations/regression-testing-processor.js");
209
+ const p = new RegressionTestingProcessor();
210
+ const r = await p.execute(ctx);
211
+ return r.data;
212
+ },
213
+ init: async () => {
214
+ frameworkLogger.log("processor-manager", "initializing regression testing processor", "info");
215
+ },
216
+ },
217
+ {
218
+ name: "stateValidation",
219
+ execute: async (ctx) => {
220
+ const { StateValidationProcessor } = await import("./implementations/state-validation-processor.js");
221
+ const p = new StateValidationProcessor(this.stateManager);
222
+ const r = await p.execute(ctx);
223
+ return r.data;
224
+ },
225
+ init: async () => {
226
+ frameworkLogger.log("processor-manager", "initializing state validation processor", "info");
227
+ },
228
+ },
229
+ {
230
+ name: "refactoringLogging",
231
+ execute: async (ctx) => {
232
+ const { RefactoringLoggingProcessorWrapper } = await import("./implementations/refactoring-logging-processor-wrapper.js");
233
+ const p = new RefactoringLoggingProcessorWrapper();
234
+ const r = await p.execute(ctx);
235
+ return r.data;
236
+ },
237
+ },
238
+ {
239
+ name: "testAutoCreation",
240
+ execute: async (ctx) => {
241
+ const { testAutoCreationProcessor } = await import("./implementations/test-auto-creation-processor.js");
242
+ const result = await testAutoCreationProcessor.execute(ctx);
243
+ return { success: result.success, message: result.message, data: result.data };
244
+ },
245
+ init: async () => {
246
+ frameworkLogger.log("processor-manager", "initializing test auto-creation processor", "info");
247
+ },
248
+ },
249
+ {
250
+ name: "coverageAnalysis",
251
+ execute: async (ctx) => {
252
+ const { CoverageAnalysisProcessor } = await import("./implementations/coverage-analysis-processor.js");
253
+ const p = new CoverageAnalysisProcessor();
254
+ const r = await p.execute(ctx);
255
+ return r.data;
256
+ },
257
+ },
258
+ {
259
+ name: "agentsMdValidation",
260
+ execute: async (ctx) => {
267
261
  const { AgentsMdValidationProcessor } = await import("./implementations/agents-md-validation-processor.js");
268
262
  const p = new AgentsMdValidationProcessor(process.cwd());
269
- const result = await p.execute({ tool: "validate", operation: "initialization" });
270
- if (!result.success && result.blocked) {
271
- frameworkLogger.log("processor-manager", "agents-md-validation", "info", {
272
- message: "AGENTS.md validation failed - commit operations may be blocked",
263
+ const result = await p.execute({
264
+ tool: ctx.tool || "validate",
265
+ operation: ctx.operation || "pre-commit",
266
+ });
267
+ return {
268
+ success: result.success,
269
+ blocked: result.blocked,
270
+ message: result.message,
271
+ errors: result.result?.errors || [],
272
+ warnings: result.result?.warnings || [],
273
+ checkedAt: new Date().toISOString(),
274
+ };
275
+ },
276
+ init: async () => {
277
+ frameworkLogger.log("processor-manager", "initializing AGENTS.md validation processor", "info");
278
+ try {
279
+ const { AgentsMdValidationProcessor } = await import("./implementations/agents-md-validation-processor.js");
280
+ const p = new AgentsMdValidationProcessor(process.cwd());
281
+ const result = await p.execute({ tool: "validate", operation: "initialization" });
282
+ if (!result.success && result.blocked) {
283
+ frameworkLogger.log("processor-manager", "agents-md-validation", "info", {
284
+ message: "AGENTS.md validation failed - commit operations may be blocked",
285
+ });
286
+ }
287
+ }
288
+ catch (error) {
289
+ frameworkLogger.log("processor-manager", "agents-md-validation-init-error", "error", {
290
+ error: error instanceof Error ? error.message : String(error),
273
291
  });
274
292
  }
275
- }
276
- catch (error) {
277
- frameworkLogger.log("processor-manager", "agents-md-validation-init-error", "error", {
278
- error: error instanceof Error ? error.message : String(error),
279
- });
280
- }
281
- },
282
- });
283
- f.set("typescriptCompilation", {
284
- execute: async (ctx) => {
285
- const { runTypeScriptCompilation } = await import("./implementations/typescript-compilation-processor.js");
286
- const cwd = ctx.directory || process.cwd();
287
- return runTypeScriptCompilation(cwd);
288
- },
289
- init: async () => {
290
- frameworkLogger.log("processor-manager", "initializing typescript compilation processor", "info");
291
- },
292
- });
293
- f.set("spawnGovernance", {
294
- execute: async (ctx) => {
295
- const { runSpawnGovernance } = await import("./implementations/spawn-governance-processor.js");
296
- return runSpawnGovernance(ctx);
297
- },
298
- init: async () => {
299
- try {
300
- const { SpawnGovernanceProcessor } = await import("./implementations/spawn-governance-processor.js");
301
- frameworkLogger.log("processor-manager", "spawn-governance-processor-initialized", "success", {
302
- maxConcurrent: SpawnGovernanceProcessor.DEFAULT_MAX_CONCURRENT,
303
- });
304
- }
305
- catch (error) {
306
- frameworkLogger.log("processor-manager", "spawn-governance-init-failed", "error", {
307
- error: String(error),
308
- });
309
- }
310
- },
311
- });
312
- f.set("performanceBudget", {
313
- execute: async (ctx) => {
314
- const { runPerformanceBudgetCheck } = await import("./implementations/performance-budget-processor.js");
315
- return runPerformanceBudgetCheck(ctx);
316
- },
317
- init: async () => {
318
- try {
319
- const { PerformanceBudgetProcessor, DEFAULT_PERFORMANCE_BUDGET } = await import("./implementations/performance-budget-processor.js");
320
- frameworkLogger.log("processor-manager", "performance-budget-processor-initialized", "success", {
321
- config: DEFAULT_PERFORMANCE_BUDGET,
322
- });
323
- }
324
- catch (error) {
325
- frameworkLogger.log("processor-manager", "performance-budget-init-failed", "error", {
326
- error: String(error),
327
- });
328
- }
329
- },
330
- });
331
- f.set("asyncPattern", {
332
- execute: async (ctx) => {
333
- const { runAsyncPatternCheck } = await import("./implementations/async-pattern-processor.js");
334
- return runAsyncPatternCheck(ctx);
335
- },
336
- init: async () => {
337
- try {
338
- frameworkLogger.log("processor-manager", "async-pattern-processor-initialized", "success");
339
- }
340
- catch (error) {
341
- frameworkLogger.log("processor-manager", "async-pattern-init-failed", "error", {
342
- error: String(error),
343
- });
344
- }
345
- },
346
- });
347
- f.set("consoleLogGuard", {
348
- execute: async (ctx) => {
349
- const { runConsoleLogGuard } = await import("./implementations/console-log-guard-processor.js");
350
- return runConsoleLogGuard(ctx);
351
- },
352
- init: async () => {
353
- try {
354
- frameworkLogger.log("processor-manager", "console-log-guard-processor-initialized", "success");
355
- }
356
- catch (error) {
357
- frameworkLogger.log("processor-manager", "console-log-guard-init-failed", "error", {
358
- error: String(error),
359
- });
360
- }
361
- },
362
- });
363
- f.set("nudge", {
364
- execute: async (ctx) => {
365
- const { executeNudgeProcessor } = await import("./implementations/nudge-processor.js");
366
- const result = await executeNudgeProcessor(ctx);
367
- return result.data;
368
- },
369
- init: async () => {
370
- frameworkLogger.log("processor-manager", "initializing nudge processor", "info");
371
- },
372
- });
373
- f.set("consoleLogGuardPost", {
374
- execute: async (ctx) => {
375
- const { runConsoleLogGuard } = await import("./implementations/console-log-guard-processor.js");
376
- return runConsoleLogGuard(ctx);
377
- },
378
- });
379
- f.set("postProcessorChain", {
380
- execute: async (ctx) => {
381
- const { runPostProcessorChainValidation } = await import("./implementations/postprocessor-chain-validator.js");
382
- return runPostProcessorChainValidation(ctx);
383
- },
384
- init: async () => {
385
- frameworkLogger.log("processor-manager", "postprocessor-chain-initialized", "success");
386
- },
387
- });
388
- f.set("commitBatcher", {
389
- execute: async (ctx) => {
390
- const { executeCommitBatcherProcessor } = await import("./implementations/commit-batcher-processor.js");
391
- const result = await executeCommitBatcherProcessor(ctx);
392
- return result.data;
393
- },
394
- init: async () => {
395
- frameworkLogger.log("processor-manager", "initializing commit batcher processor", "info");
396
- },
397
- });
398
- f.set("publishPreflight", {
399
- execute: async (ctx) => {
400
- const { PublishPreflightProcessor } = await import("./implementations/publish-preflight-processor.js");
401
- const p = new PublishPreflightProcessor();
402
- return p.execute(ctx);
403
- },
404
- init: async () => {
405
- frameworkLogger.log("processor-manager", "publish-preflight-initialized", "success");
406
- },
407
- });
408
- f.set("storytellingTrigger", {
409
- execute: async (ctx) => {
410
- const { StorytellingTriggerProcessor } = await import("./implementations/storytelling-trigger-processor.js");
411
- const p = new StorytellingTriggerProcessor();
412
- return p.execute(ctx);
413
- },
414
- });
415
- f.set("inferenceImprovement", {
416
- execute: async (ctx) => {
417
- const { InferenceImprovementProcessor } = await import("./implementations/inference-improvement-processor.js");
418
- const p = new InferenceImprovementProcessor();
419
- return p.execute(ctx);
420
- },
421
- });
422
- f.set("sessionSummary", {
423
- execute: async (ctx) => {
424
- const { SessionSummaryProcessor } = await import("./implementations/session-summary-processor.js");
425
- const p = new SessionSummaryProcessor();
426
- return p.execute(ctx);
427
- },
428
- });
293
+ },
294
+ },
295
+ {
296
+ name: "typescriptCompilation",
297
+ execute: async (ctx) => {
298
+ const { runTypeScriptCompilation } = await import("./implementations/typescript-compilation-processor.js");
299
+ const cwd = ctx.directory || process.cwd();
300
+ return runTypeScriptCompilation(cwd);
301
+ },
302
+ init: async () => {
303
+ frameworkLogger.log("processor-manager", "initializing typescript compilation processor", "info");
304
+ },
305
+ },
306
+ {
307
+ name: "spawnGovernance",
308
+ execute: async (ctx) => {
309
+ const { runSpawnGovernance } = await import("./implementations/spawn-governance-processor.js");
310
+ return runSpawnGovernance(ctx);
311
+ },
312
+ init: async () => {
313
+ try {
314
+ const { SpawnGovernanceProcessor } = await import("./implementations/spawn-governance-processor.js");
315
+ frameworkLogger.log("processor-manager", "spawn-governance-processor-initialized", "success", {
316
+ maxConcurrent: SpawnGovernanceProcessor.DEFAULT_MAX_CONCURRENT,
317
+ });
318
+ }
319
+ catch (error) {
320
+ frameworkLogger.log("processor-manager", "spawn-governance-init-failed", "error", {
321
+ error: String(error),
322
+ });
323
+ }
324
+ },
325
+ },
326
+ {
327
+ name: "performanceBudget",
328
+ execute: async (ctx) => {
329
+ const { runPerformanceBudgetCheck } = await import("./implementations/performance-budget-processor.js");
330
+ return runPerformanceBudgetCheck(ctx);
331
+ },
332
+ init: async () => {
333
+ try {
334
+ const { PerformanceBudgetProcessor, DEFAULT_PERFORMANCE_BUDGET } = await import("./implementations/performance-budget-processor.js");
335
+ frameworkLogger.log("processor-manager", "performance-budget-processor-initialized", "success", {
336
+ config: DEFAULT_PERFORMANCE_BUDGET,
337
+ });
338
+ }
339
+ catch (error) {
340
+ frameworkLogger.log("processor-manager", "performance-budget-init-failed", "error", {
341
+ error: String(error),
342
+ });
343
+ }
344
+ },
345
+ },
346
+ {
347
+ name: "asyncPattern",
348
+ execute: async (ctx) => {
349
+ const { runAsyncPatternCheck } = await import("./implementations/async-pattern-processor.js");
350
+ return runAsyncPatternCheck(ctx);
351
+ },
352
+ init: async () => {
353
+ try {
354
+ frameworkLogger.log("processor-manager", "async-pattern-processor-initialized", "success");
355
+ }
356
+ catch (error) {
357
+ frameworkLogger.log("processor-manager", "async-pattern-init-failed", "error", {
358
+ error: String(error),
359
+ });
360
+ }
361
+ },
362
+ },
363
+ {
364
+ name: "consoleLogGuard",
365
+ execute: async (ctx) => {
366
+ const { runConsoleLogGuard } = await import("./implementations/console-log-guard-processor.js");
367
+ return runConsoleLogGuard(ctx);
368
+ },
369
+ init: async () => {
370
+ try {
371
+ frameworkLogger.log("processor-manager", "console-log-guard-processor-initialized", "success");
372
+ }
373
+ catch (error) {
374
+ frameworkLogger.log("processor-manager", "console-log-guard-init-failed", "error", {
375
+ error: String(error),
376
+ });
377
+ }
378
+ },
379
+ },
380
+ {
381
+ name: "nudge",
382
+ execute: async (ctx) => {
383
+ const { executeNudgeProcessor } = await import("./implementations/nudge-processor.js");
384
+ const result = await executeNudgeProcessor(ctx);
385
+ return result.data;
386
+ },
387
+ init: async () => {
388
+ frameworkLogger.log("processor-manager", "initializing nudge processor", "info");
389
+ },
390
+ },
391
+ {
392
+ name: "consoleLogGuardPost",
393
+ execute: async (ctx) => {
394
+ const { runConsoleLogGuard } = await import("./implementations/console-log-guard-processor.js");
395
+ return runConsoleLogGuard(ctx);
396
+ },
397
+ },
398
+ {
399
+ name: "postProcessorChain",
400
+ execute: async (ctx) => {
401
+ const { runPostProcessorChainValidation } = await import("./implementations/postprocessor-chain-validator.js");
402
+ return runPostProcessorChainValidation(ctx);
403
+ },
404
+ init: async () => {
405
+ frameworkLogger.log("processor-manager", "postprocessor-chain-initialized", "success");
406
+ },
407
+ },
408
+ {
409
+ name: "commitBatcher",
410
+ execute: async (ctx) => {
411
+ const { executeCommitBatcherProcessor } = await import("./implementations/commit-batcher-processor.js");
412
+ const result = await executeCommitBatcherProcessor(ctx);
413
+ return result.data;
414
+ },
415
+ init: async () => {
416
+ frameworkLogger.log("processor-manager", "initializing commit batcher processor", "info");
417
+ },
418
+ },
419
+ {
420
+ name: "publishPreflight",
421
+ execute: async (ctx) => {
422
+ const { PublishPreflightProcessor } = await import("./implementations/publish-preflight-processor.js");
423
+ const p = new PublishPreflightProcessor();
424
+ return p.execute(ctx);
425
+ },
426
+ init: async () => {
427
+ frameworkLogger.log("processor-manager", "publish-preflight-initialized", "success");
428
+ },
429
+ },
430
+ {
431
+ name: "storytellingTrigger",
432
+ execute: async (ctx) => {
433
+ const { StorytellingTriggerProcessor } = await import("./implementations/storytelling-trigger-processor.js");
434
+ const p = new StorytellingTriggerProcessor();
435
+ return p.execute(ctx);
436
+ },
437
+ },
438
+ {
439
+ name: "inferenceImprovement",
440
+ execute: async (ctx) => {
441
+ const { InferenceImprovementProcessor } = await import("./implementations/inference-improvement-processor.js");
442
+ const p = new InferenceImprovementProcessor();
443
+ return p.execute(ctx);
444
+ },
445
+ },
446
+ {
447
+ name: "sessionSummary",
448
+ execute: async (ctx) => {
449
+ const { SessionSummaryProcessor } = await import("./implementations/session-summary-processor.js");
450
+ const p = new SessionSummaryProcessor();
451
+ return p.execute(ctx);
452
+ },
453
+ },
454
+ ];
455
+ for (const config of factoryConfigs) {
456
+ this.registerFactory(config.name, {
457
+ execute: config.execute,
458
+ ...(config.init ? { init: config.init } : {}),
459
+ });
460
+ }
429
461
  }
430
462
  registerFactory(name, factory) {
431
463
  this.factories.set(name, factory);
@@ -558,7 +590,7 @@ export class ProcessorManager {
558
590
  args.input;
559
591
  if (promptText && typeof promptText === "string" && promptText.length > 10) {
560
592
  try {
561
- const { promptSecurityValidator } = await import("../security/prompt-security-validator.js");
593
+ const { promptSecurityValidator } = await import("../mcps/shared/prompt-security-validator.js");
562
594
  const validation = promptSecurityValidator.validatePrompt(promptText);
563
595
  if (!validation.isSafe) {
564
596
  frameworkLogger.log("processor-manager", "prompt-security-blocked", "warning", {