@tangle-network/agent-runtime 0.277.0 → 0.280.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-CbxhVtVV.js → activation-C97Cq4Q_.js} +2 -2
- package/dist/{activation-CbxhVtVV.js.map → activation-C97Cq4Q_.js.map} +1 -1
- package/dist/{activation-puw9_ahP.d.ts → activation-y-60DXF4.d.ts} +140 -105
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-ZfUf-H4H.js → coordination-driver-CraAV-22.js} +2 -2
- package/dist/{coordination-driver-ZfUf-H4H.js.map → coordination-driver-CraAV-22.js.map} +1 -1
- package/dist/{delegate-DXOyzIq0.js → delegate-W1Ws_Wp0.js} +2 -2
- package/dist/{delegate-DXOyzIq0.js.map → delegate-W1Ws_Wp0.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +2 -2
- package/dist/{graph-sGWwXC6E.js → graph-DlL_X4HX.js} +4 -4
- package/dist/{graph-sGWwXC6E.js.map → graph-DlL_X4HX.js.map} +1 -1
- package/dist/{improvement-cycle-DQyN0__A.js → improvement-cycle-DXMU-2Y4.js} +649 -213
- package/dist/improvement-cycle-DXMU-2Y4.js.map +1 -0
- package/dist/{index-CmAFFnsd.d.ts → index-Dm8SHDGW.d.ts} +9 -7
- package/dist/index.d.ts +9 -9
- package/dist/index.js +55 -14
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +3 -3
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-BTnEDWj3.js → loop-runner-bin-CT_-jSSg.js} +3 -3
- package/dist/{loop-runner-bin-BTnEDWj3.js.map → loop-runner-bin-CT_-jSSg.js.map} +1 -1
- package/dist/{loop-runner-bin-DGUASE9O.d.ts → loop-runner-bin-D6khQtoC.d.ts} +3 -3
- 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-Gc8p4PBq.d.ts → openai-tools-H8QPhTVE.d.ts} +2 -2
- package/dist/platform.d.ts +91 -1
- package/dist/platform.js +162 -6
- package/dist/platform.js.map +1 -1
- package/dist/profiles.d.ts +2 -2
- package/dist/{provision-supervisor-BgjtrTlv.js → provision-supervisor-BEmE95Mt.js} +3 -3
- package/dist/{provision-supervisor-BgjtrTlv.js.map → provision-supervisor-BEmE95Mt.js.map} +1 -1
- package/dist/{runtime-DoFvrisL.js → runtime-Du7j-nDD.js} +8 -8
- package/dist/{runtime-DoFvrisL.js.map → runtime-Du7j-nDD.js.map} +1 -1
- package/dist/{server-D2d83_iS.js → server-DZvGznAn.js} +3 -3
- package/dist/{server-D2d83_iS.js.map → server-DZvGznAn.js.map} +1 -1
- package/dist/{stream-agent-turn-BqU5Sfbw.d.ts → stream-agent-turn-Bk79CnTw.d.ts} +2 -2
- package/dist/{structural-rollout-VR-j5t9d.js → structural-rollout-Cl4TvomY.js} +2 -2
- package/dist/{structural-rollout-VR-j5t9d.js.map → structural-rollout-Cl4TvomY.js.map} +1 -1
- package/dist/{substrate-CfE3oUB9.d.ts → substrate-CHQ5GYnU.d.ts} +2 -2
- package/dist/{supervise-BoCOUAmr.js → supervise-CWrLq2-F.js} +25 -11
- package/dist/supervise-CWrLq2-F.js.map +1 -0
- package/dist/{supervisor-CjNbOcLO.js → supervisor-BXXjVCbW.js} +378 -110
- package/dist/supervisor-BXXjVCbW.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-CI7ve2sA.d.ts → types-D56jQad-.d.ts} +70 -59
- package/package.json +10 -7
- package/dist/improvement-cycle-DQyN0__A.js.map +0 -1
- package/dist/supervise-BoCOUAmr.js.map +0 -1
- package/dist/supervisor-CjNbOcLO.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ca as
|
|
1
|
+
import { Ca as Validator, Yi as AgentRunSpec, Zi as Driver, va as OutputAdapter } from "./types-D56jQad-.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-CHQ5GYnU.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as bindScopeRetainedOwnerProvider, $i as detachedSnapshot, A as driverExecutorFactory, Aa as resourceTelemetry, Ai as readCommittedJsonLines, At as
|
|
1
|
+
import { $ as bindScopeRetainedOwnerProvider, $i as detachedSnapshot, $t as parseWorkerToolTraceArtifact, A as driverExecutorFactory, Aa as resourceTelemetry, Ai as readCommittedJsonLines, An as bridgeAdmissionRefusal, At as createExecutor, B as recordScopeOwnerMaterialization, Bi as providerAttemptEvidence, Br as createOtelExporter, C as createContinuationKeeper, Cr as runAbortable, Da as withTimeout, Di as isNoEntError, Dr as readHarnessTranscript, Dt as captureReusableExecutorConfig, Ea as unmeteredSpend, Ei as worktreeCliProfileMaterialization, Er as persistHarnessTranscript, Et as bindReusableExecutorExecutionId, F as beginScopeOwnerAttempt, Fa as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Gi as runtimeOwnedExecutorProviderEvidence, H as restoreScopeOwnerAcceptedExecution, Hi as runtimeOwnedDriveHarnessProviderEvidence, Hr as generateSpanId, Ii as inheritRuntimeOwnedExecutorAttestation, In as bridgeRuntimeAttachmentsKey, It as createRouterTranscript, Jn as routerBrain, Ki as runtimeOwnedPendingExecutorMaterialization, Kr as toOtelAttributes, L as deriveNodeExecutionIdentity, La as teardownExecutor, Ln as bridgeStopSignalKey, Mt as snapshotExecutorConfig, Ni as attestRuntimeOwnedScopeOwner, Oa as zeroSpend, Or as contentAddress, P as assertRecursiveReservationPolicy, Q as bindScopeRetainedOwnerEnvironmentId, R as meterRuntimeOwnedAccounting, Ra as teardownSurfaces, Sa as sleep, Si as renderUnsupported, Sr as linkAbort, U as scopeOwnerExecutorNodeContext, Ui as runtimeOwnedExecutorExecutionBinding, V as recordScopeOwnerPause, Vi as recordRuntimeOwnedDriveHarnessProviderEvidence, Wi as runtimeOwnedExecutorMaterialization, _ as CheckUnavailableError, _i as promptControlProfileMaterialization, an as meterUsageEvent, at as scopeRetainedOwnerPriorSpend, b as bestComposite, br as RunCancellationReason, c as runTree, cn as spendFromUsageTotals, ct as scopeRetainedOwnerResult, dr as retainedExecutorSeamKey, et as consumeScopeRetainedOwnerResult, f as runDriverWithRetry, fi as assertProfileMaterialization, fr as errMessage, gi as profileMaterializationAxes$1, h as CONTINUATIONS_DIR, hi as fullProfileMaterialization, i as bestDelivered, it as scopeRetainedOwnerContext, j as isDriverSpec, ja as withBudgetResources, jn as bridgeModelRouteRefusal, k as driverChild, ka as addResourceSpend, ki as prepareJsonlAppend, kn as executorFailure, ln as WORKER_TRACE_PROPAGATION, ma as addSpend, mi as defineProfileMaterializationContract, n as createRootHandle, nt as prepareScopeRetainedOwnerTask, on as newUsageTotals, ot as scopeRetainedOwnerResourceReader, p as summarizeDriverAttempts, pi as controlProfileMaterialization, qi as runtimeOwnedScopeOwnerRuntime, r as createSupervisor, rn as assertValidBudget, rr as resolveAgentEnvironmentProvider, rt as reconcileScopeRetainedOwnerEnvironment, s as runFinalizer, st as scopeRetainedOwnerRestorePoint, tt as noteScopeRetainedOwnerCoordination, u as HarnessTurnFailedError, ur as registerRetainedExecutorPreparation, v as admitContinuationPolicy, vi as promptModelProfileMaterialization, vn as createInbox, wi as unsupportedProfileDimensions, x as checkVerdictOf, z as meterRuntimeOwnedProviderAttempt } from "./supervisor-BXXjVCbW.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
4
|
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
5
5
|
import { n as assertNoSymlinkDescendant } from "./durable-file-DWQA4ooo.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-
|
|
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-CraAV-22.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-vwd4SwX_.js";
|
|
9
9
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
|
|
@@ -746,7 +746,11 @@ async function serveCoordinationMcpForManager(opts, lifetime) {
|
|
|
746
746
|
options: opts,
|
|
747
747
|
identity,
|
|
748
748
|
toolNames: new Set(servedTools.map((tool) => tool.name)),
|
|
749
|
-
handle: (message) =>
|
|
749
|
+
handle: async (message) => {
|
|
750
|
+
const response = await mcp.handle(message);
|
|
751
|
+
if (message.method === "tools/call") noteScopeRetainedOwnerCoordination(opts.scope);
|
|
752
|
+
return response;
|
|
753
|
+
},
|
|
750
754
|
backgroundActions: () => nodeTools.background() + fencedVerbs.background(),
|
|
751
755
|
authorize: (req) => {
|
|
752
756
|
if (!paths.has(req.url ?? "")) return 404;
|
|
@@ -1312,6 +1316,7 @@ function composeReentryTask(input) {
|
|
|
1312
1316
|
"## What to do now",
|
|
1313
1317
|
"",
|
|
1314
1318
|
"Continue the run from this state.",
|
|
1319
|
+
...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."] : [],
|
|
1315
1320
|
"Receive the waiting events with await_event, and read the output of every settled worker before you spawn anything new.",
|
|
1316
1321
|
"Do not spawn a replacement for a worker that is running or has settled.",
|
|
1317
1322
|
"Your coordination tools are served by the same coordinator as before, and the state above comes from it."
|
|
@@ -1329,7 +1334,7 @@ function whyLine(reentry) {
|
|
|
1329
1334
|
}
|
|
1330
1335
|
function environmentLine(continuity) {
|
|
1331
1336
|
if (continuity.environment === "same") return `You run in the same environment as before${continuity.environmentId === void 0 ? "" : ` (${continuity.environmentId})`}, and your files are where you left them.`;
|
|
1332
|
-
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." : "Files you wrote there are not here. The coordinator and the knowledge store kept everything below.");
|
|
1337
|
+
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.");
|
|
1333
1338
|
return "You may be in a new environment. Check for files before you rely on them; the coordinator kept everything below.";
|
|
1334
1339
|
}
|
|
1335
1340
|
function stateLines(state, full) {
|
|
@@ -2216,6 +2221,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
2216
2221
|
};
|
|
2217
2222
|
const loopRecords = [];
|
|
2218
2223
|
let environmentReplacements = 0;
|
|
2224
|
+
let workspaceRestores = 0;
|
|
2219
2225
|
const describe = deps.deliverable?.describe;
|
|
2220
2226
|
const settleLoop = () => {
|
|
2221
2227
|
const stopReason = controls.stopReason() ?? progressStopReason;
|
|
@@ -2223,6 +2229,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
2223
2229
|
deps.onDriverLoopSettled?.({
|
|
2224
2230
|
...summarizeDriverAttempts(loopRecords),
|
|
2225
2231
|
environmentReplacements,
|
|
2232
|
+
workspaceRestores,
|
|
2226
2233
|
...closedBy === void 0 ? {} : { closedBy },
|
|
2227
2234
|
...stopReason === void 0 ? {} : { stopReason },
|
|
2228
2235
|
continuations: keeper?.entries() ?? []
|
|
@@ -2256,6 +2263,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
2256
2263
|
compose,
|
|
2257
2264
|
onContinuity: (continuity) => {
|
|
2258
2265
|
if (continuity.environment === "replaced") environmentReplacements += 1;
|
|
2266
|
+
if (continuity.workspace === "restored") workspaceRestores += 1;
|
|
2259
2267
|
}
|
|
2260
2268
|
} },
|
|
2261
2269
|
scope,
|
|
@@ -3475,12 +3483,18 @@ async function reentryContinuity(backend, scope, retainedOwner) {
|
|
|
3475
3483
|
environmentId: environment.environmentId,
|
|
3476
3484
|
workspace: "kept"
|
|
3477
3485
|
};
|
|
3478
|
-
if (environment.state === "lost")
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3486
|
+
if (environment.state === "lost") {
|
|
3487
|
+
const restorePoint = await scopeRetainedOwnerRestorePoint(scope);
|
|
3488
|
+
return {
|
|
3489
|
+
session: "new",
|
|
3490
|
+
environment: "replaced",
|
|
3491
|
+
previousEnvironmentId: environment.environmentId,
|
|
3492
|
+
...restorePoint === void 0 ? { workspace: "lost" } : {
|
|
3493
|
+
workspace: "restored",
|
|
3494
|
+
checkpointAt: restorePoint.takenAt
|
|
3495
|
+
}
|
|
3496
|
+
};
|
|
3497
|
+
}
|
|
3484
3498
|
return UNPROVEN_CONTINUITY;
|
|
3485
3499
|
}
|
|
3486
3500
|
function isAsyncIterable(value) {
|
|
@@ -4502,4 +4516,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
4502
4516
|
//#endregion
|
|
4503
4517
|
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 };
|
|
4504
4518
|
|
|
4505
|
-
//# sourceMappingURL=supervise-
|
|
4519
|
+
//# sourceMappingURL=supervise-CWrLq2-F.js.map
|