@tangle-network/agent-runtime 0.198.1 → 0.198.2

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.
Files changed (47) hide show
  1. package/dist/{activation-CwdO0ml2.js → activation-IBEVN3VI.js} +2 -2
  2. package/dist/{activation-CwdO0ml2.js.map → activation-IBEVN3VI.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{coordination-driver-Cf638-6q.js → coordination-driver-NFvZ5ofi.js} +57 -23
  6. package/dist/coordination-driver-NFvZ5ofi.js.map +1 -0
  7. package/dist/{delegate-Bez07Dlh.js → delegate-dN5yooEj.js} +2 -2
  8. package/dist/{delegate-Bez07Dlh.js.map → delegate-dN5yooEj.js.map} +1 -1
  9. package/dist/durable.d.ts +1 -1
  10. package/dist/durable.js +2 -2
  11. package/dist/{graph-DBk3Unto.js → graph-CgCVtMuz.js} +3 -3
  12. package/dist/{graph-DBk3Unto.js.map → graph-CgCVtMuz.js.map} +1 -1
  13. package/dist/{improvement-cycle-Bma8TJs-.js → improvement-cycle-Cfu6kDOs.js} +3 -3
  14. package/dist/{improvement-cycle-Bma8TJs-.js.map → improvement-cycle-Cfu6kDOs.js.map} +1 -1
  15. package/dist/{index-D8LWK3Ha.d.ts → index-CMTUgh-T.d.ts} +4 -5
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.js +7 -7
  18. package/dist/intelligence.js +3 -3
  19. package/dist/kernel.d.ts +1 -1
  20. package/dist/kernel.js +8 -8
  21. package/dist/{loop-runner-bin-Bn-0o_4k.d.ts → loop-runner-bin-CAf1OQot.d.ts} +2 -2
  22. package/dist/{loop-runner-bin-Bd3dHQuw.js → loop-runner-bin-WQniYJ8C.js} +3 -3
  23. package/dist/{loop-runner-bin-Bd3dHQuw.js.map → loop-runner-bin-WQniYJ8C.js.map} +1 -1
  24. package/dist/loop-runner-bin.d.ts +1 -1
  25. package/dist/loop-runner-bin.js +1 -1
  26. package/dist/mcp/bin.js +3 -3
  27. package/dist/mcp/index.d.ts +1 -1
  28. package/dist/mcp/index.js +4 -4
  29. package/dist/{provision-supervisor-C97q5NN_.js → provision-supervisor-BxsIaJ35.js} +3 -3
  30. package/dist/{provision-supervisor-C97q5NN_.js.map → provision-supervisor-BxsIaJ35.js.map} +1 -1
  31. package/dist/{redact-CVyxp2AU.js → redact-DqfB7oB4.js} +2 -2
  32. package/dist/{redact-CVyxp2AU.js.map → redact-DqfB7oB4.js.map} +1 -1
  33. package/dist/{runtime-BrTBBSfC.js → runtime-CHEtvaTY.js} +8 -8
  34. package/dist/{runtime-BrTBBSfC.js.map → runtime-CHEtvaTY.js.map} +1 -1
  35. package/dist/{server-CO4bvAwe.js → server-ccGua5tH.js} +3 -3
  36. package/dist/{server-CO4bvAwe.js.map → server-ccGua5tH.js.map} +1 -1
  37. package/dist/{structural-rollout-D__lmWXe.js → structural-rollout-BmDuXyR9.js} +2 -2
  38. package/dist/{structural-rollout-D__lmWXe.js.map → structural-rollout-BmDuXyR9.js.map} +1 -1
  39. package/dist/{supervise-KSe4JEcg.js → supervise-DVt8-TI-.js} +9 -3
  40. package/dist/supervise-DVt8-TI-.js.map +1 -0
  41. package/dist/testing.d.ts +1 -1
  42. package/dist/testing.js +12 -12
  43. package/dist/tui/index.d.ts +1 -1
  44. package/dist/tui/index.js +1 -1
  45. package/package.json +1 -1
  46. package/dist/coordination-driver-Cf638-6q.js.map +0 -1
  47. package/dist/supervise-KSe4JEcg.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { $ as bridgeAdmissionRefusal, Ar as worktreeCliProfileMaterialization, Ct as createInbox, Er as renderUnsupported, Gn as createOtelExporter, Gr as runtimeOwnedDriveHarnessProviderEvidence, Ir as attestRuntimeOwnedScopeOwner, J as teardownExecutor, Jn as generateSpanId, Jr as runtimeOwnedExecutorProviderEvidence, Kr as runtimeOwnedExecutorExecutionBinding, On as unmeteredSpend, Or as unsupportedProfileDimensions, Q as bindReusableExecutorExecutionId, Qn as toOtelAttributes, Sr as promptModelProfileMaterialization, Ur as providerAttemptEvidence, Wr as recordRuntimeOwnedDriveHarnessProviderEvidence, Xr as runtimeOwnedScopeOwnerRuntime, Xt as contentAddress, Y as assertValidBudget, Yr as runtimeOwnedPendingExecutorMaterialization, Z as spendFromUsageEvents, _ as meterRuntimeOwnedProviderAttempt, _r as controlProfileMaterialization, a as createSupervisor, br as profileMaterializationAxes$1, ct as snapshotExecutorConfig, d as driverChild, et as bridgeModelRouteRefusal, g as meterRuntimeOwnedAccounting, gr as assertProfileMaterialization, h as deriveNodeExecutionIdentity, i as createRootHandle, kn as zeroSpend, l as runFinalizer, ni as detachedSnapshot, nt as bridgeStopSignalKey, o as bestDelivered, ot as createExecutor, p as beginScopeOwnerAttempt, q as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, qr as runtimeOwnedExecutorMaterialization, rt as captureReusableExecutorConfig, sn as routerBrain, tt as bridgeRuntimeAttachmentsKey, u as runTree, ut as WORKER_TRACE_PROPAGATION, v as recordScopeOwnerMaterialization, vr as defineProfileMaterializationContract, xr as promptControlProfileMaterialization, y as scopeOwnerExecutorNodeContext, yr as fullProfileMaterialization, zr as inheritRuntimeOwnedExecutorAttestation } from "./redact-CVyxp2AU.js";
1
+ import { $ as bridgeAdmissionRefusal, Ar as worktreeCliProfileMaterialization, Ct as createInbox, Er as renderUnsupported, Gn as createOtelExporter, Gr as runtimeOwnedDriveHarnessProviderEvidence, Ir as attestRuntimeOwnedScopeOwner, J as teardownExecutor, Jn as generateSpanId, Jr as runtimeOwnedExecutorProviderEvidence, Kr as runtimeOwnedExecutorExecutionBinding, On as unmeteredSpend, Or as unsupportedProfileDimensions, Q as bindReusableExecutorExecutionId, Qn as toOtelAttributes, Sr as promptModelProfileMaterialization, Ur as providerAttemptEvidence, Wr as recordRuntimeOwnedDriveHarnessProviderEvidence, Xr as runtimeOwnedScopeOwnerRuntime, Xt as contentAddress, Y as assertValidBudget, Yr as runtimeOwnedPendingExecutorMaterialization, Z as spendFromUsageEvents, _ as meterRuntimeOwnedProviderAttempt, _r as controlProfileMaterialization, a as createSupervisor, br as profileMaterializationAxes$1, ct as snapshotExecutorConfig, d as driverChild, et as bridgeModelRouteRefusal, g as meterRuntimeOwnedAccounting, gr as assertProfileMaterialization, h as deriveNodeExecutionIdentity, i as createRootHandle, kn as zeroSpend, l as runFinalizer, ni as detachedSnapshot, nt as bridgeStopSignalKey, o as bestDelivered, ot as createExecutor, p as beginScopeOwnerAttempt, q as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, qr as runtimeOwnedExecutorMaterialization, rt as captureReusableExecutorConfig, sn as routerBrain, tt as bridgeRuntimeAttachmentsKey, u as runTree, ut as WORKER_TRACE_PROPAGATION, v as recordScopeOwnerMaterialization, vr as defineProfileMaterializationContract, xr as promptControlProfileMaterialization, y as scopeOwnerExecutorNodeContext, yr as fullProfileMaterialization, zr as inheritRuntimeOwnedExecutorAttestation } from "./redact-DqfB7oB4.js";
2
2
  import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError, r as BackendTransportError, t as AgentEvalError } 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-DKDyr-fc.js";
4
4
  import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
5
- import { C as createCoordinationTools, M as createInMemoryRunContext, S as coordinationVerbNames, c as createProgressTracker, d as progressStop, j as createFileRunContext, r as driverAgent } from "./coordination-driver-Cf638-6q.js";
5
+ import { C as coordinationVerbNames, M as createFileRunContext, N as createInMemoryRunContext, c as createProgressTracker, d as progressStop, r as driverAgent, v as watchRunCancellation, w as createCoordinationTools } from "./coordination-driver-NFvZ5ofi.js";
6
6
  import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-B8I_LXN-.js";
7
7
  import { t as createStdioToolServer } from "./tool-server-BJbCPhoW.js";
8
8
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
@@ -1332,12 +1332,14 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1332
1332
  ledger = mcp;
1333
1333
  const coordinationTools = slot.descriptors();
1334
1334
  const providerProfile = detachedSnapshot(providerVisibleProfile(stableProfile), "supervisorAgent provider-visible profile");
1335
+ let cancellation;
1335
1336
  try {
1336
1337
  const recoveredSubmission = mcp.submittedResult();
1337
1338
  if (recoveredSubmission) {
1338
1339
  deps.onAcceptedSubmission?.(recoveredSubmission.result);
1339
1340
  return recoveredSubmission.result;
1340
1341
  }
1342
+ if (deps.controlDir !== void 0 && deps.abortRun !== void 0 && deps.controlScope !== "subtree") cancellation = watchRunCancellation(deps.controlDir, deps.abortRun);
1341
1343
  const baseTokensLeft = scope.budget.tokensLeft;
1342
1344
  const contractDeclared = deps.deliverable !== void 0;
1343
1345
  const maxReprompts = deps.repromptOnUnmet ?? 0;
@@ -1355,6 +1357,8 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1355
1357
  };
1356
1358
  await runDriverWithRetry({
1357
1359
  drive: async (attempt, reentry) => {
1360
+ cancellation?.check();
1361
+ scope.signal.throwIfAborted();
1358
1362
  beginScopeOwnerAttempt(scope, attempt);
1359
1363
  try {
1360
1364
  await driveHarness({
@@ -1385,6 +1389,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1385
1389
  } } : {},
1386
1390
  ...deps.onDriverAttempt ? { onAttempt: deps.onDriverAttempt } : {}
1387
1391
  });
1392
+ cancellation?.close();
1388
1393
  await mcp.drainResolved();
1389
1394
  const submitted = mcp.submittedResult();
1390
1395
  if (submitted) {
@@ -1398,6 +1403,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1398
1403
  budget: scope.budget
1399
1404
  });
1400
1405
  } finally {
1406
+ cancellation?.close();
1401
1407
  await mcp.close();
1402
1408
  }
1403
1409
  }
@@ -3059,4 +3065,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
3059
3065
  //#endregion
3060
3066
  export { serveCoordinationMcp as _, isPreSpawnExecutorFailure as a, mapExecutorResult as b, withWorkerSpawnRetry as c, resolveSupervisorProfile as d, supervisorAgent as f, defaultUnmetContractSteer as g, classifyDriverFailure as h, workerFromBackend as i, assertCoordinationBinding as l, DriverAttemptsExhaustedError as m, supervise as n, resolveWorkerSpawnRetry as o, supervisorAgentWithTestBrain as p, superviseWithTestBrain as r, retryPreSpawnRefusals as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, coordinationProfileToolPrefix as u, createSupervisorSpanRecorder as v, gateOnDeliverable as y };
3061
3067
 
3062
- //# sourceMappingURL=supervise-KSe4JEcg.js.map
3068
+ //# sourceMappingURL=supervise-DVt8-TI-.js.map