@tangle-network/agent-eval 1.0.1 → 1.0.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.
- package/CHANGELOG.md +130 -0
- package/dist/builder-eval/index.d.ts +1 -1
- package/dist/builder-eval/index.d.ts.map +1 -1
- package/dist/builder-eval/index.js +12 -138
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/campaign/index.d.ts +2 -1
- package/dist/campaign/index.js +2 -1
- package/dist/cli.js +1 -1
- package/dist/{feedback-trajectory-Ck7K7AhK.d.ts → feedback-trajectory-BgomnFOe.d.ts} +2 -2
- package/dist/{feedback-trajectory-Ck7K7AhK.d.ts.map → feedback-trajectory-BgomnFOe.d.ts.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/openapi.json +1 -1
- package/dist/{render-aB58Be3N.js → render-CFrJ7M0o.js} +25 -25
- package/dist/render-CFrJ7M0o.js.map +1 -0
- package/dist/sandbox-harness--VUvMji7.d.ts +106 -0
- package/dist/sandbox-harness--VUvMji7.d.ts.map +1 -0
- package/dist/sandbox-harness-BuacGaVn.js +181 -0
- package/dist/sandbox-harness-BuacGaVn.js.map +1 -0
- package/dist/supervisor-run/index.d.ts +10 -0
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +1 -1
- package/dist/traces.d.ts +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/docs/concepts.md +17 -0
- package/package.json +1 -1
- package/dist/render-aB58Be3N.js.map +0 -1
- package/dist/sandbox-harness-B3Kx1fOA.d.ts +0 -68
- package/dist/sandbox-harness-B3Kx1fOA.d.ts.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import { t as createChatClient } from "./chat-client-D0me8iwq.js";
|
|
|
9
9
|
import { t as runAnalystBenchmarkCommand } from "./benchmark-command-BeDZB3BQ.js";
|
|
10
10
|
import { i as buildOpenApi, l as handleVersion, o as runRpcBatch, r as startServerAsync, s as runRpcOnce } from "./server-CPKyf3bz.js";
|
|
11
11
|
import { b as editCreditText, f as landscape, g as surfaceTextEdits, l as metaSearch, m as formatLandscape, n as taskMatrix, o as skillManifold, r as formatSkillManifold, s as renderMetaSearchText, t as tree, v as front, y as editCredit } from "./tree-C2N31CoI.js";
|
|
12
|
-
import { c as discoveryRunRolloutLines, i as analyzeSupervisorRun, n as renderSupervisorRunHeadline, r as renderSupervisorRunMarkdown } from "./render-
|
|
12
|
+
import { c as discoveryRunRolloutLines, i as analyzeSupervisorRun, n as renderSupervisorRunHeadline, r as renderSupervisorRunMarkdown } from "./render-CFrJ7M0o.js";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
15
15
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -2,8 +2,8 @@ import { o as FailureClass } from "./schema-CkIvnmLU.js";
|
|
|
2
2
|
import { i as AnalystFinding, m as EvidenceRef, u as AnalystRunResult } from "./types-DzCO-S1m.js";
|
|
3
3
|
import { s as TraceStore } from "./store-CMs5wGXP.js";
|
|
4
4
|
import { i as DatasetSplit, r as DatasetScenario } from "./dataset-DThC1S6G.js";
|
|
5
|
-
import "./exact-types-CIViGj98.js";
|
|
6
5
|
import { o as TraceEmitter } from "./emitter-mAXC5PSN.js";
|
|
6
|
+
import "./exact-types-CIViGj98.js";
|
|
7
7
|
type ControlSeverity = 'info' | 'warning' | 'error' | 'critical';
|
|
8
8
|
type ControlActionFailureMode = 'continue' | 'stop';
|
|
9
9
|
interface ControlEvalResult {
|
|
@@ -383,4 +383,4 @@ declare function controlRunToFeedbackTrajectory<TState, TAction, TActionResult>(
|
|
|
383
383
|
createdAt?: string;
|
|
384
384
|
}): FeedbackTrajectory;
|
|
385
385
|
export { AnalystFindingDigest as A, ControlRuntimeConfig as B, createFeedbackTrajectory as C, renderPreferenceMemoryMarkdown as D, feedbackTrajectoryToOptimizerRow as E, ControlBudget as F, ControlSeverity as H, ControlContext as I, ControlDecision as L, AnalystRunDigest as M, analystRunDigest as N, summarizePreferenceMemory as O, ControlActionOutcome as P, ControlEvalResult as R, controlRunToFeedbackTrajectory as S, feedbackTrajectoriesToOptimizerRows as T, ControlStep as U, ControlRuntimeError as V, StopDecision as W, PreferenceMemoryEntry as _, FeedbackLabel as a, analystRunToReviewRequests as b, FeedbackOptimizerRow as c, FeedbackTask as d, FeedbackTrajectory as f, InMemoryFeedbackTrajectoryStore as g, FileSystemFeedbackTrajectoryStore as h, FeedbackAttempt as i, AnalystReviewDecision as j, withAssignedFeedbackSplit as k, FeedbackOutcome as l, FeedbackTrajectoryStore as m, AnalystReviewRequest as n, FeedbackLabelKind as o, FeedbackTrajectoryFilter as p, FeedbackArtifactType as r, FeedbackLabelSource as s, AnalystFeedbackTrajectoryOptions as t, FeedbackSplitPolicy as u, ProposedSideEffect as v, feedbackTrajectoriesToDatasetScenarios as w, assignFeedbackSplit as x, analystRunToFeedbackTrajectory as y, ControlRunResult as z };
|
|
386
|
-
//# sourceMappingURL=feedback-trajectory-
|
|
386
|
+
//# sourceMappingURL=feedback-trajectory-BgomnFOe.d.ts.map
|
package/dist/{feedback-trajectory-Ck7K7AhK.d.ts.map → feedback-trajectory-BgomnFOe.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-trajectory-
|
|
1
|
+
{"version":3,"file":"feedback-trajectory-BgomnFOe.d.ts","names":[],"sources":["../src/control-runtime/contract.ts","../src/feedback-trajectory-review.ts","../src/feedback-trajectory.ts"],"mappings":";;;;;;KAIY;KAEA;UAEK;;EAEf;;EAEA;;EAEA;;EAEA,WAAW;;EAEX;;EAEA;;EAEA;;EAEA,WAAW;;UAGI;EACf;EACA;EACA;;UAGe,oBAAoB,QAAQ;;;;;EAK3C;;;;;EAKA;;EAEA;;EAEA,oBAAoB,OAAO;;EAE3B,qBAAqB,QAAQ;;UAGd,eACf,QACA,SACA,eACA,cAAc,oBAAoB;EAElC;EACA,OAAO;EAC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ACA;EACA,UAAU;EACV;EACA;;cAUW,2CAA2C;mBACrC;EAEX,KAAK,YAAY,qBAAqB;EAItC,IAAI,aAAa,QAAQ;EAKzB,KAAK,SAAQ,2BAAgC,QAAQ;EAMrD,cAAc,YAAY,SAAS,kBAAkB,QAAQ;EAa7D,YACJ,YACA,OAAO,eACP,qBACC,QAAQ;;cAsBA,6CAA6C;mBACvC;mBACA;UACT;EAEI,YAAA;IAAW;;EAIjB,KAAK,YAAY,qBAAqB;EAMtC,IAAI,aAAa,QAAQ;EAKzB,KAAK,SAAQ,2BAAgC,QAAQ;EAKrD,cAAc,YAAY,SAAS,kBAAkB,QAAQ;EAO7D,YACJ,YACA,OAAO,eACP,qBACC,QAAQ;UAOG;UAWA;;iBA8BA,yBAAyB;EACvC;EACA;EACA;EACA,MAAM;EACN,WAAW;EACX,SAAS;EACT,UAAU;EACV,QAAQ;EACR,OAAO;EACP;EACA,WAAW;IACT;;iBAqBY,+BACd,KAAK,kBACL,SAAS,mCACR;;iBAsFa,2BACd,KAAK,kBACL;EAAW;IACV;iBA4Da,oBACd,YAAY,KAAK,iEACjB,SAAQ,sBACP;iBAca,0BACd,YAAY,oBACZ,SAAS,sBACR;iBAuBa,uCACd,cAAc,uBACb;iBAIa,iCACd,YAAY,qBACX;iBA6Ca,oCACd,cAAc,uBACb;iBAyCa,0BACd,cAAc,sBACd;EAAW;IACV;iBA2Ba,+BAA+B,SAAS;iBAWxC,+BAA+B,QAAQ,SAAS,eAC9D,KAAK,iBAAiB,QAAQ,SAAS,gBACvC;EACE;EACA;EACA,eAAe;EACf,oBAAoB,MAAM,YAAY,QAAQ,SAAS;EACvD,0BACE,MAAM,YAAY,QAAQ,SAAS,mBAChC;EACL;IAED"}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ import { a as MultiLayerVerifier, c as VerifyOptions, i as LayerStatus, l as gra
|
|
|
24
24
|
import { C as HeldOutGateRejectionCode, S as HeldOutGateDecision, _ as gainHistogram, a as ResearchReportOptions, b as HeldOutGate, d as GainDistributionOptions, g as SummaryTableRow, h as SummaryTableOptions, l as GainDistributionBin, m as SummaryTable, p as ParetoPoint, t as ResearchReport, u as GainDistributionFigureSpec, v as summaryTable, w as SplitCoverage, x as HeldOutGateConfig, y as GateEvidence } from "./summary-report-0La5vejY.js";
|
|
25
25
|
import { a as FailureClassification, c as FailureRule, d as failureBlame, i as FailureBlame, l as classifyFailure, o as FailureContext, r as failureClusterView, s as FailureReasonRule, u as classifyFailureReason } from "./failure-cluster-DOoa7CBg.js";
|
|
26
26
|
import { d as InsightReport, n as analyzeRuns, t as AnalyzeRunsOptions } from "./analyze-runs-BYyMShsj.js";
|
|
27
|
+
import { a as SpanHandle, n as CaptureWrite, o as TraceEmitter, s as TraceEmitterOptions, t as CaptureErrorHandler } from "./emitter-mAXC5PSN.js";
|
|
28
|
+
import { s as SandboxDriver } from "./sandbox-harness--VUvMji7.js";
|
|
27
29
|
import { a as ProducedProposal, c as SatisfiedBy, d as createLlmCorrectnessChecker, f as verifyCompletion, i as LlmCorrectnessCheckerOpts, l as TaskGold, n as CompletionVerdict, o as ProducedState, r as CorrectnessChecker, s as RequirementCheck, t as CompletionRequirement, u as completionVerdict } from "./completion-verifier-7KEfroqx.js";
|
|
28
30
|
import { _ as SelfImproveMethodResult, a as DefinedAgentEval, c as SelfImproveMethodOptions, d as SelfImproveProposerOptions, f as SelfImproveProposerResult, g as SelfImproveMethodProvenance, h as selfImprove, i as DefineAgentEvalOptions, l as SelfImproveOptions, n as AgentEvalEvaluateOptions, o as defineAgentEval, p as SelfImproveResult, r as AgentEvalImproveOptions, s as SelfImproveBudget, t as AgentEvalAgent, u as SelfImproveProgressEvent } from "./define-agent-eval-B9zPWFSK.js";
|
|
29
31
|
import { a as createTraceAnalyst, i as TraceAnalystDefinition, n as buildDefaultAnalystRegistry, r as CreateTraceAnalystOptions, t as DefaultAnalystRegistryOptions } from "./default-registry-DKlKVXMx.js";
|
|
@@ -33,12 +35,10 @@ import { r as TraceAnalysisEngineResult, s as RawAnalystFinding, t as TraceAnaly
|
|
|
33
35
|
import { a as BudgetPolicy, c as RegistryRunOpts, i as AnalystRegistryOptions, s as ExactRegistryRunOpts, t as AnalystRegistry } from "./registry-CMtGAxOw.js";
|
|
34
36
|
import { C as SEMANTIC_CONCEPT_JUDGE_VERSION, D as runSemanticConceptJudge, E as SemanticConceptJudgeResult, S as ConceptSpec, T as SemanticConceptJudgeOptions, _ as DspyRlmTraceEngineOptions, a as FAILURE_MODE_KIND_SPEC, b as createChatTraceEngine, d as FindingSubject, f as FindingSubjectKind, t as DEFAULT_TRACE_ANALYST_KINDS, v as createDspyRlmTraceEngine, w as SemanticConceptJudgeInput, x as ConceptFinding, y as ChatTraceEngineOptions } from "./index-Bn-P_XAl.js";
|
|
35
37
|
import { i as BenchmarkEvaluation } from "./types-yofaDmQa.js";
|
|
36
|
-
import { a as SpanHandle, n as CaptureWrite, o as TraceEmitter, s as TraceEmitterOptions, t as CaptureErrorHandler } from "./emitter-mAXC5PSN.js";
|
|
37
|
-
import { n as SandboxDriver } from "./sandbox-harness-B3Kx1fOA.js";
|
|
38
38
|
import { _ as redactText, d as ShareSafetyVerdict, f as assessShareSafety, g as redactForShare, h as redact, i as RedactOptions, o as RedactionProfile, r as REDACTION_VERSION, s as RedactionReport, u as ShareSafetyStatus, v as shareAllowed } from "./redact-jrT0APTU.js";
|
|
39
39
|
import { a as PairedEvalueStep, c as SequentialDecision, i as PairedEvalueSequence, l as evaluateInterimReleaseConfidence, n as InterimReleaseConfidenceInput, r as PairedEvalueOptions, t as InterimReleaseConfidence, u as pairedEvalueSequence } from "./sequential-Bb_pdTqG.js";
|
|
40
40
|
import { S as welchsTTest, _ as computeToolUseMetrics, b as WelchTestStatus, d as Trajectory, f as TrajectoryStep, g as ToolUseOptions, h as ToolUseMetrics, i as toolWasteView, m as ToolStats, p as buildTrajectory, s as judgeAgreementView, u as budgetBreachView, x as iqr, y as WelchTestResult } from "./tool-waste-BFG1vwTV.js";
|
|
41
|
-
import { A as AnalystFindingDigest, B as ControlRuntimeConfig, C as createFeedbackTrajectory, D as renderPreferenceMemoryMarkdown, E as feedbackTrajectoryToOptimizerRow, F as ControlBudget, H as ControlSeverity, I as ControlContext, L as ControlDecision, M as AnalystRunDigest, N as analystRunDigest, O as summarizePreferenceMemory, P as ControlActionOutcome, R as ControlEvalResult, S as controlRunToFeedbackTrajectory, T as feedbackTrajectoriesToOptimizerRows, U as ControlStep, V as ControlRuntimeError, W as StopDecision, _ as PreferenceMemoryEntry, a as FeedbackLabel, b as analystRunToReviewRequests, c as FeedbackOptimizerRow, d as FeedbackTask, f as FeedbackTrajectory, g as InMemoryFeedbackTrajectoryStore, h as FileSystemFeedbackTrajectoryStore, i as FeedbackAttempt, j as AnalystReviewDecision, k as withAssignedFeedbackSplit, l as FeedbackOutcome, m as FeedbackTrajectoryStore, n as AnalystReviewRequest, o as FeedbackLabelKind, p as FeedbackTrajectoryFilter, r as FeedbackArtifactType, s as FeedbackLabelSource, t as AnalystFeedbackTrajectoryOptions, u as FeedbackSplitPolicy, v as ProposedSideEffect, w as feedbackTrajectoriesToDatasetScenarios, x as assignFeedbackSplit, y as analystRunToFeedbackTrajectory, z as ControlRunResult } from "./feedback-trajectory-
|
|
41
|
+
import { A as AnalystFindingDigest, B as ControlRuntimeConfig, C as createFeedbackTrajectory, D as renderPreferenceMemoryMarkdown, E as feedbackTrajectoryToOptimizerRow, F as ControlBudget, H as ControlSeverity, I as ControlContext, L as ControlDecision, M as AnalystRunDigest, N as analystRunDigest, O as summarizePreferenceMemory, P as ControlActionOutcome, R as ControlEvalResult, S as controlRunToFeedbackTrajectory, T as feedbackTrajectoriesToOptimizerRows, U as ControlStep, V as ControlRuntimeError, W as StopDecision, _ as PreferenceMemoryEntry, a as FeedbackLabel, b as analystRunToReviewRequests, c as FeedbackOptimizerRow, d as FeedbackTask, f as FeedbackTrajectory, g as InMemoryFeedbackTrajectoryStore, h as FileSystemFeedbackTrajectoryStore, i as FeedbackAttempt, j as AnalystReviewDecision, k as withAssignedFeedbackSplit, l as FeedbackOutcome, m as FeedbackTrajectoryStore, n as AnalystReviewRequest, o as FeedbackLabelKind, p as FeedbackTrajectoryFilter, r as FeedbackArtifactType, s as FeedbackLabelSource, t as AnalystFeedbackTrajectoryOptions, u as FeedbackSplitPolicy, v as ProposedSideEffect, w as feedbackTrajectoriesToDatasetScenarios, x as assignFeedbackSplit, y as analystRunToFeedbackTrajectory, z as ControlRunResult } from "./feedback-trajectory-BgomnFOe.js";
|
|
42
42
|
import { A as TraceInsightReadiness, F as describeTraceInsightScope, G as AnalyzeTracesResult, H as tokenizeDomainWords, I as domainEvidencePattern, K as analyzeTraces, L as inferDomainKeywords, N as buildTraceInsightContext, P as buildTraceInsightPrompt, V as scoreTraceInsightReadiness, a as captureFetchToRawSink, b as OtlpSpan, c as ExtractedUsage, d as extractUsageFromSse, f as OtlpFileTraceStore, g as spanRecordsToTraceAnalysisStore, h as otlpTextToTraceAnalysisStore, j as TraceInsightSuite, m as SpanRecordsToTraceAnalysisStoreOptions, n as toolSpansToTraceAnalysisStore, o as OtlpFlatLine, u as extractUsage, v as OtlpExport, x as exportRunAsOtlp } from "./store-tool-spans-lWf6INTH.js";
|
|
43
43
|
import { a as RunIntegrityReport, o as assertRunCaptured, t as RunIntegrityError } from "./integrity-BAdVzT8u.js";
|
|
44
44
|
import { a as SteeringChange, c as CampaignRunContext, d as CampaignVariant, f as EvalCampaignOptions, h as runEvalCampaign, i as Researcher, l as CampaignRunOutcome, m as FailedRun, n as ExperimentResult, o as CampaignFactoryParams, p as EvalCampaignResult, r as FailureMode, s as CampaignIntegrityPolicy, t as ExperimentPlan, u as CampaignScenario } from "./researcher-CLnNJ7Or.js";
|
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@tangle-network/agent-eval — wire protocol",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.3",
|
|
6
6
|
"description": "HTTP and stdio RPC interface to agent-eval. The TypeScript runtime is the source of truth; this spec is the contract that cross-language clients (Python, Rust, Go) generate from.\n\nWire-protocol version: 1.1.0. Bumps on breaking changes to request/response schemas.",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Tangle Network",
|
|
@@ -682,16 +682,17 @@ function analyzeSupervisorRunSources(src, now = Date.now) {
|
|
|
682
682
|
* analyst reads communication and steer edges from it.
|
|
683
683
|
*/
|
|
684
684
|
const COORDINATION_FILE = "coordination-log.jsonl";
|
|
685
|
+
const readFileText = (path) => readFile(path, "utf8");
|
|
685
686
|
/** File text, or null when the file does not exist. Any other read error throws. */
|
|
686
|
-
async function readMaybe(path) {
|
|
687
|
-
return
|
|
687
|
+
async function readMaybe(path, read = readFileText) {
|
|
688
|
+
return read(path).catch((error) => {
|
|
688
689
|
if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") return null;
|
|
689
690
|
throw error;
|
|
690
691
|
});
|
|
691
692
|
}
|
|
692
693
|
/** The run's coordination log, or null when Runtime wrote none. */
|
|
693
|
-
function readCoordinationLog(runDir) {
|
|
694
|
-
return readMaybe(join(runDir, COORDINATION_FILE));
|
|
694
|
+
function readCoordinationLog(runDir, read = readFileText) {
|
|
695
|
+
return readMaybe(join(runDir, COORDINATION_FILE), read);
|
|
695
696
|
}
|
|
696
697
|
// src/supervisor-run/runtime-source-limits.ts
|
|
697
698
|
function spendRecord(value) {
|
|
@@ -1015,10 +1016,10 @@ const HARNESS_SESSION_FILE = {
|
|
|
1015
1016
|
opencode: /(^|\/)(\.local\/share\/opencode\/(opencode\.db|storage\/session\/.+\.json|export\/.+\.json)|\.opencode\/sessions\/.+)$/u
|
|
1016
1017
|
};
|
|
1017
1018
|
/** Session files the receipt's transcript blob lists, or undefined when it cannot say. */
|
|
1018
|
-
async function receiptSessionFiles(file) {
|
|
1019
|
+
async function receiptSessionFiles(file, read) {
|
|
1019
1020
|
let descriptor;
|
|
1020
1021
|
try {
|
|
1021
|
-
descriptor = JSON.parse(await
|
|
1022
|
+
descriptor = JSON.parse(await read(file));
|
|
1022
1023
|
} catch {
|
|
1023
1024
|
return;
|
|
1024
1025
|
}
|
|
@@ -1055,7 +1056,7 @@ function nativeTraceSummary(workers, root) {
|
|
|
1055
1056
|
const gaps = [count("partial") > 0 ? `${count("partial")} only a partial copy` : null, count("no-session-file") > 0 ? `${count("no-session-file")} a receipt with no session file` : null].filter((gap) => gap !== null);
|
|
1056
1057
|
return `per node — ${count("complete")} of ${workers.length} workers carry a complete native session receipt (workers[].nativeSession)${gaps.length > 0 ? `; ${gaps.join("; ")}` : ""}; root: ${rootText} (result.json rootHarnessTranscript)`;
|
|
1057
1058
|
}
|
|
1058
|
-
async function workspaceCapturesFromOutput(runDir, ref) {
|
|
1059
|
+
async function workspaceCapturesFromOutput(runDir, ref, read) {
|
|
1059
1060
|
const outRef = typeof ref === "string" ? ref : null;
|
|
1060
1061
|
const blobPath = blobFile(runDir, ref);
|
|
1061
1062
|
const missing = (projectionGap) => ({
|
|
@@ -1070,7 +1071,7 @@ async function workspaceCapturesFromOutput(runDir, ref) {
|
|
|
1070
1071
|
});
|
|
1071
1072
|
if (blobPath === null) return [missing("Runtime output has no valid content address")];
|
|
1072
1073
|
if (!await isFile(blobPath)) return [missing("Runtime output blob is missing or not a file")];
|
|
1073
|
-
const raw = await readMaybe(blobPath);
|
|
1074
|
+
const raw = await readMaybe(blobPath, read);
|
|
1074
1075
|
if (raw === null) return [missing("Runtime output blob is missing")];
|
|
1075
1076
|
let output;
|
|
1076
1077
|
try {
|
|
@@ -1146,7 +1147,7 @@ async function workspaceCapturesFromOutput(runDir, ref) {
|
|
|
1146
1147
|
* Blob files are checked on disk: a receipt that names a blob the directory no longer holds is
|
|
1147
1148
|
* not a retained transcript.
|
|
1148
1149
|
*/
|
|
1149
|
-
async function nodeTranscripts(runDir, events, nodeIds, root) {
|
|
1150
|
+
async function nodeTranscripts(runDir, events, nodeIds, read, root) {
|
|
1150
1151
|
const facts = /* @__PURE__ */ new Map();
|
|
1151
1152
|
const entry = (id) => {
|
|
1152
1153
|
let found = facts.get(id);
|
|
@@ -1193,14 +1194,14 @@ async function nodeTranscripts(runDir, events, nodeIds, root) {
|
|
|
1193
1194
|
retained.push(file);
|
|
1194
1195
|
if (turn) retainedTurns += 1;
|
|
1195
1196
|
}
|
|
1196
|
-
workspaceCaptures.push(...await workspaceCapturesFromOutput(runDir, ref));
|
|
1197
|
+
workspaceCaptures.push(...await workspaceCapturesFromOutput(runDir, ref, read));
|
|
1197
1198
|
}
|
|
1198
1199
|
let nativeSession = null;
|
|
1199
1200
|
if (fact.receipt !== null) {
|
|
1200
1201
|
if (fact.receipt.status === "available") {
|
|
1201
1202
|
const file = blobFile(runDir, fact.receipt.transcriptRef);
|
|
1202
1203
|
if (file !== null && await isFile(file)) {
|
|
1203
|
-
const sessionFiles = await receiptSessionFiles(file);
|
|
1204
|
+
const sessionFiles = await receiptSessionFiles(file, read);
|
|
1204
1205
|
const coverageComplete = fact.receipt.coverageComplete;
|
|
1205
1206
|
nativeSession = {
|
|
1206
1207
|
status: "available",
|
|
@@ -1230,11 +1231,6 @@ async function nodeTranscripts(runDir, events, nodeIds, root) {
|
|
|
1230
1231
|
return out;
|
|
1231
1232
|
}
|
|
1232
1233
|
/**
|
|
1233
|
-
* Sources for a run dir whose spawn journal does not exist. Mirrors the
|
|
1234
|
-
* absent shape the reader returns for a missing store: every
|
|
1235
|
-
* journal-dependent metric downstream reads `unavailable`, never 0.
|
|
1236
|
-
*/
|
|
1237
|
-
/**
|
|
1238
1234
|
* The run identity a terminal record names when no journal exists yet: the
|
|
1239
1235
|
* settle record's `tree.root`, else the failure record's `runId`. Both are
|
|
1240
1236
|
* Runtime's own `runId`, so the report names the run the record is about
|
|
@@ -1290,12 +1286,13 @@ function absentRuntimeSupervisorRun(runDir, resultText, failureText, instanceId)
|
|
|
1290
1286
|
* verdict.
|
|
1291
1287
|
*/
|
|
1292
1288
|
async function readRuntimeSupervisorRun(runDir, opts = {}) {
|
|
1289
|
+
const read = opts.readFile ?? readFileText;
|
|
1293
1290
|
const journalPath = join(runDir, JOURNAL_FILE);
|
|
1294
|
-
const rawJournal = opts.strict === true ? await
|
|
1291
|
+
const rawJournal = opts.strict === true ? await read(journalPath) : await readMaybe(journalPath, read);
|
|
1295
1292
|
const resultPath = join(runDir, RESULT_FILE);
|
|
1296
1293
|
const failurePath = join(runDir, FAILURE_FILE);
|
|
1297
|
-
const resultText = await readMaybe(resultPath);
|
|
1298
|
-
const failureText = await readMaybe(failurePath);
|
|
1294
|
+
const resultText = await readMaybe(resultPath, read);
|
|
1295
|
+
const failureText = await readMaybe(failurePath, read);
|
|
1299
1296
|
const failure = parseOptionalRecord(failureText, failurePath);
|
|
1300
1297
|
assertFailureRecord(failure, failurePath);
|
|
1301
1298
|
const result = parseOptionalRecord(resultText, resultPath);
|
|
@@ -1304,7 +1301,7 @@ async function readRuntimeSupervisorRun(runDir, opts = {}) {
|
|
|
1304
1301
|
assertResultMatchesJournal(normalized.root, result, resultPath);
|
|
1305
1302
|
const childSpawns = normalized.events.filter((event) => event.kind === "spawned" && nonEmptyString(event.id) !== null).filter((event) => event.id !== normalized.root);
|
|
1306
1303
|
const workerIds = new Set(childSpawns.map((event) => nonEmptyString(event.id)).filter((id) => id !== null));
|
|
1307
|
-
const transcripts = await nodeTranscripts(runDir, normalized.events, /* @__PURE__ */ new Set([normalized.root, ...workerIds]), {
|
|
1304
|
+
const transcripts = await nodeTranscripts(runDir, normalized.events, /* @__PURE__ */ new Set([normalized.root, ...workerIds]), read, {
|
|
1308
1305
|
id: normalized.root,
|
|
1309
1306
|
receipt: recordOrNull(result?.rootHarnessTranscript)
|
|
1310
1307
|
});
|
|
@@ -1346,7 +1343,7 @@ async function readRuntimeSupervisorRun(runDir, opts = {}) {
|
|
|
1346
1343
|
judgeSource: null,
|
|
1347
1344
|
patch: null,
|
|
1348
1345
|
driverLog: null,
|
|
1349
|
-
coordinationLog: await readCoordinationLog(runDir),
|
|
1346
|
+
coordinationLog: await readCoordinationLog(runDir, read),
|
|
1350
1347
|
harnessWorkerTokens: null,
|
|
1351
1348
|
harnessMissingReason: "Runtime FileRunContext has no external worker-token join",
|
|
1352
1349
|
limits: sourceLimits(normalized.root, normalized.events, workerIds),
|
|
@@ -1365,10 +1362,13 @@ async function isRuntimeSupervisorRunDir(runDir) {
|
|
|
1365
1362
|
return false;
|
|
1366
1363
|
}
|
|
1367
1364
|
async function isFile(path) {
|
|
1368
|
-
|
|
1369
|
-
|
|
1365
|
+
try {
|
|
1366
|
+
return (await stat(path)).isFile();
|
|
1367
|
+
} catch (error) {
|
|
1368
|
+
const code = error !== null && typeof error === "object" && "code" in error ? error.code : null;
|
|
1369
|
+
if (code === "ENOENT" || code === "ENOTDIR") return false;
|
|
1370
1370
|
throw error;
|
|
1371
|
-
}
|
|
1371
|
+
}
|
|
1372
1372
|
}
|
|
1373
1373
|
// src/supervisor-run/discovery-rollouts.ts
|
|
1374
1374
|
/**
|
|
@@ -1866,4 +1866,4 @@ function renderSupervisorRollupMarkdown(rollup, title = "Round rollup") {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
export { findSupervisorRunDirs as a, discoveryRunRolloutLines as c, analyzeSupervisorRunSources as d, parsePatch as f, analyzeSupervisorRun as i, isRuntimeSupervisorRunDir as l, renderSupervisorRunHeadline as n, discoveryPlayCheckReward as o, renderSupervisorRunMarkdown as r, discoveryPursuitOf as s, renderSupervisorRollupMarkdown as t, readRuntimeSupervisorRun as u };
|
|
1868
1868
|
|
|
1869
|
-
//# sourceMappingURL=render-
|
|
1869
|
+
//# sourceMappingURL=render-CFrJ7M0o.js.map
|