0xray 2.1.1 → 2.1.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/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/enforcer-config.json +2 -2
- package/AGENTS.md +3 -2
- package/README.md +12 -11
- package/dist/AGENTS.md +3 -2
- package/dist/CHANGELOG.md +26 -0
- package/dist/README.md +12 -11
- package/dist/agents/code-reviewer.js +1 -1
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/cli/index.js +11 -1
- package/dist/cli/server.js +3 -3
- package/dist/core/activity-logger.d.ts +2 -2
- package/dist/core/activity-logger.js +4 -4
- package/dist/core/boot-orchestrator.d.ts +1 -1
- package/dist/core/boot-orchestrator.js +13 -28
- package/dist/core/bridge.mjs +3 -3
- package/dist/core/codex-formatter.js +2 -2
- package/dist/core/codex-injector.d.ts +0 -1
- package/dist/core/codex-injector.js +2 -3
- package/dist/core/config-loader.d.ts +1 -1
- package/dist/core/config-loader.js +1 -1
- package/dist/core/config-paths.d.ts +0 -2
- package/dist/core/config-paths.js +7 -8
- package/dist/core/context-loader.d.ts +1 -1
- package/dist/core/context-loader.js +1 -1
- package/dist/core/errors.d.ts +3 -0
- package/dist/core/errors.js +10 -0
- package/dist/core/features-config.js +1 -1
- package/dist/core/framework-logger.d.ts +3 -3
- package/dist/core/framework-logger.js +17 -9
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +4 -2
- package/dist/core/logging-config.d.ts +2 -1
- package/dist/core/logging-config.js +7 -7
- package/dist/enforcement/loaders/codex-loader.js +1 -1
- package/dist/execution/opencode-cli-invoker.js +5 -5
- package/dist/governance/governance-service.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/inference/inference-cycle.d.ts +1 -1
- package/dist/inference/inference-cycle.js +10 -10
- package/dist/integrations/base/Integration.js +1 -1
- package/dist/integrations/base/registry.js +19 -19
- package/dist/integrations/grok/grok-cli.js +17 -17
- package/dist/integrations/grok/hooks/pre-tool-use.js +1 -1
- package/dist/integrations/hermes-agent/bridge.mjs +1 -1
- package/dist/integrations/openclaw/api-server.d.ts +0 -1
- package/dist/integrations/openclaw/api-server.js +7 -10
- package/dist/integrations/openclaw/client.d.ts +0 -1
- package/dist/integrations/openclaw/client.js +22 -24
- package/dist/integrations/openclaw/hooks/xray-hooks.d.ts +0 -1
- package/dist/integrations/openclaw/hooks/xray-hooks.js +17 -18
- package/dist/integrations/plugins/plugin-registry.js +5 -5
- package/dist/mcps/architect-tools.server.d.ts +2 -4
- package/dist/mcps/architect-tools.server.js +112 -195
- package/dist/mcps/auto-format.server.d.ts +2 -4
- package/dist/mcps/auto-format.server.js +49 -95
- package/dist/mcps/boot-orchestrator.server.d.ts +2 -4
- package/dist/mcps/boot-orchestrator.server.js +73 -105
- package/dist/mcps/config/server-config-registry.js +3 -3
- package/dist/mcps/enforcer-tools.server.d.ts +2 -4
- package/dist/mcps/enforcer-tools.server.js +202 -285
- package/dist/mcps/estimation.server.d.ts +2 -4
- package/dist/mcps/estimation.server.js +63 -107
- package/dist/mcps/framework-compliance-audit.server.d.ts +2 -4
- package/dist/mcps/framework-compliance-audit.server.js +53 -82
- package/dist/mcps/framework-help.server.d.ts +2 -4
- package/dist/mcps/framework-help.server.js +63 -101
- package/dist/mcps/governance.server.js +2 -2
- package/dist/mcps/knowledge-skills/api-design.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/api-design.server.js +35 -67
- package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +2 -10
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +35 -74
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +143 -162
- package/dist/mcps/knowledge-skills/code-analyzer.server.d.ts +3 -4
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +20 -45
- package/dist/mcps/knowledge-skills/code-review.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/code-review.server.js +109 -143
- package/dist/mcps/knowledge-skills/content-creator.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/content-creator.server.js +205 -226
- package/dist/mcps/knowledge-skills/database-design.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/database-design.server.js +117 -151
- package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +71 -160
- package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/git-workflow.server.js +36 -68
- package/dist/mcps/knowledge-skills/growth-strategist.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +303 -324
- package/dist/mcps/knowledge-skills/log-monitor.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/log-monitor.server.js +141 -160
- package/dist/mcps/knowledge-skills/mobile-development.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/mobile-development.server.js +92 -209
- package/dist/mcps/knowledge-skills/multimodal-looker.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +123 -159
- package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +2 -5
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +155 -296
- package/dist/mcps/knowledge-skills/project-analysis.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/project-analysis.server.js +75 -226
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +63 -156
- package/dist/mcps/knowledge-skills/security-audit.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/security-audit.server.js +102 -136
- package/dist/mcps/knowledge-skills/seo-consultant.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +80 -203
- package/dist/mcps/knowledge-skills/session-management.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/session-management.server.js +50 -203
- package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +168 -347
- package/dist/mcps/knowledge-skills/strategist.server.d.ts +2 -11
- package/dist/mcps/knowledge-skills/strategist.server.js +72 -122
- package/dist/mcps/knowledge-skills/tech-writer.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/tech-writer.server.js +87 -300
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +147 -182
- package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +78 -153
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +2 -5
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +90 -399
- package/dist/mcps/lint.server.d.ts +2 -4
- package/dist/mcps/lint.server.js +51 -92
- package/dist/mcps/mcp-client.js +2 -2
- package/dist/mcps/model-health-check.server.d.ts +2 -4
- package/dist/mcps/model-health-check.server.js +32 -60
- package/dist/mcps/performance-analysis.server.d.ts +2 -4
- package/dist/mcps/performance-analysis.server.js +57 -88
- package/dist/mcps/processor-pipeline.server.d.ts +2 -4
- package/dist/mcps/processor-pipeline.server.js +69 -100
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/researcher.server.d.ts +3 -5
- package/dist/mcps/researcher.server.js +81 -154
- package/dist/mcps/security-scan.server.d.ts +2 -4
- package/dist/mcps/security-scan.server.js +54 -96
- package/dist/mcps/shared/knowledge-skill-base.d.ts +14 -0
- package/dist/mcps/shared/knowledge-skill-base.js +45 -0
- package/dist/{security → mcps/shared}/security-scanner.js +1 -1
- package/dist/mcps/state-manager.server.d.ts +2 -4
- package/dist/mcps/state-manager.server.js +115 -160
- package/dist/orchestrator/orchestrator.d.ts +1 -1
- package/dist/orchestrator/orchestrator.js +1 -1
- package/dist/orchestrator/universal-registry-bridge.js +1 -1
- package/dist/plugin/xray-codex-injection.d.ts +1 -1
- package/dist/plugin/xray-codex-injection.js +1 -1
- package/dist/postprocessor/PostProcessor.d.ts +4 -44
- package/dist/postprocessor/PostProcessor.js +39 -553
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.d.ts +11 -0
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +50 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.d.ts +11 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js +356 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.d.ts +44 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.js +21 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.d.ts +19 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.js +96 -0
- package/dist/postprocessor/triggers/GitHookTrigger.js +11 -11
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.d.ts +32 -0
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.js +95 -1
- package/dist/processors/processor-manager.js +346 -314
- package/dist/reporting/report-formatter.js +1 -1
- package/dist/security/security-hardener.d.ts +69 -2
- package/dist/security/security-hardener.js +129 -1
- package/dist/skills/registry.json +1 -1
- package/dist/state/index.d.ts +3 -5
- package/dist/state/index.js +1 -7
- package/dist/state/state-manager.d.ts +1 -1
- package/dist/state/state-manager.js +2 -3
- package/package.json +14 -10
- package/scripts/node/setup.cjs +32 -0
- package/scripts/node/universal-version-manager.js +11 -11
- package/src/mcps/architect-tools.server.ts +112 -215
- package/src/mcps/auto-format.server.ts +50 -110
- package/src/mcps/boot-orchestrator.server.ts +75 -121
- package/src/mcps/config/__tests__/server-config-registry.test.ts +21 -12
- package/src/mcps/config/server-config-registry.ts +3 -3
- package/src/mcps/enforcer-tools.server.ts +212 -310
- package/src/mcps/estimation.server.ts +62 -122
- package/src/mcps/framework-compliance-audit.server.ts +52 -97
- package/src/mcps/framework-help.server.ts +64 -114
- package/src/mcps/governance.server.ts +2 -2
- package/src/mcps/knowledge-skills/api-design.server.ts +32 -77
- package/src/mcps/knowledge-skills/architecture-patterns.server.ts +31 -87
- package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +165 -193
- package/src/mcps/knowledge-skills/code-analyzer.server.ts +20 -55
- package/src/mcps/knowledge-skills/code-review.server.ts +114 -161
- package/src/mcps/knowledge-skills/content-creator.server.ts +218 -255
- package/src/mcps/knowledge-skills/database-design.server.ts +118 -165
- package/src/mcps/knowledge-skills/devops-deployment.server.ts +67 -172
- package/src/mcps/knowledge-skills/git-workflow.server.ts +32 -77
- package/src/mcps/knowledge-skills/growth-strategist.server.ts +324 -361
- package/src/mcps/knowledge-skills/log-monitor.server.ts +160 -187
- package/src/mcps/knowledge-skills/mobile-development.server.ts +89 -223
- package/src/mcps/knowledge-skills/multimodal-looker.server.ts +128 -175
- package/src/mcps/knowledge-skills/performance-optimization.server.ts +156 -329
- package/src/mcps/knowledge-skills/project-analysis.server.ts +72 -248
- package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +59 -171
- package/src/mcps/knowledge-skills/security-audit.server.ts +104 -151
- package/src/mcps/knowledge-skills/seo-consultant.server.ts +80 -220
- package/src/mcps/knowledge-skills/session-management.server.ts +51 -232
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +165 -372
- package/src/mcps/knowledge-skills/strategist.server.ts +72 -143
- package/src/mcps/knowledge-skills/tech-writer.server.ts +85 -350
- package/src/mcps/knowledge-skills/testing-best-practices.server.ts +146 -195
- package/src/mcps/knowledge-skills/testing-strategy.server.ts +75 -161
- package/src/mcps/knowledge-skills/ui-ux-design.server.ts +93 -487
- package/src/mcps/lint.server.ts +53 -107
- package/src/mcps/mcp-client.ts +2 -2
- package/src/mcps/model-health-check.server.ts +34 -71
- package/src/mcps/performance-analysis.server.ts +60 -104
- package/src/mcps/processor-pipeline.server.ts +72 -110
- package/src/mcps/registry.json +1 -1
- package/src/mcps/researcher.server.ts +88 -177
- package/src/mcps/security-scan.server.ts +55 -104
- package/src/mcps/shared/knowledge-skill-base.ts +62 -0
- package/src/mcps/shared/prompt-security-validator.ts +199 -0
- package/src/mcps/shared/security-scanner.ts +599 -0
- package/src/mcps/state-manager.server.ts +117 -175
- package/src/opencode/codex.codex +1 -1
- package/src/opencode/commands/dependency-audit.md +3 -3
- package/src/opencode/enforcer-config.json +2 -2
- package/src/skills/registry.json +1 -1
- package/xray/agents_template.md +109 -0
- package/xray/codex.json +598 -0
- package/xray/config.json +26 -0
- package/xray/features.json +132 -0
- package/xray/integrations.json +23 -0
- package/xray/routing-mappings.json +752 -0
- package/xray/workflow_state.json +28 -0
- package/dist/integrations/hermes-agent/__pycache__/__init__.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/conftest.cpython-313-pytest-9.0.2.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/schemas.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313-pytest-9.0.2.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/tools.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/conftest.py +0 -14
- package/dist/integrations/hermes-agent/test_plugin.py +0 -1103
- package/dist/processors/implementations/refactoring-logging-processor.d.ts +0 -31
- package/dist/processors/implementations/refactoring-logging-processor.js +0 -96
- package/dist/processors/implementations/session-capture-processor.d.ts +0 -14
- package/dist/processors/implementations/session-capture-processor.js +0 -37
- package/dist/scripts/activate-kernel-pipeline.d.ts +0 -7
- package/dist/scripts/activate-kernel-pipeline.js +0 -101
- package/dist/security/index.d.ts +0 -13
- package/dist/security/index.js +0 -13
- package/dist/security/security-agent-coordinator.d.ts +0 -72
- package/dist/security/security-agent-coordinator.js +0 -204
- package/dist/security/security-auditor.d.ts +0 -56
- package/dist/security/security-auditor.js +0 -584
- package/dist/security/security-hardening-system.d.ts +0 -239
- package/dist/security/security-hardening-system.js +0 -727
- package/dist/security/security-orchestration-layer.d.ts +0 -119
- package/dist/security/security-orchestration-layer.js +0 -496
- /package/dist/{security → mcps/shared}/prompt-security-validator.d.ts +0 -0
- /package/dist/{security → mcps/shared}/prompt-security-validator.js +0 -0
- /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
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
|
|
165
|
-
frameworkLogger.log("processor-manager", "version-compliance", "
|
|
166
|
-
|
|
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
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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({
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
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("../
|
|
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", {
|