0xray 2.1.4 → 2.2.1

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 (186) 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/.opencode/init.sh +1 -1
  5. package/AGENTS.md +6 -6
  6. package/README.md +4 -4
  7. package/dist/AGENTS.md +6 -6
  8. package/dist/CHANGELOG.md +39 -0
  9. package/dist/README.md +4 -4
  10. package/dist/agents/code-reviewer.js +1 -1
  11. package/dist/analytics/routing-refiner.js +1 -1
  12. package/dist/cli/commands/govern.d.ts +29 -0
  13. package/dist/cli/commands/govern.js +152 -0
  14. package/dist/cli/index.js +29 -216
  15. package/dist/core/boot-orchestrator.js +2 -2
  16. package/dist/core/features-config.js +1 -1
  17. package/dist/core/framework-logger.d.ts +1 -0
  18. package/dist/core/framework-logger.js +57 -2
  19. package/dist/delegation/index.d.ts +1 -2
  20. package/dist/delegation/index.js +1 -2
  21. package/dist/enforcement/enforcer-tools.js +1 -1
  22. package/dist/execution/proposal-applier.d.ts +1 -9
  23. package/dist/execution/proposal-applier.js +18 -173
  24. package/dist/governance/codex-policy.service.d.ts +7 -25
  25. package/dist/governance/codex-policy.service.js +8 -26
  26. package/dist/governance/governance-core.d.ts +22 -28
  27. package/dist/governance/governance-core.js +31 -101
  28. package/dist/governance/governance-service.d.ts +1 -0
  29. package/dist/governance/governance-service.js +67 -4
  30. package/dist/governance/governance-types.d.ts +5 -2
  31. package/dist/inference/index.d.ts +3 -4
  32. package/dist/inference/inference-accumulator.js +1 -1
  33. package/dist/inference/inference-cycle.d.ts +12 -18
  34. package/dist/inference/inference-cycle.js +120 -335
  35. package/dist/integrations/base/index.d.ts +0 -1
  36. package/dist/integrations/base/index.js +0 -2
  37. package/dist/integrations/grok/hooks/pre-tool-use.js +4 -18
  38. package/dist/integrations/hermes-agent/bridge.mjs +9 -0
  39. package/dist/mcps/config/server-config-registry.js +1 -1
  40. package/dist/mcps/governance.server.js +4 -5
  41. package/dist/mcps/knowledge-skills/api-design.server.js +10 -0
  42. package/dist/mcps/knowledge-skills/architecture-patterns.server.js +10 -0
  43. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +10 -0
  44. package/dist/mcps/knowledge-skills/code-analyzer.server.js +10 -0
  45. package/dist/mcps/knowledge-skills/code-review.server.js +10 -0
  46. package/dist/mcps/knowledge-skills/content-creator.server.js +10 -0
  47. package/dist/mcps/knowledge-skills/database-design.server.js +10 -0
  48. package/dist/mcps/knowledge-skills/devops-deployment.server.js +10 -0
  49. package/dist/mcps/knowledge-skills/git-workflow.server.js +10 -0
  50. package/dist/mcps/knowledge-skills/growth-strategist.server.js +10 -0
  51. package/dist/mcps/knowledge-skills/log-monitor.server.js +10 -0
  52. package/dist/mcps/knowledge-skills/mobile-development.server.js +10 -0
  53. package/dist/mcps/knowledge-skills/multimodal-looker.server.js +10 -0
  54. package/dist/mcps/knowledge-skills/performance-optimization.server.js +10 -0
  55. package/dist/mcps/knowledge-skills/project-analysis.server.js +10 -0
  56. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +10 -0
  57. package/dist/mcps/knowledge-skills/security-audit.server.js +10 -0
  58. package/dist/mcps/knowledge-skills/seo-consultant.server.js +10 -0
  59. package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +4 -0
  60. package/dist/mcps/knowledge-skills/skill-invocation.server.js +33 -14
  61. package/dist/mcps/knowledge-skills/strategist.server.js +10 -0
  62. package/dist/mcps/knowledge-skills/tech-writer.server.js +11 -1
  63. package/dist/mcps/knowledge-skills/testing-strategy.server.js +10 -0
  64. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +10 -0
  65. package/dist/mcps/registry.json +1 -1
  66. package/dist/mcps/simulation/server-simulations.js +1 -1
  67. package/dist/metrics/agent-metrics.d.ts +2 -1
  68. package/dist/nucleus/govern-http.d.ts +59 -0
  69. package/dist/nucleus/govern-http.js +172 -0
  70. package/dist/nucleus/index.d.ts +14 -0
  71. package/dist/nucleus/index.js +9 -0
  72. package/dist/nucleus/kernel.d.ts +51 -0
  73. package/dist/nucleus/kernel.js +62 -0
  74. package/dist/nucleus/plugin-registry.d.ts +104 -0
  75. package/dist/nucleus/plugin-registry.js +147 -0
  76. package/dist/orchestrator/orchestrator.d.ts +0 -1
  77. package/dist/orchestrator/orchestrator.js +0 -21
  78. package/dist/postprocessor/PostProcessor.d.ts +13 -1
  79. package/dist/postprocessor/PostProcessor.js +41 -1
  80. package/dist/postprocessor/autofix/AutoFixEngine.d.ts +0 -8
  81. package/dist/postprocessor/autofix/AutoFixEngine.js +0 -54
  82. package/dist/postprocessor/metamorphosis/MetamorphosisEngine.d.ts +25 -0
  83. package/dist/postprocessor/metamorphosis/MetamorphosisEngine.js +10 -0
  84. package/dist/postprocessor/metamorphosis/SelfProposalEngine.d.ts +68 -0
  85. package/dist/postprocessor/metamorphosis/SelfProposalEngine.js +371 -0
  86. package/dist/skills/orchestrator/SKILL.md +1 -1
  87. package/dist/skills/registry.json +1 -1
  88. package/dist/state/index.d.ts +0 -2
  89. package/package.json +4 -3
  90. package/scripts/node/universal-version-manager.js +9 -9
  91. package/scripts/node/validate-mcp-connectivity.js +1 -1
  92. package/src/mcps/config/__tests__/server-config-registry.test.ts +6 -15
  93. package/src/mcps/config/server-config-registry.ts +1 -1
  94. package/src/mcps/governance.server.ts +4 -6
  95. package/src/mcps/knowledge-skills/api-design.server.ts +9 -0
  96. package/src/mcps/knowledge-skills/architecture-patterns.server.ts +9 -0
  97. package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +9 -0
  98. package/src/mcps/knowledge-skills/code-analyzer.server.ts +9 -0
  99. package/src/mcps/knowledge-skills/code-review.server.ts +9 -0
  100. package/src/mcps/knowledge-skills/content-creator.server.ts +9 -0
  101. package/src/mcps/knowledge-skills/database-design.server.ts +9 -0
  102. package/src/mcps/knowledge-skills/devops-deployment.server.ts +9 -0
  103. package/src/mcps/knowledge-skills/git-workflow.server.ts +9 -0
  104. package/src/mcps/knowledge-skills/growth-strategist.server.ts +9 -0
  105. package/src/mcps/knowledge-skills/log-monitor.server.ts +9 -0
  106. package/src/mcps/knowledge-skills/mobile-development.server.ts +9 -0
  107. package/src/mcps/knowledge-skills/multimodal-looker.server.ts +9 -0
  108. package/src/mcps/knowledge-skills/performance-optimization.server.ts +9 -0
  109. package/src/mcps/knowledge-skills/project-analysis.server.ts +9 -0
  110. package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +9 -0
  111. package/src/mcps/knowledge-skills/security-audit.server.ts +9 -0
  112. package/src/mcps/knowledge-skills/seo-consultant.server.ts +9 -0
  113. package/src/mcps/knowledge-skills/session-management.server.ts +1 -0
  114. package/src/mcps/knowledge-skills/skill-invocation.server.ts +44 -29
  115. package/src/mcps/knowledge-skills/strategist.server.ts +9 -0
  116. package/src/mcps/knowledge-skills/tech-writer.server.ts +10 -1
  117. package/src/mcps/knowledge-skills/testing-strategy.server.ts +9 -0
  118. package/src/mcps/knowledge-skills/ui-ux-design.server.ts +9 -0
  119. package/src/mcps/registry.json +1 -1
  120. package/src/mcps/simulation/server-simulations.ts +1 -1
  121. package/src/opencode/codex.codex +1 -1
  122. package/src/opencode/commands/dependency-audit.md +3 -3
  123. package/src/opencode/enforcer-config.json +2 -2
  124. package/src/skills/orchestrator/SKILL.md +1 -1
  125. package/src/skills/registry.json +1 -1
  126. package/xray/codex.json +1 -1
  127. package/xray/config.json +1 -1
  128. package/xray/features.json +1 -1
  129. package/xray/integrations.json +3 -3
  130. package/.opencode/agents/testing-best-practices.yml +0 -12
  131. package/dist/analytics/consent-manager.d.ts +0 -93
  132. package/dist/analytics/consent-manager.js +0 -258
  133. package/dist/analytics/simple-pattern-analyzer.d.ts +0 -80
  134. package/dist/analytics/simple-pattern-analyzer.js +0 -297
  135. package/dist/cli/commands/analytics-disable.d.ts +0 -9
  136. package/dist/cli/commands/analytics-disable.js +0 -72
  137. package/dist/cli/commands/analytics-enable-action.d.ts +0 -8
  138. package/dist/cli/commands/analytics-enable-action.js +0 -82
  139. package/dist/cli/commands/analytics-preview.d.ts +0 -9
  140. package/dist/cli/commands/analytics-preview.js +0 -106
  141. package/dist/cli/commands/analytics-status.d.ts +0 -9
  142. package/dist/cli/commands/analytics-status.js +0 -68
  143. package/dist/cli/server.d.ts +0 -1
  144. package/dist/cli/server.js +0 -147
  145. package/dist/core/errors.d.ts +0 -3
  146. package/dist/core/errors.js +0 -10
  147. package/dist/core/logging-config.d.ts +0 -11
  148. package/dist/core/logging-config.js +0 -43
  149. package/dist/core/trace-context.d.ts +0 -12
  150. package/dist/core/trace-context.js +0 -33
  151. package/dist/delegation/voting-coordinator.d.ts +0 -49
  152. package/dist/delegation/voting-coordinator.js +0 -375
  153. package/dist/enforcement/test-auto-healing.d.ts +0 -83
  154. package/dist/enforcement/test-auto-healing.js +0 -325
  155. package/dist/integrations/base/ExampleIntegration.d.ts +0 -47
  156. package/dist/integrations/base/ExampleIntegration.js +0 -181
  157. package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +0 -34
  158. package/dist/mcps/knowledge-skills/testing-best-practices.server.js +0 -831
  159. package/dist/mcps/orchestrator.server.d.ts +0 -10
  160. package/dist/mcps/orchestrator.server.js +0 -19
  161. package/dist/orchestrator/self-direction-activation.d.ts +0 -109
  162. package/dist/orchestrator/self-direction-activation.js +0 -245
  163. package/dist/orchestrator/universal-librarian-consultation.d.ts +0 -98
  164. package/dist/orchestrator/universal-librarian-consultation.js +0 -216
  165. package/dist/orchestrator/universal-registry-bridge.d.ts +0 -85
  166. package/dist/orchestrator/universal-registry-bridge.js +0 -247
  167. package/dist/performance/performance-budget-enforcer.d.ts +0 -158
  168. package/dist/performance/performance-budget-enforcer.js +0 -434
  169. package/dist/performance/performance-regression-tester.d.ts +0 -108
  170. package/dist/performance/performance-regression-tester.js +0 -342
  171. package/dist/skills/testing-best-practices/SKILL.md +0 -37
  172. package/dist/state/context-providers.d.ts +0 -4
  173. package/dist/state/context-providers.js +0 -1
  174. package/dist/state/state-types.d.ts +0 -5
  175. package/dist/state/state-types.js +0 -1
  176. package/dist/utils/batch-operations.d.ts +0 -25
  177. package/dist/utils/batch-operations.js +0 -292
  178. package/dist/utils/test-template-generator.d.ts +0 -25
  179. package/dist/utils/test-template-generator.js +0 -178
  180. package/dist/utils/token-manager.d.ts +0 -48
  181. package/dist/utils/token-manager.js +0 -163
  182. package/src/mcps/knowledge-skills/testing-best-practices.server.test.ts +0 -136
  183. package/src/mcps/knowledge-skills/testing-best-practices.server.ts +0 -1183
  184. package/src/mcps/orchestrator.server.ts +0 -34
  185. package/src/opencode/agents/testing-best-practices.yml +0 -12
  186. package/src/skills/testing-best-practices/SKILL.md +0 -37
@@ -1,342 +0,0 @@
1
- /**
2
- * Performance Regression Testing
3
- *
4
- * Automated testing system that detects performance regressions and
5
- * enforces performance budget compliance in CI/CD pipelines.
6
- *
7
- * @version 1.0.0
8
- * @since 2026-01-08
9
- */
10
- import { performance } from "perf_hooks";
11
- import * as fs from "fs";
12
- import { frameworkLogger } from "../core/framework-logger.js";
13
- import { PerformanceBudgetEnforcer, PERFORMANCE_BUDGET, } from "./performance-budget-enforcer.js";
14
- /**
15
- * Performance regression testing system
16
- */
17
- export class PerformanceRegressionTester {
18
- baselines = new Map();
19
- results = [];
20
- budgetEnforcer;
21
- constructor(budgetEnforcer) {
22
- this.budgetEnforcer = budgetEnforcer || new PerformanceBudgetEnforcer();
23
- }
24
- /**
25
- * Load performance baselines from file
26
- */
27
- loadBaselines(baselineFile) {
28
- try {
29
- if (fs.existsSync(baselineFile)) {
30
- const data = fs.readFileSync(baselineFile, "utf8");
31
- const baselines = JSON.parse(data);
32
- this.baselines = new Map(Object.entries(baselines));
33
- }
34
- else {
35
- // No existing baselines found, will use defaults
36
- }
37
- }
38
- catch (error) {
39
- frameworkLogger.log("performance-regression-tester", "baseline-load-failed", "error", { file: baselineFile, error });
40
- }
41
- }
42
- /**
43
- * Save performance baselines to file
44
- */
45
- saveBaselines(baselineFile) {
46
- try {
47
- const baselines = Object.fromEntries(this.baselines);
48
- fs.writeFileSync(baselineFile, JSON.stringify(baselines, null, 2));
49
- }
50
- catch (error) {
51
- frameworkLogger.log("performance-regression-tester", "baseline-save-failed", "error", { file: baselineFile, error });
52
- }
53
- }
54
- /**
55
- * Run a single performance regression test
56
- */
57
- async runRegressionTest(test) {
58
- const startTime = performance.now();
59
- try {
60
- // Set timeout for the test
61
- const timeoutPromise = new Promise((_, reject) => {
62
- setTimeout(() => reject(new Error(`Test timeout after ${test.timeout}ms`)), test.timeout);
63
- });
64
- const testPromise = Promise.resolve(test.testFunction());
65
- await Promise.race([testPromise, timeoutPromise]);
66
- const duration = performance.now() - startTime;
67
- const baseline = this.baselines.get(test.name);
68
- let deviation = 0;
69
- let status = "pass";
70
- if (baseline) {
71
- deviation =
72
- ((duration - baseline.averageDuration) / baseline.averageDuration) *
73
- 100;
74
- if (Math.abs(deviation) > test.tolerance) {
75
- if (Math.abs(deviation) > test.tolerance * 2) {
76
- status = "fail";
77
- }
78
- else {
79
- status = "warning";
80
- }
81
- }
82
- }
83
- else {
84
- // No baseline, create one
85
- deviation = 0;
86
- status = "pass";
87
- }
88
- const expectedDuration = baseline
89
- ? baseline.averageDuration
90
- : test.expectedDuration || duration;
91
- const result = {
92
- testName: test.name,
93
- duration,
94
- expectedDuration,
95
- deviation,
96
- status,
97
- timestamp: Date.now(),
98
- };
99
- this.results.push(result);
100
- return result;
101
- }
102
- catch (error) {
103
- const duration = performance.now() - startTime;
104
- const result = {
105
- testName: test.name,
106
- duration,
107
- deviation: 0,
108
- status: "fail",
109
- error: error instanceof Error ? error.message : String(error),
110
- timestamp: Date.now(),
111
- };
112
- this.results.push(result);
113
- return result;
114
- }
115
- }
116
- /**
117
- * Run a complete regression test suite
118
- */
119
- async runTestSuite(suite) {
120
- // Load baselines
121
- this.loadBaselines(suite.baselineFile);
122
- const suiteStartTime = performance.now();
123
- const results = [];
124
- // Run all tests
125
- for (const test of suite.tests) {
126
- const result = await this.runRegressionTest(test);
127
- results.push(result);
128
- const statusIcon = result.status === "pass"
129
- ? "✅"
130
- : result.status === "warning"
131
- ? "⚠️"
132
- : "❌";
133
- const durationStr = result.duration.toFixed(2);
134
- const deviationStr = result.deviation.toFixed(2);
135
- const expectedStr = result.expectedDuration
136
- ? result.expectedDuration.toFixed(2)
137
- : "N/A";
138
- if (result.error) {
139
- frameworkLogger.log("performance-regression-tester", "test-failed", "error", { testName: result.testName, error: result.error });
140
- }
141
- }
142
- // Update baselines with new results
143
- this.updateBaselines(results);
144
- // Generate performance budget report
145
- let budgetReport;
146
- try {
147
- budgetReport = await this.budgetEnforcer.generatePerformanceReport();
148
- }
149
- catch (error) {
150
- frameworkLogger.log("performance-regression-tester", "budget-report-failed", "error", { error });
151
- }
152
- const suiteDuration = performance.now() - suiteStartTime;
153
- const summary = this.generateSummary(results, suiteDuration);
154
- // Display summary
155
- // Test failure count - kept as console.log for CI visibility
156
- if (budgetReport) {
157
- if (budgetReport.violations.length > 0) {
158
- budgetReport.violations.forEach((v) => { });
159
- }
160
- }
161
- // Save updated baselines
162
- this.saveBaselines(suite.baselineFile);
163
- // Check if suite should fail
164
- const shouldFail = suite.failOnRegression &&
165
- (summary.failed > 0 ||
166
- (budgetReport && budgetReport.overallStatus === "fail"));
167
- if (shouldFail) {
168
- throw new Error("Performance regression test suite failed");
169
- }
170
- else {
171
- frameworkLogger.log("performance-regression-tester", "suite-passed", "info", { message: "Performance regression test suite passed" });
172
- }
173
- const result = {
174
- results,
175
- summary,
176
- success: !shouldFail,
177
- };
178
- if (budgetReport) {
179
- result.budgetReport = budgetReport;
180
- }
181
- return result;
182
- }
183
- /**
184
- * Update baselines with new test results
185
- */
186
- updateBaselines(results) {
187
- for (const result of results) {
188
- if (result.status === "pass" || result.status === "warning") {
189
- const existing = this.baselines.get(result.testName);
190
- if (existing) {
191
- // Update rolling average
192
- const newCount = existing.sampleCount + 1;
193
- const newAverage = (existing.averageDuration * existing.sampleCount +
194
- result.duration) /
195
- newCount;
196
- // Update standard deviation (simplified)
197
- const variance = Math.pow(result.duration - existing.averageDuration, 2);
198
- const newStdDev = Math.sqrt((existing.standardDeviation *
199
- existing.standardDeviation *
200
- existing.sampleCount +
201
- variance) /
202
- newCount);
203
- this.baselines.set(result.testName, {
204
- ...existing,
205
- averageDuration: newAverage,
206
- standardDeviation: newStdDev,
207
- sampleCount: newCount,
208
- lastUpdated: Date.now(),
209
- });
210
- }
211
- else {
212
- // Create new baseline
213
- this.baselines.set(result.testName, {
214
- testName: result.testName,
215
- averageDuration: result.duration,
216
- standardDeviation: 0,
217
- sampleCount: 1,
218
- lastUpdated: Date.now(),
219
- tolerance: 10, // Default 10% tolerance
220
- });
221
- }
222
- }
223
- }
224
- }
225
- /**
226
- * Generate test suite summary
227
- */
228
- generateSummary(results, suiteDuration) {
229
- const passed = results.filter((r) => r.status === "pass").length;
230
- const warnings = results.filter((r) => r.status === "warning").length;
231
- const failed = results.filter((r) => r.status === "fail").length;
232
- const deviations = results.map((r) => Math.abs(r.deviation));
233
- const averageDeviation = deviations.length > 0
234
- ? deviations.reduce((a, b) => a + b, 0) / deviations.length
235
- : 0;
236
- const maxDeviation = deviations.length > 0 ? Math.max(...deviations) : 0;
237
- return {
238
- totalTests: results.length,
239
- passed,
240
- warnings,
241
- failed,
242
- averageDeviation,
243
- maxDeviation,
244
- duration: suiteDuration,
245
- };
246
- }
247
- /**
248
- * Create default performance regression test suite
249
- */
250
- createDefaultTestSuite() {
251
- const tests = [
252
- {
253
- name: "bundle-size-analysis",
254
- description: "Analyze bundle size against performance budget",
255
- testFunction: async () => {
256
- await this.budgetEnforcer.analyzeBundleSize();
257
- },
258
- timeout: 10000,
259
- tolerance: 5,
260
- },
261
- {
262
- name: "module-import-performance",
263
- description: "Measure core module import performance",
264
- testFunction: async () => {
265
- const start = performance.now();
266
- await import("../core/index");
267
- const duration = performance.now() - start;
268
- if (duration > PERFORMANCE_BUDGET.runtime.startupTime) {
269
- throw new Error(`Import time ${duration.toFixed(2)}ms exceeds budget of ${PERFORMANCE_BUDGET.runtime.startupTime}ms`);
270
- }
271
- },
272
- timeout: 5000,
273
- tolerance: 10,
274
- },
275
- {
276
- name: "memory-usage-check",
277
- description: "Verify memory usage stays within budget",
278
- testFunction: () => {
279
- const memUsage = process.memoryUsage();
280
- if (memUsage.heapUsed > PERFORMANCE_BUDGET.runtime.memoryUsage) {
281
- throw new Error(`Heap usage ${(memUsage.heapUsed / 1024 / 1024).toFixed(2)}MB exceeds budget of ${(PERFORMANCE_BUDGET.runtime.memoryUsage / 1024 / 1024).toFixed(2)}MB`);
282
- }
283
- },
284
- timeout: 1000,
285
- tolerance: 5,
286
- },
287
- {
288
- name: "test-execution-performance",
289
- description: "Measure simple test execution time",
290
- testFunction: async () => {
291
- const start = performance.now();
292
- // Simple test operation instead of running npm test
293
- const testArray = Array.from({ length: 1000 }, (_, i) => i * i);
294
- const result = testArray.reduce((sum, val) => sum + val, 0);
295
- if (result < 0)
296
- throw new Error("Unexpected result"); // Never happens
297
- const duration = performance.now() - start;
298
- // Just ensure the operation completes in reasonable time
299
- if (duration > 100) {
300
- throw new Error(`Test operation ${duration.toFixed(2)}ms too slow`);
301
- }
302
- },
303
- timeout: 5000,
304
- tolerance: 20,
305
- },
306
- ];
307
- return {
308
- name: "0xRay Performance Regression Suite",
309
- description: "Comprehensive performance regression tests for 0xRay Framework",
310
- tests,
311
- baselineFile: "./performance-baselines.json",
312
- failOnRegression: true,
313
- warningThreshold: 10,
314
- failureThreshold: 20,
315
- };
316
- }
317
- /**
318
- * Export test results for analysis
319
- */
320
- exportResults() {
321
- const summary = {
322
- totalTests: this.results.length,
323
- passRate: this.results.length > 0
324
- ? (this.results.filter((r) => r.status === "pass").length /
325
- this.results.length) *
326
- 100
327
- : 0,
328
- averageDeviation: this.results.length > 0
329
- ? this.results.reduce((sum, r) => sum + Math.abs(r.deviation), 0) /
330
- this.results.length
331
- : 0,
332
- regressionDetected: this.results.some((r) => r.status === "fail"),
333
- };
334
- return {
335
- results: this.results,
336
- baselines: Object.fromEntries(this.baselines),
337
- summary,
338
- };
339
- }
340
- }
341
- // Export singleton instance
342
- export const performanceRegressionTester = new PerformanceRegressionTester();
@@ -1,37 +0,0 @@
1
- ---
2
- source: framework
3
- name: testing-best-practices
4
- description: Testing best practices and quality assurance
5
- author: StrRay Framework
6
- version: 1.0.0
7
- schema_version: "1.0"
8
- tags: [testing, testing, best, practices]
9
- capabilities:
10
- - write_unit_tests
11
- - write_integration_tests
12
- - analyze_coverage
13
- dependencies: []
14
-
15
- mcp:
16
- testing-best-practices:
17
- command: node
18
- args: [node_modules/0xray/dist/mcps/knowledge-skills/testing-best-practices.server.js]
19
- ---
20
-
21
- # Testing Best Practices Skill
22
-
23
- Testing best practices and quality assurance.
24
-
25
- ## Tools Available
26
-
27
- - **testing_practices**: Testing practices
28
- - **quality_assurance**: Quality assurance
29
- - **best_practices**: Best practices
30
-
31
- ## Usage
32
-
33
- This skill provides testing capabilities for testing best practices functionality.
34
-
35
- ## Integration
36
-
37
- Activated when testing capabilities are requested through the skills system.
@@ -1,4 +0,0 @@
1
- export interface ContextProviders {
2
- createProvider: <T>(value: T) => unknown;
3
- useContext: <T>() => T;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- export type StateValue = string | number | boolean | object | null;
2
- export interface StateTypes {
3
- value: StateValue;
4
- timestamp: number;
5
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- export interface ReplacementOperation {
2
- pattern: string;
3
- replacement: string;
4
- isRegex?: boolean;
5
- caseSensitive?: boolean;
6
- }
7
- export interface BatchResult {
8
- success: boolean;
9
- filesModified: number;
10
- errors: Array<{
11
- file: string;
12
- error: string;
13
- }>;
14
- duration: number;
15
- }
16
- export interface FileOperation {
17
- filePath: string;
18
- operation: "replace" | "append" | "prepend" | "delete";
19
- content?: string;
20
- pattern?: string;
21
- }
22
- export declare function batchReplace(files: string[], operations: ReplacementOperation[]): Promise<BatchResult>;
23
- export declare function batchFileOperations(operations: FileOperation[]): Promise<BatchResult>;
24
- export declare function findFilesWithPattern(directory: string, pattern: string, extensions?: string[]): string[];
25
- export declare function bulkRename(directory: string, oldName: string, newName: string, extensions?: string[]): Promise<BatchResult>;