@tangle-network/agent-runtime 0.338.0 → 0.339.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 (140) hide show
  1. package/dist/{activation-CsbNax2X.d.ts → activation-CJIIl_Ey.d.ts} +4 -24
  2. package/dist/{activation-kbkAuSmY.js → activation-CVSFxis9.js} +5 -18
  3. package/dist/{activation-kbkAuSmY.js.map → activation-CVSFxis9.js.map} +1 -1
  4. package/dist/agent.d.ts +4 -4
  5. package/dist/agent.js +3 -3
  6. package/dist/{bundle-DM60AI2B.js → bundle-DVOhBTic.js} +2 -2
  7. package/dist/{bundle-DM60AI2B.js.map → bundle-DVOhBTic.js.map} +1 -1
  8. package/dist/candidate-execution/index.d.ts +4 -63
  9. package/dist/candidate-execution/index.js +6 -145
  10. package/dist/candidate-execution/index.js.map +1 -1
  11. package/dist/{delegate-Se1YZKMb.js → delegate-CCWE_AkU.js} +2 -2
  12. package/dist/{delegate-Se1YZKMb.js.map → delegate-CCWE_AkU.js.map} +1 -1
  13. package/dist/{driver-control-acknowledgers-T2a1Ouay.js → driver-control-acknowledgers-C53ggdJ6.js} +12 -8
  14. package/dist/driver-control-acknowledgers-C53ggdJ6.js.map +1 -0
  15. package/dist/{durable-file-B_eJr6Mb.js → durable-file-gNI9ILAn.js} +1 -3
  16. package/dist/durable-file-gNI9ILAn.js.map +1 -0
  17. package/dist/durable.d.ts +3 -35
  18. package/dist/durable.js +10 -10
  19. package/dist/durable.js.map +1 -1
  20. package/dist/{graph-CY0wH838.js → graph-CI9JXKqO.js} +4 -4
  21. package/dist/graph-CI9JXKqO.js.map +1 -0
  22. package/dist/{graph-registry-By0tUj4S.js → graph-registry-BnO64cn8.js} +3 -3
  23. package/dist/{graph-registry-By0tUj4S.js.map → graph-registry-BnO64cn8.js.map} +1 -1
  24. package/dist/{improve-CWGBT13K.js → improve-BOXTLWJ3.js} +8 -35
  25. package/dist/improve-BOXTLWJ3.js.map +1 -0
  26. package/dist/{improvement-adapter-D5gwwoXQ.d.ts → improvement-adapter-HUt_-cWA.d.ts} +2 -20
  27. package/dist/index.d.ts +9 -206
  28. package/dist/index.js +91 -302
  29. package/dist/index.js.map +1 -1
  30. package/dist/intelligence.d.ts +10 -142
  31. package/dist/intelligence.js +7 -81
  32. package/dist/intelligence.js.map +1 -1
  33. package/dist/{jsonl-file-DBv31uPi.js → jsonl-file-C9Kde_0Z.js} +2 -2
  34. package/dist/{jsonl-file-DBv31uPi.js.map → jsonl-file-C9Kde_0Z.js.map} +1 -1
  35. package/dist/kernel.d.ts +4 -3
  36. package/dist/kernel.js +12 -14
  37. package/dist/loop-runner-CWzG1bH4.d.ts +32 -0
  38. package/dist/loop-runner-bin.d.ts +32 -2
  39. package/dist/loop-runner-bin.js +93 -1
  40. package/dist/loop-runner-bin.js.map +1 -0
  41. package/dist/loop-runner-pmPIHFVY.js +59 -0
  42. package/dist/loop-runner-pmPIHFVY.js.map +1 -0
  43. package/dist/mcp/bin.js +3 -3
  44. package/dist/mcp/index.d.ts +99 -418
  45. package/dist/mcp/index.js +121 -203
  46. package/dist/mcp/index.js.map +1 -1
  47. package/dist/mcp/memory-bin.js +231 -1
  48. package/dist/mcp/memory-bin.js.map +1 -1
  49. package/dist/model-policy-CyCUwHed.js.map +1 -1
  50. package/dist/placement.d.ts +2 -9
  51. package/dist/placement.js +1 -1
  52. package/dist/placement.js.map +1 -1
  53. package/dist/platform.d.ts +188 -1
  54. package/dist/platform.js +129 -1
  55. package/dist/platform.js.map +1 -1
  56. package/dist/{prepare-Bt0IouPq.js → prepare-bXkvPMJA.js} +8 -160
  57. package/dist/prepare-bXkvPMJA.js.map +1 -0
  58. package/dist/{profile-Do-5xO_D.js → profile-Dpei_Sq0.js} +2 -2
  59. package/dist/profile-Dpei_Sq0.js.map +1 -0
  60. package/dist/{profile-materialization-BnoEf1co.d.ts → profile-materialization-B1wm2SPT.d.ts} +3 -5
  61. package/dist/profiles.d.ts +2 -2
  62. package/dist/profiles.js +3 -40
  63. package/dist/profiles.js.map +1 -1
  64. package/dist/{protected-model-port-DGxQ8_YM.d.ts → protected-model-port-BGgpy2r9.d.ts} +3 -29
  65. package/dist/protected-redaction-DFCeo4vg.js.map +1 -1
  66. package/dist/{provision-supervisor-0jMufp4h.js → provision-supervisor-CJ6Zz6dz.js} +6 -6
  67. package/dist/{provision-supervisor-0jMufp4h.js.map → provision-supervisor-CJ6Zz6dz.js.map} +1 -1
  68. package/dist/{run-cancellation-BoW5Sg9Y.js → run-cancellation-C9oL62sW.js} +3 -7
  69. package/dist/{run-cancellation-BoW5Sg9Y.js.map → run-cancellation-C9oL62sW.js.map} +1 -1
  70. package/dist/{runtime-D37zRSs7.js → runtime-B2fjL9Oi.js} +2531 -2889
  71. package/dist/runtime-B2fjL9Oi.js.map +1 -0
  72. package/dist/{runtime-hooks-Bj6wJHlH.d.ts → runtime-hooks-nsqxSUFL.d.ts} +2 -6
  73. package/dist/{sandbox-profile-compat-xSoVtdWw.js → sandbox-profile-compat-BzVBFqrz.js} +2 -4
  74. package/dist/sandbox-profile-compat-BzVBFqrz.js.map +1 -0
  75. package/dist/{search-executor-DmgUm5p7.js → search-executor-zMumiak_.js} +3 -3
  76. package/dist/search-executor-zMumiak_.js.map +1 -0
  77. package/dist/{server-DQHJszfk.js → server-_4voDNrl.js} +362 -67
  78. package/dist/server-_4voDNrl.js.map +1 -0
  79. package/dist/{structural-rollout-DAvIE8mw.js → structural-rollout-DpLCXzaL.js} +80 -80
  80. package/dist/structural-rollout-DpLCXzaL.js.map +1 -0
  81. package/dist/{substrate-B0TYNrXn.js → substrate-CGDFTSRh.js} +2 -9
  82. package/dist/substrate-CGDFTSRh.js.map +1 -0
  83. package/dist/{supervise-WuPAwfPh.js → supervise-qAwXmPtD.js} +10 -57
  84. package/dist/supervise-qAwXmPtD.js.map +1 -0
  85. package/dist/{supervisor-CPG1I9UN.js → supervisor-DHrUJhEZ.js} +179 -236
  86. package/dist/supervisor-DHrUJhEZ.js.map +1 -0
  87. package/dist/testing.d.ts +2 -2
  88. package/dist/testing.js +13 -13
  89. package/dist/testing.js.map +1 -1
  90. package/dist/tool-loop.d.ts +1 -1
  91. package/dist/{tool-server-Dqer2M4_.js → tool-server-XV4aJwoQ.js} +2 -2
  92. package/dist/tool-server-XV4aJwoQ.js.map +1 -0
  93. package/dist/top-snapshot-CbZE1JsU.js +502 -0
  94. package/dist/top-snapshot-CbZE1JsU.js.map +1 -0
  95. package/dist/tui/bin.js +711 -1
  96. package/dist/tui/bin.js.map +1 -1
  97. package/dist/tui/index.d.ts +2 -70
  98. package/dist/tui/index.js +3 -3
  99. package/dist/{types-CrNWif8-.d.ts → types-CaOXqRTq.d.ts} +713 -2096
  100. package/dist/workspace-store/index.d.ts +2 -27
  101. package/dist/workspace-store/index.js +2 -2
  102. package/dist/workspace-store/index.js.map +1 -1
  103. package/dist/{workspace-streams-BZZds1Fw.d.ts → workspace-streams-BiS4ABah.d.ts} +3 -18
  104. package/package.json +1 -1
  105. package/skills/agent-graphs/references/authoring.md +3 -2
  106. package/dist/coder-yhVWbdWc.js +0 -40
  107. package/dist/coder-yhVWbdWc.js.map +0 -1
  108. package/dist/delegation-status-CF4D0NZ_.js +0 -358
  109. package/dist/delegation-status-CF4D0NZ_.js.map +0 -1
  110. package/dist/driver-control-acknowledgers-T2a1Ouay.js.map +0 -1
  111. package/dist/durable-file-B_eJr6Mb.js.map +0 -1
  112. package/dist/graph-CY0wH838.js.map +0 -1
  113. package/dist/improve-CWGBT13K.js.map +0 -1
  114. package/dist/integrations-6xttbPi9.d.ts +0 -190
  115. package/dist/integrations-dFi-ALk7.js +0 -132
  116. package/dist/integrations-dFi-ALk7.js.map +0 -1
  117. package/dist/kb-gate-C8z2juK8.d.ts +0 -80
  118. package/dist/kb-gate-DpaSwXVx.js +0 -80
  119. package/dist/kb-gate-DpaSwXVx.js.map +0 -1
  120. package/dist/loop-runner-bin-CFnrAHpl.d.ts +0 -164
  121. package/dist/loop-runner-bin-CdPlhy9g.js +0 -246
  122. package/dist/loop-runner-bin-CdPlhy9g.js.map +0 -1
  123. package/dist/memory-server-DXQ8IxGR.js +0 -234
  124. package/dist/memory-server-DXQ8IxGR.js.map +0 -1
  125. package/dist/openai-tools-DoQ32vpe.js +0 -44
  126. package/dist/openai-tools-DoQ32vpe.js.map +0 -1
  127. package/dist/openai-tools-zh2I_uD7.d.ts +0 -24
  128. package/dist/prepare-Bt0IouPq.js.map +0 -1
  129. package/dist/profile-Do-5xO_D.js.map +0 -1
  130. package/dist/runtime-D37zRSs7.js.map +0 -1
  131. package/dist/sandbox-profile-compat-xSoVtdWw.js.map +0 -1
  132. package/dist/search-executor-DmgUm5p7.js.map +0 -1
  133. package/dist/server-DQHJszfk.js.map +0 -1
  134. package/dist/structural-rollout-DAvIE8mw.js.map +0 -1
  135. package/dist/substrate-B0TYNrXn.js.map +0 -1
  136. package/dist/supervise-WuPAwfPh.js.map +0 -1
  137. package/dist/supervisor-CPG1I9UN.js.map +0 -1
  138. package/dist/tool-server-Dqer2M4_.js.map +0 -1
  139. package/dist/top-app-C55Wa7uy.js +0 -1214
  140. package/dist/top-app-C55Wa7uy.js.map +0 -1
@@ -26,10 +26,8 @@ var __exportAll = (all, no_symbols) => {
26
26
  var durable_file_exports = /* @__PURE__ */ __exportAll({
27
27
  appendDurableFile: () => appendDurableFile,
28
28
  assertNoSymlinkDescendant: () => assertNoSymlinkDescendant,
29
- isAlreadyExistsError: () => isAlreadyExistsError,
30
29
  publishExclusiveDurableFile: () => publishExclusiveDurableFile,
31
30
  syncDurableDirectory: () => syncDurableDirectory,
32
- syncDurableFile: () => syncDurableFile,
33
31
  writeAtomicDurableFile: () => writeAtomicDurableFile
34
32
  });
35
33
  /** Publish a new file without replacing a concurrent winner. */
@@ -160,4 +158,4 @@ function isNoEntryError(error) {
160
158
  //#endregion
161
159
  export { syncDurableDirectory as a, publishExclusiveDurableFile as i, assertNoSymlinkDescendant as n, writeAtomicDurableFile as o, durable_file_exports as r, __exportAll as s, appendDurableFile as t };
162
160
 
163
- //# sourceMappingURL=durable-file-B_eJr6Mb.js.map
161
+ //# sourceMappingURL=durable-file-gNI9ILAn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durable-file-gNI9ILAn.js","names":["fsConstants"],"sources":["../src/runtime/supervise/durable-file.ts"],"sourcesContent":["/**\n * Small filesystem durability primitives for Runtime-owned state.\n *\n * Callers must validate their path and parent directory before invoking these functions.\n * The exclusive writer protects a no-clobber publication race; the atomic writer replaces one\n * state file after its temporary contents reach stable storage.\n *\n * @internal\n */\n\nimport { randomUUID } from 'node:crypto'\nimport {\n closeSync,\n existsSync,\n fchmodSync,\n constants as fsConstants,\n fsyncSync,\n linkSync,\n lstatSync,\n openSync,\n renameSync,\n statSync,\n unlinkSync,\n writeFileSync,\n writeSync,\n} from 'node:fs'\nimport { dirname, join, relative, resolve } from 'node:path'\n\ninterface DurableFileOptions {\n readonly mode?: number\n}\n\n/** Publish a new file without replacing a concurrent winner. */\nexport function publishExclusiveDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions = {},\n): boolean {\n const temporaryPath = `${filePath}.${randomUUID()}.tmp`\n let operationFailed = false\n let operationError: unknown\n let published = false\n try {\n writeExclusiveDurableFile(temporaryPath, content, options)\n try {\n linkSync(temporaryPath, filePath)\n syncDurableDirectory(dirname(filePath))\n published = true\n } catch (error) {\n if (!isAlreadyExistsError(error)) throw error\n }\n } catch (error) {\n operationFailed = true\n operationError = error\n }\n let cleanupError: unknown\n try {\n unlinkSync(temporaryPath)\n } catch (error) {\n if (!isNoEntryError(error)) cleanupError = error\n }\n if (operationFailed) throw operationError\n if (cleanupError !== undefined) throw cleanupError\n return published\n}\n\n/** Fsync a directory after publishing a durable file entry. */\nexport function syncDurableDirectory(directoryPath: string): void {\n const fd = openSync(directoryPath, 'r')\n try {\n fsyncSync(fd)\n } finally {\n closeSync(fd)\n }\n}\n\n/** Fsync one durable file after its contents reach stable storage. */\nfunction syncDurableFile(filePath: string, exactMode?: number): void {\n const fd = openSync(filePath, 'r')\n try {\n if (exactMode !== undefined && process.platform !== 'win32') fchmodSync(fd, exactMode)\n fsyncSync(fd)\n } finally {\n closeSync(fd)\n }\n}\n\n/** Append one record with O_APPEND, then fsync the file and containing directory. */\nexport function appendDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions = {},\n): void {\n const flags =\n fsConstants.O_APPEND |\n fsConstants.O_CREAT |\n fsConstants.O_WRONLY |\n (typeof fsConstants.O_NOFOLLOW === 'number' ? fsConstants.O_NOFOLLOW : 0)\n const fd = openSync(filePath, flags, options.mode ?? 0o600)\n try {\n if (process.platform !== 'win32') fchmodSync(fd, options.mode ?? 0o600)\n const expectedBytes = Buffer.byteLength(content, 'utf8')\n const writtenBytes = writeSync(fd, content, undefined, 'utf8')\n if (writtenBytes !== expectedBytes) {\n throw new Error(\n `durable append wrote ${writtenBytes} of ${expectedBytes} bytes to '${filePath}'`,\n )\n }\n fsyncSync(fd)\n } finally {\n closeSync(fd)\n }\n syncDurableDirectory(dirname(filePath))\n}\n\n/** Reject a path that escapes its run directory or traverses a symbolic link. */\nexport function assertNoSymlinkDescendant(root: string, target: string, label = 'path'): void {\n const base = resolve(root)\n const exact = resolve(target)\n const rel = relative(base, exact)\n if (rel === '..' || rel.startsWith(`..${process.platform === 'win32' ? '\\\\' : '/'}`)) {\n throw new Error(`${label} path escapes its run directory`)\n }\n if (existsSync(base) && lstatSync(base).isSymbolicLink()) {\n throw new Error(`${label} path contains a symbolic link: ${base}`)\n }\n let current = base\n for (const part of rel.split(/[\\\\/]/u).filter(Boolean)) {\n current = join(current, part)\n if (!existsSync(current)) continue\n if (lstatSync(current).isSymbolicLink()) {\n throw new Error(`${label} path contains a symbolic link: ${current}`)\n }\n }\n}\n\n/** Write, fsync, atomically replace, and fsync one Runtime-owned state file.\n * preserveMode retains ordinary access permissions despite the current umask; a new\n * file keeps normal creation semantics. Callers still own path validation and write exclusion. */\nexport function writeAtomicDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions & { readonly preserveMode?: boolean } = {},\n): void {\n const temporaryPath = `${filePath}.${randomUUID()}.tmp`\n let operationFailed = false\n let operationError: unknown\n try {\n let mode = options.mode\n let exactMode = false\n if (options.preserveMode) {\n try {\n mode = statSync(filePath).mode & 0o777\n exactMode = true\n } catch (error) {\n if (!isNoEntryError(error)) throw error\n }\n }\n writeExclusiveDurableFile(temporaryPath, content, { mode }, exactMode)\n renameSync(temporaryPath, filePath)\n syncDurableDirectory(dirname(filePath))\n } catch (error) {\n operationFailed = true\n operationError = error\n }\n let cleanupError: unknown\n try {\n unlinkSync(temporaryPath)\n } catch (error) {\n if (!isNoEntryError(error)) cleanupError = error\n // A successful rename removes the temporary directory entry.\n }\n if (operationFailed) throw operationError\n if (cleanupError !== undefined) throw cleanupError\n}\n\nfunction writeExclusiveDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions,\n exactMode = false,\n): void {\n if (options.mode === undefined) {\n writeFileSync(filePath, content, { encoding: 'utf8', flag: 'wx' })\n } else {\n writeFileSync(filePath, content, { encoding: 'utf8', flag: 'wx', mode: options.mode })\n }\n syncDurableFile(filePath, exactMode ? options.mode : undefined)\n}\n\nfunction isAlreadyExistsError(error: unknown): boolean {\n return (\n error !== null &&\n typeof error === 'object' &&\n 'code' in error &&\n (error as { code?: unknown }).code === 'EEXIST'\n )\n}\n\nfunction isNoEntryError(error: unknown): boolean {\n return (\n error !== null &&\n typeof error === 'object' &&\n 'code' in error &&\n (error as { code?: unknown }).code === 'ENOENT'\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,SAAgB,4BACd,UACA,SACA,UAA8B,CAAC,GACtB;CACT,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,EAAE;CAClD,IAAI,kBAAkB;CACtB,IAAI;CACJ,IAAI,YAAY;CAChB,IAAI;EACF,0BAA0B,eAAe,SAAS,OAAO;EACzD,IAAI;GACF,SAAS,eAAe,QAAQ;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,IAAI,iBAAiB,MAAM;CAC3B,IAAI,iBAAiB,KAAA,GAAW,MAAM;AACxC;AAEA,SAAS,0BACP,UACA,SACA,SACA,YAAY,OACN;CACN,IAAI,QAAQ,SAAS,KAAA,GACnB,cAAc,UAAU,SAAS;EAAE,UAAU;EAAQ,MAAM;CAAK,CAAC;MAEjE,cAAc,UAAU,SAAS;EAAE,UAAU;EAAQ,MAAM;EAAM,MAAM,QAAQ;CAAK,CAAC;CAEvF,gBAAgB,UAAU,YAAY,QAAQ,OAAO,KAAA,CAAS;AAChE;AAEA,SAAS,qBAAqB,OAAyB;CACrD,OACE,UAAU,QACV,OAAO,UAAU,YACjB,UAAU,SACT,MAA6B,SAAS;AAE3C;AAEA,SAAS,eAAe,OAAyB;CAC/C,OACE,UAAU,QACV,OAAO,UAAU,YACjB,UAAU,SACT,MAA6B,SAAS;AAE3C"}
package/dist/durable.d.ts CHANGED
@@ -1,37 +1,5 @@
1
- import { $u as PursuitNodeCost, Bu as VersionJudge, Fu as NextPursuitVersionInput, Gu as SupervisePursuitOptions, Hu as assertPursuitVersions, Iu as PursuitVersionChain, Ju as supervisePursuit, Ku as SupervisedPursuitResult, Lu as PursuitVersionStop, Nu as JudgedPursuitVersion, Pu as NextPursuitVersion, Qu as PursuitCostProvenance, Ru as PursuitVersions, Uu as SuperviseGraphPursuitOptions, Vu as VersionVerdict, W as NodeId, Wu as SupervisePursuitError, Xu as RUN_FORK_CORRELATION_KEYS, Yu as PursuitFork, Zu as PursuitObserverDelivery, ad as PursuitProjection, cd as PursuitStatus, dd as ObserverJournal, ed as PursuitNodePlacement, fd as ObserverRecord, hd as verifyObserverRecords, id as PursuitNodeUsage, ld as projectPursuit, md as observerRecordDigest, nd as PursuitNodeProjection, od as PursuitRunProjection, ot as RootStreamReceipt, pT as ExecutorProgressEvent, pd as ObserverRecordKind, qu as superviseGraphPursuit, rd as PursuitNodeTiming, sd as PursuitRunTotals, st as SupervisedResult, td as PursuitNodePlatform, ud as FileObserverJournal, zu as SettledPursuitVersion } from "./types-CrNWif8-.js";
2
- //#region src/runtime/supervise/root-stream.d.ts
3
- /** The root stream: one JSONL line per progress event the root's executor observed. */
4
- declare const ROOT_STREAM_FILE = "root-stream.jsonl";
5
- /** One line of `root-stream.jsonl`. */
6
- type RootStreamRecord = {
7
- /** 1-based position in the file, continuing across drive attempts and across processes. */
8
- readonly seq: number;
9
- /** ISO instant the line was appended, from the run's own clock. */
10
- readonly at: string;
11
- /** The 1-based drive attempt of the root that produced it: a driver retry or re-prompt
12
- * re-enters the harness and continues the same file with the next attempt number. */
13
- readonly attempt: number;
14
- } & ({
15
- readonly event: ExecutorProgressEvent;
16
- } | {
17
- /** The event could not be written as JSON; its kind and the reason stand in so the gap
18
- * is recorded in the file itself instead of silently narrowing the stream. */
19
- readonly dropped: {
20
- readonly kind: ExecutorProgressEvent['kind'];
21
- readonly reason: string;
22
- };
23
- });
24
- /**
25
- * The receipt for the root stream a run directory holds, recomputed from the file's bytes, or
26
- * `undefined` when the directory holds none. This is what a run that never settled — a root that
27
- * died mid-turn — gets on its failure record, and it equals what `close()` returned for a run
28
- * that did.
29
- */
30
- declare function readRootStreamReceipt(runDir: string): Promise<RootStreamReceipt | undefined>;
31
- /** Every committed line of the root stream, in order, or `undefined` when there is no file. A
32
- * torn final line from a process that died mid-write is not a record and is left out. */
33
- declare function readRootStream(runDir: string): Promise<RootStreamRecord[] | undefined>;
34
- //#endregion
1
+ import { $l as PursuitVersions, Bd as RootStreamRecord, Bv as MapOnSettleRoute, Cu as projectPursuit, D as RetainedPendingCause, Dd as DeadlineCheckIn, Du as ObserverRecordKind, Eu as ObserverRecord, Ey as AnalyzeOnSettleRoute, Hd as readRootStreamReceipt, Jf as CoordinationTransportOptions, Jl as JudgedPursuitVersion, Kf as CoordinationPublicAddress, Km as ToolLoopCompactionOptions, Ku as AuthorizedSpawn, Nv as ContinuityMode, Ou as observerRecordDigest, Pv as DownMessageAuthorizationInput, Ql as PursuitVersionStop, Su as PursuitStatus, Tu as ObserverJournal, V as NodeId, Vd as readRootStream, Wf as CoordinationAuthentication, Xf as CoordinationHttpAudit, Xl as NextPursuitVersionInput, Xu as WorkerSlots, Yl as NextPursuitVersion, Zf as CoordinationRejectReason, Zl as PursuitVersionChain, _u as PursuitNodeTiming, au as SupervisePursuitError, bu as PursuitRunProjection, cf as DriveHarnessOwnerContext, cu as superviseGraphPursuit, cv as WorkerWatchOptions, du as RUN_FORK_CORRELATION_KEYS, eu as SettledPursuitVersion, fd as SelectSeat, fu as PursuitObserverDelivery, gu as PursuitNodeProjection, hu as PursuitNodePlatform, it as SupervisedResult, iu as SuperviseGraphPursuitOptions, jv as AuthorizedDownMessage, ld as SeatSelection, lu as supervisePursuit, mu as PursuitNodeCost, nu as VersionVerdict, ou as SupervisePursuitOptions, pu as PursuitCostProvenance, qf as CoordinationReadAccess, qu as AuthorizedSpawnContext, rt as RootStreamReceipt, ru as assertPursuitVersions, su as SupervisedPursuitResult, tu as VersionJudge, ud as SeatSelectionInput, uf as ResolveDriveHarness, uu as PursuitFork, vf as ManagerWakePolicy, vu as PursuitNodeUsage, vv as EscalateQuestion, wu as FileObserverJournal, xu as PursuitRunTotals, xv as QuestionEscalationOutcome, yu as PursuitProjection } from "./types-CaOXqRTq.js";
2
+ import { n as RuntimeDecisionKind, r as RuntimeDecisionPoint, t as RuntimeDecisionEvidenceRef } from "./runtime-hooks-nsqxSUFL.js";
35
3
  //#region src/durable/chat-engine.d.ts
36
4
  /**
37
5
  * `handleChatTurn` is a framework-neutral chat-turn HTTP orchestrator.
@@ -289,5 +257,5 @@ interface DurableSupervisionDiscovery {
289
257
  */
290
258
  declare function discoverDurableSupervisionRun(runDir: string): Promise<DurableSupervisionDiscovery>;
291
259
  //#endregion
292
- export { type ChatStreamEvent, type ChatTurnHooks, type ChatTurnIdentity, type ChatTurnProducer, type ChatTurnResult, type DurableCoordinationStreamIdentity, type DurableFailureRecord, type DurableSupervisionDiscovery, FileObserverJournal, type JudgedPursuitVersion, type NextPursuitVersion, type NextPursuitVersionInput, type ObserverJournal, type ObserverRecord, type ObserverRecordKind, type PursuitCostProvenance, type PursuitFork, type PursuitNodeCost, type PursuitNodePlacement, type PursuitNodePlatform, type PursuitNodeProjection, type PursuitNodeTiming, type PursuitNodeUsage, type PursuitObserverDelivery, type PursuitProjection, type PursuitRunProjection, type PursuitRunTotals, type PursuitStatus, type PursuitVersionChain, type PursuitVersionStop, type PursuitVersions, ROOT_STREAM_FILE, RUN_FORK_CORRELATION_KEYS, type RootStreamReceipt, type RootStreamRecord, type RunChatTurnInput, type RunDirectoryHolderLiveness, type RunDirectoryLock, type RunDirectoryLockHolder, RunDirectoryLockedError, type SettledPursuitVersion, SettledRunDirectoryError, type SuperviseGraphPursuitOptions, SupervisePursuitError, type SupervisePursuitOptions, type SupervisedPursuitResult, type VersionJudge, type VersionVerdict, acquireRunDirectoryLock, assertPursuitVersions, deriveExecutionId, discoverDurableSupervisionRun, handleChatTurn, observerRecordDigest, projectPursuit, readFailureRecord, readRootStream, readRootStreamReceipt, readRunDirectoryLock, readSettleRecord, runDirectoryHolderIsLive, superviseGraphPursuit, supervisePursuit, verifyObserverRecords };
260
+ export { type AnalyzeOnSettleRoute, type AuthorizedDownMessage, type AuthorizedSpawn, type AuthorizedSpawnContext, type ChatStreamEvent, type ChatTurnHooks, type ChatTurnIdentity, type ChatTurnProducer, type ChatTurnResult, type ContinuityMode, type CoordinationAuthentication, type CoordinationHttpAudit, type CoordinationPublicAddress, type CoordinationReadAccess, type CoordinationRejectReason, type CoordinationTransportOptions, type DeadlineCheckIn, type DownMessageAuthorizationInput, type DriveHarnessOwnerContext, type DurableCoordinationStreamIdentity, type DurableFailureRecord, type DurableSupervisionDiscovery, type EscalateQuestion, FileObserverJournal, type JudgedPursuitVersion, type ManagerWakePolicy, type MapOnSettleRoute, type NextPursuitVersion, type NextPursuitVersionInput, type ObserverJournal, type ObserverRecord, type ObserverRecordKind, type PursuitCostProvenance, type PursuitFork, type PursuitNodeCost, type PursuitNodePlatform, type PursuitNodeProjection, type PursuitNodeTiming, type PursuitNodeUsage, type PursuitObserverDelivery, type PursuitProjection, type PursuitRunProjection, type PursuitRunTotals, type PursuitStatus, type PursuitVersionChain, type PursuitVersionStop, type PursuitVersions, type QuestionEscalationOutcome, RUN_FORK_CORRELATION_KEYS, type ResolveDriveHarness, type RetainedPendingCause, type RootStreamRecord, type RunChatTurnInput, type RunDirectoryHolderLiveness, type RunDirectoryLock, type RunDirectoryLockHolder, RunDirectoryLockedError, type RuntimeDecisionEvidenceRef, type RuntimeDecisionKind, type RuntimeDecisionPoint, type SeatSelection, type SeatSelectionInput, type SelectSeat, type SettledPursuitVersion, SettledRunDirectoryError, type SuperviseGraphPursuitOptions, SupervisePursuitError, type SupervisePursuitOptions, type SupervisedPursuitResult, type ToolLoopCompactionOptions, type VersionJudge, type VersionVerdict, type WorkerSlots, type WorkerWatchOptions, acquireRunDirectoryLock, assertPursuitVersions, deriveExecutionId, discoverDurableSupervisionRun, handleChatTurn, observerRecordDigest, projectPursuit, readFailureRecord, readRootStream, readRootStreamReceipt, readRunDirectoryLock, readSettleRecord, runDirectoryHolderIsLive, superviseGraphPursuit, supervisePursuit };
293
261
  //# sourceMappingURL=durable.d.ts.map
package/dist/durable.js CHANGED
@@ -1,14 +1,14 @@
1
- import { i as publishExclusiveDurableFile, o as writeAtomicDurableFile } from "./durable-file-B_eJr6Mb.js";
2
- import { D as FileSpawnJournal, Dr as failedItems, Oi as authoredProfileDigest, ca as contentAddress, dt as loadSpawnForest, kr as isFiniteNumber, sa as detachedSnapshot } from "./supervisor-CPG1I9UN.js";
1
+ import { i as publishExclusiveDurableFile, o as writeAtomicDurableFile } from "./durable-file-gNI9ILAn.js";
2
+ import { Di as contentAddress, Ei as detachedSnapshot, S as FileSpawnJournal, ar as isFiniteNumber, ir as failedItems, it as loadSpawnForest, qr as authoredProfileDigest } from "./supervisor-DHrUJhEZ.js";
3
3
  import { f as RuntimeRunStateError, m as ValidationError } from "./errors-DodWX-cb.js";
4
4
  import { t as isRecord } from "./record-value-B6bwJxLa.js";
5
- import { G as addSpend, J as cloneSpend, Z as errorMessage, pt as zeroSpend } from "./sandbox-profile-compat-xSoVtdWw.js";
5
+ import { G as addSpend, J as cloneSpend, Z as errorMessage, pt as zeroSpend } from "./sandbox-profile-compat-BzVBFqrz.js";
6
6
  import { a as withPursuitContext, t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
7
- import { a as readCommittedJsonLines, n as isNoEntError, t as appendCommittedJsonLine } from "./jsonl-file-DBv31uPi.js";
8
- import { a as superviseRootProfile, et as ROOT_STREAM_FILE, nt as readRootStreamReceipt, t as supervise, tt as readRootStream } from "./supervise-WuPAwfPh.js";
9
- import { a as applyExactAgentProfileDiff } from "./profile-Do-5xO_D.js";
10
- import { v as supervisorRunDir } from "./run-cancellation-BoW5Sg9Y.js";
11
- import { i as superviseAgentGraph } from "./graph-CY0wH838.js";
7
+ import { a as readCommittedJsonLines, n as isNoEntError, t as appendCommittedJsonLine } from "./jsonl-file-C9Kde_0Z.js";
8
+ import { J as readRootStreamReceipt, a as superviseRootProfile, q as readRootStream, t as supervise } from "./supervise-qAwXmPtD.js";
9
+ import { a as applyExactAgentProfileDiff } from "./profile-Dpei_Sq0.js";
10
+ import { g as supervisorRunDir } from "./run-cancellation-C9oL62sW.js";
11
+ import { i as superviseAgentGraph } from "./graph-CI9JXKqO.js";
12
12
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, sha256Bytes } from "@tangle-network/agent-interface";
13
13
  import { createHash } from "node:crypto";
14
14
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -1157,7 +1157,7 @@ function reviewOfBest(runId, words) {
1157
1157
  const page = reviewPage(best.version, best.verdict.score, verdict);
1158
1158
  const earlier = best.change?.set?.prompt?.instructions ?? [];
1159
1159
  const earlierInstructions = earlier.filter((text) => text !== instruction);
1160
- const earlierMounts = (best.profile.resources?.files ?? []).map((file) => file.path).filter((mounted) => mounted.startsWith("inputs/review/") && mounted !== path);
1160
+ const earlierMounts = (best.profile.resources?.files ?? []).map((file) => file.path).filter((mounted) => mounted.startsWith(REVIEW_DIR) && mounted !== path);
1161
1161
  return {
1162
1162
  kind: "agent-profile-diff",
1163
1163
  id: `${runId}-v${n}-review-of-v${best.version}`,
@@ -2464,6 +2464,6 @@ function compareText(left, right) {
2464
2464
  return left < right ? -1 : left > right ? 1 : 0;
2465
2465
  }
2466
2466
  //#endregion
2467
- export { FileObserverJournal, ROOT_STREAM_FILE, RUN_FORK_CORRELATION_KEYS, RunDirectoryLockedError, SettledRunDirectoryError, SupervisePursuitError, acquireRunDirectoryLock, assertPursuitVersions, deriveExecutionId, discoverDurableSupervisionRun, handleChatTurn, observerRecordDigest, projectPursuit, readFailureRecord, readRootStream, readRootStreamReceipt, readRunDirectoryLock, readSettleRecord, runDirectoryHolderIsLive, superviseGraphPursuit, supervisePursuit, verifyObserverRecords };
2467
+ export { FileObserverJournal, RUN_FORK_CORRELATION_KEYS, RunDirectoryLockedError, SettledRunDirectoryError, SupervisePursuitError, acquireRunDirectoryLock, assertPursuitVersions, deriveExecutionId, discoverDurableSupervisionRun, handleChatTurn, observerRecordDigest, projectPursuit, readFailureRecord, readRootStream, readRootStreamReceipt, readRunDirectoryLock, readSettleRecord, runDirectoryHolderIsLive, superviseGraphPursuit, supervisePursuit };
2468
2468
 
2469
2469
  //# sourceMappingURL=durable.js.map