0xray 2.1.4 → 2.2.0

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 (159) hide show
  1. package/dist/CHANGELOG.md +31 -0
  2. package/dist/cli/commands/govern.d.ts +29 -0
  3. package/dist/cli/commands/govern.js +152 -0
  4. package/dist/cli/index.js +29 -216
  5. package/dist/core/framework-logger.js +30 -1
  6. package/dist/delegation/index.d.ts +1 -2
  7. package/dist/delegation/index.js +1 -2
  8. package/dist/enforcement/enforcer-tools.js +1 -1
  9. package/dist/execution/proposal-applier.d.ts +1 -9
  10. package/dist/execution/proposal-applier.js +18 -173
  11. package/dist/governance/codex-policy.service.d.ts +7 -25
  12. package/dist/governance/codex-policy.service.js +8 -26
  13. package/dist/governance/governance-core.d.ts +22 -28
  14. package/dist/governance/governance-core.js +31 -101
  15. package/dist/governance/governance-service.d.ts +1 -0
  16. package/dist/governance/governance-service.js +67 -4
  17. package/dist/governance/governance-types.d.ts +5 -2
  18. package/dist/inference/index.d.ts +3 -4
  19. package/dist/inference/inference-accumulator.js +1 -1
  20. package/dist/inference/inference-cycle.d.ts +12 -18
  21. package/dist/inference/inference-cycle.js +120 -335
  22. package/dist/integrations/base/index.d.ts +0 -1
  23. package/dist/integrations/base/index.js +0 -2
  24. package/dist/integrations/grok/hooks/pre-tool-use.js +4 -18
  25. package/dist/integrations/hermes-agent/bridge.mjs +9 -0
  26. package/dist/mcps/config/server-config-registry.js +1 -1
  27. package/dist/mcps/governance.server.js +3 -4
  28. package/dist/mcps/knowledge-skills/api-design.server.js +10 -0
  29. package/dist/mcps/knowledge-skills/architecture-patterns.server.js +10 -0
  30. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +10 -0
  31. package/dist/mcps/knowledge-skills/code-analyzer.server.js +10 -0
  32. package/dist/mcps/knowledge-skills/code-review.server.js +10 -0
  33. package/dist/mcps/knowledge-skills/content-creator.server.js +10 -0
  34. package/dist/mcps/knowledge-skills/database-design.server.js +10 -0
  35. package/dist/mcps/knowledge-skills/devops-deployment.server.js +10 -0
  36. package/dist/mcps/knowledge-skills/git-workflow.server.js +10 -0
  37. package/dist/mcps/knowledge-skills/growth-strategist.server.js +10 -0
  38. package/dist/mcps/knowledge-skills/log-monitor.server.js +10 -0
  39. package/dist/mcps/knowledge-skills/mobile-development.server.js +10 -0
  40. package/dist/mcps/knowledge-skills/multimodal-looker.server.js +10 -0
  41. package/dist/mcps/knowledge-skills/performance-optimization.server.js +10 -0
  42. package/dist/mcps/knowledge-skills/project-analysis.server.js +10 -0
  43. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +10 -0
  44. package/dist/mcps/knowledge-skills/security-audit.server.js +10 -0
  45. package/dist/mcps/knowledge-skills/seo-consultant.server.js +10 -0
  46. package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +4 -0
  47. package/dist/mcps/knowledge-skills/skill-invocation.server.js +33 -14
  48. package/dist/mcps/knowledge-skills/strategist.server.js +10 -0
  49. package/dist/mcps/knowledge-skills/tech-writer.server.js +10 -0
  50. package/dist/mcps/knowledge-skills/testing-strategy.server.js +10 -0
  51. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +10 -0
  52. package/dist/metrics/agent-metrics.d.ts +2 -1
  53. package/dist/nucleus/govern-http.d.ts +59 -0
  54. package/dist/nucleus/govern-http.js +172 -0
  55. package/dist/nucleus/index.d.ts +14 -0
  56. package/dist/nucleus/index.js +9 -0
  57. package/dist/nucleus/kernel.d.ts +51 -0
  58. package/dist/nucleus/kernel.js +62 -0
  59. package/dist/nucleus/plugin-registry.d.ts +104 -0
  60. package/dist/nucleus/plugin-registry.js +147 -0
  61. package/dist/orchestrator/orchestrator.d.ts +0 -1
  62. package/dist/orchestrator/orchestrator.js +0 -21
  63. package/dist/postprocessor/PostProcessor.d.ts +13 -1
  64. package/dist/postprocessor/PostProcessor.js +41 -1
  65. package/dist/postprocessor/autofix/AutoFixEngine.d.ts +0 -8
  66. package/dist/postprocessor/autofix/AutoFixEngine.js +0 -54
  67. package/dist/postprocessor/metamorphosis/MetamorphosisEngine.d.ts +25 -0
  68. package/dist/postprocessor/metamorphosis/MetamorphosisEngine.js +10 -0
  69. package/dist/postprocessor/metamorphosis/SelfProposalEngine.d.ts +68 -0
  70. package/dist/postprocessor/metamorphosis/SelfProposalEngine.js +371 -0
  71. package/dist/skills/orchestrator/SKILL.md +1 -1
  72. package/dist/state/index.d.ts +0 -2
  73. package/package.json +4 -3
  74. package/scripts/node/universal-version-manager.js +2 -2
  75. package/src/mcps/config/__tests__/server-config-registry.test.ts +6 -15
  76. package/src/mcps/config/server-config-registry.ts +1 -1
  77. package/src/mcps/governance.server.ts +3 -5
  78. package/src/mcps/knowledge-skills/api-design.server.ts +9 -0
  79. package/src/mcps/knowledge-skills/architecture-patterns.server.ts +9 -0
  80. package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +9 -0
  81. package/src/mcps/knowledge-skills/code-analyzer.server.ts +9 -0
  82. package/src/mcps/knowledge-skills/code-review.server.ts +9 -0
  83. package/src/mcps/knowledge-skills/content-creator.server.ts +9 -0
  84. package/src/mcps/knowledge-skills/database-design.server.ts +9 -0
  85. package/src/mcps/knowledge-skills/devops-deployment.server.ts +9 -0
  86. package/src/mcps/knowledge-skills/git-workflow.server.ts +9 -0
  87. package/src/mcps/knowledge-skills/growth-strategist.server.ts +9 -0
  88. package/src/mcps/knowledge-skills/log-monitor.server.ts +9 -0
  89. package/src/mcps/knowledge-skills/mobile-development.server.ts +9 -0
  90. package/src/mcps/knowledge-skills/multimodal-looker.server.ts +9 -0
  91. package/src/mcps/knowledge-skills/performance-optimization.server.ts +9 -0
  92. package/src/mcps/knowledge-skills/project-analysis.server.ts +9 -0
  93. package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +9 -0
  94. package/src/mcps/knowledge-skills/security-audit.server.ts +9 -0
  95. package/src/mcps/knowledge-skills/seo-consultant.server.ts +9 -0
  96. package/src/mcps/knowledge-skills/session-management.server.ts +1 -0
  97. package/src/mcps/knowledge-skills/skill-invocation.server.ts +44 -29
  98. package/src/mcps/knowledge-skills/strategist.server.ts +9 -0
  99. package/src/mcps/knowledge-skills/tech-writer.server.ts +9 -0
  100. package/src/mcps/knowledge-skills/testing-strategy.server.ts +9 -0
  101. package/src/mcps/knowledge-skills/ui-ux-design.server.ts +9 -0
  102. package/src/skills/orchestrator/SKILL.md +1 -1
  103. package/.opencode/agents/testing-best-practices.yml +0 -12
  104. package/dist/analytics/consent-manager.d.ts +0 -93
  105. package/dist/analytics/consent-manager.js +0 -258
  106. package/dist/analytics/simple-pattern-analyzer.d.ts +0 -80
  107. package/dist/analytics/simple-pattern-analyzer.js +0 -297
  108. package/dist/cli/commands/analytics-disable.d.ts +0 -9
  109. package/dist/cli/commands/analytics-disable.js +0 -72
  110. package/dist/cli/commands/analytics-enable-action.d.ts +0 -8
  111. package/dist/cli/commands/analytics-enable-action.js +0 -82
  112. package/dist/cli/commands/analytics-preview.d.ts +0 -9
  113. package/dist/cli/commands/analytics-preview.js +0 -106
  114. package/dist/cli/commands/analytics-status.d.ts +0 -9
  115. package/dist/cli/commands/analytics-status.js +0 -68
  116. package/dist/cli/server.d.ts +0 -1
  117. package/dist/cli/server.js +0 -147
  118. package/dist/core/errors.d.ts +0 -3
  119. package/dist/core/errors.js +0 -10
  120. package/dist/core/logging-config.d.ts +0 -11
  121. package/dist/core/logging-config.js +0 -43
  122. package/dist/core/trace-context.d.ts +0 -12
  123. package/dist/core/trace-context.js +0 -33
  124. package/dist/delegation/voting-coordinator.d.ts +0 -49
  125. package/dist/delegation/voting-coordinator.js +0 -375
  126. package/dist/enforcement/test-auto-healing.d.ts +0 -83
  127. package/dist/enforcement/test-auto-healing.js +0 -325
  128. package/dist/integrations/base/ExampleIntegration.d.ts +0 -47
  129. package/dist/integrations/base/ExampleIntegration.js +0 -181
  130. package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +0 -34
  131. package/dist/mcps/knowledge-skills/testing-best-practices.server.js +0 -831
  132. package/dist/mcps/orchestrator.server.d.ts +0 -10
  133. package/dist/mcps/orchestrator.server.js +0 -19
  134. package/dist/orchestrator/self-direction-activation.d.ts +0 -109
  135. package/dist/orchestrator/self-direction-activation.js +0 -245
  136. package/dist/orchestrator/universal-librarian-consultation.d.ts +0 -98
  137. package/dist/orchestrator/universal-librarian-consultation.js +0 -216
  138. package/dist/orchestrator/universal-registry-bridge.d.ts +0 -85
  139. package/dist/orchestrator/universal-registry-bridge.js +0 -247
  140. package/dist/performance/performance-budget-enforcer.d.ts +0 -158
  141. package/dist/performance/performance-budget-enforcer.js +0 -434
  142. package/dist/performance/performance-regression-tester.d.ts +0 -108
  143. package/dist/performance/performance-regression-tester.js +0 -342
  144. package/dist/skills/testing-best-practices/SKILL.md +0 -37
  145. package/dist/state/context-providers.d.ts +0 -4
  146. package/dist/state/context-providers.js +0 -1
  147. package/dist/state/state-types.d.ts +0 -5
  148. package/dist/state/state-types.js +0 -1
  149. package/dist/utils/batch-operations.d.ts +0 -25
  150. package/dist/utils/batch-operations.js +0 -292
  151. package/dist/utils/test-template-generator.d.ts +0 -25
  152. package/dist/utils/test-template-generator.js +0 -178
  153. package/dist/utils/token-manager.d.ts +0 -48
  154. package/dist/utils/token-manager.js +0 -163
  155. package/src/mcps/knowledge-skills/testing-best-practices.server.test.ts +0 -136
  156. package/src/mcps/knowledge-skills/testing-best-practices.server.ts +0 -1183
  157. package/src/mcps/orchestrator.server.ts +0 -34
  158. package/src/opencode/agents/testing-best-practices.yml +0 -12
  159. package/src/skills/testing-best-practices/SKILL.md +0 -37
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
  import * as fs from "fs";
11
12
  import * as path from "path";
12
13
 
@@ -235,6 +236,14 @@ class XrayDatabaseDesignServer extends XrayKnowledgeSkillBase {
235
236
  "migrate_schema": async (args) => this.migrateSchema(args as Record<string, unknown> | undefined),
236
237
  };
237
238
  this.setupToolHandlers();
239
+ pluginRegistry.registerToolPlugin({
240
+ name: "database-design",
241
+ callTool: async (toolName, args) => {
242
+ const handler = this.handlers[toolName];
243
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
244
+ return handler(args);
245
+ },
246
+ });
238
247
  }
239
248
 
240
249
  private async analyzeSchema(args: Record<string, unknown> | undefined) {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
 
11
12
  interface DeploymentStrategy {
12
13
  name: string;
@@ -282,6 +283,14 @@ class XrayDevOpsDeploymentServer extends XrayKnowledgeSkillBase {
282
283
  "optimize_deployment_performance": async (args) => this.optimizeDeploymentPerformance(args as unknown as DeploymentPerformanceArgs),
283
284
  };
284
285
  this.setupToolHandlers();
286
+ pluginRegistry.registerToolPlugin({
287
+ name: "devops-deployment",
288
+ callTool: async (toolName, args) => {
289
+ const handler = this.handlers[toolName];
290
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
291
+ return handler(args);
292
+ },
293
+ });
285
294
  }
286
295
 
287
296
  private async analyzeCICDPipeline(args: CICDPipelineArgs) {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
 
11
12
  interface AnalyzeGitHistoryArgs {
12
13
  projectRoot: string;
@@ -57,6 +58,14 @@ class XrayGitWorkflowServer extends XrayKnowledgeSkillBase {
57
58
  "recommend-branching-strategy": async (args) => this.recommendBranchingStrategy(args as unknown as RecommendBranchingStrategyArgs),
58
59
  };
59
60
  this.setupToolHandlers();
61
+ pluginRegistry.registerToolPlugin({
62
+ name: "git-workflow",
63
+ callTool: async (toolName, args) => {
64
+ const handler = this.handlers[toolName];
65
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
66
+ return handler(args);
67
+ },
68
+ });
60
69
  }
61
70
 
62
71
  private async analyzeGitHistory(args: AnalyzeGitHistoryArgs) {
@@ -9,6 +9,7 @@ import * as path from "path";
9
9
  import { fileURLToPath } from "url";
10
10
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
11
11
  import { frameworkLogger } from "../../core/framework-logger.js";
12
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
12
13
 
13
14
  class MarketingExpertServer extends XrayKnowledgeSkillBase {
14
15
  constructor() {
@@ -364,6 +365,14 @@ class MarketingExpertServer extends XrayKnowledgeSkillBase {
364
365
  },
365
366
  };
366
367
  this.setupToolHandlers();
368
+ pluginRegistry.registerToolPlugin({
369
+ name: "growth-strategist",
370
+ callTool: async (toolName, args) => {
371
+ const handler = this.handlers[toolName];
372
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
373
+ return handler(args);
374
+ },
375
+ });
367
376
  }
368
377
  }
369
378
 
@@ -10,6 +10,7 @@ import * as path from "path";
10
10
  import { fileURLToPath } from "url";
11
11
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
12
12
  import { frameworkLogger } from "../../core/framework-logger.js";
13
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
13
14
 
14
15
  interface LogEntry {
15
16
  timestamp: string;
@@ -291,6 +292,14 @@ class LogMonitorServer extends XrayKnowledgeSkillBase {
291
292
  },
292
293
  };
293
294
  this.setupToolHandlers();
295
+ pluginRegistry.registerToolPlugin({
296
+ name: "log-monitor",
297
+ callTool: async (toolName, args) => {
298
+ const handler = this.handlers[toolName];
299
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
300
+ return handler(args);
301
+ },
302
+ });
294
303
  }
295
304
 
296
305
  private analyzeLogs(logs: string[], options: Record<string, unknown>): LogAnalysis {
@@ -9,6 +9,7 @@ import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import * as path from "path";
10
10
  import { fileURLToPath } from "url";
11
11
  import { frameworkLogger } from "../../core/framework-logger.js";
12
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
12
13
 
13
14
  interface IOSBlueprint {
14
15
  projectName: string;
@@ -199,6 +200,14 @@ class XrayMobileDevelopmentServer extends XrayKnowledgeSkillBase {
199
200
  "app_store_metadata": async (args) => this.generateAppStoreMetadata(args as Record<string, unknown>),
200
201
  };
201
202
  this.setupToolHandlers();
203
+ pluginRegistry.registerToolPlugin({
204
+ name: "mobile-development",
205
+ callTool: async (toolName, args) => {
206
+ const handler = this.handlers[toolName];
207
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
208
+ return handler(args);
209
+ },
210
+ });
202
211
  }
203
212
 
204
213
  private async generateIOSBlueprint(args: Record<string, unknown>) {
@@ -11,6 +11,7 @@
11
11
  import * as path from "path";
12
12
  import { fileURLToPath } from "url";
13
13
  import { frameworkLogger } from "../../core/framework-logger.js";
14
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
14
15
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
15
16
 
16
17
  /* ============================================================================
@@ -299,6 +300,14 @@ class MultimodalLookerServer extends XrayKnowledgeSkillBase {
299
300
  "compare-designs": async (args) => this.handleCompareDesigns(args as Record<string, unknown>),
300
301
  };
301
302
  this.setupToolHandlers();
303
+ pluginRegistry.registerToolPlugin({
304
+ name: "multimodal-looker",
305
+ callTool: async (toolName, args) => {
306
+ const handler = this.handlers[toolName];
307
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
308
+ return handler(args);
309
+ },
310
+ });
302
311
  }
303
312
 
304
313
  /* --------------------------------------------------------------------------
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger, generateJobId } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
  import fs from "fs";
11
12
  import path from "path";
12
13
  import os from "os";
@@ -306,6 +307,14 @@ class XrayPerformanceOptimizationServer extends XrayKnowledgeSkillBase {
306
307
  "measure-core-web-vitals": async (args) => this.handleMeasureCoreWebVitals(args as unknown as MeasureCoreWebVitalsArgs),
307
308
  };
308
309
  this.setupToolHandlers();
310
+ pluginRegistry.registerToolPlugin({
311
+ name: "performance-optimization",
312
+ callTool: async (toolName, args) => {
313
+ const handler = this.handlers[toolName];
314
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
315
+ return handler(args);
316
+ },
317
+ });
309
318
  }
310
319
 
311
320
  private async handleProfileApplication(args: ProfileApplicationArgs): Promise<McpToolResponse> {
@@ -9,6 +9,7 @@ import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import * as fs from "fs";
10
10
  import * as path from "path";
11
11
  import { frameworkLogger } from "../../core/framework-logger.js";
12
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
12
13
 
13
14
  interface ProjectMetrics {
14
15
  totalFiles: number;
@@ -210,6 +211,14 @@ class ProjectAnalysisServer extends XrayKnowledgeSkillBase {
210
211
  "analyze_proposal": async (args) => this.analyzeProposal(args),
211
212
  };
212
213
  this.setupToolHandlers();
214
+ pluginRegistry.registerToolPlugin({
215
+ name: "project-analysis",
216
+ callTool: async (toolName, args) => {
217
+ const handler = this.handlers[toolName];
218
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
219
+ return handler(args);
220
+ },
221
+ });
213
222
  }
214
223
 
215
224
  private async analyzeProjectStructure(args: AnalyzeProjectStructureArgs): Promise<McpToolResponse> {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
 
11
12
  interface RefactoringOpportunity {
12
13
  type:
@@ -213,6 +214,14 @@ class XrayRefactoringStrategiesServer extends XrayKnowledgeSkillBase {
213
214
  "modernize_codebase": async (args) => this.modernizeCodebase(args as unknown as ModernizeCodebaseArgs),
214
215
  };
215
216
  this.setupToolHandlers();
217
+ pluginRegistry.registerToolPlugin({
218
+ name: "refactoring-strategies",
219
+ callTool: async (toolName, args) => {
220
+ const handler = this.handlers[toolName];
221
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
222
+ return handler(args);
223
+ },
224
+ });
216
225
  }
217
226
 
218
227
  private async analyzeTechnicalDebt(args: AnalyzeTechnicalDebtArgs) {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
  import * as fs from "fs";
11
12
  import * as path from "path";
12
13
 
@@ -191,6 +192,14 @@ class XraySecurityAuditServer extends XrayKnowledgeSkillBase {
191
192
  "analyze_proposal": async (args) => this.analyzeProposal(args as AnalyzeProposalArgs),
192
193
  };
193
194
  this.setupToolHandlers();
195
+ pluginRegistry.registerToolPlugin({
196
+ name: "security-audit",
197
+ callTool: async (toolName, args) => {
198
+ const handler = this.handlers[toolName];
199
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
200
+ return handler(args);
201
+ },
202
+ });
194
203
  }
195
204
 
196
205
  private async auditSecurity(args: AuditSecurityArgs) {
@@ -8,6 +8,7 @@
8
8
 
9
9
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
10
10
  import { frameworkLogger } from "../../core/framework-logger.js";
11
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
11
12
 
12
13
  interface SEOIssue {
13
14
  priority: "critical" | "high" | "medium" | "low";
@@ -149,6 +150,14 @@ class SEOSpecialistServer extends XrayKnowledgeSkillBase {
149
150
  "optimize-robots-txt": async (args) => this.optimizeRobotsTxt(args as ToolInputSchema),
150
151
  };
151
152
  this.setupToolHandlers();
153
+ pluginRegistry.registerToolPlugin({
154
+ name: "seo-consultant",
155
+ callTool: async (toolName, args) => {
156
+ const handler = this.handlers[toolName];
157
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
158
+ return handler(args);
159
+ },
160
+ });
152
161
  }
153
162
 
154
163
  private auditTechnicalSEO(args: ToolInputSchema): {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
 
11
12
  // In-memory session store for MCP server context
12
13
  interface SessionData {
@@ -10,6 +10,7 @@ import { fileURLToPath } from "url";
10
10
  import { randomUUID } from "crypto";
11
11
  import { mcpClientManager } from "../mcp-client.js";
12
12
  import { frameworkLogger } from "../../core/framework-logger.js";
13
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
13
14
 
14
15
  interface ListSkillsArgs {
15
16
  category?: "all" | "core" | "registry" | "knowledge";
@@ -262,6 +263,14 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
262
263
  "skill-storyteller": async (args) => this.handleSkillStoryteller(args as unknown as StorytellerArgs),
263
264
  };
264
265
  this.setupToolHandlers();
266
+ pluginRegistry.registerToolPlugin({
267
+ name: "xray/skill-invocation",
268
+ callTool: async (toolName, args) => {
269
+ const handler = this.handlers[toolName];
270
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
271
+ return handler(args);
272
+ },
273
+ });
265
274
  }
266
275
 
267
276
  private skillMetrics: Map<string, { success: number; failure: number; avgDuration: number }> = new Map();
@@ -323,7 +332,7 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
323
332
  "bug-triage-specialist", "log-monitor",
324
333
  "mobile-development", "git-workflow", "session-management",
325
334
  "code-analyzer", "refactoring-strategies", "project-analysis",
326
- "testing-best-practices", "database-design", "devops-deployment",
335
+ "database-design", "devops-deployment",
327
336
  "api-design", "ui-ux-design", "database-engineer",
328
337
  ];
329
338
 
@@ -351,6 +360,16 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
351
360
  return { content: [{ type: "text", text: lines.join("\n") }] };
352
361
  }
353
362
 
363
+ /**
364
+ * Dispatch a skill tool call: prefer in-process pluginRegistry, fall back to external MCP process.
365
+ */
366
+ private async callSkillTool(skillName: string, toolName: string, args: Record<string, unknown>): Promise<unknown> {
367
+ if (pluginRegistry.hasToolPlugin(skillName)) {
368
+ return pluginRegistry.callSkillTool(skillName, toolName, args);
369
+ }
370
+ return mcpClientManager.callServerTool(skillName, toolName, args);
371
+ }
372
+
354
373
  private async handleInvokeSkill(args: InvokeSkillArgs) {
355
374
  const { skillName, toolName, args: toolArgs = {} } = args;
356
375
 
@@ -384,7 +403,7 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
384
403
  "mobile-development", "seo-consultant",
385
404
  "git-workflow", "content-creator", "ui-ux-design",
386
405
  "multimodal-looker", "refactoring-strategies",
387
- "project-analysis", "testing-best-practices",
406
+ "project-analysis",
388
407
  "architecture-patterns",
389
408
  ];
390
409
 
@@ -404,11 +423,7 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
404
423
  // Track skill usage for adaptive learning
405
424
  const skillStartTime = Date.now();
406
425
 
407
- const result = await mcpClientManager.callServerTool(
408
- resolvedSkill,
409
- toolName,
410
- toolArgs,
411
- );
426
+ const result = await this.callSkillTool(resolvedSkill, toolName, toolArgs);
412
427
 
413
428
  // Record outcome for adaptive learning (success = no error)
414
429
  const duration = Date.now() - skillStartTime;
@@ -443,10 +458,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
443
458
  }
444
459
 
445
460
  private async handleSkillCodeReview(args: CodeReviewArgs) {
446
- const result = await mcpClientManager.callServerTool(
461
+ const result = await this.callSkillTool(
447
462
  "code-review",
448
463
  "analyze_code_quality",
449
- args,
464
+ args as unknown as Record<string, unknown>,
450
465
  );
451
466
 
452
467
  return {
@@ -464,10 +479,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
464
479
  }
465
480
 
466
481
  private async handleSkillSecurityAudit(args: SecurityAuditArgs) {
467
- const result = await mcpClientManager.callServerTool(
482
+ const result = await this.callSkillTool(
468
483
  "security-audit",
469
484
  "scan_vulnerabilities",
470
- args,
485
+ args as unknown as Record<string, unknown>,
471
486
  );
472
487
 
473
488
  return {
@@ -485,10 +500,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
485
500
  }
486
501
 
487
502
  private async handleSkillPerformanceOptimization(args: PerformanceOptimizationArgs) {
488
- const result = await mcpClientManager.callServerTool(
503
+ const result = await this.callSkillTool(
489
504
  "performance-optimization",
490
505
  "analyze_performance",
491
- args,
506
+ args as unknown as Record<string, unknown>,
492
507
  );
493
508
 
494
509
  return {
@@ -506,10 +521,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
506
521
  }
507
522
 
508
523
  private async handleSkillTestingStrategy(args: TestingStrategyArgs) {
509
- const result = await mcpClientManager.callServerTool(
524
+ const result = await this.callSkillTool(
510
525
  "testing-strategy",
511
526
  "analyze_test_coverage",
512
- args,
527
+ args as unknown as Record<string, unknown>,
513
528
  );
514
529
 
515
530
  return {
@@ -527,10 +542,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
527
542
  }
528
543
 
529
544
  private async handleSkillProjectAnalysis(args: ProjectAnalysisArgs) {
530
- const result = await mcpClientManager.callServerTool(
545
+ const result = await this.callSkillTool(
531
546
  "researcher",
532
547
  "analyze-project-health",
533
- args,
548
+ args as unknown as Record<string, unknown>,
534
549
  );
535
550
 
536
551
  return {
@@ -548,10 +563,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
548
563
  }
549
564
 
550
565
  private async handleSkillDatabaseDesign(args: DatabaseDesignArgs) {
551
- const result = await mcpClientManager.callServerTool(
566
+ const result = await this.callSkillTool(
552
567
  "database-design",
553
568
  "schema_analysis",
554
- args,
569
+ args as unknown as Record<string, unknown>,
555
570
  );
556
571
 
557
572
  return {
@@ -569,10 +584,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
569
584
  }
570
585
 
571
586
  private async handleSkillDevopsDeployment(args: DevopsDeploymentArgs) {
572
- const result = await mcpClientManager.callServerTool(
587
+ const result = await this.callSkillTool(
573
588
  "devops-deployment",
574
589
  "pipeline_generation",
575
- args,
590
+ args as unknown as Record<string, unknown>,
576
591
  );
577
592
 
578
593
  return {
@@ -590,10 +605,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
590
605
  }
591
606
 
592
607
  private async handleSkillApiDesign(args: ApiDesignArgs) {
593
- const result = await mcpClientManager.callServerTool(
608
+ const result = await this.callSkillTool(
594
609
  "api-design",
595
610
  "endpoint_design",
596
- args,
611
+ args as unknown as Record<string, unknown>,
597
612
  );
598
613
 
599
614
  return {
@@ -611,10 +626,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
611
626
  }
612
627
 
613
628
  private async handleSkillUiUxDesign(args: UiUxDesignArgs) {
614
- const result = await mcpClientManager.callServerTool(
629
+ const result = await this.callSkillTool(
615
630
  "ui-ux-design",
616
631
  "design_component",
617
- args,
632
+ args as unknown as Record<string, unknown>,
618
633
  );
619
634
 
620
635
  return {
@@ -632,10 +647,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
632
647
  }
633
648
 
634
649
  private async handleSkillDocumentationGeneration(args: DocumentationGenerationArgs) {
635
- const result = await mcpClientManager.callServerTool(
650
+ const result = await this.callSkillTool(
636
651
  "documentation-generation",
637
652
  "generate_documentation",
638
- args,
653
+ args as unknown as Record<string, unknown>,
639
654
  );
640
655
 
641
656
  return {
@@ -654,10 +669,10 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
654
669
 
655
670
  private async handleSkillStoryteller(args: StorytellerArgs) {
656
671
  const { storyType, title, context, framework } = args;
657
- const result = await mcpClientManager.callServerTool(
672
+ const result = await this.callSkillTool(
658
673
  "storyteller",
659
674
  `write_${storyType}`,
660
- { title, context, framework },
675
+ { title, context, framework } as Record<string, unknown>,
661
676
  );
662
677
 
663
678
  return {
@@ -1,5 +1,6 @@
1
1
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
2
2
  import { frameworkLogger } from "../../core/framework-logger.js";
3
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
3
4
  import * as path from "path";
4
5
  import { fileURLToPath } from "url";
5
6
 
@@ -92,6 +93,14 @@ class StrategistServer extends XrayKnowledgeSkillBase {
92
93
  architecture_review: async (args) => this.handleArchitectureReview(args as unknown as ArchitectureReviewArgs),
93
94
  };
94
95
  this.setupToolHandlers();
96
+ pluginRegistry.registerToolPlugin({
97
+ name: "xray/strategist",
98
+ callTool: async (toolName, args) => {
99
+ const handler = this.handlers[toolName];
100
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
101
+ return handler(args);
102
+ },
103
+ });
95
104
  }
96
105
 
97
106
  private async handleStrategicGuidance(args: StrategicGuidanceArgs) {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
  import * as fs from "fs";
11
12
  import * as path from "path";
12
13
 
@@ -221,6 +222,14 @@ class XrayDocumentationGenerationServer extends XrayKnowledgeSkillBase {
221
222
  "generate_readme": async (args) => this.generateReadme(args as unknown as GenerateReadmeArgs),
222
223
  };
223
224
  this.setupToolHandlers();
225
+ pluginRegistry.registerToolPlugin({
226
+ name: "documentation-generation",
227
+ callTool: async (toolName, args) => {
228
+ const handler = this.handlers[toolName];
229
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
230
+ return handler(args);
231
+ },
232
+ });
224
233
  }
225
234
 
226
235
  private async analyzeDocumentation(args: AnalyzeDocumentationArgs) {
@@ -9,6 +9,7 @@ import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import * as fs from "fs";
10
10
  import * as path from "path";
11
11
  import { frameworkLogger } from "../../core/framework-logger.js";
12
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
12
13
  import {
13
14
  detectProjectLanguage,
14
15
  LANGUAGE_CONFIGS,
@@ -206,6 +207,14 @@ class XrayTestingStrategyServer extends XrayKnowledgeSkillBase {
206
207
  "generate-test-file": async (args) => this.generateTestFile(args as unknown as GenerateTestFileArgs),
207
208
  };
208
209
  this.setupToolHandlers();
210
+ pluginRegistry.registerToolPlugin({
211
+ name: "testing-strategy",
212
+ callTool: async (toolName, args) => {
213
+ const handler = this.handlers[toolName];
214
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
215
+ return handler(args);
216
+ },
217
+ });
209
218
  }
210
219
 
211
220
  private async analyzeTestCoverage(args: AnalyzeTestCoverageArgs) {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
9
9
  import { frameworkLogger } from "../../core/framework-logger.js";
10
+ import { pluginRegistry } from "../../nucleus/plugin-registry.js";
10
11
 
11
12
  interface UIDesignAnalysis {
12
13
  component: string;
@@ -262,6 +263,14 @@ class XrayUIUXDesignServer extends XrayKnowledgeSkillBase {
262
263
  "analyze_visual_hierarchy": async (args) => this.analyzeVisualHierarchy(args as unknown as AnalyzeVisualHierarchyArgs),
263
264
  };
264
265
  this.setupToolHandlers();
266
+ pluginRegistry.registerToolPlugin({
267
+ name: "ui-ux-design",
268
+ callTool: async (toolName, args) => {
269
+ const handler = this.handlers[toolName];
270
+ if (!handler) throw new Error(`Unknown tool: ${toolName}`);
271
+ return handler(args);
272
+ },
273
+ });
265
274
  }
266
275
 
267
276
  private async analyzeUIComponent(args: AnalyzeUIComponentArgs): Promise<ToolResponse> {
@@ -15,7 +15,7 @@ dependencies: []
15
15
  mcp:
16
16
  orchestrator:
17
17
  command: node
18
- args: [node_modules/0xray/dist/mcps/orchestrator.server.js]
18
+ args: [node_modules/0xray/dist/mcps/orchestrator/server.js]
19
19
  ---
20
20
 
21
21
  # Orchestrator Skill
@@ -1,12 +0,0 @@
1
- name: testing-best-practices
2
- skill: testing-best-practices
3
- description: "testing best practices specialist"
4
- version: "1.0.0"
5
- mode: subagent
6
-
7
- capabilities:
8
- - domain_specialization
9
-
10
- quality:
11
- test_coverage: recommended
12
- type_safety: strict