@tangle-network/agent-runtime 0.285.0 → 0.287.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-DXFzDCmr.js → activation-4vL86PRm.js} +2 -2
- package/dist/{activation-DXFzDCmr.js.map → activation-4vL86PRm.js.map} +1 -1
- package/dist/{activation-CxiJixSO.d.ts → activation-Dyv1dMkl.d.ts} +3 -3
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-C3bIMg7f.js → coordination-driver-DDghv2Gd.js} +4 -2
- package/dist/coordination-driver-DDghv2Gd.js.map +1 -0
- package/dist/{delegate-C6wq_PN0.js → delegate-Dap1t7z3.js} +2 -2
- package/dist/{delegate-C6wq_PN0.js.map → delegate-Dap1t7z3.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +3 -3
- package/dist/{graph-CpfmPttW.js → graph-BTpOi49c.js} +4 -4
- package/dist/{graph-CpfmPttW.js.map → graph-BTpOi49c.js.map} +1 -1
- package/dist/{improvement-cycle-DxBnEP8q.js → improvement-cycle-CYlT8ljt.js} +3 -3
- package/dist/{improvement-cycle-DxBnEP8q.js.map → improvement-cycle-CYlT8ljt.js.map} +1 -1
- package/dist/{index-B7PfLDfI.d.ts → index-bw6F9zYu.d.ts} +6 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +3 -3
- package/dist/intelligence.js +4 -4
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-DEbkROOD.d.ts → loop-runner-bin-aBNPvBlN.d.ts} +3 -3
- package/dist/{loop-runner-bin-CWLXByT9.js → loop-runner-bin-egTVuXQR.js} +3 -3
- package/dist/{loop-runner-bin-CWLXByT9.js.map → loop-runner-bin-egTVuXQR.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-H8QPhTVE.d.ts → openai-tools-lQtFkNKQ.d.ts} +2 -2
- package/dist/profiles.d.ts +2 -2
- package/dist/{provision-supervisor-jnArBa8T.js → provision-supervisor-DOcn_znM.js} +3 -3
- package/dist/{provision-supervisor-jnArBa8T.js.map → provision-supervisor-DOcn_znM.js.map} +1 -1
- package/dist/{runtime-BSbrdRvA.js → runtime-B4yjra8n.js} +8 -8
- package/dist/{runtime-BSbrdRvA.js.map → runtime-B4yjra8n.js.map} +1 -1
- package/dist/{search-method-Hjmqa4B8.js → search-method-CeCJqBht.js} +2 -2
- package/dist/{search-method-Hjmqa4B8.js.map → search-method-CeCJqBht.js.map} +1 -1
- package/dist/{server-DuSo1qox.js → server-CbJVwrL8.js} +3 -3
- package/dist/{server-DuSo1qox.js.map → server-CbJVwrL8.js.map} +1 -1
- package/dist/{stream-agent-turn-IIqBKeLB.d.ts → stream-agent-turn-CUMwVuOz.d.ts} +18 -4
- package/dist/{substrate-CHQ5GYnU.d.ts → substrate-CdOWExde.d.ts} +2 -2
- package/dist/{supervise-tLnNRbmr.js → supervise-PbqXJ2vC.js} +19 -15
- package/dist/supervise-PbqXJ2vC.js.map +1 -0
- package/dist/{supervisor-D4NnNHZd.js → supervisor-BuxrUpbM.js} +9955 -9781
- package/dist/supervisor-BuxrUpbM.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-D56jQad-.d.ts → types-D5n136cu.d.ts} +10 -1
- package/package.json +12 -12
- package/skills/profile-authoring/SKILL.md +42 -89
- package/skills/profile-authoring/references/acceptance-examples.md +93 -0
- package/dist/coordination-driver-C3bIMg7f.js.map +0 -1
- package/dist/supervise-tLnNRbmr.js.map +0 -1
- package/dist/supervisor-D4NnNHZd.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $a as RuntimeStreamEvent, C as ExecutorToolCall, Ca as Validator, Ha as AgentTaskStatus, Pn as ExecutorProgress, Qi as ExecCtx, Tn as TraceSource, Ua as BackendErrorDetail, X as Scope, Y as Runtime, b as ExecutorRegistry, ba as SandboxClient, f as ExecutorCancellation, fa as LoopTokenUsage, g as ExecutorFactory, gt as UsageEvent, p as ExecutorCancellationRequest, rt as Spend, s as DefaultVerdict, v as ExecutorNodeContext, vr as UnavailablePausePolicy, y as ExecutorProgressEvent } from "./types-
|
|
1
|
+
import { $a as RuntimeStreamEvent, C as ExecutorToolCall, Ca as Validator, Ha as AgentTaskStatus, Pn as ExecutorProgress, Qi as ExecCtx, Tn as TraceSource, Ua as BackendErrorDetail, X as Scope, Y as Runtime, b as ExecutorRegistry, ba as SandboxClient, f as ExecutorCancellation, fa as LoopTokenUsage, g as ExecutorFactory, gt as UsageEvent, p as ExecutorCancellationRequest, rt as Spend, s as DefaultVerdict, v as ExecutorNodeContext, vr as UnavailablePausePolicy, y as ExecutorProgressEvent } from "./types-D5n136cu.js";
|
|
2
2
|
import { c as AgentCandidateArtifactPort, t as AgentCandidateWorkspaceArchiveLimits } from "./workspace-archive-DpyZV2Cj.js";
|
|
3
3
|
import { AgentCandidateWorkspaceSnapshotEvidence, AgentProfile, AgentProfileMcpServer, AgentProfileValidationResult, HarnessType, ReasoningEffort, StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
import { AgentRunOutcome } from "@tangle-network/sandbox/runtime";
|
|
@@ -846,6 +846,16 @@ interface ProviderWorkspaceEntryMetadata {
|
|
|
846
846
|
readonly accessedAt?: string | null;
|
|
847
847
|
readonly symlinkTarget?: string | null;
|
|
848
848
|
}
|
|
849
|
+
/** One Sidecar execution attempt; retries remain separate evidence. */
|
|
850
|
+
interface ProviderWorkspaceAttemptProvenance {
|
|
851
|
+
readonly executionId: string;
|
|
852
|
+
readonly ordinal: number;
|
|
853
|
+
readonly providerSessionId: string;
|
|
854
|
+
readonly nativeSessionIds: ReadonlyArray<string>;
|
|
855
|
+
readonly processIds: ReadonlyArray<string>;
|
|
856
|
+
readonly outcome: 'succeeded' | 'failed' | 'cancelled' | 'unknown';
|
|
857
|
+
readonly missingReasons: ReadonlyArray<string>;
|
|
858
|
+
}
|
|
849
859
|
/** Source-reported coverage retained with the verified archive reference. */
|
|
850
860
|
interface ProviderWorkspaceCaptureProvenance {
|
|
851
861
|
readonly status: 'reported' | 'unavailable';
|
|
@@ -866,6 +876,8 @@ interface ProviderWorkspaceCaptureProvenance {
|
|
|
866
876
|
readonly reportedDirectories: number;
|
|
867
877
|
readonly complete: boolean;
|
|
868
878
|
};
|
|
879
|
+
/** Sidecar attempts join sessions through executionIds, not the Runtime node ID. */
|
|
880
|
+
readonly attempts?: ReadonlyArray<ProviderWorkspaceAttemptProvenance>;
|
|
869
881
|
readonly sessions?: ReadonlyArray<{
|
|
870
882
|
readonly id: string;
|
|
871
883
|
readonly executionId: string;
|
|
@@ -1019,7 +1031,7 @@ interface ProviderAsSandboxClientOptions {
|
|
|
1019
1031
|
node?: ExecutorNodeContext;
|
|
1020
1032
|
};
|
|
1021
1033
|
/** Called after verification and before deletion so the run result can retain the exact join. */
|
|
1022
|
-
onWorkspaceCaptured?: (receipt: ProviderWorkspaceCaptureReceipt) => void
|
|
1034
|
+
onWorkspaceCaptured?: (receipt: ProviderWorkspaceCaptureReceipt) => void | Promise<void>;
|
|
1023
1035
|
mapCreateOptions?: (options: CreateSandboxOptions | undefined) => Partial<CreateAgentEnvironmentInput>;
|
|
1024
1036
|
}
|
|
1025
1037
|
/** Adapt a neutral environment provider to the `SandboxClient` interface used by existing loop paths.
|
|
@@ -1973,6 +1985,8 @@ interface SteerableSandboxSession {
|
|
|
1973
1985
|
verdict?: DefaultVerdict;
|
|
1974
1986
|
spent: Spend;
|
|
1975
1987
|
} | undefined;
|
|
1988
|
+
/** Same output projection used at capture and terminal publication. */
|
|
1989
|
+
output(): unknown;
|
|
1976
1990
|
teardown(): Promise<void>;
|
|
1977
1991
|
}
|
|
1978
1992
|
interface SteerableSandboxArgs {
|
|
@@ -2412,5 +2426,5 @@ declare function streamAgentTurn(backend: AgentTurnBackend, input: AgentTurnInpu
|
|
|
2412
2426
|
*/
|
|
2413
2427
|
declare function collectAgentTurn(stream: AsyncIterable<RuntimeStreamEvent>): Promise<CollectedAgentTurn>;
|
|
2414
2428
|
//#endregion
|
|
2415
|
-
export { decodeHarnessUsage as $,
|
|
2416
|
-
//# sourceMappingURL=stream-agent-turn-
|
|
2429
|
+
export { decodeHarnessUsage as $, DEFAULT_PEER_MAIL_LIMITS as $n, ResourceRequest as $t, createInbox as A, createWorktree as An, AgentEnvironmentProvider$1 as At, secretEnvOfMcpServer as B, harnessSupportsReasoningEffort as Bn, AgentTurnResult$2 as Bt, SteerableSandboxArgs as C, CreateWorktreeOptions as Cn, resolveRedactor as Cr, mapSandboxToolEvent as Ct, Inbox as D, RemoveWorktreeOptions as Dn, AgentEnvironment$1 as Dt, AuthorityInboxMessage as E, GitRunner as En, sumSandboxUsage as Et, ResolvedMcpServerLaunch as F, DEFAULT_LOCAL_HARNESS as Fn, AgentEnvironmentSummary as Ft, CodexRolloutStoreRef as G, ToolSpec as Gn, ExecRequest as Gt, CodexRolloutIdentity as H, parseCodexTokenUsage as Hn, CheckpointRequest as Ht, envKeyProvider as I, LOCAL_HARNESSES as In, AgentProfileRef$1 as It, addHarnessUsage as J, ToolLoopCompaction as Jn, PlacementInfo as Jt, CodexRolloutTurn as K, ToolLoopCallContext as Kn, ExecResult as Kt, mcpSecretEnvMetadataKey as L, LocalHarness as Ln, AgentSession as Lt, BridgeModelCredential as M, CodexExecutionEvidence as Mn, AgentEnvironmentProviderRegistry as Mt, BridgeSeam as N, CodexExecutionPolicy as Nn, AgentEnvironmentQuery as Nt, InboxMessage as O, WorktreeHandle as On, AgentEnvironmentCapabilities$1 as Ot, KeyProvider as P, CodexTokenUsage as Pn, AgentEnvironmentStatus as Pt, HarnessUsage as Q, AUTHORITY_MARKERS as Qn, ProviderPromptOptions as Qt, resolveMcpServerLaunch as R, LocalHarnessResult as Rn, AgentSessionRef as Rt, SandboxSteeringOptions as S, WorktreeProfileMaterializationReceipt as Sn, defaultRedactor as Sr, mapSandboxEvent as St, createSteerableSandboxSession as T, DiffResult as Tn, sandboxProgressEvents as Tt, CodexRolloutSession as U, runLocalHarness as Un, CreateAgentEnvironmentInput$1 as Ut, CodexForkBoundary as V, localHarnessExecutable as Vn, CheckpointRef as Vt, CodexRolloutStoreReader as W, RouterTransportConfig as Wn, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as Wt, harnessUsageIsEmpty as X, ToolLoopMessageRecord as Xn, ProviderExecutorOptions as Xt, createCodexRolloutStoreReader as Y, ToolLoopCompactionOptions as Yn, ProviderAsSandboxClientOptions as Yt, readCodexRolloutSession as Z, ToolLoopToolCall as Zn, ProviderLeafOut as Zt, cliInPlaceExecutor as _, ProviderPlacement as _n, JsonRpcResponse as _r, SandboxUsageLedger as _t, StreamAgentTurnOptions as a, resolveAgentEnvironmentProvider as an, PeerMailOutcome as ar, SharedBoxPlacement as at, createExecutorRegistry as b, WorktreeCommandResult as bn, McpTransport as br, createSandboxUsageLedger as bt, CliInPlaceSeam as c, SandboxControlClient as cn, PeerMailSendInput as cr, SharedBoxStats as ct, CliWorktreeSeam as d, ProviderWorkspaceCaptureProvenance as dn, claimsAuthority as dr, sharedBoxRefusal as dt, SandboxClientProviderOptions as en, PEER_MAIL_WIRE_KEY as er, DEFAULT_SHARED_BOX_RESOURCES as et, ExecutorConfig as f, ProviderWorkspaceCaptureReceipt as fn, createPeerMailbox as fr, sharedWorkerClientName as ft, SandboxSeam as g, ProviderWorkspaceRetentionPort as gn, JsonRpcMessage as gr, SandboxToolPartState as gt, RouterToolsSeam as h, ProviderWorkspaceRetentionContext as hn, peerMailVerbNames as hr, SandboxServedBackend as ht, CollectedAgentTurn as i, providerAsSandboxClient as in, PeerMailLimits as ir, SharedBoxHandle as it, BridgeHarnessStore as j, removeWorktree as jn, AgentEnvironmentProviderRef as jt, PeerInboxMessage as k, captureWorktreeDiff as kn, AgentEnvironmentEvent$1 as kt, CliSeam as l, createTangleSandboxExactProcessProvider as ln, PeerMailbox as lr, SharedWorkerIdentity as lt, RouterSeam as m, ProviderWorkspaceEntryMetadata as mn, peerMailTools as mr, SandboxOutputMarker as mt, AgentTurnInput$1 as n, createAgentEnvironmentProviderRegistry as nn, PeerMailEvent as nr, ROUTER_CLIENT_HEADER as nt, collectAgentTurn as o, sandboxClientAsProvider as on, PeerMailReadout as or, SharedBoxPlacementOptions as ot, ProviderSeam as p, ProviderWorkspaceCaptureResult as pn, isPeerMailEnvelope as pr, SandboxLeafOut as pt, CodexStoreDelta as q, ToolLoopChat as qn, ForkRequest as qt, AgentTurnUsage as r, providerAsExecutor as rn, PeerMailKind as rr, SharedBoxCloseReceipt as rt, streamAgentTurn as s, CreateTangleSandboxExactProcessProviderOptions as sn, PeerMailRefusal as sr, SharedBoxProcess as st, AgentTurnBackend as t, WorkspaceRequest as tn, PeerMailEnvelope as tr, DEFAULT_SHARED_BOX_WORKERS as tt, CliWorktreeBridgeSeam as u, ProviderWorkspaceAttemptProvenance as un, PeerMailboxOptions as ur, sharedBoxPlacement as ut, cliWorktreeExecutor as v, InPlaceHarnessResult as vn, McpToolAnnotations as vr, assertSandboxServedModel as vt, SteerableSandboxSession as w, DiffOptions as wn, sandboxEventServedBackend as wt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as x, WorktreeHarnessResult as xn, Redactor as xr, extractLlmCallEvent as xt, createExecutor as y, WorktreeCheckRunner as yn, McpToolDescriptor as yr, createSandboxToolPartState as yt, resolveSecretEnv as z, RunLocalHarnessOptions as zn, AgentSessionStatus$1 as zt };
|
|
2430
|
+
//# sourceMappingURL=stream-agent-turn-CUMwVuOz.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ca as Validator, Yi as AgentRunSpec, Zi as Driver, va as OutputAdapter } from "./types-
|
|
1
|
+
import { Ca as Validator, Yi as AgentRunSpec, Zi as Driver, va as OutputAdapter } from "./types-D5n136cu.js";
|
|
2
2
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
3
3
|
//#region src/profiles/coder.d.ts
|
|
4
4
|
/**
|
|
@@ -281,4 +281,4 @@ interface UiFinding {
|
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
283
|
export { CoderTask as _, UiFindingSeverity as a, KnowledgeUpdate as c, ResearchSource as d, ResearchTask as f, researcherProfile as g, multiHarnessResearcherFanout as h, UiFindingScreenshot as i, MultiHarnessResearcherFanoutOptions as l, createResearcherValidator as m, UI_LENSES as n, UiLens as o, ResearcherProfileOptions as p, UiFinding as r, KnowledgeItem as s, UI_FINDING_SEVERITIES as t, ResearchOutput as u, coderTaskToPrompt as v };
|
|
284
|
-
//# sourceMappingURL=substrate-
|
|
284
|
+
//# sourceMappingURL=substrate-CdOWExde.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as bindScopeRetainedOwnerEnvironmentId, A as driverExecutorFactory, Aa as zeroSpend, Ai as isNoEntError,
|
|
1
|
+
import { $ as bindScopeRetainedOwnerEnvironmentId, A as driverExecutorFactory, Aa as zeroSpend, Ai as isNoEntError, Ar as readHarnessTranscript, B as recordScopeOwnerMaterialization, Ba as teardownSurfaces, C as createContinuationKeeper, Cr as RunCancellationReason, Di as unsupportedProfileDimensions, Dt as bindReusableExecutorExecutionId, Er as runAbortable, F as beginScopeOwnerAttempt, Fi as attestRuntimeOwnedScopeOwner, Gi as runtimeOwnedExecutorExecutionBinding, Gr as generateSpanId, H as restoreScopeOwnerAcceptedExecution, Hi as providerAttemptEvidence, Hn as retainedExecutorSeamKey, Ji as runtimeOwnedPendingExecutorMaterialization, Jt as createInbox, Ki as runtimeOwnedExecutorMaterialization, L as deriveNodeExecutionIdentity, La as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Lt as createRouterTranscript, Ma as resourceTelemetry, Mi as readCommittedJsonLines, Na as withBudgetResources, Nt as snapshotExecutorConfig, Oa as unmeteredSpend, Ot as captureReusableExecutorConfig, P as assertRecursiveReservationPolicy, Pn as resolveAgentEnvironmentProvider, R as meterRuntimeOwnedAccounting, Ri as inheritRuntimeOwnedExecutorAttestation, Ti as renderUnsupported, Tn as routerBrain, Tr as linkAbort, U as scopeOwnerExecutorNodeContext, Ui as recordRuntimeOwnedDriveHarnessProviderEvidence, Ur as createOtelExporter, V as recordScopeOwnerPause, Vn as registerRetainedExecutorPreparation, Wi as runtimeOwnedDriveHarnessProviderEvidence, Yi as runtimeOwnedScopeOwnerRuntime, Yr as toOtelAttributes, _ as CheckUnavailableError, _i as defineProfileMaterializationContract, an as bridgeAdmissionRefusal, at as scopeRetainedOwnerContext, b as bestComposite, bi as promptControlProfileMaterialization, c as runTree, ct as scopeRetainedOwnerRestorePoint, dn as bridgeRuntimeAttachmentsKey, dr as meterUsageEvent, et as bindScopeRetainedOwnerProvider, f as runDriverWithRetry, fn as bridgeStopSignalKey, fr as newUsageTotals, ga as addSpend, gi as controlProfileMaterialization, h as CONTINUATIONS_DIR, hi as assertProfileMaterialization, hr as errMessage, i as bestDelivered, ir as parseWorkerToolTraceArtifact, it as reconcileScopeRetainedOwnerEnvironment, j as isDriverSpec, ja as addResourceSpend, ji as prepareJsonlAppend, jr as contentAddress, jt as createExecutor, k as driverChild, ka as withTimeout, ki as worktreeCliProfileMaterialization, kr as persistHarnessTranscript, lr as assertValidBudget, lt as scopeRetainedOwnerResult, mr as spendFromUsageTotals, n as createRootHandle, nt as noteScopeRetainedOwnerCoordination, on as bridgeModelRouteRefusal, or as executorFailure, ot as scopeRetainedOwnerPriorSpend, p as summarizeDriverAttempts, qi as runtimeOwnedExecutorProviderEvidence, r as createSupervisor, rt as prepareScopeRetainedOwnerTask, s as runFinalizer, st as scopeRetainedOwnerResourceReader, ta as detachedSnapshot, tt as consumeScopeRetainedOwnerResult, u as HarnessTurnFailedError, v as admitContinuationPolicy, vi as fullProfileMaterialization, wa as sleep, x as checkVerdictOf, xi as promptModelProfileMaterialization, yi as profileMaterializationAxes$1, z as meterRuntimeOwnedProviderAttempt, za as teardownExecutor, zt as WORKER_TRACE_PROPAGATION } from "./supervisor-BuxrUpbM.js";
|
|
2
2
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
3
3
|
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, f as harnessRunsAgent, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile } from "./model-policy-BbSCSak0.js";
|
|
4
|
-
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
5
4
|
import { n as assertNoSymlinkDescendant } from "./durable-file-DWQA4ooo.js";
|
|
6
|
-
import {
|
|
5
|
+
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
6
|
+
import { C as applyRunCancellation, E as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, b as withRunContext, c as createProgressTracker, d as progressStop, j as createCoordinationToolsForManager, k as coordinationVerbNames, n as createSteerAcknowledger, r as driverAgent, t as createCancelAcknowledger, u as plateau, v as createFileRunContext, w as watchRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-DDghv2Gd.js";
|
|
7
7
|
import { r as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-Dqer2M4_.js";
|
|
8
8
|
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-DSCWdbX2.js";
|
|
9
9
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
@@ -1285,7 +1285,7 @@ const UNPROVEN_CONTINUITY = Object.freeze({
|
|
|
1285
1285
|
function composeReentryTask(input) {
|
|
1286
1286
|
const { reentry, continuity, state } = input;
|
|
1287
1287
|
if (reentry.reason === "unmet-contract" && continuity.session === "continued") {
|
|
1288
|
-
const changes = stateLines(state, false);
|
|
1288
|
+
const changes = stateLines(state, false, input.tools);
|
|
1289
1289
|
return [reentry.steer, ...changes.length > 0 ? ["", ...changes] : []].join("\n");
|
|
1290
1290
|
}
|
|
1291
1291
|
return [
|
|
@@ -1301,7 +1301,8 @@ function composeReentryTask(input) {
|
|
|
1301
1301
|
"",
|
|
1302
1302
|
"## Completion check",
|
|
1303
1303
|
"",
|
|
1304
|
-
input.
|
|
1304
|
+
...input.tools?.includes("submit_result") === true ? ["Call submit_result to request acceptance through the independent check."] : [],
|
|
1305
|
+
input.contract === void 0 || input.contract.trim().length === 0 ? "No completion requirement was described." : `The declared completion requirement is: ${input.contract.trim()}`,
|
|
1305
1306
|
...reentry.reason === "unmet-contract" ? [
|
|
1306
1307
|
"",
|
|
1307
1308
|
"What is still unmet:",
|
|
@@ -1311,13 +1312,14 @@ function composeReentryTask(input) {
|
|
|
1311
1312
|
"",
|
|
1312
1313
|
"## Run state, from the coordinator",
|
|
1313
1314
|
"",
|
|
1314
|
-
...stateLines(state, true),
|
|
1315
|
+
...stateLines(state, true, input.tools),
|
|
1315
1316
|
"",
|
|
1316
1317
|
"## What to do now",
|
|
1317
1318
|
"",
|
|
1318
1319
|
"Continue the run from this state.",
|
|
1319
1320
|
...continuity.workspace === "kept" || continuity.workspace === "restored" ? ["Read the files you already wrote before you repeat any step of the task. A step whose file is there is done, and its content stands."] : [],
|
|
1320
|
-
"Receive the waiting events with await_event
|
|
1321
|
+
...input.tools?.includes("await_event") === true ? ["Receive the waiting events with await_event before starting new work."] : [],
|
|
1322
|
+
...input.tools?.includes("observe_agent") === true ? ["Read the output of every settled worker with observe_agent before you spawn anything new."] : [],
|
|
1321
1323
|
"Do not spawn a replacement for a worker that is running or has settled.",
|
|
1322
1324
|
"Your coordination tools are served by the same coordinator as before, and the state above comes from it."
|
|
1323
1325
|
].join("\n");
|
|
@@ -1337,17 +1339,17 @@ function environmentLine(continuity) {
|
|
|
1337
1339
|
if (continuity.environment === "replaced") return `Your previous environment${continuity.previousEnvironmentId === void 0 ? "" : ` (${continuity.previousEnvironmentId})`} is gone, and you run in a new one. ` + (continuity.workspace === "kept" ? "Its files were carried over." : continuity.workspace === "restored" ? `Its files were restored from a checkpoint taken at ${continuity.checkpointAt ?? "your last coordination call"}; anything you wrote after that is not here. The coordinator and the knowledge store kept everything below.` : "Files you wrote there are not here. The coordinator and the knowledge store kept everything below.");
|
|
1338
1340
|
return "You may be in a new environment. Check for files before you rely on them; the coordinator kept everything below.";
|
|
1339
1341
|
}
|
|
1340
|
-
function stateLines(state, full) {
|
|
1342
|
+
function stateLines(state, full, tools) {
|
|
1341
1343
|
const lines = [];
|
|
1342
|
-
if (full || state.journalRows > state.journalReadTo) lines.push(`Journal: ${state.journalRows} rows. You last read up to row ${state.journalReadTo}
|
|
1344
|
+
if (full || state.journalRows > state.journalReadTo) lines.push(`Journal: ${state.journalRows} rows. You last read up to row ${state.journalReadTo}.` + (tools?.includes("read_journal") === true ? ` Call read_journal with sinceRow ${state.journalReadTo} to read what happened since, or sinceRow 0 to read the whole run.` : ""));
|
|
1343
1345
|
if (state.live.length > 0) lines.push(`Workers running: ${state.live.map((worker) => `${worker.id} (${worker.label}, ${worker.status})`).join("; ")}.`);
|
|
1344
1346
|
else if (full) lines.push("Workers running: none.");
|
|
1345
1347
|
const settled = full ? state.settled : state.settled.filter((worker) => !worker.delivered);
|
|
1346
|
-
if (settled.length > 0) lines.push(`Workers settled${full ? "" : " that you have not received"}: ${settled.map((worker) => `${worker.id} (${worker.status}${worker.valid === void 0 ? "" : worker.valid ? ", passed its check" : ", did not pass its check"}${worker.delivered ? "" : ", not yet received"})`).join("; ")}
|
|
1348
|
+
if (settled.length > 0) lines.push(`Workers settled${full ? "" : " that you have not received"}: ${settled.map((worker) => `${worker.id} (${worker.status}${worker.valid === void 0 ? "" : worker.valid ? ", passed its check" : ", did not pass its check"}${worker.delivered ? "" : ", not yet received"})`).join("; ")}.` + (tools?.includes("observe_agent") === true ? " Read an output with observe_agent and the worker id." : ""));
|
|
1347
1349
|
else if (full) lines.push("Workers settled: none.");
|
|
1348
|
-
if (state.waiting.length > 0) lines.push(`Events waiting for you
|
|
1349
|
-
else if (full) lines.push("Events waiting for you
|
|
1350
|
-
if (state.unacknowledged.length > 0) lines.push(`Events delivered to a turn that did not finish, so treat them as unread: ${state.unacknowledged.map((event) => `#${event.seq} ${event.type}${event.worker === void 0 ? "" : ` from ${event.worker}`}`).join("; ")}
|
|
1350
|
+
if (state.waiting.length > 0) lines.push(`Events waiting for you: ${state.waiting.length} (${state.waiting.map((event) => event.worker === void 0 ? event.type : `${event.type} from ${event.worker}`).join("; ")}).`);
|
|
1351
|
+
else if (full) lines.push("Events waiting for you: none.");
|
|
1352
|
+
if (state.unacknowledged.length > 0) lines.push(`Events delivered to a turn that did not finish, so treat them as unread: ${state.unacknowledged.map((event) => `#${event.seq} ${event.type}${event.worker === void 0 ? "" : ` from ${event.worker}`}`).join("; ")}.` + (tools?.includes("await_event") === true ? " Pass their numbers in await_event's acknowledge once you have processed them." : ""));
|
|
1351
1353
|
if (state.lastRejection !== void 0) lines.push(`Your last submit_result was refused: ${state.lastRejection.reason}`);
|
|
1352
1354
|
return lines;
|
|
1353
1355
|
}
|
|
@@ -2149,7 +2151,8 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
2149
2151
|
blobs: deps.blobs
|
|
2150
2152
|
});
|
|
2151
2153
|
},
|
|
2152
|
-
canReadMore: runtimeToolNames.includes("read_continuation")
|
|
2154
|
+
canReadMore: runtimeToolNames.includes("read_continuation"),
|
|
2155
|
+
canSubmitResult: runtimeToolNames.includes("submit_result")
|
|
2153
2156
|
});
|
|
2154
2157
|
let candidate;
|
|
2155
2158
|
const finalizerDeliverable = deps.deliverable === void 0 ? void 0 : {
|
|
@@ -2245,6 +2248,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
2245
2248
|
controls.beginDriverAttempt(attempt);
|
|
2246
2249
|
const compose = reentry === void 0 ? void 0 : (continuity) => composeReentryTask({
|
|
2247
2250
|
originalTask: task,
|
|
2251
|
+
tools: runtimeToolNames,
|
|
2248
2252
|
...describe === void 0 ? {} : { contract: describe },
|
|
2249
2253
|
reentry,
|
|
2250
2254
|
continuity,
|
|
@@ -4517,4 +4521,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
4517
4521
|
//#endregion
|
|
4518
4522
|
export { gateOnDeliverable as C, serveCoordinationMcp as S, readRootStream as _, superviseWithTestBrain as a, composeReentryTask as b, resolveWorkerSpawnRetry as c, assertCoordinationBinding as d, coordinationProfileToolPrefix as f, ROOT_STREAM_FILE as g, supervisorAgentWithTestBrain as h, superviseRootProfile as i, retryPreSpawnRefusals as l, supervisorAgent as m, profileGuidanceComposer as n, workerFromBackend as o, resolveSupervisorProfile as p, supervise as r, isPreSpawnExecutorFailure as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, withWorkerSpawnRetry as u, readRootStreamReceipt as v, mapExecutorResult as w, createSupervisorSpanRecorder as x, UNPROVEN_CONTINUITY as y };
|
|
4519
4523
|
|
|
4520
|
-
//# sourceMappingURL=supervise-
|
|
4524
|
+
//# sourceMappingURL=supervise-PbqXJ2vC.js.map
|