@tangle-network/agent-runtime 0.190.0 → 0.191.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 (74) hide show
  1. package/dist/{activation-BgRWFKZi.js → activation-BpTEBhQR.js} +2 -2
  2. package/dist/{activation-BgRWFKZi.js.map → activation-BpTEBhQR.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{authoring-dQQ2z1fT.js → authoring-DV0fkyxx.js} +7 -3
  6. package/dist/{authoring-dQQ2z1fT.js.map → authoring-DV0fkyxx.js.map} +1 -1
  7. package/dist/conversation.d.ts +1 -1
  8. package/dist/{coordination-driver-Da1IGdTP.js → coordination-driver-Bw0Prnim.js} +668 -35
  9. package/dist/coordination-driver-Bw0Prnim.js.map +1 -0
  10. package/dist/durable.d.ts +2 -2
  11. package/dist/durable.js +1 -1
  12. package/dist/{environment-provider-Bf-hgR6p.d.ts → environment-provider-CJ43FJfJ.d.ts} +2 -2
  13. package/dist/{environment-provider-DcelIawX.js → environment-provider-DEwsolvi.js} +43 -6
  14. package/dist/environment-provider-DEwsolvi.js.map +1 -0
  15. package/dist/environment-provider.d.ts +1 -1
  16. package/dist/environment-provider.js +1 -1
  17. package/dist/{graph-Bd1elhdL.js → graph-BzsMtBYp.js} +3 -2
  18. package/dist/graph-BzsMtBYp.js.map +1 -0
  19. package/dist/graph.d.ts +3 -3
  20. package/dist/graph.js +3 -3
  21. package/dist/{redact-Cv1GfOFO.d.ts → improve-Cbbt3jE6.d.ts} +4 -36
  22. package/dist/{improvement-cycle-BanlFMyL.js → improvement-cycle-jC89uaRW.js} +3 -3
  23. package/dist/{improvement-cycle-BanlFMyL.js.map → improvement-cycle-jC89uaRW.js.map} +1 -1
  24. package/dist/{index-DpNil9jh.d.ts → index-B2rVjcPT.d.ts} +311 -13
  25. package/dist/{index-Clb7_qML.d.ts → index-OSRVFARy.d.ts} +2 -2
  26. package/dist/{index-C-gBk5M9.d.ts → index-Y14IrBuB.d.ts} +4 -4
  27. package/dist/index.d.ts +9 -8
  28. package/dist/index.js +7 -8
  29. package/dist/index.js.map +1 -1
  30. package/dist/intelligence.d.ts +5 -4
  31. package/dist/intelligence.js +4 -5
  32. package/dist/intelligence.js.map +1 -1
  33. package/dist/kernel.d.ts +6 -6
  34. package/dist/kernel.js +9 -9
  35. package/dist/{knowledge-BXdXlv48.js → knowledge-BuXP5ynd.js} +3 -3
  36. package/dist/{knowledge-BXdXlv48.js.map → knowledge-BuXP5ynd.js.map} +1 -1
  37. package/dist/knowledge.d.ts +1 -1
  38. package/dist/knowledge.js +1 -1
  39. package/dist/{loop-runner-bin-CGQzzWAc.js → loop-runner-bin-B_Xh4jLi.js} +3 -3
  40. package/dist/{loop-runner-bin-CGQzzWAc.js.map → loop-runner-bin-B_Xh4jLi.js.map} +1 -1
  41. package/dist/{loop-runner-bin-Cy4f9M6p.d.ts → loop-runner-bin-C2Yw-RBc.d.ts} +3 -3
  42. package/dist/loop-runner-bin.d.ts +1 -1
  43. package/dist/loop-runner-bin.js +1 -1
  44. package/dist/mcp/bin.js +3 -3
  45. package/dist/mcp/index.d.ts +4 -4
  46. package/dist/mcp/index.js +6 -6
  47. package/dist/{openai-tools-BSDk_umV.js → openai-tools-Dqg8IhKd.js} +2 -2
  48. package/dist/{openai-tools-BSDk_umV.js.map → openai-tools-Dqg8IhKd.js.map} +1 -1
  49. package/dist/primeintellect/index.d.ts +1 -1
  50. package/dist/{provision-supervisor-bwpzajiz.js → provision-supervisor-DAcTZDQG.js} +4 -4
  51. package/dist/{provision-supervisor-bwpzajiz.js.map → provision-supervisor-DAcTZDQG.js.map} +1 -1
  52. package/dist/{supervisor-CqJW4qap.js → redact-BP8Xn2A3.js} +83 -4
  53. package/dist/redact-BP8Xn2A3.js.map +1 -0
  54. package/dist/{runtime-BMWmSu4A.d.ts → runtime-DI4mJNXI.d.ts} +3 -3
  55. package/dist/{runtime-Ddh7PyCy.js → runtime-Dm63BrGY.js} +63 -19
  56. package/dist/{runtime-Ddh7PyCy.js.map → runtime-Dm63BrGY.js.map} +1 -1
  57. package/dist/{stream-agent-turn-uqzf9ZEh.d.ts → stream-agent-turn-_GgUW49y.d.ts} +35 -3
  58. package/dist/{structural-rollout-0NKvKuFm.js → structural-rollout-ChpGSR0q.js} +2 -2
  59. package/dist/{structural-rollout-0NKvKuFm.js.map → structural-rollout-ChpGSR0q.js.map} +1 -1
  60. package/dist/{supervise-yDiZAqlN.js → supervise-B89x7rgF.js} +21 -6
  61. package/dist/supervise-B89x7rgF.js.map +1 -0
  62. package/dist/testing.d.ts +2 -2
  63. package/dist/testing.js +12 -12
  64. package/dist/tui/index.d.ts +1 -1
  65. package/dist/tui/index.js +1 -1
  66. package/dist/{types-02hXqnSP.d.ts → types-DKA_PDv0.d.ts} +27 -2
  67. package/package.json +1 -1
  68. package/dist/coordination-driver-Da1IGdTP.js.map +0 -1
  69. package/dist/environment-provider-DcelIawX.js.map +0 -1
  70. package/dist/graph-Bd1elhdL.js.map +0 -1
  71. package/dist/redact-D-u-rrcn.js +0 -82
  72. package/dist/redact-D-u-rrcn.js.map +0 -1
  73. package/dist/supervise-yDiZAqlN.js.map +0 -1
  74. package/dist/supervisor-CqJW4qap.js.map +0 -1
@@ -4,9 +4,9 @@ import { n as detachedSnapshot } from "./snapshot-CTAf4uuA.js";
4
4
  import { x as contentAddress } from "./spawn-journal-B9eTmVAn.js";
5
5
  import { v as unmeteredSpend } from "./util-mCNUeboW.js";
6
6
  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-Wf2MxXJ9.js";
7
- import { $ as bridgeModelRouteRefusal, Fn as defineProfileMaterializationContract, Gn as unsupportedProfileDimensions, Gt as routerBrain, In as fullProfileMaterialization, J as assertValidBudget, K as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Ln as profileMaterializationAxes$1, Nn as assertProfileMaterialization, Pn as controlProfileMaterialization, Q as bridgeAdmissionRead, Rn as promptControlProfileMaterialization, St as createInbox, Un as renderUnsupported, X as spendFromUsageEvents, Z as bindReusableExecutorExecutionId, _ as recordScopeOwnerMaterialization, an as buildLoopSpanNodes, at as createExecutor, cn as createOtelExporter, d as driverChild, dn as generateSpanId, et as bridgeRuntimeAttachmentsKey, g as meterRuntimeOwnedProviderAttempt, h as meterRuntimeOwnedAccounting, hn as toOtelAttributes, l as runFinalizer, lt as WORKER_TRACE_PROPAGATION, m as deriveNodeExecutionIdentity, n as createSupervisor, nt as captureReusableExecutorConfig, o as bestDelivered, q as teardownExecutor, qn as worktreeCliProfileMaterialization, st as snapshotExecutorConfig, t as createRootHandle, tt as bridgeStopSignalKey, u as runTree, v as scopeOwnerExecutorNodeContext, zn as promptModelProfileMaterialization } from "./supervisor-CqJW4qap.js";
7
+ import { $ as spendFromUsageEvents, Bn as profileMaterializationAxes$1, Hn as promptModelProfileMaterialization, In as assertProfileMaterialization, Jn as unsupportedProfileDimensions, Jt as routerBrain, Kn as renderUnsupported, Ln as controlProfileMaterialization, Rn as defineProfileMaterializationContract, Tt as createInbox, Vn as promptControlProfileMaterialization, X as teardownExecutor, Xn as worktreeCliProfileMaterialization, Y as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Z as assertValidBudget, _ as deriveNodeExecutionIdentity, a as createSupervisor, at as captureReusableExecutorConfig, b as recordScopeOwnerMaterialization, cn as buildLoopSpanNodes, ct as createExecutor, dn as createOtelExporter, et as bindReusableExecutorExecutionId, f as runFinalizer, ft as WORKER_TRACE_PROPAGATION, i as createRootHandle, it as bridgeStopSignalKey, l as bestDelivered, m as driverChild, mn as generateSpanId, nt as bridgeModelRouteRefusal, p as runTree, rt as bridgeRuntimeAttachmentsKey, tt as bridgeAdmissionRead, ut as snapshotExecutorConfig, v as meterRuntimeOwnedAccounting, vn as toOtelAttributes, x as scopeOwnerExecutorNodeContext, y as meterRuntimeOwnedProviderAttempt, zn as fullProfileMaterialization } from "./redact-BP8Xn2A3.js";
8
8
  import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
9
- import { C as coordinationVerbNames, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, w as createCoordinationTools, y as createInMemoryRunContext } from "./coordination-driver-Da1IGdTP.js";
9
+ import { E as createCoordinationTools, T as coordinationVerbNames, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, y as createInMemoryRunContext } from "./coordination-driver-Bw0Prnim.js";
10
10
  import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-B8I_LXN-.js";
11
11
  import { t as createStdioToolServer } from "./tool-server-DEmLr9YY.js";
12
12
  import { n as UI_LENSES } from "./substrate-B0TYNrXn.js";
@@ -2229,7 +2229,11 @@ async function serveCoordinationMcp(opts) {
2229
2229
  ...opts.onEvent ? { onEvent: opts.onEvent } : {},
2230
2230
  ...opts.replaySettlements ? { replaySettlements: true } : {},
2231
2231
  ...opts.questionPolicy ? { questionPolicy: opts.questionPolicy } : {},
2232
+ ...opts.escalateQuestion ? { escalateQuestion: opts.escalateQuestion } : {},
2233
+ ...opts.priorEscalations?.length ? { priorEscalations: opts.priorEscalations } : {},
2232
2234
  ...opts.priorQuestions?.length ? { priorQuestions: opts.priorQuestions } : {},
2235
+ ...opts.priorJournal?.length ? { priorJournal: opts.priorJournal } : {},
2236
+ ...opts.priorAnalystDefinitions?.length ? { priorAnalystDefinitions: opts.priorAnalystDefinitions } : {},
2233
2237
  ...opts.preflightSpawn ? { preflightSpawn: opts.preflightSpawn } : {},
2234
2238
  ...opts.resolveSpawnProfile ? { resolveSpawnProfile: opts.resolveSpawnProfile } : {},
2235
2239
  ...opts.peerMail ? { peerMail: typeof opts.peerMail === "object" && opts.peerMail.limits ? { limits: opts.peerMail.limits } : {} } : {}
@@ -2949,7 +2953,9 @@ function createVerbSlot() {
2949
2953
  observeAgent: verb("observe_agent"),
2950
2954
  listQuestions: verb("list_questions"),
2951
2955
  answerQuestion: verb("answer_question"),
2952
- runAnalyst: verb("run_analyst")
2956
+ runAnalyst: verb("run_analyst"),
2957
+ readJournal: verb("read_journal"),
2958
+ defineAnalyst: verb("define_analyst")
2953
2959
  }),
2954
2960
  descriptors() {
2955
2961
  if (bound === void 0) throw new ValidationError("supervisorAgent: coordinationTools() was called before this manager's coordination tools were bound");
@@ -3038,6 +3044,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
3038
3044
  ...deps.executeExtraTool ? { executeExtraTool: deps.executeExtraTool } : {},
3039
3045
  ...deps.analysts ? { analysts: deps.analysts } : {},
3040
3046
  ...deps.analyzeOnSettle ? { analyzeOnSettle: deps.analyzeOnSettle } : {},
3047
+ ...deps.escalateQuestion ? { escalateQuestion: deps.escalateQuestion } : {},
3041
3048
  ...deps.watchWorkers ? { watchWorkers: deps.watchWorkers } : {},
3042
3049
  ...deps.stallAfterMs !== void 0 ? { stallAfterMs: deps.stallAfterMs } : {},
3043
3050
  ...deps.continuityByProfile ? { continuityByProfile: deps.continuityByProfile } : {},
@@ -3118,6 +3125,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
3118
3125
  ...deps.maxLiveWorkers !== void 0 ? { maxLiveWorkers: deps.maxLiveWorkers } : {},
3119
3126
  ...deps.analysts ? { analysts: deps.analysts } : {},
3120
3127
  ...deps.analyzeOnSettle ? { analyzeOnSettle: deps.analyzeOnSettle } : {},
3128
+ ...deps.escalateQuestion ? { escalateQuestion: deps.escalateQuestion } : {},
3121
3129
  ...deps.watchWorkers ? { watchWorkers: deps.watchWorkers } : {},
3122
3130
  ...deps.stallAfterMs !== void 0 ? { stallAfterMs: deps.stallAfterMs } : {},
3123
3131
  ...deps.continuityByProfile ? { continuityByProfile: deps.continuityByProfile } : {},
@@ -3127,6 +3135,9 @@ function buildSupervisorAgent(profile, deps, testBrain) {
3127
3135
  ...deps.resolveSpawnProfile ? { resolveSpawnProfile: deps.resolveSpawnProfile } : {},
3128
3136
  ...deps.peerMail ? { peerMail: deps.peerMail } : {},
3129
3137
  ...priorCoordination?.questions.length ? { priorQuestions: priorCoordination.questions } : {},
3138
+ ...priorCoordination?.escalations?.length ? { priorEscalations: priorCoordination.escalations } : {},
3139
+ ...priorCoordination?.records.length ? { priorJournal: priorCoordination.records } : {},
3140
+ ...priorCoordination?.analystDefinitions?.length ? { priorAnalystDefinitions: priorCoordination.analystDefinitions } : {},
3130
3141
  ...nodeTools?.length ? { nodeTools } : {},
3131
3142
  onCoordinationTools: (tools) => slot.bind(tools)
3132
3143
  });
@@ -4123,6 +4134,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
4123
4134
  "journal",
4124
4135
  "makeLeafAgent",
4125
4136
  "makeWorkerAgent",
4137
+ "escalateQuestion",
4126
4138
  "maxDepth",
4127
4139
  "maxLiveWorkers",
4128
4140
  "maxTurns",
@@ -4179,6 +4191,7 @@ Object.freeze([...[
4179
4191
  "authorizeMessage",
4180
4192
  "authorizeSpawn",
4181
4193
  "driveHarness",
4194
+ "escalateQuestion",
4182
4195
  "executeExtraTool",
4183
4196
  "finalizer",
4184
4197
  "isDriverProfile",
@@ -4214,7 +4227,7 @@ function assertNoUncapturedExecutableOption(decisionData) {
4214
4227
  * mutable options object can no longer change an in-flight run. */
4215
4228
  function captureSuperviseOptions(opts) {
4216
4229
  assertSuperviseOptionKeys(opts, "supervise");
4217
- const { backend, driverBackend, deliverable, resolveDeliverable, router, compaction, watchWorkers, analysts, makeWorkerAgent, makeLeafAgent, resolveSpawnProfile, blobs, journal, probes, registry, hooks, otel, authorizeSpawn, authorizeMessage, isDriverProfile, driveHarness, resolveDriveHarness, resolveSupervisorTools, onCoordinationEvent, executeExtraTool, stopRule, onProgressStop, onDriverAttempt, onUnmetContract, workerRetry, onWorkerRetry, finalizer, now, signal, rootHandle, ...decisionData } = opts;
4230
+ const { backend, driverBackend, deliverable, resolveDeliverable, router, compaction, watchWorkers, analysts, makeWorkerAgent, makeLeafAgent, resolveSpawnProfile, blobs, journal, probes, registry, hooks, otel, authorizeSpawn, authorizeMessage, isDriverProfile, driveHarness, resolveDriveHarness, resolveSupervisorTools, escalateQuestion, onCoordinationEvent, executeExtraTool, stopRule, onProgressStop, onDriverAttempt, onUnmetContract, workerRetry, onWorkerRetry, finalizer, now, signal, rootHandle, ...decisionData } = opts;
4218
4231
  assertNoUncapturedExecutableOption(decisionData);
4219
4232
  const capturedData = detachedSnapshot(decisionData, "supervise options");
4220
4233
  const capturedBackend = backend === void 0 ? void 0 : snapshotExecutorConfig(backend);
@@ -4251,7 +4264,8 @@ function captureSuperviseOptions(opts) {
4251
4264
  });
4252
4265
  const capturedAnalysts = analysts === void 0 || typeof analysts === "string" ? analysts : Object.freeze({
4253
4266
  kinds: detachedSnapshot(analysts.kinds, "supervise analyst kinds"),
4254
- run: analysts.run
4267
+ run: analysts.run,
4268
+ ...typeof analysts.register === "function" ? { register: analysts.register } : {}
4255
4269
  });
4256
4270
  return Object.freeze({
4257
4271
  ...capturedData,
@@ -4275,6 +4289,7 @@ function captureSuperviseOptions(opts) {
4275
4289
  ...driveHarness === void 0 ? {} : { driveHarness },
4276
4290
  ...resolveDriveHarness === void 0 ? {} : { resolveDriveHarness },
4277
4291
  ...resolveSupervisorTools === void 0 ? {} : { resolveSupervisorTools },
4292
+ ...escalateQuestion === void 0 ? {} : { escalateQuestion },
4278
4293
  ...onCoordinationEvent === void 0 ? {} : { onCoordinationEvent },
4279
4294
  ...executeExtraTool === void 0 ? {} : { executeExtraTool },
4280
4295
  ...stopRule === void 0 ? {} : { stopRule },
@@ -4807,4 +4822,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4807
4822
  //#endregion
4808
4823
  export { createDelegateHandler as $, DELEGATION_STATUS_INPUT_SCHEMA as A, DELEGATE_UI_AUDIT_DESCRIPTION as B, DriverAttemptsExhaustedError as C, createInProcessTransport as D, serveCoordinationMcp as E, DELEGATION_HISTORY_INPUT_SCHEMA as F, DELEGATE_FEEDBACK_DESCRIPTION as G, DELEGATE_UI_AUDIT_TOOL_NAME as H, DELEGATION_HISTORY_TOOL_NAME as I, createDelegateFeedbackHandler as J, DELEGATE_FEEDBACK_INPUT_SCHEMA as K, createDelegationHistoryHandler as L, createDelegationStatusHandler as M, validateDelegationStatusArgs as N, createMcpServer as O, DELEGATION_HISTORY_DESCRIPTION as P, DELEGATE_TOOL_NAME as Q, validateDelegationHistoryArgs as R, supervisorPolicyPrompt as S, defaultUnmetContractSteer as T, createDelegateUiAuditHandler as U, DELEGATE_UI_AUDIT_INPUT_SCHEMA as V, validateDelegateUiAuditArgs as W, DELEGATE_DESCRIPTION as X, validateDelegateFeedbackArgs as Y, DELEGATE_INPUT_SCHEMA as Z, dumbContinuationPassPrompt as _, createSupervisorSpanRecorder as _t, isPreSpawnExecutorFailure as a, DELEGATION_TRACE_MAX_BYTES as at, naiveContinuationPrompt as b, withWorkerSpawnRetry as c, capDelegationTrace as ct, supervisorAgent as d, DelegationPersistenceError as dt, validateDelegateArgs as et, supervisorAgentWithTestBrain as f, DelegationStateCorruptError as ft, dumbContinuationFailPrompt as g, eventToSnapshot as gt, delegatesWorkerBriefPrompt as h, InMemoryFeedbackStore as ht, workerFromBackend as i, hashIdempotencyInput as it, DELEGATION_STATUS_TOOL_NAME as j, DELEGATION_STATUS_DESCRIPTION as k, assertCoordinationBinding as l, composeLoopTraceEmitters as lt, createPromptRegistry as m, InMemoryDelegationStore as mt, supervise as n, delegate as nt, resolveWorkerSpawnRetry as o, DELEGATION_TRACE_MAX_SPANS as ot, analyzesFindingsReportPrompt as p, FileDelegationStore as pt, DELEGATE_FEEDBACK_TOOL_NAME as q, superviseWithTestBrain as r, DelegationTaskQueue as rt, retryPreSpawnRefusals as s, buildDelegationTraceSpans as st, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, defaultDelegateBudget as tt, resolveSupervisorProfile as u, createDelegationTraceCollector as ut, formatPromptHandle as v, gateOnDeliverable as vt, classifyDriverFailure as w, promptHandle as x, kernelPromptRegistry as y, mapExecutorResult as yt, delegationProfiles as z };
4809
4824
 
4810
- //# sourceMappingURL=supervise-yDiZAqlN.js.map
4825
+ //# sourceMappingURL=supervise-B89x7rgF.js.map