@staix/agent-research 0.4.1 → 0.5.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/CHANGELOG.md +15 -0
- package/README.md +9 -1
- package/package.json +1 -1
- package/src/cli.ts +3 -2
- package/src/exp/attempts.ts +53 -12
- package/src/exp/executor.ts +33 -2
- package/src/harness/hub-guidance.ts +16 -11
- package/src/mcp-tools.ts +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## [0.5.0] - 2026-11-26
|
|
6
|
+
|
|
7
|
+
### N-1 compatibility with 0.4.1
|
|
8
|
+
|
|
9
|
+
- **CLI** Retains all 98 published commands and their usage forms. Version 0.4.1 ignores `DOT_REMOTE_GPUS` and can choose devices outside an active lease. Use 0.5.0 for GPU attempts run under `dot remote hold`.
|
|
10
|
+
- **MCP tools** Retains all 93 published tool names and `readOnly` values. Version 0.5.0 accepts the ten nonempty object arguments listed below and validates them in their handlers. Version 0.4.1 refuses those arguments with `-32602`. The remaining tool schemas are unchanged.
|
|
11
|
+
- **Study and ledger formats** Reads 0.4.1 studies and ledgers without migration. The installed-package check covers representative study and design-gate reads and checks harness rounds and approved gate bindings in both directions without rewriting bytes. Version 0.4.1 ignores the optional attempt `cause` field. GPU lease admission keeps the existing `gpuDevices` field and record format. On public hub reads, 0.4.1 omits the screened rationale and still reports `rationaleOmitted: true`.
|
|
12
|
+
|
|
13
|
+
- MCP object arguments (#198): ten tool arguments were declared as a bare `{type: "object"}`, which the MCP validator reads as closed, so any real value was refused over `tools/call`. They are `proposal` (`ares_lesson_propose`), `closure`, `contrast`, `composition`, `decision` (`ares_harness_close`, `_contrast`, `_compose`, `_adopt`), `stream` (`ares_harness_stream_set`), `selection` (`ares_experience_select`), `context` (`ares_experience_freeze`), `round` (`ares_harness_set`) and `fixture` (`ares_harness_import`). They now declare `{type: "object", additionalProperties: {}}`. Each handler still validates its closed shape and refuses unknown fields as a tool error, and each tool description says so. No other tool schema changes. N-1 (0.4.1): 0.4.1 refuses these arguments with `-32602` over MCP; CLI forms are unchanged.
|
|
14
|
+
|
|
15
|
+
- Container-start cause class (#195): when `docker run` fails, or the cleanup of a failed start fails, the attempt now records `cause`. The value is one of `image-unavailable`, `name-conflict`, `daemon-unavailable`, `resource-refused`, `permission-denied` or `other`. It is classified from the exit status and the first 4096 bytes of stderr, and the stderr text, command line and paths are never stored. The error text names the class and gives a recovery for it; `other` keeps the generic `ares executor check` recovery. `attempt show` (CLI and MCP `ares_attempt_show`) shows the field. The `executor-start` and `executor-start-uncertain` reasons and the retry rules are unchanged, and records without `cause` read as before. N-1 (0.4.1): a 0.4.1 reader accepts and ignores `cause` on attempt records.
|
|
16
|
+
- dot remote hold GPU leases (#197): when `DOT_REMOTE_GPUS` is set and non-empty, GPU admission uses exactly those UUIDs in order. They must also be in the executor allow-list, and the load and `minFreeMemoryMb` checks still apply. Too few passing devices defer with `reason: "devices"`. A malformed or duplicate value, too few UUIDs, a UUID outside the allow-list, or the variable set without executor `gpu` settings refuses with a usage error (exit 2) naming `DOT_REMOTE_GPUS`, with no attempt or event. Every refusal precedes the probe, except allow-list membership for an index allow-list, which follows the one read-only probe. Unset or empty keeps the previous admission. The chosen UUIDs are frozen in `gpuDevices` as before; no new record field. Run leased attempts in the foreground (`dot remote hold ... -- ares attempt run ...` without `--detach`). N-1 (0.4.1): 0.4.1 ignores `DOT_REMOTE_GPUS` and may pick a device other than the leased one; records are unchanged.
|
|
17
|
+
|
|
18
|
+
- Hub guidance rationale (#66 T4): the public hub guidance read parser (`parseHubGuidanceReadResult`, and `parseHarnessVariant` for hub-public input) now returns each record's hub-screened `rationale: {problemHypothesis, expectedObservableDifference}` verbatim. Each value is screened prose or the literal `withheld`, shown as is and never inferred or fetched. The closed shape is checked with the same inert-JSON rules and the hub's 2000-byte canonical bound. The available projection drops `rationaleOmitted: true`. A hub read without `rationale` (pre-rationale hubs) still parses, and its records carry no `rationale` key. The rationale is display only and never feeds matching, composition, adoption, selection or metrics. N-1 (0.4.1): 0.4.1 parses the new hub read but omits the rationale and still reports `rationaleOmitted: true`; callers that assert that flag must read the `rationale` key instead.
|
|
19
|
+
|
|
5
20
|
## [0.4.1] - 2026-11-25
|
|
6
21
|
|
|
7
22
|
Version 0.4.0 was tagged but never published to npm or GitHub Releases. Version 0.4.1 is the first published release in the 0.4 line and carries all 0.4.0 features. Its N-1 compatibility statements remain those in the 0.4.0 section below.
|
package/README.md
CHANGED
|
@@ -214,6 +214,14 @@ For a new attempt with GPUs and admission settings, ares makes one bounded read-
|
|
|
214
214
|
|
|
215
215
|
Chosen UUIDs are frozen in `gpuDevices` and used for each candidate stage and the evaluator with explicit Docker device selection; inspection checks those UUIDs. Study bundles retain `gpuDeviceCount` only. Duplicate requests for an existing attempt do not probe again. Admission is a point-in-time check, not a resource reservation: host pressure can change after it. GPU settings affect new attempts only; without settings, GPU argv remains the existing `--gpus <n>` path. CPU-only attempts do not probe, even when the executor has GPU settings. Missing telemetry is never treated as an idle host. Tests use fake transport responses; no live GPU admission or training run is claimed.
|
|
216
216
|
|
|
217
|
+
To share a remote GPU host with other `dot` users, run the attempt under a lease and without `--detach`:
|
|
218
|
+
|
|
219
|
+
```sh
|
|
220
|
+
dot remote hold --gpus N --gpu-min-free-mb MB -- ares attempt run <dir> --repo PATH --commit SHA
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
`dot remote hold` puts the leased UUIDs in `DOT_REMOTE_GPUS` (comma-separated). When that variable is set and non-empty, the candidates are exactly those UUIDs, in that order, instead of the allow-list order. Each one must also be in the executor allow-list, by index or UUID through the probed inventory. The probe, load check and per-device `minFreeMemoryMb` check run as usual. The first `protocol.limits.gpus` passing devices are used, and too few passing devices defer with `reason: "devices"` and exit 75. Each of these refuses with a usage error (exit 2) and never creates an attempt or event: a value that is not 1..64 distinct `GPU-...` UUIDs, fewer UUIDs than `protocol.limits.gpus`, a UUID outside the allow-list, or the variable set while the executor has no `gpu` settings. Every refusal comes before the probe, except allow-list membership when the allow-list has index entries: indexes need the inventory, so that check follows the one read-only probe. An unset or empty variable keeps the admission above. CPU-only attempts and duplicate requests do not read it. A detached run or MCP `ares_attempt_run` returns while the containers still run, so the hold would end early; use a foreground run. An MCP server started under a hold reads `DOT_REMOTE_GPUS` from its own environment, but holding detached or MCP attempts is not supported.
|
|
224
|
+
|
|
217
225
|
## Serial stage experiments and retained outputs
|
|
218
226
|
|
|
219
227
|
Opt-in protocol v2 uses 1..16 fresh candidate stages in declared order, named task/upstream-output inputs, digest-pinned images and a separate fresh evaluator. See [the schema and lifecycle contract](docs/design/stage-protocol.md). V1 protocols keep the existing execution and identity behavior. V2 needs Python3 on the executor and a compatible minor release for distribution; no release is performed by setting a protocol.
|
|
@@ -955,7 +963,7 @@ The tag workflow first waits up to 30 minutes for the exact commit's main-push `
|
|
|
955
963
|
|
|
956
964
|
Publication runs only when `NPM_PUBLISH_ENABLED` is `true` and a reviewer approves `npm-production`. It uses Node 24 and npm 11.5.1 or newer with [npm OIDC trusted publishing](https://docs.npmjs.com/trusted-publishers), without an npm token. The owner manages trusted-publisher settings, environment approval and branch protection requiring `ci-ok`; the scripts do not change those settings.
|
|
957
965
|
|
|
958
|
-
N-1 for the 0.
|
|
966
|
+
N-1 for the 0.5 line is 0.4.1, the latest published patch of the 0.4 line. The installed-package check retains all 98 CLI commands and 93 MCP tool names and `readOnly` values. It verifies representative study and ledger reads, preserves an existing approved no-input design, and checks harness rounds and approved gate bindings in both directions without rewriting bytes. The networked `n1` job checks the latest published patch of the previous minor line on every build and feeds the required `ci-ok` check. See the 0.5.0 CHANGELOG for differences in GPU lease admission, MCP object arguments, attempt causes and screened hub rationale.
|
|
959
967
|
|
|
960
968
|
## Development
|
|
961
969
|
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GpuLeaseError } from "./exp/executor.ts";
|
|
1
2
|
import { paperDocument } from "./paper/document.ts";
|
|
2
3
|
import { version } from "../package.json";
|
|
3
4
|
import { findCommand, helpUsage, type CommandSpec } from "./commands-table.ts";
|
|
@@ -118,7 +119,7 @@ async function execute(args: string[], env: NodeJS.ProcessEnv, io: Io, output: C
|
|
|
118
119
|
output.context = { args: commandArgs, values, now: io.now?.() ?? Date.now() };
|
|
119
120
|
const color = colorFor(output.options, output.tty ?? false, env);
|
|
120
121
|
if (color instanceof Error) throw new UsageError(color.message);
|
|
121
|
-
const ctx: ops.Ctx = { actor: detectActor(env), http: io.http ?? createHttp(env), ...(io.signal ? { signal: io.signal } : {}), ...(io.sleep ? { sleep: io.sleep } : {}), ...(io.runner ? { runner: io.runner } : {}), ...(io.now ? { now: io.now } : {}), ...(io.collectEvaluation ? { collectEvaluation: io.collectEvaluation } : {}), ...(io.collectStageEvidence ? { collectStageEvidence: io.collectStageEvidence } : {}) };
|
|
122
|
+
const ctx: ops.Ctx = { actor: detectActor(env), env, http: io.http ?? createHttp(env), ...(io.signal ? { signal: io.signal } : {}), ...(io.sleep ? { sleep: io.sleep } : {}), ...(io.runner ? { runner: io.runner } : {}), ...(io.now ? { now: io.now } : {}), ...(io.collectEvaluation ? { collectEvaluation: io.collectEvaluation } : {}), ...(io.collectStageEvidence ? { collectStageEvidence: io.collectStageEvidence } : {}) };
|
|
122
123
|
const str = (flag: string) => (typeof flags[flag] === "string" ? flags[flag] as string : undefined);
|
|
123
124
|
const selectDocument = () => {
|
|
124
125
|
try { return paperDocument(str("--doc")); }
|
|
@@ -542,7 +543,7 @@ export async function main(args: string[]): Promise<number> {
|
|
|
542
543
|
const tty = Boolean(process.stderr.isTTY);
|
|
543
544
|
const columns = streamWidth(tty, process.stderr.columns, env);
|
|
544
545
|
const color = colorFor(cli.options, tty, env) === true;
|
|
545
|
-
const usage = error instanceof UsageError;
|
|
546
|
+
const usage = error instanceof UsageError || error instanceof GpuLeaseError;
|
|
546
547
|
let message = error instanceof Error ? error.message : "operation failed";
|
|
547
548
|
if (message.startsWith("usage: ares ")) message = `${cli.spec?.name ?? "command"}: missing or invalid arguments`;
|
|
548
549
|
const diagnostic = renderError(fillMessage(message, cli.context?.values ?? {}), tty, color, outputAscii(cli.options, env), Math.min(columns ?? 80, 80));
|
package/src/exp/attempts.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { randomUUID } from "node:crypto";
|
|
|
12
12
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
13
13
|
import { boundedText, commit, openStudy, plain, readJsonFile, readTextBounded, requireExperiment, requireGate, sha256, withLock, StudyLockBusyError, type Actor, type PendingEvent } from "../study.ts";
|
|
14
14
|
import { canonical, designBinding, sameProtocolInputs, frozenProtocol, validateStoredProtocol, protocolHash, readProtocol, readDesign, type Protocol } from "./protocol.ts";
|
|
15
|
-
import { buildContainerArgs, probeGpuAdmission, GpuAdmissionDeferred, validateGpuDevices, validateContainerInputSources, executionPathsOverlap, verifyExecutorInputs, InputVerificationError, checkExecutorInputs, stageContainerName, readExecutor, runOnExecutor, shellQuote, spawnRunner, startWatchdog, type ContainerPaths, type Executor, type ProcessRunner, type Stage } from "./executor.ts";
|
|
15
|
+
import { buildContainerArgs, dotRemoteGpus, probeGpuAdmission, GpuAdmissionDeferred, validateGpuDevices, validateContainerInputSources, executionPathsOverlap, verifyExecutorInputs, InputVerificationError, checkExecutorInputs, stageContainerName, readExecutor, runOnExecutor, shellQuote, spawnRunner, startWatchdog, type ContainerPaths, type GpuEnvironment, type Executor, type ProcessRunner, type Stage } from "./executor.ts";
|
|
16
16
|
import { resolveSnapshot, transferSnapshot, transferTask } from "./snapshot.ts";
|
|
17
17
|
import { screenCandidate, type ScreenSummary } from "./screen.ts";
|
|
18
18
|
import { collectEvaluation as defaultEvaluationCollector, collectStageEvidence as defaultStageCollector, EvidenceError, MetricsError, OUTPUT_METADATA_BYTES, outputBudget, type StageEvidence } from "./metrics.ts";
|
|
@@ -22,7 +22,7 @@ export interface AttemptStage { image: string; argv: string[]; mounts: { target:
|
|
|
22
22
|
export interface Evaluation { metrics: { name: string; unit: string; value: number; provenance: "ares-observed" }[]; outputs: { path: string; sha256: string; bytes: number }[] }
|
|
23
23
|
export interface Attempt {
|
|
24
24
|
v: 1 | 2 | 3; pipeline?: PipelineState; reuse?: AttemptReuseState; freshRequest?: { reuse: "off" | "eligible"; forceFresh: boolean }; id: string; studyId: string; run: string; protocolHash: string; sealBinding: string; commit: string; treeId: string; snapshotSha256?: string; seed: number; label: string; retryOf?: string;
|
|
25
|
-
executor: Executor; protocol: Protocol; paths: ContainerPaths; status: AttemptStatus; stage: Stage; reason?: string; error?: string; startedAt: string; endedAt?: string;
|
|
25
|
+
executor: Executor; protocol: Protocol; paths: ContainerPaths; status: AttemptStatus; stage: Stage; reason?: string; cause?: StartCause; error?: string; startedAt: string; endedAt?: string;
|
|
26
26
|
stages: Partial<Record<Stage, AttemptStage>>; metrics: Evaluation["metrics"]; outputs: Evaluation["outputs"];
|
|
27
27
|
sealing: { separateContainers: boolean; evaluatorReadOnly: boolean; candidateHasNoEvaluator: boolean; verifiedBy: "ares-observed" };
|
|
28
28
|
launching?: { pid: number; host: string; token: string; claimedAt: string; expiresAt: string };
|
|
@@ -33,13 +33,37 @@ export interface Attempt {
|
|
|
33
33
|
}
|
|
34
34
|
export interface AttemptOptions { repo: string; commit: string; seed?: number; run?: string; label?: string; retry?: string; detach?: boolean; expectedId?: string; reuse?: "off" | "eligible"; forceFresh?: boolean }
|
|
35
35
|
/** collectEvaluation is T4's validating adapter; T3 does not parse or validate metric schemas. */
|
|
36
|
-
export interface AttemptContext { actor: Actor; runner?: ProcessRunner; now?: () => number; sleep?: (ms: number) => Promise<void>; collectEvaluation?: (attempt: Attempt, runner: ProcessRunner) => Promise<Evaluation>; collectStageEvidence?: (attempt: Attempt, stage: Stage, runner: ProcessRunner) => Promise<StageEvidence> }
|
|
36
|
+
export interface AttemptContext { actor: Actor; runner?: ProcessRunner; env?: GpuEnvironment; now?: () => number; sleep?: (ms: number) => Promise<void>; collectEvaluation?: (attempt: Attempt, runner: ProcessRunner) => Promise<Evaluation>; collectStageEvidence?: (attempt: Attempt, stage: Stage, runner: ProcessRunner) => Promise<StageEvidence> }
|
|
37
37
|
export const ATTEMPT_BYTES = 1024 * 1024;
|
|
38
38
|
// Startup includes bounded image pulls and two 5-minute transfers; claims never survive indefinitely after a crash.
|
|
39
39
|
export const CONTROL_STALE_MS = 30 * 60_000;
|
|
40
40
|
// Filesystem mtime has sub-ms precision; Date.now is integral. Tolerate small future skew on live locks.
|
|
41
41
|
export const CONTROL_FUTURE_SKEW_MS = 60_000;
|
|
42
42
|
const controlScope = new AsyncLocalStorage<{ dir: string; token: string }>();
|
|
43
|
+
/** Closed container-start cause classes. Only the class is stored; stderr, command lines and paths never are. */
|
|
44
|
+
export const START_CAUSES = ["image-unavailable", "name-conflict", "daemon-unavailable", "resource-refused", "permission-denied", "other"] as const;
|
|
45
|
+
export type StartCause = typeof START_CAUSES[number];
|
|
46
|
+
export const START_STDERR_PREFIX = 4096;
|
|
47
|
+
/** Classify from the exit status and a bounded stderr prefix. The text is inspected here and discarded. */
|
|
48
|
+
export function classifyStartFailure(exitCode: number, stderr: string): StartCause {
|
|
49
|
+
const text = stderr.slice(0, START_STDERR_PREFIX).toLowerCase();
|
|
50
|
+
// Socket access only: an OCI runtime "exec ... permission denied" is an image problem and stays `other`.
|
|
51
|
+
if (/permission denied.*(docker daemon socket|docker\.sock)/.test(text)) return "permission-denied";
|
|
52
|
+
if (/cannot connect to the docker daemon|is the docker daemon running|error during connect|docker daemon is not running/.test(text)) return "daemon-unavailable";
|
|
53
|
+
if (/conflict\. the container name|is already in use by container/.test(text)) return "name-conflict";
|
|
54
|
+
if (/unable to find image|pull access denied|manifest unknown|manifest for .* not found|repository does not exist|no such image/.test(text)) return "image-unavailable";
|
|
55
|
+
if (/cannot allocate memory|out of memory|no space left on device|insufficient|could not select device driver|resource temporarily unavailable|minimum memory limit|range of cpus|exceeds .*limit/.test(text)) return "resource-refused";
|
|
56
|
+
void exitCode;
|
|
57
|
+
return "other";
|
|
58
|
+
}
|
|
59
|
+
const START_RECOVERY: Record<Exclude<StartCause, "other">, string> = {
|
|
60
|
+
"image-unavailable": "check that the protocol image digest is pulled or pullable on the executor host (docker image inspect)",
|
|
61
|
+
"name-conflict": "run ares attempt reconcile <dir> and remove the stale container with the attempt name on the executor host only if no study owns it",
|
|
62
|
+
"daemon-unavailable": "start the Docker daemon on the executor host and run ares executor check <dir>",
|
|
63
|
+
"resource-refused": "free memory, disk or devices on the executor host or lower the protocol limits",
|
|
64
|
+
"permission-denied": "give the executor user access to the Docker socket and run ares executor check <dir>",
|
|
65
|
+
};
|
|
66
|
+
class StartFailure extends Error { constructor(readonly cause: StartCause) { super("container start failed"); } }
|
|
43
67
|
const STATUSES: AttemptStatus[] = ["running", "succeeded", "failed", "cancelled", "unknown"];
|
|
44
68
|
const inspectFields = (prefix: string, fields: string[]) => fields.map(field => `${JSON.stringify(field)}:{{json ${prefix}.${field}}}`).join(",");
|
|
45
69
|
// Exclude inherited image labels/env and other unbounded Docker metadata from the observation.
|
|
@@ -134,6 +158,7 @@ export function validateAttemptRecord(raw: unknown, run: string, wanted: string)
|
|
|
134
158
|
if (!plain(raw.protocol.limits)) throw new Error("attempt GPU: limits missing; restore the frozen attempt record before retrying");
|
|
135
159
|
validateGpuDevices(raw.gpuDevices, raw.protocol.limits.gpus as number);
|
|
136
160
|
}
|
|
161
|
+
if (raw.cause !== undefined && !START_CAUSES.includes(raw.cause as StartCause)) throw new Error("attempt start cause: unknown class; use an ares version that supports this record, keeping the original file unchanged");
|
|
137
162
|
return raw as unknown as Attempt;
|
|
138
163
|
}
|
|
139
164
|
function load(dir: string): Attempt[] { return [...records(dir)]; }
|
|
@@ -256,7 +281,13 @@ function finish(attempt: Attempt, status: AttemptStatus, reason: string | undefi
|
|
|
256
281
|
function hostError(attempt: Attempt, step: string): Error {
|
|
257
282
|
return new Error(`executor ${attempt.executor.host ?? "local"}: ${step} failed; check that step on the executor host and run ares attempt reconcile <dir>`);
|
|
258
283
|
}
|
|
259
|
-
|
|
284
|
+
/** The failed start's container may still run, so the next step stays reconcile, never --retry. */
|
|
285
|
+
function cleanupError(attempt: Attempt, cause: StartCause): string {
|
|
286
|
+
if (cause === "other") return hostError(attempt, "failed start cleanup").message;
|
|
287
|
+
return `executor ${attempt.executor.host ?? "local"}: failed start cleanup failed (${cause}); ${START_RECOVERY[cause]}, then run ares attempt reconcile <dir>`;
|
|
288
|
+
}
|
|
289
|
+
function startupError(attempt: Attempt, step: string, cause?: StartCause): string {
|
|
290
|
+
if (cause && cause !== "other") return `executor ${attempt.executor.host ?? "local"}: ${step} failed (${cause}); ${START_RECOVERY[cause]}, then retry with the same attempt options and --retry ID`;
|
|
260
291
|
const recovery = step === "private workspace preparation" ? "make the configured executor workdir an owned physical directory with mode 0700" : step === "evaluator transfer" || step === "design recheck" ? "restore the task evaluator files and approve the current design" : step === "snapshot transfer" ? "check the repository commit and executor workspace" : step === "controller lock" ? "wait for the active control operation to finish" : "run ares executor check <dir> and fix the reported host or image setup";
|
|
261
292
|
return `executor ${attempt.executor.host ?? "local"}: ${step} failed; ${recovery}, then retry with the same attempt options and --retry ID`;
|
|
262
293
|
}
|
|
@@ -329,7 +360,7 @@ async function recordVerifiedStage(dir: string, attempt: Attempt, state: Observe
|
|
|
329
360
|
if (current.status !== "running" || current.stage !== attempt.stage) return undefined;
|
|
330
361
|
const stage = current.stages[current.stage]!;
|
|
331
362
|
stage.containerId = state.id; if (state.startedAt) stage.startedAt = state.startedAt;
|
|
332
|
-
if (current.reason === "executor-start" || current.reason === "executor-start-uncertain" || current.reason === "executor-preflight" || current.reason === "executor-seal") { delete current.reason; delete current.error; }
|
|
363
|
+
if (current.reason === "executor-start" || current.reason === "executor-start-uncertain" || current.reason === "executor-preflight" || current.reason === "executor-seal") { delete current.reason; delete current.cause; delete current.error; }
|
|
333
364
|
delete current.launching;
|
|
334
365
|
if (current.stage === "candidate") {
|
|
335
366
|
current.sealing.candidateHasNoEvaluator = true;
|
|
@@ -532,14 +563,17 @@ async function launch(dir: string, attempt: Attempt, user: string, ctx: AttemptC
|
|
|
532
563
|
}
|
|
533
564
|
let startedId: string | undefined;
|
|
534
565
|
try {
|
|
535
|
-
const result = await
|
|
566
|
+
const result = await runOnExecutor(attempt.executor, "docker", args, ctx.runner ?? spawnRunner);
|
|
567
|
+
if (result.exitCode !== 0 || result.timedOut || result.truncated) throw new StartFailure(result.timedOut || result.truncated ? "other" : classifyStartFailure(result.exitCode, result.stderr));
|
|
568
|
+
const cid = result.stdout.trim();
|
|
536
569
|
if (!/^[a-f0-9]{64}$/.test(cid)) throw hostError(attempt, "container start");
|
|
537
570
|
startedId = cid;
|
|
538
571
|
attempt.stages[attempt.stage]!.containerId = cid;
|
|
539
572
|
await startWatchdog(attempt.executor, attemptContainerName(attempt), remainingWallSeconds(dir, attempt, ctx), ctx.runner ?? spawnRunner, cid);
|
|
540
573
|
const state = await inspect(dir, attempt, ctx); if (!state) throw hostError(attempt, "container start verification");
|
|
541
574
|
return recordVerifiedStage(dir, attempt, state, ctx, "attempt.stage.started");
|
|
542
|
-
} catch {
|
|
575
|
+
} catch (error) {
|
|
576
|
+
const cause: StartCause = error instanceof StartFailure ? error.cause : "other";
|
|
543
577
|
if (!startedId) {
|
|
544
578
|
try {
|
|
545
579
|
// A lost response is not proof that Docker rejected the start. Adopt only a verified owned container.
|
|
@@ -554,10 +588,17 @@ async function launch(dir: string, attempt: Attempt, user: string, ctx: AttemptC
|
|
|
554
588
|
}
|
|
555
589
|
// A name conflict can belong to another study with the same identity. Only clean up our returned container id.
|
|
556
590
|
if (startedId) {
|
|
557
|
-
|
|
558
|
-
|
|
591
|
+
let cleanupCause: StartCause | undefined;
|
|
592
|
+
try {
|
|
593
|
+
const killed = await runOnExecutor(attempt.executor, "docker", ["kill", startedId], recoveryCtx.runner ?? spawnRunner);
|
|
594
|
+
if (killed.exitCode !== 0 || killed.timedOut || killed.truncated) cleanupCause = killed.timedOut || killed.truncated ? "other" : classifyStartFailure(killed.exitCode, killed.stderr);
|
|
595
|
+
} catch { cleanupCause = "other"; }
|
|
596
|
+
if (cleanupCause) {
|
|
597
|
+
const recorded = cleanupCause;
|
|
598
|
+
return update(dir, attempt.id, ctx, current => { delete current.launching; current.reason = "executor-start"; current.cause = recorded; current.error = cleanupError(current, recorded); return "attempt.executor-error"; });
|
|
599
|
+
}
|
|
559
600
|
}
|
|
560
|
-
return update(dir, attempt.id, ctx, current => { if (current.status !== "running") return undefined; current.error = startupError(current, "container start"); finish(current, "failed", "executor-start", ctx); return "attempt.failed"; });
|
|
601
|
+
return update(dir, attempt.id, ctx, current => { if (current.status !== "running") return undefined; current.cause = cause; current.error = startupError(current, "container start", cause); finish(current, "failed", "executor-start", ctx); return "attempt.failed"; });
|
|
561
602
|
}
|
|
562
603
|
}
|
|
563
604
|
|
|
@@ -623,8 +664,8 @@ export async function runAttempt(dirArg: string, options: AttemptOptions, ctx: A
|
|
|
623
664
|
}
|
|
624
665
|
const verifiedInputs = !existing && protocol.inputs !== undefined ? await verifyExecutorInputs(executor, protocol, ctx.runner ?? spawnRunner) : undefined;
|
|
625
666
|
let gpuDevices: string[] | undefined;
|
|
626
|
-
if (!existing &&
|
|
627
|
-
const admission = await probeGpuAdmission(executor, protocol.limits.gpus, ctx.runner ?? spawnRunner);
|
|
667
|
+
if (!existing && protocol.limits.gpus > 0 && (executor.gpu || dotRemoteGpus(ctx.env ?? process.env))) {
|
|
668
|
+
const admission = await probeGpuAdmission(executor, protocol.limits.gpus, ctx.runner ?? spawnRunner, ctx.env ?? process.env);
|
|
628
669
|
if (admission.status === "deferred") {
|
|
629
670
|
// An overlapping duplicate may have admitted the same identity during this read-only probe.
|
|
630
671
|
const duplicate = await withLock(dir, () => load(dir).find(attempt => attempt.id === wanted));
|
package/src/exp/executor.ts
CHANGED
|
@@ -206,10 +206,31 @@ function gpuProbe(stdout: string): { inventory: GpuInventoryRow[]; loadRatio: nu
|
|
|
206
206
|
return { inventory, loadRatio: Number(parts[0]) / Number(cpu) };
|
|
207
207
|
}
|
|
208
208
|
/** One read-only probe; admission never sleeps, retries or reserves a physical GPU. */
|
|
209
|
-
|
|
209
|
+
/** A refused dot remote hold lease: a usage error raised before any probe, attempt or event. */
|
|
210
|
+
export class GpuLeaseError extends Error {}
|
|
211
|
+
export type GpuEnvironment = Readonly<Record<string, string | undefined>>;
|
|
212
|
+
function leaseRefused(cause: string, next: string): never { throw new GpuLeaseError(`DOT_REMOTE_GPUS: ${cause}; ${next}`); }
|
|
213
|
+
/** The UUIDs a `dot remote hold` lease names, in order, or undefined when unset or empty. */
|
|
214
|
+
export function dotRemoteGpus(env: GpuEnvironment): string[] | undefined {
|
|
215
|
+
const raw = env.DOT_REMOTE_GPUS;
|
|
216
|
+
if (raw === undefined || raw.trim() === "") return undefined;
|
|
217
|
+
const parts = raw.split(",").map(part => part.trim());
|
|
218
|
+
if (parts.length > 64 || parts.some(part => !GPU_UUID.test(part))) leaseRefused("malformed value", "pass 1..64 comma-separated GPU-... UUIDs from dot remote hold, or unset it");
|
|
219
|
+
const devices = parts.map(part => "GPU-" + part.slice(4).toLowerCase());
|
|
220
|
+
if (new Set(devices).size !== devices.length) leaseRefused("duplicate UUID", "pass distinct GPU UUIDs from dot remote hold, or unset it");
|
|
221
|
+
return devices;
|
|
222
|
+
}
|
|
223
|
+
export async function probeGpuAdmission(executorArg: Executor, count: number, runner: ProcessRunner = spawnRunner, env: GpuEnvironment = process.env): Promise<GpuAdmission> {
|
|
210
224
|
const executor = validateExecutor(executorArg);
|
|
211
225
|
if (!Number.isSafeInteger(count) || count < 0 || count > 64) throw new Error("GPU admission count: integer 0..64 required; use the protocol GPU count before retrying");
|
|
212
|
-
if (
|
|
226
|
+
if (count === 0) return { status: "admitted", devices: [] };
|
|
227
|
+
const leased = dotRemoteGpus(env);
|
|
228
|
+
if (leased && !executor.gpu) leaseRefused("set but the executor has no gpu settings", "add executor gpu settings with ares executor set, or unset DOT_REMOTE_GPUS");
|
|
229
|
+
if (!executor.gpu) return { status: "admitted", devices: [] };
|
|
230
|
+
if (leased && leased.length < count) leaseRefused(`fewer UUIDs (${leased.length}) than protocol.limits.gpus (${count})`, "hold at least that many GPUs with dot remote hold --gpus N");
|
|
231
|
+
const indexed = executor.gpu.devices.some(selector => !String(selector).startsWith("GPU-"));
|
|
232
|
+
// With UUID-only allow-lists membership is decided before probing; index entries need the inventory.
|
|
233
|
+
if (leased && !indexed && leased.some(uuid => !executor.gpu!.devices.map(String).includes(uuid))) leaseRefused("UUID not in the executor allow-list", "hold GPUs the executor gpu.devices allow, or widen the allow-list with ares executor set");
|
|
213
234
|
let parsed: ReturnType<typeof gpuProbe>;
|
|
214
235
|
try {
|
|
215
236
|
const result = await runOnExecutor(executor, "sh", ["-c", GPU_ADMISSION_SCRIPT], runner, { timeoutMs: GPU_PROBE_TIMEOUT_MS, maxOutputBytes: GPU_PROBE_OUTPUT_BYTES });
|
|
@@ -218,6 +239,16 @@ export async function probeGpuAdmission(executorArg: Executor, count: number, ru
|
|
|
218
239
|
} catch { return gpuDeferred("probe"); }
|
|
219
240
|
if (parsed.loadRatio > executor.gpu.maxLoadRatio) return gpuDeferred("load");
|
|
220
241
|
const devices: string[] = [];
|
|
242
|
+
if (leased) {
|
|
243
|
+
const allowed = new Set(executor.gpu.devices.flatMap(selector => parsed.inventory.filter(gpu => gpu.index === String(selector) || gpu.uuid === selector).map(gpu => gpu.uuid)));
|
|
244
|
+
if (leased.some(uuid => !allowed.has(uuid))) leaseRefused("UUID not in the executor allow-list", "hold GPUs the executor gpu.devices allow, or widen the allow-list with ares executor set");
|
|
245
|
+
for (const uuid of leased) {
|
|
246
|
+
const gpu = parsed.inventory.find(gpu => gpu.uuid === uuid);
|
|
247
|
+
if (!gpu || gpu.memory < executor.gpu.minFreeMemoryMb) continue;
|
|
248
|
+
devices.push(gpu.uuid); if (devices.length === count) return { status: "admitted", devices };
|
|
249
|
+
}
|
|
250
|
+
return gpuDeferred("devices");
|
|
251
|
+
}
|
|
221
252
|
for (const selector of executor.gpu.devices) {
|
|
222
253
|
const gpu = parsed.inventory.find(gpu => gpu.index === String(selector) || gpu.uuid === selector);
|
|
223
254
|
if (!gpu || gpu.memory < executor.gpu.minFreeMemoryMb || devices.includes(gpu.uuid)) continue;
|
|
@@ -18,9 +18,12 @@ export interface HubGuidanceMetadata {
|
|
|
18
18
|
readonly status: "declared" | "withdrawn";
|
|
19
19
|
readonly applicable: boolean;
|
|
20
20
|
readonly evidence: readonly Readonly<{key: string; status: "declared" | "unavailable"}>[];
|
|
21
|
+
/** Display only: screened hub prose or the literal `withheld`. Absent when the hub read (N-1) carries none. */
|
|
22
|
+
readonly rationale?: HubGuidanceRationale;
|
|
21
23
|
}
|
|
24
|
+
export type HubGuidanceRationale = Readonly<{problemHypothesis: string; expectedObservableDifference: string}>;
|
|
22
25
|
export type HubGuidanceReadProjection = {readonly state: "unavailable"}
|
|
23
|
-
| {readonly state: "available"; readonly records: readonly HubGuidanceMetadata[]
|
|
26
|
+
| {readonly state: "available"; readonly records: readonly HubGuidanceMetadata[]};
|
|
24
27
|
|
|
25
28
|
function invalid(): never {
|
|
26
29
|
throw new Error("hub guidance read: invalid closed metadata shape or bounds; reload a supported public guidance read result and retry");
|
|
@@ -76,16 +79,18 @@ function token(raw: unknown, pattern: RegExp, maximum: number): string {
|
|
|
76
79
|
if (!pattern.test(result)) invalid();
|
|
77
80
|
return result;
|
|
78
81
|
}
|
|
79
|
-
function
|
|
82
|
+
function rationale(raw: unknown): HubGuidanceRationale {
|
|
80
83
|
const row = object(raw, ["problemHypothesis", "expectedObservableDifference"]);
|
|
81
|
-
const result = {problemHypothesis: text(row.problemHypothesis, 2000), expectedObservableDifference: text(row.expectedObservableDifference, 2000)};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return bytes;
|
|
84
|
+
const result = Object.freeze({problemHypothesis: text(row.problemHypothesis, 2000), expectedObservableDifference: text(row.expectedObservableDifference, 2000)});
|
|
85
|
+
if (Buffer.byteLength(JSON.stringify(result)) > 2000) invalid();
|
|
86
|
+
return result;
|
|
85
87
|
}
|
|
88
|
+
const FIELDS = ["id", "experimentId", "taskId", "taskCreated", "flowRevision", "roleId", "layer", "baselineSha256", "candidateSha256", "changedSections", "bytes", "author", "status", "applicable", "evidence"];
|
|
86
89
|
|
|
87
90
|
function record(raw: unknown): {metadata: HubGuidanceMetadata; sourceBytes: number} {
|
|
88
|
-
|
|
91
|
+
// A pre-rationale (N-1) hub read omits `rationale`; it parses with the rationale absent.
|
|
92
|
+
const hasRationale = raw !== null && typeof raw === "object" && !types.isProxy(raw) && Object.hasOwn(raw, "rationale");
|
|
93
|
+
const row = object(raw, hasRationale ? [...FIELDS, "rationale"] : FIELDS);
|
|
89
94
|
const experimentId = text(row.experimentId, 256);
|
|
90
95
|
if (/[\p{Cc}\p{Cs}]/u.test(experimentId)) invalid();
|
|
91
96
|
if (row.layer !== "shipped" && row.layer !== "project") invalid();
|
|
@@ -109,12 +114,13 @@ function record(raw: unknown): {metadata: HubGuidanceMetadata; sourceBytes: numb
|
|
|
109
114
|
baselineSha256: digest(row.baselineSha256), candidateSha256: digest(row.candidateSha256), changedSections: Object.freeze(changedSections),
|
|
110
115
|
bytes: Object.freeze({baseline: integer(sizes.baseline, 1, 8192), candidate: integer(sizes.candidate, 1, 8192), record: integer(sizes.record, 1, 32_768)}),
|
|
111
116
|
author: token(row.author, /^[a-z][a-z0-9-]{0,31}$/, 32), status: row.status, applicable: row.applicable, evidence: Object.freeze(evidence),
|
|
117
|
+
...hasRationale ? {rationale: rationale(row.rationale)} : {},
|
|
112
118
|
});
|
|
113
|
-
const sourceBytes = Buffer.byteLength(JSON.stringify(metadata))
|
|
119
|
+
const sourceBytes = Buffer.byteLength(JSON.stringify(metadata));
|
|
114
120
|
return {metadata, sourceBytes};
|
|
115
121
|
}
|
|
116
122
|
|
|
117
|
-
/** Parse public lifecycle metadata, never private role snapshots
|
|
123
|
+
/** Parse public lifecycle metadata and the hub-screened rationale (display only), never private role snapshots. */
|
|
118
124
|
export function parseHubGuidanceReadResult(raw: unknown): HubGuidanceReadProjection {
|
|
119
125
|
if (typeof raw === "string") {
|
|
120
126
|
if (raw.length > HUB_GUIDANCE_READ_BYTES || Buffer.byteLength(raw) > HUB_GUIDANCE_READ_BYTES) invalid();
|
|
@@ -132,9 +138,8 @@ export function parseHubGuidanceReadResult(raw: unknown): HubGuidanceReadProject
|
|
|
132
138
|
const row = object(raw, ["state", "records"]);
|
|
133
139
|
const parsed = array(row.records, 16).map(record);
|
|
134
140
|
if (new Set(parsed.map(value => value.metadata.id)).size !== parsed.length) invalid();
|
|
135
|
-
// Rationale text never leaves its validator; only byte counts cross the record boundary.
|
|
136
141
|
const sourceBytes = Buffer.byteLength('{"state":"available","records":[]}')
|
|
137
142
|
+ parsed.reduce((sum, value) => sum + value.sourceBytes, 0) + Math.max(0, parsed.length - 1);
|
|
138
143
|
if (sourceBytes > HUB_GUIDANCE_READ_BYTES) invalid();
|
|
139
|
-
return Object.freeze({state: "available", records: Object.freeze(parsed.map(value => value.metadata))
|
|
144
|
+
return Object.freeze({state: "available", records: Object.freeze(parsed.map(value => value.metadata))});
|
|
140
145
|
}
|
package/src/mcp-tools.ts
CHANGED
|
@@ -24,6 +24,8 @@ const reason = { type: "string", minLength: 1, maxLength: 500 };
|
|
|
24
24
|
const read = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
25
25
|
const write = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
|
|
26
26
|
const net = { ...write, openWorldHint: true };
|
|
27
|
+
/** An open object whose closed shape the handler validates; the MCP validator passes each member through. */
|
|
28
|
+
const HANDLER_VALIDATED = { type: "object", additionalProperties: {} };
|
|
27
29
|
const obj = (properties: Record<string, unknown>, required: string[]) => ({ type: "object", properties, required, additionalProperties: false });
|
|
28
30
|
|
|
29
31
|
const text = (max: number) => ({ type: "string", minLength: 1, maxLength: max });
|
|
@@ -146,23 +148,23 @@ const IDEA = obj({ id: text(64), title: text(500), hypothesis: text(4000), paren
|
|
|
146
148
|
export const ARES_TOOLS: readonly McpTool[] = [
|
|
147
149
|
{ name: "ares_retention_inspect", description: "Inspect executor-local retained identities, quota reservations and tombstones without a study write. Active sources/consumers remain explicit; no artifact bodies are returned.", inputSchema: obj({study, offset: integer(0, 16_000_000), limit: integer(1, 500)}, ["study"]), annotations: {...read, openWorldHint: true} },
|
|
148
150
|
{ name: "ares_retention_prune", description: "Preview explicit retained references by default. Confirm the returned fingerprint to dispose bytes under current design policy; active producers/consumers refuse. Tombstones preserve provenance. Executor tombstones remain authoritative after a crash before the local audit receipt; inspect them before retrying.", inputSchema: obj({study, refs: RETAINED_REFS, fingerprint: {...text(64), minLength: 64}}, ["study", "refs"]), annotations: {...net, destructiveHint: true} },
|
|
149
|
-
{name: "ares_lesson_propose", description: "Propose a bounded lesson from a closed native harness round. Inspect required evidence/counterevidence explicitly; fixture-only single-task observations never establish real behavior, success or transfer.", inputSchema: obj({study, proposal:
|
|
151
|
+
{name: "ares_lesson_propose", description: "Propose a bounded lesson from a closed native harness round. Inspect required evidence/counterevidence explicitly; fixture-only single-task observations never establish real behavior, success or transfer. The handler validates the proposal shape and refuses unknown fields.", inputSchema: obj({study, proposal: HANDLER_VALIDATED}, ["study", "proposal"]), annotations: net},
|
|
150
152
|
{name: "ares_lesson_list", description: "Read stored lesson proposals and dispositions locally, without current source checks. Stored eligibility is not fresh proof; no body or activation.", inputSchema: obj({study}, ["study"]), annotations: read},
|
|
151
153
|
{name: "ares_lesson_check", description: "Explicitly recheck a lesson's current native closure and screened evidence/counterevidence without writing. Integrity never establishes support; no body is retained.", inputSchema: obj({study, name: text(64)}, ["study", "name"]), annotations: {...read, openWorldHint: true}},
|
|
152
154
|
{name: "ares_lesson_decide", description: "Record a hash-bound lesson disposition. Acceptance rechecks sources under the study lock and requires exact fixture-strength acknowledgement; not adoption, activation or transfer evidence.", inputSchema: obj({study, name: text(64), decision: obj({decision: {type: "string", enum: ["accept", "reject", "withdraw"]}, proposalSha256: text(64), evidenceFingerprint: text(64), reason: text(2000), acknowledgeStrength: text(1000)}, ["decision", "proposalSha256", "evidenceFingerprint", "reason"])}, ["study", "name", "decision"]), annotations: net},
|
|
153
155
|
{ name: "ares_skill_check", description: "Explicit read-only source check of a proposal under one 25s/256KiB aggregate response budget. Evidence and counterevidence share the same owner-screened exact-id/local snapshot rules. Integrity/outcome never imply support; no body, export or installation.", inputSchema: obj({study, name: text(64)}, ["study", "name"]), annotations: {...read, openWorldHint: true} },
|
|
154
|
-
{ name: "ares_harness_close", description: "Preview/confirm an immutable baseline-kept, inconclusive or withdrawn closure without any adoption. Record binding, current evidence fingerprint, outcome, actor and reason; source/evidence drift marks it stale and preserves it. Never scientific success or transfer.", inputSchema: obj({study, round: text(64), closure:
|
|
155
|
-
{ name: "ares_harness_contrast", description: "Record an actor-attributed fixture contrast against current admitted probe/output hashes and evidence fingerprint. Subjective judgments stay separate from task checks; no native metric or transfer authority.", inputSchema: obj({study, round: text(64), contrast:
|
|
156
|
-
{ name: "ares_harness_compose", description: "Record per-section keep/drop/revise decisions linked to current contrasts, declaring at most one successor hash. A new successor remains unexecuted until its own exact fixture execution; real evidence is unavailable.", inputSchema: obj({study, round: text(64), composition:
|
|
157
|
-
{ name: "ares_harness_adopt", description: "Preview an experimental fixture-only adoption with a distinct independent deterministic check (unavailable for current fixtures); confirm its returned fingerprint to commit disposition and closure together under the round gate. Does not create correctness, scientific success or demonstrated transfer.", inputSchema: obj({study, round: text(64), decision:
|
|
158
|
-
{ name: "ares_harness_stream_set", description: "Fix an immutable ordered 1..16-task experiment stream before its first harness round. No source reads or execution.", inputSchema: obj({study, stream:
|
|
156
|
+
{ name: "ares_harness_close", description: "Preview/confirm an immutable baseline-kept, inconclusive or withdrawn closure without any adoption. Record binding, current evidence fingerprint, outcome, actor and reason; source/evidence drift marks it stale and preserves it. Never scientific success or transfer. The handler validates the closure shape and refuses unknown fields.", inputSchema: obj({study, round: text(64), closure: HANDLER_VALIDATED, confirm: text(64)}, ["study", "round", "closure"]), annotations: write },
|
|
157
|
+
{ name: "ares_harness_contrast", description: "Record an actor-attributed fixture contrast against current admitted probe/output hashes and evidence fingerprint. Subjective judgments stay separate from task checks; no native metric or transfer authority. The handler validates the contrast shape and refuses unknown fields.", inputSchema: obj({study, round: text(64), contrast: HANDLER_VALIDATED}, ["study", "round", "contrast"]), annotations: write },
|
|
158
|
+
{ name: "ares_harness_compose", description: "Record per-section keep/drop/revise decisions linked to current contrasts, declaring at most one successor hash. A new successor remains unexecuted until its own exact fixture execution; real evidence is unavailable. The handler validates the composition shape and refuses unknown fields.", inputSchema: obj({study, round: text(64), composition: HANDLER_VALIDATED}, ["study", "round", "composition"]), annotations: write },
|
|
159
|
+
{ name: "ares_harness_adopt", description: "Preview an experimental fixture-only adoption with a distinct independent deterministic check (unavailable for current fixtures); confirm its returned fingerprint to commit disposition and closure together under the round gate. Does not create correctness, scientific success or demonstrated transfer. The handler validates the decision shape and refuses unknown fields.", inputSchema: obj({study, round: text(64), decision: HANDLER_VALIDATED, confirm: text(64)}, ["study", "round", "decision"]), annotations: write },
|
|
160
|
+
{ name: "ares_harness_stream_set", description: "Fix an immutable ordered 1..16-task experiment stream before its first harness round. No source reads or execution. The handler validates the stream shape and refuses unknown fields.", inputSchema: obj({study, stream: HANDLER_VALIDATED}, ["study", "stream"]), annotations: write },
|
|
159
161
|
{ name: "ares_harness_stream_show", description: "Read the receipted immutable local harness stream without writes or source reads.", inputSchema: obj({study}, ["study"]), annotations: read },
|
|
160
|
-
{ name: "ares_experience_select", description: "Rank project lessons, then screen only explicit full ids backed by earlier same-study accepted unchanged lesson/archive receipts. Fixture-only preparation, never live/controlled eligibility; stores no bodies or memory writes.", inputSchema: obj({study, selection:
|
|
161
|
-
{ name: "ares_experience_freeze", description: "Freeze immutable body-free source pins before a round. Empty controls or screened earlier reviewed/archived fixture lessons only; model/runtime/toolset must match. Synthetic context refuses controlled/live use. No activation or memory write.", inputSchema: obj({study, context:
|
|
162
|
+
{ name: "ares_experience_select", description: "Rank project lessons, then screen only explicit full ids backed by earlier same-study accepted unchanged lesson/archive receipts. Fixture-only preparation, never live/controlled eligibility; stores no bodies or memory writes. The handler validates the selection shape and refuses unknown fields.", inputSchema: obj({study, selection: HANDLER_VALIDATED}, ["study", "selection"]), annotations: {...read, openWorldHint: true} },
|
|
163
|
+
{ name: "ares_experience_freeze", description: "Freeze immutable body-free source pins before a round. Empty controls or screened earlier reviewed/archived fixture lessons only; model/runtime/toolset must match. Synthetic context refuses controlled/live use. No activation or memory write. The handler validates the context shape and refuses unknown fields.", inputSchema: obj({study, context: HANDLER_VALIDATED}, ["study", "context"]), annotations: net },
|
|
162
164
|
{ name: "ares_experience_check", description: "Pre-handoff local integrity and model/runtime check plus owning screened exact-id source recheck. Unavailable/changed sources block the frozen context. Does not launch improvement or worker sessions.", inputSchema: obj({study, round: text(64), model: text(HARNESS_MODEL_BYTES), runtime: text(128), toolsetSha256: text(64)}, ["study", "round", "model", "runtime"]), annotations: {...read, openWorldHint: true} },
|
|
163
|
-
{ name: "ares_harness_set", description: "Set an experiment's bounded ares-owned harness round definition; no model/probe launch. Guidance and frozen refs bind a separate harness gate.", inputSchema: obj({study, round:
|
|
165
|
+
{ name: "ares_harness_set", description: "Set an experiment's bounded ares-owned harness round definition; no model/probe launch. Guidance and frozen refs bind a separate harness gate. The handler validates the round shape and refuses unknown fields.", inputSchema: obj({study, round: HANDLER_VALIDATED}, ["study", "round"]), annotations: write },
|
|
164
166
|
{ name: "ares_harness_show", description: "Read local harness definitions and synthetic fixture declarations. End-to-end evaluation and real producer import stay unavailable.", inputSchema: obj({study, round: text(64)}, ["study"]), annotations: read },
|
|
165
|
-
{ name: "ares_harness_import", description: "Record a declared ares-owned synthetic probe fixture under the round gate. Not producer wire import, host-observed evidence or a matched execution; never starts probes.", inputSchema: obj({study, round: text(64), fixture:
|
|
167
|
+
{ name: "ares_harness_import", description: "Record a declared ares-owned synthetic probe fixture under the round gate. Not producer wire import, host-observed evidence or a matched execution; never starts probes. The handler validates the fixture shape and refuses unknown fields.", inputSchema: obj({study, round: text(64), fixture: HANDLER_VALIDATED}, ["study", "round", "fixture"]), annotations: write },
|
|
166
168
|
{ name: "ares_lineage_show", description: "Read bounded local source-proven lineage, optionally rooted at a local ExecutionReferenceV1 and continued with an opaque cursor. No executor, hub, network, repair, gate decision or result authority.", inputSchema: obj({ study, root: EXECUTION_REFERENCE, cursor: text(4096) }, ["study"]), annotations: read },
|
|
167
169
|
{ name: "ares_lineage_compare", description: "Compare existing source-derived attempt or closed-candidate rows. Select either 1..8 attempts or 1..8 full candidate commits. Failed/unknown outcomes remain visible; retries are not independent samples. No new arithmetic aggregation, winner or verdict.", inputSchema: obj({ study, attempts: LINEAGE_ATTEMPTS, candidates: LINEAGE_CANDIDATES }, ["study"]), annotations: read },
|
|
168
170
|
{ name: "ares_autonomy_show", description: "Read the study autonomy policy and effective mode for each phase; no writes.", inputSchema: obj({ study }, ["study"]), annotations: read },
|