@neuroverseos/governance 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/.well-known/ai-plugin.json +34 -9
  2. package/AGENTS.md +72 -24
  3. package/README.md +343 -248
  4. package/dist/adapters/autoresearch.cjs +1345 -0
  5. package/dist/adapters/autoresearch.d.cts +111 -0
  6. package/dist/adapters/autoresearch.d.ts +111 -0
  7. package/dist/adapters/autoresearch.js +12 -0
  8. package/dist/adapters/deep-agents.cjs +1528 -0
  9. package/dist/adapters/deep-agents.d.cts +181 -0
  10. package/dist/adapters/deep-agents.d.ts +181 -0
  11. package/dist/adapters/deep-agents.js +17 -0
  12. package/dist/adapters/express.cjs +1253 -0
  13. package/dist/adapters/express.d.cts +66 -0
  14. package/dist/adapters/express.d.ts +66 -0
  15. package/dist/adapters/express.js +12 -0
  16. package/dist/adapters/index.cjs +2112 -0
  17. package/dist/adapters/index.d.cts +8 -0
  18. package/dist/adapters/index.d.ts +8 -0
  19. package/dist/adapters/index.js +68 -0
  20. package/dist/adapters/langchain.cjs +1315 -0
  21. package/dist/adapters/langchain.d.cts +89 -0
  22. package/dist/adapters/langchain.d.ts +89 -0
  23. package/dist/adapters/langchain.js +17 -0
  24. package/dist/adapters/openai.cjs +1345 -0
  25. package/dist/adapters/openai.d.cts +99 -0
  26. package/dist/adapters/openai.d.ts +99 -0
  27. package/dist/adapters/openai.js +17 -0
  28. package/dist/adapters/openclaw.cjs +1337 -0
  29. package/dist/adapters/openclaw.d.cts +99 -0
  30. package/dist/adapters/openclaw.d.ts +99 -0
  31. package/dist/adapters/openclaw.js +17 -0
  32. package/dist/add-ROOZLU62.js +314 -0
  33. package/dist/behavioral-MJO34S6Q.js +118 -0
  34. package/dist/bootstrap-CQRZVOXK.js +116 -0
  35. package/dist/bootstrap-emitter-Q7UIJZ2O.js +7 -0
  36. package/dist/bootstrap-parser-EEF36XDU.js +7 -0
  37. package/dist/browser.global.js +941 -0
  38. package/dist/build-QKOBBC23.js +341 -0
  39. package/dist/chunk-3WQLXYTP.js +91 -0
  40. package/dist/chunk-4FLICVVA.js +119 -0
  41. package/dist/chunk-4NGDRRQH.js +10 -0
  42. package/dist/chunk-5TPFNWRU.js +215 -0
  43. package/dist/chunk-5U2MQO5P.js +57 -0
  44. package/dist/chunk-6CZSKEY5.js +164 -0
  45. package/dist/chunk-6S5CFQXY.js +624 -0
  46. package/dist/chunk-7P3S7MAY.js +1090 -0
  47. package/dist/chunk-A5W4GNQO.js +130 -0
  48. package/dist/chunk-A7GKPPU7.js +226 -0
  49. package/dist/chunk-AKW5YVCE.js +96 -0
  50. package/dist/chunk-B6OXJLJ5.js +622 -0
  51. package/dist/chunk-BNKJPUPQ.js +113 -0
  52. package/dist/chunk-BQZMOEML.js +43 -0
  53. package/dist/chunk-CNSO6XW5.js +207 -0
  54. package/dist/chunk-CTZHONLA.js +135 -0
  55. package/dist/chunk-D2UCV5AK.js +326 -0
  56. package/dist/chunk-EMQDLDAF.js +458 -0
  57. package/dist/chunk-F66BVUYB.js +340 -0
  58. package/dist/chunk-G7DJ6VOD.js +101 -0
  59. package/dist/chunk-I3RRAYK2.js +11 -0
  60. package/dist/chunk-IS4WUH6Y.js +363 -0
  61. package/dist/chunk-MH7BT4VH.js +15 -0
  62. package/dist/chunk-O5ABKEA7.js +304 -0
  63. package/dist/chunk-OT6PXH54.js +61 -0
  64. package/dist/chunk-PVTQQS3Y.js +186 -0
  65. package/dist/chunk-Q6O7ZLO2.js +62 -0
  66. package/dist/chunk-QLPTHTVB.js +253 -0
  67. package/dist/chunk-QWGCMQQD.js +16 -0
  68. package/dist/chunk-QXBFT7NI.js +201 -0
  69. package/dist/chunk-TG6SEF24.js +246 -0
  70. package/dist/chunk-U6U7EJZL.js +177 -0
  71. package/dist/chunk-W7LLXRGY.js +830 -0
  72. package/dist/chunk-ZJTDUCC2.js +194 -0
  73. package/dist/chunk-ZWI3NIXK.js +314 -0
  74. package/dist/cli/neuroverse.cjs +14191 -0
  75. package/dist/cli/neuroverse.d.cts +1 -0
  76. package/dist/cli/neuroverse.d.ts +1 -0
  77. package/dist/cli/neuroverse.js +227 -0
  78. package/dist/cli/plan.cjs +2439 -0
  79. package/dist/cli/plan.d.cts +20 -0
  80. package/dist/cli/plan.d.ts +20 -0
  81. package/dist/cli/plan.js +353 -0
  82. package/dist/cli/run.cjs +2001 -0
  83. package/dist/cli/run.d.cts +20 -0
  84. package/dist/cli/run.d.ts +20 -0
  85. package/dist/cli/run.js +143 -0
  86. package/dist/configure-ai-6TZ3MCSI.js +132 -0
  87. package/dist/decision-flow-M63D47LO.js +61 -0
  88. package/dist/demo-G43RLCPK.js +469 -0
  89. package/dist/derive-FJZVIPUZ.js +153 -0
  90. package/dist/doctor-6BC6X2VO.js +173 -0
  91. package/dist/equity-penalties-SG5IZQ7I.js +244 -0
  92. package/dist/explain-RHBU2GBR.js +51 -0
  93. package/dist/guard-AJCCGZMF.js +92 -0
  94. package/dist/guard-contract-DqFcTScd.d.cts +821 -0
  95. package/dist/guard-contract-DqFcTScd.d.ts +821 -0
  96. package/dist/guard-engine-PNR6MHCM.js +10 -0
  97. package/dist/impact-3XVDSCBU.js +59 -0
  98. package/dist/improve-TQP4ECSY.js +66 -0
  99. package/dist/index.cjs +7591 -0
  100. package/dist/index.d.cts +2195 -0
  101. package/dist/index.d.ts +2195 -0
  102. package/dist/index.js +472 -0
  103. package/dist/infer-world-IFXCACJ5.js +543 -0
  104. package/dist/init-FYPV4SST.js +144 -0
  105. package/dist/init-world-TI7ARHBT.js +223 -0
  106. package/dist/mcp-server-5Y3ZM7TV.js +13 -0
  107. package/dist/model-adapter-VXEKB4LS.js +11 -0
  108. package/dist/playground-VZBNPPBO.js +560 -0
  109. package/dist/redteam-MZPZD3EF.js +357 -0
  110. package/dist/session-JYOARW54.js +15 -0
  111. package/dist/shared-7RLUHNMU.js +16 -0
  112. package/dist/shared-B8dvUUD8.d.cts +60 -0
  113. package/dist/shared-Dr5Wiay8.d.ts +60 -0
  114. package/dist/simulate-LJXYBC6M.js +83 -0
  115. package/dist/test-BOOR4A5F.js +217 -0
  116. package/dist/trace-PKV4KX56.js +166 -0
  117. package/dist/validate-RALX7CZS.js +81 -0
  118. package/dist/validate-engine-7ZXFVGF2.js +7 -0
  119. package/dist/viz/assets/index-B8SaeJZZ.js +23 -0
  120. package/dist/viz/index.html +23 -0
  121. package/dist/world-BIP4GZBZ.js +376 -0
  122. package/dist/world-loader-Y6HMQH2D.js +13 -0
  123. package/dist/worlds/autoresearch.nv-world.md +230 -0
  124. package/dist/worlds/coding-agent.nv-world.md +211 -0
  125. package/dist/worlds/derivation-world.nv-world.md +278 -0
  126. package/dist/worlds/research-agent.nv-world.md +169 -0
  127. package/dist/worlds/social-media.nv-world.md +198 -0
  128. package/dist/worlds/trading-agent.nv-world.md +218 -0
  129. package/examples/social-media-sim/bridge.py +209 -0
  130. package/examples/social-media-sim/simulation.py +927 -0
  131. package/package.json +16 -3
  132. package/simulate.html +4 -336
@@ -0,0 +1,111 @@
1
+ import { W as WorldDefinition, G as GuardEvent, a as GuardVerdict } from '../guard-contract-DqFcTScd.cjs';
2
+
3
+ /**
4
+ * Autoresearch Adapter — Bridge between NeuroVerse governance and autoresearch loops
5
+ *
6
+ * This adapter translates autoresearch experiment events into GuardEvents
7
+ * that can be evaluated by the NeuroVerse governance engine.
8
+ *
9
+ * Usage:
10
+ * import { AutoresearchGovernor } from '@neuroverseos/governance/adapters';
11
+ *
12
+ * const governor = new AutoresearchGovernor({ worldPath: './world/' });
13
+ * const verdict = await governor.evaluateExperiment(experiment);
14
+ * const state = governor.updateState(experimentResult);
15
+ */
16
+
17
+ interface ExperimentProposal {
18
+ experiment_id: number;
19
+ architecture: string;
20
+ description: string;
21
+ estimated_minutes?: number;
22
+ hyperparameters?: Record<string, unknown>;
23
+ }
24
+ interface ExperimentResult {
25
+ experiment_id: number;
26
+ architecture: string;
27
+ dataset: string;
28
+ metric_name: string;
29
+ metric_value: number;
30
+ training_config: Record<string, unknown>;
31
+ wall_clock_minutes: number;
32
+ timestamp: string;
33
+ success: boolean;
34
+ error?: string;
35
+ }
36
+ interface ResearchState {
37
+ experiments_run: number;
38
+ best_result: ExperimentResult | null;
39
+ architectures_tested: string[];
40
+ experiment_log: ExperimentResult[];
41
+ total_compute_minutes: number;
42
+ keep_count: number;
43
+ }
44
+ interface AutoresearchGovernorConfig {
45
+ world?: WorldDefinition;
46
+ worldPath?: string;
47
+ metric: string;
48
+ optimize: 'minimize' | 'maximize';
49
+ computeBudgetMinutes: number;
50
+ dataset: string;
51
+ context: string;
52
+ constraints?: string[];
53
+ }
54
+ declare class AutoresearchGovernor {
55
+ private config;
56
+ private state;
57
+ private world?;
58
+ private engineOptions;
59
+ constructor(config: AutoresearchGovernorConfig);
60
+ /**
61
+ * Convert an experiment proposal into a GuardEvent for governance evaluation.
62
+ */
63
+ proposalToGuardEvent(proposal: ExperimentProposal): GuardEvent;
64
+ /**
65
+ * Evaluate an experiment proposal against governance rules.
66
+ * Routes through the guard engine when a world is loaded,
67
+ * then layers on research-specific checks (budget, constraints, drift).
68
+ */
69
+ evaluateProposal(proposal: ExperimentProposal): {
70
+ allowed: boolean;
71
+ reason: string;
72
+ warnings: string[];
73
+ verdict?: GuardVerdict;
74
+ };
75
+ /**
76
+ * Record an experiment result and update research state.
77
+ */
78
+ recordResult(result: ExperimentResult): {
79
+ kept: boolean;
80
+ improvement: number | null;
81
+ state: ResearchState;
82
+ };
83
+ /**
84
+ * Export current state as a state snapshot compatible with the world file.
85
+ */
86
+ toWorldState(): Record<string, number>;
87
+ /**
88
+ * Get a summary of the current research state.
89
+ */
90
+ getSummary(): {
91
+ experiments_run: number;
92
+ best_result: ExperimentResult | null;
93
+ keep_rate: number;
94
+ compute_remaining_minutes: number;
95
+ architectures_tested: string[];
96
+ };
97
+ /**
98
+ * Load state from a persisted research context file.
99
+ */
100
+ loadState(state: ResearchState): void;
101
+ /**
102
+ * Export state for persistence.
103
+ */
104
+ exportState(): ResearchState;
105
+ }
106
+ /**
107
+ * Create an AutoresearchGovernor with a world loaded from disk.
108
+ */
109
+ declare function createAutoresearchGovernor(worldPath: string, config: Omit<AutoresearchGovernorConfig, 'world' | 'worldPath'>): Promise<AutoresearchGovernor>;
110
+
111
+ export { AutoresearchGovernor, type AutoresearchGovernorConfig, type ExperimentProposal, type ExperimentResult, type ResearchState, createAutoresearchGovernor };
@@ -0,0 +1,111 @@
1
+ import { W as WorldDefinition, G as GuardEvent, a as GuardVerdict } from '../guard-contract-DqFcTScd.js';
2
+
3
+ /**
4
+ * Autoresearch Adapter — Bridge between NeuroVerse governance and autoresearch loops
5
+ *
6
+ * This adapter translates autoresearch experiment events into GuardEvents
7
+ * that can be evaluated by the NeuroVerse governance engine.
8
+ *
9
+ * Usage:
10
+ * import { AutoresearchGovernor } from '@neuroverseos/governance/adapters';
11
+ *
12
+ * const governor = new AutoresearchGovernor({ worldPath: './world/' });
13
+ * const verdict = await governor.evaluateExperiment(experiment);
14
+ * const state = governor.updateState(experimentResult);
15
+ */
16
+
17
+ interface ExperimentProposal {
18
+ experiment_id: number;
19
+ architecture: string;
20
+ description: string;
21
+ estimated_minutes?: number;
22
+ hyperparameters?: Record<string, unknown>;
23
+ }
24
+ interface ExperimentResult {
25
+ experiment_id: number;
26
+ architecture: string;
27
+ dataset: string;
28
+ metric_name: string;
29
+ metric_value: number;
30
+ training_config: Record<string, unknown>;
31
+ wall_clock_minutes: number;
32
+ timestamp: string;
33
+ success: boolean;
34
+ error?: string;
35
+ }
36
+ interface ResearchState {
37
+ experiments_run: number;
38
+ best_result: ExperimentResult | null;
39
+ architectures_tested: string[];
40
+ experiment_log: ExperimentResult[];
41
+ total_compute_minutes: number;
42
+ keep_count: number;
43
+ }
44
+ interface AutoresearchGovernorConfig {
45
+ world?: WorldDefinition;
46
+ worldPath?: string;
47
+ metric: string;
48
+ optimize: 'minimize' | 'maximize';
49
+ computeBudgetMinutes: number;
50
+ dataset: string;
51
+ context: string;
52
+ constraints?: string[];
53
+ }
54
+ declare class AutoresearchGovernor {
55
+ private config;
56
+ private state;
57
+ private world?;
58
+ private engineOptions;
59
+ constructor(config: AutoresearchGovernorConfig);
60
+ /**
61
+ * Convert an experiment proposal into a GuardEvent for governance evaluation.
62
+ */
63
+ proposalToGuardEvent(proposal: ExperimentProposal): GuardEvent;
64
+ /**
65
+ * Evaluate an experiment proposal against governance rules.
66
+ * Routes through the guard engine when a world is loaded,
67
+ * then layers on research-specific checks (budget, constraints, drift).
68
+ */
69
+ evaluateProposal(proposal: ExperimentProposal): {
70
+ allowed: boolean;
71
+ reason: string;
72
+ warnings: string[];
73
+ verdict?: GuardVerdict;
74
+ };
75
+ /**
76
+ * Record an experiment result and update research state.
77
+ */
78
+ recordResult(result: ExperimentResult): {
79
+ kept: boolean;
80
+ improvement: number | null;
81
+ state: ResearchState;
82
+ };
83
+ /**
84
+ * Export current state as a state snapshot compatible with the world file.
85
+ */
86
+ toWorldState(): Record<string, number>;
87
+ /**
88
+ * Get a summary of the current research state.
89
+ */
90
+ getSummary(): {
91
+ experiments_run: number;
92
+ best_result: ExperimentResult | null;
93
+ keep_rate: number;
94
+ compute_remaining_minutes: number;
95
+ architectures_tested: string[];
96
+ };
97
+ /**
98
+ * Load state from a persisted research context file.
99
+ */
100
+ loadState(state: ResearchState): void;
101
+ /**
102
+ * Export state for persistence.
103
+ */
104
+ exportState(): ResearchState;
105
+ }
106
+ /**
107
+ * Create an AutoresearchGovernor with a world loaded from disk.
108
+ */
109
+ declare function createAutoresearchGovernor(worldPath: string, config: Omit<AutoresearchGovernorConfig, 'world' | 'worldPath'>): Promise<AutoresearchGovernor>;
110
+
111
+ export { AutoresearchGovernor, type AutoresearchGovernorConfig, type ExperimentProposal, type ExperimentResult, type ResearchState, createAutoresearchGovernor };
@@ -0,0 +1,12 @@
1
+ import {
2
+ AutoresearchGovernor,
3
+ createAutoresearchGovernor
4
+ } from "../chunk-QXBFT7NI.js";
5
+ import "../chunk-W7LLXRGY.js";
6
+ import "../chunk-QLPTHTVB.js";
7
+ import "../chunk-CTZHONLA.js";
8
+ import "../chunk-QWGCMQQD.js";
9
+ export {
10
+ AutoresearchGovernor,
11
+ createAutoresearchGovernor
12
+ };