@tangle-network/agent-runtime 0.197.1 → 0.198.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 (103) hide show
  1. package/README.md +1 -2
  2. package/dist/{improve-DZs0KXhK.d.ts → activation-DFRTurvU.d.ts} +99 -5
  3. package/dist/{activation-BxMZybuo.js → activation-IBEVN3VI.js} +2 -2
  4. package/dist/{activation-BxMZybuo.js.map → activation-IBEVN3VI.js.map} +1 -1
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +2 -2
  7. package/dist/candidate-execution/index.d.ts +370 -2
  8. package/dist/candidate-execution/index.js +828 -4
  9. package/dist/candidate-execution/index.js.map +1 -0
  10. package/dist/{coordination-driver-zkCrfEbS.js → coordination-driver-NFvZ5ofi.js} +57 -26
  11. package/dist/coordination-driver-NFvZ5ofi.js.map +1 -0
  12. package/dist/{delegate-DHeUYU5E.js → delegate-dN5yooEj.js} +2 -2
  13. package/dist/{delegate-DHeUYU5E.js.map → delegate-dN5yooEj.js.map} +1 -1
  14. package/dist/durable.d.ts +2 -2
  15. package/dist/durable.js +4 -5
  16. package/dist/durable.js.map +1 -1
  17. package/dist/{graph-51SJOEcw.js → graph-CgCVtMuz.js} +3 -3
  18. package/dist/{graph-51SJOEcw.js.map → graph-CgCVtMuz.js.map} +1 -1
  19. package/dist/{improvement-cycle-Tw5nYT5R.js → improvement-cycle-Cfu6kDOs.js} +8 -10
  20. package/dist/{improvement-cycle-Tw5nYT5R.js.map → improvement-cycle-Cfu6kDOs.js.map} +1 -1
  21. package/dist/{index-CYOJsxSg.d.ts → index-CMTUgh-T.d.ts} +9 -11
  22. package/dist/index.d.ts +694 -16
  23. package/dist/index.js +1780 -17
  24. package/dist/index.js.map +1 -1
  25. package/dist/intelligence.d.ts +3 -7
  26. package/dist/intelligence.js +5 -6
  27. package/dist/intelligence.js.map +1 -1
  28. package/dist/kernel.d.ts +2 -5
  29. package/dist/kernel.js +8 -10
  30. package/dist/{loop-runner-bin-DwrSB04m.d.ts → loop-runner-bin-CAf1OQot.d.ts} +3 -3
  31. package/dist/{loop-runner-bin-2LQSjRTB.js → loop-runner-bin-WQniYJ8C.js} +3 -3
  32. package/dist/{loop-runner-bin-2LQSjRTB.js.map → loop-runner-bin-WQniYJ8C.js.map} +1 -1
  33. package/dist/loop-runner-bin.d.ts +1 -1
  34. package/dist/loop-runner-bin.js +1 -1
  35. package/dist/mcp/bin.js +3 -3
  36. package/dist/mcp/index.d.ts +2 -3
  37. package/dist/mcp/index.js +4 -5
  38. package/dist/mcp/index.js.map +1 -1
  39. package/dist/{prepare-DDGp0-rW.js → prepare-CAO1yXov.js} +2407 -2407
  40. package/dist/prepare-CAO1yXov.js.map +1 -0
  41. package/dist/{protected-model-port-DxFN8DLS.js → protected-model-port-B5avcRiQ.js} +2 -2
  42. package/dist/{protected-model-port-DxFN8DLS.js.map → protected-model-port-B5avcRiQ.js.map} +1 -1
  43. package/dist/{provision-supervisor-CpMMShE_.js → provision-supervisor-BxsIaJ35.js} +3 -6
  44. package/dist/{provision-supervisor-CpMMShE_.js.map → provision-supervisor-BxsIaJ35.js.map} +1 -1
  45. package/dist/{redact-Cbl2O-4N.js → redact-DqfB7oB4.js} +5233 -2526
  46. package/dist/redact-DqfB7oB4.js.map +1 -0
  47. package/dist/{runtime-BSFz2z7h.js → runtime-CHEtvaTY.js} +427 -23
  48. package/dist/runtime-CHEtvaTY.js.map +1 -0
  49. package/dist/{server-COXa19sp.js → server-ccGua5tH.js} +4 -4
  50. package/dist/{server-COXa19sp.js.map → server-ccGua5tH.js.map} +1 -1
  51. package/dist/{types-DFLZMaeh.d.ts → stream-agent-turn-CLOQr497.d.ts} +1986 -6
  52. package/dist/{structural-rollout-DPbZWgEm.js → structural-rollout-BmDuXyR9.js} +1101 -8
  53. package/dist/structural-rollout-BmDuXyR9.js.map +1 -0
  54. package/dist/{supervise-b93YUaka.js → supervise-DVt8-TI-.js} +9 -5
  55. package/dist/supervise-DVt8-TI-.js.map +1 -0
  56. package/dist/testing.d.ts +2 -2
  57. package/dist/testing.js +13 -13
  58. package/dist/tui/index.d.ts +1 -1
  59. package/dist/tui/index.js +1 -1
  60. package/dist/{workspace-archive-Ybomp7AN.js → workspace-archive-BMOnloFf.js} +3 -3
  61. package/dist/{workspace-archive-Ybomp7AN.js.map → workspace-archive-BMOnloFf.js.map} +1 -1
  62. package/package.json +1 -28
  63. package/dist/activation-DyWB0K6E.d.ts +0 -98
  64. package/dist/authored-code-URmkdgjv.js +0 -37
  65. package/dist/authored-code-URmkdgjv.js.map +0 -1
  66. package/dist/candidate-execution-nvqVIMyS.js +0 -829
  67. package/dist/candidate-execution-nvqVIMyS.js.map +0 -1
  68. package/dist/conversation-BxJ0SIBM.js +0 -1363
  69. package/dist/conversation-BxJ0SIBM.js.map +0 -1
  70. package/dist/conversation.d.ts +0 -2
  71. package/dist/conversation.js +0 -2
  72. package/dist/coordination-driver-zkCrfEbS.js.map +0 -1
  73. package/dist/environment-provider-1fKZh2zl.js +0 -2281
  74. package/dist/environment-provider-1fKZh2zl.js.map +0 -1
  75. package/dist/environment-provider-B-I2jlQy.d.ts +0 -143
  76. package/dist/environment-provider.d.ts +0 -2
  77. package/dist/environment-provider.js +0 -2
  78. package/dist/graph.d.ts +0 -753
  79. package/dist/graph.js +0 -2111
  80. package/dist/graph.js.map +0 -1
  81. package/dist/index-CUosKU4N.d.ts +0 -372
  82. package/dist/index-D9mb6fn2.d.ts +0 -691
  83. package/dist/index-ZnxSe6iK.d.ts +0 -138
  84. package/dist/jsonl-file-BEpaEYjT.js +0 -141
  85. package/dist/jsonl-file-BEpaEYjT.js.map +0 -1
  86. package/dist/knowledge-B_MsOtDG.js +0 -428
  87. package/dist/knowledge-B_MsOtDG.js.map +0 -1
  88. package/dist/knowledge.d.ts +0 -2
  89. package/dist/knowledge.js +0 -2
  90. package/dist/materialization-Cy0oM8tb.js +0 -672
  91. package/dist/materialization-Cy0oM8tb.js.map +0 -1
  92. package/dist/prepare-DDGp0-rW.js.map +0 -1
  93. package/dist/primeintellect/index.d.ts +0 -218
  94. package/dist/primeintellect/index.js +0 -739
  95. package/dist/primeintellect/index.js.map +0 -1
  96. package/dist/redact-Cbl2O-4N.js.map +0 -1
  97. package/dist/runtime-0xNaV6TJ.d.ts +0 -1699
  98. package/dist/runtime-BSFz2z7h.js.map +0 -1
  99. package/dist/stream-agent-turn-Dt5mZpc3.js +0 -1103
  100. package/dist/stream-agent-turn-Dt5mZpc3.js.map +0 -1
  101. package/dist/stream-agent-turn-urHpmO_Z.d.ts +0 -160
  102. package/dist/structural-rollout-DPbZWgEm.js.map +0 -1
  103. package/dist/supervise-b93YUaka.js.map +0 -1
@@ -1,10 +1,8 @@
1
- import { C as runtimeOwnedScopeOwnerRuntime, D as detachedSnapshot, S as runtimeOwnedPendingExecutorMaterialization, b as runtimeOwnedExecutorMaterialization, d as providerAttemptEvidence, f as recordRuntimeOwnedDriveHarnessProviderEvidence, i as attestRuntimeOwnedScopeOwner, s as inheritRuntimeOwnedExecutorAttestation, v as runtimeOwnedDriveHarnessProviderEvidence, x as runtimeOwnedExecutorProviderEvidence, y as runtimeOwnedExecutorExecutionBinding } from "./materialization-Cy0oM8tb.js";
1
+ import { $ as bridgeAdmissionRefusal, Ar as worktreeCliProfileMaterialization, Ct as createInbox, Er as renderUnsupported, Gn as createOtelExporter, Gr as runtimeOwnedDriveHarnessProviderEvidence, Ir as attestRuntimeOwnedScopeOwner, J as teardownExecutor, Jn as generateSpanId, Jr as runtimeOwnedExecutorProviderEvidence, Kr as runtimeOwnedExecutorExecutionBinding, On as unmeteredSpend, Or as unsupportedProfileDimensions, Q as bindReusableExecutorExecutionId, Qn as toOtelAttributes, Sr as promptModelProfileMaterialization, Ur as providerAttemptEvidence, Wr as recordRuntimeOwnedDriveHarnessProviderEvidence, Xr as runtimeOwnedScopeOwnerRuntime, Xt as contentAddress, Y as assertValidBudget, Yr as runtimeOwnedPendingExecutorMaterialization, Z as spendFromUsageEvents, _ as meterRuntimeOwnedProviderAttempt, _r as controlProfileMaterialization, a as createSupervisor, br as profileMaterializationAxes$1, ct as snapshotExecutorConfig, d as driverChild, et as bridgeModelRouteRefusal, g as meterRuntimeOwnedAccounting, gr as assertProfileMaterialization, h as deriveNodeExecutionIdentity, i as createRootHandle, kn as zeroSpend, l as runFinalizer, ni as detachedSnapshot, nt as bridgeStopSignalKey, o as bestDelivered, ot as createExecutor, p as beginScopeOwnerAttempt, q as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, qr as runtimeOwnedExecutorMaterialization, rt as captureReusableExecutorConfig, sn as routerBrain, tt as bridgeRuntimeAttachmentsKey, u as runTree, ut as WORKER_TRACE_PROPAGATION, v as recordScopeOwnerMaterialization, vr as defineProfileMaterializationContract, xr as promptControlProfileMaterialization, y as scopeOwnerExecutorNodeContext, yr as fullProfileMaterialization, zr as inheritRuntimeOwnedExecutorAttestation } from "./redact-DqfB7oB4.js";
2
2
  import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError, r as BackendTransportError, t as AgentEvalError } 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-DKDyr-fc.js";
4
- import { $n as assertProfileMaterialization, Et as createInbox, Fn as toOtelAttributes, On as createOtelExporter, Q as assertValidBudget, S as scopeOwnerExecutorNodeContext, X as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Z as teardownExecutor, a as createSupervisor, ar as promptModelProfileMaterialization, at as bridgeStopSignalKey, b as meterRuntimeOwnedProviderAttempt, dn as routerBrain, dr as unsupportedProfileDimensions, dt as snapshotExecutorConfig, en as contentAddress, er as controlProfileMaterialization, et as spendFromUsageEvents, f as runFinalizer, g as beginScopeOwnerAttempt, i as createRootHandle, ir as promptControlProfileMaterialization, it as bridgeRuntimeAttachmentsKey, jn as generateSpanId, l as bestDelivered, lr as renderUnsupported, lt as createExecutor, m as driverChild, nr as fullProfileMaterialization, nt as bridgeAdmissionRefusal, ot as captureReusableExecutorConfig, p as runTree, pr as worktreeCliProfileMaterialization, pt as WORKER_TRACE_PROPAGATION, rr as profileMaterializationAxes$1, rt as bridgeModelRouteRefusal, tr as defineProfileMaterializationContract, tt as bindReusableExecutorExecutionId, v as deriveNodeExecutionIdentity, x as recordScopeOwnerMaterialization, y as meterRuntimeOwnedAccounting } from "./redact-Cbl2O-4N.js";
5
- import { E as zeroSpend, w as unmeteredSpend } from "./environment-provider-1fKZh2zl.js";
6
4
  import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
7
- import { C as createCoordinationTools, M as createInMemoryRunContext, S as coordinationVerbNames, c as createProgressTracker, d as progressStop, j as createFileRunContext, r as driverAgent } from "./coordination-driver-zkCrfEbS.js";
5
+ import { C as coordinationVerbNames, M as createFileRunContext, N as createInMemoryRunContext, c as createProgressTracker, d as progressStop, r as driverAgent, v as watchRunCancellation, w as createCoordinationTools } from "./coordination-driver-NFvZ5ofi.js";
8
6
  import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-B8I_LXN-.js";
9
7
  import { t as createStdioToolServer } from "./tool-server-BJbCPhoW.js";
10
8
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
@@ -1334,12 +1332,14 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1334
1332
  ledger = mcp;
1335
1333
  const coordinationTools = slot.descriptors();
1336
1334
  const providerProfile = detachedSnapshot(providerVisibleProfile(stableProfile), "supervisorAgent provider-visible profile");
1335
+ let cancellation;
1337
1336
  try {
1338
1337
  const recoveredSubmission = mcp.submittedResult();
1339
1338
  if (recoveredSubmission) {
1340
1339
  deps.onAcceptedSubmission?.(recoveredSubmission.result);
1341
1340
  return recoveredSubmission.result;
1342
1341
  }
1342
+ if (deps.controlDir !== void 0 && deps.abortRun !== void 0 && deps.controlScope !== "subtree") cancellation = watchRunCancellation(deps.controlDir, deps.abortRun);
1343
1343
  const baseTokensLeft = scope.budget.tokensLeft;
1344
1344
  const contractDeclared = deps.deliverable !== void 0;
1345
1345
  const maxReprompts = deps.repromptOnUnmet ?? 0;
@@ -1357,6 +1357,8 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1357
1357
  };
1358
1358
  await runDriverWithRetry({
1359
1359
  drive: async (attempt, reentry) => {
1360
+ cancellation?.check();
1361
+ scope.signal.throwIfAborted();
1360
1362
  beginScopeOwnerAttempt(scope, attempt);
1361
1363
  try {
1362
1364
  await driveHarness({
@@ -1387,6 +1389,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1387
1389
  } } : {},
1388
1390
  ...deps.onDriverAttempt ? { onAttempt: deps.onDriverAttempt } : {}
1389
1391
  });
1392
+ cancellation?.close();
1390
1393
  await mcp.drainResolved();
1391
1394
  const submitted = mcp.submittedResult();
1392
1395
  if (submitted) {
@@ -1400,6 +1403,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
1400
1403
  budget: scope.budget
1401
1404
  });
1402
1405
  } finally {
1406
+ cancellation?.close();
1403
1407
  await mcp.close();
1404
1408
  }
1405
1409
  }
@@ -3061,4 +3065,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
3061
3065
  //#endregion
3062
3066
  export { serveCoordinationMcp as _, isPreSpawnExecutorFailure as a, mapExecutorResult as b, withWorkerSpawnRetry as c, resolveSupervisorProfile as d, supervisorAgent as f, defaultUnmetContractSteer as g, classifyDriverFailure as h, workerFromBackend as i, assertCoordinationBinding as l, DriverAttemptsExhaustedError as m, supervise as n, resolveWorkerSpawnRetry as o, supervisorAgentWithTestBrain as p, superviseWithTestBrain as r, retryPreSpawnRefusals as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, coordinationProfileToolPrefix as u, createSupervisorSpanRecorder as v, gateOnDeliverable as y };
3063
3067
 
3064
- //# sourceMappingURL=supervise-b93YUaka.js.map
3068
+ //# sourceMappingURL=supervise-DVt8-TI-.js.map