@tangle-network/agent-runtime 0.266.0 → 0.271.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.
Files changed (66) hide show
  1. package/dist/{activation-VpxSbDKJ.d.ts → activation-BrJmwTLB.d.ts} +4 -4
  2. package/dist/{activation-BERiJjx5.js → activation-DGbFPGR3.js} +2 -2
  3. package/dist/{activation-BERiJjx5.js.map → activation-DGbFPGR3.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-DdZ-nh_4.js → coordination-driver-iBGMKDvB.js} +20 -14
  7. package/dist/coordination-driver-iBGMKDvB.js.map +1 -0
  8. package/dist/{delegate-Ajx_PVyu.js → delegate-DOqUvaIz.js} +2 -2
  9. package/dist/{delegate-Ajx_PVyu.js.map → delegate-DOqUvaIz.js.map} +1 -1
  10. package/dist/durable.d.ts +5 -4
  11. package/dist/durable.js +3 -3
  12. package/dist/durable.js.map +1 -1
  13. package/dist/{graph-CK50N9vG.js → graph-DnMcepkN.js} +8 -5
  14. package/dist/graph-DnMcepkN.js.map +1 -0
  15. package/dist/{improvement-cycle-GRPoHLm1.js → improvement-cycle-1IyRJo5h.js} +9 -9
  16. package/dist/improvement-cycle-1IyRJo5h.js.map +1 -0
  17. package/dist/{index-CU2mlMfc.d.ts → index-CL1dduJd.d.ts} +70 -6
  18. package/dist/index.d.ts +7 -7
  19. package/dist/index.js +7 -7
  20. package/dist/intelligence.d.ts +9 -3
  21. package/dist/intelligence.js +11 -5
  22. package/dist/intelligence.js.map +1 -1
  23. package/dist/kernel.d.ts +4 -4
  24. package/dist/kernel.js +9 -9
  25. package/dist/{loop-runner-bin-cC16EPUq.js → loop-runner-bin-BPZ9tt1W.js} +3 -3
  26. package/dist/{loop-runner-bin-cC16EPUq.js.map → loop-runner-bin-BPZ9tt1W.js.map} +1 -1
  27. package/dist/{loop-runner-bin-XKZXM08Q.d.ts → loop-runner-bin-O_vM1w8Y.d.ts} +3 -3
  28. package/dist/loop-runner-bin.d.ts +1 -1
  29. package/dist/loop-runner-bin.js +1 -1
  30. package/dist/mcp/bin.js +3 -3
  31. package/dist/mcp/index.d.ts +12 -6
  32. package/dist/mcp/index.js +7 -7
  33. package/dist/mcp/memory-bin.js +1 -1
  34. package/dist/{memory-server-Cn8LbAxO.js → memory-server-DXQ8IxGR.js} +2 -2
  35. package/dist/{memory-server-Cn8LbAxO.js.map → memory-server-DXQ8IxGR.js.map} +1 -1
  36. package/dist/{openai-tools-D3ajI_D2.d.ts → openai-tools-DWHxpwx2.d.ts} +2 -2
  37. package/dist/profiles.d.ts +2 -2
  38. package/dist/{provision-supervisor-Bf_bPaCv.js → provision-supervisor-Cy8pqE95.js} +3 -3
  39. package/dist/{provision-supervisor-Bf_bPaCv.js.map → provision-supervisor-Cy8pqE95.js.map} +1 -1
  40. package/dist/{runtime-hOLlAc1i.js → runtime-DVjIH1eo.js} +233 -11
  41. package/dist/runtime-DVjIH1eo.js.map +1 -0
  42. package/dist/{server-DOb67ohd.js → server-CN9vzbSe.js} +4 -4
  43. package/dist/{server-DOb67ohd.js.map → server-CN9vzbSe.js.map} +1 -1
  44. package/dist/{stream-agent-turn-Gw9hLpBn.d.ts → stream-agent-turn-DbEsKgb_.d.ts} +21 -3
  45. package/dist/{structural-rollout-DV9YoQF6.js → structural-rollout-I92sIfNl.js} +2 -2
  46. package/dist/{structural-rollout-DV9YoQF6.js.map → structural-rollout-I92sIfNl.js.map} +1 -1
  47. package/dist/{substrate-CLt9S9ym.d.ts → substrate-CbC03Vzo.d.ts} +2 -2
  48. package/dist/{supervise--njTtSL3.js → supervise-DJ_1i9vj.js} +13 -8
  49. package/dist/{supervise--njTtSL3.js.map → supervise-DJ_1i9vj.js.map} +1 -1
  50. package/dist/{supervisor-B8UMAXya.js → supervisor-Cvd5mf7x.js} +285 -86
  51. package/dist/supervisor-Cvd5mf7x.js.map +1 -0
  52. package/dist/testing.d.ts +2 -2
  53. package/dist/testing.js +14 -14
  54. package/dist/testing.js.map +1 -1
  55. package/dist/{tool-server-x9NEhvHZ.js → tool-server-Dqer2M4_.js} +30 -12
  56. package/dist/tool-server-Dqer2M4_.js.map +1 -0
  57. package/dist/tui/index.d.ts +1 -1
  58. package/dist/tui/index.js +1 -1
  59. package/dist/{types-CrnwLVYQ.d.ts → types-Bo7z5aG5.d.ts} +109 -43
  60. package/package.json +2 -1
  61. package/dist/coordination-driver-DdZ-nh_4.js.map +0 -1
  62. package/dist/graph-CK50N9vG.js.map +0 -1
  63. package/dist/improvement-cycle-GRPoHLm1.js.map +0 -1
  64. package/dist/runtime-hOLlAc1i.js.map +0 -1
  65. package/dist/supervisor-B8UMAXya.js.map +0 -1
  66. package/dist/tool-server-x9NEhvHZ.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Fi as Driver, Ni as AgentRunSpec, na as OutputAdapter, sa as Validator } from "./types-CrnwLVYQ.js";
1
+ import { Ii as Driver, Pi as AgentRunSpec, ca as Validator, ra as OutputAdapter } from "./types-Bo7z5aG5.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-CLt9S9ym.d.ts.map
284
+ //# sourceMappingURL=substrate-CbC03Vzo.d.ts.map
@@ -1,10 +1,10 @@
1
- import { $r as profileMaterializationAxes$1, A as restoreScopeOwnerAcceptedExecution, Ai as runtimeOwnedScopeOwnerRuntime, An as routerBrain, B as bindScopeRetainedOwnerEnvironmentId, C as beginScopeOwnerAttempt, Ci as providerAttemptEvidence, D as meterRuntimeOwnedProviderAttempt, Di as runtimeOwnedExecutorMaterialization, E as meterRuntimeOwnedAccounting, Ei as runtimeOwnedExecutorExecutionBinding, G as scopeRetainedOwnerContext, Gt as WORKER_TRACE_PROPAGATION, H as consumeScopeRetainedOwnerResult, Ht as newUsageTotals, Ii as detachedSnapshot, J as scopeRetainedOwnerResult, Jn as errMessage, K as scopeRetainedOwnerPriorSpend, Kn as registerRetainedExecutorPreparation, O as recordScopeOwnerMaterialization, Oi as runtimeOwnedExecutorProviderEvidence, Qr as fullProfileMaterialization, S as assertRecursiveReservationPolicy, Sr as createOtelExporter, T as deriveNodeExecutionIdentity, Ti as runtimeOwnedDriveHarnessProviderEvidence, Tr as generateSpanId, U as prepareScopeRetainedOwnerTask, V as bindScopeRetainedOwnerProvider, Vt as meterUsageEvent, W as reconcileScopeRetainedOwnerEnvironment, Wt as spendFromUsageTotals, Xr as controlProfileMaterialization, Yr as assertProfileMaterialization, Zi as addSpend, Zr as defineProfileMaterializationContract, _ as driverChild, aa as sleep, ai as renderUnsupported, ar as runAbortable, ba as teardownExecutor, c as runTree, d as HarnessTurnFailedError, da as zeroSpend, dn as executorFailure, ei as promptControlProfileMaterialization, en as createInbox, fa as addResourceSpend, fi as prepareJsonlAppend, fn as bridgeAdmissionRefusal, fr as contentAddress, ft as bindReusableExecutorExecutionId, gi as attestRuntimeOwnedScopeOwner, gt as createExecutor, h as summarizeDriverAttempts, i as bestDelivered, ir as linkAbort, j as scopeOwnerExecutorNodeContext, k as recordScopeOwnerPause, ki as runtimeOwnedPendingExecutorMaterialization, kr as toOtelAttributes, la as unmeteredSpend, li as worktreeCliProfileMaterialization, m as runDriverWithRetry, ma as withBudgetResources, n as createRootHandle, nr as RunCancellationReason, p as defaultUnmetContractSteer, pa as resourceTelemetry, pi as readCommittedJsonLines, pn as bridgeModelRouteRefusal, pt as captureReusableExecutorConfig, q as scopeRetainedOwnerResourceReader, qn as retainedExecutorSeamKey, r as createSupervisor, s as runFinalizer, si as unsupportedProfileDimensions, ti as promptModelProfileMaterialization, ua as withTimeout, ui as isNoEntError, v as driverExecutorFactory, va as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, vn as bridgeRuntimeAttachmentsKey, vt as snapshotExecutorConfig, wi as recordRuntimeOwnedDriveHarnessProviderEvidence, xa as teardownSurfaces, y as isDriverSpec, yi as inheritRuntimeOwnedExecutorAttestation, yn as bridgeStopSignalKey, zn as resolveAgentEnvironmentProvider, zt as assertValidBudget } from "./supervisor-B8UMAXya.js";
1
+ import { $r as controlProfileMaterialization, A as restoreScopeOwnerAcceptedExecution, Ai as runtimeOwnedExecutorMaterialization, B as bindScopeRetainedOwnerEnvironmentId, C as beginScopeOwnerAttempt, Ca as teardownExecutor, D as meterRuntimeOwnedProviderAttempt, Di as recordRuntimeOwnedDriveHarnessProviderEvidence, E as meterRuntimeOwnedAccounting, Ei as providerAttemptEvidence, G as scopeRetainedOwnerContext, Gt as newUsageTotals, H as consumeScopeRetainedOwnerResult, Hn as resolveAgentEnvironmentProvider, Ht as assertValidBudget, J as scopeRetainedOwnerResult, Jt as WORKER_TRACE_PROPAGATION, K as scopeRetainedOwnerPriorSpend, Mi as runtimeOwnedPendingExecutorMaterialization, Mr as toOtelAttributes, Ni as runtimeOwnedScopeOwnerRuntime, Nn as routerBrain, O as recordScopeOwnerMaterialization, Oi as runtimeOwnedDriveHarnessProviderEvidence, Or as generateSpanId, Qr as assertProfileMaterialization, S as assertRecursiveReservationPolicy, Si as inheritRuntimeOwnedExecutorAttestation, Sn as bridgeStopSignalKey, T as deriveNodeExecutionIdentity, Tr as createOtelExporter, U as prepareScopeRetainedOwnerTask, V as bindScopeRetainedOwnerProvider, W as reconcileScopeRetainedOwnerEnvironment, Wt as meterUsageEvent, Xn as retainedExecutorSeamKey, Yn as registerRetainedExecutorPreparation, Zn as errMessage, _ as driverChild, _a as withBudgetResources, ar as RunCancellationReason, c as runTree, ca as sleep, ci as renderUnsupported, cr as runAbortable, d as HarnessTurnFailedError, ea as addSpend, ei as defineProfileMaterializationContract, fa as unmeteredSpend, fi as worktreeCliProfileMaterialization, ft as bindReusableExecutorExecutionId, ga as resourceTelemetry, gi as readCommittedJsonLines, gn as bridgeModelRouteRefusal, gt as createExecutor, h as summarizeDriverAttempts, ha as addResourceSpend, hi as prepareJsonlAppend, hn as bridgeAdmissionRefusal, hr as contentAddress, i as bestDelivered, ii as promptModelProfileMaterialization, j as scopeOwnerExecutorNodeContext, ji as runtimeOwnedExecutorProviderEvidence, k as recordScopeOwnerPause, ki as runtimeOwnedExecutorExecutionBinding, m as runDriverWithRetry, ma as zeroSpend, mn as executorFailure, n as createRootHandle, ni as profileMaterializationAxes$1, p as defaultUnmetContractSteer, pa as withTimeout, pi as isNoEntError, pt as captureReusableExecutorConfig, q as scopeRetainedOwnerResourceReader, qt as spendFromUsageTotals, r as createSupervisor, ri as promptControlProfileMaterialization, rn as createInbox, s as runFinalizer, sr as linkAbort, ti as fullProfileMaterialization, ui as unsupportedProfileDimensions, v as driverExecutorFactory, vt as snapshotExecutorConfig, wa as teardownSurfaces, xa as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, xn as bridgeRuntimeAttachmentsKey, y as isDriverSpec, yi as attestRuntimeOwnedScopeOwner, zi as detachedSnapshot } from "./supervisor-Cvd5mf7x.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 { D as coordinationVerbNames, S as watchRunCancellation, c as createProgressTracker, d as progressStop, k as createCoordinationToolsForManager, n as createSteerAcknowledger, r as driverAgent, t as createCancelAcknowledger, v as createFileRunContext, w as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, x as applyRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-DdZ-nh_4.js";
7
- import { n as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-x9NEhvHZ.js";
6
+ import { D as coordinationVerbNames, S as watchRunCancellation, c as createProgressTracker, d as progressStop, k as createCoordinationToolsForManager, n as createSteerAcknowledger, r as driverAgent, t as createCancelAcknowledger, v as createFileRunContext, w as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, x as applyRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-iBGMKDvB.js";
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";
10
10
  import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
@@ -3337,6 +3337,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
3337
3337
  "rootHandle",
3338
3338
  "router",
3339
3339
  "runDir",
3340
+ "resume",
3340
3341
  "runId",
3341
3342
  "signal",
3342
3343
  "stallAfterMs",
@@ -3348,7 +3349,8 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
3348
3349
  "onUnmetContract",
3349
3350
  "workerRetry",
3350
3351
  "onWorkerRetry",
3351
- "workerSlots"
3352
+ "workerSlots",
3353
+ "recoverExecutor"
3352
3354
  ]);
3353
3355
  /**
3354
3356
  * Refuse a top-level option key `supervise()` reads nowhere, naming it.
@@ -3388,6 +3390,7 @@ Object.freeze([...[
3388
3390
  "onProgressStop",
3389
3391
  "onUnmetContract",
3390
3392
  "onWorkerRetry",
3393
+ "recoverExecutor",
3391
3394
  "resolveDeliverable",
3392
3395
  "resolveDriveHarness",
3393
3396
  "resolveSpawnProfile",
@@ -3425,7 +3428,7 @@ function rootSpawnResourceRoot(backend) {
3425
3428
  }
3426
3429
  function captureSuperviseOptions(opts) {
3427
3430
  assertSuperviseOptionKeys(opts, "supervise");
3428
- const { backend, coordination, driverBackend, deliverable, resolveDeliverable, router, compaction, watchWorkers, analysts, makeWorkerAgent, makeLeafAgent, resolveSpawnProfile, blobs, journal, probes, registry, hooks, otel, authorizeSpawn, authorizeMessage, driveHarness, resolveDriveHarness, resolveSupervisorTools, escalateQuestion, onCoordinationEvent, executeExtraTool, stopRule, onProgressStop, onDriverAttempt, onUnmetContract, workerRetry, onWorkerRetry, finalizer, now, signal, rootHandle, workerSlots, ...decisionData } = opts;
3431
+ const { backend, coordination, driverBackend, deliverable, resolveDeliverable, router, compaction, watchWorkers, analysts, makeWorkerAgent, makeLeafAgent, recoverExecutor, resume, resolveSpawnProfile, blobs, journal, probes, registry, hooks, otel, authorizeSpawn, authorizeMessage, driveHarness, resolveDriveHarness, resolveSupervisorTools, escalateQuestion, onCoordinationEvent, executeExtraTool, stopRule, onProgressStop, onDriverAttempt, onUnmetContract, workerRetry, onWorkerRetry, finalizer, now, signal, rootHandle, workerSlots, ...decisionData } = opts;
3429
3432
  assertNoUncapturedExecutableOption(decisionData);
3430
3433
  const capturedData = detachedSnapshot(decisionData, "supervise options");
3431
3434
  const capturedCoordination = coordination === void 0 ? void 0 : (() => {
@@ -3486,9 +3489,11 @@ function captureSuperviseOptions(opts) {
3486
3489
  ...capturedAnalysts === void 0 ? {} : { analysts: capturedAnalysts },
3487
3490
  ...makeWorkerAgent === void 0 ? {} : { makeWorkerAgent },
3488
3491
  ...makeLeafAgent === void 0 ? {} : { makeLeafAgent },
3492
+ ...recoverExecutor === void 0 ? {} : { recoverExecutor },
3489
3493
  ...resolveSpawnProfile === void 0 ? {} : { resolveSpawnProfile },
3490
3494
  ...blobs === void 0 ? {} : { blobs },
3491
3495
  ...journal === void 0 ? {} : { journal },
3496
+ ...resume === void 0 ? {} : { resume },
3492
3497
  ...workerSlots === void 0 ? {} : { workerSlots },
3493
3498
  ...probes === void 0 ? {} : { probes },
3494
3499
  ...authorizeSpawn === void 0 ? {} : { authorizeSpawn },
@@ -4099,7 +4104,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4099
4104
  journal,
4100
4105
  blobs,
4101
4106
  executors: ctx.executors,
4102
- ...recoveryFactories.get(workerFactory) ? { recoverExecutor: recoveryFactories.get(workerFactory) } : {},
4107
+ ...options.recoverExecutor ?? recoveryFactories.get(workerFactory) ? { recoverExecutor: options.recoverExecutor ?? recoveryFactories.get(workerFactory) } : {},
4103
4108
  rootIdentity: rootExecution.identity,
4104
4109
  ...rootOwnerRuntime === void 0 ? {} : { rootMaterialization: {
4105
4110
  runtime: rootOwnerRuntime,
@@ -4114,7 +4119,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4114
4119
  ...options.workerSlots !== void 0 ? { workerSlots: options.workerSlots } : {},
4115
4120
  ...options.reservationPolicy ? { reservationPolicy: options.reservationPolicy } : {},
4116
4121
  ...probes ? { probes } : {},
4117
- ...ctx.resume === true ? { resume: true } : {},
4122
+ ...ctx.resume === true || options.runDir === void 0 && options.resume === true ? { resume: true } : {},
4118
4123
  ...options.now ? { now: options.now } : {},
4119
4124
  signal: options.signal ? AbortSignal.any([options.signal, durableCancellation.signal]) : durableCancellation.signal,
4120
4125
  ...hooks ? { hooks } : {},
@@ -4190,4 +4195,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4190
4195
  //#endregion
4191
4196
  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 };
4192
4197
 
4193
- //# sourceMappingURL=supervise--njTtSL3.js.map
4198
+ //# sourceMappingURL=supervise-DJ_1i9vj.js.map