@neuroverseos/governance 0.2.3 → 0.3.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/package.json +4 -2
- package/policies/content-moderation-rules.txt +8 -0
- package/policies/marketing-rules.txt +8 -0
- package/policies/science-research-rules.txt +11 -0
- package/policies/social-media-rules.txt +7 -0
- package/policies/strict-rules.txt +8 -0
- package/policies/trading-rules.txt +8 -0
- package/simulate.html +1899 -0
- package/dist/adapters/autoresearch.cjs +0 -196
- package/dist/adapters/autoresearch.d.cts +0 -103
- package/dist/adapters/autoresearch.d.ts +0 -103
- package/dist/adapters/autoresearch.js +0 -7
- package/dist/adapters/deep-agents.cjs +0 -1472
- package/dist/adapters/deep-agents.d.cts +0 -181
- package/dist/adapters/deep-agents.d.ts +0 -181
- package/dist/adapters/deep-agents.js +0 -17
- package/dist/adapters/express.cjs +0 -1196
- package/dist/adapters/express.d.cts +0 -66
- package/dist/adapters/express.d.ts +0 -66
- package/dist/adapters/express.js +0 -12
- package/dist/adapters/index.cjs +0 -2038
- package/dist/adapters/index.d.cts +0 -8
- package/dist/adapters/index.d.ts +0 -8
- package/dist/adapters/index.js +0 -68
- package/dist/adapters/langchain.cjs +0 -1259
- package/dist/adapters/langchain.d.cts +0 -89
- package/dist/adapters/langchain.d.ts +0 -89
- package/dist/adapters/langchain.js +0 -17
- package/dist/adapters/openai.cjs +0 -1289
- package/dist/adapters/openai.d.cts +0 -99
- package/dist/adapters/openai.d.ts +0 -99
- package/dist/adapters/openai.js +0 -17
- package/dist/adapters/openclaw.cjs +0 -1281
- package/dist/adapters/openclaw.d.cts +0 -99
- package/dist/adapters/openclaw.d.ts +0 -99
- package/dist/adapters/openclaw.js +0 -17
- package/dist/bootstrap-GXVDZNF7.js +0 -114
- package/dist/build-X5MZY4IA.js +0 -339
- package/dist/chunk-4L6OPKMQ.js +0 -100
- package/dist/chunk-4NGDRRQH.js +0 -10
- package/dist/chunk-5U2MQO5P.js +0 -57
- package/dist/chunk-6BB55YJI.js +0 -113
- package/dist/chunk-6CZSKEY5.js +0 -164
- package/dist/chunk-7P3S7MAY.js +0 -1090
- package/dist/chunk-A5W4GNQO.js +0 -130
- package/dist/chunk-AF2VX4AL.js +0 -363
- package/dist/chunk-AKW5YVCE.js +0 -96
- package/dist/chunk-BMOXICAB.js +0 -340
- package/dist/chunk-BQZMOEML.js +0 -43
- package/dist/chunk-D2UCV5AK.js +0 -326
- package/dist/chunk-EVDJUSZ2.js +0 -91
- package/dist/chunk-FYS2CBUW.js +0 -304
- package/dist/chunk-I3RRAYK2.js +0 -11
- package/dist/chunk-IZSO75NZ.js +0 -792
- package/dist/chunk-JCKSW2PZ.js +0 -304
- package/dist/chunk-JZPQGIKR.js +0 -79
- package/dist/chunk-KTFTTLTP.js +0 -246
- package/dist/chunk-MH7BT4VH.js +0 -15
- package/dist/chunk-ORJ3NOE6.js +0 -622
- package/dist/chunk-OT6PXH54.js +0 -61
- package/dist/chunk-Q6O7ZLO2.js +0 -62
- package/dist/chunk-QLPTHTVB.js +0 -253
- package/dist/chunk-REXY4LUL.js +0 -226
- package/dist/chunk-T5EUJQE5.js +0 -172
- package/dist/chunk-TTBKTF3P.js +0 -608
- package/dist/chunk-XPDMYECO.js +0 -642
- package/dist/chunk-YZFATT7X.js +0 -9
- package/dist/chunk-ZIVQNSZU.js +0 -119
- package/dist/chunk-ZJTDUCC2.js +0 -194
- package/dist/cli/neuroverse.cjs +0 -12564
- package/dist/cli/neuroverse.d.cts +0 -1
- package/dist/cli/neuroverse.d.ts +0 -1
- package/dist/cli/neuroverse.js +0 -208
- package/dist/cli/plan.cjs +0 -1686
- package/dist/cli/plan.d.cts +0 -20
- package/dist/cli/plan.d.ts +0 -20
- package/dist/cli/plan.js +0 -353
- package/dist/cli/run.cjs +0 -1945
- package/dist/cli/run.d.cts +0 -20
- package/dist/cli/run.d.ts +0 -20
- package/dist/cli/run.js +0 -143
- package/dist/configure-ai-TK67ZWZL.js +0 -132
- package/dist/decision-flow-LETV5NWY.js +0 -61
- package/dist/derive-7365SUFU.js +0 -152
- package/dist/doctor-QYISMKEL.js +0 -173
- package/dist/equity-penalties-63FGB3I2.js +0 -244
- package/dist/explain-A2EWI2OL.js +0 -51
- package/dist/guard-3BWL3IGH.js +0 -92
- package/dist/guard-contract-C9_zKbzd.d.cts +0 -821
- package/dist/guard-contract-C9_zKbzd.d.ts +0 -821
- package/dist/guard-engine-QFMIBWJY.js +0 -10
- package/dist/impact-UB6DXKSX.js +0 -59
- package/dist/improve-XZA57GER.js +0 -66
- package/dist/index.cjs +0 -6821
- package/dist/index.d.cts +0 -1829
- package/dist/index.d.ts +0 -1829
- package/dist/index.js +0 -430
- package/dist/infer-world-7GVZWFX4.js +0 -543
- package/dist/init-PKPIYHYE.js +0 -144
- package/dist/init-world-VWMQZQC7.js +0 -223
- package/dist/mcp-server-XWQZXNW7.js +0 -13
- package/dist/model-adapter-BB7G4MFI.js +0 -11
- package/dist/playground-ADWZORNV.js +0 -550
- package/dist/redteam-JRQ7FD2F.js +0 -357
- package/dist/session-MMYX5YCF.js +0 -15
- package/dist/shared--Q8wPBVN.d.ts +0 -60
- package/dist/shared-HpAG90PX.d.cts +0 -60
- package/dist/shared-U2QFV7JH.js +0 -16
- package/dist/simulate-GMIFFXYV.js +0 -83
- package/dist/test-JBBZ65X4.js +0 -217
- package/dist/trace-3MYWIDEF.js +0 -166
- package/dist/validate-LLBWVPGV.js +0 -81
- package/dist/validate-engine-UIABSIHD.js +0 -7
- package/dist/world-BFJCIQSH.js +0 -378
- package/dist/world-loader-HMPTOEA2.js +0 -9
- package/dist/worlds/autoresearch.nv-world.md +0 -230
- package/dist/worlds/coding-agent.nv-world.md +0 -211
- package/dist/worlds/derivation-world.nv-world.md +0 -278
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/adapters/autoresearch.ts
|
|
21
|
-
var autoresearch_exports = {};
|
|
22
|
-
__export(autoresearch_exports, {
|
|
23
|
-
AutoresearchGovernor: () => AutoresearchGovernor
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(autoresearch_exports);
|
|
26
|
-
var AutoresearchGovernor = class {
|
|
27
|
-
config;
|
|
28
|
-
state;
|
|
29
|
-
constructor(config) {
|
|
30
|
-
this.config = config;
|
|
31
|
-
this.state = {
|
|
32
|
-
experiments_run: 0,
|
|
33
|
-
best_result: null,
|
|
34
|
-
architectures_tested: [],
|
|
35
|
-
experiment_log: [],
|
|
36
|
-
total_compute_minutes: 0,
|
|
37
|
-
keep_count: 0
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Convert an experiment proposal into a GuardEvent for governance evaluation.
|
|
42
|
-
*/
|
|
43
|
-
proposalToGuardEvent(proposal) {
|
|
44
|
-
return {
|
|
45
|
-
intent: `run experiment: ${proposal.description}`,
|
|
46
|
-
tool: "experiment_runner",
|
|
47
|
-
scope: "experiment",
|
|
48
|
-
roleId: "experiment_runner",
|
|
49
|
-
direction: "output",
|
|
50
|
-
actionCategory: "shell",
|
|
51
|
-
args: {
|
|
52
|
-
experiment_id: String(proposal.experiment_id),
|
|
53
|
-
architecture: proposal.architecture,
|
|
54
|
-
estimated_minutes: String(proposal.estimated_minutes || 5)
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Evaluate an experiment proposal against governance rules.
|
|
60
|
-
* Returns a simplified verdict without requiring the full guard engine.
|
|
61
|
-
*/
|
|
62
|
-
evaluateProposal(proposal) {
|
|
63
|
-
const warnings = [];
|
|
64
|
-
const estimatedMinutes = proposal.estimated_minutes || 5;
|
|
65
|
-
if (this.state.total_compute_minutes + estimatedMinutes > this.config.computeBudgetMinutes) {
|
|
66
|
-
return {
|
|
67
|
-
allowed: false,
|
|
68
|
-
reason: `Compute budget exhausted: ${this.state.total_compute_minutes}/${this.config.computeBudgetMinutes} minutes used`,
|
|
69
|
-
warnings
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
if (this.config.constraints) {
|
|
73
|
-
for (const constraint of this.config.constraints) {
|
|
74
|
-
const lower = constraint.toLowerCase();
|
|
75
|
-
const archLower = proposal.architecture.toLowerCase();
|
|
76
|
-
const descLower = proposal.description.toLowerCase();
|
|
77
|
-
if (lower.startsWith("no ")) {
|
|
78
|
-
const forbidden = lower.slice(3).trim();
|
|
79
|
-
if (archLower.includes(forbidden) || descLower.includes(forbidden)) {
|
|
80
|
-
return {
|
|
81
|
-
allowed: false,
|
|
82
|
-
reason: `Architecture constraint violated: ${constraint}`,
|
|
83
|
-
warnings
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const failureCount = this.state.experiment_log.filter((e) => !e.success).length;
|
|
90
|
-
if (failureCount > 5) {
|
|
91
|
-
warnings.push(`High failure rate: ${failureCount} failed experiments. Consider investigating root cause.`);
|
|
92
|
-
}
|
|
93
|
-
const recentArchitectures = this.state.experiment_log.slice(-5).map((e) => e.architecture);
|
|
94
|
-
const uniqueRecent = new Set(recentArchitectures).size;
|
|
95
|
-
if (recentArchitectures.length >= 5 && uniqueRecent === 1) {
|
|
96
|
-
warnings.push("Research may be stuck: last 5 experiments used the same architecture.");
|
|
97
|
-
}
|
|
98
|
-
return { allowed: true, reason: "Experiment approved", warnings };
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Record an experiment result and update research state.
|
|
102
|
-
*/
|
|
103
|
-
recordResult(result) {
|
|
104
|
-
this.state.experiments_run++;
|
|
105
|
-
this.state.total_compute_minutes += result.wall_clock_minutes;
|
|
106
|
-
this.state.experiment_log.push(result);
|
|
107
|
-
if (!this.state.architectures_tested.includes(result.architecture)) {
|
|
108
|
-
this.state.architectures_tested.push(result.architecture);
|
|
109
|
-
}
|
|
110
|
-
if (!result.success) {
|
|
111
|
-
return { kept: false, improvement: null, state: { ...this.state } };
|
|
112
|
-
}
|
|
113
|
-
let kept = false;
|
|
114
|
-
let improvement = null;
|
|
115
|
-
if (this.state.best_result === null) {
|
|
116
|
-
kept = true;
|
|
117
|
-
this.state.best_result = result;
|
|
118
|
-
this.state.keep_count++;
|
|
119
|
-
} else {
|
|
120
|
-
const prev = this.state.best_result.metric_value;
|
|
121
|
-
const curr = result.metric_value;
|
|
122
|
-
if (this.config.optimize === "minimize") {
|
|
123
|
-
kept = curr < prev;
|
|
124
|
-
improvement = kept ? prev - curr : null;
|
|
125
|
-
} else {
|
|
126
|
-
kept = curr > prev;
|
|
127
|
-
improvement = kept ? curr - prev : null;
|
|
128
|
-
}
|
|
129
|
-
if (kept) {
|
|
130
|
-
this.state.best_result = result;
|
|
131
|
-
this.state.keep_count++;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return { kept, improvement, state: { ...this.state } };
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Export current state as a state snapshot compatible with the world file.
|
|
138
|
-
*/
|
|
139
|
-
toWorldState() {
|
|
140
|
-
const successfulExperiments = this.state.experiment_log.filter((e) => e.success);
|
|
141
|
-
const failedCount = this.state.experiment_log.filter((e) => !e.success).length;
|
|
142
|
-
const keepRate = this.state.experiments_run > 0 ? Math.round(this.state.keep_count / this.state.experiments_run * 100) : 0;
|
|
143
|
-
let improvementRate = 0;
|
|
144
|
-
if (successfulExperiments.length >= 2) {
|
|
145
|
-
const recent = successfulExperiments.slice(-10);
|
|
146
|
-
let improvements = 0;
|
|
147
|
-
for (let i = 1; i < recent.length; i++) {
|
|
148
|
-
const prev = recent[i - 1].metric_value;
|
|
149
|
-
const curr = recent[i].metric_value;
|
|
150
|
-
if (this.config.optimize === "minimize" ? curr < prev : curr > prev) {
|
|
151
|
-
improvements++;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
improvementRate = Math.round(improvements / (recent.length - 1) * 100);
|
|
155
|
-
}
|
|
156
|
-
return {
|
|
157
|
-
experiments_run: this.state.experiments_run,
|
|
158
|
-
best_metric_value: this.state.best_result?.metric_value ?? (this.config.optimize === "minimize" ? 100 : -1e3),
|
|
159
|
-
keep_rate: keepRate,
|
|
160
|
-
compute_used_minutes: Math.round(this.state.total_compute_minutes),
|
|
161
|
-
compute_budget_minutes: this.config.computeBudgetMinutes,
|
|
162
|
-
failed_experiments: failedCount,
|
|
163
|
-
metric_improvement_rate: improvementRate,
|
|
164
|
-
research_context_drift: 0
|
|
165
|
-
// would need NLP to compute properly
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Get a summary of the current research state.
|
|
170
|
-
*/
|
|
171
|
-
getSummary() {
|
|
172
|
-
return {
|
|
173
|
-
experiments_run: this.state.experiments_run,
|
|
174
|
-
best_result: this.state.best_result,
|
|
175
|
-
keep_rate: this.state.experiments_run > 0 ? Math.round(this.state.keep_count / this.state.experiments_run * 100) : 0,
|
|
176
|
-
compute_remaining_minutes: this.config.computeBudgetMinutes - this.state.total_compute_minutes,
|
|
177
|
-
architectures_tested: [...this.state.architectures_tested]
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Load state from a persisted research context file.
|
|
182
|
-
*/
|
|
183
|
-
loadState(state) {
|
|
184
|
-
this.state = { ...state };
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Export state for persistence.
|
|
188
|
-
*/
|
|
189
|
-
exportState() {
|
|
190
|
-
return { ...this.state };
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
194
|
-
0 && (module.exports = {
|
|
195
|
-
AutoresearchGovernor
|
|
196
|
-
});
|
|
@@ -1,103 +0,0 @@
|
|
|
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 };
|
|
@@ -1,103 +0,0 @@
|
|
|
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 };
|