0xray 2.2.4 → 3.0.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.
- package/AGENTS.md +5 -5
- package/README.md +54 -16
- package/dist/AGENTS.md +5 -5
- package/dist/CHANGELOG.md +139 -0
- package/dist/README.md +54 -16
- package/dist/agents/architect.js +1 -0
- package/dist/agents/architect.js.map +1 -0
- package/dist/agents/backend-engineer.js +1 -0
- package/dist/agents/backend-engineer.js.map +1 -0
- package/dist/agents/bug-triage-specialist.js +1 -0
- package/dist/agents/bug-triage-specialist.js.map +1 -0
- package/dist/agents/code-analyzer.js +1 -0
- package/dist/agents/code-analyzer.js.map +1 -0
- package/dist/agents/code-reviewer.js +1 -0
- package/dist/agents/code-reviewer.js.map +1 -0
- package/dist/agents/content-creator.js +1 -0
- package/dist/agents/content-creator.js.map +1 -0
- package/dist/agents/database-engineer.js +1 -0
- package/dist/agents/database-engineer.js.map +1 -0
- package/dist/agents/devops-engineer.js +1 -0
- package/dist/agents/devops-engineer.js.map +1 -0
- package/dist/agents/frontend-engineer.js +1 -0
- package/dist/agents/frontend-engineer.js.map +1 -0
- package/dist/agents/frontend-ui-ux-engineer.js +1 -0
- package/dist/agents/frontend-ui-ux-engineer.js.map +1 -0
- package/dist/agents/growth-strategist.js +1 -0
- package/dist/agents/growth-strategist.js.map +1 -0
- package/dist/agents/index.js +1 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/librarian-agents-updater.js +1 -0
- package/dist/agents/librarian-agents-updater.js.map +1 -0
- package/dist/agents/log-monitor.js +1 -0
- package/dist/agents/log-monitor.js.map +1 -0
- package/dist/agents/mobile-developer.js +1 -0
- package/dist/agents/mobile-developer.js.map +1 -0
- package/dist/agents/performance-engineer.js +1 -0
- package/dist/agents/performance-engineer.js.map +1 -0
- package/dist/agents/refactorer.js +1 -0
- package/dist/agents/refactorer.js.map +1 -0
- package/dist/agents/registry.js +1 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/researcher.js +1 -0
- package/dist/agents/researcher.js.map +1 -0
- package/dist/agents/security-auditor.js +1 -0
- package/dist/agents/security-auditor.js.map +1 -0
- package/dist/agents/seo-consultant.js +1 -0
- package/dist/agents/seo-consultant.js.map +1 -0
- package/dist/agents/strategist.js +1 -0
- package/dist/agents/strategist.js.map +1 -0
- package/dist/agents/tech-writer.js +1 -0
- package/dist/agents/tech-writer.js.map +1 -0
- package/dist/agents/testing-lead.js +1 -0
- package/dist/agents/testing-lead.js.map +1 -0
- package/dist/agents/types.js +1 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/analytics/emerging-pattern-detector.js +1 -0
- package/dist/analytics/emerging-pattern-detector.js.map +1 -0
- package/dist/analytics/pattern-learning-engine.js +1 -0
- package/dist/analytics/pattern-learning-engine.js.map +1 -0
- package/dist/analytics/pattern-performance-tracker.js +1 -0
- package/dist/analytics/pattern-performance-tracker.js.map +1 -0
- package/dist/analytics/predictive-analytics.js +1 -0
- package/dist/analytics/predictive-analytics.js.map +1 -0
- package/dist/analytics/prompt-pattern-analyzer.js +1 -0
- package/dist/analytics/prompt-pattern-analyzer.js.map +1 -0
- package/dist/analytics/routing-performance-analyzer.js +1 -0
- package/dist/analytics/routing-performance-analyzer.js.map +1 -0
- package/dist/analytics/routing-refiner.js +1 -0
- package/dist/analytics/routing-refiner.js.map +1 -0
- package/dist/architect/architect-tools.js +1 -0
- package/dist/architect/architect-tools.js.map +1 -0
- package/dist/architect/architectural-integrity.js +1 -0
- package/dist/architect/architectural-integrity.js.map +1 -0
- package/dist/cli/commands/antigravity-status.js +1 -0
- package/dist/cli/commands/antigravity-status.js.map +1 -0
- package/dist/cli/commands/archive-logs.js +1 -0
- package/dist/cli/commands/archive-logs.js.map +1 -0
- package/dist/cli/commands/credible-init.js +1 -0
- package/dist/cli/commands/credible-init.js.map +1 -0
- package/dist/cli/commands/govern.js +1 -3
- package/dist/cli/commands/govern.js.map +1 -0
- package/dist/cli/commands/grok-install.js +1 -0
- package/dist/cli/commands/grok-install.js.map +1 -0
- package/dist/cli/commands/hermes-install.js +1 -0
- package/dist/cli/commands/hermes-install.js.map +1 -0
- package/dist/cli/commands/mcp-install.js +1 -0
- package/dist/cli/commands/mcp-install.js.map +1 -0
- package/dist/cli/commands/openclaw-install.js +1 -0
- package/dist/cli/commands/openclaw-install.js.map +1 -0
- package/dist/cli/commands/opencode-install.js +1 -0
- package/dist/cli/commands/opencode-install.js.map +1 -0
- package/dist/cli/commands/plugin-commands.js +1 -0
- package/dist/cli/commands/plugin-commands.js.map +1 -0
- package/dist/cli/commands/publish-agent.js +1 -0
- package/dist/cli/commands/publish-agent.js.map +1 -0
- package/dist/cli/commands/security-audit.js +1 -0
- package/dist/cli/commands/security-audit.js.map +1 -0
- package/dist/cli/commands/skill-install.js +1 -0
- package/dist/cli/commands/skill-install.js.map +1 -0
- package/dist/cli/commands/status.js +17 -2
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/storyteller.js +1 -0
- package/dist/cli/commands/storyteller.js.map +1 -0
- package/dist/cli/index.js +1 -4
- package/dist/cli/index.js.map +1 -0
- package/dist/config/default-agents.js +1 -0
- package/dist/config/default-agents.js.map +1 -0
- package/dist/config/routing-mappings.js +1 -0
- package/dist/config/routing-mappings.js.map +1 -0
- package/dist/core/activity-logger.js +1 -0
- package/dist/core/activity-logger.js.map +1 -0
- package/dist/core/adaptive-kernel.js +1 -0
- package/dist/core/adaptive-kernel.js.map +1 -0
- package/dist/core/agent-spawn-gate.js +1 -0
- package/dist/core/agent-spawn-gate.js.map +1 -0
- package/dist/core/boot-orchestrator.js +1 -0
- package/dist/core/boot-orchestrator.js.map +1 -0
- package/dist/core/codex-formatter.js +1 -0
- package/dist/core/codex-formatter.js.map +1 -0
- package/dist/core/codex-injector.js +1 -0
- package/dist/core/codex-injector.js.map +1 -0
- package/dist/core/config-loader.js +1 -0
- package/dist/core/config-loader.js.map +1 -0
- package/dist/core/config-paths.js +2 -1
- package/dist/core/config-paths.js.map +1 -0
- package/dist/core/context-loader.js +1 -0
- package/dist/core/context-loader.js.map +1 -0
- package/dist/core/context-validator.js +1 -0
- package/dist/core/context-validator.js.map +1 -0
- package/dist/core/features-config.js +1 -0
- package/dist/core/features-config.js.map +1 -0
- package/dist/core/framework-logger.js +1 -0
- package/dist/core/framework-logger.js.map +1 -0
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -0
- package/dist/core/kernel-patterns.js +1 -0
- package/dist/core/kernel-patterns.js.map +1 -0
- package/dist/core/model-router.js +1 -0
- package/dist/core/model-router.js.map +1 -0
- package/dist/core/orchestrator.d.ts +11 -10
- package/dist/core/orchestrator.js +27 -171
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/system-prompt-generator.js +1 -0
- package/dist/core/system-prompt-generator.js.map +1 -0
- package/dist/core/xray-activation.js +2 -1
- package/dist/core/xray-activation.js.map +1 -0
- package/dist/delegation/agent-delegator.js +1 -0
- package/dist/delegation/agent-delegator.js.map +1 -0
- package/dist/delegation/agent-expertise.js +1 -0
- package/dist/delegation/agent-expertise.js.map +1 -0
- package/dist/delegation/analytics/index.js +1 -0
- package/dist/delegation/analytics/index.js.map +1 -0
- package/dist/delegation/analytics/learning-engine.js +1 -0
- package/dist/delegation/analytics/learning-engine.js.map +1 -0
- package/dist/delegation/analytics/outcome-tracker.js +1 -0
- package/dist/delegation/analytics/outcome-tracker.js.map +1 -0
- package/dist/delegation/analytics/routing-analytics.js +1 -0
- package/dist/delegation/analytics/routing-analytics.js.map +1 -0
- package/dist/delegation/ast-code-parser.js +1 -0
- package/dist/delegation/ast-code-parser.js.map +1 -0
- package/dist/delegation/codebase-context-analyzer.js +1 -0
- package/dist/delegation/codebase-context-analyzer.js.map +1 -0
- package/dist/delegation/complexity-analyzer.js +1 -0
- package/dist/delegation/complexity-analyzer.js.map +1 -0
- package/dist/delegation/complexity-core.js +1 -0
- package/dist/delegation/complexity-core.js.map +1 -0
- package/dist/delegation/config/types.js +1 -0
- package/dist/delegation/config/types.js.map +1 -0
- package/dist/delegation/dependency-graph-builder.js +1 -0
- package/dist/delegation/dependency-graph-builder.js.map +1 -0
- package/dist/delegation/index.d.ts +3 -0
- package/dist/delegation/index.js +4 -0
- package/dist/delegation/index.js.map +1 -0
- package/dist/delegation/metrics-aggregator.js +1 -0
- package/dist/delegation/metrics-aggregator.js.map +1 -0
- package/dist/delegation/session-coordinator.js +1 -0
- package/dist/delegation/session-coordinator.js.map +1 -0
- package/dist/delegation/strategy-selector.js +1 -0
- package/dist/delegation/strategy-selector.js.map +1 -0
- package/dist/delegation/voting-types.js +1 -0
- package/dist/delegation/voting-types.js.map +1 -0
- package/dist/delegation/weighted-voting-aggregator.js +1 -0
- package/dist/delegation/weighted-voting-aggregator.js.map +1 -0
- package/dist/enforcement/core/index.js +1 -0
- package/dist/enforcement/core/index.js.map +1 -0
- package/dist/enforcement/core/rule-executor.js +1 -0
- package/dist/enforcement/core/rule-executor.js.map +1 -0
- package/dist/enforcement/core/rule-hierarchy.js +1 -0
- package/dist/enforcement/core/rule-hierarchy.js.map +1 -0
- package/dist/enforcement/core/rule-registry.js +1 -0
- package/dist/enforcement/core/rule-registry.js.map +1 -0
- package/dist/enforcement/core/violation-fixer.js +1 -0
- package/dist/enforcement/core/violation-fixer.js.map +1 -0
- package/dist/enforcement/enforcer-tools.js +1 -0
- package/dist/enforcement/enforcer-tools.js.map +1 -0
- package/dist/enforcement/index.js +1 -0
- package/dist/enforcement/index.js.map +1 -0
- package/dist/enforcement/loaders/agent-triage-loader.js +1 -0
- package/dist/enforcement/loaders/agent-triage-loader.js.map +1 -0
- package/dist/enforcement/loaders/agents-md-validation-loader.js +1 -0
- package/dist/enforcement/loaders/agents-md-validation-loader.js.map +1 -0
- package/dist/enforcement/loaders/base-loader.js +1 -0
- package/dist/enforcement/loaders/base-loader.js.map +1 -0
- package/dist/enforcement/loaders/codex-loader.js +1 -0
- package/dist/enforcement/loaders/codex-loader.js.map +1 -0
- package/dist/enforcement/loaders/index.js +1 -0
- package/dist/enforcement/loaders/index.js.map +1 -0
- package/dist/enforcement/loaders/loader-orchestrator.js +1 -0
- package/dist/enforcement/loaders/loader-orchestrator.js.map +1 -0
- package/dist/enforcement/loaders/processor-loader.js +1 -0
- package/dist/enforcement/loaders/processor-loader.js.map +1 -0
- package/dist/enforcement/rule-enforcer.js +1 -0
- package/dist/enforcement/rule-enforcer.js.map +1 -0
- package/dist/enforcement/types.js +1 -0
- package/dist/enforcement/types.js.map +1 -0
- package/dist/enforcement/validators/architecture-validators.d.ts +17 -0
- package/dist/enforcement/validators/architecture-validators.js +81 -0
- package/dist/enforcement/validators/architecture-validators.js.map +1 -0
- package/dist/enforcement/validators/base-validator.js +1 -0
- package/dist/enforcement/validators/base-validator.js.map +1 -0
- package/dist/enforcement/validators/code-quality-validators.d.ts +1 -0
- package/dist/enforcement/validators/code-quality-validators.js +46 -14
- package/dist/enforcement/validators/code-quality-validators.js.map +1 -0
- package/dist/enforcement/validators/index.js +1 -0
- package/dist/enforcement/validators/index.js.map +1 -0
- package/dist/enforcement/validators/security-validators.js +1 -0
- package/dist/enforcement/validators/security-validators.js.map +1 -0
- package/dist/enforcement/validators/testing-validators.js +1 -0
- package/dist/enforcement/validators/testing-validators.js.map +1 -0
- package/dist/enforcement/validators/validator-registry.js +3 -1
- package/dist/enforcement/validators/validator-registry.js.map +1 -0
- package/dist/execution/opencode-cli-invoker.js +6 -23
- package/dist/execution/opencode-cli-invoker.js.map +1 -0
- package/dist/execution/proposal-applier.js +1 -0
- package/dist/execution/proposal-applier.js.map +1 -0
- package/dist/governance/codex-policy.service.js +1 -0
- package/dist/governance/codex-policy.service.js.map +1 -0
- package/dist/governance/governance-core.js +1 -0
- package/dist/governance/governance-core.js.map +1 -0
- package/dist/governance/governance-service.d.ts +8 -2
- package/dist/governance/governance-service.js +64 -76
- package/dist/governance/governance-service.js.map +1 -0
- package/dist/governance/governance-types.d.ts +4 -0
- package/dist/governance/governance-types.js +1 -0
- package/dist/governance/governance-types.js.map +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.js +4 -13
- package/dist/index.js.map +1 -0
- package/dist/inference/deploy-verifier.js +1 -0
- package/dist/inference/deploy-verifier.js.map +1 -0
- package/dist/inference/index.js +1 -0
- package/dist/inference/index.js.map +1 -0
- package/dist/inference/inference-accumulator.js +1 -0
- package/dist/inference/inference-accumulator.js.map +1 -0
- package/dist/inference/inference-cycle.d.ts +0 -6
- package/dist/inference/inference-cycle.js +76 -277
- package/dist/inference/inference-cycle.js.map +1 -0
- package/dist/inference/semantic-patterns.js +1 -0
- package/dist/inference/semantic-patterns.js.map +1 -0
- package/dist/inference/session-capture.js +1 -0
- package/dist/inference/session-capture.js.map +1 -0
- package/dist/integrations/base/Integration.js +1 -0
- package/dist/integrations/base/Integration.js.map +1 -0
- package/dist/integrations/base/index.js +1 -0
- package/dist/integrations/base/index.js.map +1 -0
- package/dist/integrations/base/registry.js +1 -0
- package/dist/integrations/base/registry.js.map +1 -0
- package/dist/integrations/base/types.js +1 -0
- package/dist/integrations/base/types.js.map +1 -0
- package/dist/integrations/enforcement-gate.d.ts +44 -0
- package/dist/integrations/enforcement-gate.js +351 -0
- package/dist/integrations/enforcement-gate.js.map +1 -0
- package/dist/integrations/governance/governance-client.d.ts +4 -1
- package/dist/integrations/governance/governance-client.js +8 -1
- package/dist/integrations/governance/governance-client.js.map +1 -0
- package/dist/integrations/governance/index.d.ts +2 -2
- package/dist/integrations/governance/index.js +26 -5
- package/dist/integrations/governance/index.js.map +1 -0
- package/dist/integrations/governance/types.d.ts +26 -0
- package/dist/integrations/governance/types.js +11 -5
- package/dist/integrations/governance/types.js.map +1 -0
- package/dist/integrations/grok/grok-cli.js +2 -1
- package/dist/integrations/grok/grok-cli.js.map +1 -0
- package/dist/integrations/grok/hooks/pre-tool-use.d.ts +18 -0
- package/dist/integrations/grok/hooks/pre-tool-use.js.map +1 -0
- package/dist/integrations/grok/plugin/0xray/.mcp.json +1 -4
- package/dist/integrations/hermes-agent/bridge.mjs +11 -34
- package/dist/integrations/hermes-agent/hermes-agent-integration.d.ts +133 -0
- package/dist/integrations/hermes-agent/hermes-agent-integration.js +504 -0
- package/dist/integrations/hermes-agent/hermes-agent-integration.js.map +1 -0
- package/dist/integrations/hermes-agent/index.d.ts +11 -0
- package/dist/integrations/hermes-agent/index.js +12 -0
- package/dist/integrations/hermes-agent/index.js.map +1 -0
- package/dist/integrations/hermes-agent/types.d.ts +227 -0
- package/dist/integrations/hermes-agent/types.js +11 -0
- package/dist/integrations/hermes-agent/types.js.map +1 -0
- package/dist/integrations/openclaw/api-server.js +1 -0
- package/dist/integrations/openclaw/api-server.js.map +1 -0
- package/dist/integrations/openclaw/client.js +1 -0
- package/dist/integrations/openclaw/client.js.map +1 -0
- package/dist/integrations/openclaw/config.js +1 -0
- package/dist/integrations/openclaw/config.js.map +1 -0
- package/dist/integrations/openclaw/hooks/xray-hooks.d.ts +11 -0
- package/dist/integrations/openclaw/hooks/xray-hooks.js +1 -0
- package/dist/integrations/openclaw/hooks/xray-hooks.js.map +1 -0
- package/dist/integrations/openclaw/index.js +24 -0
- package/dist/integrations/openclaw/index.js.map +1 -0
- package/dist/integrations/openclaw/types.js +1 -0
- package/dist/integrations/openclaw/types.js.map +1 -0
- package/dist/integrations/plugins/index.js +1 -0
- package/dist/integrations/plugins/index.js.map +1 -0
- package/dist/integrations/plugins/plugin-integration.js +1 -0
- package/dist/integrations/plugins/plugin-integration.js.map +1 -0
- package/dist/integrations/plugins/plugin-registry.js +1 -0
- package/dist/integrations/plugins/plugin-registry.js.map +1 -0
- package/dist/mcps/agent-resolver.js +1 -0
- package/dist/mcps/agent-resolver.js.map +1 -0
- package/dist/mcps/architect-tools.server.js +1 -0
- package/dist/mcps/architect-tools.server.js.map +1 -0
- package/dist/mcps/auto-format.server.js +1 -0
- package/dist/mcps/auto-format.server.js.map +1 -0
- package/dist/mcps/boot-orchestrator.server.d.ts +3 -30
- package/dist/mcps/boot-orchestrator.server.js +32 -537
- package/dist/mcps/boot-orchestrator.server.js.map +1 -0
- package/dist/mcps/config/config-loader.js +1 -0
- package/dist/mcps/config/config-loader.js.map +1 -0
- package/dist/mcps/config/config-validator.js +1 -0
- package/dist/mcps/config/config-validator.js.map +1 -0
- package/dist/mcps/config/index.js +1 -0
- package/dist/mcps/config/index.js.map +1 -0
- package/dist/mcps/config/plugin-server-registry.js +1 -0
- package/dist/mcps/config/plugin-server-registry.js.map +1 -0
- package/dist/mcps/config/server-config-registry.js +1 -0
- package/dist/mcps/config/server-config-registry.js.map +1 -0
- package/dist/mcps/connection/connection-pool.js +1 -0
- package/dist/mcps/connection/connection-pool.js.map +1 -0
- package/dist/mcps/connection/mcp-connection.js +1 -0
- package/dist/mcps/connection/mcp-connection.js.map +1 -0
- package/dist/mcps/connection/process-spawner.js +1 -0
- package/dist/mcps/connection/process-spawner.js.map +1 -0
- package/dist/mcps/enforcer-tools.server.js +1 -0
- package/dist/mcps/enforcer-tools.server.js.map +1 -0
- package/dist/mcps/estimation.server.js +1 -0
- package/dist/mcps/estimation.server.js.map +1 -0
- package/dist/mcps/framework-compliance-audit.server.js +1 -0
- package/dist/mcps/framework-compliance-audit.server.js.map +1 -0
- package/dist/mcps/framework-help.server.js +1 -0
- package/dist/mcps/framework-help.server.js.map +1 -0
- package/dist/mcps/governance.server.d.ts +2 -1
- package/dist/mcps/governance.server.js +67 -16
- package/dist/mcps/governance.server.js.map +1 -0
- package/dist/mcps/in-process-skill-registry.js +17 -0
- package/dist/mcps/in-process-skill-registry.js.map +1 -0
- package/dist/mcps/index.d.ts +17 -0
- package/dist/mcps/index.js +65 -0
- package/dist/mcps/index.js.map +1 -0
- package/dist/mcps/knowledge-skills/api-design.server.js +1 -0
- package/dist/mcps/knowledge-skills/api-design.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +1 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +1 -0
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +1 -0
- package/dist/mcps/knowledge-skills/code-analyzer.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/code-review.server.js +1 -0
- package/dist/mcps/knowledge-skills/code-review.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/content-creator.server.js +1 -0
- package/dist/mcps/knowledge-skills/content-creator.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/database-design.server.js +1 -0
- package/dist/mcps/knowledge-skills/database-design.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +1 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.js +1 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +1 -0
- package/dist/mcps/knowledge-skills/growth-strategist.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/log-monitor.server.js +1 -0
- package/dist/mcps/knowledge-skills/log-monitor.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/mobile-development.server.js +1 -0
- package/dist/mcps/knowledge-skills/mobile-development.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +1 -0
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +1 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.js +1 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +1 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/security-audit.server.js +1 -0
- package/dist/mcps/knowledge-skills/security-audit.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +1 -0
- package/dist/mcps/knowledge-skills/seo-consultant.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/session-management.server.js +1 -0
- package/dist/mcps/knowledge-skills/session-management.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +1 -0
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +16 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/strategist.server.js +1 -0
- package/dist/mcps/knowledge-skills/strategist.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/tech-writer.server.js +1 -0
- package/dist/mcps/knowledge-skills/tech-writer.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +1 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +1 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js.map +1 -0
- package/dist/mcps/lint.server.js +1 -0
- package/dist/mcps/lint.server.js.map +1 -0
- package/dist/mcps/mcp-client.js +3 -2
- package/dist/mcps/mcp-client.js.map +1 -0
- package/dist/mcps/model-health-check.server.js +1 -0
- package/dist/mcps/model-health-check.server.js.map +1 -0
- package/dist/mcps/orchestrator/config/agent-capabilities.js +1 -0
- package/dist/mcps/orchestrator/config/agent-capabilities.js.map +1 -0
- package/dist/mcps/orchestrator/execution/execution-planner.js +1 -0
- package/dist/mcps/orchestrator/execution/execution-planner.js.map +1 -0
- package/dist/mcps/orchestrator/handlers/complexity-handler.js +1 -0
- package/dist/mcps/orchestrator/handlers/complexity-handler.js.map +1 -0
- package/dist/mcps/orchestrator/handlers/status-handler.js +1 -0
- package/dist/mcps/orchestrator/handlers/status-handler.js.map +1 -0
- package/dist/mcps/orchestrator/handlers/task-handler.js +1 -0
- package/dist/mcps/orchestrator/handlers/task-handler.js.map +1 -0
- package/dist/mcps/orchestrator/server.js +1 -0
- package/dist/mcps/orchestrator/server.js.map +1 -0
- package/dist/mcps/orchestrator/types.js +1 -0
- package/dist/mcps/orchestrator/types.js.map +1 -0
- package/dist/mcps/performance-analysis.server.js +1 -0
- package/dist/mcps/performance-analysis.server.js.map +1 -0
- package/dist/mcps/processor-pipeline.server.js +1 -0
- package/dist/mcps/processor-pipeline.server.js.map +1 -0
- package/dist/mcps/protocol/protocol-constants.js +1 -0
- package/dist/mcps/protocol/protocol-constants.js.map +1 -0
- package/dist/mcps/researcher.server.js +1 -0
- package/dist/mcps/researcher.server.js.map +1 -0
- package/dist/mcps/security-scan.server.js +1 -0
- package/dist/mcps/security-scan.server.js.map +1 -0
- package/dist/mcps/shared/knowledge-skill-base.js +1 -0
- package/dist/mcps/shared/knowledge-skill-base.js.map +1 -0
- package/dist/mcps/shared/prompt-security-validator.js +1 -0
- package/dist/mcps/shared/prompt-security-validator.js.map +1 -0
- package/dist/mcps/shared/security-scanner.js +1 -0
- package/dist/mcps/shared/security-scanner.js.map +1 -0
- package/dist/mcps/simulation/index.js +1 -0
- package/dist/mcps/simulation/index.js.map +1 -0
- package/dist/mcps/simulation/server-simulations.js +1 -0
- package/dist/mcps/simulation/server-simulations.js.map +1 -0
- package/dist/mcps/simulation/simulation-engine.js +1 -0
- package/dist/mcps/simulation/simulation-engine.js.map +1 -0
- package/dist/mcps/state-manager.server.js +1 -0
- package/dist/mcps/state-manager.server.js.map +1 -0
- package/dist/mcps/tools/index.js +1 -0
- package/dist/mcps/tools/index.js.map +1 -0
- package/dist/mcps/tools/tool-cache.js +1 -0
- package/dist/mcps/tools/tool-cache.js.map +1 -0
- package/dist/mcps/tools/tool-discovery.js +1 -0
- package/dist/mcps/tools/tool-discovery.js.map +1 -0
- package/dist/mcps/tools/tool-executor.js +1 -0
- package/dist/mcps/tools/tool-executor.js.map +1 -0
- package/dist/mcps/tools/tool-registry.js +1 -0
- package/dist/mcps/tools/tool-registry.js.map +1 -0
- package/dist/mcps/types/index.js +1 -0
- package/dist/mcps/types/index.js.map +1 -0
- package/dist/mcps/types/json-rpc.types.js +1 -0
- package/dist/mcps/types/json-rpc.types.js.map +1 -0
- package/dist/mcps/types/mcp.types.js +1 -0
- package/dist/mcps/types/mcp.types.js.map +1 -0
- package/dist/metrics/agent-metrics.js +2 -1
- package/dist/metrics/agent-metrics.js.map +1 -0
- package/dist/metrics/index.js +1 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/monitoring/advanced-profiler.js +1 -0
- package/dist/monitoring/advanced-profiler.js.map +1 -0
- package/dist/monitoring/memory-monitor.js +1 -0
- package/dist/monitoring/memory-monitor.js.map +1 -0
- package/dist/monitoring/nudge-watchdog.js +1 -0
- package/dist/monitoring/nudge-watchdog.js.map +1 -0
- package/dist/monitoring/test-auto-generation-monitor.js +1 -0
- package/dist/monitoring/test-auto-generation-monitor.js.map +1 -0
- package/dist/nucleus/default-plugins.d.ts +17 -0
- package/dist/nucleus/default-plugins.js +146 -0
- package/dist/nucleus/default-plugins.js.map +1 -0
- package/dist/nucleus/govern-http.js +1 -0
- package/dist/nucleus/govern-http.js.map +1 -0
- package/dist/nucleus/index.d.ts +8 -4
- package/dist/nucleus/index.js +5 -1
- package/dist/nucleus/index.js.map +1 -0
- package/dist/nucleus/kernel.d.ts +1 -1
- package/dist/nucleus/kernel.js +1 -0
- package/dist/nucleus/kernel.js.map +1 -0
- package/dist/nucleus/orchestrator.d.ts +97 -0
- package/dist/nucleus/orchestrator.js +480 -0
- package/dist/nucleus/orchestrator.js.map +1 -0
- package/dist/nucleus/plugin-registry.d.ts +28 -0
- package/dist/nucleus/plugin-registry.js +33 -4
- package/dist/nucleus/plugin-registry.js.map +1 -0
- package/dist/nucleus/thin-dispatch.d.ts +28 -0
- package/dist/nucleus/thin-dispatch.js +58 -0
- package/dist/nucleus/thin-dispatch.js.map +1 -0
- package/dist/orchestrator/agent-spawn-governor.js +1 -0
- package/dist/orchestrator/agent-spawn-governor.js.map +1 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +1 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js.map +1 -0
- package/dist/orchestrator/intelligent-commit-batcher.js +1 -0
- package/dist/orchestrator/intelligent-commit-batcher.js.map +1 -0
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +1 -0
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js.map +1 -0
- package/dist/orchestrator/orchestrator.js +1 -0
- package/dist/orchestrator/orchestrator.js.map +1 -0
- package/dist/plugin/xray-codex-injection.js +28 -262
- package/dist/plugin/xray-codex-injection.js.map +1 -0
- package/dist/postprocessor/PostProcessor.d.ts +1 -1
- package/dist/postprocessor/PostProcessor.js +79 -1
- package/dist/postprocessor/PostProcessor.js.map +1 -0
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +1 -0
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js.map +1 -0
- package/dist/postprocessor/analysis/FailureAnalysisEngine.js +1 -0
- package/dist/postprocessor/analysis/FailureAnalysisEngine.js.map +1 -0
- package/dist/postprocessor/autofix/AutoFixEngine.js +1 -0
- package/dist/postprocessor/autofix/AutoFixEngine.js.map +1 -0
- package/dist/postprocessor/autofix/FixValidator.js +1 -0
- package/dist/postprocessor/autofix/FixValidator.js.map +1 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js +1 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js.map +1 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.js +1 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.js.map +1 -0
- package/dist/postprocessor/config.js +1 -0
- package/dist/postprocessor/config.js.map +1 -0
- package/dist/postprocessor/escalation/EscalationEngine.js +1 -0
- package/dist/postprocessor/escalation/EscalationEngine.js.map +1 -0
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.d.ts +20 -1
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.js +106 -4
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.js.map +1 -0
- package/dist/postprocessor/metamorphosis/index.d.ts +2 -0
- package/dist/postprocessor/metamorphosis/index.js +2 -0
- package/dist/postprocessor/metamorphosis/index.js.map +1 -0
- package/dist/postprocessor/monitoring/MonitoringEngine.js +1 -0
- package/dist/postprocessor/monitoring/MonitoringEngine.js.map +1 -0
- package/dist/postprocessor/redeploy/RedeployCoordinator.js +1 -0
- package/dist/postprocessor/redeploy/RedeployCoordinator.js.map +1 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.js +1 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.js.map +1 -0
- package/dist/postprocessor/services/RegressionAnalysisService.js +1 -0
- package/dist/postprocessor/services/RegressionAnalysisService.js.map +1 -0
- package/dist/postprocessor/success/SuccessHandler.js +1 -0
- package/dist/postprocessor/success/SuccessHandler.js.map +1 -0
- package/dist/postprocessor/triggers/APITrigger.js +1 -0
- package/dist/postprocessor/triggers/APITrigger.js.map +1 -0
- package/dist/postprocessor/triggers/GitHookTrigger.js +1 -0
- package/dist/postprocessor/triggers/GitHookTrigger.js.map +1 -0
- package/dist/postprocessor/triggers/WebhookTrigger.js +1 -0
- package/dist/postprocessor/triggers/WebhookTrigger.js.map +1 -0
- package/dist/postprocessor/types.d.ts +6 -0
- package/dist/postprocessor/types.js +1 -0
- package/dist/postprocessor/types.js.map +1 -0
- package/dist/postprocessor/validation/HookMetricsCollector.d.ts +47 -0
- package/dist/postprocessor/validation/HookMetricsCollector.js +188 -0
- package/dist/postprocessor/validation/HookMetricsCollector.js.map +1 -0
- package/dist/postprocessor/validation/LightweightValidator.d.ts +46 -0
- package/dist/postprocessor/validation/LightweightValidator.js +271 -0
- package/dist/postprocessor/validation/LightweightValidator.js.map +1 -0
- package/dist/processors/doc-write-guard.js +1 -0
- package/dist/processors/doc-write-guard.js.map +1 -0
- package/dist/processors/implementations/agents-md-validation-processor.js +1 -0
- package/dist/processors/implementations/agents-md-validation-processor.js.map +1 -0
- package/dist/processors/implementations/async-pattern-processor.js +1 -0
- package/dist/processors/implementations/async-pattern-processor.js.map +1 -0
- package/dist/processors/implementations/codex-compliance-processor.js +1 -0
- package/dist/processors/implementations/codex-compliance-processor.js.map +1 -0
- package/dist/processors/implementations/commit-batcher-processor.js +1 -0
- package/dist/processors/implementations/commit-batcher-processor.js.map +1 -0
- package/dist/processors/implementations/console-log-guard-processor.js +1 -0
- package/dist/processors/implementations/console-log-guard-processor.js.map +1 -0
- package/dist/processors/implementations/coverage-analysis-processor.js +1 -0
- package/dist/processors/implementations/coverage-analysis-processor.js.map +1 -0
- package/dist/processors/implementations/error-boundary-processor.js +1 -0
- package/dist/processors/implementations/error-boundary-processor.js.map +1 -0
- package/dist/processors/implementations/inference-improvement-processor.js +1 -0
- package/dist/processors/implementations/inference-improvement-processor.js.map +1 -0
- package/dist/processors/implementations/log-protection-processor.js +1 -0
- package/dist/processors/implementations/log-protection-processor.js.map +1 -0
- package/dist/processors/implementations/nudge-processor.js +1 -0
- package/dist/processors/implementations/nudge-processor.js.map +1 -0
- package/dist/processors/implementations/performance-budget-processor.js +1 -0
- package/dist/processors/implementations/performance-budget-processor.js.map +1 -0
- package/dist/processors/implementations/postprocessor-chain-validator.js +1 -0
- package/dist/processors/implementations/postprocessor-chain-validator.js.map +1 -0
- package/dist/processors/implementations/pre-validate-processor.js +1 -0
- package/dist/processors/implementations/pre-validate-processor.js.map +1 -0
- package/dist/processors/implementations/publish-preflight-processor.js +1 -0
- package/dist/processors/implementations/publish-preflight-processor.js.map +1 -0
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.js +1 -0
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.js.map +1 -0
- package/dist/processors/implementations/regression-testing-processor.js +1 -0
- package/dist/processors/implementations/regression-testing-processor.js.map +1 -0
- package/dist/processors/implementations/session-summary-processor.js +1 -0
- package/dist/processors/implementations/session-summary-processor.js.map +1 -0
- package/dist/processors/implementations/spawn-governance-processor.js +1 -0
- package/dist/processors/implementations/spawn-governance-processor.js.map +1 -0
- package/dist/processors/implementations/state-validation-processor.js +1 -0
- package/dist/processors/implementations/state-validation-processor.js.map +1 -0
- package/dist/processors/implementations/storytelling-trigger-processor.js +1 -0
- package/dist/processors/implementations/storytelling-trigger-processor.js.map +1 -0
- package/dist/processors/implementations/test-auto-creation-processor.js +1 -0
- package/dist/processors/implementations/test-auto-creation-processor.js.map +1 -0
- package/dist/processors/implementations/test-execution-processor.js +1 -0
- package/dist/processors/implementations/test-execution-processor.js.map +1 -0
- package/dist/processors/implementations/typescript-compilation-processor.js +1 -0
- package/dist/processors/implementations/typescript-compilation-processor.js.map +1 -0
- package/dist/processors/implementations/version-compliance-processor.js +1 -0
- package/dist/processors/implementations/version-compliance-processor.js.map +1 -0
- package/dist/processors/processor-interfaces.js +1 -0
- package/dist/processors/processor-interfaces.js.map +1 -0
- package/dist/processors/processor-manager.js +1 -0
- package/dist/processors/processor-manager.js.map +1 -0
- package/dist/processors/processor-types.js +1 -0
- package/dist/processors/processor-types.js.map +1 -0
- package/dist/public/XrayService.d.ts +17 -0
- package/dist/public/XrayService.js +41 -0
- package/dist/public/XrayService.js.map +1 -0
- package/dist/public/index.d.ts +4 -0
- package/dist/public/index.js +3 -0
- package/dist/public/index.js.map +1 -0
- package/dist/reporting/framework-reporting-system.js +1 -0
- package/dist/reporting/framework-reporting-system.js.map +1 -0
- package/dist/reporting/log-parser.js +1 -0
- package/dist/reporting/log-parser.js.map +1 -0
- package/dist/reporting/metrics.js +1 -0
- package/dist/reporting/metrics.js.map +1 -0
- package/dist/reporting/report-formatter.js +1 -0
- package/dist/reporting/report-formatter.js.map +1 -0
- package/dist/reporting/types.js +1 -0
- package/dist/reporting/types.js.map +1 -0
- package/dist/scripts/integration.js +1 -0
- package/dist/scripts/integration.js.map +1 -0
- package/dist/security/comprehensive-security-audit.js +1 -0
- package/dist/security/comprehensive-security-audit.js.map +1 -0
- package/dist/security/security-hardener.js +1 -0
- package/dist/security/security-hardener.js.map +1 -0
- package/dist/security/security-headers.js +1 -0
- package/dist/security/security-headers.js.map +1 -0
- package/dist/services/inference-tuner.js +1 -0
- package/dist/services/inference-tuner.js.map +1 -0
- package/dist/session/index.js +1 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/session-cleanup-manager.js +1 -0
- package/dist/session/session-cleanup-manager.js.map +1 -0
- package/dist/session/session-monitor.js +1 -0
- package/dist/session/session-monitor.js.map +1 -0
- package/dist/session/session-state-manager.js +1 -0
- package/dist/session/session-state-manager.js.map +1 -0
- package/dist/skills/xray-orchestrator/index.js +1 -0
- package/dist/skills/xray-orchestrator/index.js.map +1 -0
- package/dist/state/index.js +1 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/state-manager.js +1 -0
- package/dist/state/state-manager.js.map +1 -0
- package/dist/tools/assess-complexity-tool.js +1 -0
- package/dist/tools/assess-complexity-tool.js.map +1 -0
- package/dist/tools/query-routing-tool.js +1 -0
- package/dist/tools/query-routing-tool.js.map +1 -0
- package/dist/{postprocessor/metamorphosis/MetamorphosisEngine.d.ts → types/metamorphosis.d.ts} +2 -6
- package/dist/types/metamorphosis.js +7 -0
- package/dist/types/metamorphosis.js.map +1 -0
- package/dist/utils/codex-parser.js +1 -0
- package/dist/utils/codex-parser.js.map +1 -0
- package/dist/utils/command-runner.js +1 -0
- package/dist/utils/command-runner.js.map +1 -0
- package/dist/utils/import-resolver.js +1 -0
- package/dist/utils/import-resolver.js.map +1 -0
- package/dist/utils/language-detector.js +1 -0
- package/dist/utils/language-detector.js.map +1 -0
- package/dist/utils/path-resolver.js +1 -0
- package/dist/utils/path-resolver.js.map +1 -0
- package/dist/utils/shutdown-handler.js +1 -0
- package/dist/utils/shutdown-handler.js.map +1 -0
- package/dist/utils/task-graph.d.ts +29 -0
- package/dist/utils/task-graph.js +107 -0
- package/dist/utils/task-graph.js.map +1 -0
- package/dist/validation/estimation-validator.js +1 -0
- package/dist/validation/estimation-validator.js.map +1 -0
- package/dist/validation/report-content-validator.js +1 -0
- package/dist/validation/report-content-validator.js.map +1 -0
- package/package.json +25 -3
- package/scripts/hooks/install-hooks.cjs +100 -0
- package/scripts/hooks/run-hook.js +185 -72
- package/scripts/node/postinstall.cjs +21 -7
- package/scripts/node/prepare-consumer.cjs +6 -5
- package/scripts/node/setup.cjs +19 -6
- package/scripts/node/universal-version-manager.js +2 -2
- package/src/integrations/grok/plugin/0xray/.mcp.json +1 -4
- package/src/mcps/boot-orchestrator.server.ts +38 -690
- package/src/mcps/governance.server.ts +74 -17
- package/src/mcps/in-process-skill-registry.ts +16 -0
- package/src/mcps/index.ts +79 -0
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +13 -1
- package/src/mcps/mcp-client.ts +2 -2
- package/xray/features.json +17 -1
- package/dist/agents/multimodal-looker.d.ts +0 -9
- package/dist/agents/multimodal-looker.js +0 -93
- package/dist/benchmark/performance-benchmark.d.ts +0 -103
- package/dist/benchmark/performance-benchmark.js +0 -372
- package/dist/mcps/connection/connection-manager.d.ts +0 -39
- package/dist/mcps/connection/connection-manager.js +0 -79
- package/dist/postprocessor/metamorphosis/MetamorphosisEngine.js +0 -10
- package/dist/testing/memory-regression-suite.d.ts +0 -105
- package/dist/testing/memory-regression-suite.js +0 -258
- package/src/mcps/connection/connection-manager.ts +0 -91
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
// Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
|
|
2
|
-
import { frameworkLogger } from "../core/framework-logger.js";
|
|
3
|
-
import crypto from "crypto";
|
|
4
|
-
export class XrayPerformanceBenchmark {
|
|
5
|
-
results = [];
|
|
6
|
-
activeBenchmarks = new Map();
|
|
7
|
-
/**
|
|
8
|
-
* Start a benchmark measurement
|
|
9
|
-
*/
|
|
10
|
-
startBenchmark(operation, metadata = {}) {
|
|
11
|
-
const benchmarkId = `${operation}_${Date.now()}_${crypto.randomBytes(4).toString("hex")}`;
|
|
12
|
-
this.activeBenchmarks.set(benchmarkId, {
|
|
13
|
-
startTime: performance.now(),
|
|
14
|
-
metadata,
|
|
15
|
-
});
|
|
16
|
-
return benchmarkId;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* End a benchmark measurement
|
|
20
|
-
*/
|
|
21
|
-
endBenchmark(benchmarkId, success = true, error) {
|
|
22
|
-
const activeBenchmark = this.activeBenchmarks.get(benchmarkId);
|
|
23
|
-
if (!activeBenchmark) {
|
|
24
|
-
frameworkLogger.log("performance-benchmark", "benchmark-not-found", "warning", { benchmarkId });
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
const endTime = performance.now();
|
|
28
|
-
const duration = endTime - activeBenchmark.startTime;
|
|
29
|
-
const result = {
|
|
30
|
-
operation: benchmarkId.split("_")[0] || "unknown",
|
|
31
|
-
startTime: activeBenchmark.startTime,
|
|
32
|
-
endTime,
|
|
33
|
-
duration,
|
|
34
|
-
success,
|
|
35
|
-
metadata: activeBenchmark.metadata,
|
|
36
|
-
error,
|
|
37
|
-
};
|
|
38
|
-
this.results.push(result);
|
|
39
|
-
this.activeBenchmarks.delete(benchmarkId);
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Benchmark boot sequence performance
|
|
44
|
-
*/
|
|
45
|
-
async benchmarkBootSequence(_bootOrchestrator) {
|
|
46
|
-
const result = {
|
|
47
|
-
totalBootTime: 0,
|
|
48
|
-
phaseTimings: {},
|
|
49
|
-
componentLoadTimes: {},
|
|
50
|
-
memoryUsage: {
|
|
51
|
-
beforeBoot: 0,
|
|
52
|
-
afterBoot: 0,
|
|
53
|
-
peakDuringBoot: 0,
|
|
54
|
-
},
|
|
55
|
-
success: false,
|
|
56
|
-
errors: [],
|
|
57
|
-
};
|
|
58
|
-
const bootStartTime = performance.now();
|
|
59
|
-
const peakMemory = 0;
|
|
60
|
-
try {
|
|
61
|
-
// Measure initial memory
|
|
62
|
-
result.memoryUsage.beforeBoot = process.memoryUsage().heapUsed;
|
|
63
|
-
// Phase 1: Orchestrator loading
|
|
64
|
-
const orchestratorStart = performance.now();
|
|
65
|
-
const benchmarkId = this.startBenchmark("orchestrator_load");
|
|
66
|
-
// Boot sequence will be executed by the caller
|
|
67
|
-
const orchestratorResult = this.endBenchmark(benchmarkId, true);
|
|
68
|
-
if (orchestratorResult) {
|
|
69
|
-
result.phaseTimings.orchestrator_load = orchestratorResult.duration;
|
|
70
|
-
result.componentLoadTimes.orchestrator = orchestratorResult.duration;
|
|
71
|
-
}
|
|
72
|
-
// Phase 2: Delegation system initialization
|
|
73
|
-
const delegationStart = performance.now();
|
|
74
|
-
const delegationBenchmarkId = this.startBenchmark("delegation_init");
|
|
75
|
-
// This will be measured during actual boot
|
|
76
|
-
const delegationResult = this.endBenchmark(delegationBenchmarkId, true);
|
|
77
|
-
if (delegationResult) {
|
|
78
|
-
result.phaseTimings.delegation_init = delegationResult.duration;
|
|
79
|
-
result.componentLoadTimes.delegation_system = delegationResult.duration;
|
|
80
|
-
}
|
|
81
|
-
// Phase 3: Session management initialization
|
|
82
|
-
const sessionStart = performance.now();
|
|
83
|
-
const sessionBenchmarkId = this.startBenchmark("session_management_init");
|
|
84
|
-
const sessionResult = this.endBenchmark(sessionBenchmarkId, true);
|
|
85
|
-
if (sessionResult) {
|
|
86
|
-
result.phaseTimings.session_management_init = sessionResult.duration;
|
|
87
|
-
result.componentLoadTimes.session_management = sessionResult.duration;
|
|
88
|
-
}
|
|
89
|
-
// Phase 4: Processor activation
|
|
90
|
-
const processorStart = performance.now();
|
|
91
|
-
const processorBenchmarkId = this.startBenchmark("processor_activation");
|
|
92
|
-
const processorResult = this.endBenchmark(processorBenchmarkId, true);
|
|
93
|
-
if (processorResult) {
|
|
94
|
-
result.phaseTimings.processor_activation = processorResult.duration;
|
|
95
|
-
result.componentLoadTimes.processor_pipeline = processorResult.duration;
|
|
96
|
-
}
|
|
97
|
-
// Phase 5: Agent loading
|
|
98
|
-
const agentStart = performance.now();
|
|
99
|
-
const agentBenchmarkId = this.startBenchmark("agent_loading");
|
|
100
|
-
const agentResult = this.endBenchmark(agentBenchmarkId, true);
|
|
101
|
-
if (agentResult) {
|
|
102
|
-
result.phaseTimings.agent_loading = agentResult.duration;
|
|
103
|
-
result.componentLoadTimes.agent_loading = agentResult.duration;
|
|
104
|
-
}
|
|
105
|
-
// Phase 6: Enforcement activation
|
|
106
|
-
const enforcementStart = performance.now();
|
|
107
|
-
const enforcementBenchmarkId = this.startBenchmark("enforcement_activation");
|
|
108
|
-
const enforcementResult = this.endBenchmark(enforcementBenchmarkId, true);
|
|
109
|
-
if (enforcementResult) {
|
|
110
|
-
result.phaseTimings.enforcement_activation = enforcementResult.duration;
|
|
111
|
-
result.componentLoadTimes.enforcement_system =
|
|
112
|
-
enforcementResult.duration;
|
|
113
|
-
}
|
|
114
|
-
// Phase 7: Codex compliance activation
|
|
115
|
-
const codexStart = performance.now();
|
|
116
|
-
const codexBenchmarkId = this.startBenchmark("codex_compliance_activation");
|
|
117
|
-
const codexResult = this.endBenchmark(codexBenchmarkId, true);
|
|
118
|
-
if (codexResult) {
|
|
119
|
-
result.phaseTimings.codex_compliance_activation = codexResult.duration;
|
|
120
|
-
result.componentLoadTimes.codex_compliance = codexResult.duration;
|
|
121
|
-
}
|
|
122
|
-
// Calculate total boot time
|
|
123
|
-
result.totalBootTime = performance.now() - bootStartTime;
|
|
124
|
-
result.memoryUsage.afterBoot = process.memoryUsage().heapUsed;
|
|
125
|
-
result.memoryUsage.peakDuringBoot = peakMemory;
|
|
126
|
-
result.success = true;
|
|
127
|
-
}
|
|
128
|
-
catch (error) {
|
|
129
|
-
result.errors.push(error instanceof Error ? error.message : String(error));
|
|
130
|
-
result.success = false;
|
|
131
|
-
}
|
|
132
|
-
return result;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Benchmark orchestrator task execution
|
|
136
|
-
*/
|
|
137
|
-
async benchmarkOrchestratorTasks(_orchestrator, taskCount = 10, concurrentTasks = 3) {
|
|
138
|
-
const result = {
|
|
139
|
-
taskExecutionTimes: [],
|
|
140
|
-
delegationLatencies: [],
|
|
141
|
-
conflictResolutionTimes: [],
|
|
142
|
-
concurrentTaskThroughput: 0,
|
|
143
|
-
dependencyResolutionTime: 0,
|
|
144
|
-
overallSuccess: true,
|
|
145
|
-
};
|
|
146
|
-
try {
|
|
147
|
-
// Benchmark single task execution
|
|
148
|
-
for (let i = 0; i < taskCount; i++) {
|
|
149
|
-
const taskStart = performance.now();
|
|
150
|
-
const benchmarkId = this.startBenchmark(`single_task_${i}`, {
|
|
151
|
-
taskId: `task_${i}`,
|
|
152
|
-
});
|
|
153
|
-
// Simulate task execution
|
|
154
|
-
await new Promise((resolve) => setTimeout(resolve, Math.random() * 100 + 50));
|
|
155
|
-
const taskResult = this.endBenchmark(benchmarkId, true);
|
|
156
|
-
if (taskResult) {
|
|
157
|
-
result.taskExecutionTimes.push(taskResult.duration);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
// Benchmark concurrent task execution
|
|
161
|
-
const concurrentStart = performance.now();
|
|
162
|
-
const concurrentPromises = [];
|
|
163
|
-
for (let i = 0; i < concurrentTasks; i++) {
|
|
164
|
-
const benchmarkId = this.startBenchmark(`concurrent_task_${i}`, {
|
|
165
|
-
concurrent: true,
|
|
166
|
-
});
|
|
167
|
-
const promise = new Promise((resolve) => {
|
|
168
|
-
setTimeout(() => {
|
|
169
|
-
this.endBenchmark(benchmarkId, true);
|
|
170
|
-
resolve();
|
|
171
|
-
}, Math.random() * 200 + 100);
|
|
172
|
-
});
|
|
173
|
-
concurrentPromises.push(promise);
|
|
174
|
-
}
|
|
175
|
-
await Promise.all(concurrentPromises);
|
|
176
|
-
const concurrentEnd = performance.now();
|
|
177
|
-
result.concurrentTaskThroughput =
|
|
178
|
-
concurrentTasks / ((concurrentEnd - concurrentStart) / 1000);
|
|
179
|
-
// Benchmark complex task with dependencies
|
|
180
|
-
const dependencyStart = performance.now();
|
|
181
|
-
const dependencyBenchmarkId = this.startBenchmark("dependency_resolution");
|
|
182
|
-
const complexTasks = [
|
|
183
|
-
{
|
|
184
|
-
id: "task_a",
|
|
185
|
-
description: "Task A",
|
|
186
|
-
subagentType: "architect",
|
|
187
|
-
dependencies: [],
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
id: "task_b",
|
|
191
|
-
description: "Task B",
|
|
192
|
-
subagentType: "code-reviewer",
|
|
193
|
-
dependencies: ["task_a"],
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
id: "task_c",
|
|
197
|
-
description: "Task C",
|
|
198
|
-
subagentType: "researcher",
|
|
199
|
-
dependencies: ["task_b"],
|
|
200
|
-
},
|
|
201
|
-
];
|
|
202
|
-
// Simulate dependency resolution
|
|
203
|
-
await new Promise((resolve) => setTimeout(resolve, 150));
|
|
204
|
-
const dependencyResult = this.endBenchmark(dependencyBenchmarkId, true);
|
|
205
|
-
if (dependencyResult) {
|
|
206
|
-
result.dependencyResolutionTime = dependencyResult.duration;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
catch (error) {
|
|
210
|
-
result.overallSuccess = false;
|
|
211
|
-
await frameworkLogger.log("performance-benchmark", "orchestrator-benchmarking-failed", "error", { error: String(error) });
|
|
212
|
-
}
|
|
213
|
-
return result;
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Benchmark session management operations
|
|
217
|
-
*/
|
|
218
|
-
async benchmarkSessionOperations(_sessionStateManager, operationCount = 20) {
|
|
219
|
-
const result = {
|
|
220
|
-
stateShareLatencies: [],
|
|
221
|
-
dependencyUpdateTimes: [],
|
|
222
|
-
groupOperationTimes: [],
|
|
223
|
-
migrationTimes: [],
|
|
224
|
-
failoverTimes: [],
|
|
225
|
-
concurrentSessionOperations: 0,
|
|
226
|
-
};
|
|
227
|
-
try {
|
|
228
|
-
// Benchmark state sharing
|
|
229
|
-
for (let i = 0; i < operationCount; i++) {
|
|
230
|
-
const shareStart = performance.now();
|
|
231
|
-
const benchmarkId = this.startBenchmark(`state_share_${i}`, {
|
|
232
|
-
operation: "share",
|
|
233
|
-
});
|
|
234
|
-
// Simulate state sharing
|
|
235
|
-
await new Promise((resolve) => setTimeout(resolve, Math.random() * 20 + 5));
|
|
236
|
-
const shareResult = this.endBenchmark(benchmarkId, true);
|
|
237
|
-
if (shareResult) {
|
|
238
|
-
result.stateShareLatencies.push(shareResult.duration);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
// Benchmark dependency operations
|
|
242
|
-
for (let i = 0; i < operationCount / 2; i++) {
|
|
243
|
-
const depStart = performance.now();
|
|
244
|
-
const benchmarkId = this.startBenchmark(`dependency_update_${i}`, {
|
|
245
|
-
operation: "dependency",
|
|
246
|
-
});
|
|
247
|
-
// Simulate dependency update
|
|
248
|
-
await new Promise((resolve) => setTimeout(resolve, Math.random() * 30 + 10));
|
|
249
|
-
const depResult = this.endBenchmark(benchmarkId, true);
|
|
250
|
-
if (depResult) {
|
|
251
|
-
result.dependencyUpdateTimes.push(depResult.duration);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
// Benchmark group operations
|
|
255
|
-
const groupStart = performance.now();
|
|
256
|
-
const groupBenchmarkId = this.startBenchmark("group_operations", {
|
|
257
|
-
operation: "group",
|
|
258
|
-
});
|
|
259
|
-
// Simulate group operations
|
|
260
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
261
|
-
const groupResult = this.endBenchmark(groupBenchmarkId, true);
|
|
262
|
-
if (groupResult) {
|
|
263
|
-
result.groupOperationTimes.push(groupResult.duration);
|
|
264
|
-
}
|
|
265
|
-
// Benchmark migration simulation
|
|
266
|
-
const migrationStart = performance.now();
|
|
267
|
-
const migrationBenchmarkId = this.startBenchmark("session_migration", {
|
|
268
|
-
operation: "migration",
|
|
269
|
-
});
|
|
270
|
-
// Simulate migration
|
|
271
|
-
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
272
|
-
const migrationResult = this.endBenchmark(migrationBenchmarkId, true);
|
|
273
|
-
if (migrationResult) {
|
|
274
|
-
result.migrationTimes.push(migrationResult.duration);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
catch (error) {
|
|
278
|
-
await frameworkLogger.log("performance-benchmark", "session-benchmarking-failed", "error", { error: String(error) });
|
|
279
|
-
}
|
|
280
|
-
return result;
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Calculate performance metrics from benchmark results
|
|
284
|
-
*/
|
|
285
|
-
calculateMetrics(operationFilter) {
|
|
286
|
-
const filteredResults = operationFilter
|
|
287
|
-
? this.results.filter((r) => r.operation.includes(operationFilter))
|
|
288
|
-
: this.results;
|
|
289
|
-
if (filteredResults.length === 0) {
|
|
290
|
-
return {
|
|
291
|
-
totalOperations: 0,
|
|
292
|
-
successfulOperations: 0,
|
|
293
|
-
failedOperations: 0,
|
|
294
|
-
averageDuration: 0,
|
|
295
|
-
medianDuration: 0,
|
|
296
|
-
p95Duration: 0,
|
|
297
|
-
p99Duration: 0,
|
|
298
|
-
minDuration: 0,
|
|
299
|
-
maxDuration: 0,
|
|
300
|
-
throughput: 0,
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
const durations = filteredResults
|
|
304
|
-
.map((r) => r.duration)
|
|
305
|
-
.sort((a, b) => a - b);
|
|
306
|
-
const successful = filteredResults.filter((r) => r.success);
|
|
307
|
-
const totalTime = Math.max(...filteredResults.map((r) => r.endTime)) -
|
|
308
|
-
Math.min(...filteredResults.map((r) => r.startTime));
|
|
309
|
-
const avgDuration = durations.length > 0
|
|
310
|
-
? durations.reduce((a, b) => a + b, 0) / durations.length
|
|
311
|
-
: 0;
|
|
312
|
-
const medianIndex = Math.floor(durations.length / 2);
|
|
313
|
-
const medianDuration = durations.length > 0 ? durations[medianIndex] : 0;
|
|
314
|
-
const p95Index = Math.floor(durations.length * 0.95);
|
|
315
|
-
const p95Duration = durations.length > 0 ? durations[p95Index] : 0;
|
|
316
|
-
const p99Index = Math.floor(durations.length * 0.99);
|
|
317
|
-
const p99Duration = durations.length > 0 ? durations[p99Index] : 0;
|
|
318
|
-
const minDuration = durations.length > 0 ? Math.min(...durations) : 0;
|
|
319
|
-
const maxDuration = durations.length > 0 ? Math.max(...durations) : 0;
|
|
320
|
-
return {
|
|
321
|
-
totalOperations: filteredResults.length,
|
|
322
|
-
successfulOperations: successful.length,
|
|
323
|
-
failedOperations: filteredResults.length - successful.length,
|
|
324
|
-
averageDuration: avgDuration,
|
|
325
|
-
medianDuration,
|
|
326
|
-
p95Duration,
|
|
327
|
-
p99Duration,
|
|
328
|
-
minDuration,
|
|
329
|
-
maxDuration,
|
|
330
|
-
throughput: filteredResults.length / (totalTime / 1000),
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Generate comprehensive benchmark report
|
|
335
|
-
*/
|
|
336
|
-
generateReport() {
|
|
337
|
-
const summary = this.calculateMetrics();
|
|
338
|
-
const report = {
|
|
339
|
-
summary,
|
|
340
|
-
recommendations: [],
|
|
341
|
-
};
|
|
342
|
-
// Analyze results and generate recommendations
|
|
343
|
-
if (summary.averageDuration > 100) {
|
|
344
|
-
report.recommendations.push("Consider optimizing slow operations (>100ms average)");
|
|
345
|
-
}
|
|
346
|
-
if (summary.failedOperations > 0) {
|
|
347
|
-
report.recommendations.push(`${summary.failedOperations} operations failed - investigate error patterns`);
|
|
348
|
-
}
|
|
349
|
-
if (summary.p95Duration > 500) {
|
|
350
|
-
report.recommendations.push("P95 latency >500ms - consider performance optimizations");
|
|
351
|
-
}
|
|
352
|
-
if (summary.throughput < 10) {
|
|
353
|
-
report.recommendations.push("Low throughput (<10 ops/sec) - evaluate bottlenecks");
|
|
354
|
-
}
|
|
355
|
-
return report;
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Clear all benchmark results
|
|
359
|
-
*/
|
|
360
|
-
clearResults() {
|
|
361
|
-
this.results = [];
|
|
362
|
-
this.activeBenchmarks.clear();
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Export results for external analysis
|
|
366
|
-
*/
|
|
367
|
-
exportResults() {
|
|
368
|
-
return [...this.results];
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
// Export singleton instance
|
|
372
|
-
export const performanceBenchmark = new XrayPerformanceBenchmark();
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { IMcpConnection, IServerConfig } from '../types/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Connection Manager
|
|
4
|
-
* Manages MCP connection lifecycle and provides centralized access to connections
|
|
5
|
-
*/
|
|
6
|
-
export declare class ConnectionManager {
|
|
7
|
-
private connections;
|
|
8
|
-
/**
|
|
9
|
-
* Get or create a connection for a server
|
|
10
|
-
* @param config - Server configuration
|
|
11
|
-
* @returns Promise resolving to an MCP connection
|
|
12
|
-
*/
|
|
13
|
-
getConnection(config: IServerConfig): Promise<IMcpConnection>;
|
|
14
|
-
/**
|
|
15
|
-
* Disconnect a specific server
|
|
16
|
-
* @param serverName - Name of the server to disconnect
|
|
17
|
-
*/
|
|
18
|
-
disconnect(serverName: string): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Disconnect all managed connections
|
|
21
|
-
*/
|
|
22
|
-
disconnectAll(): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Check if a connection exists for a server
|
|
25
|
-
* @param serverName - Name of the server
|
|
26
|
-
* @returns True if connection exists and is connected
|
|
27
|
-
*/
|
|
28
|
-
hasConnection(serverName: string): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Get all connected server names
|
|
31
|
-
* @returns Array of server names
|
|
32
|
-
*/
|
|
33
|
-
getConnectedServers(): string[];
|
|
34
|
-
/**
|
|
35
|
-
* Get the number of active connections
|
|
36
|
-
* @returns Number of connections
|
|
37
|
-
*/
|
|
38
|
-
getConnectionCount(): number;
|
|
39
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { McpConnection } from './mcp-connection.js';
|
|
2
|
-
import { frameworkLogger } from '../../core/framework-logger.js';
|
|
3
|
-
/**
|
|
4
|
-
* Connection Manager
|
|
5
|
-
* Manages MCP connection lifecycle and provides centralized access to connections
|
|
6
|
-
*/
|
|
7
|
-
export class ConnectionManager {
|
|
8
|
-
connections = new Map();
|
|
9
|
-
/**
|
|
10
|
-
* Get or create a connection for a server
|
|
11
|
-
* @param config - Server configuration
|
|
12
|
-
* @returns Promise resolving to an MCP connection
|
|
13
|
-
*/
|
|
14
|
-
async getConnection(config) {
|
|
15
|
-
const existingConnection = this.connections.get(config.serverName);
|
|
16
|
-
if (existingConnection && existingConnection.isConnected) {
|
|
17
|
-
return existingConnection;
|
|
18
|
-
}
|
|
19
|
-
// If existing connection is disconnected, remove it
|
|
20
|
-
if (existingConnection) {
|
|
21
|
-
await existingConnection.disconnect();
|
|
22
|
-
this.connections.delete(config.serverName);
|
|
23
|
-
}
|
|
24
|
-
// Create new connection
|
|
25
|
-
const connection = new McpConnection(config);
|
|
26
|
-
await connection.connect();
|
|
27
|
-
this.connections.set(config.serverName, connection);
|
|
28
|
-
return connection;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Disconnect a specific server
|
|
32
|
-
* @param serverName - Name of the server to disconnect
|
|
33
|
-
*/
|
|
34
|
-
async disconnect(serverName) {
|
|
35
|
-
const connection = this.connections.get(serverName);
|
|
36
|
-
if (connection) {
|
|
37
|
-
await connection.disconnect();
|
|
38
|
-
this.connections.delete(serverName);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Disconnect all managed connections
|
|
43
|
-
*/
|
|
44
|
-
async disconnectAll() {
|
|
45
|
-
const disconnectPromises = [];
|
|
46
|
-
for (const [serverName, connection] of this.connections) {
|
|
47
|
-
disconnectPromises.push(connection.disconnect().catch((error) => {
|
|
48
|
-
frameworkLogger.log("connection-manager", "disconnect-error", "error", { serverName, error });
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
await Promise.all(disconnectPromises);
|
|
52
|
-
this.connections.clear();
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Check if a connection exists for a server
|
|
56
|
-
* @param serverName - Name of the server
|
|
57
|
-
* @returns True if connection exists and is connected
|
|
58
|
-
*/
|
|
59
|
-
hasConnection(serverName) {
|
|
60
|
-
const connection = this.connections.get(serverName);
|
|
61
|
-
return connection !== undefined && connection.isConnected;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get all connected server names
|
|
65
|
-
* @returns Array of server names
|
|
66
|
-
*/
|
|
67
|
-
getConnectedServers() {
|
|
68
|
-
return Array.from(this.connections.entries())
|
|
69
|
-
.filter(([, connection]) => connection.isConnected)
|
|
70
|
-
.map(([name]) => name);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Get the number of active connections
|
|
74
|
-
* @returns Number of connections
|
|
75
|
-
*/
|
|
76
|
-
getConnectionCount() {
|
|
77
|
-
return this.getConnectedServers().length;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MetamorphosisEngine — Phase 0.5 skeleton
|
|
3
|
-
*
|
|
4
|
-
* Plug into PostProcessor lifecycle hooks to observe phases and proposals.
|
|
5
|
-
* No-op when none configured. Concrete engines will be built in Phase 2.
|
|
6
|
-
*
|
|
7
|
-
* Integration: PostProcessor accepts optional MetamorphosisEngine[] in constructor.
|
|
8
|
-
* Each engine receives onPhase/onProposal lifecycle notifications.
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "events";
|
|
2
|
-
/**
|
|
3
|
-
* Memory Regression Testing Suite
|
|
4
|
-
* Automated testing for memory usage patterns and leak detection
|
|
5
|
-
*/
|
|
6
|
-
export interface MemoryRegressionTest {
|
|
7
|
-
name: string;
|
|
8
|
-
description: string;
|
|
9
|
-
setup?: (() => Promise<void> | void) | undefined;
|
|
10
|
-
execute: () => Promise<any> | any;
|
|
11
|
-
cleanup?: (() => Promise<void> | void) | undefined;
|
|
12
|
-
expectedMemoryDelta: {
|
|
13
|
-
maxIncrease: number;
|
|
14
|
-
acceptableLeak: number;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export interface MemoryRegressionResult {
|
|
18
|
-
testName: string;
|
|
19
|
-
passed: boolean;
|
|
20
|
-
memoryDelta: number;
|
|
21
|
-
leakRate: number;
|
|
22
|
-
duration: number;
|
|
23
|
-
error?: string;
|
|
24
|
-
recommendations: string[];
|
|
25
|
-
}
|
|
26
|
-
export interface RegressionSuiteConfig {
|
|
27
|
-
testTimeout: number;
|
|
28
|
-
memorySamplingInterval: number;
|
|
29
|
-
acceptableMemoryGrowth: number;
|
|
30
|
-
leakDetectionThreshold: number;
|
|
31
|
-
}
|
|
32
|
-
export declare class MemoryRegressionTester extends EventEmitter {
|
|
33
|
-
private config;
|
|
34
|
-
private tests;
|
|
35
|
-
constructor(config?: Partial<RegressionSuiteConfig>);
|
|
36
|
-
/**
|
|
37
|
-
* Add a regression test
|
|
38
|
-
*/
|
|
39
|
-
addTest(test: MemoryRegressionTest): void;
|
|
40
|
-
/**
|
|
41
|
-
* Run all regression tests
|
|
42
|
-
*/
|
|
43
|
-
runAllTests(): Promise<MemoryRegressionResult[]>;
|
|
44
|
-
/**
|
|
45
|
-
* Run a single regression test
|
|
46
|
-
*/
|
|
47
|
-
private runTest;
|
|
48
|
-
/**
|
|
49
|
-
* Create a standard memory regression test
|
|
50
|
-
*/
|
|
51
|
-
createStandardTest(name: string, description: string, testFunction: () => Promise<any> | any, options?: {
|
|
52
|
-
maxMemoryIncrease?: number;
|
|
53
|
-
acceptableLeakRate?: number;
|
|
54
|
-
setup?: () => Promise<void> | void;
|
|
55
|
-
cleanup?: () => Promise<void> | void;
|
|
56
|
-
}): MemoryRegressionTest;
|
|
57
|
-
/**
|
|
58
|
-
* Generate test report
|
|
59
|
-
*/
|
|
60
|
-
generateReport(results: MemoryRegressionResult[]): string;
|
|
61
|
-
/**
|
|
62
|
-
* Calculate variance of memory samples
|
|
63
|
-
*/
|
|
64
|
-
private calculateVariance;
|
|
65
|
-
}
|
|
66
|
-
export declare const memoryTestTemplates: {
|
|
67
|
-
sessionOperations: (sessionCount?: number) => {
|
|
68
|
-
name: string;
|
|
69
|
-
description: string;
|
|
70
|
-
setup: () => Promise<void>;
|
|
71
|
-
execute: () => Promise<{
|
|
72
|
-
id: string;
|
|
73
|
-
data: {
|
|
74
|
-
userId: number;
|
|
75
|
-
metadata: {
|
|
76
|
-
created: number;
|
|
77
|
-
active: boolean;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
}[]>;
|
|
81
|
-
cleanup: () => Promise<void>;
|
|
82
|
-
expectedMemoryDelta: {
|
|
83
|
-
maxIncrease: number;
|
|
84
|
-
acceptableLeak: number;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
cacheOperations: (cacheSize?: number) => {
|
|
88
|
-
name: string;
|
|
89
|
-
description: string;
|
|
90
|
-
execute: () => Promise<number>;
|
|
91
|
-
expectedMemoryDelta: {
|
|
92
|
-
maxIncrease: number;
|
|
93
|
-
acceptableLeak: number;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
streamingOperations: (messageCount?: number) => {
|
|
97
|
-
name: string;
|
|
98
|
-
description: string;
|
|
99
|
-
execute: () => Promise<number>;
|
|
100
|
-
expectedMemoryDelta: {
|
|
101
|
-
maxIncrease: number;
|
|
102
|
-
acceptableLeak: number;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
};
|