@tangle-network/agent-runtime 0.262.0 → 0.264.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 (54) hide show
  1. package/dist/{activation-CozZXBTg.d.ts → activation-Bx4kfVU3.d.ts} +2 -2
  2. package/dist/{activation-C0AoYRgS.js → activation-DHFdvps3.js} +2 -2
  3. package/dist/{activation-C0AoYRgS.js.map → activation-DHFdvps3.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-COGC8FK2.js → coordination-driver-Bz-H17bC.js} +2 -2
  7. package/dist/{coordination-driver-COGC8FK2.js.map → coordination-driver-Bz-H17bC.js.map} +1 -1
  8. package/dist/{delegate-BC7Au73v.js → delegate-CwbWhX5W.js} +2 -2
  9. package/dist/{delegate-BC7Au73v.js.map → delegate-CwbWhX5W.js.map} +1 -1
  10. package/dist/durable.d.ts +2 -2
  11. package/dist/durable.js +2 -2
  12. package/dist/{graph-DgODOGWN.js → graph-5NrpTg0h.js} +3 -3
  13. package/dist/{graph-DgODOGWN.js.map → graph-5NrpTg0h.js.map} +1 -1
  14. package/dist/{improvement-cycle-DirqO-fX.js → improvement-cycle-WRWcFyuO.js} +3 -3
  15. package/dist/{improvement-cycle-DirqO-fX.js.map → improvement-cycle-WRWcFyuO.js.map} +1 -1
  16. package/dist/{index-B8tXCisZ.d.ts → index-9wXpbjbX.d.ts} +6 -4
  17. package/dist/index.d.ts +6 -6
  18. package/dist/index.js +7 -7
  19. package/dist/intelligence.d.ts +3 -3
  20. package/dist/intelligence.js +3 -3
  21. package/dist/kernel.d.ts +4 -4
  22. package/dist/kernel.js +9 -9
  23. package/dist/{loop-runner-bin-C9P1ELVv.js → loop-runner-bin-DC1Lm0nM.js} +3 -3
  24. package/dist/{loop-runner-bin-C9P1ELVv.js.map → loop-runner-bin-DC1Lm0nM.js.map} +1 -1
  25. package/dist/{loop-runner-bin-BaZd1XIm.d.ts → loop-runner-bin-DPewOZMn.d.ts} +3 -3
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/mcp/bin.js +3 -3
  29. package/dist/mcp/index.d.ts +5 -5
  30. package/dist/mcp/index.js +4 -4
  31. package/dist/{openai-tools-CHwN_S24.d.ts → openai-tools-ByTMUJcD.d.ts} +2 -2
  32. package/dist/profiles.d.ts +2 -2
  33. package/dist/{provision-supervisor-9FMwo-Es.js → provision-supervisor-BZ6_uBGR.js} +3 -3
  34. package/dist/{provision-supervisor-9FMwo-Es.js.map → provision-supervisor-BZ6_uBGR.js.map} +1 -1
  35. package/dist/{runtime-BXWVW51r.js → runtime-CUZC75EX.js} +8 -8
  36. package/dist/{runtime-BXWVW51r.js.map → runtime-CUZC75EX.js.map} +1 -1
  37. package/dist/{server-6g6KFwUC.js → server-KpdpN627.js} +3 -3
  38. package/dist/{server-6g6KFwUC.js.map → server-KpdpN627.js.map} +1 -1
  39. package/dist/{stream-agent-turn-u28hoxuR.d.ts → stream-agent-turn-D1zelVx6.d.ts} +2 -2
  40. package/dist/{structural-rollout-WEfWpjub.js → structural-rollout-D17I5CwF.js} +2 -2
  41. package/dist/{structural-rollout-WEfWpjub.js.map → structural-rollout-D17I5CwF.js.map} +1 -1
  42. package/dist/{substrate-BeQiXkpa.d.ts → substrate-qQphD9f0.d.ts} +2 -2
  43. package/dist/{supervise-BeAI8-On.js → supervise-_DTVHXPC.js} +18 -4
  44. package/dist/supervise-_DTVHXPC.js.map +1 -0
  45. package/dist/{supervisor-BGGvnXvV.js → supervisor-C26k7X5-.js} +184 -22
  46. package/dist/supervisor-C26k7X5-.js.map +1 -0
  47. package/dist/testing.d.ts +2 -2
  48. package/dist/testing.js +12 -12
  49. package/dist/tui/index.d.ts +1 -1
  50. package/dist/tui/index.js +1 -1
  51. package/dist/{types-CP3iQ8Ji.d.ts → types-BV14WTyW.d.ts} +81 -10
  52. package/package.json +2 -2
  53. package/dist/supervise-BeAI8-On.js.map +0 -1
  54. package/dist/supervisor-BGGvnXvV.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Ci as Driver, Wi as OutputAdapter, Yi as Validator, xi as AgentRunSpec } from "./types-CP3iQ8Ji.js";
1
+ import { Ci as AgentRunSpec, Ki as OutputAdapter, Ti as Driver, Zi as Validator } from "./types-BV14WTyW.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-BeQiXkpa.d.ts.map
284
+ //# sourceMappingURL=substrate-qQphD9f0.d.ts.map
@@ -1,10 +1,10 @@
1
- import { B as scopeRetainedOwnerContext, Bn as retainedExecutorSeamKey, Br as assertProfileMaterialization, Bt as spendFromUsageTotals, C as meterRuntimeOwnedAccounting, D as scopeOwnerExecutorNodeContext, Di as detachedSnapshot, E as restoreScopeOwnerAcceptedExecution, En as routerBrain, F as bindScopeRetainedOwnerEnvironmentId, Ft as assertValidBudget, Gr as promptControlProfileMaterialization, H as scopeRetainedOwnerResourceReader, Hi as addSpend, Hr as defineProfileMaterializationContract, I as bindScopeRetainedOwnerProvider, Jn as RunCancellationReason, Kr as promptModelProfileMaterialization, L as consumeScopeRetainedOwnerResult, Lt as meterUsageEvent, Pn as resolveAgentEnvironmentProvider, Qr as unsupportedProfileDimensions, R as prepareScopeRetainedOwnerTask, Rt as newUsageTotals, S as deriveNodeExecutionIdentity, T as recordScopeOwnerMaterialization, U as scopeRetainedOwnerResult, Ur as fullProfileMaterialization, V as scopeRetainedOwnerPriorSpend, Vr as controlProfileMaterialization, Vt as WORKER_TRACE_PROPAGATION, Wr as profileMaterializationAxes$1, Xi as sleep, Xn as linkAbort, Xr as renderUnsupported, Xt as createInbox, Zn as runAbortable, _ as isDriverSpec, _i as runtimeOwnedExecutorExecutionBinding, _r as generateSpanId, aa as withBudgetResources, b as beginScopeOwnerAttempt, bi as runtimeOwnedPendingExecutorMaterialization, cn as bridgeAdmissionRefusal, da as teardownExecutor, ea as unmeteredSpend, ei as worktreeCliProfileMaterialization, f as defaultUnmetContractSteer, fa as teardownSurfaces, g as driverExecutorFactory, gi as runtimeOwnedDriveHarnessProviderEvidence, h as driverChild, hi as recordRuntimeOwnedDriveHarnessProviderEvidence, hn as bridgeStopSignalKey, ht as snapshotExecutorConfig, ia as resourceTelemetry, ii as readCommittedJsonLines, ir as contentAddress, it as errMessage, la as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, ln as bridgeModelRouteRefusal, lt as bindReusableExecutorExecutionId, m as summarizeDriverAttempts, mi as providerAttemptEvidence, mn as bridgeRuntimeAttachmentsKey, mr as createOtelExporter, n as createSupervisor, na as zeroSpend, o as runFinalizer, p as runDriverWithRetry, pt as createExecutor, r as bestDelivered, ra as addResourceSpend, ri as prepareJsonlAppend, s as runTree, si as attestRuntimeOwnedScopeOwner, sn as executorFailure, t as createRootHandle, ta as withTimeout, ti as isNoEntError, u as HarnessTurnFailedError, ui as inheritRuntimeOwnedExecutorAttestation, ut as captureReusableExecutorConfig, vi as runtimeOwnedExecutorMaterialization, w as meterRuntimeOwnedProviderAttempt, xi as runtimeOwnedScopeOwnerRuntime, xr as toOtelAttributes, y as assertRecursiveReservationPolicy, yi as runtimeOwnedExecutorProviderEvidence, z as reconcileScopeRetainedOwnerEnvironment, zn as registerRetainedExecutorPreparation } from "./supervisor-BGGvnXvV.js";
1
+ import { $n as runAbortable, B as prepareScopeRetainedOwnerTask, Bt as newUsageTotals, C as deriveNodeExecutionIdentity, Ci as runtimeOwnedScopeOwnerRuntime, Cr as toOtelAttributes, D as recordScopeOwnerPause, E as recordScopeOwnerMaterialization, G as scopeRetainedOwnerResult, Gr as fullProfileMaterialization, H as scopeRetainedOwnerContext, Hn as retainedExecutorSeamKey, Hr as assertProfileMaterialization, Ht as spendFromUsageTotals, In as resolveAgentEnvironmentProvider, Jr as promptModelProfileMaterialization, Kr as profileMaterializationAxes$1, L as bindScopeRetainedOwnerEnvironmentId, Lt as assertValidBudget, O as restoreScopeOwnerAcceptedExecution, On as routerBrain, Qi as sleep, Qn as linkAbort, Qr as renderUnsupported, Qt as createInbox, R as bindScopeRetainedOwnerProvider, Si as runtimeOwnedPendingExecutorMaterialization, T as meterRuntimeOwnedProviderAttempt, U as scopeRetainedOwnerPriorSpend, Ur as controlProfileMaterialization, Ut as WORKER_TRACE_PROPAGATION, V as reconcileScopeRetainedOwnerEnvironment, Vn as registerRetainedExecutorPreparation, W as scopeRetainedOwnerResourceReader, Wi as addSpend, Wr as defineProfileMaterializationContract, Xn as RunCancellationReason, _ as driverExecutorFactory, _i as recordRuntimeOwnedDriveHarnessProviderEvidence, _n as bridgeStopSignalKey, _t as snapshotExecutorConfig, aa as addResourceSpend, ai as prepareJsonlAppend, b as assertRecursiveReservationPolicy, bi as runtimeOwnedExecutorMaterialization, da as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, dn as bridgeModelRouteRefusal, dt as bindReusableExecutorExecutionId, ei as unsupportedProfileDimensions, f as defaultUnmetContractSteer, fi as inheritRuntimeOwnedExecutorAttestation, ft as captureReusableExecutorConfig, g as driverChild, gi as providerAttemptEvidence, gn as bridgeRuntimeAttachmentsKey, gr as createOtelExporter, ht as createExecutor, ia as zeroSpend, k as scopeOwnerExecutorNodeContext, ki as detachedSnapshot, li as attestRuntimeOwnedScopeOwner, ln as executorFailure, m as summarizeDriverAttempts, ma as teardownSurfaces, n as createSupervisor, na as unmeteredSpend, ni as worktreeCliProfileMaterialization, o as runFinalizer, oa as resourceTelemetry, oi as readCommittedJsonLines, or as contentAddress, ot as errMessage, p as runDriverWithRetry, pa as teardownExecutor, qr as promptControlProfileMaterialization, r as bestDelivered, ra as withTimeout, ri as isNoEntError, s as runTree, sa as withBudgetResources, t as createRootHandle, u as HarnessTurnFailedError, un as bridgeAdmissionRefusal, v as isDriverSpec, vi as runtimeOwnedDriveHarnessProviderEvidence, w as meterRuntimeOwnedAccounting, x as beginScopeOwnerAttempt, xi as runtimeOwnedExecutorProviderEvidence, yi as runtimeOwnedExecutorExecutionBinding, yr as generateSpanId, z as consumeScopeRetainedOwnerResult, zt as meterUsageEvent } from "./supervisor-C26k7X5-.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
6
  import { n as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-x9NEhvHZ.js";
7
- 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-COGC8FK2.js";
7
+ 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-Bz-H17bC.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";
@@ -1284,7 +1284,8 @@ function composeReentryTask(input) {
1284
1284
  * only what to continue, spent all forty-five on the research.
1285
1285
  */
1286
1286
  function whyLine(reentry) {
1287
- return reentry.reason === "unmet-contract" ? `Your previous turn ended with the completion check unmet (re-prompt ${reentry.reprompt}).` : `Your previous turn ended before it finished (retry ${reentry.retry}); the run itself is intact.`;
1287
+ if (reentry.reason === "unmet-contract") return `Your previous turn ended with the completion check unmet (re-prompt ${reentry.reprompt}).`;
1288
+ return reentry.reason === "upstream-unavailable" ? "Your previous turn was interrupted before it finished; the run itself is intact." : `Your previous turn ended before it finished (retry ${reentry.retry}); the run itself is intact.`;
1288
1289
  }
1289
1290
  function environmentLine(continuity) {
1290
1291
  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.`;
@@ -1839,6 +1840,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1839
1840
  } } : {},
1840
1841
  traceSource: () => driveHarness.traceSource?.(),
1841
1842
  progress: () => driveHarness.progress?.(),
1843
+ ...driveHarness.harnessTranscript ? { harnessTranscript: () => driveHarness.harnessTranscript?.() } : {},
1842
1844
  async act(task, scope) {
1843
1845
  const context = nodeContextSeed ? supervisorNodeContext(nodeContextSeed, stableProfile, task, scope) : void 0;
1844
1846
  const priorCoordination = deps.loadPriorCoordination ? await deps.loadPriorCoordination() : deps.priorCoordination;
@@ -2034,6 +2036,14 @@ function buildSupervisorAgent(profile, deps, testBrain) {
2034
2036
  } } : {},
2035
2037
  onAttempt: async (record) => {
2036
2038
  loopRecords.push(record);
2039
+ if (record.classification === "unavailable" && record.retryInMs !== void 0) await recordScopeOwnerPause(scope, {
2040
+ attempt: record.attempt,
2041
+ signal: record.unavailableSignal ?? "unavailable",
2042
+ cause: record.error ?? "",
2043
+ attemptMs: record.durationMs,
2044
+ pauseMs: record.retryInMs,
2045
+ madeProgress: record.madeProgress
2046
+ });
2037
2047
  await deps.onDriverAttempt?.(record);
2038
2048
  }
2039
2049
  });
@@ -2764,6 +2774,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
2764
2774
  const baseFactory = createExecutor(boundBackend);
2765
2775
  const ownerRuntime = boundBackend.backend === "provider" ? boundBackend.runtime ?? resolveAgentEnvironmentProvider(boundBackend.provider, boundBackend.registry).name : "cli";
2766
2776
  let activeExecutor;
2777
+ let managerTranscript;
2767
2778
  const drive = async ({ profile, authoredProfile, task, scope, coordinationMcpUrl, coordinationMcpHeaders, stopSignal, coordinationTools, reentry }) => {
2768
2779
  const retainedOwner = boundBackend.backend === "provider" ? scopeRetainedOwnerContext(scope) : void 0;
2769
2780
  if (retainedOwner && boundBackend.backend === "provider") {
@@ -3127,6 +3138,8 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3127
3138
  failure = error;
3128
3139
  }
3129
3140
  }
3141
+ const capture = executor.harnessTranscript?.();
3142
+ if (capture !== void 0 && (capture.status === "captured" || managerTranscript?.status !== "captured")) managerTranscript = capture;
3130
3143
  if (activeExecutor === executor) activeExecutor = void 0;
3131
3144
  }
3132
3145
  if (failed) throw failure;
@@ -3140,6 +3153,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3140
3153
  drive.deliverReady = () => activeExecutor !== void 0;
3141
3154
  drive.traceSource = () => activeExecutor?.traceSource?.();
3142
3155
  drive.progress = () => activeExecutor?.progress?.();
3156
+ if (boundBackend.backend === "provider") drive.harnessTranscript = () => managerTranscript ?? activeExecutor?.harnessTranscript?.();
3143
3157
  return attestRuntimeOwnedScopeOwner(drive, ownerRuntime);
3144
3158
  }
3145
3159
  /**
@@ -4126,4 +4140,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4126
4140
  //#endregion
4127
4141
  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 };
4128
4142
 
4129
- //# sourceMappingURL=supervise-BeAI8-On.js.map
4143
+ //# sourceMappingURL=supervise-_DTVHXPC.js.map