@tangle-network/agent-runtime 10.0.23 → 10.0.24

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 (81) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{activation-D_J9qCzU.js → activation-DLbBM2S0.js} +2 -2
  3. package/dist/{activation-D_J9qCzU.js.map → activation-DLbBM2S0.js.map} +1 -1
  4. package/dist/{activation-DOzkzTrl.d.ts → activation-DUYtmQH_.d.ts} +2 -2
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +3 -3
  7. package/dist/{delegate-DCZPcYy8.js → delegate-Cz2GF_z7.js} +2 -2
  8. package/dist/{delegate-DCZPcYy8.js.map → delegate-Cz2GF_z7.js.map} +1 -1
  9. package/dist/{driver-control-acknowledgers-CgGt3NcX.js → driver-control-acknowledgers-pDEPMuML.js} +7 -7
  10. package/dist/{driver-control-acknowledgers-CgGt3NcX.js.map → driver-control-acknowledgers-pDEPMuML.js.map} +1 -1
  11. package/dist/durable-writer-thread.js +2 -2
  12. package/dist/durable.d.ts +1 -1
  13. package/dist/durable.js +14 -13
  14. package/dist/durable.js.map +1 -1
  15. package/dist/{graph-B3pBmvnf.js → graph-D-LVPqrm.js} +7 -6
  16. package/dist/{graph-B3pBmvnf.js.map → graph-D-LVPqrm.js.map} +1 -1
  17. package/dist/{improve-DhOOHHRz.js → improve-BJW9OcEn.js} +5 -5
  18. package/dist/{improve-DhOOHHRz.js.map → improve-BJW9OcEn.js.map} +1 -1
  19. package/dist/index.d.ts +41 -6
  20. package/dist/index.js +55 -21
  21. package/dist/index.js.map +1 -1
  22. package/dist/intelligence.d.ts +2 -2
  23. package/dist/intelligence.js +4 -4
  24. package/dist/kernel.d.ts +1 -1
  25. package/dist/kernel.js +15 -15
  26. package/dist/{loop-runner-L594gDYR.js → loop-runner-BZWObfqa.js} +2 -2
  27. package/dist/{loop-runner-L594gDYR.js.map → loop-runner-BZWObfqa.js.map} +1 -1
  28. package/dist/{loop-runner-CcXKPnMR.d.ts → loop-runner-ClANio8o.d.ts} +2 -2
  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 +1 -1
  33. package/dist/mcp/index.js +6 -6
  34. package/dist/mcp/memory-bin.js +1 -1
  35. package/dist/profiles.d.ts +1 -1
  36. package/dist/{provision-supervisor-Be-6HBsX.js → provision-supervisor-ChGKJz8s.js} +5 -5
  37. package/dist/{provision-supervisor-Be-6HBsX.js.map → provision-supervisor-ChGKJz8s.js.map} +1 -1
  38. package/dist/{result-blob-store-CJjp44Mz.js → result-blob-store-BZwRmrFF.js} +2 -2
  39. package/dist/{result-blob-store-CJjp44Mz.js.map → result-blob-store-BZwRmrFF.js.map} +1 -1
  40. package/dist/{run-cancellation-BNBmsY3a.js → run-cancellation-uCwV2Ra7.js} +2 -2
  41. package/dist/{run-cancellation-BNBmsY3a.js.map → run-cancellation-uCwV2Ra7.js.map} +1 -1
  42. package/dist/{run-reopen-Cr2SHmYa.js → run-reopen-YJwUAmv6.js} +6 -6
  43. package/dist/{run-reopen-Cr2SHmYa.js.map → run-reopen-YJwUAmv6.js.map} +1 -1
  44. package/dist/{run-state-Bko0BF0_.js → run-state-6jJzk6gB.js} +5 -5
  45. package/dist/{run-state-Bko0BF0_.js.map → run-state-6jJzk6gB.js.map} +1 -1
  46. package/dist/{runtime-Dfwc9cjt.js → runtime-Ddkn1wRr.js} +15 -15
  47. package/dist/{runtime-Dfwc9cjt.js.map → runtime-Ddkn1wRr.js.map} +1 -1
  48. package/dist/{search-executor-DnWnh4kj.js → search-executor-D9E9q-Pv.js} +4 -4
  49. package/dist/{search-executor-DnWnh4kj.js.map → search-executor-D9E9q-Pv.js.map} +1 -1
  50. package/dist/{server-RCsa_gyH.js → server-BhXz3JyW.js} +4 -4
  51. package/dist/{server-RCsa_gyH.js.map → server-BhXz3JyW.js.map} +1 -1
  52. package/dist/{settle-record-BlIw2MU1.js → settle-record-DWae7fwV.js} +2 -2
  53. package/dist/{settle-record-BlIw2MU1.js.map → settle-record-DWae7fwV.js.map} +1 -1
  54. package/dist/{structural-rollout-BLflx9cs.js → structural-rollout-BL8KLLw8.js} +4 -4
  55. package/dist/{structural-rollout-BLflx9cs.js.map → structural-rollout-BL8KLLw8.js.map} +1 -1
  56. package/dist/{supervise-037R-zl1.js → supervise-C7mDlK7S.js} +10 -7
  57. package/dist/supervise-C7mDlK7S.js.map +1 -0
  58. package/dist/{supervise-identity-CtxWEk1I.js → supervise-identity-DLPzZTp3.js} +2 -2
  59. package/dist/{supervise-identity-CtxWEk1I.js.map → supervise-identity-DLPzZTp3.js.map} +1 -1
  60. package/dist/{supervision-discovery-DKxqbnHf.js → supervision-discovery-8XnVtdOD.js} +3 -3
  61. package/dist/{supervision-discovery-DKxqbnHf.js.map → supervision-discovery-8XnVtdOD.js.map} +1 -1
  62. package/dist/{supervisor-DL4hO7UW.js → supervisor-BQwg_3T0.js} +494 -28
  63. package/dist/supervisor-BQwg_3T0.js.map +1 -0
  64. package/dist/{supervisor-accounting-DlDUl58C.js → supervisor-accounting-B0ofgTZX.js} +91 -14
  65. package/dist/supervisor-accounting-B0ofgTZX.js.map +1 -0
  66. package/dist/{supervisor-root-contract-BCbu1A4n.js → supervisor-root-contract-N7rW4Ynu.js} +3 -3
  67. package/dist/{supervisor-root-contract-BCbu1A4n.js.map → supervisor-root-contract-N7rW4Ynu.js.map} +1 -1
  68. package/dist/testing.d.ts +1 -1
  69. package/dist/testing.js +11 -11
  70. package/dist/{tool-server-n4XYpCok.js → tool-server-I63dnHZC.js} +39 -3
  71. package/dist/{tool-server-n4XYpCok.js.map → tool-server-I63dnHZC.js.map} +1 -1
  72. package/dist/{top-web-B-sHmI3g.js → top-web-BZM3es-m.js} +7 -7
  73. package/dist/{top-web-B-sHmI3g.js.map → top-web-BZM3es-m.js.map} +1 -1
  74. package/dist/tui/bin.js +3 -3
  75. package/dist/tui/index.d.ts +1 -1
  76. package/dist/tui/index.js +2 -2
  77. package/dist/{types-Pi5uCS88.d.ts → types-CByvdC7k.d.ts} +54 -39
  78. package/package.json +1 -1
  79. package/dist/supervise-037R-zl1.js.map +0 -1
  80. package/dist/supervisor-DL4hO7UW.js.map +0 -1
  81. package/dist/supervisor-accounting-DlDUl58C.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { c as publishExclusiveFenced, f as writeAtomicFenced, i as appendRunLinesFenced, p as becomeDurableWriter, t as appendDurableFenced, w as runWithWriteClaim } from "./durable-file-pao7FijS.js";
2
- import { a as closeStreamFile, c as openStreamFileFenced, d as syncStreamFileFenced, f as writeStreamLinesFenced } from "./supervisor-accounting-DlDUl58C.js";
2
+ import { a as closeStreamFile, c as openStreamFileFenced, d as syncStreamFileFenced, f as writeStreamLinesFenced } from "./supervisor-accounting-B0ofgTZX.js";
3
3
  import { i as prepareJsonlTailFenced, u as appendCommittedLine } from "./jsonl-file-B2ESMrTh.js";
4
4
  import { i as acquireRunLockFenced, o as releaseRunLockFenced } from "./run-lock-Dcr79Wql.js";
5
- import { n as makeRunDirectoryFenced, r as reopenSettleFenced } from "./run-reopen-Cr2SHmYa.js";
5
+ import { n as makeRunDirectoryFenced, r as reopenSettleFenced } from "./run-reopen-YJwUAmv6.js";
6
6
  import { parentPort, workerData } from "node:worker_threads";
7
7
  // src/durable/durable-writer-thread.ts
8
8
  /**
package/dist/durable.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $d as PursuitNodeProjection, $m as CoordinationRejectReason, Ab as QuestionEscalationOutcome, Bb as AuthorizedDownMessage, Bd as VersionVerdict, Da as SupervisedResult, Db as EscalateQuestion, Ea as RootStreamReceipt, F as NodeId, Fd as PursuitVersionChain, Gd as SupervisedPursuitResult, Gm as CoordinationAuthentication, Gp as ParkedRun, Hb as ContinuityMode, Hd as SuperviseGraphPursuitOptions, Id as PursuitVersionStop, Jd as RunReopen, Jm as CoordinationPublicAddress, Jp as RunParkingRecord, Kd as superviseGraphPursuit, Kp as RunParkedError, Ld as PursuitVersions, Md as JudgedPursuitVersion, Nd as NextPursuitVersion, Pd as NextPursuitVersionInput, Qd as PursuitNodePlatform, Qm as CoordinationHttpAudit, Rd as SettledPursuitVersion, Sf as WorkerSlots, Ub as DownMessageAuthorizationInput, Ud as SupervisePursuitError, Vd as assertPursuitVersions, Wd as SupervisePursuitOptions, Wp as DeadlineCheckIn, Xd as PursuitCostProvenance, Xm as CoordinationTransportOptions, Yb as MapOnSettleRoute, Yd as PursuitObserverDelivery, Ym as CoordinationReadAccess, Yp as readRunParking, Zd as PursuitNodeCost, _S as readRunState, _p as SelectSeat, af as PursuitStatus, cf as ObserverJournal, dS as SpawnJournalReadOptions, df as observerRecordDigest, dr as readRootStream, ef as PursuitNodeTiming, fS as SpawnJournalReadRecord, ff as PursuitFork, fr as readRootStreamReceipt, gS as RunState, gb as WorkerWatchOptions, gm as ResolveDriveHarness, hp as SeatSelectionInput, if as PursuitRunTotals, lf as ObserverRecord, mS as readSpawnJournal, mm as DriveHarnessOwnerContext, mp as SeatSelection, nf as PursuitProjection, o_ as ToolLoopCompactionOptions, of as projectPursuit, ow as LoopTokenUsage, pS as SpawnJournalReadResult, pf as RUN_FORK_CORRELATION_KEYS, q as RetainedPendingCause, qd as supervisePursuit, qp as RunParkingPolicy, rf as PursuitRunProjection, sf as FileObserverJournal, tf as PursuitNodeUsage, uS as SpawnJournalCursor, uf as ObserverRecordKind, ur as RootStreamRecord, vf as AuthorizedSpawn, wm as ManagerWakePolicy, yf as AuthorizedSpawnContext, zd as VersionJudge, zx as AnalyzeOnSettleRoute } from "./types-Pi5uCS88.js";
1
+ import { $d as PursuitProjection, $m as CoordinationRejectReason, Ab as QuestionEscalationOutcome, Ad as NextPursuitVersion, Bb as AuthorizedDownMessage, Bd as SupervisePursuitError, Ca as RootStreamReceipt, Db as EscalateQuestion, F as NodeId, Fd as SettledPursuitVersion, Gd as RunReopen, Gm as CoordinationAuthentication, Gp as RunParkingRecord, Hb as ContinuityMode, Hd as SupervisedPursuitResult, Hp as ParkedRun, Id as VersionJudge, Jd as PursuitNodeCost, Jm as CoordinationPublicAddress, Kd as PursuitObserverDelivery, Kp as readRunParking, Ld as VersionVerdict, Md as PursuitVersionChain, Nd as PursuitVersionStop, Pd as PursuitVersions, Qd as PursuitNodeUsage, Qm as CoordinationHttpAudit, Rd as assertPursuitVersions, Ub as DownMessageAuthorizationInput, Ud as superviseGraphPursuit, Up as RunParkedError, Vd as SupervisePursuitOptions, Vp as DeadlineCheckIn, Wd as supervisePursuit, Wp as RunParkingPolicy, Xd as PursuitNodeProjection, Xm as CoordinationTransportOptions, Yb as MapOnSettleRoute, Yd as PursuitNodePlatform, Ym as CoordinationReadAccess, Zd as PursuitNodeTiming, _S as readRunState, af as ObserverJournal, am as RootStreamRecord, cf as observerRecordDigest, dS as SpawnJournalReadOptions, dp as SeatSelection, ef as PursuitRunProjection, fS as SpawnJournalReadRecord, fp as SeatSelectionInput, gS as RunState, gb as WorkerWatchOptions, gf as AuthorizedSpawnContext, gm as ResolveDriveHarness, hf as AuthorizedSpawn, if as FileObserverJournal, jd as NextPursuitVersionInput, kd as JudgedPursuitVersion, lf as PursuitFork, mS as readSpawnJournal, mm as DriveHarnessOwnerContext, mp as SelectSeat, nf as PursuitStatus, o_ as ToolLoopCompactionOptions, of as ObserverRecord, om as readRootStream, ow as LoopTokenUsage, pS as SpawnJournalReadResult, q as RetainedPendingCause, qd as PursuitCostProvenance, rf as projectPursuit, sf as ObserverRecordKind, sm as readRootStreamReceipt, tf as PursuitRunTotals, uS as SpawnJournalCursor, uf as RUN_FORK_CORRELATION_KEYS, wa as SupervisedResult, wm as ManagerWakePolicy, yf as WorkerSlots, zd as SuperviseGraphPursuitOptions, zx as AnalyzeOnSettleRoute } from "./types-CByvdC7k.js";
2
2
  import { n as RuntimeDecisionKind, r as RuntimeDecisionPoint, t as RuntimeDecisionEvidenceRef } from "./runtime-hooks-DPghSHV7.js";
3
3
  import { a as ChatTurnProducer, c as handleChatTurn, i as ChatTurnIdentity, n as ChatStreamEvent, o as ChatTurnResult, r as ChatTurnHooks, s as RunChatTurnInput, t as deriveExecutionId } from "./execution-handle-CujvqgCn.js";
4
4
  import { AgentProfile } from "@tangle-network/agent-interface";
package/dist/durable.js CHANGED
@@ -1,22 +1,22 @@
1
- import { Fn as FileObserverJournal, In as createFileObserverHooks, Ln as observerRecordDigest, T as supervisorRunDir, X as FileSpawnJournal, Xr as authoredProfileDigest, l as readRootStream, ln as loadSpawnForest, u as readRootStreamReceipt } from "./supervisor-accounting-DlDUl58C.js";
2
- import { c as readRunParking, r as RunParkedError } from "./supervisor-DL4hO7UW.js";
1
+ import { In as FileObserverJournal, Ln as createFileObserverHooks, Rn as observerRecordDigest, T as supervisorRunDir, X as FileSpawnJournal, Zr as authoredProfileDigest, l as readRootStream, u as readRootStreamReceipt, un as loadSpawnForest } from "./supervisor-accounting-B0ofgTZX.js";
2
+ import { c as readRunParking, r as RunParkedError } from "./supervisor-BQwg_3T0.js";
3
3
  import { n as handleChatTurn, t as deriveExecutionId } from "./execution-handle-Bd2_nUB6.js";
4
- import { n as projectPursuit, t as discoverDurableSupervisionRun } from "./supervision-discovery-DKxqbnHf.js";
4
+ import { n as projectPursuit, t as discoverDurableSupervisionRun } from "./supervision-discovery-8XnVtdOD.js";
5
5
  import { a as applyExactAgentProfileDiff } from "./profile-Cxl_Ajl2.js";
6
6
  import { f as RuntimeRunStateError, m as ValidationError } from "./errors-DG8yufqX.js";
7
7
  import { _ as failedItems, t as isNoEntError, v as isFiniteNumber } from "./jsonl-file-B2ESMrTh.js";
8
8
  import { c as errorMessage, o as cloneTokenUsage } from "./util-qsH5cC9S.js";
9
- import { a as readFailureRecord, c as writeFailureRecord, i as parseSettleRecord, l as writeSettleRecord, n as SETTLE_RECORD_FILE, o as readSettleRecord, r as SettledRunDirectoryError, t as FAILURE_RECORD_FILE } from "./settle-record-BlIw2MU1.js";
10
- import { c as ASSISTANT_REASONING_SPAN, d as runToolSpans, t as supervise, u as rootStreamToolSpans, y as superviseRootProfile } from "./supervise-037R-zl1.js";
11
- import { R as contentAddress, i as runtimeFailureCause } from "./tool-server-n4XYpCok.js";
9
+ import { a as readFailureRecord, c as writeFailureRecord, i as parseSettleRecord, l as writeSettleRecord, n as SETTLE_RECORD_FILE, o as readSettleRecord, r as SettledRunDirectoryError, t as FAILURE_RECORD_FILE } from "./settle-record-DWae7fwV.js";
10
+ import { c as ASSISTANT_REASONING_SPAN, d as runToolSpans, t as supervise, u as rootStreamToolSpans, y as superviseRootProfile } from "./supervise-C7mDlK7S.js";
11
+ import { R as contentAddress, i as runtimeFailureCause } from "./tool-server-I63dnHZC.js";
12
12
  import { a as readRunDirectoryLock, n as RunDirectoryLockedError, r as acquireRunDirectoryLock, s as runDirectoryHolderIsLive, t as RUN_DIRECTORY_LOCK_FILE } from "./run-lock-Dcr79Wql.js";
13
13
  import { a as errMessage, f as defaultRedactor, i as causeChain, u as providerTraceId } from "./snapshot-BKLziJ5K.js";
14
- import { t as FileResultBlobStore } from "./result-blob-store-CJjp44Mz.js";
15
- import { n as readSpawnJournal, t as readRunState } from "./run-state-Bko0BF0_.js";
16
- import { s as rootCoordinationOwner, u as FileCoordinationLog } from "./supervise-identity-CtxWEk1I.js";
17
- import { i as superviseAgentGraph, s as graphExecutionOptions } from "./graph-B3pBmvnf.js";
14
+ import { t as FileResultBlobStore } from "./result-blob-store-BZwRmrFF.js";
15
+ import { n as readSpawnJournal, t as readRunState } from "./run-state-6jJzk6gB.js";
16
+ import { s as rootCoordinationOwner, u as FileCoordinationLog } from "./supervise-identity-DLPzZTp3.js";
17
+ import { i as superviseAgentGraph, s as graphExecutionOptions } from "./graph-D-LVPqrm.js";
18
18
  import { a as withPursuitContext, t as composeRuntimeHooks } from "./runtime-hooks-CsW2pfFk.js";
19
- import { i as reopenSettledRun, t as assertRunReopen } from "./run-reopen-Cr2SHmYa.js";
19
+ import { i as reopenSettledRun, t as assertRunReopen } from "./run-reopen-YJwUAmv6.js";
20
20
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256Bytes } from "@tangle-network/agent-interface";
21
21
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
22
22
  import { access, readFile, realpath } from "node:fs/promises";
@@ -1398,7 +1398,8 @@ var SupervisePursuitError = class extends Error {
1398
1398
  * Each `runDir` owns its lock and journals; Intelligence joins directories by `pursuitId`.
1399
1399
  * Agents never receive the observer path or projection.
1400
1400
  *
1401
- * `result.json` seals a segment and refuses re-entry before compute; `failure.json` records
1401
+ * `result.json` seals a segment and refuses re-entry before compute unless an explicit `reopen`
1402
+ * continues it from the workspace settlement kept; `failure.json` records
1402
1403
  * the latest throw and permits a corrected retry. Both pursuit entrypoints use the same
1403
1404
  * directory lifecycle below. A competing process is refused with the lock holder's identity;
1404
1405
  * an abandoned `supervise.lock.guard` requires confirmation of inactivity before removal.
@@ -1446,7 +1447,7 @@ async function superviseGraphPursuit(graph, opts) {
1446
1447
  /** The pursuit identity and run directory both durable entries require. */
1447
1448
  function assertPursuitDirectory(opts, entry) {
1448
1449
  for (const field of ["pursuitId", "runDir"]) if (opts[field].trim().length === 0) throw new TypeError(`${entry}: ${field} must be non-empty`);
1449
- if (opts.retainedAtSettlement === "keep") throw new TypeError(`${entry}: retainedAtSettlement 'keep' cannot hold, because a settled pursuit is never re-entered`);
1450
+ if (opts.retainedAtSettlement === "keep") throw new TypeError(`${entry}: retainedAtSettlement 'keep' cannot hold, because a reopen continues the root owner alone; retainRestorePoint keeps its workspace`);
1450
1451
  }
1451
1452
  /** Own the directory lock, terminal records and observer lifecycle for both pursuit entries. */
1452
1453
  async function runDurablePursuit(opts, execute, settled, budget) {