@tangle-network/agent-runtime 0.293.1 → 0.293.4

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 (38) hide show
  1. package/dist/{activation-DKZZAHVn.js → activation-BKz1t1Qb.js} +2 -2
  2. package/dist/{activation-DKZZAHVn.js.map → activation-BKz1t1Qb.js.map} +1 -1
  3. package/dist/agent.js +2 -2
  4. package/dist/{coordination-driver-LbUK3IMQ.js → coordination-driver-BpEJv7GR.js} +60 -6
  5. package/dist/coordination-driver-BpEJv7GR.js.map +1 -0
  6. package/dist/{delegate-CDuZlRT_.js → delegate-DEP51NR7.js} +2 -2
  7. package/dist/{delegate-CDuZlRT_.js.map → delegate-DEP51NR7.js.map} +1 -1
  8. package/dist/durable.js +2 -2
  9. package/dist/{graph-DSwixoKG.js → graph-oFWfYVpn.js} +4 -4
  10. package/dist/{graph-DSwixoKG.js.map → graph-oFWfYVpn.js.map} +1 -1
  11. package/dist/{improvement-cycle-BZTq2xAb.js → improvement-cycle-CBAuTq3p.js} +3 -3
  12. package/dist/{improvement-cycle-BZTq2xAb.js.map → improvement-cycle-CBAuTq3p.js.map} +1 -1
  13. package/dist/index.js +7 -7
  14. package/dist/intelligence.js +4 -4
  15. package/dist/kernel.js +8 -8
  16. package/dist/{loop-runner-bin-L71Va2It.js → loop-runner-bin-D5lBiaf5.js} +3 -3
  17. package/dist/{loop-runner-bin-L71Va2It.js.map → loop-runner-bin-D5lBiaf5.js.map} +1 -1
  18. package/dist/loop-runner-bin.js +1 -1
  19. package/dist/mcp/bin.js +3 -3
  20. package/dist/mcp/index.js +4 -4
  21. package/dist/{provision-supervisor-fe4drWIA.js → provision-supervisor-CIwZLCGR.js} +3 -3
  22. package/dist/{provision-supervisor-fe4drWIA.js.map → provision-supervisor-CIwZLCGR.js.map} +1 -1
  23. package/dist/{runtime-CPcPipCE.js → runtime-10G-vbmJ.js} +8 -8
  24. package/dist/{runtime-CPcPipCE.js.map → runtime-10G-vbmJ.js.map} +1 -1
  25. package/dist/{search-method-Cy7fHmsS.js → search-method-3EtnGKdL.js} +2 -2
  26. package/dist/{search-method-Cy7fHmsS.js.map → search-method-3EtnGKdL.js.map} +1 -1
  27. package/dist/{server-B4IYJBai.js → server-DgEDz4Rn.js} +3 -3
  28. package/dist/{server-B4IYJBai.js.map → server-DgEDz4Rn.js.map} +1 -1
  29. package/dist/{supervise-C7fKoVK8.js → supervise-Cu0yOTkc.js} +11 -7
  30. package/dist/supervise-Cu0yOTkc.js.map +1 -0
  31. package/dist/{supervisor-Ca4b5Lt7.js → supervisor-B-UbeBqD.js} +2 -4
  32. package/dist/{supervisor-Ca4b5Lt7.js.map → supervisor-B-UbeBqD.js.map} +1 -1
  33. package/dist/testing.js +12 -12
  34. package/dist/tui/index.js +1 -1
  35. package/package.json +1 -1
  36. package/skills/profile-authoring/SKILL.md +3 -0
  37. package/dist/coordination-driver-LbUK3IMQ.js.map +0 -1
  38. package/dist/supervise-C7fKoVK8.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { A as driverExecutorFactory, Aa as withBudgetResources, B as recordScopeOwnerDriverAttempt, Bi as recordRuntimeOwnedDriveHarnessProviderEvidence, Br as createOtelExporter, Bt as WORKER_TRACE_PROPAGATION, C as createContinuationKeeper, Cr as runAbortable, Da as zeroSpend, Di as isNoEntError, Dr as readHarnessTranscript, Ea as withTimeout, Ei as worktreeCliProfileMaterialization, En as routerBrain, Er as persistHarnessTranscript, F as beginScopeOwnerAttempt, Fi as inheritRuntimeOwnedExecutorAttestation, Gi as runtimeOwnedPendingExecutorMaterialization, H as recordScopeOwnerPause, Hi as runtimeOwnedExecutorExecutionBinding, Hr as generateSpanId, Ia as teardownExecutor, Ki as runtimeOwnedScopeOwnerRuntime, Kr as toOtelAttributes, L as deriveNodeExecutionIdentity, La as teardownSurfaces, Mi as attestRuntimeOwnedScopeOwner, Mn as resolveAgentEnvironmentProvider, Mt as createExecutor, Oa as addResourceSpend, Oi as prepareJsonlAppend, Or as contentAddress, Ot as bindReusableExecutorExecutionId, P as assertRecursiveReservationPolicy, Pa as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Pt as snapshotExecutorConfig, Qi as detachedSnapshot, R as meterRuntimeOwnedAccounting, Rn as registerRetainedExecutorPreparation, Rt as createRouterTranscript, Si as renderUnsupported, Sr as linkAbort, Ta as unmeteredSpend, U as restoreScopeOwnerAcceptedExecution, Ui as runtimeOwnedExecutorMaterialization, V as recordScopeOwnerMaterialization, Vi as runtimeOwnedDriveHarnessProviderEvidence, W as scopeOwnerExecutorNodeContext, Wi as runtimeOwnedExecutorProviderEvidence, Yt as createInbox, _ as CheckUnavailableError, _i as promptControlProfileMaterialization, at as reconcileScopeRetainedOwnerEnvironment, b as bestComposite, br as RunCancellationReason, c as runTree, cr as meterUsageEvent, ct as scopeRetainedOwnerResourceReader, dr as spendFromUsageTotals, et as bindScopeRetainedOwnerEnvironmentId, f as runDriverWithRetry, fi as assertProfileMaterialization, fn as bridgeRuntimeAttachmentsKey, fr as errMessage, gi as profileMaterializationAxes$1, h as CONTINUATIONS_DIR, hi as fullProfileMaterialization, i as bestDelivered, it as prepareScopeRetainedOwnerTask, j as isDriverSpec, k as driverChild, ka as resourceTelemetry, ki as readCommittedJsonLines, kt as captureReusableExecutorConfig, lr as newUsageTotals, lt as scopeRetainedOwnerRestorePoint, mi as defineProfileMaterializationContract, n as createRootHandle, nt as consumeScopeRetainedOwnerResult, on as bridgeAdmissionRefusal, or as assertValidBudget, ot as scopeRetainedOwnerContext, p as summarizeDriverAttempts, pa as addSpend, pi as controlProfileMaterialization, pn as bridgeStopSignalKey, r as createSupervisor, rr as executorFailure, rt as noteScopeRetainedOwnerCoordination, s as runFinalizer, sn as bridgeModelRouteRefusal, st as scopeRetainedOwnerPriorSpend, tr as parseWorkerToolTraceArtifact, tt as bindScopeRetainedOwnerProvider, u as HarnessTurnFailedError, ut as scopeRetainedOwnerResult, v as admitContinuationPolicy, vi as promptModelProfileMaterialization, wi as unsupportedProfileDimensions, x as checkVerdictOf, xa as sleep, z as meterRuntimeOwnedProviderAttempt, zi as providerAttemptEvidence, zn as retainedExecutorSeamKey } from "./supervisor-Ca4b5Lt7.js";
1
+ import { A as driverExecutorFactory, Aa as withBudgetResources, B as recordScopeOwnerDriverAttempt, Bi as recordRuntimeOwnedDriveHarnessProviderEvidence, Br as createOtelExporter, Bt as WORKER_TRACE_PROPAGATION, C as createContinuationKeeper, Cr as runAbortable, Da as zeroSpend, Di as isNoEntError, Dr as readHarnessTranscript, Ea as withTimeout, Ei as worktreeCliProfileMaterialization, En as routerBrain, Er as persistHarnessTranscript, F as beginScopeOwnerAttempt, Fi as inheritRuntimeOwnedExecutorAttestation, Gi as runtimeOwnedPendingExecutorMaterialization, H as recordScopeOwnerPause, Hi as runtimeOwnedExecutorExecutionBinding, Hr as generateSpanId, Ia as teardownExecutor, Ki as runtimeOwnedScopeOwnerRuntime, Kr as toOtelAttributes, L as deriveNodeExecutionIdentity, La as teardownSurfaces, Mi as attestRuntimeOwnedScopeOwner, Mn as resolveAgentEnvironmentProvider, Mt as createExecutor, Oa as addResourceSpend, Oi as prepareJsonlAppend, Or as contentAddress, Ot as bindReusableExecutorExecutionId, P as assertRecursiveReservationPolicy, Pa as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Pt as snapshotExecutorConfig, Qi as detachedSnapshot, R as meterRuntimeOwnedAccounting, Rn as registerRetainedExecutorPreparation, Rt as createRouterTranscript, Si as renderUnsupported, Sr as linkAbort, Ta as unmeteredSpend, U as restoreScopeOwnerAcceptedExecution, Ui as runtimeOwnedExecutorMaterialization, V as recordScopeOwnerMaterialization, Vi as runtimeOwnedDriveHarnessProviderEvidence, W as scopeOwnerExecutorNodeContext, Wi as runtimeOwnedExecutorProviderEvidence, Yt as createInbox, _ as CheckUnavailableError, _i as promptControlProfileMaterialization, at as reconcileScopeRetainedOwnerEnvironment, b as bestComposite, br as RunCancellationReason, c as runTree, cr as meterUsageEvent, ct as scopeRetainedOwnerResourceReader, dr as spendFromUsageTotals, et as bindScopeRetainedOwnerEnvironmentId, f as runDriverWithRetry, fi as assertProfileMaterialization, fn as bridgeRuntimeAttachmentsKey, fr as errMessage, gi as profileMaterializationAxes$1, h as CONTINUATIONS_DIR, hi as fullProfileMaterialization, i as bestDelivered, it as prepareScopeRetainedOwnerTask, j as isDriverSpec, k as driverChild, ka as resourceTelemetry, ki as readCommittedJsonLines, kt as captureReusableExecutorConfig, lr as newUsageTotals, lt as scopeRetainedOwnerRestorePoint, mi as defineProfileMaterializationContract, n as createRootHandle, nt as consumeScopeRetainedOwnerResult, on as bridgeAdmissionRefusal, or as assertValidBudget, ot as scopeRetainedOwnerContext, p as summarizeDriverAttempts, pa as addSpend, pi as controlProfileMaterialization, pn as bridgeStopSignalKey, r as createSupervisor, rr as executorFailure, rt as noteScopeRetainedOwnerCoordination, s as runFinalizer, sn as bridgeModelRouteRefusal, st as scopeRetainedOwnerPriorSpend, tr as parseWorkerToolTraceArtifact, tt as bindScopeRetainedOwnerProvider, u as HarnessTurnFailedError, ut as scopeRetainedOwnerResult, v as admitContinuationPolicy, vi as promptModelProfileMaterialization, wi as unsupportedProfileDimensions, x as checkVerdictOf, xa as sleep, z as meterRuntimeOwnedProviderAttempt, zi as providerAttemptEvidence, zn as retainedExecutorSeamKey } from "./supervisor-B-UbeBqD.js";
2
2
  import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
3
3
  import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutionSettings, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-DydyWTQg.js";
4
4
  import { n as assertNoSymlinkDescendant } from "./durable-file-DWQA4ooo.js";
5
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-LbUK3IMQ.js";
6
+ import { B as withCoordinationAwaitFence, C as applyRunCancellation, E as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, I as COORDINATION_CLIENT_TOOL_TIMEOUT_MS, L as MCP_TOOL_TIMEOUT_HEADER, R as declaredAwaitFenceMs, 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, z as declaredToolTimeoutMs } from "./coordination-driver-BpEJv7GR.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";
@@ -285,10 +285,12 @@ function coordinationHttpHandler(input) {
285
285
  active++;
286
286
  }
287
287
  admitted = true;
288
+ const declaredTimeoutMs = declaredToolTimeoutMs(req.headers[MCP_TOOL_TIMEOUT_HEADER]);
289
+ const declaredFenceMs = declaredTimeoutMs === void 0 ? void 0 : declaredAwaitFenceMs(declaredTimeoutMs);
288
290
  timer = setTimeout(() => {
289
291
  timedOut = true;
290
292
  reject(executing ? 504 : 408);
291
- }, limits.requestTimeoutMs);
293
+ }, Math.max(limits.requestTimeoutMs, declaredTimeoutMs ?? 0));
292
294
  timer.unref();
293
295
  let size = 0;
294
296
  const chunks = [];
@@ -338,7 +340,7 @@ function coordinationHttpHandler(input) {
338
340
  reject(authorization);
339
341
  return;
340
342
  }
341
- const response = await input.handle(message);
343
+ const response = await withCoordinationAwaitFence(declaredFenceMs, () => input.handle(message));
342
344
  if (!finished) respond(response === null ? 202 : 200, response ?? void 0);
343
345
  await audit(timedOut ? "completed-after-deadline" : "completed", timedOut ? 504 : response === null ? 202 : 200, action);
344
346
  } catch {
@@ -3134,7 +3136,8 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3134
3136
  const attachment = {
3135
3137
  transport: "http",
3136
3138
  url: coordinationMcpUrl,
3137
- ...coordinationMcpHeaders ? { headers: coordinationMcpHeaders } : {}
3139
+ ...coordinationMcpHeaders ? { headers: coordinationMcpHeaders } : {},
3140
+ metadata: { toolTimeoutMs: COORDINATION_CLIENT_TOOL_TIMEOUT_MS }
3138
3141
  };
3139
3142
  let factory = baseFactory;
3140
3143
  if (boundBackend.backend === "provider") {
@@ -3161,7 +3164,8 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3161
3164
  kind: "secret-ref",
3162
3165
  key: credentialName,
3163
3166
  format: "bearer"
3164
- } }
3167
+ } },
3168
+ metadata: { toolTimeoutMs: COORDINATION_CLIENT_TOOL_TIMEOUT_MS }
3165
3169
  }
3166
3170
  } }
3167
3171
  }
@@ -4543,4 +4547,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4543
4547
  //#endregion
4544
4548
  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 };
4545
4549
 
4546
- //# sourceMappingURL=supervise-C7fKoVK8.js.map
4550
+ //# sourceMappingURL=supervise-Cu0yOTkc.js.map