@tangle-network/agent-runtime 0.338.0 → 0.340.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/dist/{activation-kbkAuSmY.js → activation-D2PVljaw.js} +5 -18
- package/dist/{activation-kbkAuSmY.js.map → activation-D2PVljaw.js.map} +1 -1
- package/dist/{activation-CsbNax2X.d.ts → activation-DGDl4wwI.d.ts} +4 -24
- package/dist/agent.d.ts +4 -18
- package/dist/agent.js +3 -21
- package/dist/agent.js.map +1 -1
- package/dist/analyst-loop.d.ts +2 -2
- package/dist/{bundle-DM60AI2B.js → bundle-DNUq-OPW.js} +2 -2
- package/dist/{bundle-DM60AI2B.js.map → bundle-DNUq-OPW.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +4 -101
- package/dist/candidate-execution/index.js +10 -395
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/{delegate-Se1YZKMb.js → delegate-CtJIS-tp.js} +2 -2
- package/dist/{delegate-Se1YZKMb.js.map → delegate-CtJIS-tp.js.map} +1 -1
- package/dist/{driver-control-acknowledgers-T2a1Ouay.js → driver-control-acknowledgers-MTrs8HAF.js} +15 -11
- package/dist/driver-control-acknowledgers-MTrs8HAF.js.map +1 -0
- package/dist/{durable-file-B_eJr6Mb.js → durable-file-gNI9ILAn.js} +1 -3
- package/dist/durable-file-gNI9ILAn.js.map +1 -0
- package/dist/durable.d.ts +3 -35
- package/dist/durable.js +10 -10
- package/dist/durable.js.map +1 -1
- package/dist/{graph-CY0wH838.js → graph-DfWqp_1e.js} +4 -4
- package/dist/graph-DfWqp_1e.js.map +1 -0
- package/dist/{graph-registry-By0tUj4S.js → graph-registry-BnO64cn8.js} +3 -3
- package/dist/{graph-registry-By0tUj4S.js.map → graph-registry-BnO64cn8.js.map} +1 -1
- package/dist/{improve-CWGBT13K.js → improve-CKRVQqzt.js} +8 -35
- package/dist/improve-CKRVQqzt.js.map +1 -0
- package/dist/{improvement-adapter-D5gwwoXQ.d.ts → improvement-adapter-sIthWkcN.d.ts} +3 -21
- package/dist/index.d.ts +10 -215
- package/dist/index.js +91 -302
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +11 -143
- package/dist/intelligence.js +7 -81
- package/dist/intelligence.js.map +1 -1
- package/dist/{jsonl-file-DBv31uPi.js → jsonl-file-C9Kde_0Z.js} +2 -2
- package/dist/{jsonl-file-DBv31uPi.js.map → jsonl-file-C9Kde_0Z.js.map} +1 -1
- package/dist/kernel.d.ts +4 -3
- package/dist/kernel.js +12 -14
- package/dist/loop-runner-C4EWEcXf.d.ts +32 -0
- package/dist/loop-runner-DNWbTcVm.js +59 -0
- package/dist/loop-runner-DNWbTcVm.js.map +1 -0
- package/dist/loop-runner-bin.d.ts +32 -2
- package/dist/loop-runner-bin.js +93 -1
- package/dist/loop-runner-bin.js.map +1 -0
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +99 -418
- package/dist/mcp/index.js +121 -203
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.js +231 -1
- package/dist/mcp/memory-bin.js.map +1 -1
- package/dist/model-policy-CyCUwHed.js.map +1 -1
- package/dist/placement.d.ts +2 -33
- package/dist/placement.js +1 -35
- package/dist/placement.js.map +1 -1
- package/dist/platform.d.ts +188 -1
- package/dist/platform.js +129 -1
- package/dist/platform.js.map +1 -1
- package/dist/{prepare-Bt0IouPq.js → prepare-FzJoS68l.js} +8 -160
- package/dist/prepare-FzJoS68l.js.map +1 -0
- package/dist/{profile-Do-5xO_D.js → profile-DToH0XEs.js} +2 -2
- package/dist/profile-DToH0XEs.js.map +1 -0
- package/dist/profile-materialization-bPm0gGLO.d.ts +49 -0
- package/dist/profiles.d.ts +2 -2
- package/dist/profiles.js +3 -40
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-DGxQ8_YM.d.ts → protected-model-port-DVVh-hEk.d.ts} +3 -33
- package/dist/protected-redaction-DFCeo4vg.js.map +1 -1
- package/dist/{provision-supervisor-0jMufp4h.js → provision-supervisor-DqvWXmAE.js} +6 -6
- package/dist/{provision-supervisor-0jMufp4h.js.map → provision-supervisor-DqvWXmAE.js.map} +1 -1
- package/dist/{run-cancellation-BoW5Sg9Y.js → run-cancellation-C9oL62sW.js} +3 -7
- package/dist/{run-cancellation-BoW5Sg9Y.js.map → run-cancellation-C9oL62sW.js.map} +1 -1
- package/dist/{runtime-D37zRSs7.js → runtime-C55Zgo1R.js} +2531 -2889
- package/dist/runtime-C55Zgo1R.js.map +1 -0
- package/dist/{runtime-hooks-Bj6wJHlH.d.ts → runtime-hooks-nsqxSUFL.d.ts} +2 -6
- package/dist/{sandbox-profile-compat-xSoVtdWw.js → sandbox-profile-compat-DRr3JwDx.js} +2 -4
- package/dist/sandbox-profile-compat-DRr3JwDx.js.map +1 -0
- package/dist/{search-executor-DmgUm5p7.js → search-executor-ChOlRBgg.js} +3 -3
- package/dist/search-executor-ChOlRBgg.js.map +1 -0
- package/dist/{server-DQHJszfk.js → server-DkVBSN_S.js} +362 -67
- package/dist/server-DkVBSN_S.js.map +1 -0
- package/dist/{structural-rollout-DAvIE8mw.js → structural-rollout-C1LEk_zq.js} +80 -80
- package/dist/structural-rollout-C1LEk_zq.js.map +1 -0
- package/dist/{substrate-B0TYNrXn.js → substrate-CGDFTSRh.js} +2 -9
- package/dist/substrate-CGDFTSRh.js.map +1 -0
- package/dist/{supervise-WuPAwfPh.js → supervise-CaUAxZZP.js} +92 -75
- package/dist/supervise-CaUAxZZP.js.map +1 -0
- package/dist/{supervisor-CPG1I9UN.js → supervisor-VXuN2OHT.js} +205 -319
- package/dist/supervisor-VXuN2OHT.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +13 -13
- package/dist/testing.js.map +1 -1
- package/dist/tool-loop.d.ts +1 -1
- package/dist/{tool-server-Dqer2M4_.js → tool-server-XV4aJwoQ.js} +2 -2
- package/dist/tool-server-XV4aJwoQ.js.map +1 -0
- package/dist/top-snapshot-CbZE1JsU.js +502 -0
- package/dist/top-snapshot-CbZE1JsU.js.map +1 -0
- package/dist/tui/bin.js +711 -1
- package/dist/tui/bin.js.map +1 -1
- package/dist/tui/index.d.ts +2 -70
- package/dist/tui/index.js +3 -3
- package/dist/{types-zWfqDjeL.d.ts → types-Cwrea-bU.d.ts} +2 -17
- package/dist/{types-CrNWif8-.d.ts → types-DZ6L0Bv3.d.ts} +765 -2152
- package/dist/workspace-store/index.d.ts +1 -107
- package/dist/workspace-store/index.js +1 -415
- package/dist/workspace-store/index.js.map +1 -1
- package/dist/{workspace-streams-BZZds1Fw.d.ts → workspace-streams-BiS4ABah.d.ts} +3 -18
- package/package.json +1 -1
- package/skills/agent-graphs/references/authoring.md +3 -2
- package/dist/coder-yhVWbdWc.js +0 -40
- package/dist/coder-yhVWbdWc.js.map +0 -1
- package/dist/delegation-status-CF4D0NZ_.js +0 -358
- package/dist/delegation-status-CF4D0NZ_.js.map +0 -1
- package/dist/driver-control-acknowledgers-T2a1Ouay.js.map +0 -1
- package/dist/durable-file-B_eJr6Mb.js.map +0 -1
- package/dist/graph-CY0wH838.js.map +0 -1
- package/dist/improve-CWGBT13K.js.map +0 -1
- package/dist/integrations-6xttbPi9.d.ts +0 -190
- package/dist/integrations-dFi-ALk7.js +0 -132
- package/dist/integrations-dFi-ALk7.js.map +0 -1
- package/dist/kb-gate-C8z2juK8.d.ts +0 -80
- package/dist/kb-gate-DpaSwXVx.js +0 -80
- package/dist/kb-gate-DpaSwXVx.js.map +0 -1
- package/dist/loop-runner-bin-CFnrAHpl.d.ts +0 -164
- package/dist/loop-runner-bin-CdPlhy9g.js +0 -246
- package/dist/loop-runner-bin-CdPlhy9g.js.map +0 -1
- package/dist/memory-server-DXQ8IxGR.js +0 -234
- package/dist/memory-server-DXQ8IxGR.js.map +0 -1
- package/dist/openai-tools-DoQ32vpe.js +0 -44
- package/dist/openai-tools-DoQ32vpe.js.map +0 -1
- package/dist/openai-tools-zh2I_uD7.d.ts +0 -24
- package/dist/prepare-Bt0IouPq.js.map +0 -1
- package/dist/profile-Do-5xO_D.js.map +0 -1
- package/dist/profile-materialization-BnoEf1co.d.ts +0 -96
- package/dist/runtime-D37zRSs7.js.map +0 -1
- package/dist/sandbox-profile-compat-xSoVtdWw.js.map +0 -1
- package/dist/search-executor-DmgUm5p7.js.map +0 -1
- package/dist/server-DQHJszfk.js.map +0 -1
- package/dist/structural-rollout-DAvIE8mw.js.map +0 -1
- package/dist/substrate-B0TYNrXn.js.map +0 -1
- package/dist/supervise-WuPAwfPh.js.map +0 -1
- package/dist/supervisor-CPG1I9UN.js.map +0 -1
- package/dist/tool-server-Dqer2M4_.js.map +0 -1
- package/dist/top-app-C55Wa7uy.js +0 -1214
- package/dist/top-app-C55Wa7uy.js.map +0 -1
|
@@ -14,14 +14,7 @@ const UI_LENSES = [
|
|
|
14
14
|
"performance-perceived",
|
|
15
15
|
"other"
|
|
16
16
|
];
|
|
17
|
-
/** Frozen severity tuple, ordered worst → least bad for sort/report. */
|
|
18
|
-
const UI_FINDING_SEVERITIES = [
|
|
19
|
-
"critical",
|
|
20
|
-
"high",
|
|
21
|
-
"med",
|
|
22
|
-
"low"
|
|
23
|
-
];
|
|
24
17
|
//#endregion
|
|
25
|
-
export { UI_LENSES as
|
|
18
|
+
export { UI_LENSES as t };
|
|
26
19
|
|
|
27
|
-
//# sourceMappingURL=substrate-
|
|
20
|
+
//# sourceMappingURL=substrate-CGDFTSRh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"substrate-CGDFTSRh.js","names":[],"sources":["../src/profiles/ui-auditor/substrate.ts"],"sourcesContent":["/**\n *\n * UI audit finding shapes — the unit of evidence a contributor can act on.\n *\n * A finding describes a single, actionable UI problem: lens, severity,\n * route, observation, impact, suggested fix, and screenshot evidence.\n * Findings are produced by the auditor profile, persisted by the issue\n * writer as self-contained GitHub-issue Markdown, and surfaced over MCP.\n *\n * The shapes are deliberately constraining — the validator + writer\n * hard-fail on missing screenshot evidence, missing lens, missing title.\n *\n * @experimental\n */\n\n/**\n * Canonical audit lenses. Each lens scopes a finding to a single class of\n * problem so a single audit pass can iterate them without pile-on findings\n * under a generic label.\n */\nexport type UiLens =\n | 'consistency'\n | 'hierarchy'\n | 'layout'\n | 'ux-flow'\n | 'duplication'\n | 'accessibility'\n | 'responsive'\n | 'states'\n | 'content'\n | 'interaction'\n | 'performance-perceived'\n | 'other'\n\n/** Frozen tuple of lenses for validation + iteration. */\nexport const UI_LENSES: readonly UiLens[] = [\n 'consistency',\n 'hierarchy',\n 'layout',\n 'ux-flow',\n 'duplication',\n 'accessibility',\n 'responsive',\n 'states',\n 'content',\n 'interaction',\n 'performance-perceived',\n 'other',\n] as const\n\n/**\n * Severity scale.\n * - `critical` — blocks a core task or is an accessibility blocker.\n * - `high` — confusing, broken-looking, or noticeable friction.\n * - `med` — visible polish issue, would be caught in code review.\n * - `low` — nitpick worth fixing eventually.\n */\nexport type UiFindingSeverity = 'low' | 'med' | 'high' | 'critical'\n\n/** Pointer to a screenshot referenced by a finding (workspace-relative path). */\nexport interface UiFindingScreenshot {\n path: string\n viewport?: string\n label?: string\n}\n\n/**\n * A single UI audit finding — the unit of work a contributor can act on.\n *\n * Every field except the documented optionals is required. The auditor\n * validator + writer hard-fail on missing screenshot evidence, missing\n * lens, missing title, etc.\n */\nexport interface UiFinding {\n /** Monotonic id assigned by the writer when persisting. Optional in-transit. */\n id?: number\n title: string\n lens: UiLens\n severity: UiFindingSeverity\n /** Logical route the finding was observed on (e.g. `home`, `checkout-step-2`). */\n route: string\n /** Fully qualified URL the finding was observed at. */\n url?: string\n /** Viewport string the offending capture was taken at (e.g. `1280x800`). */\n viewport?: string\n /** CSS selector pinning the offending element, when one can be identified. */\n selector?: string\n /** 1–3 sentences describing what the screenshot shows that is wrong. */\n observation: string\n /** Who is affected and how. */\n impact: string\n /** A specific change a contributor could apply without asking back. */\n suggestedFix: string\n /** Optional explicit reproduction steps. Writer synthesizes from route/url/selector when omitted. */\n reproSteps?: string\n /** Free-form tags. */\n tags?: readonly string[]\n /** Screenshot references — must be non-empty for actionable findings. */\n screenshots: readonly UiFindingScreenshot[]\n /** Cross-references to similar findings already on file, by id. */\n similarTo?: readonly number[]\n /** ISO-8601 creation timestamp set by the writer when persisted. */\n createdAt?: string\n}\n"],"mappings":";;AAmCA,MAAa,YAA+B;CAC1C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { n as assertNoSymlinkDescendant } from "./durable-file-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { n as assertNoSymlinkDescendant } from "./durable-file-gNI9ILAn.js";
|
|
2
|
+
import { $ as noteScopeRetainedOwnerCoordination, $n as CONTINUATIONS_DIR, $r as runtimeOwnedExecutorProviderEvidence, A as providerVisibleProfile, Ai as assertValidBudget, Ar as fullProfileMaterialization, At as toolResultText, B as recordScopeOwnerBarrenPause, Bn as classifyDriverFailure, Br as attestRuntimeOwnedScopeOwner, C as beginScopeOwnerAttempt, Ci as executorFailure, D as scopeOwnerExecutorNodeContext, Di as newUsageTotals, Dn as isPeerMailEnvelope, Dt as codeModeModelOutput, E as restoreScopeOwnerAcceptedExecution, Ei as meterUsageEvent, Er as assertProfileMaterialization, Et as codeModeArguments, Fn as isTerminalNodeStatus, G as consumeScopeRetainedOwnerResult, Gn as SeatChainExhaustedError, H as recordScopeOwnerPause, Hn as undispatchedCredentialExit, In as DriverAttemptsExhaustedError, Ir as sandboxProfileMaterialization, J as scopeRetainedOwnerResult, Jr as providerAttemptEvidence, K as prepareScopeRetainedOwnerTask, Kn as authoredSeatStages, Ln as HarnessTurnFailedError, Lr as unsupportedProfileDimensions, Mn as createActivityLog, Mr as promptControlProfileMaterialization, Mt as routerBrain, N as assertRecursiveReservationPolicy, Nr as promptModelProfileMaterialization, O as coordinationMcpAlias, Or as controlProfileMaterialization, Ot as createCodeModeTools, P as deriveNodeExecutionIdentity, Pn as isLiveNodeStatus, Pr as renderUnsupported, Pt as resolveAgentEnvironmentProvider, Q as scopeRetainedOwnerRestorePoint, Qr as runtimeOwnedExecutorMaterialization, R as meterRuntimeOwnedAccounting, Rn as abandonablePending, Rr as worktreeCliProfileMaterialization, Si as contentAddress, T as recordScopeOwnerMaterialization, U as prepareScopeRetainedOwnerSeatSwitch, Un as upstreamUnavailableSignal, V as recordScopeOwnerDriverAttempt, Vn as summarizeDriverAttempts, Vr as authoredAgentIdentity, W as abandonScopeRetainedOwnerInvocation, Wn as SeatChain, Wr as inheritRuntimeOwnedExecutorAttestation, X as scopeRetainedOwnerTurnEnded, Xn as gateOnDeliverable, Xr as runtimeOwnedDriveHarnessProviderEvidence, Xt as readHarnessTranscript, Y as beginScopeRetainedOwnerDrive, Yn as CheckUnavailableError, Yr as recordRuntimeOwnedDriveHarnessProviderEvidence, Yt as persistHarnessTranscript, Z as reconcileScopeRetainedOwnerEnvironment, Zr as runtimeOwnedExecutorExecutionBinding, _r as runAbortable, a as runTree, bn as createInbox, br as bridgeStopSignalKey, c as driverExecutorFactory, cn as createOtelExporter, cr as bridgeAdmissionRefusal, di as registerRetainedExecutorPreparation, ei as runtimeOwnedPendingExecutorMaterialization, er as admitContinuationPolicy, et as bindScopeRetainedOwnerEnvironmentId, fi as retainedExecutorSeamKey, ft as bindReusableExecutorExecutionId, gi as unavailableResumeAt, gr as linkAbort, hi as unavailablePauseMs, hr as RunCancellationReason, ht as snapshotExecutorConfig, i as runFinalizer, it as scopeRetainedOwnerJournalRoot, j as runtimeGraphMetadataKey, jr as profileMaterializationAxes$1, jt as createRouterTranscript, k as coordinationProfileToolPrefix, ki as spendFromUsageTotals, kr as defineProfileMaterializationContract, l as isDriverSpec, lr as bridgeModelRouteRefusal, m as parseWorkerToolTraceArtifact, mi as jitteredMs, mn as toOtelAttributes, mt as createExecutor, n as createSupervisor, nr as checkVerdictOf, nt as owners, o as createRootHandle, pi as cappedDoublingMs, pt as captureReusableExecutorConfig, q as scopeRetainedOwnerPriorSpend, qn as seatExecutionProfile, r as bestDelivered, rr as createContinuationKeeper, rt as scopeRetainedOwnerContext, s as driverChild, ti as runtimeOwnedScopeOwnerRuntime, tn as WORKER_TRACE_PROPAGATION, tr as bestComposite, tt as bindScopeRetainedOwnerProvider, ui as RetainedExecutionPendingError, un as generateSpanId, w as noteScopeOwnerPlannedExecution, wi as errMessage, wn as PEER_MAIL_WIRE_KEY, xi as detachedSnapshot, yn as INBOX_RECEIPT_KEY, yr as bridgeRuntimeAttachmentsKey, z as meterRuntimeOwnedProviderAttempt, zn as causedByPartialFailure } from "./supervisor-VXuN2OHT.js";
|
|
3
3
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
4
4
|
import { t as isRecord } from "./record-value-B6bwJxLa.js";
|
|
5
|
-
import {
|
|
5
|
+
import { K as chargedTokens, Ot as teardownExecutor, W as addSpend, X as errorMessage, _t as withBudgetResources, dt as withTimeout, et as isAsyncIterable$1, ft as zeroSpend, gt as resourceTelemetry, kt as teardownSurfaces, mt as addResourceSpend, nt as promptCacheTokenClasses, ot as sleep, ut as unmeteredSpend, xt as DEFAULT_SUCCESSFUL_SHUTDOWN_MS } from "./sandbox-profile-compat-DRr3JwDx.js";
|
|
6
6
|
import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutionSettings, l as profileProviderModel, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-CyCUwHed.js";
|
|
7
7
|
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
8
|
-
import { a as readCommittedJsonLines, n as isNoEntError, r as prepareJsonlAppend } from "./jsonl-file-
|
|
9
|
-
import { _ as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { c as loadGraph, i as graphRegistry } from "./graph-registry-
|
|
8
|
+
import { a as readCommittedJsonLines, n as isNoEntError, r as prepareJsonlAppend } from "./jsonl-file-C9Kde_0Z.js";
|
|
9
|
+
import { _ as environmentReader, c as safeJsonText, d as coordinationVerbNames, f as createFileRunContext, i as createCoordinationToolsForManager, l as normalizeAnalyzeOnSettle, m as withRunContext, n as createSteerAcknowledger, p as createInMemoryRunContext, r as createCoordinationTools, s as budgetOverspendText, t as createCancelAcknowledger } from "./driver-control-acknowledgers-MTrs8HAF.js";
|
|
10
|
+
import { a as watchRunCancellation, i as readRunCancellation, o as writeRunCancellation, r as readRunCancelRequest, t as applyRunCancellation } from "./run-cancellation-C9oL62sW.js";
|
|
11
|
+
import { n as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-XV4aJwoQ.js";
|
|
12
|
+
import { c as loadGraph, i as graphRegistry } from "./graph-registry-BnO64cn8.js";
|
|
13
13
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
14
14
|
import { toolSpansToTraceAnalysisStore } from "@tangle-network/agent-eval";
|
|
15
15
|
import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -1186,22 +1186,6 @@ function createProgressTracker(opts = {}) {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
};
|
|
1188
1188
|
}
|
|
1189
|
-
/** Build a `ProgressSample` from a scope settlement. The objective is the verdict score and
|
|
1190
|
-
* `delivered` is the verdict's `valid` — the SAME single delivery signal `finalizeBestDelivered`
|
|
1191
|
-
* and `defaultSelectWinner` use, so "progress" and "winner" cannot disagree. */
|
|
1192
|
-
function sampleFromSettled(settled, at) {
|
|
1193
|
-
if (settled.kind === "down") return {
|
|
1194
|
-
id: settled.handle.id,
|
|
1195
|
-
at,
|
|
1196
|
-
delivered: false
|
|
1197
|
-
};
|
|
1198
|
-
return {
|
|
1199
|
-
id: settled.handle.id,
|
|
1200
|
-
at,
|
|
1201
|
-
...settled.verdict?.score !== void 0 ? { objective: settled.verdict.score } : {},
|
|
1202
|
-
delivered: settled.verdict?.valid === true
|
|
1203
|
-
};
|
|
1204
|
-
}
|
|
1205
1189
|
/**
|
|
1206
1190
|
* "Nothing new has happened." Fires when the run has produced no new settled work for `ms`, or no
|
|
1207
1191
|
* IMPROVEMENT over the last `settles` settlements.
|
|
@@ -1281,22 +1265,6 @@ function anyOf(...rules) {
|
|
|
1281
1265
|
return CONTINUE;
|
|
1282
1266
|
};
|
|
1283
1267
|
}
|
|
1284
|
-
/** Stop only when EVERY rule stops — for a conservative gate that needs corroboration. */
|
|
1285
|
-
function allOf(...rules) {
|
|
1286
|
-
if (rules.length === 0) throw new ValidationError("allOf: needs at least one rule");
|
|
1287
|
-
return (v) => {
|
|
1288
|
-
const reasons = [];
|
|
1289
|
-
for (const rule of rules) {
|
|
1290
|
-
const d = rule(v);
|
|
1291
|
-
if (!d.stop) return CONTINUE;
|
|
1292
|
-
reasons.push(d.reason);
|
|
1293
|
-
}
|
|
1294
|
-
return {
|
|
1295
|
-
stop: true,
|
|
1296
|
-
reason: reasons.join(" AND ")
|
|
1297
|
-
};
|
|
1298
|
-
};
|
|
1299
|
-
}
|
|
1300
1268
|
/**
|
|
1301
1269
|
* Evaluate a rule against the run's settled work — the ONE evaluator both supervisor arms call.
|
|
1302
1270
|
*
|
|
@@ -3155,21 +3123,26 @@ function driverAgent(opts) {
|
|
|
3155
3123
|
* the drive harness's fact, and the caller composes the re-entry task from it (see
|
|
3156
3124
|
* `./reentry.ts`). A continuation re-enters the same session only on a backend that proves it.
|
|
3157
3125
|
*
|
|
3158
|
-
* Progress
|
|
3159
|
-
* resets the barren failure counter decides
|
|
3160
|
-
* `continuation.maxBarren`
|
|
3161
|
-
*
|
|
3162
|
-
*
|
|
3163
|
-
*
|
|
3126
|
+
* Progress paces the continuations, and nothing else counts them. The same delivery reading that
|
|
3127
|
+
* resets the barren failure counter decides how soon a continued drive is re-entered: once
|
|
3128
|
+
* `continuation.maxBarren` re-entered drives in a row complete without progress, the loop PAUSES
|
|
3129
|
+
* before each further continuation, 5 minutes and doubling per barren drive up to 60, journals one
|
|
3130
|
+
* `barren-pause` row per pause for an operator alarm, and re-enters. A barren streak never ends the
|
|
3131
|
+
* run: the check, the deadline, the budget and cancellation do. Progress is a delivery or a rise
|
|
3132
|
+
* in the check's best composite, and it resets the streak and the backoff. There is no count cap
|
|
3133
|
+
* and no caller veto: the old prompt-owned loop logged 896 of 1,011 rounds with no progress, and
|
|
3134
|
+
* 650 recorded inputs chose seven different re-prompt counts. Measured 2026-10-21 on
|
|
3135
|
+
* magnetar-rust-20261021a: the barren bound settled a 48-hour run `no-winner` after 14.3 hours,
|
|
3136
|
+
* while its last two turns updated its pages and waited on its own 2^20 prove.
|
|
3164
3137
|
*
|
|
3165
3138
|
* A RE-ENTERED run is one this process resumed after an earlier process drove it, usually one
|
|
3166
3139
|
* that stopped without settling it. Its first drive is entered as `run-reentered` with the
|
|
3167
3140
|
* workers that were open, and a drive counts toward `maxBarren` only if it began after the root
|
|
3168
3141
|
* streamed a model event in this process: the drive that straddles the restart never counts, and
|
|
3169
|
-
* a root that speaks and then stays barren is
|
|
3142
|
+
* a root that speaks and then stays barren is paced as any other. Measured 2026-10-19 on
|
|
3170
3143
|
* magnetar-rust-20261019f: after a host reboot the re-entered root was first driven with the
|
|
3171
3144
|
* bare original task and no word of its three open workers, two barren continuations followed,
|
|
3172
|
-
* and the
|
|
3145
|
+
* and the barren bound of the time settled the run `no-result-selected`.
|
|
3173
3146
|
*
|
|
3174
3147
|
* A THIRD CLASS sits between the two: the upstream said "not now". A model provider's exhausted
|
|
3175
3148
|
* quota, a rate limit, or an overloaded service (HTTP 429, 503, 529, or the router's own codes for
|
|
@@ -3203,6 +3176,17 @@ const DEFAULT_MAX_ATTEMPTS = Number.POSITIVE_INFINITY;
|
|
|
3203
3176
|
const DEFAULT_INITIAL_BACKOFF_MS$1 = 2e3;
|
|
3204
3177
|
const DEFAULT_MAX_BACKOFF_MS$1 = 3e4;
|
|
3205
3178
|
const DEFAULT_TRANSIENT_OUTAGE_MS = 9e5;
|
|
3179
|
+
const BARREN_PAUSE_FIRST_MS = 5 * 6e4;
|
|
3180
|
+
const BARREN_PAUSE_MAX_MS = 60 * 6e4;
|
|
3181
|
+
/**
|
|
3182
|
+
* The pause before a continuation once `streak` re-entered drives in a row have completed without
|
|
3183
|
+
* progress: 5 minutes at `maxBarren`, doubling per further barren drive, 60 minutes at most.
|
|
3184
|
+
* Derived from the streak alone, so a progress reading resets the backoff with the streak. Not
|
|
3185
|
+
* jittered: a barren streak is one root's, not an outage that cut many drivers off together.
|
|
3186
|
+
*/
|
|
3187
|
+
function barrenPauseMs(streak, maxBarren) {
|
|
3188
|
+
return cappedDoublingMs(streak - maxBarren + 1, BARREN_PAUSE_FIRST_MS, BARREN_PAUSE_MAX_MS);
|
|
3189
|
+
}
|
|
3206
3190
|
/**
|
|
3207
3191
|
* The repeated-failure bound: attempts that each fail within {@link INSTANT_FAILURE_MS} with the
|
|
3208
3192
|
* same error, {@link REPEATED_FAILURE_LIMIT} or more in a row over at least
|
|
@@ -3265,7 +3249,7 @@ async function defaultSleep$1(ms, signal) {
|
|
|
3265
3249
|
* Run the driver until it completes WITH ITS CONTRACT MET, or until the budget, the deadline, an
|
|
3266
3250
|
* abort, a terminal error, or a ceiling stops it. Transient failures are retried. A drive that
|
|
3267
3251
|
* returns with its completion check unmet is re-entered with Runtime's continuation note until the
|
|
3268
|
-
* continuation's deadline
|
|
3252
|
+
* continuation's deadline, pausing first once `maxBarren` turns in a row made no progress. Throws
|
|
3269
3253
|
* `DriverAttemptsExhaustedError` (cause = the last real failure) when a FAILURE ends the loop; a
|
|
3270
3254
|
* completed drive returns, met contract or not, because deciding what an undelivered run is worth
|
|
3271
3255
|
* belongs to the finalizer, not to this loop.
|
|
@@ -3302,6 +3286,7 @@ async function runDriverWithRetry(run) {
|
|
|
3302
3286
|
let wakes = 0;
|
|
3303
3287
|
let reentry = run.reentered?.first;
|
|
3304
3288
|
let beforeModelEvent = false;
|
|
3289
|
+
let lastProgressAt = now();
|
|
3305
3290
|
const emit = async (record) => {
|
|
3306
3291
|
const entered = reentry === void 0 ? {} : { reentry: reentry.reason };
|
|
3307
3292
|
const stamped = {
|
|
@@ -3326,9 +3311,29 @@ async function runDriverWithRetry(run) {
|
|
|
3326
3311
|
const byBudget = budgetStop(run.budget(), now());
|
|
3327
3312
|
return byBudget === "deadline" || byBudget === "budget-exhausted" ? byBudget : void 0;
|
|
3328
3313
|
};
|
|
3329
|
-
if (barrenReentries >= policy.maxBarren) return { refusedBy: "no-progress" };
|
|
3330
3314
|
const before = bounds();
|
|
3331
3315
|
if (before !== void 0) return { refusedBy: before };
|
|
3316
|
+
let barren;
|
|
3317
|
+
if (barrenReentries >= policy.maxBarren) {
|
|
3318
|
+
const pausedAt = now();
|
|
3319
|
+
const budgetDeadline = run.budget().deadlineMs;
|
|
3320
|
+
const until = Math.min(policy.deadlineMs, budgetDeadline > 0 ? budgetDeadline : Number.POSITIVE_INFINITY);
|
|
3321
|
+
const pauseMs = Math.max(0, Math.min(barrenPauseMs(barrenReentries, policy.maxBarren), until - pausedAt));
|
|
3322
|
+
await run.onBarrenPause?.({
|
|
3323
|
+
attempt,
|
|
3324
|
+
streak: barrenReentries,
|
|
3325
|
+
pauseMs,
|
|
3326
|
+
resumeAt: new Date(pausedAt + pauseMs).toISOString(),
|
|
3327
|
+
lastProgressAt: new Date(lastProgressAt).toISOString()
|
|
3328
|
+
});
|
|
3329
|
+
await sleep(pauseMs, run.signal);
|
|
3330
|
+
barren = {
|
|
3331
|
+
streak: barrenReentries,
|
|
3332
|
+
pausedMs: pauseMs
|
|
3333
|
+
};
|
|
3334
|
+
const afterPause = bounds();
|
|
3335
|
+
if (afterPause !== void 0) return { refusedBy: afterPause };
|
|
3336
|
+
}
|
|
3332
3337
|
const steer = (await policy.compose({
|
|
3333
3338
|
attempt,
|
|
3334
3339
|
continuations,
|
|
@@ -3340,7 +3345,10 @@ async function runDriverWithRetry(run) {
|
|
|
3340
3345
|
const afterCompose = bounds();
|
|
3341
3346
|
if (afterCompose !== void 0) return { refusedBy: afterCompose };
|
|
3342
3347
|
if (steer.length === 0) throw new ValidationError("runDriverWithRetry: the continuation note is empty");
|
|
3343
|
-
return { steer }
|
|
3348
|
+
return barren === void 0 ? { steer } : {
|
|
3349
|
+
steer,
|
|
3350
|
+
barren
|
|
3351
|
+
};
|
|
3344
3352
|
};
|
|
3345
3353
|
for (let attempt = 1;; attempt += 1) {
|
|
3346
3354
|
const before = run.progress();
|
|
@@ -3358,7 +3366,10 @@ async function runDriverWithRetry(run) {
|
|
|
3358
3366
|
const classification = classifyDriverFailure(error, run.signal);
|
|
3359
3367
|
const after = run.progress();
|
|
3360
3368
|
const progressed = madeProgress(before, after);
|
|
3361
|
-
if (progressed)
|
|
3369
|
+
if (progressed) {
|
|
3370
|
+
abandonments = 0;
|
|
3371
|
+
lastProgressAt = now();
|
|
3372
|
+
}
|
|
3362
3373
|
const retainedFailure = error instanceof RetainedExecutionPendingError ? error : void 0;
|
|
3363
3374
|
const pending = abandonablePending(error);
|
|
3364
3375
|
const failureRecord = () => ({
|
|
@@ -3502,8 +3513,10 @@ async function runDriverWithRetry(run) {
|
|
|
3502
3513
|
const progressed = madeProgress(before, after);
|
|
3503
3514
|
const contract = contractOf(after);
|
|
3504
3515
|
const contractField = contract === "none" ? {} : { contract };
|
|
3505
|
-
if (progressed)
|
|
3506
|
-
|
|
3516
|
+
if (progressed) {
|
|
3517
|
+
barrenReentries = 0;
|
|
3518
|
+
lastProgressAt = now();
|
|
3519
|
+
} else if (!beforeModelEvent && reentry !== void 0 && reentry.reason !== "wake" && contract === "unmet") barrenReentries += 1;
|
|
3507
3520
|
const wait = run.wait;
|
|
3508
3521
|
if (wait !== void 0 && contract !== "met" && !(continuation?.closed() ?? false) && !run.signal.aborted && budgetStop(run.budget(), now()) === void 0 && wait.open()) {
|
|
3509
3522
|
const woken = await wait.wake(attempt + 1);
|
|
@@ -3535,12 +3548,14 @@ async function runDriverWithRetry(run) {
|
|
|
3535
3548
|
madeProgress: progressed,
|
|
3536
3549
|
...contractField,
|
|
3537
3550
|
reprompted: true,
|
|
3538
|
-
retryInMs: 0
|
|
3551
|
+
retryInMs: 0,
|
|
3552
|
+
...decision.barren === void 0 ? {} : { barrenPauseMs: decision.barren.pausedMs }
|
|
3539
3553
|
});
|
|
3540
3554
|
reentry = {
|
|
3541
3555
|
reason: "unmet-contract",
|
|
3542
3556
|
steer: decision.steer,
|
|
3543
|
-
continuation: continuations
|
|
3557
|
+
continuation: continuations,
|
|
3558
|
+
...decision.barren === void 0 ? {} : { barren: decision.barren }
|
|
3544
3559
|
};
|
|
3545
3560
|
continue;
|
|
3546
3561
|
}
|
|
@@ -3577,13 +3592,18 @@ function composeReentryTask(input) {
|
|
|
3577
3592
|
const { reentry, continuity, state } = input;
|
|
3578
3593
|
if (reentry.reason === "unmet-contract" && continuity.session === "continued") {
|
|
3579
3594
|
const changes = stateLines(state, false, input.tools);
|
|
3580
|
-
return [
|
|
3595
|
+
return [
|
|
3596
|
+
...barrenLines(reentry).flatMap((line) => [line, ""]),
|
|
3597
|
+
reentry.steer,
|
|
3598
|
+
...changes.length > 0 ? ["", ...changes] : []
|
|
3599
|
+
].join("\n");
|
|
3581
3600
|
}
|
|
3582
3601
|
if (reentry.reason === "wake" && continuity.session === "continued") return reentry.input;
|
|
3583
3602
|
return [
|
|
3584
3603
|
`You are re-entering a run that is already in progress (driver attempt ${input.attempt}). This is the same run and the same objective, not a new one.`,
|
|
3585
3604
|
whyLine(reentry),
|
|
3586
3605
|
environmentLine(continuity),
|
|
3606
|
+
...reentry.reason === "unmet-contract" ? barrenLines(reentry) : [],
|
|
3587
3607
|
"",
|
|
3588
3608
|
"## Objective",
|
|
3589
3609
|
"",
|
|
@@ -3633,6 +3653,17 @@ function whyLine(reentry) {
|
|
|
3633
3653
|
if (reentry.reason === "run-reentered") return restartLine(reentry);
|
|
3634
3654
|
return reentry.reason === "upstream-unavailable" ? "Your previous turn was interrupted before it finished; the run itself is intact." : `Your previous turn ended before it finished (retry ${reentry.retry}); the run itself is intact.`;
|
|
3635
3655
|
}
|
|
3656
|
+
/**
|
|
3657
|
+
* What a root re-entered after a barren pause is told: its last turns delivered nothing, and how
|
|
3658
|
+
* to wait on long work of its own instead of ending the turn. Measured 2026-10-21 on
|
|
3659
|
+
* magnetar-rust-20261021a: the root ended two turns to wait on its own 2^20 prove, and both
|
|
3660
|
+
* counted as barren.
|
|
3661
|
+
*/
|
|
3662
|
+
function barrenLines(reentry) {
|
|
3663
|
+
if (reentry.barren === void 0) return [];
|
|
3664
|
+
const minutes = Math.round(reentry.barren.pausedMs / 6e4);
|
|
3665
|
+
return [`Your last ${reentry.barren.streak} turns ended with the check unmet and delivered nothing: no accepted result, no worker that passed its check, and no rise in the check's score. Runtime waited ${minutes} minutes before this turn.`, "If you are waiting on long work of your own, such as a build, a proof or a job you started, do not end your turn to wait for it. Wait inside the turn with your wake or wait tool, or a command that blocks until the work finishes, then act on its result. Each turn in a row that ends with nothing delivered doubles the wait before the next, up to an hour."];
|
|
3666
|
+
}
|
|
3636
3667
|
function restartLine(reentry) {
|
|
3637
3668
|
const replaced = new Set(reentry.replaced);
|
|
3638
3669
|
const gone = reentry.live.filter((id) => !replaced.has(id));
|
|
@@ -3883,21 +3914,6 @@ function resolveSupervisorModelId(profile) {
|
|
|
3883
3914
|
assertExecutableAgentProfile(profile, "supervisorAgent");
|
|
3884
3915
|
return concreteProfileModel(profile);
|
|
3885
3916
|
}
|
|
3886
|
-
/**
|
|
3887
|
-
* Reduce one canonical executable profile to the scalars the two brain arms consume.
|
|
3888
|
-
*/
|
|
3889
|
-
function resolveSupervisorProfile(profile) {
|
|
3890
|
-
const exact = agentProfileSchema.parse(profile);
|
|
3891
|
-
assertExecutableAgentProfile(exact, "resolveSupervisorProfile");
|
|
3892
|
-
const systemPrompt = resolveSupervisorSystemPrompt(exact);
|
|
3893
|
-
const modelId = resolveSupervisorModelId(exact);
|
|
3894
|
-
return {
|
|
3895
|
-
name: exact.name ?? "supervisor",
|
|
3896
|
-
harness: agentHarness(exact.harness) ?? null,
|
|
3897
|
-
modelId,
|
|
3898
|
-
...systemPrompt !== void 0 ? { systemPrompt } : {}
|
|
3899
|
-
};
|
|
3900
|
-
}
|
|
3901
3917
|
/** Listener, authenticated remote endpoint, and bounded request policy for one manager. */
|
|
3902
3918
|
//#endregion
|
|
3903
3919
|
//#region src/runtime/supervise/supervisor-coordination-observers.ts
|
|
@@ -4659,7 +4675,8 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
4659
4675
|
madeProgress: record.madeProgress
|
|
4660
4676
|
});
|
|
4661
4677
|
await deps.onDriverAttempt?.(record);
|
|
4662
|
-
}
|
|
4678
|
+
},
|
|
4679
|
+
onBarrenPause: (pause) => recordScopeOwnerBarrenPause(scope, pause)
|
|
4663
4680
|
});
|
|
4664
4681
|
driverFailed = false;
|
|
4665
4682
|
} finally {
|
|
@@ -8513,6 +8530,6 @@ function superviseWithContext(profile, task, opts, brain) {
|
|
|
8513
8530
|
}, brain));
|
|
8514
8531
|
}
|
|
8515
8532
|
//#endregion
|
|
8516
|
-
export {
|
|
8533
|
+
export { supervisorAgent as A, noProgressFor as B, delegatesWorkerBriefPrompt as C, kernelPromptRegistry as D, formatPromptHandle as E, runtimeFlowBrain as F, plateauLength as G, anytimeReport as H, runBrainLoop as I, readRootStreamReceipt as J, renderAnytimeTable as K, serveCoordinationMcp as L, UNPROVEN_CONTINUITY as M, composeReentryTask as N, naiveContinuationPrompt as O, driverAgent as P, allWorkersStalled as R, createPromptRegistry as S, dumbContinuationPassPrompt as T, areaUnderCurve as U, plateau as V, bestSoFar as W, createSupervisorSpanRecorder as Y, validateFlowGraph as _, superviseRootProfile as a, validateGraphTopology as b, retryPreSpawnRefusals as c, createGraphOverlay as d, GraphRouteError as f, routeFlowOf as g, journaledGateDecider as h, profileGuidanceComposer as i, supervisorAgentWithTestBrain as j, promptHandle as k, withWorkerSpawnRetry as l, flowRootProfile as m, superviseFleetCapabilities as n, isPreSpawnExecutorFailure as o, createFlowRun as p, readRootStream as q, superviseWithTestBrain as r, resolveWorkerSpawnRetry as s, supervise as t, workerFromBackend as u, defaultEdgeTraversalCap as v, dumbContinuationFailPrompt as w, analyzesFindingsReportPrompt as x, graphRootProfile as y, anyOf as z };
|
|
8517
8534
|
|
|
8518
|
-
//# sourceMappingURL=supervise-
|
|
8535
|
+
//# sourceMappingURL=supervise-CaUAxZZP.js.map
|