@tangle-network/agent-runtime 0.308.0 → 0.311.2

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 (68) hide show
  1. package/dist/{activation-5Usfsfzr.d.ts → activation-BxR-Im_k.d.ts} +3 -3
  2. package/dist/{activation-DbnacUhI.js → activation-Dvl9gE_g.js} +3 -3
  3. package/dist/{activation-DbnacUhI.js.map → activation-Dvl9gE_g.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{bundle-E6mbRX2P.js → bundle-BK3XBY6q.js} +2 -2
  7. package/dist/{bundle-E6mbRX2P.js.map → bundle-BK3XBY6q.js.map} +1 -1
  8. package/dist/candidate-execution/index.js +5 -5
  9. package/dist/{coordination-driver-BYIjecHz.js → coordination-driver-CIfgl4Yj.js} +3 -3
  10. package/dist/{coordination-driver-BYIjecHz.js.map → coordination-driver-CIfgl4Yj.js.map} +1 -1
  11. package/dist/{delegate-KCK7WdZv.js → delegate-05Ddb4_L.js} +2 -2
  12. package/dist/{delegate-KCK7WdZv.js.map → delegate-05Ddb4_L.js.map} +1 -1
  13. package/dist/durable.d.ts +2 -2
  14. package/dist/durable.js +4 -4
  15. package/dist/{graph-BUu0KQVW.js → graph-BNVGyp1P.js} +6 -4
  16. package/dist/graph-BNVGyp1P.js.map +1 -0
  17. package/dist/{improvement-cycle-BylwWCcl.js → improvement-cycle-Ig1_rWAw.js} +6 -6
  18. package/dist/{improvement-cycle-BylwWCcl.js.map → improvement-cycle-Ig1_rWAw.js.map} +1 -1
  19. package/dist/{index-EibbsKsH.d.ts → index-B0c5PmmO.d.ts} +27 -6
  20. package/dist/index.d.ts +6 -6
  21. package/dist/index.js +9 -9
  22. package/dist/intelligence.d.ts +3 -3
  23. package/dist/intelligence.js +7 -7
  24. package/dist/kernel.d.ts +4 -4
  25. package/dist/kernel.js +10 -9
  26. package/dist/{loop-runner-bin-DcF6ZEWi.js → loop-runner-bin-Beh7PECB.js} +3 -3
  27. package/dist/{loop-runner-bin-DcF6ZEWi.js.map → loop-runner-bin-Beh7PECB.js.map} +1 -1
  28. package/dist/{loop-runner-bin-jST1hm-z.d.ts → loop-runner-bin-drXESgaI.d.ts} +3 -3
  29. package/dist/loop-runner-bin.d.ts +1 -1
  30. package/dist/loop-runner-bin.js +1 -1
  31. package/dist/mcp/bin.js +3 -3
  32. package/dist/mcp/index.d.ts +5 -5
  33. package/dist/mcp/index.js +5 -5
  34. package/dist/{openai-tools-BuFqhp5i.d.ts → openai-tools-CJHfmFzg.d.ts} +2 -2
  35. package/dist/{prepare-CulUz6Wm.js → prepare-8A1CAWG8.js} +3 -3
  36. package/dist/{prepare-CulUz6Wm.js.map → prepare-8A1CAWG8.js.map} +1 -1
  37. package/dist/{profile-DY9lT3gH.js → profile-BhQShsM1.js} +2 -2
  38. package/dist/{profile-DY9lT3gH.js.map → profile-BhQShsM1.js.map} +1 -1
  39. package/dist/profiles.d.ts +1 -1
  40. package/dist/{protected-model-port-BT2iYAsU.js → protected-model-port-ug52OmvB.js} +4 -4
  41. package/dist/{protected-model-port-BT2iYAsU.js.map → protected-model-port-ug52OmvB.js.map} +1 -1
  42. package/dist/{provision-supervisor-Cvp4Nm-y.js → provision-supervisor-CfKlAMTb.js} +4 -4
  43. package/dist/{provision-supervisor-Cvp4Nm-y.js.map → provision-supervisor-CfKlAMTb.js.map} +1 -1
  44. package/dist/{runtime-Y46Lwt_d.js → runtime-DsnHqwNx.js} +9 -9
  45. package/dist/{runtime-Y46Lwt_d.js.map → runtime-DsnHqwNx.js.map} +1 -1
  46. package/dist/{search-executor-BPpfxu9c.js → search-executor-BNLvgp0X.js} +3 -3
  47. package/dist/{search-executor-BPpfxu9c.js.map → search-executor-BNLvgp0X.js.map} +1 -1
  48. package/dist/{server-DIrQYUnn.js → server-Bx4d5imQ.js} +4 -4
  49. package/dist/{server-DIrQYUnn.js.map → server-Bx4d5imQ.js.map} +1 -1
  50. package/dist/{stream-agent-turn-op3m9IEY.d.ts → stream-agent-turn-fd2XzrTv.d.ts} +2 -2
  51. package/dist/{substrate-B1VzcyoB.d.ts → substrate-GW6LFx4A.d.ts} +2 -2
  52. package/dist/{supervise-CmeN8ipv.js → supervise-D6MgxpMI.js} +35 -6
  53. package/dist/supervise-D6MgxpMI.js.map +1 -0
  54. package/dist/{supervisor-CSMb8HBU.js → supervisor-WYRLsCp1.js} +75 -9
  55. package/dist/supervisor-WYRLsCp1.js.map +1 -0
  56. package/dist/testing.d.ts +2 -2
  57. package/dist/testing.js +14 -14
  58. package/dist/tui/index.d.ts +1 -1
  59. package/dist/tui/index.js +1 -1
  60. package/dist/{types-B2IOlN8R.d.ts → types-RlLmOHFR.d.ts} +59 -11
  61. package/dist/{workspace-streams-DaQceg2p.js → workspace-streams-BEvSX97P.js} +13 -2
  62. package/dist/workspace-streams-BEvSX97P.js.map +1 -0
  63. package/package.json +2 -2
  64. package/skills/profile-authoring/SKILL.md +8 -12
  65. package/dist/graph-BUu0KQVW.js.map +0 -1
  66. package/dist/supervise-CmeN8ipv.js.map +0 -1
  67. package/dist/supervisor-CSMb8HBU.js.map +0 -1
  68. package/dist/workspace-streams-DaQceg2p.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { $n as parseWorkerToolTraceArtifact, A as scopeOwnerExecutorNodeContext, Ai as worktreeCliProfileMaterialization, An as resolveAgentEnvironmentProvider, At as captureReusableExecutorConfig, B as consumeScopeRetainedOwnerResult, Bi as recordRuntimeOwnedDriveHarnessProviderEvidence, C as deriveNodeExecutionIdentity, Ct as createContinuationKeeper, D as recordScopeOwnerMaterialization, E as recordScopeOwnerDriverAttempt, Ei as renderUnsupported, F as seatExecutionProfile, Fi as inheritRuntimeOwnedExecutorAttestation, Fn as retainedExecutorSeamKey, Ft as snapshotExecutorConfig, G as scopeRetainedOwnerContext, Gi as runtimeOwnedPendingExecutorMaterialization, H as prepareScopeRetainedOwnerSeatSwitch, Hi as runtimeOwnedExecutorExecutionBinding, I as abandonScopeRetainedOwnerInvocation, J as scopeRetainedOwnerResourceReader, Jn as readCommittedJsonLines, Jt as createActivityLog, K as scopeRetainedOwnerJournalRoot, Ki as runtimeOwnedScopeOwnerRuntime, Kn as isNoEntError, Kr as generateSpanId, L as beginScopeRetainedOwnerDrive, M as SeatChain, Mi as attestRuntimeOwnedScopeOwner, Mr as contentAddress, N as SeatChainExhaustedError, Nt as createExecutor, O as recordScopeOwnerPause, Oi as unsupportedProfileDimensions, Or as persistHarnessTranscript, P as authoredSeatStages, Pn as registerRetainedExecutorPreparation, Qi as detachedSnapshot, R as bindScopeRetainedOwnerEnvironmentId, Si as promptModelProfileMaterialization, Sr as RunCancellationReason, St as checkVerdictOf, T as meterRuntimeOwnedProviderAttempt, Tr as runAbortable, U as prepareScopeRetainedOwnerTask, Ui as runtimeOwnedExecutorMaterialization, V as noteScopeRetainedOwnerCoordination, Vi as runtimeOwnedDriveHarnessProviderEvidence, Vt as WORKER_TRACE_PROPAGATION, W as reconcileScopeRetainedOwnerEnvironment, Wi as runtimeOwnedExecutorProviderEvidence, Wr as createOtelExporter, X as scopeRetainedOwnerResult, Xr as toOtelAttributes, Xt as createInbox, Y as scopeRetainedOwnerRestorePoint, Z as scopeRetainedOwnerTurnEnded, _ as isDriverSpec, _i as controlProfileMaterialization, an as isLiveNodeStatus, b as assertRecursiveReservationPolicy, bi as profileMaterializationAxes$1, c as runTree, cn as bridgeModelRouteRefusal, dr as bridgeStopSignalKey, f as runDriverWithRetry, fr as errMessage, g as driverExecutorFactory, gi as assertProfileMaterialization, gt as CONTINUATIONS_DIR, h as driverChild, i as bestDelivered, ir as assertValidBudget, it as providerVisibleProfile, k as restoreScopeOwnerAcceptedExecution, kr as readHarnessTranscript, kt as bindReusableExecutorExecutionId, lr as spendFromUsageTotals, mt as gateOnDeliverable, n as createRootHandle, nt as coordinationMcpAlias, or as meterUsageEvent, p as summarizeDriverAttempts, q as scopeRetainedOwnerPriorSpend, qn as prepareJsonlAppend, r as createSupervisor, rt as coordinationProfileToolPrefix, s as runFinalizer, sn as bridgeAdmissionRefusal, sr as newUsageTotals, tr as executorFailure, u as HarnessTurnFailedError, ur as bridgeRuntimeAttachmentsKey, vi as defineProfileMaterializationContract, vt as CheckUnavailableError, w as meterRuntimeOwnedAccounting, wn as routerBrain, wr as linkAbort, x as beginScopeOwnerAttempt, xi as promptControlProfileMaterialization, xt as bestComposite, yi as fullProfileMaterialization, yt as admitContinuationPolicy, z as bindScopeRetainedOwnerProvider, zi as providerAttemptEvidence, zt as createRouterTranscript } from "./supervisor-CSMb8HBU.js";
1
+ import { $n as parseWorkerToolTraceArtifact, A as scopeOwnerExecutorNodeContext, Ai as worktreeCliProfileMaterialization, An as resolveAgentEnvironmentProvider, At as captureReusableExecutorConfig, B as consumeScopeRetainedOwnerResult, Bi as recordRuntimeOwnedDriveHarnessProviderEvidence, C as deriveNodeExecutionIdentity, Ct as createContinuationKeeper, D as recordScopeOwnerMaterialization, E as recordScopeOwnerDriverAttempt, Ei as renderUnsupported, F as seatExecutionProfile, Fi as inheritRuntimeOwnedExecutorAttestation, Fn as retainedExecutorSeamKey, Ft as snapshotExecutorConfig, G as scopeRetainedOwnerContext, Gi as runtimeOwnedPendingExecutorMaterialization, H as prepareScopeRetainedOwnerSeatSwitch, Hi as runtimeOwnedExecutorExecutionBinding, I as abandonScopeRetainedOwnerInvocation, J as scopeRetainedOwnerResourceReader, Jn as readCommittedJsonLines, Jt as createActivityLog, K as scopeRetainedOwnerJournalRoot, Ki as runtimeOwnedScopeOwnerRuntime, Kn as isNoEntError, Kr as generateSpanId, L as beginScopeRetainedOwnerDrive, M as SeatChain, Mi as attestRuntimeOwnedScopeOwner, Mr as contentAddress, N as SeatChainExhaustedError, Nt as createExecutor, O as recordScopeOwnerPause, Oi as unsupportedProfileDimensions, Or as persistHarnessTranscript, P as authoredSeatStages, Pn as registerRetainedExecutorPreparation, Qi as detachedSnapshot, R as bindScopeRetainedOwnerEnvironmentId, Si as promptModelProfileMaterialization, Sr as RunCancellationReason, St as checkVerdictOf, T as meterRuntimeOwnedProviderAttempt, Tr as runAbortable, U as prepareScopeRetainedOwnerTask, Ui as runtimeOwnedExecutorMaterialization, V as noteScopeRetainedOwnerCoordination, Vi as runtimeOwnedDriveHarnessProviderEvidence, Vt as WORKER_TRACE_PROPAGATION, W as reconcileScopeRetainedOwnerEnvironment, Wi as runtimeOwnedExecutorProviderEvidence, Wr as createOtelExporter, X as scopeRetainedOwnerResult, Xr as toOtelAttributes, Xt as createInbox, Y as scopeRetainedOwnerRestorePoint, Z as scopeRetainedOwnerTurnEnded, _ as isDriverSpec, _i as controlProfileMaterialization, an as isLiveNodeStatus, b as assertRecursiveReservationPolicy, bi as profileMaterializationAxes$1, c as runTree, cn as bridgeModelRouteRefusal, dr as bridgeStopSignalKey, f as runDriverWithRetry, fr as errMessage, g as driverExecutorFactory, gi as assertProfileMaterialization, gt as CONTINUATIONS_DIR, h as driverChild, i as bestDelivered, ir as assertValidBudget, it as providerVisibleProfile, k as restoreScopeOwnerAcceptedExecution, kr as readHarnessTranscript, kt as bindReusableExecutorExecutionId, lr as spendFromUsageTotals, mt as gateOnDeliverable, n as createRootHandle, nt as coordinationMcpAlias, or as meterUsageEvent, p as summarizeDriverAttempts, q as scopeRetainedOwnerPriorSpend, qn as prepareJsonlAppend, r as createSupervisor, rt as coordinationProfileToolPrefix, s as runFinalizer, sn as bridgeAdmissionRefusal, sr as newUsageTotals, tr as executorFailure, u as HarnessTurnFailedError, ur as bridgeRuntimeAttachmentsKey, vi as defineProfileMaterializationContract, vt as CheckUnavailableError, w as meterRuntimeOwnedAccounting, wn as routerBrain, wr as linkAbort, x as beginScopeOwnerAttempt, xi as promptControlProfileMaterialization, xt as bestComposite, yi as fullProfileMaterialization, yt as admitContinuationPolicy, z as bindScopeRetainedOwnerProvider, zi as providerAttemptEvidence, zt as createRouterTranscript } from "./supervisor-WYRLsCp1.js";
2
2
  import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
3
- import { G as errorMessage, St as teardownSurfaces, Y as isAsyncIterable$1, at as unmeteredSpend, dt as resourceTelemetry, ft as withBudgetResources, ht as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, lt as addResourceSpend, ot as withTimeout, st as zeroSpend, tt as sleep, xt as teardownExecutor, z as addSpend } from "./workspace-streams-DaQceg2p.js";
3
+ import { G as errorMessage, Tt as teardownSurfaces, Y as isAsyncIterable$1, _t as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, at as unmeteredSpend, dt as resourceTelemetry, ft as withBudgetResources, lt as addResourceSpend, ot as withTimeout, st as zeroSpend, tt as sleep, wt as teardownExecutor, z as addSpend } from "./workspace-streams-BEvSX97P.js";
4
4
  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";
5
5
  import { n as assertNoSymlinkDescendant } from "./durable-file-DWQA4ooo.js";
6
6
  import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
7
- import { C as createInMemoryRunContext, D as applyRunCancellation, M as coordinationVerbNames, O as watchRunCancellation, P as createCoordinationToolsForManager, S as createFileRunContext, c as resolveWakePolicy, f as createProgressTracker, h as progressStop, m as plateau, n as createSteerAcknowledger, o as composeWakeInput, r as driverAgent, s as deadlineWarningAt, t as createCancelAcknowledger, w as withRunContext } from "./coordination-driver-BYIjecHz.js";
7
+ import { C as createInMemoryRunContext, D as applyRunCancellation, M as coordinationVerbNames, O as watchRunCancellation, P as createCoordinationToolsForManager, S as createFileRunContext, c as resolveWakePolicy, f as createProgressTracker, h as progressStop, m as plateau, n as createSteerAcknowledger, o as composeWakeInput, r as driverAgent, s as deadlineWarningAt, t as createCancelAcknowledger, w as withRunContext } from "./coordination-driver-CIfgl4Yj.js";
8
8
  import { r as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-Dqer2M4_.js";
9
9
  import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-DSCWdbX2.js";
10
10
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
@@ -3727,6 +3727,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
3727
3727
  "peerMail",
3728
3728
  "perWorker",
3729
3729
  "reservationPolicy",
3730
+ "deadlineCheckIn",
3730
3731
  "profileGuidance",
3731
3732
  "profileSecurity",
3732
3733
  "registry",
@@ -3739,6 +3740,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
3739
3740
  "router",
3740
3741
  "runDir",
3741
3742
  "resume",
3743
+ "modelChange",
3742
3744
  "runContext",
3743
3745
  "runId",
3744
3746
  "signal",
@@ -4147,6 +4149,26 @@ function superviseRootProfile(profile, profileGuidance) {
4147
4149
  const compose = profileGuidanceComposer(profileGuidance);
4148
4150
  return freezeDetachedProfile(compose ? compose(parsedProfile.data) : parsedProfile.data);
4149
4151
  }
4152
+ /** The model a root runs on, as a `model-changed` record names it. */
4153
+ function rootModelOf(profile) {
4154
+ return {
4155
+ ...profile.model?.default === void 0 ? {} : { model: profile.model.default },
4156
+ ...profile.model?.reasoningEffort === void 0 ? {} : { reasoningEffort: profile.model.reasoningEffort }
4157
+ };
4158
+ }
4159
+ /** The recorded root profile with only its model, and its reasoning effort when given, replaced. */
4160
+ function withRootModel(profile, change) {
4161
+ if (typeof change.model !== "string" || change.model.trim().length === 0) throw new ValidationError("supervise: modelChange.model must name a model");
4162
+ if (typeof change.reason !== "string" || change.reason.trim().length === 0) throw new ValidationError("supervise: modelChange.reason must say why the model changed");
4163
+ return superviseRootProfile({
4164
+ ...profile,
4165
+ model: {
4166
+ ...profile.model,
4167
+ default: change.model,
4168
+ ...change.reasoningEffort === void 0 ? {} : { reasoningEffort: change.reasoningEffort }
4169
+ }
4170
+ }, void 0);
4171
+ }
4150
4172
  function superviseWithContext(profile, task, opts, brain) {
4151
4173
  if (opts.runContext?.acquire === void 0) return superviseInternal(profile, task, opts, brain);
4152
4174
  const options = captureSuperviseOptions(opts);
@@ -4166,7 +4188,8 @@ function superviseInternal(profile, task, opts, testBrain) {
4166
4188
  }
4167
4189
  assertValidBudget(options.budget, "supervise budget");
4168
4190
  const composeSpawnProfile = profileGuidanceComposer(options.profileGuidance);
4169
- const canonicalProfile = superviseRootProfile(profile, options.profileGuidance);
4191
+ const registeredProfile = superviseRootProfile(profile, options.profileGuidance);
4192
+ const canonicalProfile = options.modelChange === void 0 ? registeredProfile : withRootModel(registeredProfile, options.modelChange);
4170
4193
  assertExecutableAgentProfile(canonicalProfile, "supervise root");
4171
4194
  if (authoredSeatStages(canonicalProfile) !== void 0 && options.selectSeat === void 0) throw new ValidationError("supervise: AgentProfile.seats requires selectSeat before execution");
4172
4195
  const canonicalTask = freezeDetached(task);
@@ -4185,7 +4208,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4185
4208
  })));
4186
4209
  };
4187
4210
  };
4188
- const rootExecution = canonicalExecution(canonicalProfile, canonicalTask, options.execution, "supervise root");
4211
+ const rootExecution = canonicalExecution(registeredProfile, canonicalTask, options.execution, "supervise root");
4189
4212
  const backendModel = options.backend?.model;
4190
4213
  const driverBackendModel = options.driverBackend?.model;
4191
4214
  assertProfileModelsAllowed(canonicalProfile, options.allowedModels);
@@ -4598,6 +4621,11 @@ function superviseInternal(profile, task, opts, testBrain) {
4598
4621
  executors: ctx.executors,
4599
4622
  ...options.recoverExecutor ?? recoveryFactories.get(workerFactory) ? { recoverExecutor: options.recoverExecutor ?? recoveryFactories.get(workerFactory) } : {},
4600
4623
  rootIdentity: rootExecution.identity,
4624
+ ...options.modelChange === void 0 ? {} : { rootModelChange: {
4625
+ from: rootModelOf(registeredProfile),
4626
+ to: rootModelOf(canonicalProfile),
4627
+ reason: options.modelChange.reason
4628
+ } },
4601
4629
  ...rootOwnerRuntime === void 0 ? {} : { rootMaterialization: {
4602
4630
  runtime: rootOwnerRuntime,
4603
4631
  declaration: "deferred",
@@ -4610,6 +4638,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4610
4638
  ownerWorkspaceRetention: managerBackend?.backend === "provider" && managerBackend.workspaceRetention !== void 0,
4611
4639
  ...options.workerSlots !== void 0 ? { workerSlots: options.workerSlots } : {},
4612
4640
  ...options.reservationPolicy ? { reservationPolicy: options.reservationPolicy } : {},
4641
+ ...options.deadlineCheckIn === void 0 ? {} : { deadlineCheckIn: options.deadlineCheckIn },
4613
4642
  ...ctx.resume === true || options.runDir === void 0 && options.resume === true ? { resume: true } : {},
4614
4643
  ...options.now ? { now: options.now } : {},
4615
4644
  signal: options.signal ? AbortSignal.any([options.signal, durableCancellation.signal]) : durableCancellation.signal,
@@ -4688,4 +4717,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4688
4717
  //#endregion
4689
4718
  export { readRootStreamReceipt as _, superviseWithTestBrain as a, createSupervisorSpanRecorder as b, resolveWorkerSpawnRetry as c, assertCoordinationBinding as d, resolveSupervisorProfile as f, readRootStream as g, ROOT_STREAM_FILE as h, superviseRootProfile as i, retryPreSpawnRefusals as l, supervisorAgentWithTestBrain as m, profileGuidanceComposer as n, workerFromBackend as o, supervisorAgent as p, supervise as r, isPreSpawnExecutorFailure as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, withWorkerSpawnRetry as u, UNPROVEN_CONTINUITY as v, serveCoordinationMcp as x, composeReentryTask as y };
4690
4719
 
4691
- //# sourceMappingURL=supervise-CmeN8ipv.js.map
4720
+ //# sourceMappingURL=supervise-D6MgxpMI.js.map