@tangle-network/agent-runtime 0.299.2 → 0.300.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 (55) hide show
  1. package/dist/{activation-BGqkZL87.d.ts → activation-Bhp8dYV5.d.ts} +3 -3
  2. package/dist/{activation-CLob-w1T.js → activation-DqWmWTyB.js} +2 -2
  3. package/dist/{activation-CLob-w1T.js.map → activation-DqWmWTyB.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-O9PYW2Bb.js → coordination-driver-DzTvehd6.js} +2 -2
  7. package/dist/{coordination-driver-O9PYW2Bb.js.map → coordination-driver-DzTvehd6.js.map} +1 -1
  8. package/dist/{delegate-nktZRhgx.js → delegate-vJ2g76r6.js} +2 -2
  9. package/dist/{delegate-nktZRhgx.js.map → delegate-vJ2g76r6.js.map} +1 -1
  10. package/dist/durable.d.ts +3 -3
  11. package/dist/durable.js +116 -4
  12. package/dist/durable.js.map +1 -1
  13. package/dist/{graph-BIWWAQF8.js → graph-BDQh3qry.js} +4 -4
  14. package/dist/{graph-BIWWAQF8.js.map → graph-BDQh3qry.js.map} +1 -1
  15. package/dist/{improvement-cycle-_MQW9ptH.js → improvement-cycle-D6cPLi6k.js} +3 -3
  16. package/dist/{improvement-cycle-_MQW9ptH.js.map → improvement-cycle-D6cPLi6k.js.map} +1 -1
  17. package/dist/{index-RwXPYXZH.d.ts → index-sC6sl88d.d.ts} +63 -8
  18. package/dist/index.d.ts +6 -6
  19. package/dist/index.js +7 -7
  20. package/dist/intelligence.d.ts +3 -3
  21. package/dist/intelligence.js +4 -4
  22. package/dist/kernel.d.ts +3 -3
  23. package/dist/kernel.js +8 -8
  24. package/dist/{loop-runner-bin-DtCA3qua.js → loop-runner-bin-DQIHnCL0.js} +3 -3
  25. package/dist/{loop-runner-bin-DtCA3qua.js.map → loop-runner-bin-DQIHnCL0.js.map} +1 -1
  26. package/dist/{loop-runner-bin-mEYBUzCJ.d.ts → loop-runner-bin-DZglq4Cf.d.ts} +3 -3
  27. package/dist/loop-runner-bin.d.ts +1 -1
  28. package/dist/loop-runner-bin.js +1 -1
  29. package/dist/mcp/bin.js +3 -3
  30. package/dist/mcp/index.d.ts +5 -5
  31. package/dist/mcp/index.js +4 -4
  32. package/dist/{openai-tools-DzpeoAdZ.d.ts → openai-tools-DvR82zEo.d.ts} +2 -2
  33. package/dist/profiles.d.ts +2 -2
  34. package/dist/{provision-supervisor-CBA6aKyc.js → provision-supervisor-IXBlLHE0.js} +3 -3
  35. package/dist/{provision-supervisor-CBA6aKyc.js.map → provision-supervisor-IXBlLHE0.js.map} +1 -1
  36. package/dist/{runtime-DjKjxuBo.js → runtime-DpEt5v42.js} +8 -8
  37. package/dist/{runtime-DjKjxuBo.js.map → runtime-DpEt5v42.js.map} +1 -1
  38. package/dist/{search-method-CJLzH52g.js → search-method-DvU-fc-f.js} +2 -2
  39. package/dist/{search-method-CJLzH52g.js.map → search-method-DvU-fc-f.js.map} +1 -1
  40. package/dist/{server-H6u1fPKW.js → server-CIE8s4AN.js} +3 -3
  41. package/dist/{server-H6u1fPKW.js.map → server-CIE8s4AN.js.map} +1 -1
  42. package/dist/{stream-agent-turn-D1yA1Mi6.d.ts → stream-agent-turn-I3bb0eqF.d.ts} +2 -2
  43. package/dist/{substrate-xLoDRRq5.d.ts → substrate-UjsxukjZ.d.ts} +2 -2
  44. package/dist/{supervise-BcKC74yr.js → supervise-C5mktzrh.js} +10 -8
  45. package/dist/supervise-C5mktzrh.js.map +1 -0
  46. package/dist/{supervisor-Ck9oX5A9.js → supervisor-CQSu5XGl.js} +51 -11
  47. package/dist/supervisor-CQSu5XGl.js.map +1 -0
  48. package/dist/testing.d.ts +2 -2
  49. package/dist/testing.js +12 -12
  50. package/dist/tui/index.d.ts +1 -1
  51. package/dist/tui/index.js +1 -1
  52. package/dist/{types-mghY5giJ.d.ts → types-C73caP0U.d.ts} +22 -10
  53. package/package.json +1 -1
  54. package/dist/supervise-BcKC74yr.js.map +0 -1
  55. package/dist/supervisor-Ck9oX5A9.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { $ as bindScopeRetainedOwnerProvider, $n as parseWorkerToolTraceArtifact, A as driverExecutorFactory, Aa as addResourceSpend, Ai as prepareJsonlAppend, An as resolveAgentEnvironmentProvider, Ar as contentAddress, At as createExecutor, B as recordScopeOwnerDriverAttempt, C as createContinuationKeeper, Ca as sleep, Cr as runAbortable, Da as unmeteredSpend, Dr as readHarnessTranscript, Dt as captureReusableExecutorConfig, Ei as unsupportedProfileDimensions, Er as persistHarnessTranscript, Et as bindReusableExecutorExecutionId, F as beginScopeOwnerAttempt, Gi as runtimeOwnedExecutorMaterialization, H as recordScopeOwnerPause, Hi as recordRuntimeOwnedDriveHarnessProviderEvidence, Hr as createOtelExporter, Ia as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, In as registerRetainedExecutorPreparation, It as createRouterTranscript, Ji as runtimeOwnedScopeOwnerRuntime, Jr as toOtelAttributes, Ki as runtimeOwnedExecutorProviderEvidence, L as deriveNodeExecutionIdentity, Li as inheritRuntimeOwnedExecutorAttestation, Ln as retainedExecutorSeamKey, Ma as withBudgetResources, Mt as snapshotExecutorConfig, Oa as withTimeout, Oi as worktreeCliProfileMaterialization, P as assertRecursiveReservationPolicy, Pi as attestRuntimeOwnedScopeOwner, Q as bindScopeRetainedOwnerEnvironmentId, R as meterRuntimeOwnedAccounting, Ra as teardownExecutor, Rt as WORKER_TRACE_PROPAGATION, Sr as linkAbort, U as restoreScopeOwnerAcceptedExecution, Ui as runtimeOwnedDriveHarnessProviderEvidence, V as recordScopeOwnerMaterialization, Vi as providerAttemptEvidence, W as scopeOwnerExecutorNodeContext, Wi as runtimeOwnedExecutorExecutionBinding, Wr as generateSpanId, _ as CheckUnavailableError, _i as fullProfileMaterialization, an as bridgeModelRouteRefusal, at as scopeRetainedOwnerPriorSpend, b as bestComposite, bi as promptModelProfileMaterialization, br as RunCancellationReason, c as runTree, ct as scopeRetainedOwnerResult, dn as bridgeStopSignalKey, ea as detachedSnapshot, et as consumeScopeRetainedOwnerResult, f as runDriverWithRetry, gi as defineProfileMaterializationContract, h as CONTINUATIONS_DIR, ha as addSpend, hi as controlProfileMaterialization, i as bestDelivered, in as bridgeAdmissionRefusal, ir as assertValidBudget, it as scopeRetainedOwnerContext, j as isDriverSpec, ja as resourceTelemetry, ji as readCommittedJsonLines, k as driverChild, ka as zeroSpend, ki as isNoEntError, lr as spendFromUsageTotals, mi as assertProfileMaterialization, n as createRootHandle, nt as prepareScopeRetainedOwnerTask, or as meterUsageEvent, ot as scopeRetainedOwnerResourceReader, p as summarizeDriverAttempts, qi as runtimeOwnedPendingExecutorMaterialization, qt as createInbox, r as createSupervisor, rt as reconcileScopeRetainedOwnerEnvironment, s as runFinalizer, sr as newUsageTotals, st as scopeRetainedOwnerRestorePoint, tr as executorFailure, tt as noteScopeRetainedOwnerCoordination, u as HarnessTurnFailedError, un as bridgeRuntimeAttachmentsKey, ur as errMessage, v as admitContinuationPolicy, vi as profileMaterializationAxes$1, wi as renderUnsupported, wn as routerBrain, x as checkVerdictOf, yi as promptControlProfileMaterialization, z as meterRuntimeOwnedProviderAttempt, za as teardownSurfaces } from "./supervisor-Ck9oX5A9.js";
1
+ import { $ as bindScopeRetainedOwnerProvider, $n as parseWorkerToolTraceArtifact, A as driverExecutorFactory, Aa as addResourceSpend, Ai as prepareJsonlAppend, An as resolveAgentEnvironmentProvider, Ar as contentAddress, At as createExecutor, B as recordScopeOwnerDriverAttempt, C as createContinuationKeeper, Ca as sleep, Cr as runAbortable, Da as unmeteredSpend, Dr as readHarnessTranscript, Dt as captureReusableExecutorConfig, Ei as unsupportedProfileDimensions, Er as persistHarnessTranscript, Et as bindReusableExecutorExecutionId, F as beginScopeOwnerAttempt, Gi as runtimeOwnedExecutorMaterialization, H as recordScopeOwnerPause, Hi as recordRuntimeOwnedDriveHarnessProviderEvidence, Hr as createOtelExporter, Ia as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, In as registerRetainedExecutorPreparation, It as createRouterTranscript, Ji as runtimeOwnedScopeOwnerRuntime, Jr as toOtelAttributes, Ki as runtimeOwnedExecutorProviderEvidence, L as deriveNodeExecutionIdentity, Li as inheritRuntimeOwnedExecutorAttestation, Ln as retainedExecutorSeamKey, Ma as withBudgetResources, Mt as snapshotExecutorConfig, Oa as withTimeout, Oi as worktreeCliProfileMaterialization, P as assertRecursiveReservationPolicy, Pi as attestRuntimeOwnedScopeOwner, Q as bindScopeRetainedOwnerEnvironmentId, R as meterRuntimeOwnedAccounting, Ra as teardownExecutor, Rt as WORKER_TRACE_PROPAGATION, Sr as linkAbort, U as restoreScopeOwnerAcceptedExecution, Ui as runtimeOwnedDriveHarnessProviderEvidence, V as recordScopeOwnerMaterialization, Vi as providerAttemptEvidence, W as scopeOwnerExecutorNodeContext, Wi as runtimeOwnedExecutorExecutionBinding, Wr as generateSpanId, _ as CheckUnavailableError, _i as fullProfileMaterialization, an as bridgeModelRouteRefusal, at as scopeRetainedOwnerPriorSpend, b as bestComposite, bi as promptModelProfileMaterialization, br as RunCancellationReason, c as runTree, ct as scopeRetainedOwnerResult, dn as bridgeStopSignalKey, ea as detachedSnapshot, et as consumeScopeRetainedOwnerResult, f as runDriverWithRetry, gi as defineProfileMaterializationContract, h as CONTINUATIONS_DIR, ha as addSpend, hi as controlProfileMaterialization, i as bestDelivered, in as bridgeAdmissionRefusal, ir as assertValidBudget, it as scopeRetainedOwnerContext, j as isDriverSpec, ja as resourceTelemetry, ji as readCommittedJsonLines, k as driverChild, ka as zeroSpend, ki as isNoEntError, lr as spendFromUsageTotals, mi as assertProfileMaterialization, n as createRootHandle, nt as prepareScopeRetainedOwnerTask, or as meterUsageEvent, ot as scopeRetainedOwnerResourceReader, p as summarizeDriverAttempts, qi as runtimeOwnedPendingExecutorMaterialization, qt as createInbox, r as createSupervisor, rt as reconcileScopeRetainedOwnerEnvironment, s as runFinalizer, sr as newUsageTotals, st as scopeRetainedOwnerRestorePoint, tr as executorFailure, tt as noteScopeRetainedOwnerCoordination, u as HarnessTurnFailedError, un as bridgeRuntimeAttachmentsKey, ur as errMessage, v as admitContinuationPolicy, vi as profileMaterializationAxes$1, wi as renderUnsupported, wn as routerBrain, x as checkVerdictOf, yi as promptControlProfileMaterialization, z as meterRuntimeOwnedProviderAttempt, za as teardownSurfaces } from "./supervisor-CQSu5XGl.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 { 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-O9PYW2Bb.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-DzTvehd6.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";
@@ -978,7 +978,7 @@ function createSupervisorSpanRecorder(opts) {
978
978
  if (!exporter) return void 0;
979
979
  const ownsExporter = opts.exporter === void 0;
980
980
  const now = opts.now ?? Date.now;
981
- const traceId = normalizeTraceId(opts.traceId, opts.runId);
981
+ const traceId = normalizeTraceId(opts.traceId, opts.runId, opts.namespace);
982
982
  const rootSpanId = generateSpanId();
983
983
  const rootStartMs = now();
984
984
  const base = {
@@ -1258,12 +1258,13 @@ function assignBudget(attrs, value) {
1258
1258
  }
1259
1259
  /**
1260
1260
  * A trace id must be 32 hex characters. A caller-supplied one is used verbatim when it already is;
1261
- * anything else (and the default) is DERIVED from the run id by content address — deterministic, so
1262
- * a resumed run rejoins the trace its first process opened rather than forking a new one.
1261
+ * anything else (and the default) is DERIVED by content address — deterministic, so a resumed run
1262
+ * rejoins the trace its first process opened rather than forking a new one. The default covers the
1263
+ * namespace as well as the run id, because run ids repeat across copies of a run.
1263
1264
  */
1264
- function normalizeTraceId(traceId, runId) {
1265
+ function normalizeTraceId(traceId, runId, namespace) {
1265
1266
  if (traceId && /^[0-9a-f]{32}$/i.test(traceId)) return traceId.toLowerCase();
1266
- return contentAddress(traceId ?? runId).slice(7, 39);
1267
+ return contentAddress(traceId ?? (namespace === void 0 ? runId : `${namespace}\u0000${runId}`)).slice(7, 39);
1267
1268
  }
1268
1269
  function msToNano(ms) {
1269
1270
  return (BigInt(Number.isFinite(ms) ? Math.floor(ms) : 0) * 1000000n).toString();
@@ -4473,6 +4474,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4473
4474
  });
4474
4475
  spans = options.otel ? createSupervisorSpanRecorder({
4475
4476
  runId,
4477
+ namespace: runNamespace,
4476
4478
  ...options.otel,
4477
4479
  now
4478
4480
  }) : void 0;
@@ -4586,4 +4588,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4586
4588
  //#endregion
4587
4589
  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 };
4588
4590
 
4589
- //# sourceMappingURL=supervise-BcKC74yr.js.map
4591
+ //# sourceMappingURL=supervise-C5mktzrh.js.map