0xray 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/enforcer-config.json +2 -2
- package/README.md +3 -3
- package/dist/CHANGELOG.md +43 -0
- package/dist/README.md +3 -3
- 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 +1 -1
- package/dist/core/features-config.js +1 -1
- package/dist/core/framework-logger.js +30 -1
- 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 +10 -1
- 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/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 +3 -3
- 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/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
package/.opencode/codex.codex
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.3",
|
|
3
3
|
"terms": [
|
|
4
4
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68
|
|
5
5
|
],
|
|
@@ -69,7 +69,7 @@ Comprehensive dependency analysis and security audit for all project dependencie
|
|
|
69
69
|
"vulnerabilities": [
|
|
70
70
|
{
|
|
71
71
|
"package": "lodash",
|
|
72
|
-
"version": "2.1.
|
|
72
|
+
"version": "2.1.3",
|
|
73
73
|
"severity": "high",
|
|
74
74
|
"cve": "CVE-2021-23337",
|
|
75
75
|
"description": "Command injection vulnerability"
|
|
@@ -85,14 +85,14 @@ Security-focused format for CI/CD integration:
|
|
|
85
85
|
|
|
86
86
|
```json
|
|
87
87
|
{
|
|
88
|
-
"version": "2.1.
|
|
88
|
+
"version": "2.1.3",
|
|
89
89
|
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
|
90
90
|
"runs": [
|
|
91
91
|
{
|
|
92
92
|
"tool": {
|
|
93
93
|
"driver": {
|
|
94
94
|
"name": "Dependency Audit",
|
|
95
|
-
"version": "2.1.
|
|
95
|
+
"version": "2.1.3"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"results": [...]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "xray 2.0",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Codex-compliant framework configuration for Credible UI project",
|
|
5
5
|
"thresholds": {
|
|
6
6
|
"bundleSize": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"codex": {
|
|
223
|
-
"version": "2.1.
|
|
223
|
+
"version": "2.1.3",
|
|
224
224
|
"terms": [
|
|
225
225
|
1,
|
|
226
226
|
2,
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 0xRay — Self-Healing AI Governance OS
|
|
2
2
|
|
|
3
|
-
**v2.1.3** — 42 agents · 46 skills ·
|
|
3
|
+
**v2.1.3** — 42 agents · 46 skills · 16 MCPs servers · 5 codex terms · ~2,2282 tests
|
|
4
4
|
|
|
5
5
|
[](https://0xrayai.github.io/xray/)
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ AI coding assistants are powerful but unreliable. They hallucinate APIs, introdu
|
|
|
62
62
|
├─────────────────────────────────────────────────┤
|
|
63
63
|
│ External Governance (Dynamo) │
|
|
64
64
|
│ Codex enforcement · Multi-agent review · SSOT │
|
|
65
|
-
│
|
|
65
|
+
│ 16 MCPs servers (governance + knowledge skills) deliberate proposals │
|
|
66
66
|
├─────────────────────────────────────────────────┤
|
|
67
67
|
│ Autonomous Engine (thinDispatch) │
|
|
68
68
|
│ Task routing · Multi-agent coordination │
|
|
@@ -179,7 +179,7 @@ Every subsystem is configurable via `features.json` (located at `.opencode/xray/
|
|
|
179
179
|
|
|
180
180
|
```json
|
|
181
181
|
{
|
|
182
|
-
"version": "2.1.
|
|
182
|
+
"version": "2.1.3",
|
|
183
183
|
"token_optimization": {
|
|
184
184
|
"enabled": true,
|
|
185
185
|
"max_context_tokens": 20000,
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,49 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Conventional Commits](https://www.conventionalcommits.org/).
|
|
6
6
|
|
|
7
|
+
## [2.2.0] - 2026-06-10
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
- feat: add Codex terms 69-72 covering self-evolution constraints (proposal governance, metamorphosis threshold, safety controls, traceability) (codex.json)
|
|
11
|
+
- feat: long-running governed agent session verification E2E (11 tests, self-evolution-e2e.test.ts)
|
|
12
|
+
- feat: Plugin API documentation — SkillPlugin, MetamorphosisEngine, SelfProposalEngine interfaces (docs/api/plugin-api.md)
|
|
13
|
+
- feat: SelfProposalEngine with unit + E2E tests (postprocessor/metamorphosis/SelfProposalEngine.ts)
|
|
14
|
+
- feat: nucleus kernel facade — handleGovernRequest, governViaNucleus, pluginRegistry (src/nucleus/)
|
|
15
|
+
- feat: CLI govern command — status, audit, proposals, MCP management, storyteller (src/cli/commands/govern.ts)
|
|
16
|
+
- feat: consumer verification script (scripts/verify-consumer.sh)
|
|
17
|
+
|
|
18
|
+
### ♻️ Refactoring
|
|
19
|
+
- refactor: 12-review subtract pass across all subsystems — ~16k LOC removed (Core, Nucleus, Governance, MCP, Inference, Orchestration, Delegation, Processors, Postprocessor, Enforcement, Integrations, CLI, Supporting)
|
|
20
|
+
- refactor: delete trace-context.ts, errors.ts, logging-config.ts (inlined into framework-logger)
|
|
21
|
+
- refactor: delete applyDecisionMatrix dead PHI/TAU matrix from governance-core
|
|
22
|
+
- refactor: delete testing-best-practices.server.ts (1,183 LOC unregistered MCP bloat), orchestrator.server.ts shim
|
|
23
|
+
- refactor: delete 4 dead orchestrator/delegation files (universal-registry-bridge, universal-librarian-consultation, self-direction-activation, task-skill-router.d.ts)
|
|
24
|
+
- refactor: delete RetryHandler.ts, ComprehensiveValidator.ts from postprocessor
|
|
25
|
+
- refactor: delete test-auto-healing.ts, cross-language-bridge.ts
|
|
26
|
+
- refactor: delete 5 CLI dead files (4 analytics commands, server.ts)
|
|
27
|
+
- refactor: delete 19 dead source + 6 stale test files across analytics, infrastructure, performance, reporting, utils, validation, state
|
|
28
|
+
- refactor: delete dead expertise barrel exports (getAgentsWithExpertiseDomain, getTopExpertsForDomain)
|
|
29
|
+
- refactor: update Codex references from 68 to 72 terms across docs
|
|
30
|
+
- refactor: clean dead test script references in package.json
|
|
31
|
+
|
|
32
|
+
### 🐛 Bug Fixes
|
|
33
|
+
- fix: repair syntax from STRRAY_ cleanup (setup.ts, hermes bridge) so tests and release guard pass (87f3613ad)
|
|
34
|
+
- fix: E2E test references to applyDecisionMatrix updated to mergeVotes
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## [2.1.4] - 2026-06-09
|
|
39
|
+
|
|
40
|
+
### 🔄 Changes
|
|
41
|
+
|
|
42
|
+
### 🐛 Bug Fixes
|
|
43
|
+
- fix: repair syntax from STRRAY_ cleanup (setup.ts, hermes bridge) so tests and release guard pass (87f3613ad)
|
|
44
|
+
|
|
45
|
+
### 🔎 Other Changes
|
|
46
|
+
- chore(release): strip remaining legacy STRRAY_ env fallbacks & shims so prepublish guard passes for v2.1.3 (0038993fc)
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
7
50
|
## [2.1.3] - 2026-06-09
|
|
8
51
|
|
|
9
52
|
### 🔄 Changes
|
package/dist/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 0xRay — Self-Healing AI Governance OS
|
|
2
2
|
|
|
3
|
-
**v2.1.3** — 42 agents · 46 skills ·
|
|
3
|
+
**v2.1.3** — 42 agents · 46 skills · 16 MCPs servers · 5 codex terms · ~2,2282 tests
|
|
4
4
|
|
|
5
5
|
[](https://0xrayai.github.io/xray/)
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ AI coding assistants are powerful but unreliable. They hallucinate APIs, introdu
|
|
|
62
62
|
├─────────────────────────────────────────────────┤
|
|
63
63
|
│ External Governance (Dynamo) │
|
|
64
64
|
│ Codex enforcement · Multi-agent review · SSOT │
|
|
65
|
-
│
|
|
65
|
+
│ 16 MCPs servers (governance + knowledge skills) deliberate proposals │
|
|
66
66
|
├─────────────────────────────────────────────────┤
|
|
67
67
|
│ Autonomous Engine (thinDispatch) │
|
|
68
68
|
│ Task routing · Multi-agent coordination │
|
|
@@ -179,7 +179,7 @@ Every subsystem is configurable via `features.json` (located at `.opencode/xray/
|
|
|
179
179
|
|
|
180
180
|
```json
|
|
181
181
|
{
|
|
182
|
-
"version": "2.1.
|
|
182
|
+
"version": "2.1.3",
|
|
183
183
|
"token_optimization": {
|
|
184
184
|
"enabled": true,
|
|
185
185
|
"max_context_tokens": 20000,
|
|
@@ -36,7 +36,7 @@ class RoutingRefiner {
|
|
|
36
36
|
const optimizations = this.suggestMappingOptimizations(promptAnalysis, performanceReport);
|
|
37
37
|
const warnings = this.generateWarnings(newMappings, optimizations);
|
|
38
38
|
return {
|
|
39
|
-
version: "2.1.
|
|
39
|
+
version: "2.1.3",
|
|
40
40
|
generatedAt: new Date(),
|
|
41
41
|
summary: {
|
|
42
42
|
newMappings: newMappings.length,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xray govern — the primary CLI command for the v3 nucleus
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* xray govern [options]
|
|
6
|
+
*
|
|
7
|
+
* All existing direct commands still work (backward compat with deprecation notice).
|
|
8
|
+
*/
|
|
9
|
+
interface GovernOptions {
|
|
10
|
+
status?: boolean;
|
|
11
|
+
audit?: boolean;
|
|
12
|
+
mcp?: string;
|
|
13
|
+
pluginInstall?: string;
|
|
14
|
+
proposals?: string;
|
|
15
|
+
skillInstall?: string;
|
|
16
|
+
skillRegistry?: string;
|
|
17
|
+
storyteller?: string;
|
|
18
|
+
mcpList?: boolean;
|
|
19
|
+
mcpStatus?: boolean;
|
|
20
|
+
mcpInstall?: string;
|
|
21
|
+
mcpRemove?: string;
|
|
22
|
+
publishAgent?: boolean;
|
|
23
|
+
archiveLogs?: boolean;
|
|
24
|
+
credibleInit?: string;
|
|
25
|
+
antigravityStatus?: boolean;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export declare function governCommand(options: GovernOptions): Promise<void>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xray govern — the primary CLI command for the v3 nucleus
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* xray govern [options]
|
|
6
|
+
*
|
|
7
|
+
* All existing direct commands still work (backward compat with deprecation notice).
|
|
8
|
+
*/
|
|
9
|
+
import { resolve, join } from 'path';
|
|
10
|
+
import { readFileSync, existsSync } from 'fs';
|
|
11
|
+
import { spawn } from 'child_process';
|
|
12
|
+
export async function governCommand(options) {
|
|
13
|
+
if (options.status) {
|
|
14
|
+
const { statusCommand } = await import('./status.js');
|
|
15
|
+
await statusCommand();
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (options.audit) {
|
|
19
|
+
const { securityAuditCommand } = await import('./security-audit.js');
|
|
20
|
+
await securityAuditCommand();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (options.mcp) {
|
|
24
|
+
const serverMap = {
|
|
25
|
+
governance: 'dist/mcps/governance.server.js',
|
|
26
|
+
skills: 'dist/mcps/knowledge-skills/skill-invocation.server.js',
|
|
27
|
+
};
|
|
28
|
+
const relPath = serverMap[options.mcp];
|
|
29
|
+
if (!relPath) {
|
|
30
|
+
console.error(`Unknown MCP server: ${options.mcp}. Use: governance, skills`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
const packageJsonPath = resolve(import.meta.url.replace(/^file:/, ''), '..', '..', 'package.json');
|
|
34
|
+
const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
35
|
+
const packageRoot = resolve(packageJsonPath, '..', pkg.xray?.dist ? join('', pkg.xray.dist) : 'dist', '..');
|
|
36
|
+
const serverPath = resolve(join(packageRoot, relPath));
|
|
37
|
+
if (!existsSync(serverPath)) {
|
|
38
|
+
console.error(`MCP server not found at ${serverPath}. Is xray installed correctly?`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
const env = { ...process.env };
|
|
42
|
+
if (options.mcp === 'governance') {
|
|
43
|
+
env.XRAY_FORCE_MCP_GOVERNANCE = 'true';
|
|
44
|
+
}
|
|
45
|
+
const child = spawn(process.execPath, [serverPath], { stdio: 'inherit', env });
|
|
46
|
+
child.on('exit', (code) => process.exit(code ?? 0));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (options.pluginInstall) {
|
|
50
|
+
const { pluginInstallCommand } = await import('./plugin-commands.js');
|
|
51
|
+
await pluginInstallCommand(options.pluginInstall);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (options.proposals) {
|
|
55
|
+
const { handleGovernRequest } = await import('../../nucleus/index.js');
|
|
56
|
+
let proposals;
|
|
57
|
+
try {
|
|
58
|
+
proposals = JSON.parse(options.proposals);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
console.error('Invalid JSON in --proposals. Expected a JSON string with a "proposals" array.');
|
|
62
|
+
console.error('Example: xray govern --proposals \'[{"type":"fix","title":"Test","description":"A test"}]\'');
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
const result = await handleGovernRequest(proposals);
|
|
66
|
+
console.log(JSON.stringify(result, null, 2));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (options.skillInstall !== undefined) {
|
|
70
|
+
const { skillInstallCommand } = await import('./skill-install.js');
|
|
71
|
+
await skillInstallCommand(options.skillInstall || undefined);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (options.skillRegistry !== undefined) {
|
|
75
|
+
const { skillRegistryCommand } = await import('./skill-install.js');
|
|
76
|
+
await skillRegistryCommand(options.skillRegistry || undefined);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (options.storyteller) {
|
|
80
|
+
const { storytellerCommand } = await import('./storyteller.js');
|
|
81
|
+
await storytellerCommand(options.storyteller);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (options.mcpList) {
|
|
85
|
+
const { listMCPsCommand } = await import('./mcp-install.js');
|
|
86
|
+
listMCPsCommand();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (options.mcpStatus) {
|
|
90
|
+
const { showMCPStatusCommand } = await import('./mcp-install.js');
|
|
91
|
+
showMCPStatusCommand();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (options.mcpInstall) {
|
|
95
|
+
const { installMCPCommand } = await import('./mcp-install.js');
|
|
96
|
+
await installMCPCommand(options.mcpInstall);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (options.mcpRemove) {
|
|
100
|
+
const { removeMCPCommand } = await import('./mcp-install.js');
|
|
101
|
+
removeMCPCommand(options.mcpRemove);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (options.publishAgent) {
|
|
105
|
+
const { publishAgentCommand } = await import('./publish-agent.js');
|
|
106
|
+
await publishAgentCommand();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (options.archiveLogs) {
|
|
110
|
+
const { archiveLogFiles } = await import('./archive-logs.js');
|
|
111
|
+
const result = await archiveLogFiles(undefined, `govern-${Date.now()}`);
|
|
112
|
+
console.log(`\nResults:`);
|
|
113
|
+
console.log(` Archived: ${result.archived} files`);
|
|
114
|
+
if (result.errors.length > 0) {
|
|
115
|
+
console.log(` Errors: ${result.errors.length}`);
|
|
116
|
+
result.errors.forEach((e) => console.log(` - ${e}`));
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (options.credibleInit !== undefined) {
|
|
122
|
+
const { credibleInitCommand } = await import('./credible-init.js');
|
|
123
|
+
await credibleInitCommand();
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (options.antigravityStatus) {
|
|
127
|
+
const { antigravityStatusCommand } = await import('./antigravity-status.js');
|
|
128
|
+
await antigravityStatusCommand();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
console.log('xray govern — the governance kernel\n');
|
|
132
|
+
console.log('Usage: xray govern [options]\n');
|
|
133
|
+
console.log('Options:');
|
|
134
|
+
console.log(' --status Show framework status');
|
|
135
|
+
console.log(' --audit Run security audit');
|
|
136
|
+
console.log(' --mcp <server> Run an MCP server (governance, skills)');
|
|
137
|
+
console.log(' --plugin-install <name> Install a plugin');
|
|
138
|
+
console.log(' --proposals <json> Run governance on JSON proposals');
|
|
139
|
+
console.log(' --skill-install [source] Install skills from registry');
|
|
140
|
+
console.log(' --skill-registry [action] Manage skill registry sources');
|
|
141
|
+
console.log(' --storyteller <type> Write a story (reflection, saga, journey, narrative)');
|
|
142
|
+
console.log(' --mcp-list List available MCP servers');
|
|
143
|
+
console.log(' --mcp-status Show installed MCP servers');
|
|
144
|
+
console.log(' --mcp-install <name> Install an MCP server');
|
|
145
|
+
console.log(' --mcp-remove <name> Remove an MCP server');
|
|
146
|
+
console.log(' --publish-agent Publish an agent to AgentStore');
|
|
147
|
+
console.log(' --archive-logs Archive log files');
|
|
148
|
+
console.log(' --credible-init [name] Initialize Credible Pod');
|
|
149
|
+
console.log(' --antigravity-status Show installed skills status');
|
|
150
|
+
console.log(' -h, --help Show this help\n');
|
|
151
|
+
console.log('All existing commands still work: xray status, xray security-audit, etc.');
|
|
152
|
+
}
|
package/dist/cli/index.js
CHANGED
|
@@ -364,60 +364,6 @@ program
|
|
|
364
364
|
process.exit(1);
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
|
-
// Analytics command - pattern analysis, insights, and consent management
|
|
368
|
-
program
|
|
369
|
-
.command("analytics")
|
|
370
|
-
.description("xray Central Analytics - Pattern analysis, insights, and consent management\n" +
|
|
371
|
-
" In v1.7.2+: Includes consent management with granular control\n" +
|
|
372
|
-
" Use 'npx xray analytics enable' to opt-in to data sharing\n" +
|
|
373
|
-
" Core classes: ConsentManager, AnonymizationEngine available programmatically")
|
|
374
|
-
.option("-l, --limit <number>", "Limit analysis to last N task completions")
|
|
375
|
-
.option("-o, --output <file>", "Save report to file")
|
|
376
|
-
.action(async (opts) => {
|
|
377
|
-
console.log("📊 xray Pattern Analytics");
|
|
378
|
-
console.log("==============================");
|
|
379
|
-
console.log("");
|
|
380
|
-
try {
|
|
381
|
-
// Dynamic import to avoid loading analytics module unless needed
|
|
382
|
-
const { SimplePatternAnalyzer } = await import("../analytics/simple-pattern-analyzer.js");
|
|
383
|
-
// Get default limit from features.json
|
|
384
|
-
const fs = await import("fs");
|
|
385
|
-
const path = await import("path");
|
|
386
|
-
let defaultLimit = 500;
|
|
387
|
-
try {
|
|
388
|
-
const featuresPath = path.join(process.cwd(), ".opencode", "plugins", "features.json"); // plain xray primary (min compat .xray/ handled in getConfigDir per Scope Rule)
|
|
389
|
-
if (fs.existsSync(featuresPath)) {
|
|
390
|
-
const features = JSON.parse(fs.readFileSync(featuresPath, "utf-8"));
|
|
391
|
-
defaultLimit = features.analytics?.default_limit || 500;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
catch { /* use default */ }
|
|
395
|
-
const analyzer = new SimplePatternAnalyzer();
|
|
396
|
-
const limit = parseInt(opts.limit) || defaultLimit;
|
|
397
|
-
console.log(`Analyzing last ${limit} task completions...`);
|
|
398
|
-
console.log("");
|
|
399
|
-
const insights = await analyzer.analyze(limit);
|
|
400
|
-
const insightsLines = analyzer.generateInsights(insights);
|
|
401
|
-
// Print insights
|
|
402
|
-
insightsLines.forEach((line) => {
|
|
403
|
-
console.log(line);
|
|
404
|
-
});
|
|
405
|
-
// Save to file if requested
|
|
406
|
-
if (opts.output) {
|
|
407
|
-
const fs = await import("fs");
|
|
408
|
-
const report = await analyzer.generateReport();
|
|
409
|
-
fs.writeFileSync(opts.output, report);
|
|
410
|
-
console.log("");
|
|
411
|
-
console.log(`✅ Report saved to: ${opts.output}`);
|
|
412
|
-
}
|
|
413
|
-
console.log("");
|
|
414
|
-
console.log("💡 Run regularly to track agent performance and complexity accuracy");
|
|
415
|
-
}
|
|
416
|
-
catch (error) {
|
|
417
|
-
console.error("❌ Analytics failed:", error instanceof Error ? error.message : String(error));
|
|
418
|
-
process.exit(1);
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
367
|
program
|
|
422
368
|
.command("doctor")
|
|
423
369
|
.description("Diagnose framework issues (does not fix them)")
|
|
@@ -494,40 +440,6 @@ program
|
|
|
494
440
|
process.exit(1);
|
|
495
441
|
}
|
|
496
442
|
});
|
|
497
|
-
// Archive logs command - standalone, no framework boot required
|
|
498
|
-
program
|
|
499
|
-
.command("archive-logs")
|
|
500
|
-
.description("Archive log files without framework boot (for git hooks)")
|
|
501
|
-
.option("--dry-run", "Show what would be archived without making changes")
|
|
502
|
-
.option("-v, --verbose", "Verbose output")
|
|
503
|
-
.action(async (opts) => {
|
|
504
|
-
console.log("📦 xray Log Archive");
|
|
505
|
-
console.log("========================");
|
|
506
|
-
if (opts.dryRun) {
|
|
507
|
-
console.log("(Dry run mode - no changes will be made)");
|
|
508
|
-
}
|
|
509
|
-
try {
|
|
510
|
-
// Import and run standalone archiver
|
|
511
|
-
const archiveModule = await import("./commands/archive-logs.js");
|
|
512
|
-
const result = await archiveModule.archiveLogFiles({
|
|
513
|
-
maxFileSizeMB: 10,
|
|
514
|
-
rotationIntervalHours: 24,
|
|
515
|
-
compressionEnabled: true,
|
|
516
|
-
maxArchives: 10,
|
|
517
|
-
}, `cli-${Date.now()}`);
|
|
518
|
-
console.log(`\n📊 Results:`);
|
|
519
|
-
console.log(` Archived: ${result.archived} files`);
|
|
520
|
-
if (result.errors.length > 0) {
|
|
521
|
-
console.log(` Errors: ${result.errors.length}`);
|
|
522
|
-
result.errors.forEach((e) => console.log(` - ${e}`));
|
|
523
|
-
process.exit(1);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
catch (error) {
|
|
527
|
-
console.error("Archive failed:", error);
|
|
528
|
-
process.exit(1);
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
443
|
// Inference improvement command
|
|
532
444
|
program
|
|
533
445
|
.command('inference:improve')
|
|
@@ -691,7 +603,7 @@ program
|
|
|
691
603
|
const projectRoot = process.cwd();
|
|
692
604
|
const inferenceDir = `${projectRoot}/docs/inference`;
|
|
693
605
|
const stateDir = `${projectRoot}/.xray/inference`;
|
|
694
|
-
const stateFile = `${stateDir}/inference-
|
|
606
|
+
const stateFile = `${stateDir}/inference-state.json`;
|
|
695
607
|
if (!options.json) {
|
|
696
608
|
console.log('xray Inference Cycle');
|
|
697
609
|
console.log('====================');
|
|
@@ -765,35 +677,6 @@ program
|
|
|
765
677
|
}
|
|
766
678
|
}
|
|
767
679
|
});
|
|
768
|
-
// Publish agent command
|
|
769
|
-
program
|
|
770
|
-
.command('publish-agent')
|
|
771
|
-
.description('Package and publish agents to AgentStore')
|
|
772
|
-
.option('-a, --agent <name>', 'Agent name to publish')
|
|
773
|
-
.option('-v, --version <version>', 'Version to publish (default: 1.0.0)')
|
|
774
|
-
.option('-d, --dry-run', 'Show what would be published without publishing')
|
|
775
|
-
.action(async () => {
|
|
776
|
-
const { publishAgentCommand } = await import('./commands/publish-agent.js');
|
|
777
|
-
await publishAgentCommand();
|
|
778
|
-
});
|
|
779
|
-
// Antigravity status command
|
|
780
|
-
program
|
|
781
|
-
.command('antigravity status')
|
|
782
|
-
.description('Show status of all installed skills')
|
|
783
|
-
.action(async () => {
|
|
784
|
-
const { antigravityStatusCommand } = await import('./commands/antigravity-status.js');
|
|
785
|
-
await antigravityStatusCommand();
|
|
786
|
-
});
|
|
787
|
-
// Credible init command
|
|
788
|
-
program
|
|
789
|
-
.command('credible init')
|
|
790
|
-
.description('Initialize Credible Pod infrastructure')
|
|
791
|
-
.option('-n, --name <name>', 'Pod name')
|
|
792
|
-
.option('-t, --template <template>', 'Pod template to use')
|
|
793
|
-
.action(async () => {
|
|
794
|
-
const { credibleInitCommand } = await import('./commands/credible-init.js');
|
|
795
|
-
await credibleInitCommand();
|
|
796
|
-
});
|
|
797
680
|
// Skill registry command
|
|
798
681
|
program
|
|
799
682
|
.command('skill:registry [action]')
|
|
@@ -816,51 +699,6 @@ program
|
|
|
816
699
|
const { skillInstallCommand } = await import('./commands/skill-install.js');
|
|
817
700
|
await skillInstallCommand(sourceArg, options);
|
|
818
701
|
});
|
|
819
|
-
// Storyteller command
|
|
820
|
-
program
|
|
821
|
-
.command('storyteller [type]')
|
|
822
|
-
.description('Write reflections, sagas, journeys, or narratives')
|
|
823
|
-
.option('-t, --title <title>', 'Title for the story')
|
|
824
|
-
.option('-f, --framework <framework>', 'Storytelling framework (three_act_structure, hero_journey, spiral)')
|
|
825
|
-
.option('-o, --output <file>', 'Output file path')
|
|
826
|
-
.option('--dry-run', 'Show prompt without creating file')
|
|
827
|
-
.action(async (type, options) => {
|
|
828
|
-
const { storytellerCommand } = await import('./commands/storyteller.js');
|
|
829
|
-
await storytellerCommand(type, options);
|
|
830
|
-
});
|
|
831
|
-
// MCP install commands - support both hyphen and colon formats
|
|
832
|
-
program
|
|
833
|
-
.command('mcp-list')
|
|
834
|
-
.alias('mcp:list')
|
|
835
|
-
.description('List available community MCP servers')
|
|
836
|
-
.action(async () => {
|
|
837
|
-
const { listMCPsCommand } = await import('./commands/mcp-install.js');
|
|
838
|
-
listMCPsCommand();
|
|
839
|
-
});
|
|
840
|
-
program
|
|
841
|
-
.command('mcp-status')
|
|
842
|
-
.alias('mcp:status')
|
|
843
|
-
.description('Show installed MCP servers')
|
|
844
|
-
.action(async () => {
|
|
845
|
-
const { showMCPStatusCommand } = await import('./commands/mcp-install.js');
|
|
846
|
-
showMCPStatusCommand();
|
|
847
|
-
});
|
|
848
|
-
program
|
|
849
|
-
.command('mcp-install <name>')
|
|
850
|
-
.alias('mcp:install')
|
|
851
|
-
.description('Install an MCP server from the registry')
|
|
852
|
-
.action(async (name) => {
|
|
853
|
-
const { installMCPCommand } = await import('./commands/mcp-install.js');
|
|
854
|
-
await installMCPCommand(name);
|
|
855
|
-
});
|
|
856
|
-
program
|
|
857
|
-
.command('mcp-remove <name>')
|
|
858
|
-
.alias('mcp:remove')
|
|
859
|
-
.description('Remove an installed MCP server')
|
|
860
|
-
.action(async (name) => {
|
|
861
|
-
const { removeMCPCommand } = await import('./commands/mcp-install.js');
|
|
862
|
-
removeMCPCommand(name);
|
|
863
|
-
});
|
|
864
702
|
// MCP server subprocess launchers (used by Grok plugin .mcp.json via npx)
|
|
865
703
|
program
|
|
866
704
|
.command('mcp')
|
|
@@ -905,51 +743,6 @@ registerOpenClawCommands(openclawCmd);
|
|
|
905
743
|
const opencodeCmd = program.command('opencode').description('OpenCode integration commands');
|
|
906
744
|
const { registerOpencodeCommands } = await import('./commands/opencode-install.js');
|
|
907
745
|
registerOpencodeCommands(opencodeCmd);
|
|
908
|
-
// Analytics enable command
|
|
909
|
-
// Plugin subcommands
|
|
910
|
-
const pluginCmd = program.command('plugin').description('Manage plugins');
|
|
911
|
-
pluginCmd
|
|
912
|
-
.command('list')
|
|
913
|
-
.description('List installed plugins')
|
|
914
|
-
.action(async () => {
|
|
915
|
-
const { pluginListCommand } = await import('./commands/plugin-commands.js');
|
|
916
|
-
await pluginListCommand();
|
|
917
|
-
});
|
|
918
|
-
pluginCmd
|
|
919
|
-
.command('install <name>')
|
|
920
|
-
.description('Install a plugin')
|
|
921
|
-
.action(async (name) => {
|
|
922
|
-
const { pluginInstallCommand } = await import('./commands/plugin-commands.js');
|
|
923
|
-
await pluginInstallCommand(name);
|
|
924
|
-
});
|
|
925
|
-
pluginCmd
|
|
926
|
-
.command('enable <name>')
|
|
927
|
-
.description('Enable a plugin')
|
|
928
|
-
.action(async (name) => {
|
|
929
|
-
const { pluginEnableCommand } = await import('./commands/plugin-commands.js');
|
|
930
|
-
await pluginEnableCommand(name);
|
|
931
|
-
});
|
|
932
|
-
pluginCmd
|
|
933
|
-
.command('disable <name>')
|
|
934
|
-
.description('Disable a plugin')
|
|
935
|
-
.action(async (name) => {
|
|
936
|
-
const { pluginDisableCommand } = await import('./commands/plugin-commands.js');
|
|
937
|
-
await pluginDisableCommand(name);
|
|
938
|
-
});
|
|
939
|
-
pluginCmd
|
|
940
|
-
.command('status <name>')
|
|
941
|
-
.description('Show plugin details')
|
|
942
|
-
.action(async (name) => {
|
|
943
|
-
const { pluginStatusCommand } = await import('./commands/plugin-commands.js');
|
|
944
|
-
await pluginStatusCommand(name);
|
|
945
|
-
});
|
|
946
|
-
pluginCmd
|
|
947
|
-
.command('uninstall <name>')
|
|
948
|
-
.description('Uninstall a plugin')
|
|
949
|
-
.action(async (name) => {
|
|
950
|
-
const { pluginUninstallCommand } = await import('./commands/plugin-commands.js');
|
|
951
|
-
await pluginUninstallCommand(name);
|
|
952
|
-
});
|
|
953
746
|
// Security audit command
|
|
954
747
|
program
|
|
955
748
|
.command("security-audit")
|
|
@@ -958,6 +751,30 @@ program
|
|
|
958
751
|
const { securityAuditCommand } = await import("./commands/security-audit.js");
|
|
959
752
|
await securityAuditCommand();
|
|
960
753
|
});
|
|
754
|
+
// v3 nucleus: primary governance command
|
|
755
|
+
program
|
|
756
|
+
.command("govern")
|
|
757
|
+
.description("Run the xray governance kernel")
|
|
758
|
+
.option("--status", "Show framework status")
|
|
759
|
+
.option("--audit", "Run security audit")
|
|
760
|
+
.option("--mcp <server>", "Run an MCP server subprocess (governance, skills)")
|
|
761
|
+
.option("--plugin-install <name>", "Install a plugin")
|
|
762
|
+
.option("--proposals <json>", "Run governance on JSON proposals")
|
|
763
|
+
.option("--skill-install [source]", "Install skills from registry")
|
|
764
|
+
.option("--skill-registry [action]", "Manage skill registry sources")
|
|
765
|
+
.option("--storyteller <type>", "Write a story (reflection|saga|journey|narrative)")
|
|
766
|
+
.option("--mcp-list", "List available MCP servers")
|
|
767
|
+
.option("--mcp-status", "Show installed MCP servers")
|
|
768
|
+
.option("--mcp-install <name>", "Install an MCP server")
|
|
769
|
+
.option("--mcp-remove <name>", "Remove an MCP server")
|
|
770
|
+
.option("--publish-agent", "Publish an agent to AgentStore")
|
|
771
|
+
.option("--archive-logs", "Archive log files")
|
|
772
|
+
.option("--credible-init [name]", "Initialize Credible Pod")
|
|
773
|
+
.option("--antigravity-status", "Show installed skills status")
|
|
774
|
+
.action(async (options) => {
|
|
775
|
+
const { governCommand } = await import("./commands/govern.js");
|
|
776
|
+
await governCommand(options);
|
|
777
|
+
});
|
|
961
778
|
// Add help text
|
|
962
779
|
program.addHelpText("after", `
|
|
963
780
|
|
|
@@ -971,14 +788,11 @@ Examples:
|
|
|
971
788
|
$ npx 0xray report # Generate activity and health reports
|
|
972
789
|
$ npx 0xray fix # Automatically restore missing config files
|
|
973
790
|
$ npx 0xray doctor # Diagnose issues (does not fix them)
|
|
974
|
-
$ npx 0xray analytics # Pattern analytics and insights
|
|
975
791
|
$ npx 0xray inference:improve # Run autonomous inference improvement
|
|
976
|
-
$ npx 0xray skill:install agency-agents # Install 170+ agency agent skills
|
|
977
|
-
$ npx 0xray skill:install superpowers # Install 14 agentic workflow skills
|
|
978
|
-
$ npx 0xray skill:install <github-url> # Install from any repo
|
|
979
792
|
$ npx 0xray security-audit --deep # Run deep security audit
|
|
980
|
-
$ npx 0xray
|
|
981
|
-
$ npx 0xray
|
|
793
|
+
$ npx 0xray govern # Run the governance kernel
|
|
794
|
+
$ npx 0xray govern --status # Show status (v3 nucleus)
|
|
795
|
+
$ npx 0xray govern --proposals '[{"type":"fix","title":"Test","description":"A test"}]'
|
|
982
796
|
|
|
983
797
|
Quick Start:
|
|
984
798
|
1. Install: npx 0xray install
|
|
@@ -986,8 +800,7 @@ Quick Start:
|
|
|
986
800
|
3. Use agents: @security-auditor scan
|
|
987
801
|
4. Generate reports: npx 0xray report
|
|
988
802
|
5. Fix issues: npx 0xray fix
|
|
989
|
-
6.
|
|
990
|
-
7. Add skills: npx 0xray skill:install agency-agents
|
|
803
|
+
6. Add skills: npx 0xray skill:install agency-agents
|
|
991
804
|
|
|
992
805
|
For more information, visit: https://github.com/0xRayAI/xray
|
|
993
806
|
`);
|