0xray 2.1.4 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/enforcer-config.json +2 -2
- package/.opencode/init.sh +1 -1
- package/AGENTS.md +6 -6
- package/README.md +4 -4
- package/dist/AGENTS.md +6 -6
- package/dist/CHANGELOG.md +39 -0
- package/dist/README.md +4 -4
- package/dist/agents/code-reviewer.js +1 -1
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/cli/commands/govern.d.ts +29 -0
- package/dist/cli/commands/govern.js +152 -0
- package/dist/cli/index.js +29 -216
- package/dist/core/boot-orchestrator.js +2 -2
- package/dist/core/features-config.js +1 -1
- package/dist/core/framework-logger.d.ts +1 -0
- package/dist/core/framework-logger.js +57 -2
- package/dist/delegation/index.d.ts +1 -2
- package/dist/delegation/index.js +1 -2
- package/dist/enforcement/enforcer-tools.js +1 -1
- package/dist/execution/proposal-applier.d.ts +1 -9
- package/dist/execution/proposal-applier.js +18 -173
- package/dist/governance/codex-policy.service.d.ts +7 -25
- package/dist/governance/codex-policy.service.js +8 -26
- package/dist/governance/governance-core.d.ts +22 -28
- package/dist/governance/governance-core.js +31 -101
- package/dist/governance/governance-service.d.ts +1 -0
- package/dist/governance/governance-service.js +67 -4
- package/dist/governance/governance-types.d.ts +5 -2
- package/dist/inference/index.d.ts +3 -4
- package/dist/inference/inference-accumulator.js +1 -1
- package/dist/inference/inference-cycle.d.ts +12 -18
- package/dist/inference/inference-cycle.js +120 -335
- package/dist/integrations/base/index.d.ts +0 -1
- package/dist/integrations/base/index.js +0 -2
- package/dist/integrations/grok/hooks/pre-tool-use.js +4 -18
- package/dist/integrations/hermes-agent/bridge.mjs +9 -0
- package/dist/mcps/config/server-config-registry.js +1 -1
- package/dist/mcps/governance.server.js +4 -5
- package/dist/mcps/knowledge-skills/api-design.server.js +10 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +10 -0
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +10 -0
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +10 -0
- package/dist/mcps/knowledge-skills/code-review.server.js +10 -0
- package/dist/mcps/knowledge-skills/content-creator.server.js +10 -0
- package/dist/mcps/knowledge-skills/database-design.server.js +10 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +10 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.js +10 -0
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +10 -0
- package/dist/mcps/knowledge-skills/log-monitor.server.js +10 -0
- package/dist/mcps/knowledge-skills/mobile-development.server.js +10 -0
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +10 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +10 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.js +10 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +10 -0
- package/dist/mcps/knowledge-skills/security-audit.server.js +10 -0
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +10 -0
- package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +4 -0
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +33 -14
- package/dist/mcps/knowledge-skills/strategist.server.js +10 -0
- package/dist/mcps/knowledge-skills/tech-writer.server.js +11 -1
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +10 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +10 -0
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/simulation/server-simulations.js +1 -1
- package/dist/metrics/agent-metrics.d.ts +2 -1
- package/dist/nucleus/govern-http.d.ts +59 -0
- package/dist/nucleus/govern-http.js +172 -0
- package/dist/nucleus/index.d.ts +14 -0
- package/dist/nucleus/index.js +9 -0
- package/dist/nucleus/kernel.d.ts +51 -0
- package/dist/nucleus/kernel.js +62 -0
- package/dist/nucleus/plugin-registry.d.ts +104 -0
- package/dist/nucleus/plugin-registry.js +147 -0
- package/dist/orchestrator/orchestrator.d.ts +0 -1
- package/dist/orchestrator/orchestrator.js +0 -21
- package/dist/postprocessor/PostProcessor.d.ts +13 -1
- package/dist/postprocessor/PostProcessor.js +41 -1
- package/dist/postprocessor/autofix/AutoFixEngine.d.ts +0 -8
- package/dist/postprocessor/autofix/AutoFixEngine.js +0 -54
- package/dist/postprocessor/metamorphosis/MetamorphosisEngine.d.ts +25 -0
- package/dist/postprocessor/metamorphosis/MetamorphosisEngine.js +10 -0
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.d.ts +68 -0
- package/dist/postprocessor/metamorphosis/SelfProposalEngine.js +371 -0
- package/dist/skills/orchestrator/SKILL.md +1 -1
- package/dist/skills/registry.json +1 -1
- package/dist/state/index.d.ts +0 -2
- package/package.json +4 -3
- package/scripts/node/universal-version-manager.js +9 -9
- package/scripts/node/validate-mcp-connectivity.js +1 -1
- package/src/mcps/config/__tests__/server-config-registry.test.ts +6 -15
- package/src/mcps/config/server-config-registry.ts +1 -1
- package/src/mcps/governance.server.ts +4 -6
- package/src/mcps/knowledge-skills/api-design.server.ts +9 -0
- package/src/mcps/knowledge-skills/architecture-patterns.server.ts +9 -0
- package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +9 -0
- package/src/mcps/knowledge-skills/code-analyzer.server.ts +9 -0
- package/src/mcps/knowledge-skills/code-review.server.ts +9 -0
- package/src/mcps/knowledge-skills/content-creator.server.ts +9 -0
- package/src/mcps/knowledge-skills/database-design.server.ts +9 -0
- package/src/mcps/knowledge-skills/devops-deployment.server.ts +9 -0
- package/src/mcps/knowledge-skills/git-workflow.server.ts +9 -0
- package/src/mcps/knowledge-skills/growth-strategist.server.ts +9 -0
- package/src/mcps/knowledge-skills/log-monitor.server.ts +9 -0
- package/src/mcps/knowledge-skills/mobile-development.server.ts +9 -0
- package/src/mcps/knowledge-skills/multimodal-looker.server.ts +9 -0
- package/src/mcps/knowledge-skills/performance-optimization.server.ts +9 -0
- package/src/mcps/knowledge-skills/project-analysis.server.ts +9 -0
- package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +9 -0
- package/src/mcps/knowledge-skills/security-audit.server.ts +9 -0
- package/src/mcps/knowledge-skills/seo-consultant.server.ts +9 -0
- package/src/mcps/knowledge-skills/session-management.server.ts +1 -0
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +44 -29
- package/src/mcps/knowledge-skills/strategist.server.ts +9 -0
- package/src/mcps/knowledge-skills/tech-writer.server.ts +10 -1
- package/src/mcps/knowledge-skills/testing-strategy.server.ts +9 -0
- package/src/mcps/knowledge-skills/ui-ux-design.server.ts +9 -0
- package/src/mcps/registry.json +1 -1
- package/src/mcps/simulation/server-simulations.ts +1 -1
- package/src/opencode/codex.codex +1 -1
- package/src/opencode/commands/dependency-audit.md +3 -3
- package/src/opencode/enforcer-config.json +2 -2
- package/src/skills/orchestrator/SKILL.md +1 -1
- package/src/skills/registry.json +1 -1
- package/xray/codex.json +1 -1
- package/xray/config.json +1 -1
- package/xray/features.json +1 -1
- package/xray/integrations.json +3 -3
- package/.opencode/agents/testing-best-practices.yml +0 -12
- package/dist/analytics/consent-manager.d.ts +0 -93
- package/dist/analytics/consent-manager.js +0 -258
- package/dist/analytics/simple-pattern-analyzer.d.ts +0 -80
- package/dist/analytics/simple-pattern-analyzer.js +0 -297
- 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/server.d.ts +0 -1
- package/dist/cli/server.js +0 -147
- package/dist/core/errors.d.ts +0 -3
- package/dist/core/errors.js +0 -10
- package/dist/core/logging-config.d.ts +0 -11
- package/dist/core/logging-config.js +0 -43
- package/dist/core/trace-context.d.ts +0 -12
- package/dist/core/trace-context.js +0 -33
- package/dist/delegation/voting-coordinator.d.ts +0 -49
- package/dist/delegation/voting-coordinator.js +0 -375
- package/dist/enforcement/test-auto-healing.d.ts +0 -83
- package/dist/enforcement/test-auto-healing.js +0 -325
- package/dist/integrations/base/ExampleIntegration.d.ts +0 -47
- package/dist/integrations/base/ExampleIntegration.js +0 -181
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +0 -34
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +0 -831
- package/dist/mcps/orchestrator.server.d.ts +0 -10
- package/dist/mcps/orchestrator.server.js +0 -19
- package/dist/orchestrator/self-direction-activation.d.ts +0 -109
- package/dist/orchestrator/self-direction-activation.js +0 -245
- package/dist/orchestrator/universal-librarian-consultation.d.ts +0 -98
- package/dist/orchestrator/universal-librarian-consultation.js +0 -216
- package/dist/orchestrator/universal-registry-bridge.d.ts +0 -85
- package/dist/orchestrator/universal-registry-bridge.js +0 -247
- package/dist/performance/performance-budget-enforcer.d.ts +0 -158
- package/dist/performance/performance-budget-enforcer.js +0 -434
- package/dist/performance/performance-regression-tester.d.ts +0 -108
- package/dist/performance/performance-regression-tester.js +0 -342
- package/dist/skills/testing-best-practices/SKILL.md +0 -37
- package/dist/state/context-providers.d.ts +0 -4
- package/dist/state/context-providers.js +0 -1
- package/dist/state/state-types.d.ts +0 -5
- package/dist/state/state-types.js +0 -1
- package/dist/utils/batch-operations.d.ts +0 -25
- package/dist/utils/batch-operations.js +0 -292
- 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/src/mcps/knowledge-skills/testing-best-practices.server.test.ts +0 -136
- package/src/mcps/knowledge-skills/testing-best-practices.server.ts +0 -1183
- package/src/mcps/orchestrator.server.ts +0 -34
- package/src/opencode/agents/testing-best-practices.yml +0 -12
- package/src/skills/testing-best-practices/SKILL.md +0 -37
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
2
2
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
3
|
+
import { pluginRegistry } from "../../nucleus/plugin-registry.js";
|
|
3
4
|
import * as path from "path";
|
|
4
5
|
import { fileURLToPath } from "url";
|
|
5
6
|
class StrategistServer extends XrayKnowledgeSkillBase {
|
|
@@ -75,6 +76,15 @@ class StrategistServer extends XrayKnowledgeSkillBase {
|
|
|
75
76
|
architecture_review: async (args) => this.handleArchitectureReview(args),
|
|
76
77
|
};
|
|
77
78
|
this.setupToolHandlers();
|
|
79
|
+
pluginRegistry.registerToolPlugin({
|
|
80
|
+
name: "xray/strategist",
|
|
81
|
+
callTool: async (toolName, args) => {
|
|
82
|
+
const handler = this.handlers[toolName];
|
|
83
|
+
if (!handler)
|
|
84
|
+
throw new Error(`Unknown tool: ${toolName}`);
|
|
85
|
+
return handler(args);
|
|
86
|
+
},
|
|
87
|
+
});
|
|
78
88
|
}
|
|
79
89
|
async handleStrategicGuidance(args) {
|
|
80
90
|
const { context, options = [], criteria = [] } = args;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
8
8
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
9
|
+
import { pluginRegistry } from "../../nucleus/plugin-registry.js";
|
|
9
10
|
import * as fs from "fs";
|
|
10
11
|
import * as path from "path";
|
|
11
12
|
class XrayDocumentationGenerationServer extends XrayKnowledgeSkillBase {
|
|
@@ -75,6 +76,15 @@ class XrayDocumentationGenerationServer extends XrayKnowledgeSkillBase {
|
|
|
75
76
|
"generate_readme": async (args) => this.generateReadme(args),
|
|
76
77
|
};
|
|
77
78
|
this.setupToolHandlers();
|
|
79
|
+
pluginRegistry.registerToolPlugin({
|
|
80
|
+
name: "documentation-generation",
|
|
81
|
+
callTool: async (toolName, args) => {
|
|
82
|
+
const handler = this.handlers[toolName];
|
|
83
|
+
if (!handler)
|
|
84
|
+
throw new Error(`Unknown tool: ${toolName}`);
|
|
85
|
+
return handler(args);
|
|
86
|
+
},
|
|
87
|
+
});
|
|
78
88
|
}
|
|
79
89
|
async analyzeDocumentation(args) {
|
|
80
90
|
const { docsPath, codePath, docTypes = ["readme", "api", "code"] } = args;
|
|
@@ -585,7 +595,7 @@ class XrayDocumentationGenerationServer extends XrayKnowledgeSkillBase {
|
|
|
585
595
|
openapi: "3.0.0",
|
|
586
596
|
info: {
|
|
587
597
|
title: "API Documentation",
|
|
588
|
-
version: "2.
|
|
598
|
+
version: "2.2.0",
|
|
589
599
|
description: "Generated API documentation",
|
|
590
600
|
},
|
|
591
601
|
servers: [
|
|
@@ -8,6 +8,7 @@ import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
|
8
8
|
import * as fs from "fs";
|
|
9
9
|
import * as path from "path";
|
|
10
10
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
11
|
+
import { pluginRegistry } from "../../nucleus/plugin-registry.js";
|
|
11
12
|
import { detectProjectLanguage, LANGUAGE_CONFIGS, } from "../../utils/language-detector.js";
|
|
12
13
|
class XrayTestingStrategyServer extends XrayKnowledgeSkillBase {
|
|
13
14
|
constructor() {
|
|
@@ -91,6 +92,15 @@ class XrayTestingStrategyServer extends XrayKnowledgeSkillBase {
|
|
|
91
92
|
"generate-test-file": async (args) => this.generateTestFile(args),
|
|
92
93
|
};
|
|
93
94
|
this.setupToolHandlers();
|
|
95
|
+
pluginRegistry.registerToolPlugin({
|
|
96
|
+
name: "testing-strategy",
|
|
97
|
+
callTool: async (toolName, args) => {
|
|
98
|
+
const handler = this.handlers[toolName];
|
|
99
|
+
if (!handler)
|
|
100
|
+
throw new Error(`Unknown tool: ${toolName}`);
|
|
101
|
+
return handler(args);
|
|
102
|
+
},
|
|
103
|
+
});
|
|
94
104
|
}
|
|
95
105
|
async analyzeTestCoverage(args) {
|
|
96
106
|
const { projectRoot, includeBreakdown = true, coverageThreshold = 80, } = args;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
8
8
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
9
|
+
import { pluginRegistry } from "../../nucleus/plugin-registry.js";
|
|
9
10
|
class XrayUIUXDesignServer extends XrayKnowledgeSkillBase {
|
|
10
11
|
constructor() {
|
|
11
12
|
super("ui-ux-design", "2.0.1");
|
|
@@ -100,6 +101,15 @@ class XrayUIUXDesignServer extends XrayKnowledgeSkillBase {
|
|
|
100
101
|
"analyze_visual_hierarchy": async (args) => this.analyzeVisualHierarchy(args),
|
|
101
102
|
};
|
|
102
103
|
this.setupToolHandlers();
|
|
104
|
+
pluginRegistry.registerToolPlugin({
|
|
105
|
+
name: "ui-ux-design",
|
|
106
|
+
callTool: async (toolName, args) => {
|
|
107
|
+
const handler = this.handlers[toolName];
|
|
108
|
+
if (!handler)
|
|
109
|
+
throw new Error(`Unknown tool: ${toolName}`);
|
|
110
|
+
return handler(args);
|
|
111
|
+
},
|
|
112
|
+
});
|
|
103
113
|
}
|
|
104
114
|
async analyzeUIComponent(args) {
|
|
105
115
|
const { componentCode, framework, checkAccessibility = true, checkResponsive = true, } = args;
|
package/dist/mcps/registry.json
CHANGED
|
@@ -79,7 +79,7 @@ export const frameworkHelpSimulations = {
|
|
|
79
79
|
type: 'text',
|
|
80
80
|
text: `**0xRay Framework Capabilities:**
|
|
81
81
|
|
|
82
|
-
**
|
|
82
|
+
**41 Specialized Agents:**
|
|
83
83
|
- enforcer: Codex compliance & error prevention
|
|
84
84
|
- architect: System design & technical decisions
|
|
85
85
|
- orchestrator: Multi-agent workflow coordination
|
|
@@ -18,7 +18,8 @@ export interface AgentInvocation {
|
|
|
18
18
|
metadata: Record<string, unknown> | undefined;
|
|
19
19
|
}
|
|
20
20
|
export type AgentType = "architect" | "code-analyzer" | "code-reviewer" | "researcher" | "frontend-engineer" | "backend-engineer" | "devops-engineer" | "security-auditor" | "database-engineer" | "testing-lead" | "performance-engineer" | "refactorer" | "bug-triage-specialist" | "strategist" | "tech-writer" | "content-creator" | "seo-consultant" | "growth-strategist" | "log-monitor" | "multimodal-looker" | "mobile-developer" | "frontend-ui-ux-engineer" | "custom" | "unknown";
|
|
21
|
-
|
|
21
|
+
import type { ComplexityLevel } from "../delegation/complexity-core.js";
|
|
22
|
+
export type { ComplexityLevel };
|
|
22
23
|
export interface AgentInvocationSummary {
|
|
23
24
|
agentName: string;
|
|
24
25
|
totalInvocations: number;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nucleus HTTP Adapter — semantic convenience surface (Phase 0)
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: MCP is the new standard (just as Dynamo is the established standard
|
|
5
|
+
* for the external governance signal). The canonical way for agents to call the
|
|
6
|
+
* nucleus is the first-class MCP tools (`govern_proposals`, `govern_reflection`)
|
|
7
|
+
* exposed by the governance MCP server (which already supports stdio + Streamable
|
|
8
|
+
* HTTP transport on /mcp and already delegates to the same GovernanceService).
|
|
9
|
+
*
|
|
10
|
+
* This module provides the *direct semantic convenience adapter*:
|
|
11
|
+
* - Pure `handleGovernRequest(body)` → returns the raw GovernanceResponse object.
|
|
12
|
+
* - Optional tiny Express app with `POST /govern` (and /health).
|
|
13
|
+
* - No full MCP JSON-RPC protocol overhead — ideal for curl, CI, simple bridges,
|
|
14
|
+
* or anything that just wants the decision without speaking MCP.
|
|
15
|
+
*
|
|
16
|
+
* It reuses the exact same kernel (getGovernanceService + types) as the MCP path.
|
|
17
|
+
* Zero impact on the federation or existing MCP surfaces.
|
|
18
|
+
*
|
|
19
|
+
* Design goals:
|
|
20
|
+
* - Framework-agnostic pure handler (usable by Express, Fastify, raw http, tests, or in-process).
|
|
21
|
+
* - Only frameworkLogger.
|
|
22
|
+
* - Follows the thin-wrapper style of APITrigger.
|
|
23
|
+
*
|
|
24
|
+
* Usage (embeddable / in-process):
|
|
25
|
+
* import { handleGovernRequest } from './nucleus/govern-http.js';
|
|
26
|
+
* const result = await handleGovernRequest(req.body);
|
|
27
|
+
*
|
|
28
|
+
* Usage (standalone):
|
|
29
|
+
* NUCLEUS_PORT=8787 node dist/nucleus/govern-http.js
|
|
30
|
+
*/
|
|
31
|
+
import express from 'express';
|
|
32
|
+
import type { GovernanceResponse } from '../governance/governance-types.js';
|
|
33
|
+
export interface GovernHTTPConfig {
|
|
34
|
+
path?: string;
|
|
35
|
+
apiKey?: string;
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
port?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Pure handler. Can be used by any HTTP server (Express, Fastify, raw http, etc.)
|
|
41
|
+
* or called directly in tests / in-process.
|
|
42
|
+
*/
|
|
43
|
+
export declare function handleGovernRequest(body: unknown, options?: {
|
|
44
|
+
requireExternalDynamo?: boolean;
|
|
45
|
+
}): Promise<GovernanceResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Minimal Express app (prototype only).
|
|
48
|
+
* Mirrors the shape and logging discipline of APITrigger.
|
|
49
|
+
*/
|
|
50
|
+
export declare class GovernHTTPAdapter {
|
|
51
|
+
private app;
|
|
52
|
+
private config;
|
|
53
|
+
private initialized;
|
|
54
|
+
constructor(config?: GovernHTTPConfig);
|
|
55
|
+
initialize(): Promise<void>;
|
|
56
|
+
getApp(): express.Application;
|
|
57
|
+
listen(): Promise<void>;
|
|
58
|
+
shutdown(): void;
|
|
59
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nucleus HTTP Adapter — semantic convenience surface (Phase 0)
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: MCP is the new standard (just as Dynamo is the established standard
|
|
5
|
+
* for the external governance signal). The canonical way for agents to call the
|
|
6
|
+
* nucleus is the first-class MCP tools (`govern_proposals`, `govern_reflection`)
|
|
7
|
+
* exposed by the governance MCP server (which already supports stdio + Streamable
|
|
8
|
+
* HTTP transport on /mcp and already delegates to the same GovernanceService).
|
|
9
|
+
*
|
|
10
|
+
* This module provides the *direct semantic convenience adapter*:
|
|
11
|
+
* - Pure `handleGovernRequest(body)` → returns the raw GovernanceResponse object.
|
|
12
|
+
* - Optional tiny Express app with `POST /govern` (and /health).
|
|
13
|
+
* - No full MCP JSON-RPC protocol overhead — ideal for curl, CI, simple bridges,
|
|
14
|
+
* or anything that just wants the decision without speaking MCP.
|
|
15
|
+
*
|
|
16
|
+
* It reuses the exact same kernel (getGovernanceService + types) as the MCP path.
|
|
17
|
+
* Zero impact on the federation or existing MCP surfaces.
|
|
18
|
+
*
|
|
19
|
+
* Design goals:
|
|
20
|
+
* - Framework-agnostic pure handler (usable by Express, Fastify, raw http, tests, or in-process).
|
|
21
|
+
* - Only frameworkLogger.
|
|
22
|
+
* - Follows the thin-wrapper style of APITrigger.
|
|
23
|
+
*
|
|
24
|
+
* Usage (embeddable / in-process):
|
|
25
|
+
* import { handleGovernRequest } from './nucleus/govern-http.js';
|
|
26
|
+
* const result = await handleGovernRequest(req.body);
|
|
27
|
+
*
|
|
28
|
+
* Usage (standalone):
|
|
29
|
+
* NUCLEUS_PORT=8787 node dist/nucleus/govern-http.js
|
|
30
|
+
*/
|
|
31
|
+
import express from 'express';
|
|
32
|
+
import { getGovernanceService } from '../governance/governance-service.js';
|
|
33
|
+
import { frameworkLogger } from '../core/framework-logger.js';
|
|
34
|
+
const DEFAULT_PATH = '/govern';
|
|
35
|
+
/**
|
|
36
|
+
* Pure handler. Can be used by any HTTP server (Express, Fastify, raw http, etc.)
|
|
37
|
+
* or called directly in tests / in-process.
|
|
38
|
+
*/
|
|
39
|
+
export async function handleGovernRequest(body, options) {
|
|
40
|
+
const request = body;
|
|
41
|
+
if (!request || !Array.isArray(request.proposals)) {
|
|
42
|
+
throw new Error('Invalid governance request: "proposals" array is required');
|
|
43
|
+
}
|
|
44
|
+
const svc = getGovernanceService();
|
|
45
|
+
// Merge caller options into the request options (prototype only — keeps surface tiny)
|
|
46
|
+
const mergedOptions = {};
|
|
47
|
+
if (request.options?.requireExternalDynamo !== undefined) {
|
|
48
|
+
mergedOptions.requireExternalDynamo = request.options.requireExternalDynamo;
|
|
49
|
+
}
|
|
50
|
+
if (options?.requireExternalDynamo !== undefined) {
|
|
51
|
+
mergedOptions.requireExternalDynamo = options.requireExternalDynamo;
|
|
52
|
+
}
|
|
53
|
+
const mergedRequest = {
|
|
54
|
+
...request,
|
|
55
|
+
options: mergedOptions,
|
|
56
|
+
};
|
|
57
|
+
await frameworkLogger.log('nucleus-http', 'govern-request-received', 'info', {
|
|
58
|
+
proposalCount: mergedRequest.proposals.length,
|
|
59
|
+
hasContext: !!mergedRequest.context,
|
|
60
|
+
path: DEFAULT_PATH,
|
|
61
|
+
});
|
|
62
|
+
const response = await svc.govern(mergedRequest);
|
|
63
|
+
await frameworkLogger.log('nucleus-http', 'govern-response', 'success', {
|
|
64
|
+
overallDecision: response.overallDecision,
|
|
65
|
+
total: response.summary.total,
|
|
66
|
+
approved: response.summary.approved,
|
|
67
|
+
rejected: response.summary.rejected,
|
|
68
|
+
});
|
|
69
|
+
return response;
|
|
70
|
+
}
|
|
71
|
+
/* c8 ignore start -- adapter + auto-run are integration-level (tested in later slices / E2E) */
|
|
72
|
+
/**
|
|
73
|
+
* Minimal Express app (prototype only).
|
|
74
|
+
* Mirrors the shape and logging discipline of APITrigger.
|
|
75
|
+
*/
|
|
76
|
+
export class GovernHTTPAdapter {
|
|
77
|
+
app;
|
|
78
|
+
config;
|
|
79
|
+
initialized = false;
|
|
80
|
+
constructor(config = {}) {
|
|
81
|
+
this.config = {
|
|
82
|
+
enabled: true,
|
|
83
|
+
path: DEFAULT_PATH,
|
|
84
|
+
apiKey: '',
|
|
85
|
+
port: 8787,
|
|
86
|
+
...config,
|
|
87
|
+
};
|
|
88
|
+
this.app = express();
|
|
89
|
+
}
|
|
90
|
+
async initialize() {
|
|
91
|
+
if (this.initialized || !this.config.enabled)
|
|
92
|
+
return;
|
|
93
|
+
this.app.use(express.json({ limit: '5mb' }));
|
|
94
|
+
// Optional API key (same pattern as APITrigger for early internal use)
|
|
95
|
+
if (this.config.apiKey) {
|
|
96
|
+
this.app.use((req, res, next) => {
|
|
97
|
+
const key = req.headers['x-api-key'];
|
|
98
|
+
if (!key || key !== this.config.apiKey) {
|
|
99
|
+
res.status(403).json({ error: 'Invalid or missing API key' });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
next();
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
const governPath = this.config.path;
|
|
106
|
+
// The direct semantic /govern endpoint (convenience, not the MCP standard surface).
|
|
107
|
+
// Agents that speak MCP should use the governance MCP server's tools (or its /mcp endpoint).
|
|
108
|
+
this.app.post(governPath, async (req, res) => {
|
|
109
|
+
try {
|
|
110
|
+
const result = await handleGovernRequest(req.body);
|
|
111
|
+
res.status(200).json(result);
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
115
|
+
await frameworkLogger.log('nucleus-http', 'govern-error', 'error', { message });
|
|
116
|
+
res.status(400).json({
|
|
117
|
+
error: 'Governance request failed',
|
|
118
|
+
message,
|
|
119
|
+
overallDecision: 'reject',
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
// Tiny health surface (useful for the verification loop later)
|
|
124
|
+
this.app.get(governPath + '/health', (_req, res) => {
|
|
125
|
+
res.json({
|
|
126
|
+
status: 'ok',
|
|
127
|
+
surface: 'nucleus-http',
|
|
128
|
+
version: 'v3-prototype',
|
|
129
|
+
endpoint: governPath,
|
|
130
|
+
timestamp: new Date().toISOString(),
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
this.initialized = true;
|
|
134
|
+
await frameworkLogger.log('nucleus-http', 'adapter-initialized', 'success', {
|
|
135
|
+
path: governPath,
|
|
136
|
+
port: this.config.port,
|
|
137
|
+
apiKeyProtected: !!this.config.apiKey,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
getApp() {
|
|
141
|
+
return this.app;
|
|
142
|
+
}
|
|
143
|
+
async listen() {
|
|
144
|
+
await this.initialize();
|
|
145
|
+
const port = this.config.port;
|
|
146
|
+
this.app.listen(port, () => {
|
|
147
|
+
// We intentionally use frameworkLogger here too; the listen callback is the one place
|
|
148
|
+
// a startup banner is acceptable if we ever add a structured one. For now the log above suffices.
|
|
149
|
+
void frameworkLogger.log('nucleus-http', 'listening', 'success', { port, path: this.config.path });
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
shutdown() {
|
|
153
|
+
this.initialized = false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Allow direct execution for the absolute smallest validation loop:
|
|
157
|
+
// node --loader ts-node/esm src/nucleus/govern-http.ts
|
|
158
|
+
// (or after build: node dist/nucleus/govern-http.js)
|
|
159
|
+
if (import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith('govern-http.ts')) {
|
|
160
|
+
const adapter = new GovernHTTPAdapter({
|
|
161
|
+
port: Number(process.env.NUCLEUS_PORT || 8787),
|
|
162
|
+
path: process.env.NUCLEUS_PATH || DEFAULT_PATH,
|
|
163
|
+
});
|
|
164
|
+
// Fire and forget — the listen method logs via frameworkLogger
|
|
165
|
+
void adapter.listen().catch(async (err) => {
|
|
166
|
+
await frameworkLogger.log('nucleus-http', 'listen-failed', 'error', {
|
|
167
|
+
error: err instanceof Error ? err.message : String(err),
|
|
168
|
+
});
|
|
169
|
+
process.exit(1);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/* c8 ignore stop */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xray Nucleus — barrel export
|
|
3
|
+
*
|
|
4
|
+
* Import from here for the stable nucleus surface:
|
|
5
|
+
* import { handleGovernRequest, governSingle } from './nucleus/index.js';
|
|
6
|
+
*/
|
|
7
|
+
export { handleGovernRequest, governSingle, getGovernanceService, GovernHTTPAdapter, NUCLEUS_VERSION, NUCLEUS_DESCRIPTION, } from './kernel.js';
|
|
8
|
+
export type { GovernHTTPConfig } from './govern-http.js';
|
|
9
|
+
export type { GovernanceRequest, GovernanceResponse, GovernanceProposal, GovernanceVote, GovernanceResult, GovernanceContext, GovernOptions, ProposalType, } from '../governance/governance-types.js';
|
|
10
|
+
export type { MetamorphosisEngine, MetamorphosisProposal, } from '../postprocessor/metamorphosis/MetamorphosisEngine.js';
|
|
11
|
+
export { SelfProposalEngine, } from '../postprocessor/metamorphosis/SelfProposalEngine.js';
|
|
12
|
+
export type { SelfProposalConfig, } from '../postprocessor/metamorphosis/SelfProposalEngine.js';
|
|
13
|
+
export { pluginRegistry, } from './plugin-registry.js';
|
|
14
|
+
export type { SkillPlugin, SkillToolPlugin, SkillProposalArgs, SkillPluginResult, } from './plugin-registry.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xray Nucleus — barrel export
|
|
3
|
+
*
|
|
4
|
+
* Import from here for the stable nucleus surface:
|
|
5
|
+
* import { handleGovernRequest, governSingle } from './nucleus/index.js';
|
|
6
|
+
*/
|
|
7
|
+
export { handleGovernRequest, governSingle, getGovernanceService, GovernHTTPAdapter, NUCLEUS_VERSION, NUCLEUS_DESCRIPTION, } from './kernel.js';
|
|
8
|
+
export { SelfProposalEngine, } from '../postprocessor/metamorphosis/SelfProposalEngine.js';
|
|
9
|
+
export { pluginRegistry, } from './plugin-registry.js';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xray Nucleus — the callable governance kernel (Phase 1.1 facade)
|
|
3
|
+
*
|
|
4
|
+
* This is the primary, stable import surface for the v3 nucleus.
|
|
5
|
+
*
|
|
6
|
+
* Consumers (bridges, custom tools, the MCP governance server, future self-proposal
|
|
7
|
+
* engines, CLI, etc.) should import from here rather than reaching into
|
|
8
|
+
* governance-service.ts, govern-http.ts, or postprocessor internals directly.
|
|
9
|
+
*
|
|
10
|
+
* Goals:
|
|
11
|
+
* - Single place to import the core "govern" capability + supporting types.
|
|
12
|
+
* - Zero risk to the 41-server federation or existing bridges.
|
|
13
|
+
* - Easy to tree-shake / split later (e.g. "nucleus/core", "nucleus/http").
|
|
14
|
+
* - Documents the public kernel contract.
|
|
15
|
+
*
|
|
16
|
+
* Current surface (Phase 1.1):
|
|
17
|
+
* - handleGovernRequest: the pure semantic convenience handler (direct JSON in/out)
|
|
18
|
+
* - getGovernanceService: the underlying singleton (for advanced / in-process use)
|
|
19
|
+
* - Governance types
|
|
20
|
+
* - MetamorphosisEngine interface (for PostProcessor lifecycle integration)
|
|
21
|
+
*
|
|
22
|
+
* MCP remains the canonical standard surface (see governance.server.ts).
|
|
23
|
+
* The direct HTTP adapter (govern-http.ts) is a convenience on top of this kernel.
|
|
24
|
+
*
|
|
25
|
+
* Anti-goals (for this file):
|
|
26
|
+
* - No new business logic
|
|
27
|
+
* - No side effects on import
|
|
28
|
+
* - Does not pull in the full 25 knowledge-skill servers (dynamic via pluginRegistry only)
|
|
29
|
+
*/
|
|
30
|
+
import type { GovernOptions, GovernanceContext, GovernanceRequest, GovernanceResponse } from '../governance/governance-types.js';
|
|
31
|
+
import { handleGovernRequest } from './govern-http.js';
|
|
32
|
+
export { handleGovernRequest };
|
|
33
|
+
export type { GovernHTTPConfig } from './govern-http.js';
|
|
34
|
+
export { getGovernanceService } from '../governance/governance-service.js';
|
|
35
|
+
export type { GovernanceRequest, GovernanceResponse, GovernanceProposal, GovernanceVote, GovernanceResult, GovernanceContext, GovernOptions, ProposalType, } from '../governance/governance-types.js';
|
|
36
|
+
export type { MetamorphosisEngine, MetamorphosisProposal, } from '../postprocessor/metamorphosis/MetamorphosisEngine.js';
|
|
37
|
+
export { GovernHTTPAdapter } from './govern-http.js';
|
|
38
|
+
export { pluginRegistry } from './plugin-registry.js';
|
|
39
|
+
export type { SkillPlugin, SkillToolPlugin, SkillProposalArgs, SkillPluginResult } from './plugin-registry.js';
|
|
40
|
+
/**
|
|
41
|
+
* High-level kernel description for introspection / docs.
|
|
42
|
+
*/
|
|
43
|
+
export declare const NUCLEUS_VERSION = "0.1.0";
|
|
44
|
+
export declare const NUCLEUS_DESCRIPTION: string;
|
|
45
|
+
/**
|
|
46
|
+
* Quick helper for the common case: govern a single proposal and get the overall decision.
|
|
47
|
+
* (Thin wrapper — real power users should use handleGovernRequest directly for batch + full response.)
|
|
48
|
+
*/
|
|
49
|
+
export declare function governSingle(proposal: Omit<GovernanceRequest['proposals'][0], 'id'> & {
|
|
50
|
+
id?: string;
|
|
51
|
+
}, context?: GovernanceContext, options?: GovernOptions): Promise<GovernanceResponse>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xray Nucleus — the callable governance kernel (Phase 1.1 facade)
|
|
3
|
+
*
|
|
4
|
+
* This is the primary, stable import surface for the v3 nucleus.
|
|
5
|
+
*
|
|
6
|
+
* Consumers (bridges, custom tools, the MCP governance server, future self-proposal
|
|
7
|
+
* engines, CLI, etc.) should import from here rather than reaching into
|
|
8
|
+
* governance-service.ts, govern-http.ts, or postprocessor internals directly.
|
|
9
|
+
*
|
|
10
|
+
* Goals:
|
|
11
|
+
* - Single place to import the core "govern" capability + supporting types.
|
|
12
|
+
* - Zero risk to the 41-server federation or existing bridges.
|
|
13
|
+
* - Easy to tree-shake / split later (e.g. "nucleus/core", "nucleus/http").
|
|
14
|
+
* - Documents the public kernel contract.
|
|
15
|
+
*
|
|
16
|
+
* Current surface (Phase 1.1):
|
|
17
|
+
* - handleGovernRequest: the pure semantic convenience handler (direct JSON in/out)
|
|
18
|
+
* - getGovernanceService: the underlying singleton (for advanced / in-process use)
|
|
19
|
+
* - Governance types
|
|
20
|
+
* - MetamorphosisEngine interface (for PostProcessor lifecycle integration)
|
|
21
|
+
*
|
|
22
|
+
* MCP remains the canonical standard surface (see governance.server.ts).
|
|
23
|
+
* The direct HTTP adapter (govern-http.ts) is a convenience on top of this kernel.
|
|
24
|
+
*
|
|
25
|
+
* Anti-goals (for this file):
|
|
26
|
+
* - No new business logic
|
|
27
|
+
* - No side effects on import
|
|
28
|
+
* - Does not pull in the full 25 knowledge-skill servers (dynamic via pluginRegistry only)
|
|
29
|
+
*/
|
|
30
|
+
import { handleGovernRequest } from './govern-http.js';
|
|
31
|
+
// Re-export the pure handler (the main "call the nucleus" entry point)
|
|
32
|
+
export { handleGovernRequest };
|
|
33
|
+
// Re-export the canonical way to obtain the service (used by MCP, internal code, and advanced callers)
|
|
34
|
+
export { getGovernanceService } from '../governance/governance-service.js';
|
|
35
|
+
// Convenience re-export of the HTTP adapter for anyone who wants the tiny Express wrapper
|
|
36
|
+
// (still considered "convenience", not core kernel)
|
|
37
|
+
export { GovernHTTPAdapter } from './govern-http.js';
|
|
38
|
+
// Plugin registry — dynamic skill and tool dispatch
|
|
39
|
+
export { pluginRegistry } from './plugin-registry.js';
|
|
40
|
+
/**
|
|
41
|
+
* High-level kernel description for introspection / docs.
|
|
42
|
+
*/
|
|
43
|
+
export const NUCLEUS_VERSION = '0.1.0'; // Phase 1 facade version
|
|
44
|
+
export const NUCLEUS_DESCRIPTION = 'xray governance kernel — external Dynamo signal + 3-agent deliberation exposed as a callable library. ' +
|
|
45
|
+
'MCP is the standard surface; direct handleGovernRequest + HTTP adapter are convenience paths.';
|
|
46
|
+
/**
|
|
47
|
+
* Quick helper for the common case: govern a single proposal and get the overall decision.
|
|
48
|
+
* (Thin wrapper — real power users should use handleGovernRequest directly for batch + full response.)
|
|
49
|
+
*/
|
|
50
|
+
export async function governSingle(proposal, context, options) {
|
|
51
|
+
const fullRequest = {
|
|
52
|
+
proposals: [
|
|
53
|
+
{
|
|
54
|
+
id: proposal.id || `prop-${Date.now()}`,
|
|
55
|
+
...proposal,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
context,
|
|
59
|
+
...(options ? { options } : {}),
|
|
60
|
+
};
|
|
61
|
+
return handleGovernRequest(fullRequest);
|
|
62
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PluginRegistry — Phase 1.2 dynamic skill loading + Phase 3 generic tool dispatch
|
|
3
|
+
*
|
|
4
|
+
* Allows skills to be registered after boot, loaded from config, or discovered
|
|
5
|
+
* at runtime. Wraps the existing in-process-skill-registry for backward compat.
|
|
6
|
+
*
|
|
7
|
+
* Phase 3 extension: SkillToolPlugin interface for multi-tool skills (knowledge-skill
|
|
8
|
+
* servers). Each server registers as a SkillToolPlugin, exposing arbitrary tools
|
|
9
|
+
* that can be dispatched via callSkillTool().
|
|
10
|
+
*
|
|
11
|
+
* Goals:
|
|
12
|
+
* - New skills can be registered post-boot via register()
|
|
13
|
+
* - Skills are discoverable by name without importing server constructors
|
|
14
|
+
* - Default set loads automatically from the existing 3 governance skills
|
|
15
|
+
* - Multi-tool skills can be registered and dispatched via callSkillTool()
|
|
16
|
+
* - Backward compatible: callInProcessSkill still works as before
|
|
17
|
+
*/
|
|
18
|
+
export interface SkillPlugin {
|
|
19
|
+
/** Unique skill name (e.g. "code-review", "security-audit") */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Handler that processes proposals */
|
|
22
|
+
analyzeProposal(args: SkillProposalArgs): Promise<SkillPluginResult>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Extended plugin interface for knowledge-skill servers that expose multiple tools.
|
|
26
|
+
* Each tool is a named function that accepts arbitrary args.
|
|
27
|
+
*/
|
|
28
|
+
export interface SkillToolPlugin {
|
|
29
|
+
/** Unique skill name (e.g. "code-review", "api-design") */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Dispatch a named tool with arbitrary args */
|
|
32
|
+
callTool(toolName: string, args: Record<string, unknown>): Promise<unknown>;
|
|
33
|
+
}
|
|
34
|
+
export interface SkillProposalArgs {
|
|
35
|
+
proposalTitle?: string;
|
|
36
|
+
proposalDescription?: string;
|
|
37
|
+
evidence?: string[];
|
|
38
|
+
proposalType?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SkillPluginResult {
|
|
41
|
+
content: Array<{
|
|
42
|
+
type: string;
|
|
43
|
+
text: string;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
type SkillHandler = (args: SkillProposalArgs) => Promise<SkillPluginResult>;
|
|
47
|
+
declare class PluginRegistryImpl {
|
|
48
|
+
private skills;
|
|
49
|
+
/** Phase 3: multi-tool skill plugins (knowledge-skill servers) */
|
|
50
|
+
private toolPlugins;
|
|
51
|
+
private initialized;
|
|
52
|
+
/**
|
|
53
|
+
* Register a skill plugin. Can be called after boot.
|
|
54
|
+
*/
|
|
55
|
+
register(skill: SkillPlugin): void;
|
|
56
|
+
/**
|
|
57
|
+
* Register a multi-tool skill plugin (knowledge-skill server).
|
|
58
|
+
* Tools can be dispatched via callSkillTool().
|
|
59
|
+
*/
|
|
60
|
+
registerToolPlugin(skill: SkillToolPlugin): void;
|
|
61
|
+
/**
|
|
62
|
+
* Call a named tool on a registered multi-tool skill plugin.
|
|
63
|
+
*/
|
|
64
|
+
callSkillTool(skillName: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if a tool plugin is registered.
|
|
67
|
+
*/
|
|
68
|
+
hasToolPlugin(name: string): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* List all registered tool plugin names.
|
|
71
|
+
*/
|
|
72
|
+
listToolPlugins(): string[];
|
|
73
|
+
/**
|
|
74
|
+
* Get a skill handler by name. Falls back to the in-process registry
|
|
75
|
+
* for the built-in governance skills (code-review, security-audit, researcher).
|
|
76
|
+
*/
|
|
77
|
+
get(name: string): SkillHandler | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Check if a skill is registered (either in the plugin registry or the built-in registry).
|
|
80
|
+
*/
|
|
81
|
+
has(name: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* List all registered skill names (plugins + built-in).
|
|
84
|
+
*/
|
|
85
|
+
list(): string[];
|
|
86
|
+
/**
|
|
87
|
+
* Call a skill by name. Delegates to the plugin registry first,
|
|
88
|
+
* then falls back to the built-in in-process registry.
|
|
89
|
+
*/
|
|
90
|
+
callSkill(name: string, args: SkillProposalArgs): Promise<SkillPluginResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Initialize with default governance skills. Called once at boot.
|
|
93
|
+
* The 3 governance skills are always available via the built-in registry.
|
|
94
|
+
*/
|
|
95
|
+
initializeDefaults(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Reset the registry for testing. Removes all registered plugins
|
|
98
|
+
* (built-in governance skills remain available via fallback).
|
|
99
|
+
*/
|
|
100
|
+
resetForTest(): void;
|
|
101
|
+
}
|
|
102
|
+
/** Singleton plugin registry */
|
|
103
|
+
export declare const pluginRegistry: PluginRegistryImpl;
|
|
104
|
+
export {};
|