0xray 4.0.34 → 4.0.35
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/.grok-plugin/plugin.json +1 -1
- package/.xray/codex.json +12 -4
- package/.xray/features.json +1 -1
- package/AGENTS-consumer.md +6 -6
- package/AGENTS.md +5 -5
- package/README.md +2 -2
- package/dist/AGENTS.md +5 -5
- package/dist/CHANGELOG.md +16 -0
- package/dist/README.md +2 -2
- package/dist/cli/index.js +2 -5
- package/dist/governance/governance-service.js +1 -1
- package/dist/integrations/base/README.md +1 -9
- package/dist/integrations/base/index.d.ts +0 -1
- package/dist/integrations/base/index.js +0 -2
- package/dist/integrations/governance/index.js +31 -8
- package/dist/integrations/grok/hooks/grok-hook-utils.js +1 -1
- package/dist/integrations/grok/hooks/session-start.js +12 -0
- package/dist/integrations/hooks/goggles-pipeline.mjs +62 -11
- package/dist/integrations/hooks/host-truth.mjs +74 -0
- package/dist/integrations/hooks/station-hook-runtime.cjs +3 -0
- package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/dist/mcps/knowledge-skills/storyteller.server.js +0 -1
- package/dist/nucleus/delegation-gate.d.ts +2 -2
- package/dist/nucleus/delegation-gate.js +13 -2
- package/dist/nucleus/work-freshness.mjs +189 -0
- package/dist/processors/implementations/agents-md-validation-processor.js +1 -1
- package/docs-site/docs/plates/boot.md +17 -2
- package/docs-site/docs/plates/governance.md +3 -2
- package/docs-site/docs/plates/index.md +3 -1
- package/docs-site/docs/plates/memory-recall.md +26 -35
- package/docs-site/docs/plates/orchestration.md +39 -35
- package/docs-site/docs/plates/processor.md +34 -36
- package/docs-site/docs/plates/reporting.md +3 -8
- package/docs-site/docs/plates/routing.md +22 -11
- package/package.json +2 -2
- package/scripts/foundry/release.mjs +48 -5
- package/scripts/mjs/test-consumer-readiness.mjs +1 -0
- package/scripts/mjs/test-mcp-functionality.mjs +14 -9
- package/scripts/node/basic-security-audit.cjs +0 -1
- package/scripts/node/bridge-mcp-wiring.cjs +66 -3
- package/scripts/node/postinstall.cjs +1 -1
- package/scripts/node/prepare-consumer.cjs +11 -7
- package/scripts/node/setup-dev.cjs +18 -26
- package/scripts/node/validate-mcp-connectivity.js +2 -1
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/src/mcps/knowledge-skills/storyteller.server.ts +0 -1
- package/xray/agents_template.md +5 -5
- package/xray/codex.json +12 -4
- package/xray/features.json +1 -1
- package/dist/agents/known-names.d.ts +0 -26
- package/dist/agents/known-names.js +0 -72
- package/dist/analytics/consent-manager.d.ts +0 -92
- package/dist/analytics/consent-manager.js +0 -257
- package/dist/benchmark/performance-benchmark.d.ts +0 -103
- package/dist/benchmark/performance-benchmark.js +0 -373
- package/dist/cli/commands/analytics-disable.d.ts +0 -9
- package/dist/cli/commands/analytics-disable.js +0 -72
- package/dist/cli/commands/analytics-enable-action.d.ts +0 -8
- package/dist/cli/commands/analytics-enable-action.js +0 -82
- package/dist/cli/commands/analytics-preview.d.ts +0 -9
- package/dist/cli/commands/analytics-preview.js +0 -106
- package/dist/cli/commands/analytics-status.d.ts +0 -9
- package/dist/cli/commands/analytics-status.js +0 -68
- package/dist/cli/commands/enforce.d.ts +0 -12
- package/dist/cli/commands/enforce.js +0 -78
- package/dist/cli/commands/govern.d.ts +0 -29
- package/dist/cli/commands/govern.js +0 -149
- package/dist/cli/commands/security-audit.d.ts +0 -23
- package/dist/cli/commands/security-audit.js +0 -219
- package/dist/cli/server.d.ts +0 -1
- package/dist/cli/server.js +0 -147
- package/dist/config/routing-mappings.d.ts +0 -26
- package/dist/config/routing-mappings.js +0 -151
- package/dist/core/bridge.mjs +0 -922
- package/dist/core/trace-context.d.ts +0 -12
- package/dist/core/trace-context.js +0 -33
- package/dist/enforcement/index.d.ts +0 -22
- package/dist/enforcement/index.js +0 -40
- package/dist/enforcement/loaders/index.d.ts +0 -36
- package/dist/enforcement/loaders/index.js +0 -39
- package/dist/enforcement/test-auto-healing.d.ts +0 -83
- package/dist/enforcement/test-auto-healing.js +0 -325
- package/dist/inference/index.d.ts +0 -10
- package/dist/inference/index.js +0 -5
- package/dist/infrastructure/iac-validator.d.ts +0 -150
- package/dist/infrastructure/iac-validator.js +0 -465
- package/dist/infrastructure/schemas/cloud-schemas.d.ts +0 -482
- package/dist/infrastructure/schemas/cloud-schemas.js +0 -488
- package/dist/integrations/base/ExampleIntegration.d.ts +0 -46
- package/dist/integrations/base/ExampleIntegration.js +0 -180
- package/dist/integrations/enforcement-gate.d.ts +0 -44
- package/dist/integrations/enforcement-gate.js +0 -348
- package/dist/mcps/connection/connection-manager.d.ts +0 -39
- package/dist/mcps/connection/connection-manager.js +0 -79
- package/dist/mcps/index.d.ts +0 -17
- package/dist/mcps/index.js +0 -65
- package/dist/mcps/orchestrator/index.d.ts +0 -6
- package/dist/mcps/orchestrator/index.js +0 -5
- package/dist/metrics/index.d.ts +0 -6
- package/dist/metrics/index.js +0 -6
- package/dist/orchestrator/self-direction-activation.d.ts +0 -108
- package/dist/orchestrator/self-direction-activation.js +0 -244
- package/dist/orchestrator/universal-registry-bridge.d.ts +0 -84
- package/dist/orchestrator/universal-registry-bridge.js +0 -246
- package/dist/performance/performance-budget-enforcer.d.ts +0 -157
- package/dist/performance/performance-budget-enforcer.js +0 -433
- package/dist/performance/performance-regression-tester.d.ts +0 -107
- package/dist/performance/performance-regression-tester.js +0 -341
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.d.ts +0 -11
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +0 -50
- package/dist/postprocessor/config/ProcessorConfigLoader.d.ts +0 -44
- package/dist/postprocessor/config/ProcessorConfigLoader.js +0 -16
- package/dist/postprocessor/integration.d.ts +0 -156
- package/dist/postprocessor/integration.js +0 -194
- package/dist/postprocessor/metamorphosis/index.d.ts +0 -2
- package/dist/postprocessor/metamorphosis/index.js +0 -1
- package/dist/postprocessor/redeploy/RetryHandler.d.ts +0 -49
- package/dist/postprocessor/redeploy/RetryHandler.js +0 -118
- package/dist/processors/implementations/session-capture-processor.d.ts +0 -14
- package/dist/processors/implementations/session-capture-processor.js +0 -37
- package/dist/public/XrayService.d.ts +0 -17
- package/dist/public/XrayService.js +0 -40
- package/dist/public/index.d.ts +0 -4
- package/dist/public/index.js +0 -2
- package/dist/security/comprehensive-security-audit.d.ts +0 -157
- package/dist/security/comprehensive-security-audit.js +0 -1004
- package/dist/security/index.d.ts +0 -13
- package/dist/security/index.js +0 -13
- package/dist/security/security-agent-coordinator.d.ts +0 -71
- package/dist/security/security-agent-coordinator.js +0 -203
- package/dist/security/security-hardening-system.d.ts +0 -238
- package/dist/security/security-hardening-system.js +0 -726
- package/dist/security/security-orchestration-layer.d.ts +0 -118
- package/dist/security/security-orchestration-layer.js +0 -495
- package/dist/testing/memory-regression-suite.d.ts +0 -105
- package/dist/testing/memory-regression-suite.js +0 -258
- package/dist/tools/assess-complexity-tool.d.ts +0 -28
- package/dist/tools/assess-complexity-tool.js +0 -44
- package/dist/tools/query-routing-tool.d.ts +0 -17
- package/dist/tools/query-routing-tool.js +0 -59
- package/dist/utils/batch-operations.d.ts +0 -25
- package/dist/utils/batch-operations.js +0 -292
- package/dist/utils/task-graph.d.ts +0 -29
- package/dist/utils/task-graph.js +0 -106
- package/dist/utils/test-template-generator.d.ts +0 -25
- package/dist/utils/test-template-generator.js +0 -178
- package/dist/utils/token-manager.d.ts +0 -48
- package/dist/utils/token-manager.js +0 -163
- package/dist/validation/agent-config-validator.d.ts +0 -110
- package/dist/validation/agent-config-validator.js +0 -280
- package/dist/validation/orchestration-flow-validator.d.ts +0 -87
- package/dist/validation/orchestration-flow-validator.js +0 -606
- package/src/mcps/connection/connection-manager.ts +0 -91
- package/src/mcps/index.ts +0 -80
- package/src/mcps/orchestrator/index.ts +0 -29
package/dist/mcps/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* xray MCP Server Manifest
|
|
3
|
-
*
|
|
4
|
-
* Canonical registry of all MCP servers. Add new servers here.
|
|
5
|
-
* Each entry documents the server name, source file, and server type.
|
|
6
|
-
*/
|
|
7
|
-
export interface McpServerEntry {
|
|
8
|
-
serverName: string;
|
|
9
|
-
sourceFile: string;
|
|
10
|
-
type: "top-level" | "knowledge-skill" | "orchestrator";
|
|
11
|
-
registered: boolean;
|
|
12
|
-
description: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const MCP_SERVERS: McpServerEntry[];
|
|
15
|
-
export declare function getMcpServer(serverName: string): McpServerEntry | undefined;
|
|
16
|
-
export declare function getRegisteredServers(): McpServerEntry[];
|
|
17
|
-
export declare function getUnregisteredServers(): McpServerEntry[];
|
package/dist/mcps/index.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* xray MCP Server Manifest
|
|
3
|
-
*
|
|
4
|
-
* Canonical registry of all MCP servers. Add new servers here.
|
|
5
|
-
* Each entry documents the server name, source file, and server type.
|
|
6
|
-
*/
|
|
7
|
-
export const MCP_SERVERS = [
|
|
8
|
-
// ── Top-level servers ──
|
|
9
|
-
{ serverName: "architect-tools", sourceFile: "mcps/architect-tools.server.ts", type: "top-level", registered: true, description: "Architect design tools" },
|
|
10
|
-
{ serverName: "auto-format", sourceFile: "mcps/auto-format.server.ts", type: "top-level", registered: true, description: "Auto-format code" },
|
|
11
|
-
{ serverName: "boot-orchestrator", sourceFile: "mcps/boot-orchestrator.server.ts", type: "top-level", registered: true, description: "Boot sequence orchestration" },
|
|
12
|
-
{ serverName: "enforcer", sourceFile: "mcps/enforcer-tools.server.ts", type: "top-level", registered: true, description: "Codex compliance enforcement" },
|
|
13
|
-
{ serverName: "estimation-validator", sourceFile: "mcps/estimation.server.ts", type: "top-level", registered: true, description: "Task estimation validation" },
|
|
14
|
-
{ serverName: "framework-compliance-audit", sourceFile: "mcps/framework-compliance-audit.server.ts", type: "top-level", registered: true, description: "Framework compliance audits" },
|
|
15
|
-
{ serverName: "framework-help", sourceFile: "mcps/framework-help.server.ts", type: "top-level", registered: true, description: "Framework help and guidance" },
|
|
16
|
-
{ serverName: "governance", sourceFile: "mcps/governance.server.ts", type: "top-level", registered: true, description: "Governance deliberation pipeline" },
|
|
17
|
-
{ serverName: "lint", sourceFile: "mcps/lint.server.ts", type: "top-level", registered: true, description: "Code linting" },
|
|
18
|
-
{ serverName: "model-health-check", sourceFile: "mcps/model-health-check.server.ts", type: "top-level", registered: true, description: "Model health monitoring" },
|
|
19
|
-
{ serverName: "performance-analysis", sourceFile: "mcps/performance-analysis.server.ts", type: "top-level", registered: true, description: "Performance analysis" },
|
|
20
|
-
{ serverName: "processor-pipeline", sourceFile: "mcps/processor-pipeline.server.ts", type: "top-level", registered: true, description: "Processor pipeline" },
|
|
21
|
-
{ serverName: "researcher", sourceFile: "mcps/researcher.server.ts", type: "top-level", registered: true, description: "Codebase exploration" },
|
|
22
|
-
{ serverName: "security-scan", sourceFile: "mcps/security-scan.server.ts", type: "top-level", registered: true, description: "Security vulnerability scanning" },
|
|
23
|
-
{ serverName: "state-manager", sourceFile: "mcps/state-manager.server.ts", type: "top-level", registered: true, description: "State management" },
|
|
24
|
-
// ── Knowledge skill servers ──
|
|
25
|
-
{ serverName: "api-design", sourceFile: "mcps/knowledge-skills/api-design.server.ts", type: "knowledge-skill", registered: false, description: "API design expertise" },
|
|
26
|
-
{ serverName: "architecture-patterns", sourceFile: "mcps/knowledge-skills/architecture-patterns.server.ts", type: "knowledge-skill", registered: false, description: "Architecture pattern guidance" },
|
|
27
|
-
{ serverName: "bug-triage-specialist", sourceFile: "mcps/knowledge-skills/bug-triage-specialist.server.ts", type: "knowledge-skill", registered: true, description: "Bug triage and investigation" },
|
|
28
|
-
{ serverName: "code-analyzer", sourceFile: "mcps/knowledge-skills/code-analyzer.server.ts", type: "knowledge-skill", registered: true, description: "Static code analysis" },
|
|
29
|
-
{ serverName: "code-review", sourceFile: "mcps/knowledge-skills/code-review.server.ts", type: "knowledge-skill", registered: true, description: "Code review and quality assessment" },
|
|
30
|
-
{ serverName: "content-creator", sourceFile: "mcps/knowledge-skills/content-creator.server.ts", type: "knowledge-skill", registered: false, description: "Content creation" },
|
|
31
|
-
{ serverName: "database-design", sourceFile: "mcps/knowledge-skills/database-design.server.ts", type: "knowledge-skill", registered: false, description: "Database design expertise" },
|
|
32
|
-
{ serverName: "devops-deployment", sourceFile: "mcps/knowledge-skills/devops-deployment.server.ts", type: "knowledge-skill", registered: false, description: "DevOps and deployment" },
|
|
33
|
-
{ serverName: "git-workflow", sourceFile: "mcps/knowledge-skills/git-workflow.server.ts", type: "knowledge-skill", registered: false, description: "Git workflow guidance" },
|
|
34
|
-
{ serverName: "growth-strategist", sourceFile: "mcps/knowledge-skills/growth-strategist.server.ts", type: "knowledge-skill", registered: false, description: "Growth strategy" },
|
|
35
|
-
{ serverName: "log-monitor", sourceFile: "mcps/knowledge-skills/log-monitor.server.ts", type: "knowledge-skill", registered: true, description: "Log monitoring" },
|
|
36
|
-
{ serverName: "mobile-development", sourceFile: "mcps/knowledge-skills/mobile-development.server.ts", type: "knowledge-skill", registered: false, description: "Mobile development" },
|
|
37
|
-
{ serverName: "multimodal-looker", sourceFile: "mcps/knowledge-skills/multimodal-looker.server.ts", type: "knowledge-skill", registered: false, description: "Multimodal file analysis" },
|
|
38
|
-
{ serverName: "performance-optimization", sourceFile: "mcps/knowledge-skills/performance-optimization.server.ts", type: "knowledge-skill", registered: true, description: "Performance optimization" },
|
|
39
|
-
{ serverName: "project-analysis", sourceFile: "mcps/knowledge-skills/project-analysis.server.ts", type: "knowledge-skill", registered: false, description: "Project analysis" },
|
|
40
|
-
{ serverName: "refactoring-strategies", sourceFile: "mcps/knowledge-skills/refactoring-strategies.server.ts", type: "knowledge-skill", registered: true, description: "Refactoring strategies" },
|
|
41
|
-
{ serverName: "security-audit", sourceFile: "mcps/knowledge-skills/security-audit.server.ts", type: "knowledge-skill", registered: true, description: "Security auditing" },
|
|
42
|
-
{ serverName: "seo-consultant", sourceFile: "mcps/knowledge-skills/seo-consultant.server.ts", type: "knowledge-skill", registered: false, description: "SEO consulting" },
|
|
43
|
-
{ serverName: "storyteller", sourceFile: "mcps/knowledge-skills/storyteller.server.ts", type: "knowledge-skill", registered: false, description: "Reflections, sagas, and technical narratives" },
|
|
44
|
-
{ serverName: "session-management", sourceFile: "mcps/knowledge-skills/session-management.server.ts", type: "knowledge-skill", registered: true, description: "Session management" },
|
|
45
|
-
{ serverName: "skill-invocation", sourceFile: "mcps/knowledge-skills/skill-invocation.server.ts", type: "knowledge-skill", registered: true, description: "Skill invocation" },
|
|
46
|
-
{ serverName: "strategist", sourceFile: "mcps/knowledge-skills/strategist.server.ts", type: "knowledge-skill", registered: false, description: "Strategic planning" },
|
|
47
|
-
{ serverName: "tech-writer", sourceFile: "mcps/knowledge-skills/tech-writer.server.ts", type: "knowledge-skill", registered: false, description: "Technical writing" },
|
|
48
|
-
{ serverName: "testing-strategy", sourceFile: "mcps/knowledge-skills/testing-strategy.server.ts", type: "knowledge-skill", registered: true, description: "Testing strategy" },
|
|
49
|
-
{ serverName: "ui-ux-design", sourceFile: "mcps/knowledge-skills/ui-ux-design.server.ts", type: "knowledge-skill", registered: false, description: "UI/UX design" },
|
|
50
|
-
// ── Orchestrator server ──
|
|
51
|
-
{ serverName: "orchestrator", sourceFile: "mcps/orchestrator/server.ts", type: "orchestrator", registered: true, description: "thinDispatch 7-flow orchestration" },
|
|
52
|
-
// ── Aliases (point to same source as primary) ──
|
|
53
|
-
{ serverName: "code-reviewer", sourceFile: "mcps/knowledge-skills/code-review.server.ts", type: "knowledge-skill", registered: true, description: "Alias for code-review" },
|
|
54
|
-
{ serverName: "security-auditor", sourceFile: "mcps/knowledge-skills/security-audit.server.ts", type: "knowledge-skill", registered: true, description: "Alias for security-audit" },
|
|
55
|
-
{ serverName: "testing-lead", sourceFile: "mcps/knowledge-skills/testing-strategy.server.ts", type: "knowledge-skill", registered: true, description: "Alias for testing-strategy" },
|
|
56
|
-
];
|
|
57
|
-
export function getMcpServer(serverName) {
|
|
58
|
-
return MCP_SERVERS.find(s => s.serverName === serverName);
|
|
59
|
-
}
|
|
60
|
-
export function getRegisteredServers() {
|
|
61
|
-
return MCP_SERVERS.filter(s => s.registered);
|
|
62
|
-
}
|
|
63
|
-
export function getUnregisteredServers() {
|
|
64
|
-
return MCP_SERVERS.filter(s => !s.registered);
|
|
65
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { OrchestratorServer, createOrchestratorServer } from './server.js';
|
|
2
|
-
export { TaskHandler } from './handlers/task-handler.js';
|
|
3
|
-
export { ComplexityHandler } from './handlers/complexity-handler.js';
|
|
4
|
-
export { StatusHandler } from './handlers/status-handler.js';
|
|
5
|
-
export { spawnAside, closeAside, closeAllAsides, addObservations, getActiveAsideCount, getActiveAsideIds, getAsideState, resetAsideContext, extractGovernanceObservations, extractOrchestrationObservations, extractComplexityObservations, } from './aside-context.js';
|
|
6
|
-
export type { AsideContextOptions, AsideObservation, AsideResult, ActiveAside, OrchestrationTask, OrchestrationResult, OrchestrationStatus, ComplexityAnalysis, TaskExecutionResult, ExecutionPlan, } from './types.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { OrchestratorServer, createOrchestratorServer } from './server.js';
|
|
2
|
-
export { TaskHandler } from './handlers/task-handler.js';
|
|
3
|
-
export { ComplexityHandler } from './handlers/complexity-handler.js';
|
|
4
|
-
export { StatusHandler } from './handlers/status-handler.js';
|
|
5
|
-
export { spawnAside, closeAside, closeAllAsides, addObservations, getActiveAsideCount, getActiveAsideIds, getAsideState, resetAsideContext, extractGovernanceObservations, extractOrchestrationObservations, extractComplexityObservations, } from './aside-context.js';
|
package/dist/metrics/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Metrics Module
|
|
3
|
-
*
|
|
4
|
-
* Re-exports all metrics-related functionality from the Agent Metrics System.
|
|
5
|
-
*/
|
|
6
|
-
export { AgentMetricsSystem, getAgentMetricsSystem, initializeAgentMetrics, resetAgentMetricsSystem, type AgentInvocation, type AgentType, type ComplexityLevel, type AgentInvocationSummary, type TimePeriodSummary, type ComplexitySummary, type AggregatedAgentMetrics, type MetricsRetentionConfig, type MetricsExport, type AgentMetricsFilter, } from "./agent-metrics.js";
|
package/dist/metrics/index.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Self-Direction Activation System (Simplified)
|
|
3
|
-
*
|
|
4
|
-
* Commercial version with autonomous self-direction capabilities.
|
|
5
|
-
* Activates the framework's dormant self-evolution systems for continuous improvement.
|
|
6
|
-
* This version works without advanced-features dependencies for initial deployment.
|
|
7
|
-
*
|
|
8
|
-
* @since 2026-01-24
|
|
9
|
-
*/
|
|
10
|
-
export interface SelfDirectionConfig {
|
|
11
|
-
monitoringInterval: number;
|
|
12
|
-
analyticsInterval: number;
|
|
13
|
-
learningCycleInterval: number;
|
|
14
|
-
autonomousReporting: boolean;
|
|
15
|
-
predictiveOptimization: boolean;
|
|
16
|
-
scalingAutonomy: boolean;
|
|
17
|
-
evolutionSafety: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface SelfAssessmentReport {
|
|
20
|
-
timestamp: number;
|
|
21
|
-
healthScore: number;
|
|
22
|
-
criticalIssues: CriticalIssue[];
|
|
23
|
-
improvementOpportunities: ImprovementOpportunity[];
|
|
24
|
-
predictions: SystemPrediction[];
|
|
25
|
-
recommendations: string[];
|
|
26
|
-
}
|
|
27
|
-
export interface CriticalIssue {
|
|
28
|
-
id: string;
|
|
29
|
-
severity: "low" | "medium" | "high" | "critical";
|
|
30
|
-
component: string;
|
|
31
|
-
description: string;
|
|
32
|
-
impact: string;
|
|
33
|
-
recommendedAction: string;
|
|
34
|
-
}
|
|
35
|
-
export interface ImprovementOpportunity {
|
|
36
|
-
id: string;
|
|
37
|
-
type: "performance" | "reliability" | "efficiency" | "capability";
|
|
38
|
-
description: string;
|
|
39
|
-
potentialBenefit: string;
|
|
40
|
-
implementationComplexity: "low" | "medium" | "high";
|
|
41
|
-
confidence: number;
|
|
42
|
-
}
|
|
43
|
-
export interface SystemPrediction {
|
|
44
|
-
type: "scaling" | "performance" | "reliability" | "resource";
|
|
45
|
-
prediction: string;
|
|
46
|
-
confidence: number;
|
|
47
|
-
timeHorizon: number;
|
|
48
|
-
recommendedAction?: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Simplified Self-Direction Activation System
|
|
52
|
-
*
|
|
53
|
-
* Provides basic self-direction capabilities without advanced-features dependencies
|
|
54
|
-
* for initial deployment and testing.
|
|
55
|
-
*/
|
|
56
|
-
export declare class SelfDirectionSystem {
|
|
57
|
-
private config;
|
|
58
|
-
private activeMonitoring;
|
|
59
|
-
private activeLearning;
|
|
60
|
-
private monitoringIntervalId;
|
|
61
|
-
private learningIntervalId;
|
|
62
|
-
constructor(config?: Partial<SelfDirectionConfig>);
|
|
63
|
-
/**
|
|
64
|
-
* Phase 1: Activate Self-Monitoring Foundation
|
|
65
|
-
*/
|
|
66
|
-
activateSelfMonitoring(): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Setup autonomous critical issue reporting
|
|
69
|
-
*/
|
|
70
|
-
private setupAutonomousReporting;
|
|
71
|
-
/**
|
|
72
|
-
* Start continuous self-assessment cycle
|
|
73
|
-
*/
|
|
74
|
-
private startContinuousSelfAssessment;
|
|
75
|
-
/**
|
|
76
|
-
* Phase 2: Activate Self-Evolution Learning
|
|
77
|
-
*/
|
|
78
|
-
activateSelfEvolution(): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Start learning cycles
|
|
81
|
-
*/
|
|
82
|
-
private startLearningCycles;
|
|
83
|
-
/**
|
|
84
|
-
* Core self-assessment method
|
|
85
|
-
*/
|
|
86
|
-
performSelfAssessment(): Promise<SelfAssessmentReport>;
|
|
87
|
-
/**
|
|
88
|
-
* Process self-assessment results
|
|
89
|
-
*/
|
|
90
|
-
private processSelfAssessmentResults;
|
|
91
|
-
/**
|
|
92
|
-
* Get current self-direction status
|
|
93
|
-
*/
|
|
94
|
-
getStatus(): {
|
|
95
|
-
activeMonitoring: boolean;
|
|
96
|
-
activeLearning: boolean;
|
|
97
|
-
config: SelfDirectionConfig;
|
|
98
|
-
componentsHealth: Record<string, boolean>;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Shutdown self-direction system
|
|
102
|
-
*/
|
|
103
|
-
shutdown(): Promise<void>;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Export singleton instance
|
|
107
|
-
*/
|
|
108
|
-
export declare const selfDirectionSystem: SelfDirectionSystem;
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Self-Direction Activation System (Simplified)
|
|
3
|
-
*
|
|
4
|
-
* Commercial version with autonomous self-direction capabilities.
|
|
5
|
-
* Activates the framework's dormant self-evolution systems for continuous improvement.
|
|
6
|
-
* This version works without advanced-features dependencies for initial deployment.
|
|
7
|
-
*
|
|
8
|
-
* @since 2026-01-24
|
|
9
|
-
*/
|
|
10
|
-
// Framework core imports
|
|
11
|
-
import { frameworkLogger, generateJobId } from "../core/framework-logger.js";
|
|
12
|
-
/**
|
|
13
|
-
* Simplified Self-Direction Activation System
|
|
14
|
-
*
|
|
15
|
-
* Provides basic self-direction capabilities without advanced-features dependencies
|
|
16
|
-
* for initial deployment and testing.
|
|
17
|
-
*/
|
|
18
|
-
export class SelfDirectionSystem {
|
|
19
|
-
config;
|
|
20
|
-
activeMonitoring = false;
|
|
21
|
-
activeLearning = false;
|
|
22
|
-
monitoringIntervalId;
|
|
23
|
-
learningIntervalId;
|
|
24
|
-
constructor(config = {}) {
|
|
25
|
-
this.config = {
|
|
26
|
-
monitoringInterval: 30000, // 30 seconds
|
|
27
|
-
analyticsInterval: 300000, // 5 minutes
|
|
28
|
-
learningCycleInterval: 3600000, // 1 hour
|
|
29
|
-
autonomousReporting: true,
|
|
30
|
-
predictiveOptimization: true,
|
|
31
|
-
scalingAutonomy: true,
|
|
32
|
-
evolutionSafety: true,
|
|
33
|
-
...config,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Phase 1: Activate Self-Monitoring Foundation
|
|
38
|
-
*/
|
|
39
|
-
async activateSelfMonitoring() {
|
|
40
|
-
frameworkLogger.log("self-direction-system", "activating-monitoring", "info", { message: "🤖 ACTIVATING SELF-MONITORING FOUNDATION" });
|
|
41
|
-
try {
|
|
42
|
-
// Setup autonomous critical issue reporting
|
|
43
|
-
this.setupAutonomousReporting();
|
|
44
|
-
frameworkLogger.log("self-direction-system", "reporting-activated", "info", { message: "✅ Autonomous critical issue reporting activated" });
|
|
45
|
-
// Start continuous self-assessment
|
|
46
|
-
this.startContinuousSelfAssessment();
|
|
47
|
-
this.activeMonitoring = true;
|
|
48
|
-
frameworkLogger.log("self-direction-system", "monitoring-activated", "info", { message: "🎉 Self-monitoring foundation activated" });
|
|
49
|
-
await frameworkLogger.log("self-direction-system", "monitoring-activated", "success", { phase: 1, componentsActivated: ["reporting", "assessment"] }, undefined, generateJobId("self-monitoring"));
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
frameworkLogger.log("self-direction-system", "monitoring-activation-failed", "error", { error, message: "❌ Self-monitoring activation failed" });
|
|
53
|
-
await frameworkLogger.log("self-direction-system", "monitoring-activation-failed", "error", { error: error instanceof Error ? error.message : error }, undefined, generateJobId("self-monitoring-fail"));
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Setup autonomous critical issue reporting
|
|
59
|
-
*/
|
|
60
|
-
setupAutonomousReporting() {
|
|
61
|
-
// Setup basic event listeners for critical issues
|
|
62
|
-
frameworkLogger.log("self-direction-system", "reporting-configured", "info", { message: "📊 Autonomous reporting configured" });
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Start continuous self-assessment cycle
|
|
66
|
-
*/
|
|
67
|
-
startContinuousSelfAssessment() {
|
|
68
|
-
// Clear any existing interval first to prevent duplicates
|
|
69
|
-
if (this.monitoringIntervalId) {
|
|
70
|
-
clearInterval(this.monitoringIntervalId);
|
|
71
|
-
}
|
|
72
|
-
this.monitoringIntervalId = setInterval(async () => {
|
|
73
|
-
try {
|
|
74
|
-
if (!this.activeMonitoring)
|
|
75
|
-
return; // Don't run if stopped
|
|
76
|
-
const assessment = await this.performSelfAssessment();
|
|
77
|
-
await this.processSelfAssessmentResults(assessment);
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
frameworkLogger.log("self-direction-system", "assessment-cycle-failed", "error", { error, message: "Self-assessment cycle failed" });
|
|
81
|
-
}
|
|
82
|
-
}, this.config.monitoringInterval);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Phase 2: Activate Self-Evolution Learning
|
|
86
|
-
*/
|
|
87
|
-
async activateSelfEvolution() {
|
|
88
|
-
frameworkLogger.log("self-direction-system", "activating-evolution", "info", { message: "🧠 ACTIVATING SELF-EVOLUTION LEARNING" });
|
|
89
|
-
try {
|
|
90
|
-
// Start learning cycles
|
|
91
|
-
this.startLearningCycles();
|
|
92
|
-
frameworkLogger.log("self-direction-system", "learning-cycles-activated", "info", { message: "✅ Learning cycles activated" });
|
|
93
|
-
this.activeLearning = true;
|
|
94
|
-
frameworkLogger.log("self-direction-system", "evolution-activated", "info", { message: "🎉 Self-evolution learning activated" });
|
|
95
|
-
await frameworkLogger.log("self-direction-system", "evolution-activated", "success", { phase: 2, componentsActivated: ["learning-cycles"] }, undefined, generateJobId("self-evolution"));
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
frameworkLogger.log("self-direction-system", "evolution-activation-failed", "error", { error, message: "❌ Self-evolution activation failed" });
|
|
99
|
-
await frameworkLogger.log("self-direction-system", "evolution-activation-failed", "error", { error: error instanceof Error ? error.message : error }, undefined, generateJobId("self-evolution-fail"));
|
|
100
|
-
throw error;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Start learning cycles
|
|
105
|
-
*/
|
|
106
|
-
startLearningCycles() {
|
|
107
|
-
// Clear any existing interval first to prevent duplicates
|
|
108
|
-
if (this.learningIntervalId) {
|
|
109
|
-
clearInterval(this.learningIntervalId);
|
|
110
|
-
}
|
|
111
|
-
this.learningIntervalId = setInterval(async () => {
|
|
112
|
-
if (!this.activeLearning)
|
|
113
|
-
return; // Don't run if stopped
|
|
114
|
-
frameworkLogger.log("self-direction-system", "learning-cycle-executed", "info", { message: "🔄 Learning cycle executed" });
|
|
115
|
-
// Basic learning cycle - would be enhanced with advanced features
|
|
116
|
-
}, this.config.learningCycleInterval);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Core self-assessment method
|
|
120
|
-
*/
|
|
121
|
-
async performSelfAssessment() {
|
|
122
|
-
const timestamp = Date.now();
|
|
123
|
-
// Basic health assessment
|
|
124
|
-
const healthScore = 0.75; // Placeholder
|
|
125
|
-
// Known critical issues
|
|
126
|
-
const criticalIssues = [
|
|
127
|
-
{
|
|
128
|
-
id: "memory-leak",
|
|
129
|
-
severity: "critical",
|
|
130
|
-
component: "memory-management",
|
|
131
|
-
description: "Memory leaks persist at 1.3GB+ usage",
|
|
132
|
-
impact: "System instability",
|
|
133
|
-
recommendedAction: "Deep profiling required",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: "performance-budget",
|
|
137
|
-
severity: "critical",
|
|
138
|
-
component: "performance",
|
|
139
|
-
description: "Bundle size and response times exceed limits",
|
|
140
|
-
impact: "CI/CD deployment blocked",
|
|
141
|
-
recommendedAction: "Optimization required",
|
|
142
|
-
},
|
|
143
|
-
];
|
|
144
|
-
// Basic improvement opportunities
|
|
145
|
-
const improvementOpportunities = [
|
|
146
|
-
{
|
|
147
|
-
id: "memory-optimization",
|
|
148
|
-
type: "performance",
|
|
149
|
-
description: "Implement comprehensive memory leak fixes",
|
|
150
|
-
potentialBenefit: "Reduce memory usage by 95%",
|
|
151
|
-
implementationComplexity: "high",
|
|
152
|
-
confidence: 0.8,
|
|
153
|
-
},
|
|
154
|
-
];
|
|
155
|
-
// Basic predictions
|
|
156
|
-
const predictions = [
|
|
157
|
-
{
|
|
158
|
-
type: "performance",
|
|
159
|
-
prediction: "Performance budget violations will persist",
|
|
160
|
-
confidence: 0.9,
|
|
161
|
-
timeHorizon: 24,
|
|
162
|
-
recommendedAction: "Address bundle size and response times",
|
|
163
|
-
},
|
|
164
|
-
];
|
|
165
|
-
// Recommendations
|
|
166
|
-
const recommendations = [
|
|
167
|
-
"Conduct comprehensive memory profiling",
|
|
168
|
-
"Fix concurrent spawn limit race condition",
|
|
169
|
-
"Resolve performance budget violations",
|
|
170
|
-
];
|
|
171
|
-
return {
|
|
172
|
-
timestamp,
|
|
173
|
-
healthScore,
|
|
174
|
-
criticalIssues,
|
|
175
|
-
improvementOpportunities,
|
|
176
|
-
predictions,
|
|
177
|
-
recommendations,
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Process self-assessment results
|
|
182
|
-
*/
|
|
183
|
-
async processSelfAssessmentResults(assessment) {
|
|
184
|
-
if (assessment.criticalIssues.length > 0) {
|
|
185
|
-
frameworkLogger.log("self-direction-system", "critical-issues-detected", "warning", {
|
|
186
|
-
message: `🚨 ${assessment.criticalIssues.length} critical issues detected`,
|
|
187
|
-
issues: assessment.criticalIssues.map(i => `${i.severity.toUpperCase()}: ${i.description}`),
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
if (assessment.recommendations.length > 0) {
|
|
191
|
-
frameworkLogger.log("self-direction-system", "recommendations-generated", "info", {
|
|
192
|
-
message: `💡 ${assessment.recommendations.length} recommendations generated`,
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Get current self-direction status
|
|
198
|
-
*/
|
|
199
|
-
getStatus() {
|
|
200
|
-
return {
|
|
201
|
-
activeMonitoring: this.activeMonitoring,
|
|
202
|
-
activeLearning: this.activeLearning,
|
|
203
|
-
config: this.config,
|
|
204
|
-
componentsHealth: {
|
|
205
|
-
metricsCollector: true,
|
|
206
|
-
analytics: true,
|
|
207
|
-
streaming: true,
|
|
208
|
-
scaling: true,
|
|
209
|
-
loadBalancer: true,
|
|
210
|
-
metaAnalysis: true,
|
|
211
|
-
inference: true,
|
|
212
|
-
selfReflection: true,
|
|
213
|
-
learningLoops: true,
|
|
214
|
-
evolutionValidation: true,
|
|
215
|
-
monitoring: true,
|
|
216
|
-
reporting: true,
|
|
217
|
-
assessment: true,
|
|
218
|
-
learning: true,
|
|
219
|
-
},
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Shutdown self-direction system
|
|
224
|
-
*/
|
|
225
|
-
async shutdown() {
|
|
226
|
-
frameworkLogger.log("self-direction-system", "shutting-down", "info", { message: "🛑 Shutting down self-direction system..." });
|
|
227
|
-
// Clear all intervals to prevent memory leaks
|
|
228
|
-
if (this.monitoringIntervalId) {
|
|
229
|
-
clearInterval(this.monitoringIntervalId);
|
|
230
|
-
this.monitoringIntervalId = undefined;
|
|
231
|
-
}
|
|
232
|
-
if (this.learningIntervalId) {
|
|
233
|
-
clearInterval(this.learningIntervalId);
|
|
234
|
-
this.learningIntervalId = undefined;
|
|
235
|
-
}
|
|
236
|
-
this.activeMonitoring = false;
|
|
237
|
-
this.activeLearning = false;
|
|
238
|
-
frameworkLogger.log("self-direction-system", "shutdown-complete", "info", { message: "✅ Self-direction system shutdown complete" });
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Export singleton instance
|
|
243
|
-
*/
|
|
244
|
-
export const selfDirectionSystem = new SelfDirectionSystem();
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Universal Registry Bridge
|
|
3
|
-
*
|
|
4
|
-
* Connects 0xRay to external agent registries.
|
|
5
|
-
* Enables dynamic agent configuration loading from external sources.
|
|
6
|
-
*
|
|
7
|
-
* @since 2026-02-14
|
|
8
|
-
*/
|
|
9
|
-
import type { AgentConfig } from "../agents/types.js";
|
|
10
|
-
export interface ExternalRegistryConfig {
|
|
11
|
-
type: "file" | "http" | "npm";
|
|
12
|
-
location: string;
|
|
13
|
-
refreshInterval?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface RegistryAgentDefinition {
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
version: string;
|
|
19
|
-
capabilities?: string[];
|
|
20
|
-
config?: Record<string, unknown>;
|
|
21
|
-
}
|
|
22
|
-
export interface BridgeOptions {
|
|
23
|
-
registries: ExternalRegistryConfig[];
|
|
24
|
-
cacheDir?: string;
|
|
25
|
-
autoRefresh?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare class UniversalRegistryBridge {
|
|
28
|
-
private registries;
|
|
29
|
-
private cacheDir;
|
|
30
|
-
private autoRefresh;
|
|
31
|
-
private cache;
|
|
32
|
-
private logger;
|
|
33
|
-
constructor(options: BridgeOptions);
|
|
34
|
-
/**
|
|
35
|
-
* Load agents from all configured registries
|
|
36
|
-
*/
|
|
37
|
-
loadAgents(): Promise<RegistryAgentDefinition[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Fetch agents from a specific registry
|
|
40
|
-
*/
|
|
41
|
-
private fetchFromRegistry;
|
|
42
|
-
/**
|
|
43
|
-
* Load agents from a local file
|
|
44
|
-
*/
|
|
45
|
-
private loadFromFile;
|
|
46
|
-
/**
|
|
47
|
-
* Simple YAML parser for agent definitions
|
|
48
|
-
* Handles basic agent registry format
|
|
49
|
-
*/
|
|
50
|
-
private parseYamlAgents;
|
|
51
|
-
/**
|
|
52
|
-
* Load agents from HTTP endpoint
|
|
53
|
-
*/
|
|
54
|
-
private loadFromHttp;
|
|
55
|
-
/**
|
|
56
|
-
* Load agents from npm package
|
|
57
|
-
*/
|
|
58
|
-
private loadFromNpm;
|
|
59
|
-
/**
|
|
60
|
-
* Convert registry definition to AgentConfig
|
|
61
|
-
*/
|
|
62
|
-
toAgentConfig(registryDef: RegistryAgentDefinition): Partial<AgentConfig>;
|
|
63
|
-
/**
|
|
64
|
-
* Get cached agents from a specific registry
|
|
65
|
-
*/
|
|
66
|
-
getCached(registryType: string, location: string): RegistryAgentDefinition[] | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* Clear the cache
|
|
69
|
-
*/
|
|
70
|
-
clearCache(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Add a new registry dynamically
|
|
73
|
-
*/
|
|
74
|
-
addRegistry(registry: ExternalRegistryConfig): void;
|
|
75
|
-
/**
|
|
76
|
-
* Get all configured registries
|
|
77
|
-
*/
|
|
78
|
-
getRegistries(): ExternalRegistryConfig[];
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Create a bridge from integration config
|
|
82
|
-
*/
|
|
83
|
-
export declare function createRegistryBridge(configPath?: string): Promise<UniversalRegistryBridge>;
|
|
84
|
-
export declare function getDefaultBridge(): UniversalRegistryBridge;
|