@neuroverseos/governance 0.2.2 → 0.2.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 (91) hide show
  1. package/.well-known/ai-plugin.json +26 -0
  2. package/.well-known/mcp.json +68 -0
  3. package/AGENTS.md +219 -0
  4. package/README.md +84 -4
  5. package/dist/adapters/autoresearch.cjs +196 -0
  6. package/dist/adapters/autoresearch.d.cts +103 -0
  7. package/dist/adapters/autoresearch.d.ts +103 -0
  8. package/dist/adapters/autoresearch.js +7 -0
  9. package/dist/adapters/deep-agents.cjs +1472 -0
  10. package/dist/adapters/deep-agents.d.cts +181 -0
  11. package/dist/adapters/deep-agents.d.ts +181 -0
  12. package/dist/adapters/deep-agents.js +17 -0
  13. package/dist/adapters/express.cjs +103 -21
  14. package/dist/adapters/express.d.cts +1 -1
  15. package/dist/adapters/express.d.ts +1 -1
  16. package/dist/adapters/express.js +3 -3
  17. package/dist/adapters/index.cjs +649 -109
  18. package/dist/adapters/index.d.cts +4 -1
  19. package/dist/adapters/index.d.ts +4 -1
  20. package/dist/adapters/index.js +39 -13
  21. package/dist/adapters/langchain.cjs +152 -48
  22. package/dist/adapters/langchain.d.cts +5 -5
  23. package/dist/adapters/langchain.d.ts +5 -5
  24. package/dist/adapters/langchain.js +4 -3
  25. package/dist/adapters/openai.cjs +154 -50
  26. package/dist/adapters/openai.d.cts +5 -5
  27. package/dist/adapters/openai.d.ts +5 -5
  28. package/dist/adapters/openai.js +4 -3
  29. package/dist/adapters/openclaw.cjs +152 -48
  30. package/dist/adapters/openclaw.d.cts +5 -5
  31. package/dist/adapters/openclaw.d.ts +5 -5
  32. package/dist/adapters/openclaw.js +4 -3
  33. package/dist/{build-P42YFKQV.js → build-X5MZY4IA.js} +2 -2
  34. package/dist/{chunk-2NICNKOM.js → chunk-4L6OPKMQ.js} +1 -1
  35. package/dist/chunk-5U2MQO5P.js +57 -0
  36. package/dist/{chunk-SKU3GAPD.js → chunk-6BB55YJI.js} +16 -34
  37. package/dist/{chunk-KEST3MWO.js → chunk-AF2VX4AL.js} +47 -8
  38. package/dist/chunk-BQZMOEML.js +43 -0
  39. package/dist/chunk-D2UCV5AK.js +326 -0
  40. package/dist/{chunk-RWXVAH6P.js → chunk-EVDJUSZ2.js} +16 -34
  41. package/dist/{chunk-4JRYGIO7.js → chunk-IZSO75NZ.js} +72 -7
  42. package/dist/chunk-JCKSW2PZ.js +304 -0
  43. package/dist/{chunk-PDOZHZWL.js → chunk-KTFTTLTP.js} +25 -4
  44. package/dist/{chunk-MWDQ4MJB.js → chunk-MH7BT4VH.js} +5 -1
  45. package/dist/{chunk-4QXB6PEO.js → chunk-QLPTHTVB.js} +37 -16
  46. package/dist/{chunk-QPASI2BR.js → chunk-REXY4LUL.js} +49 -10
  47. package/dist/chunk-T5EUJQE5.js +172 -0
  48. package/dist/{chunk-DPVS43ZT.js → chunk-TTBKTF3P.js} +5 -5
  49. package/dist/{chunk-OHAC6HJE.js → chunk-ZIVQNSZU.js} +16 -36
  50. package/dist/{chunk-BUWWN2NX.js → chunk-ZJTDUCC2.js} +9 -7
  51. package/dist/cli/neuroverse.cjs +2582 -493
  52. package/dist/cli/neuroverse.js +39 -15
  53. package/dist/cli/plan.cjs +119 -32
  54. package/dist/cli/plan.js +5 -13
  55. package/dist/cli/run.cjs +223 -24
  56. package/dist/cli/run.js +2 -2
  57. package/dist/decision-flow-LETV5NWY.js +61 -0
  58. package/dist/{derive-TLIV4OOU.js → derive-7365SUFU.js} +2 -2
  59. package/dist/{doctor-QV6HELS5.js → doctor-QYISMKEL.js} +5 -2
  60. package/dist/equity-penalties-63FGB3I2.js +244 -0
  61. package/dist/{explain-IDCRWMPX.js → explain-A2EWI2OL.js} +4 -23
  62. package/dist/{guard-GFLQZY6U.js → guard-3BWL3IGH.js} +6 -10
  63. package/dist/{guard-contract-Cm91Kp4j.d.ts → guard-contract-C9_zKbzd.d.cts} +117 -5
  64. package/dist/{guard-contract-Cm91Kp4j.d.cts → guard-contract-C9_zKbzd.d.ts} +117 -5
  65. package/dist/{guard-engine-JLTUARGU.js → guard-engine-QFMIBWJY.js} +2 -2
  66. package/dist/{impact-XPECYRLH.js → impact-UB6DXKSX.js} +4 -4
  67. package/dist/{improve-GPUBKTEA.js → improve-XZA57GER.js} +5 -24
  68. package/dist/index.cjs +592 -44
  69. package/dist/index.d.cts +218 -5
  70. package/dist/index.d.ts +218 -5
  71. package/dist/index.js +92 -41
  72. package/dist/infer-world-7GVZWFX4.js +543 -0
  73. package/dist/init-world-VWMQZQC7.js +223 -0
  74. package/dist/{mcp-server-LZVJHBT5.js → mcp-server-XWQZXNW7.js} +3 -3
  75. package/dist/{playground-FGOMASHN.js → playground-ADWZORNV.js} +2 -2
  76. package/dist/{redteam-SK7AMIG3.js → redteam-JRQ7FD2F.js} +2 -2
  77. package/dist/{session-VISISNWJ.js → session-MMYX5YCF.js} +4 -3
  78. package/dist/shared--Q8wPBVN.d.ts +60 -0
  79. package/dist/shared-HpAG90PX.d.cts +60 -0
  80. package/dist/shared-U2QFV7JH.js +16 -0
  81. package/dist/{simulate-VDOYQFRO.js → simulate-GMIFFXYV.js} +5 -30
  82. package/dist/{test-75AVHC3R.js → test-JBBZ65X4.js} +2 -2
  83. package/dist/{trace-JVF67VR3.js → trace-3MYWIDEF.js} +3 -3
  84. package/dist/worlds/autoresearch.nv-world.md +230 -0
  85. package/dist/worlds/coding-agent.nv-world.md +211 -0
  86. package/llms.txt +79 -0
  87. package/openapi.yaml +230 -0
  88. package/package.json +26 -4
  89. package/dist/{chunk-GR6DGCZ2.js → chunk-BMOXICAB.js} +3 -3
  90. package/dist/{chunk-NF5POFCI.js → chunk-ORJ3NOE6.js} +3 -3
  91. package/dist/{world-LAXO6DOX.js → world-BFJCIQSH.js} +3 -3
@@ -0,0 +1,103 @@
1
+ import { W as WorldDefinition, G as GuardEvent } from '../guard-contract-C9_zKbzd.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
+ constructor(config: AutoresearchGovernorConfig);
58
+ /**
59
+ * Convert an experiment proposal into a GuardEvent for governance evaluation.
60
+ */
61
+ proposalToGuardEvent(proposal: ExperimentProposal): GuardEvent;
62
+ /**
63
+ * Evaluate an experiment proposal against governance rules.
64
+ * Returns a simplified verdict without requiring the full guard engine.
65
+ */
66
+ evaluateProposal(proposal: ExperimentProposal): {
67
+ allowed: boolean;
68
+ reason: string;
69
+ warnings: string[];
70
+ };
71
+ /**
72
+ * Record an experiment result and update research state.
73
+ */
74
+ recordResult(result: ExperimentResult): {
75
+ kept: boolean;
76
+ improvement: number | null;
77
+ state: ResearchState;
78
+ };
79
+ /**
80
+ * Export current state as a state snapshot compatible with the world file.
81
+ */
82
+ toWorldState(): Record<string, number>;
83
+ /**
84
+ * Get a summary of the current research state.
85
+ */
86
+ getSummary(): {
87
+ experiments_run: number;
88
+ best_result: ExperimentResult | null;
89
+ keep_rate: number;
90
+ compute_remaining_minutes: number;
91
+ architectures_tested: string[];
92
+ };
93
+ /**
94
+ * Load state from a persisted research context file.
95
+ */
96
+ loadState(state: ResearchState): void;
97
+ /**
98
+ * Export state for persistence.
99
+ */
100
+ exportState(): ResearchState;
101
+ }
102
+
103
+ export { AutoresearchGovernor, type AutoresearchGovernorConfig, type ExperimentProposal, type ExperimentResult, type ResearchState };
@@ -0,0 +1,103 @@
1
+ import { W as WorldDefinition, G as GuardEvent } from '../guard-contract-C9_zKbzd.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
+ constructor(config: AutoresearchGovernorConfig);
58
+ /**
59
+ * Convert an experiment proposal into a GuardEvent for governance evaluation.
60
+ */
61
+ proposalToGuardEvent(proposal: ExperimentProposal): GuardEvent;
62
+ /**
63
+ * Evaluate an experiment proposal against governance rules.
64
+ * Returns a simplified verdict without requiring the full guard engine.
65
+ */
66
+ evaluateProposal(proposal: ExperimentProposal): {
67
+ allowed: boolean;
68
+ reason: string;
69
+ warnings: string[];
70
+ };
71
+ /**
72
+ * Record an experiment result and update research state.
73
+ */
74
+ recordResult(result: ExperimentResult): {
75
+ kept: boolean;
76
+ improvement: number | null;
77
+ state: ResearchState;
78
+ };
79
+ /**
80
+ * Export current state as a state snapshot compatible with the world file.
81
+ */
82
+ toWorldState(): Record<string, number>;
83
+ /**
84
+ * Get a summary of the current research state.
85
+ */
86
+ getSummary(): {
87
+ experiments_run: number;
88
+ best_result: ExperimentResult | null;
89
+ keep_rate: number;
90
+ compute_remaining_minutes: number;
91
+ architectures_tested: string[];
92
+ };
93
+ /**
94
+ * Load state from a persisted research context file.
95
+ */
96
+ loadState(state: ResearchState): void;
97
+ /**
98
+ * Export state for persistence.
99
+ */
100
+ exportState(): ResearchState;
101
+ }
102
+
103
+ export { AutoresearchGovernor, type AutoresearchGovernorConfig, type ExperimentProposal, type ExperimentResult, type ResearchState };
@@ -0,0 +1,7 @@
1
+ import {
2
+ AutoresearchGovernor
3
+ } from "../chunk-T5EUJQE5.js";
4
+ import "../chunk-YZFATT7X.js";
5
+ export {
6
+ AutoresearchGovernor
7
+ };