@tangle-network/agent-runtime 0.192.5 → 0.193.1

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 (67) hide show
  1. package/dist/{activation-CsJctnHp.js → activation-BismttgN.js} +2 -2
  2. package/dist/{activation-CsJctnHp.js.map → activation-BismttgN.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{authoring-D-nXk29K.js → authoring-DWiqKSDY.js} +2 -2
  6. package/dist/{authoring-D-nXk29K.js.map → authoring-DWiqKSDY.js.map} +1 -1
  7. package/dist/conversation.d.ts +1 -1
  8. package/dist/{coordination-driver-pQobxl2Z.js → coordination-driver-DujHiIGa.js} +8 -8
  9. package/dist/coordination-driver-DujHiIGa.js.map +1 -0
  10. package/dist/durable.d.ts +2 -2
  11. package/dist/durable.js +1 -1
  12. package/dist/{environment-provider-CJ43FJfJ.d.ts → environment-provider-DpPGJfK-.d.ts} +2 -2
  13. package/dist/environment-provider.d.ts +1 -1
  14. package/dist/{graph-Ba4ZJ5jU.js → graph-DORfp9WX.js} +2 -2
  15. package/dist/{graph-Ba4ZJ5jU.js.map → graph-DORfp9WX.js.map} +1 -1
  16. package/dist/graph.d.ts +3 -3
  17. package/dist/graph.js +3 -3
  18. package/dist/{improve-Cbbt3jE6.d.ts → improve-Bn1zpWHF.d.ts} +3 -3
  19. package/dist/{improvement-cycle-D9FWTakR.js → improvement-cycle-BbsiYcpH.js} +3 -3
  20. package/dist/{improvement-cycle-D9FWTakR.js.map → improvement-cycle-BbsiYcpH.js.map} +1 -1
  21. package/dist/{index-B_fEqr5V.d.ts → index-DV1lzp9p.d.ts} +22 -24
  22. package/dist/{index-OSRVFARy.d.ts → index-RM2oRI9s.d.ts} +2 -2
  23. package/dist/{index-COznK4kB.d.ts → index-Vz-13VZq.d.ts} +4 -4
  24. package/dist/index.d.ts +8 -8
  25. package/dist/index.js +7 -7
  26. package/dist/intelligence.d.ts +5 -5
  27. package/dist/intelligence.js +3 -3
  28. package/dist/kernel.d.ts +5 -5
  29. package/dist/kernel.js +8 -8
  30. package/dist/{knowledge-rzv8sBV9.js → knowledge-RW1pbZCH.js} +3 -3
  31. package/dist/{knowledge-rzv8sBV9.js.map → knowledge-RW1pbZCH.js.map} +1 -1
  32. package/dist/knowledge.d.ts +1 -1
  33. package/dist/knowledge.js +1 -1
  34. package/dist/{loop-runner-bin-DiiZMHw7.d.ts → loop-runner-bin-CGraqNiA.d.ts} +3 -3
  35. package/dist/{loop-runner-bin-ClpCHpzR.js → loop-runner-bin-sBwcyQTc.js} +3 -3
  36. package/dist/{loop-runner-bin-ClpCHpzR.js.map → loop-runner-bin-sBwcyQTc.js.map} +1 -1
  37. package/dist/loop-runner-bin.d.ts +1 -1
  38. package/dist/loop-runner-bin.js +1 -1
  39. package/dist/mcp/bin.js +3 -3
  40. package/dist/mcp/index.d.ts +3 -3
  41. package/dist/mcp/index.js +5 -5
  42. package/dist/{openai-tools-BNBrKvZr.js → openai-tools-6jUqkGG7.js} +2 -2
  43. package/dist/{openai-tools-BNBrKvZr.js.map → openai-tools-6jUqkGG7.js.map} +1 -1
  44. package/dist/primeintellect/index.d.ts +1 -1
  45. package/dist/{provision-supervisor-DiHm_bvQ.js → provision-supervisor-CddfH9mg.js} +9 -9
  46. package/dist/provision-supervisor-CddfH9mg.js.map +1 -0
  47. package/dist/{redact-Ct7s2j86.js → redact-D0OzQsyt.js} +109 -42
  48. package/dist/redact-D0OzQsyt.js.map +1 -0
  49. package/dist/{runtime-DI4mJNXI.d.ts → runtime-V91N6sPc.d.ts} +3 -3
  50. package/dist/{runtime-CVdsAHEN.js → runtime-ZM4i-jEF.js} +26 -16
  51. package/dist/{runtime-CVdsAHEN.js.map → runtime-ZM4i-jEF.js.map} +1 -1
  52. package/dist/{stream-agent-turn-_GgUW49y.d.ts → stream-agent-turn-1ahpdeIo.d.ts} +2 -2
  53. package/dist/{structural-rollout-NrtKSgCE.js → structural-rollout-CktnUTCC.js} +2 -2
  54. package/dist/{structural-rollout-NrtKSgCE.js.map → structural-rollout-CktnUTCC.js.map} +1 -1
  55. package/dist/{supervise-Cr6JEoIg.js → supervise-Dj6zd2C7.js} +29 -23
  56. package/dist/supervise-Dj6zd2C7.js.map +1 -0
  57. package/dist/testing.d.ts +2 -2
  58. package/dist/testing.js +12 -12
  59. package/dist/tui/index.d.ts +1 -1
  60. package/dist/tui/index.js +1 -1
  61. package/dist/{types-DKA_PDv0.d.ts → types-CGez_ZHQ.d.ts} +21 -28
  62. package/package.json +1 -1
  63. package/skills/supervise/SKILL.md +75 -26
  64. package/dist/coordination-driver-pQobxl2Z.js.map +0 -1
  65. package/dist/provision-supervisor-DiHm_bvQ.js.map +0 -1
  66. package/dist/redact-Ct7s2j86.js.map +0 -1
  67. package/dist/supervise-Cr6JEoIg.js.map +0 -1
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { An as RunGraphTestOptions, Go as superviseWithTestBrain, Pn as runGraphWithTestBrain, Uo as SuperviseTestOptions, bs as supervisorAgentWithTestBrain, cr as DriverAgentOptions, ds as SupervisorAgentTestDeps, lr as driverAgent } from "./index-B_fEqr5V.js";
2
- import { Ft as ToolLoopCallContext, It as ToolLoopChat } from "./runtime-DI4mJNXI.js";
1
+ import { An as RunGraphTestOptions, Go as superviseWithTestBrain, Pn as runGraphWithTestBrain, Uo as SuperviseTestOptions, bs as supervisorAgentWithTestBrain, cr as DriverAgentOptions, ds as SupervisorAgentTestDeps, lr as driverAgent } from "./index-DV1lzp9p.js";
2
+ import { Ft as ToolLoopCallContext, It as ToolLoopChat } from "./runtime-V91N6sPc.js";
3
3
  import { AgentImprovementProposal, AgentProfile, AgentProfileImprovementMeasuredComparison, SandboxSizePreset } from "@tangle-network/agent-interface";
4
4
  //#region src/testing/index.d.ts
5
5
  /** A proposal produced by Runtime's opaque profile-improvement path. */
package/dist/testing.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { $ as parseExactAgentProfile, G as applyExactAgentProfileDiff, lt as canonicalCandidateDigest$1, pt as immutableCandidateValue } from "./prepare-B5fJ7mLS.js";
2
- import { f as verifyAgentImprovementProposal } from "./improvement-cycle-D9FWTakR.js";
3
- import { r as driverAgent } from "./coordination-driver-pQobxl2Z.js";
4
- import { f as supervisorAgentWithTestBrain, r as superviseWithTestBrain } from "./supervise-Cr6JEoIg.js";
5
- import { i as runGraphWithTestBrain } from "./graph-Ba4ZJ5jU.js";
2
+ import { f as verifyAgentImprovementProposal } from "./improvement-cycle-BbsiYcpH.js";
3
+ import { r as driverAgent } from "./coordination-driver-DujHiIGa.js";
4
+ import { f as supervisorAgentWithTestBrain, r as superviseWithTestBrain } from "./supervise-Dj6zd2C7.js";
5
+ import { i as runGraphWithTestBrain } from "./graph-DORfp9WX.js";
6
6
  import { SANDBOX_SIZE_PRESET_NAMES } from "@tangle-network/agent-interface";
7
7
  //#region src/testing/fixtures/agent-improvement-proposal.json
8
8
  var agent_improvement_proposal_default = {
9
9
  changedSurfaces: ["prompt"],
10
- digest: "sha256:c14a3055844811a9b14b144a6a66f50bb2182ba13a9d0f47048d25546c86b4c5",
10
+ digest: "sha256:6d74288ce43d6b1e2a73377160d62b7ba4e6b294c8bfc5fdc2eac8ce8aba175e",
11
11
  evaluation: {
12
12
  "decision": {
13
13
  "contributingChecks": [
@@ -4578,7 +4578,7 @@ var agent_improvement_proposal_default = {
4578
4578
  ],
4579
4579
  "metadata": {
4580
4580
  "fixture": "agent-improvement-proposal",
4581
- "runtimeVersion": "0.192.5"
4581
+ "runtimeVersion": "0.193.1"
4582
4582
  },
4583
4583
  "objectives": [
4584
4584
  {
@@ -4689,8 +4689,8 @@ var agent_improvement_proposal_default = {
4689
4689
  "baselineContentHash": "sha256:5c21ee53e513fc604cb09754e21c392b24a424da0ef37dbf8f1ee4a8a0b08f09",
4690
4690
  "candidateContentHash": "sha256:60fcbb1c728194bd51d7d19cb732d1c3f1881dce7e0a6266b41c8b98cfd65693",
4691
4691
  "kind": "agent-eval-loop",
4692
- "recordDigest": "sha256:b4781b956cb5ced1be63f77f9abcbe411f0ca4e5c0e633279e4244932f56b00c",
4693
- "runId": "agent-runtime-0.192.5-proposal-fixture",
4692
+ "recordDigest": "sha256:565f134e0589f18ce455cfd7fef2d76cbf5af335bc8e38befc4b587e640768bf",
4693
+ "runId": "agent-runtime-0.193.1-proposal-fixture",
4694
4694
  "schema": "agent-candidate-experiment"
4695
4695
  }
4696
4696
  },
@@ -4713,13 +4713,13 @@ var agent_improvement_proposal_default = {
4713
4713
  }],
4714
4714
  kind: "agent-improvement-proposal",
4715
4715
  proposedAt: "2026-07-10T01:00:00.000Z",
4716
- runId: "agent-runtime-0.192.5-proposal-fixture"
4716
+ runId: "agent-runtime-0.193.1-proposal-fixture"
4717
4717
  };
4718
4718
  //#endregion
4719
4719
  //#region src/testing/fixtures/agent-profile-improvement-proposal.json
4720
4720
  var agent_profile_improvement_proposal_default = {
4721
4721
  changedSurfaces: ["prompt", "skills"],
4722
- digest: "sha256:6ee3a5c0f8ae771061feaacf48478aaebdde0cb1c32b8c451c35145514ef9a5c",
4722
+ digest: "sha256:4f1f9175b8ae98f66fa860a54f215006e0a8c011db73d26623b2c7d2902ba9fb",
4723
4723
  evaluation: {
4724
4724
  "decision": {
4725
4725
  "contributingChecks": [
@@ -6353,7 +6353,7 @@ var agent_profile_improvement_proposal_default = {
6353
6353
  ],
6354
6354
  "metadata": {
6355
6355
  "fixture": "agent-profile-improvement-proposal",
6356
- "runtimeVersion": "0.192.5"
6356
+ "runtimeVersion": "0.193.1"
6357
6357
  },
6358
6358
  "objectives": [
6359
6359
  {
@@ -6464,7 +6464,7 @@ var agent_profile_improvement_proposal_default = {
6464
6464
  "baselineContentHash": "sha256:21c495a37c418c10bde64fbaa188beddeed31f1f051ea60a6a6582a9ee0db704",
6465
6465
  "candidateContentHash": "sha256:103f77bc8481601eef1ad5fe6ba84a40dffabc3a44f421f8c8559121edab84e9",
6466
6466
  "kind": "agent-eval-loop",
6467
- "recordDigest": "sha256:02560716e866180527775a59790db89dcd1b50b3d4ce4914683d85433dbcd664",
6467
+ "recordDigest": "sha256:d897dd5e49008c6352decb6befa70952e578dff0069351194185b4b202411085",
6468
6468
  "runId": "profile-improvement-1",
6469
6469
  "schema": "agent-profile-improvement-experiment"
6470
6470
  }
@@ -1,4 +1,4 @@
1
- import { an as SupervisorCleanupReceipt, in as ProvisionedSupervisor, nn as ProvisionSupervisorConnection, on as provisionSupervisor, rn as ProvisionSupervisorRequest } from "../index-B_fEqr5V.js";
1
+ import { an as SupervisorCleanupReceipt, in as ProvisionedSupervisor, nn as ProvisionSupervisorConnection, on as provisionSupervisor, rn as ProvisionSupervisorRequest } from "../index-DV1lzp9p.js";
2
2
  //#region src/tui/top-app.d.ts
3
3
  /**
4
4
  * The interactive side of the supervisor-run TUI: a keypress/mouse loop over the frames
package/dist/tui/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as provisionSupervisor } from "../provision-supervisor-DiHm_bvQ.js";
1
+ import { t as provisionSupervisor } from "../provision-supervisor-CddfH9mg.js";
2
2
  import { a as renderTopFrameWithLayout, i as renderTopFrame, n as runTopApp, r as loadTopSnapshot, t as renderTopOnce } from "../top-app-KgIFpD9H.js";
3
3
  export { loadTopSnapshot, provisionSupervisor, renderTopFrame, renderTopFrameWithLayout, renderTopOnce, runTopApp };
@@ -1735,32 +1735,28 @@ interface SpawnOpts {
1735
1735
  * idempotent per key: once a child spawned under a key settles `done` — in this process or in a
1736
1736
  * journaled prior one — spawning the same key returns that committed result (`prior.state:
1737
1737
  * 'completed'`) instead of paying for the work again. A key whose prior attempt settled `down`
1738
- * or was journaled as started-but-never-settled spawns FRESH but says so explicitly
1739
- * (`prior.state: 'retried' | 'lost'`), and a key that is currently LIVE is refused
1740
- * (`'duplicate-key'`) the same assignment can never run twice concurrently. Unkeyed spawns
1741
- * (the default) are position-identified and always run.
1738
+ * spawns fresh and says so explicitly (`prior.state: 'retried'`). A key whose prior attempt was
1739
+ * journaled as started but never settled is refused (`'in-doubt'`): the remote execution may
1740
+ * still exist and must be recovered before replacement. A key that is currently LIVE is refused
1741
+ * (`'duplicate-key'`). Unkeyed spawns (the default) are position-identified and always run.
1742
1742
  */
1743
1743
  readonly key?: string;
1744
1744
  }
1745
1745
  /** Fail-closed spawn rejections: an exhausted pool, a dollar request against a root that budgets
1746
- * no dollars, an exceeded recursion ceiling, a full tree-wide worker allocation, or a `key` that
1747
- * is still LIVE in this scope (the same assignment may not run twice concurrently).
1746
+ * no dollars, an exceeded recursion ceiling, a full tree-wide worker allocation, a `key` that is
1747
+ * still LIVE in this scope, or a key whose prior remote execution has no terminal receipt.
1748
1748
  *
1749
1749
  * `usd-unbudgeted` is separate from `budget-exhausted` because the two call for opposite
1750
1750
  * responses: an exhausted pool may admit a smaller request, while an unbudgeted dollar channel
1751
1751
  * refuses every amount until the ROOT budget names a `maxUsd`. */
1752
- type SpawnRejection = 'budget-exhausted' | 'usd-unbudgeted' | 'depth-exceeded' | 'duplicate-key' | 'invalid-identity' | 'key-conflict' | 'max-live-workers' | 'scope-aborted';
1752
+ type SpawnRejection = 'budget-exhausted' | 'usd-unbudgeted' | 'depth-exceeded' | 'duplicate-key' | 'in-doubt' | 'invalid-identity' | 'key-conflict' | 'max-live-workers' | 'scope-aborted';
1753
1753
  /**
1754
1754
  * What a KEYED spawn resolved to when the key had a prior attempt. Absent on a fresh key (and on
1755
1755
  * every unkeyed spawn). `'completed'` is the exactly-once path: NOTHING was spawned — the handle
1756
- * references the prior settled node and `settled` is the committed result. `'retried'` /
1757
- * `'lost'` DID spawn fresh: the prior attempt settled `down` (retried) or was journaled as
1758
- * started but never settled the process died with it in flight and the built-in executors
1759
- * cannot re-attach to a dead process's work, so the result is explicitly in doubt (lost), never
1760
- * silently duplicated. On restart, an in-doubt attempt's full declared reservation is charged and
1761
- * its telemetry remains unknown; a fresh retry is admitted only from safely remaining capacity.
1762
- * An executor that CAN re-attach to a still-running external execution extends this union with an
1763
- * adoption state; none of the built-ins can today.
1756
+ * references the prior settled node and `settled` is the committed result. `'retried'` DID spawn
1757
+ * fresh because the prior attempt settled `down`. A start with no terminal receipt is not a prior
1758
+ * result: `spawn` refuses it as `'in-doubt'`, retains its charged reservation, and requires exact
1759
+ * recovery before a replacement can run.
1764
1760
  */
1765
1761
  type SpawnPrior<Out = unknown> = {
1766
1762
  readonly state: 'completed';
@@ -1771,9 +1767,6 @@ type SpawnPrior<Out = unknown> = {
1771
1767
  readonly state: 'retried';
1772
1768
  readonly priorId: NodeId;
1773
1769
  readonly reason: string;
1774
- } | {
1775
- readonly state: 'lost';
1776
- readonly priorId: NodeId;
1777
1770
  };
1778
1771
  /**
1779
1772
  * A live child handle. `abort()` is defined over the ACQUIRE lifecycle: it chains into
@@ -2023,9 +2016,9 @@ interface ResumedWork<Out> {
2023
2016
  /**
2024
2017
  * Keyed assignments from the prior journal: `SpawnOpts.key` → what the journal proves about it.
2025
2018
  * `completed`/`down` carry the rehydrated settlement; `in-doubt` means the spawn was journaled
2026
- * but no settlement ever landed — the process died with it in flight. `Scope.spawn` consults
2027
- * this so a keyed re-spawn resolves instead of duplicating (see `SpawnOpts.key`). Empty when no
2028
- * prior spawn carried a key.
2019
+ * but no settlement ever landed — the process died with it in flight. `Scope.spawn` refuses a
2020
+ * keyed replacement in that state, rather than duplicate a possibly live remote execution. Empty
2021
+ * when no prior spawn carried a key.
2029
2022
  */
2030
2023
  readonly keys: ReadonlyMap<string, ResumedKeyState<Out>>;
2031
2024
  /**
@@ -2374,13 +2367,13 @@ interface SupervisorOpts {
2374
2367
  readonly maxRestarts?: number;
2375
2368
  readonly withinMs?: number;
2376
2369
  /**
2377
- * How long live children may keep running after the ROOT DRIVER FAILED, before the join barrier
2378
- * cascades the abort into them (#741). A root that dies did not make its children unhealthy: a
2379
- * child mid-unit holds work already paid for, and killing it instantly discards everything it has
2380
- * not yet written. The window applies ONLY to a driver failure on an un-cancelled run, and never
2381
- * extends past the run's own deadline. Omit/`0` = the historical immediate teardown.
2370
+ * How long live children may keep running after the root driver returns or fails, before the join
2371
+ * barrier cascades the abort into them (#741). A child mid-unit holds work already paid for, and
2372
+ * killing it instantly discards everything it has not yet written. `null` waits until children
2373
+ * settle or the caller cancels. An explicit run deadline always wins. Omit/`0` = immediate
2374
+ * teardown.
2382
2375
  */
2383
- readonly childSettleGraceMs?: number;
2376
+ readonly childSettleGraceMs?: number | null;
2384
2377
  /**
2385
2378
  * Opt into RESUME-FIRST: read any prior journal tree for this `runId` BEFORE beginning a fresh
2386
2379
  * one, and when a non-empty tree exists rehydrate its committed work onto `Scope.resume`
@@ -2625,4 +2618,4 @@ interface WidenGate<Out> {
2625
2618
  }
2626
2619
  //#endregion
2627
2620
  export { SupervisorOpts as $, RetainedRunEnvironmentAdmission as $n, sanitizeAgentRuntimeEvent as $t, ProviderModelAttemptEvidence as A, RecoverRetainedInteractiveRunOptions as An, OtelExporter as At, Scope as B, RecoverRetainedRunIntentOptions as Bn, loopEventToOtelSpan as Bt, MaterializedModelIdentity as C, DEFAULT_STALL_AFTER_MS as Cn, EvalRunGeneration as Ct, NodeSnapshot as D, createActivityLog as Dn, LoopSpanNode as Dt, NodeId as E, WorkerProgress as En, INTELLIGENCE_WIRE_VERSION as Et, RootHandle as F, StartRetainedInteractiveRunOptions as Fn, buildRuntimeEventOtelSpans as Ft, SpawnPrior as G, RetainedInteractiveIntentAdmission as Gn, RuntimeStreamEventCollector as Gt, SpawnEvent as H, RecoverRetainedRunResult as Hn, padTraceId as Ht, RootMaterialization as I, NativeContextContinuationExecution as In, createOpenInferenceFileExporter as It, SpendChannel as J, RetainedRunAdmissionHook as Jn, RuntimeTelemetryOptions as Jt, SpawnRejection as K, RetainedInteractiveStartedAdmission as Kn, RuntimeStreamEventSink as Kt, RootProviderModelEvidence as L, NativeContextContinuationHandle as Ln, createOtelExporter as Lt, ResultBlobStore as M, RetainedInteractiveEnvironmentInput as Mn, RuntimeEventOtelOptions as Mt, ResumedKeyState as N, RetainedInteractiveRunHandle as Nn, buildLoopOtelSpans as Nt, NodeStatus as O, readWorkerProgress as On, OtelAttribute as Ot, ResumedWork as P, RetainedInteractiveStartMaterial as Pn, buildLoopSpanNodes as Pt, Supervisor as Q, RetainedRunEffect as Qn, createRuntimeStreamEventCollector as Qt, RootSignal as R, NativeContextContinuationInput as Rn, exportEvalRuns as Rt, MaterializedExecutionIdentity as S, ActivityNote as Sn, EvalRunEvent as St, NodeExecutionIdentity as T, ScopeProgressInput as Tn, EvalRunsExportResult as Tt, SpawnJournal as U, RetainedInteractiveAdmission as Un, toOtelAttributes as Ut, Settled as V, RecoverRetainedRunOptions as Vn, padSpanId as Vt, SpawnOpts as W, RetainedInteractiveEnvironmentAdmission as Wn, RuntimeEventCollector as Wt, SteerableRootHandle as X, RetainedRunCancellation as Xn, SanitizedKnowledgeRequirement as Xt, SpendGap as Y, RetainedRunCancelOptions as Yn, SanitizedKnowledgeReadinessReport as Yt, SupervisedResult as Z, RetainedRunDispatchedAdmission as Zn, createRuntimeEventCollector as Zt, ExecutorRegistry as _, TraceSource as _n, TraceContext as _t, DefaultVerdict as a, WaitProbeRegistry as an, RetainedRunStartMaterial as ar, WaitOpts as at, ExecutorToolCall as b, sandboxSessionTraceSource as bn, readTraceContextFromEnv as bt, ExecutorAccounting as c, createWaitProbes as cn, StartRetainedRunOptions as cr, WorkerInteractiveUnavailableReason as ct, ExecutorContext as d, timerAt as dn, WorkerTraceResolver as dt, sanitizeKnowledgeReadinessReport as en, RetainedRunEventOptions as er, TokenUsageProvenance as et, ExecutorExecutionBinding as f, validateWaitSpec as fn, WorkerTraceSeamCarrier as ft, ExecutorProgressEvent as g, ToolStepInput as gn, workerTraceSeamKey as gt, ExecutorNodeContext as h, SessionTraceBox as hn, workerTraceHeaders as ht, Budget as i, WaitProbe as in, RetainedRunSnapshot as ir, UsageEvent as it, ProviderModelExecutionEvidence as j, RetainedInteractiveAdmissionHook as jn, OtelSpan as jt, ProfileMaterializationReceipt as k, ReconnectRetainedInteractiveRunOptions as kn, OtelExportConfig as kt, ExecutorCancellation as l, isWaitOutcome as ln, WorkerTraceEvidence as lt, ExecutorMaterialization as m, SessionMessageLike as mn, workerTraceEnv as mt, AgentExecutionRef as n, PendingWait as nn, RetainedRunIntentAdmission as nr, UnconfirmedTeardown as nt, ExecutionBindingReceipt as o, WaitRejection as on, RetainedRunTurnInput as or, WidenGate as ot, ExecutorFactory as p, waitUntil as pn, readWorkerTraceContext as pt, Spend as q, RetainedRunAdmission as qn, RuntimeStreamEventSummary as qt, AgentSpec as r, WaitOutcome as rn, RetainedRunReplayPoint as rr, UnknownMaterializationReason as rt, Executor as s, WaitSpec as sn, StartRetainedRunInEnvironmentOptions as sr, WorkerInteractiveSession as st, Agent as t, sanitizeRuntimeStreamEvent as tn, RetainedRunHandle as tr, TreeView as tt, ExecutorCancellationRequest as u, pollFor as un, WorkerTraceUnavailableReason as ut, ExecutorResult as v, createPushTraceSource as vn, createPropagatingTraceEmitter as vt, NoWinnerError as w, ExecutorProgress as wn, EvalRunsExportConfig as wt, Handle as x, ActivityLog as xn, traceContextToEnv as xt, ExecutorTeardownWarning as y, decodeToolPart as yn, mergeTraceEnv as yt, Runtime as z, ReconnectRetainedRunOptions as zn, generateSpanId as zt };
2628
- //# sourceMappingURL=types-DKA_PDv0.d.ts.map
2621
+ //# sourceMappingURL=types-CGez_ZHQ.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.192.5",
3
+ "version": "0.193.1",
4
4
  "description": "Shared task-lifecycle skeleton for agents: a recursive loop kernel for chat turns, one-shot tasks, and multi-attempt loops, with trace capture and eval-gated self-improvement. Domain behavior lives in adapters; scoring and ship-gates in @tangle-network/agent-eval.",
5
5
  "homepage": "https://github.com/tangle-network/agent-runtime#readme",
6
6
  "repository": {
@@ -1,43 +1,92 @@
1
1
  ---
2
2
  name: supervise
3
- description: Drive worker agents with explicit profiles, corrections, budgets, and checked delivery.
3
+ description: Author and drive recursive AgentProfiles with durable assignments, evidence, and recovery.
4
4
  ---
5
5
 
6
6
  # Supervise
7
7
 
8
- Use this policy only when the running agent has the coordination tools, including `spawn_worker` and `await_event`.
9
- The supervisor plans and checks work; workers produce the artifacts.
8
+ Use this when Runtime coordination tools are attached.
9
+ Author agents that can perform the work, then drive them from checked evidence.
10
10
 
11
- ## Run The Work
11
+ ## Keep policy in its owner
12
12
 
13
- 1. Split the job into independent deliverables with observable completion checks.
14
- 2. Call `spawn_worker` with a focused task and a complete worker profile.
15
- 3. Assign each worker only the tools, context, authority, and budget it needs.
16
- 4. Use `await_event` to collect questions, findings, progress, and settlements.
17
- 5. Answer blocking questions or steer the responsible worker with specific evidence.
18
- 6. When work fails, change the task, profile, evidence, or approach before spawning a replacement.
19
- 7. Accept only a settlement whose declared check passed and whose artifact can be inspected.
20
- 8. Stop when every required deliverable is accepted or a named limit or blocker is reached.
13
+ Put research choices, methods, revision rules, and scientific stopping conditions in each profile's prompt.
14
+ Runtime owns recursion depth, the shared budget, cancellation, concurrency, journals, retries, and recovery.
21
15
 
22
- A worker profile names its role, task, relevant skills or system instructions, model constraints, tools, budget, expected artifact, and completion check.
23
- Do not spawn empty profiles or blind retries.
16
+ `AgentProfile` has no `policy`, `budget`, `continuity`, `key`, or `deliverable` field.
17
+ Pass budget, continuity, and assignment keys to `spawn_worker`.
18
+ The caller configures the root budget and completion check in `SuperviseOptions`.
19
+ Do not claim a limit is enforced because it appears in prompt text or metadata.
24
20
 
25
- ## Parallel And Recursive Work
21
+ ## Author a descendant
26
22
 
27
- Run independent workers concurrently when their state and side effects are isolated.
28
- Use one worktree per repository-writing worker.
29
- Give external writes stable idempotency keys.
23
+ Write a valid `AgentProfile`, not a prose description of one.
24
+ Use only fields the selected backend can materialize.
30
25
 
31
- A worker may itself supervise only when its profile includes this policy and the runtime grants coordination tools.
32
- Child workers inherit stricter authority and budget limits than their parent.
26
+ ```json
27
+ {
28
+ "name": "source-skeptic-v1",
29
+ "description": "Challenge one candidate claim against primary evidence.",
30
+ "prompt": {
31
+ "appendSystemPrompt": "Return a claim table with source locations, contradictions, unknowns, and a reproducible rejection check."
32
+ },
33
+ "model": {
34
+ "default": "<allowed-model-id>",
35
+ "reasoningEffort": "xhigh"
36
+ },
37
+ "metadata": {
38
+ "role": "driver"
39
+ }
40
+ }
41
+ ```
33
42
 
34
- ## Completion
43
+ The example shows placement, not required values.
44
+ Use `metadata.role: 'driver'` only when this child should author and supervise descendants.
45
+ Omit that role for a leaf.
35
46
 
36
- Report worker IDs, assignments, accepted artifacts, failed or cancelled work, spend, unresolved questions, and the exact checks run.
37
- The supervisor cannot turn an unchecked worker claim into completion.
47
+ The task argument names the concrete artifact and a check that can fail.
48
+ The profile names how the agent works and which capabilities it receives.
49
+ Together they must leave no acceptance criterion for the worker to invent.
50
+
51
+ ## Drive the tree
52
+
53
+ 1. Split the objective into independent checked artifacts.
54
+ 2. Start each new assignment with a stable semantic `key` and a deliberate per-spawn `budget`.
55
+ 3. Fill available parallel capacity while `freeSlots > 0` and distinct useful assignments remain.
56
+ 4. Pull settlements and findings with `await_event`.
57
+ A bounded wait returns control; it does not prove failure.
58
+ 5. Inspect a quiet or `stalled` worker with `observe_agent`.
59
+ Steer only when its recorded work shows a wrong path, missing requirement, or useful new evidence.
60
+ 6. Check every settled artifact before using it.
61
+ Feed accepted results, contradictions, and negative results into the next profile or task revision.
62
+ 7. After a refusal or failed check, preserve the attempt and author a materially changed profile or assignment.
63
+ 8. Use `continuity: 'resume'` only to continue the most recent settled worker with the same profile name.
64
+ A resume is a new execution and cannot carry a run-once `key`.
65
+ 9. After recovery, call `read_journal` and reconcile Runtime's restored roster, settlements, questions, findings, and spend before spawning.
66
+ Completed keys resolve to their committed results; do not replace them.
67
+
68
+ Do not add a deadline because a worker is quiet.
69
+ Stop research only at checked success, a declared resource limit, cancellation, or a demonstrated dead end.
70
+
71
+ ## Accept delivery
72
+
73
+ Inspect the artifact and its independent completion result.
74
+ Preserve exact profile identities, assignment keys, parent-child links, continuations, costs, failures, and unknown accounting.
75
+ Worker prose cannot promote its own result.
76
+
77
+ Use `submit_result` only when the attached completion check can validate the root's own artifact.
78
+ Calling `stop` ends coordination; it does not turn missing evidence into success.
79
+
80
+ ## Exact contracts
81
+
82
+ When a field is unclear, read the owner instead of inventing it:
83
+
84
+ - [`AgentProfile`](https://github.com/tangle-network/agent-sdk/blob/main/packages/agent-interface/src/agent-profile.ts) and its [exact schema](https://github.com/tangle-network/agent-sdk/blob/main/packages/agent-interface/src/profile-schema.ts) own authored fields.
85
+ - [`spawn_worker` tool schema](https://github.com/tangle-network/agent-runtime/blob/main/src/mcp/tools/coordination.ts) owns per-assignment arguments.
86
+ - [`SuperviseOptions`](https://github.com/tangle-network/agent-runtime/blob/main/src/runtime/supervise/supervise.ts) owns root execution policy.
38
87
 
39
88
  ## Then consider
40
89
 
41
- - `build-with-agent-runtime` when this policy should become a reusable product integration.
42
- - `eval-engineering` when worker acceptance needs a new executable case.
43
- - `verify` after the accepted artifacts are assembled.
90
+ - `build-with-agent-runtime` when a product must configure the Runtime-owned limits and adapters.
91
+ - `eval-engineering` when no existing check can separate success from failure.
92
+ - `verify` after every required artifact passes its independent check.