@tangle-network/agent-runtime 0.156.0 → 0.158.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 (81) hide show
  1. package/dist/{activation-B4fRz8QL.js → activation-CLicee7D.js} +3 -3
  2. package/dist/{activation-B4fRz8QL.js.map → activation-CLicee7D.js.map} +1 -1
  3. package/dist/agent.d.ts +2 -2
  4. package/dist/agent.js +2 -2
  5. package/dist/analyst-loop.d.ts +1 -1
  6. package/dist/{authoring-C4uCoDmO.js → authoring-rIDPzwYY.js} +2 -2
  7. package/dist/{authoring-C4uCoDmO.js.map → authoring-rIDPzwYY.js.map} +1 -1
  8. package/dist/candidate-execution/index.js +4 -4
  9. package/dist/{candidate-execution-Ic92NMl9.js → candidate-execution-izJj02pU.js} +4 -4
  10. package/dist/{candidate-execution-Ic92NMl9.js.map → candidate-execution-izJj02pU.js.map} +1 -1
  11. package/dist/conversation.d.ts +1 -1
  12. package/dist/durable.d.ts +11 -8
  13. package/dist/durable.js +2 -4
  14. package/dist/durable.js.map +1 -1
  15. package/dist/{environment-provider-Dz9JB-X_.js → environment-provider-Bn3652YU.js} +2 -2
  16. package/dist/{environment-provider-Dz9JB-X_.js.map → environment-provider-Bn3652YU.js.map} +1 -1
  17. package/dist/{environment-provider-C_QI6VCG.d.ts → environment-provider-BobKk46F.d.ts} +3 -3
  18. package/dist/environment-provider.d.ts +1 -1
  19. package/dist/environment-provider.js +1 -1
  20. package/dist/{graph-BibNm6a-.js → graph-BGPO6z_u.js} +4 -3
  21. package/dist/graph-BGPO6z_u.js.map +1 -0
  22. package/dist/{improvement-cycle-g6RsxGbg.js → improvement-cycle-BEENaoCb.js} +11 -7
  23. package/dist/improvement-cycle-BEENaoCb.js.map +1 -0
  24. package/dist/{index-DPFUNEdU.d.ts → index-CLt9zpuD.d.ts} +3 -3
  25. package/dist/{index-B2A_KtAZ.d.ts → index-Dto3D25e.d.ts} +16 -12
  26. package/dist/{index-BYGBIxtx.d.ts → index-W5WVBUlZ.d.ts} +4 -4
  27. package/dist/index.d.ts +9 -9
  28. package/dist/index.js +11 -11
  29. package/dist/intelligence.d.ts +7 -11
  30. package/dist/intelligence.js +6 -6
  31. package/dist/intelligence.js.map +1 -1
  32. package/dist/kernel.d.ts +7 -7
  33. package/dist/kernel.js +8 -8
  34. package/dist/{knowledge-DeP-wG8l.js → knowledge-HDCUV1kZ.js} +5 -5
  35. package/dist/{knowledge-DeP-wG8l.js.map → knowledge-HDCUV1kZ.js.map} +1 -1
  36. package/dist/knowledge.d.ts +1 -1
  37. package/dist/knowledge.js +1 -1
  38. package/dist/{loop-runner-bin-9VUQihh7.d.ts → loop-runner-bin-BEzvqbgg.d.ts} +3 -3
  39. package/dist/{loop-runner-bin-LvaprzUz.js → loop-runner-bin-UNn0NLv2.js} +3 -3
  40. package/dist/{loop-runner-bin-LvaprzUz.js.map → loop-runner-bin-UNn0NLv2.js.map} +1 -1
  41. package/dist/loop-runner-bin.d.ts +1 -1
  42. package/dist/loop-runner-bin.js +1 -1
  43. package/dist/mcp/bin.js +3 -3
  44. package/dist/mcp/index.d.ts +6 -6
  45. package/dist/mcp/index.js +5 -5
  46. package/dist/mcp/index.js.map +1 -1
  47. package/dist/{openai-tools-CkSQJppW.js → openai-tools-D1VQ5e9p.js} +2 -2
  48. package/dist/{openai-tools-CkSQJppW.js.map → openai-tools-D1VQ5e9p.js.map} +1 -1
  49. package/dist/{openai-tools-z-whdYNC.d.ts → openai-tools-wkxQ2aEw.d.ts} +2 -2
  50. package/dist/{prepare-DcMjMdj-.js → prepare-VLGnSyav.js} +2 -2
  51. package/dist/{prepare-DcMjMdj-.js.map → prepare-VLGnSyav.js.map} +1 -1
  52. package/dist/primeintellect/index.d.ts +1 -1
  53. package/dist/profiles.d.ts +2 -166
  54. package/dist/{protected-model-port-BzUkspPP.js → protected-model-port-CcCH0Uji.js} +2 -2
  55. package/dist/{protected-model-port-BzUkspPP.js.map → protected-model-port-CcCH0Uji.js.map} +1 -1
  56. package/dist/{redact-BT7-mX8G.d.ts → redact-0AK8JmHW.d.ts} +13 -10
  57. package/dist/researcher-BMFFPwKb.js.map +1 -1
  58. package/dist/{runtime-DuueBLeO.d.ts → runtime-BzY66cd6.d.ts} +4 -4
  59. package/dist/{runtime-D-NDRp4y.js → runtime-CTs2JsG9.js} +8 -8
  60. package/dist/{runtime-D-NDRp4y.js.map → runtime-CTs2JsG9.js.map} +1 -1
  61. package/dist/{spawn-journal-duo0EkOp.js → spawn-journal-oewq1g2h.js} +1 -4
  62. package/dist/{spawn-journal-duo0EkOp.js.map → spawn-journal-oewq1g2h.js.map} +1 -1
  63. package/dist/{stream-agent-turn-BbcwWw_J.d.ts → stream-agent-turn-jaaFaSXM.d.ts} +3 -3
  64. package/dist/{structural-rollout-B1TocSdq.js → structural-rollout-Cj58xALQ.js} +3 -3
  65. package/dist/{structural-rollout-B1TocSdq.js.map → structural-rollout-Cj58xALQ.js.map} +1 -1
  66. package/dist/substrate-AJoT4HIz.d.ts +284 -0
  67. package/dist/{supervise-BVE0XAJa.js → supervise-CqwjiXlX.js} +3 -3
  68. package/dist/{supervise-BVE0XAJa.js.map → supervise-CqwjiXlX.js.map} +1 -1
  69. package/dist/{supervisor-BmXD0WCJ.js → supervisor-ZlQy5Fwl.js} +6 -33
  70. package/dist/supervisor-ZlQy5Fwl.js.map +1 -0
  71. package/dist/testing.d.ts +2 -2
  72. package/dist/testing.js +12 -12
  73. package/dist/{types-Cz5mCGlY.d.ts → types-BBXdSns1.d.ts} +8 -8
  74. package/dist/{types-DeX8ibLc.d.ts → types-DpdfZoQ3.d.ts} +6 -3
  75. package/dist/{workspace-archive-bugA3OwU.js → workspace-archive-BptlGCEU.js} +2 -2
  76. package/dist/{workspace-archive-bugA3OwU.js.map → workspace-archive-BptlGCEU.js.map} +1 -1
  77. package/package.json +3 -3
  78. package/dist/graph-BibNm6a-.js.map +0 -1
  79. package/dist/improvement-cycle-g6RsxGbg.js.map +0 -1
  80. package/dist/substrate-BcnuSHXm.d.ts +0 -117
  81. package/dist/supervisor-BmXD0WCJ.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { C as runtimeOwnedScopeOwnerRuntime, S as runtimeOwnedPendingExecutorMaterialization, T as unknownMaterializationReceipt, _ as runtimeOwnedDeferredExecutorRuntime, a as authoredProfileDigest, b as runtimeOwnedExecutorMaterialization, c as knownExecutionBindingReceipt, g as recordRuntimeOwnedProviderModel, h as recordRuntimeOwnedProviderIdentityConflict, l as knownMaterializationReceipt, m as recordRuntimeOwnedProviderDispatchNotStarted, n as attestRuntimeOwnedExecutor, o as finalizeRuntimeOwnedPendingExecutor, p as recordRuntimeOwnedProviderAttemptStart, r as attestRuntimeOwnedPendingExecutor, s as inheritRuntimeOwnedExecutorAttestation, t as attestRuntimeOwnedDeferredExecutor, u as newExecutionAttemptId, w as unknownExecutionBindingReceipt, x as runtimeOwnedExecutorProviderEvidence, y as runtimeOwnedExecutorExecutionBinding } from "./materialization-Ct3I4wu3.js";
2
2
  import { f as RuntimeRunStateError, m as ValidationError, r as BackendTransportError } from "./errors-CDZ8XsVj.js";
3
3
  import { n as detachedSnapshot } from "./snapshot-CTAf4uuA.js";
4
- import { _ as captureWorkerTraceEvidence, a as aggregateProviderModelEvidence, c as loadSpawnForest, d as replaySpawnTree, f as attestNestedDriverTreeOwner, h as runtimeOwnedNestedDriverTreeRoot, l as materializeTreeView, m as nestedDriverTreeRoot, o as closesCursorSlot, p as driverRuntime, u as pendingWaits, x as contentAddress } from "./spawn-journal-duo0EkOp.js";
4
+ import { _ as captureWorkerTraceEvidence, a as aggregateProviderModelEvidence, c as loadSpawnForest, d as replaySpawnTree, f as attestNestedDriverTreeOwner, h as runtimeOwnedNestedDriverTreeRoot, l as materializeTreeView, m as nestedDriverTreeRoot, o as closesCursorSlot, p as driverRuntime, u as pendingWaits, x as contentAddress } from "./spawn-journal-oewq1g2h.js";
5
5
  import { _ as unmeteredSpend, a as cloneTokenUsage, b as zeroTokenUsage, d as randomSuffix, f as randomUuid, g as throwIfAborted, h as throwAbort, l as mapWithConcurrency, m as stringifySafe, n as addTokenUsage, o as deleteBoxSafe, p as sleep, r as chargedTokens, s as hasCompleteCacheBreakdown, t as addSpend, u as promptCacheTokenClasses, v as withTimeout, y as zeroSpend } from "./util-D6ZEuBMi.js";
6
6
  import { c as notifySandboxEventObserver, i as extractLlmCallEvent, l as sandboxEventServedBackend, r as createSandboxToolPartState, s as mapSandboxToolEvent, t as assertSandboxServedModel, u as sandboxProgressEvents } from "./sandbox-events-BVjstFgb.js";
7
7
  import { n as executableAgentSpecSnapshot, r as projectSandboxOutcome, t as executableAgentProfileSnapshot } from "./executable-spec-7ovS7PBo.js";
8
8
  import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-Sw4ywhtL.js";
9
- import { c as linkAbort, i as resolveAgentEnvironmentProvider, l as runAbortable, n as providerAsExecutor, r as providerAsSandboxClient, s as abortError } from "./environment-provider-Dz9JB-X_.js";
9
+ import { c as linkAbort, i as resolveAgentEnvironmentProvider, l as runAbortable, n as providerAsExecutor, r as providerAsSandboxClient, s as abortError } from "./environment-provider-Bn3652YU.js";
10
10
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
11
- import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentTurnInputSchema, REASONING_EFFORTS, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema } from "@tangle-network/agent-interface";
11
+ import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentTurnInputSchema, REASONING_EFFORTS, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, harnessTypeSchema, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema } from "@tangle-network/agent-interface";
12
12
  import { estimateCost, isModelPriced } from "@tangle-network/agent-eval";
13
13
  import { createHash, randomBytes, randomUUID } from "node:crypto";
14
14
  import { basename, delimiter, dirname, isAbsolute, join, resolve, sep, win32 } from "node:path";
@@ -8832,7 +8832,8 @@ function assertBridgeProfileMaterialization(value, profile, wireModel) {
8832
8832
  const applied = reasoningEffort.applied;
8833
8833
  if (requested !== null && (typeof requested !== "string" || !REASONING_EFFORTS.includes(requested)) || applied !== null && (typeof applied !== "string" || applied.length === 0)) throw new ValidationError("bridgeExecutor: profile materialization receipt has invalid reasoning effort values");
8834
8834
  const expectedRequested = profile.model?.reasoningEffort ?? null;
8835
- const expectedApplied = expectedBridgeAppliedReasoning(raw.harness, expectedRequested);
8835
+ const receiptHarness = harnessTypeSchema.safeParse(raw.harness);
8836
+ const expectedApplied = receiptHarness.success ? nativeReasoningControl(receiptHarness.data, expectedRequested) : null;
8836
8837
  if (requested !== expectedRequested || applied !== expectedApplied) throw new ValidationError(`bridgeExecutor: bridge materialized reasoning effort ${JSON.stringify({
8837
8838
  requested,
8838
8839
  applied
@@ -8971,28 +8972,6 @@ function bridgeInferenceMoney(value, field) {
8971
8972
  if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be finite and nonnegative`);
8972
8973
  return value;
8973
8974
  }
8974
- /** Expected native control for the bridge backends that can emit the v2 acknowledgement. These
8975
- * mappings mirror the actual cli-bridge argv functions, so the acknowledgement is checked against
8976
- * what the process must have received rather than merely echoing the canonical request. */
8977
- function expectedBridgeAppliedReasoning(harness, requested) {
8978
- if (requested === null) return null;
8979
- switch (harness) {
8980
- case "pi":
8981
- if (requested === "none") return "off";
8982
- return requested === "ultracode" ? "xhigh" : requested;
8983
- case "claude-code":
8984
- if (requested === "none" || requested === "minimal") return "low";
8985
- return requested === "ultracode" ? "max" : requested;
8986
- case "codex":
8987
- if (requested === "none") return "minimal";
8988
- return requested === "xhigh" || requested === "ultracode" ? "high" : requested;
8989
- case "kimi-code":
8990
- if (requested === "medium") return null;
8991
- return requested === "none" || requested === "minimal" || requested === "low" ? "--no-thinking" : "--thinking";
8992
- case "gemini": return null;
8993
- default: return requested;
8994
- }
8995
- }
8996
8975
  /**
8997
8976
  * Decode the OpenAI-shaped `tool_calls` of one delta into the shared `ToolStepInput` currency,
8998
8977
  * through the SAME `decodeOpenAiPart` adapter the sandbox/parts trace source uses — the wire shape
@@ -11276,7 +11255,6 @@ function createScope(args) {
11276
11255
  kind: "down",
11277
11256
  reason: resolution.reason,
11278
11257
  infra: false,
11279
- restartCount: 0,
11280
11258
  trace: {
11281
11259
  status: "unavailable",
11282
11260
  reason: "not-an-executor"
@@ -11300,7 +11278,6 @@ function createScope(args) {
11300
11278
  kind: "down",
11301
11279
  reason: errMessage(err),
11302
11280
  infra: true,
11303
- restartCount: 0,
11304
11281
  trace: {
11305
11282
  status: "unavailable",
11306
11283
  reason: "not-an-executor"
@@ -11683,7 +11660,6 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
11683
11660
  reason: settlement.reason,
11684
11661
  infra: settlement.infra,
11685
11662
  spent: child.spent,
11686
- restartCount: settlement.restartCount,
11687
11663
  ...settledNodeEvidence(child, settlement, settledAt)
11688
11664
  }
11689
11665
  }, { signal: args.signal });
@@ -11692,7 +11668,6 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
11692
11668
  handle,
11693
11669
  reason: settlement.reason,
11694
11670
  infra: settlement.infra,
11695
- restartCount: settlement.restartCount,
11696
11671
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
11697
11672
  trace: settlement.trace,
11698
11673
  settledAt,
@@ -11795,7 +11770,6 @@ async function finalizeWait(child, settlement, seq, args, now, handle) {
11795
11770
  handle,
11796
11771
  reason: settlement.reason,
11797
11772
  infra: settlement.infra,
11798
- restartCount: settlement.restartCount,
11799
11773
  trace: settlement.trace,
11800
11774
  settledAt,
11801
11775
  seq
@@ -12161,7 +12135,6 @@ function downRecord(reason, infra, trace, metered, providerModel) {
12161
12135
  kind: "down",
12162
12136
  reason,
12163
12137
  infra,
12164
- restartCount: 0,
12165
12138
  trace,
12166
12139
  ...providerModel ? { providerModel } : {},
12167
12140
  ...metered ? { metered } : {}
@@ -13333,4 +13306,4 @@ function isNonEmptySpend(s) {
13333
13306
  //#endregion
13334
13307
  export { DEFAULT_STALL_AFTER_MS as $, LOCAL_HARNESSES as $t, createBudgetPool as A, buildLoopOtelSpans as At, createExecutorRegistry as B, padTraceId as Bt, effectiveConcurrency as C, canonicalObservedModel as Ct, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as D, readTraceContextFromEnv as Dt, rollingDispatch as E, mergeTraceEnv as Et, bridgeRuntimeAttachmentsKey as F, exportEvalRuns as Ft, workerTraceEnv as G, sanitizeKnowledgeReadinessReport as Gt, createWorktreeCliExecutor as H, createRuntimeEventCollector as Ht, bridgeStopSignalKey as I, flatOtelSpan as It, DEFAULT_SANDBOX_STEERING_MAX_TURNS as J, runWorktreeHarness as Jt, workerTraceHeaders as K, sanitizeRuntimeStreamEvent as Kt, captureReusableExecutorConfig as L, generateSpanId as Lt, bindReusableExecutorExecutionId as M, buildRuntimeEventOtelSpans as Mt, bridgeAdmissionRead as N, createOpenInferenceFileExporter as Nt, teardownExecutor as O, traceContextToEnv as Ot, bridgeModelRouteRefusal as P, createOtelExporter as Pt, sandboxSessionTraceSource as Q, DEFAULT_LOCAL_HARNESS as Qt, cliWorktreeExecutor as R, loopEventToOtelSpan as Rt, waitUntil as S, runBrainLoop as St, queueOf as T, createPropagatingTraceEmitter as Tt, WORKER_TRACE_PROPAGATION as U, createRuntimeStreamEventCollector as Ut, snapshotExecutorConfig as V, toOtelAttributes as Vt, readWorkerTraceContext as W, sanitizeAgentRuntimeEvent as Wt, createPushTraceSource as X, createWorktree as Xt, createSteerableSandboxSession as Y, captureWorktreeDiff as Yt, decodeToolPart as Z, removeWorktree as Zt, createWaitProbes as _, unsupportedProfileDimensions as _n, runAgentRounds as _t, pickBestDelivered as a, assertProfileMaterialization as an, PEER_MAIL_WIRE_KEY as at, timerAt as b, acquireSandbox as bt, driverChild as c, fullProfileMaterialization as cn, isPeerMailEnvelope as ct, deriveNodeExecutionIdentity as d, promptModelProfileMaterialization as dn, isLiveNodeStatus as dt, harnessSupportsReasoningEffort as en, createActivityLog as et, meterRuntimeOwnedAccounting as f, promptOnlyProfileMaterialization as fn, isTerminalNodeStatus as ft, settledToIteration as g, sandboxActProfileMaterialization as gn, isTerminalDecision as gt, scopeOwnerExecutorNodeContext as h, renderUnsupported as hn, defaultSelectWinner as ht, collectDelivered as i, AGENT_PROFILE_MATERIALIZATION_AXES as in, DEFAULT_PEER_MAIL_LIMITS as it, spendFromUsageEvents as j, buildLoopSpanNodes as jt, assertValidBudget as k, INTELLIGENCE_WIRE_VERSION as kt, withDriverExecutor as l, profileMaterializationAxes$1 as ln, peerMailTools as lt, recordScopeOwnerMaterialization as m, renderProfileMaterializationIssues as mn, createSandboxForSpec as mt, createSupervisor as n, parseCodexTokenUsage as nn, createInbox as nt, runFinalizer as o, controlProfileMaterialization as on, claimsAuthority as ot, meterRuntimeOwnedProviderAttempt as p, promptResourceProfileMaterialization as pn, TERMINAL_DECISIONS as pt, workerTraceSeamKey as q, runSettledCommand as qt, bestDelivered as r, CodexExecutionDiagnosticError as rn, AUTHORITY_MARKERS as rt, runTree as s, defineProfileMaterializationContract as sn, createPeerMailbox as st, createRootHandle as t, localHarnessExecutable as tn, readWorkerProgress as tt, createScope as u, promptControlProfileMaterialization as un, peerMailVerbNames as ut, isWaitOutcome as v, validateProfileMaterialization as vn, createSandboxLineage as vt, freeSlots as w, observedModelMatchesDeclared as wt, validateWaitSpec as x, routerBrain as xt, pollFor as y, worktreeCliProfileMaterialization as yn, probeSandboxCapabilities as yt, createExecutor as z, padSpanId as zt };
13335
13308
 
13336
- //# sourceMappingURL=supervisor-BmXD0WCJ.js.map
13309
+ //# sourceMappingURL=supervisor-ZlQy5Fwl.js.map