@llblab/pi-kit 0.38.4 → 0.39.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 (424) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +1 -1
  3. package/node_modules/@llblab/pi-actors/AGENTS.md +108 -20
  4. package/node_modules/@llblab/pi-actors/BACKLOG.md +207 -4
  5. package/node_modules/@llblab/pi-actors/CHANGELOG.md +13 -0
  6. package/node_modules/@llblab/pi-actors/README.md +31 -1
  7. package/node_modules/@llblab/pi-actors/dist/index.js +1 -1
  8. package/node_modules/@llblab/pi-actors/dist/lib/async-runs.d.ts +37 -0
  9. package/node_modules/@llblab/pi-actors/dist/lib/async-runs.js +131 -62
  10. package/node_modules/@llblab/pi-actors/dist/lib/automatic-review-runtime.d.ts +2 -0
  11. package/node_modules/@llblab/pi-actors/dist/lib/automatic-review-runtime.js +3 -2
  12. package/node_modules/@llblab/pi-actors/dist/lib/command-templates.d.ts +37 -0
  13. package/node_modules/@llblab/pi-actors/dist/lib/command-templates.js +263 -129
  14. package/node_modules/@llblab/pi-actors/dist/lib/execution-files.d.ts +32 -0
  15. package/node_modules/@llblab/pi-actors/dist/lib/execution-files.js +128 -0
  16. package/node_modules/@llblab/pi-actors/dist/lib/execution-output.js +5 -4
  17. package/node_modules/@llblab/pi-actors/dist/lib/execution-sessions.d.ts +19 -1
  18. package/node_modules/@llblab/pi-actors/dist/lib/execution-sessions.js +62 -26
  19. package/node_modules/@llblab/pi-actors/dist/lib/execution.d.ts +4 -1
  20. package/node_modules/@llblab/pi-actors/dist/lib/execution.js +6 -1
  21. package/node_modules/@llblab/pi-actors/dist/lib/extension-runtime.d.ts +9 -2
  22. package/node_modules/@llblab/pi-actors/dist/lib/extension-runtime.js +92 -14
  23. package/node_modules/@llblab/pi-actors/dist/lib/file-state.js +21 -2
  24. package/node_modules/@llblab/pi-actors/dist/lib/inspector-command.js +2 -2
  25. package/node_modules/@llblab/pi-actors/dist/lib/inspector-overlay.d.ts +25 -7
  26. package/node_modules/@llblab/pi-actors/dist/lib/inspector-overlay.js +562 -262
  27. package/node_modules/@llblab/pi-actors/dist/lib/inspector.d.ts +20 -10
  28. package/node_modules/@llblab/pi-actors/dist/lib/inspector.js +80 -91
  29. package/node_modules/@llblab/pi-actors/dist/lib/limits.d.ts +1 -0
  30. package/node_modules/@llblab/pi-actors/dist/lib/limits.js +1 -0
  31. package/node_modules/@llblab/pi-actors/dist/lib/observability.d.ts +15 -1
  32. package/node_modules/@llblab/pi-actors/dist/lib/observability.js +216 -99
  33. package/node_modules/@llblab/pi-actors/dist/lib/pi.d.ts +5 -4
  34. package/node_modules/@llblab/pi-actors/dist/lib/pi.js +64 -10
  35. package/node_modules/@llblab/pi-actors/dist/lib/recipe-projection.d.ts +18 -0
  36. package/node_modules/@llblab/pi-actors/dist/lib/recipe-projection.js +220 -0
  37. package/node_modules/@llblab/pi-actors/dist/lib/recipes-context.d.ts +2 -0
  38. package/node_modules/@llblab/pi-actors/dist/lib/recipes-context.js +30 -6
  39. package/node_modules/@llblab/pi-actors/dist/lib/registry.js +270 -36
  40. package/node_modules/@llblab/pi-actors/dist/lib/run-delivery.d.ts +213 -5
  41. package/node_modules/@llblab/pi-actors/dist/lib/run-delivery.js +1909 -40
  42. package/node_modules/@llblab/pi-actors/dist/lib/run-supervision.d.ts +107 -0
  43. package/node_modules/@llblab/pi-actors/dist/lib/run-supervision.js +412 -0
  44. package/node_modules/@llblab/pi-actors/dist/lib/run-ui-runtime.d.ts +9 -2
  45. package/node_modules/@llblab/pi-actors/dist/lib/run-ui-runtime.js +283 -60
  46. package/node_modules/@llblab/pi-actors/dist/lib/runs-artifacts.d.ts +26 -1
  47. package/node_modules/@llblab/pi-actors/dist/lib/runs-artifacts.js +68 -2
  48. package/node_modules/@llblab/pi-actors/dist/lib/runs-context-exports.d.ts +451 -0
  49. package/node_modules/@llblab/pi-actors/dist/lib/runs-context-exports.js +2315 -0
  50. package/node_modules/@llblab/pi-actors/dist/lib/runs-context-index.d.ts +97 -0
  51. package/node_modules/@llblab/pi-actors/dist/lib/runs-context-index.js +368 -0
  52. package/node_modules/@llblab/pi-actors/dist/lib/runs-control-delivery.js +46 -7
  53. package/node_modules/@llblab/pi-actors/dist/lib/runs-control.d.ts +78 -2
  54. package/node_modules/@llblab/pi-actors/dist/lib/runs-control.js +334 -2
  55. package/node_modules/@llblab/pi-actors/dist/lib/runs-controls.js +4 -1
  56. package/node_modules/@llblab/pi-actors/dist/lib/runs-descendant-launches.d.ts +80 -0
  57. package/node_modules/@llblab/pi-actors/dist/lib/runs-descendant-launches.js +287 -0
  58. package/node_modules/@llblab/pi-actors/dist/lib/runs-execution-evidence.d.ts +110 -0
  59. package/node_modules/@llblab/pi-actors/dist/lib/runs-execution-evidence.js +282 -0
  60. package/node_modules/@llblab/pi-actors/dist/lib/runs-index.d.ts +66 -1
  61. package/node_modules/@llblab/pi-actors/dist/lib/runs-index.js +349 -13
  62. package/node_modules/@llblab/pi-actors/dist/lib/runs-native-launches.d.ts +73 -0
  63. package/node_modules/@llblab/pi-actors/dist/lib/runs-native-launches.js +227 -0
  64. package/node_modules/@llblab/pi-actors/dist/lib/runs-outcomes.d.ts +141 -0
  65. package/node_modules/@llblab/pi-actors/dist/lib/runs-outcomes.js +292 -0
  66. package/node_modules/@llblab/pi-actors/dist/lib/runs-ownership.d.ts +10 -1
  67. package/node_modules/@llblab/pi-actors/dist/lib/runs-ownership.js +36 -4
  68. package/node_modules/@llblab/pi-actors/dist/lib/runs-process-windows-mi.d.ts +46 -0
  69. package/node_modules/@llblab/pi-actors/dist/lib/runs-process-windows-mi.js +114 -0
  70. package/node_modules/@llblab/pi-actors/dist/lib/runs-process.d.ts +34 -1
  71. package/node_modules/@llblab/pi-actors/dist/lib/runs-process.js +158 -26
  72. package/node_modules/@llblab/pi-actors/dist/lib/runs-results.d.ts +116 -0
  73. package/node_modules/@llblab/pi-actors/dist/lib/runs-results.js +518 -0
  74. package/node_modules/@llblab/pi-actors/dist/lib/runs-retention.d.ts +15 -2
  75. package/node_modules/@llblab/pi-actors/dist/lib/runs-retention.js +148 -9
  76. package/node_modules/@llblab/pi-actors/dist/lib/runs-session-exports.d.ts +95 -0
  77. package/node_modules/@llblab/pi-actors/dist/lib/runs-session-exports.js +470 -0
  78. package/node_modules/@llblab/pi-actors/dist/lib/runs-snapshot.d.ts +58 -0
  79. package/node_modules/@llblab/pi-actors/dist/lib/runs-snapshot.js +92 -0
  80. package/node_modules/@llblab/pi-actors/dist/lib/runs-start.d.ts +2 -0
  81. package/node_modules/@llblab/pi-actors/dist/lib/runs-start.js +44 -3
  82. package/node_modules/@llblab/pi-actors/dist/lib/runs-status.d.ts +15 -1
  83. package/node_modules/@llblab/pi-actors/dist/lib/runs-status.js +337 -13
  84. package/node_modules/@llblab/pi-actors/dist/lib/runs-supervision.d.ts +105 -0
  85. package/node_modules/@llblab/pi-actors/dist/lib/runs-supervision.js +501 -0
  86. package/node_modules/@llblab/pi-actors/dist/lib/runs-trace.d.ts +1 -0
  87. package/node_modules/@llblab/pi-actors/dist/lib/runs-trace.js +14 -3
  88. package/node_modules/@llblab/pi-actors/dist/lib/runtime.js +22 -3
  89. package/node_modules/@llblab/pi-actors/dist/lib/session-evidence.d.ts +37 -0
  90. package/node_modules/@llblab/pi-actors/dist/lib/session-evidence.js +59 -3
  91. package/node_modules/@llblab/pi-actors/dist/lib/state-readers.d.ts +4 -1
  92. package/node_modules/@llblab/pi-actors/dist/lib/state-readers.js +14 -8
  93. package/node_modules/@llblab/pi-actors/dist/lib/temp.d.ts +2 -4
  94. package/node_modules/@llblab/pi-actors/dist/lib/temp.js +4 -56
  95. package/node_modules/@llblab/pi-actors/dist/lib/tools-access.d.ts +3 -0
  96. package/node_modules/@llblab/pi-actors/dist/lib/tools-access.js +13 -0
  97. package/node_modules/@llblab/pi-actors/dist/lib/tools-inspect.d.ts +1 -0
  98. package/node_modules/@llblab/pi-actors/dist/lib/tools-inspect.js +110 -43
  99. package/node_modules/@llblab/pi-actors/dist/lib/tools-local.d.ts +3 -0
  100. package/node_modules/@llblab/pi-actors/dist/lib/tools-local.js +18 -6
  101. package/node_modules/@llblab/pi-actors/dist/lib/tools-message.d.ts +4 -1
  102. package/node_modules/@llblab/pi-actors/dist/lib/tools-message.js +126 -31
  103. package/node_modules/@llblab/pi-actors/dist/lib/tools-response.d.ts +31 -3
  104. package/node_modules/@llblab/pi-actors/dist/lib/tools-response.js +311 -47
  105. package/node_modules/@llblab/pi-actors/dist/lib/tools-spawn.d.ts +3 -0
  106. package/node_modules/@llblab/pi-actors/dist/lib/tools-spawn.js +29 -7
  107. package/node_modules/@llblab/pi-actors/dist/lib/trace-projection.d.ts +20 -0
  108. package/node_modules/@llblab/pi-actors/dist/lib/trace-projection.js +192 -43
  109. package/node_modules/@llblab/pi-actors/dist/scripts/async-runner.mjs +272 -194
  110. package/node_modules/@llblab/pi-actors/dist/scripts/conformance.mjs +14 -2
  111. package/node_modules/@llblab/pi-actors/dist/skills/actors/SKILL.md +46 -2
  112. package/node_modules/@llblab/pi-actors/dist/skills/actors/references/diagnostics.md +40 -0
  113. package/node_modules/@llblab/pi-actors/dist/skills/actors/references/runs.md +55 -1
  114. package/node_modules/@llblab/pi-actors/docs/README.md +9 -1
  115. package/node_modules/@llblab/pi-actors/docs/actor-inspector.md +84 -15
  116. package/node_modules/@llblab/pi-actors/docs/agent-experience.md +216 -0
  117. package/node_modules/@llblab/pi-actors/docs/async-runs.md +18 -2
  118. package/node_modules/@llblab/pi-actors/docs/composition-transport.md +103 -0
  119. package/node_modules/@llblab/pi-actors/docs/coordinator-delivery.md +204 -4
  120. package/node_modules/@llblab/pi-actors/docs/inspection.md +38 -2
  121. package/node_modules/@llblab/pi-actors/docs/output-projection-map.md +130 -0
  122. package/node_modules/@llblab/pi-actors/docs/releasing.md +19 -2
  123. package/node_modules/@llblab/pi-actors/docs/run-supervision.md +1622 -0
  124. package/node_modules/@llblab/pi-actors/docs/template-recipes.md +4 -0
  125. package/node_modules/@llblab/pi-actors/docs/windows-process-observation.md +248 -0
  126. package/node_modules/@llblab/pi-actors/index.ts +1 -1
  127. package/node_modules/@llblab/pi-actors/lib/async-runs.ts +164 -73
  128. package/node_modules/@llblab/pi-actors/lib/automatic-review-runtime.ts +4 -2
  129. package/node_modules/@llblab/pi-actors/lib/command-templates.ts +287 -138
  130. package/node_modules/@llblab/pi-actors/lib/execution-files.ts +118 -0
  131. package/node_modules/@llblab/pi-actors/lib/execution-output.ts +4 -4
  132. package/node_modules/@llblab/pi-actors/lib/execution-sessions.ts +57 -27
  133. package/node_modules/@llblab/pi-actors/lib/execution.ts +8 -0
  134. package/node_modules/@llblab/pi-actors/lib/extension-runtime.ts +102 -12
  135. package/node_modules/@llblab/pi-actors/lib/file-state.ts +16 -2
  136. package/node_modules/@llblab/pi-actors/lib/inspector-command.ts +2 -2
  137. package/node_modules/@llblab/pi-actors/lib/inspector-overlay.ts +524 -261
  138. package/node_modules/@llblab/pi-actors/lib/inspector.ts +101 -130
  139. package/node_modules/@llblab/pi-actors/lib/limits.ts +1 -0
  140. package/node_modules/@llblab/pi-actors/lib/observability.ts +235 -116
  141. package/node_modules/@llblab/pi-actors/lib/pi.ts +59 -11
  142. package/node_modules/@llblab/pi-actors/lib/recipe-projection.ts +232 -0
  143. package/node_modules/@llblab/pi-actors/lib/recipes-context.ts +27 -6
  144. package/node_modules/@llblab/pi-actors/lib/registry.ts +266 -36
  145. package/node_modules/@llblab/pi-actors/lib/run-delivery.ts +1737 -49
  146. package/node_modules/@llblab/pi-actors/lib/run-supervision.ts +411 -0
  147. package/node_modules/@llblab/pi-actors/lib/run-ui-runtime.ts +237 -73
  148. package/node_modules/@llblab/pi-actors/lib/runs-artifacts.ts +73 -1
  149. package/node_modules/@llblab/pi-actors/lib/runs-context-exports.ts +1871 -0
  150. package/node_modules/@llblab/pi-actors/lib/runs-context-index.ts +372 -0
  151. package/node_modules/@llblab/pi-actors/lib/runs-control-delivery.ts +36 -18
  152. package/node_modules/@llblab/pi-actors/lib/runs-control.ts +297 -1
  153. package/node_modules/@llblab/pi-actors/lib/runs-controls.ts +3 -1
  154. package/node_modules/@llblab/pi-actors/lib/runs-descendant-launches.ts +338 -0
  155. package/node_modules/@llblab/pi-actors/lib/runs-execution-evidence.ts +302 -0
  156. package/node_modules/@llblab/pi-actors/lib/runs-index.ts +345 -17
  157. package/node_modules/@llblab/pi-actors/lib/runs-native-launches.ts +270 -0
  158. package/node_modules/@llblab/pi-actors/lib/runs-outcomes.ts +377 -0
  159. package/node_modules/@llblab/pi-actors/lib/runs-ownership.ts +37 -4
  160. package/node_modules/@llblab/pi-actors/lib/runs-process-windows-mi.ts +113 -0
  161. package/node_modules/@llblab/pi-actors/lib/runs-process.ts +210 -34
  162. package/node_modules/@llblab/pi-actors/lib/runs-results.ts +601 -0
  163. package/node_modules/@llblab/pi-actors/lib/runs-retention.ts +134 -10
  164. package/node_modules/@llblab/pi-actors/lib/runs-session-exports.ts +406 -0
  165. package/node_modules/@llblab/pi-actors/lib/runs-snapshot.ts +143 -0
  166. package/node_modules/@llblab/pi-actors/lib/runs-start.ts +44 -2
  167. package/node_modules/@llblab/pi-actors/lib/runs-status.ts +252 -10
  168. package/node_modules/@llblab/pi-actors/lib/runs-supervision.ts +394 -0
  169. package/node_modules/@llblab/pi-actors/lib/runs-trace.ts +14 -3
  170. package/node_modules/@llblab/pi-actors/lib/runtime.ts +22 -3
  171. package/node_modules/@llblab/pi-actors/lib/session-evidence.ts +76 -4
  172. package/node_modules/@llblab/pi-actors/lib/state-readers.ts +16 -7
  173. package/node_modules/@llblab/pi-actors/lib/temp.ts +3 -56
  174. package/node_modules/@llblab/pi-actors/lib/tools-access.ts +13 -0
  175. package/node_modules/@llblab/pi-actors/lib/tools-inspect.ts +110 -51
  176. package/node_modules/@llblab/pi-actors/lib/tools-local.ts +37 -24
  177. package/node_modules/@llblab/pi-actors/lib/tools-message.ts +120 -37
  178. package/node_modules/@llblab/pi-actors/lib/tools-response.ts +273 -50
  179. package/node_modules/@llblab/pi-actors/lib/tools-spawn.ts +31 -10
  180. package/node_modules/@llblab/pi-actors/lib/trace-projection.ts +165 -42
  181. package/node_modules/@llblab/pi-actors/package.json +10 -6
  182. package/node_modules/@llblab/pi-actors/scripts/async-runner.mjs +272 -194
  183. package/node_modules/@llblab/pi-actors/scripts/conformance.mjs +14 -2
  184. package/node_modules/@llblab/pi-actors/skills/actors/SKILL.md +46 -2
  185. package/node_modules/@llblab/pi-actors/skills/actors/references/diagnostics.md +40 -0
  186. package/node_modules/@llblab/pi-actors/skills/actors/references/runs.md +55 -1
  187. package/node_modules/yaml/LICENSE +13 -0
  188. package/node_modules/yaml/README.md +172 -0
  189. package/node_modules/yaml/bin.mjs +11 -0
  190. package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
  191. package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
  192. package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
  193. package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
  194. package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
  195. package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
  196. package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
  197. package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
  198. package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
  199. package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
  200. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
  201. package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
  202. package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
  203. package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
  204. package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
  205. package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
  206. package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
  207. package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  208. package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  209. package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  210. package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
  211. package/node_modules/yaml/browser/dist/errors.js +57 -0
  212. package/node_modules/yaml/browser/dist/index.js +17 -0
  213. package/node_modules/yaml/browser/dist/log.js +11 -0
  214. package/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
  215. package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
  216. package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
  217. package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
  218. package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
  219. package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
  220. package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
  221. package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
  222. package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
  223. package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
  224. package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
  225. package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
  226. package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
  227. package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
  228. package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
  229. package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
  230. package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
  231. package/node_modules/yaml/browser/dist/public-api.js +102 -0
  232. package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
  233. package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
  234. package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
  235. package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
  236. package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
  237. package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
  238. package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
  239. package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
  240. package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
  241. package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
  242. package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
  243. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
  244. package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
  245. package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
  246. package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
  247. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
  248. package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
  249. package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
  250. package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
  251. package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
  252. package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
  253. package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
  254. package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
  255. package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
  256. package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
  257. package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
  258. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
  259. package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
  260. package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
  261. package/node_modules/yaml/browser/dist/util.js +11 -0
  262. package/node_modules/yaml/browser/dist/visit.js +233 -0
  263. package/node_modules/yaml/browser/index.js +5 -0
  264. package/node_modules/yaml/browser/package.json +3 -0
  265. package/node_modules/yaml/dist/cli.d.ts +8 -0
  266. package/node_modules/yaml/dist/cli.mjs +201 -0
  267. package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
  268. package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  269. package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
  270. package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  271. package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
  272. package/node_modules/yaml/dist/compose/compose-node.js +112 -0
  273. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
  274. package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  275. package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
  276. package/node_modules/yaml/dist/compose/composer.js +224 -0
  277. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
  278. package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  279. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
  280. package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  281. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
  282. package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  283. package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
  284. package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  285. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
  286. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  287. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
  288. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
  289. package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
  290. package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  291. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
  292. package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  293. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
  294. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  295. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
  296. package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  297. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
  298. package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  299. package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
  300. package/node_modules/yaml/dist/doc/Document.js +337 -0
  301. package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
  302. package/node_modules/yaml/dist/doc/anchors.js +76 -0
  303. package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
  304. package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  305. package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
  306. package/node_modules/yaml/dist/doc/createNode.js +90 -0
  307. package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
  308. package/node_modules/yaml/dist/doc/directives.js +178 -0
  309. package/node_modules/yaml/dist/errors.d.ts +21 -0
  310. package/node_modules/yaml/dist/errors.js +62 -0
  311. package/node_modules/yaml/dist/index.d.ts +25 -0
  312. package/node_modules/yaml/dist/index.js +50 -0
  313. package/node_modules/yaml/dist/log.d.ts +3 -0
  314. package/node_modules/yaml/dist/log.js +19 -0
  315. package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
  316. package/node_modules/yaml/dist/nodes/Alias.js +118 -0
  317. package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
  318. package/node_modules/yaml/dist/nodes/Collection.js +151 -0
  319. package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
  320. package/node_modules/yaml/dist/nodes/Node.js +40 -0
  321. package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
  322. package/node_modules/yaml/dist/nodes/Pair.js +39 -0
  323. package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
  324. package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  325. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
  326. package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  327. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
  328. package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  329. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
  330. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  331. package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
  332. package/node_modules/yaml/dist/nodes/identity.js +53 -0
  333. package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
  334. package/node_modules/yaml/dist/nodes/toJS.js +39 -0
  335. package/node_modules/yaml/dist/options.d.ts +350 -0
  336. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
  337. package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  338. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
  339. package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  340. package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
  341. package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  342. package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
  343. package/node_modules/yaml/dist/parse/cst.js +112 -0
  344. package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
  345. package/node_modules/yaml/dist/parse/lexer.js +723 -0
  346. package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
  347. package/node_modules/yaml/dist/parse/line-counter.js +41 -0
  348. package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
  349. package/node_modules/yaml/dist/parse/parser.js +980 -0
  350. package/node_modules/yaml/dist/public-api.d.ts +44 -0
  351. package/node_modules/yaml/dist/public-api.js +107 -0
  352. package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
  353. package/node_modules/yaml/dist/schema/Schema.js +39 -0
  354. package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
  355. package/node_modules/yaml/dist/schema/common/map.js +19 -0
  356. package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
  357. package/node_modules/yaml/dist/schema/common/null.js +17 -0
  358. package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
  359. package/node_modules/yaml/dist/schema/common/seq.js +19 -0
  360. package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
  361. package/node_modules/yaml/dist/schema/common/string.js +16 -0
  362. package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
  363. package/node_modules/yaml/dist/schema/core/bool.js +21 -0
  364. package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
  365. package/node_modules/yaml/dist/schema/core/float.js +47 -0
  366. package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
  367. package/node_modules/yaml/dist/schema/core/int.js +42 -0
  368. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
  369. package/node_modules/yaml/dist/schema/core/schema.js +25 -0
  370. package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
  371. package/node_modules/yaml/dist/schema/json/schema.js +64 -0
  372. package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
  373. package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
  374. package/node_modules/yaml/dist/schema/tags.js +99 -0
  375. package/node_modules/yaml/dist/schema/types.d.ts +92 -0
  376. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
  377. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  378. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
  379. package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  380. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
  381. package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  382. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
  383. package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  384. package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
  385. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
  386. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
  387. package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  388. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
  389. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  390. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
  391. package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  392. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
  393. package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  394. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
  395. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  396. package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
  397. package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  398. package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
  399. package/node_modules/yaml/dist/stringify/stringify.js +132 -0
  400. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
  401. package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
  402. package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
  403. package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  404. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
  405. package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  406. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
  407. package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
  408. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
  409. package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  410. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
  411. package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  412. package/node_modules/yaml/dist/test-events.d.ts +4 -0
  413. package/node_modules/yaml/dist/test-events.js +134 -0
  414. package/node_modules/yaml/dist/util.d.ts +16 -0
  415. package/node_modules/yaml/dist/util.js +28 -0
  416. package/node_modules/yaml/dist/visit.d.ts +102 -0
  417. package/node_modules/yaml/dist/visit.js +236 -0
  418. package/node_modules/yaml/package.json +97 -0
  419. package/node_modules/yaml/util.js +2 -0
  420. package/package.json +2 -2
  421. package/node_modules/@llblab/pi-actors/banner.jpg +0 -0
  422. package/node_modules/@llblab/pi-actors/dist/lib/inspector-actions.d.ts +0 -16
  423. package/node_modules/@llblab/pi-actors/dist/lib/inspector-actions.js +0 -57
  424. package/node_modules/@llblab/pi-actors/lib/inspector-actions.ts +0 -79
@@ -3,15 +3,32 @@
3
3
  * Owns: active-run reuse checks, start lock acquisition, and safe state-dir
4
4
  * preparation before a new runner process is spawned.
5
5
  */
6
- import { rmSync } from "node:fs";
7
- import { join } from "node:path";
8
- import { acquireFileMutationLock, } from "./file-state.js";
6
+ import { readdirSync, rmSync } from "node:fs";
7
+ import { basename, join } from "node:path";
8
+ import { acquireFileMutationLock, mutationLockPath, } from "./file-state.js";
9
+ import { assertNoRetainedDescendantLaunchScope } from "./runs-descendant-launches.js";
10
+ import { assertNoRetainedNativeLaunchScope } from "./runs-native-launches.js";
11
+ import { isRunStopResultCapture, readRunStopClaim, RUN_STOP_CLAIM_FILE } from "./runs-outcomes.js";
12
+ import { RUN_STATE_OWNERSHIP_FILE } from "./runs-ownership.js";
9
13
  import { isAlive, verifyRunProcessIdentity, } from "./runs-process.js";
14
+ function assertNoPendingStop(stateDir, meta) {
15
+ const stop = readRunStopClaim(stateDir, meta);
16
+ if (stop.state === "pending" || stop.state === "invalid") {
17
+ throw new Error("Run stop is pending or unproven; confirm the complete owned scope before restarting.");
18
+ }
19
+ }
20
+ function assertNoUnresolvedCapture(result) {
21
+ if (isRunStopResultCapture(result)) {
22
+ throw new Error("Run stop result capture is not confirmed terminal evidence.");
23
+ }
24
+ }
10
25
  export function readActiveOwnedRunState(stateDir, readJson, _runnerPath) {
11
26
  const meta = readJson(join(stateDir, "run.json"));
12
27
  if (!meta)
13
28
  return undefined;
29
+ assertNoPendingStop(stateDir, meta);
14
30
  const result = readJson(join(stateDir, "result.json"));
31
+ assertNoUnresolvedCapture(result);
15
32
  if (typeof result?.completedAt === "string")
16
33
  return undefined;
17
34
  const pid = Number(meta.pid || 0);
@@ -27,16 +44,39 @@ export function readActiveOwnedRunState(stateDir, readJson, _runnerPath) {
27
44
  return identity.valid ? meta : undefined;
28
45
  }
29
46
  export function assertNoActiveRunState(stateDir, readJson, runnerPath) {
47
+ assertNoRetainedDescendantLaunchScope(stateDir);
48
+ assertNoRetainedNativeLaunchScope(stateDir);
30
49
  const meta = readActiveOwnedRunState(stateDir, readJson, runnerPath);
31
50
  if (meta) {
32
51
  throw new Error(`Run state already has an active owned process: ${String(meta.run ?? stateDir)}. Stop it before reusing the same run_id or state_dir.`);
33
52
  }
34
53
  }
54
+ /** Prepare-only metadata must neither replace an earlier Run nor erase unrelated retained evidence. */
55
+ export function assertFreshRunPreparationState(stateDir) {
56
+ assertNoRetainedDescendantLaunchScope(stateDir);
57
+ let entries;
58
+ try {
59
+ entries = readdirSync(stateDir);
60
+ }
61
+ catch (error) {
62
+ if (error.code === "ENOENT")
63
+ return;
64
+ throw error;
65
+ }
66
+ const lock = basename(mutationLockPath(join(stateDir, ".lifecycle")));
67
+ if (entries.some((name) => name !== RUN_STATE_OWNERSHIP_FILE && name !== lock && !name.startsWith(`${lock}.`))) {
68
+ throw new Error("Run descendant preparation requires fresh state without published Run metadata or retained evidence.");
69
+ }
70
+ }
35
71
  export function acquireStateStartLock(stateDir, options = {}) {
36
72
  return acquireFileMutationLock(join(stateDir, ".lifecycle"), options);
37
73
  }
38
74
  export function prepareStateDirForStart(stateDir, readJson, _runnerPath) {
75
+ assertNoRetainedDescendantLaunchScope(stateDir);
76
+ assertNoRetainedNativeLaunchScope(stateDir);
39
77
  const existing = readJson(join(stateDir, "run.json"));
78
+ assertNoPendingStop(stateDir, existing ?? {});
79
+ assertNoUnresolvedCapture(readJson(join(stateDir, "result.json")));
40
80
  const existingPid = Number(existing?.pid || 0);
41
81
  if (existingPid && isAlive(existingPid)) {
42
82
  const identity = verifyRunProcessIdentity(existingPid, existing?.process_identity);
@@ -57,6 +97,7 @@ export function prepareStateDirForStart(stateDir, readJson, _runnerPath) {
57
97
  "execution.json",
58
98
  "progress.json",
59
99
  "result.json",
100
+ RUN_STOP_CLAIM_FILE,
60
101
  "stderr.log",
61
102
  "stdout.log",
62
103
  "terminal-delivery-failure.json",
@@ -1,10 +1,24 @@
1
1
  /**
2
2
  * Async run status and log readers.
3
- * Owns: status derivation from run state files plus bounded log/event tails.
3
+ * Owns: status derivation, readonly canonical snapshot-fact admission and bounded log/event tails.
4
+ * Excludes: snapshot timing/visibility authority, export publication, scheduling and native scope closure.
4
5
  */
6
+ import type { RunSnapshotFacts } from "./runs-snapshot.ts";
5
7
  export type AsyncRunStatus = "running" | "done" | "failed" | "exited" | "cancelled" | "killed";
6
8
  type RunJsonReader = (path: string) => Record<string, unknown> | undefined;
7
9
  export declare function buildRunStatus(stateDir: string, runOrDir: string, meta: Record<string, unknown>, readJson: RunJsonReader, _runnerPath: string, _runnerIdentityGraceMs: number): Record<string, unknown>;
10
+ /** Fixed kernel inventory path. Native frames are synchronous locals, never capabilities returned to consumers. */
11
+ export declare function readRunInventoryStatuses(stateDirs: readonly string[], readJson: RunJsonReader, scalarStatus: (stateDir: string) => Record<string, unknown>): (Record<string, unknown> | undefined)[];
12
+ export type RunSnapshotFactsReading = {
13
+ readonly state: "available";
14
+ readonly facts: Readonly<RunSnapshotFacts>;
15
+ readonly unchanged: () => boolean;
16
+ } | {
17
+ readonly state: "unavailable";
18
+ readonly reason: "identity_unavailable" | "identity_mismatch" | "observation_changed" | "observation_unavailable" | "references_unavailable" | "snapshot_too_large";
19
+ };
20
+ /** Kernel-local facts only. Opt-in timing must be the original retained owner's method, never actor data or a cached DTO. */
21
+ export declare function readRunSnapshotFacts(stateDir: string, expected: unknown, capturedAt: unknown, observeTime?: (expected: unknown, stateDir?: string) => unknown, observeFrozenNaturalTime?: (expected: unknown, stateDir?: string) => unknown): Readonly<RunSnapshotFactsReading>;
8
22
  export declare function tailFile(path: string, lines: number): string;
9
23
  export declare function tailLines(path: string, lines: number): string[];
10
24
  export {};
@@ -1,11 +1,18 @@
1
1
  /**
2
2
  * Async run status and log readers.
3
- * Owns: status derivation from run state files plus bounded log/event tails.
3
+ * Owns: status derivation, readonly canonical snapshot-fact admission and bounded log/event tails.
4
+ * Excludes: snapshot timing/visibility authority, export publication, scheduling and native scope closure.
4
5
  */
5
- import { existsSync, readFileSync } from "node:fs";
6
- import { join } from "node:path";
7
- import { verifyRunProcessIdentity, } from "./runs-process.js";
8
- import { readJsonlFileResilient } from "./state-readers.js";
6
+ import { closeSync, constants, existsSync, fstatSync, lstatSync, openSync, readFileSync, readSync } from "node:fs";
7
+ import { platform } from "node:os";
8
+ import { isAbsolute, join } from "node:path";
9
+ import { types as UtilTypes } from "node:util";
10
+ import { RUN_DELIVERY_MODEL_MAX_BYTES } from "./limits.js";
11
+ import { readRunContextIdentity, readRunContextIndex, RUN_CONTEXT_INDEX_FILE, RUN_CONTEXT_SOURCE_METADATA_MAX_BYTES } from "./runs-context-index.js";
12
+ import { RUN_OUTCOME_PROTOCOL, RUN_STOP_CLAIM_FILE, isRunStopResultCapture, readRunNaturalOutcomeSnapshot, readRunStopClaim } from "./runs-outcomes.js";
13
+ import { RUN_STATE_OWNERSHIP_FILE } from "./runs-ownership.js";
14
+ import { isAlive, observeRunProcessExit, readWindowsProcessIdentities, WINDOWS_IDENTITY_QUERY_PID_LIMIT, verifyRunProcessIdentity, } from "./runs-process.js";
15
+ import { readJsonFileResilient, readJsonlFileResilient } from "./state-readers.js";
9
16
  function getInterruptedRunStatus(stateDir) {
10
17
  const trace = readJsonlFileResilient(join(stateDir, "trace.jsonl")).records.slice(-200);
11
18
  for (const event of trace.reverse()) {
@@ -24,18 +31,32 @@ function getInterruptedRunStatus(stateDir) {
24
31
  return undefined;
25
32
  }
26
33
  export function buildRunStatus(stateDir, runOrDir, meta, readJson, _runnerPath, _runnerIdentityGraceMs) {
27
- const result = readJson(join(stateDir, "result.json"));
34
+ return deriveRunStatus(stateDir, meta, readJson, (pid, expected) => verifyRunProcessIdentity(pid, expected));
35
+ }
36
+ function deriveRunStatus(stateDir, meta, readJson, observeIdentity) {
37
+ const snapshot = readRunNaturalOutcomeSnapshot(stateDir, meta, readJson);
38
+ const rawResult = snapshot.result;
39
+ const staleResult = rawResult?.run_instance_id !== undefined && rawResult.run_instance_id !== meta.run_instance_id;
40
+ const result = staleResult ? undefined : rawResult;
41
+ const stop = readRunStopClaim(stateDir, meta);
42
+ const unresolvedCapture = isRunStopResultCapture(result);
43
+ const natural = snapshot.outcome;
44
+ const stopping = natural.state !== "accepted" && (stop.state === "pending" || stop.state === "invalid" || unresolvedCapture);
28
45
  const pid = Number(meta.pid || 0);
29
- const processIdentity = verifyRunProcessIdentity(pid, meta.process_identity);
46
+ const processIdentity = observeIdentity(pid, meta.process_identity);
30
47
  const aliveOwnedRunner = Boolean(pid &&
31
48
  (processIdentity.valid || processIdentity.status === "unsupported_proof"));
32
- const status = result
33
- ? Number(result.code ?? 0) === 0
34
- ? "done"
35
- : "failed"
36
- : aliveOwnedRunner
49
+ const status = natural.state === "accepted"
50
+ ? natural.status
51
+ : stopping
37
52
  ? "running"
38
- : (getInterruptedRunStatus(stateDir) ?? "exited");
53
+ : result
54
+ ? Number(result.code ?? 0) === 0
55
+ ? "done"
56
+ : "failed"
57
+ : aliveOwnedRunner
58
+ ? "running"
59
+ : (getInterruptedRunStatus(stateDir) ?? "exited");
39
60
  const terminalHandled = readJson(join(stateDir, "terminal-handled.json"));
40
61
  const terminalDeliveryFailure = readJson(join(stateDir, "terminal-delivery-failure.json"));
41
62
  return {
@@ -43,6 +64,11 @@ export function buildRunStatus(stateDir, runOrDir, meta, readJson, _runnerPath,
43
64
  traceFile: join(stateDir, "trace.jsonl"),
44
65
  executionFile: join(stateDir, "execution.json"),
45
66
  process_identity_status: processIdentity.status,
67
+ ...(stopping ? { phase: "stopping", stopped: false } : {}),
68
+ ...(stopping && stop.state === "pending" ? { stop_reason: stop.claim.reason, stop_claim_id: stop.claim.claim_id } : {}),
69
+ ...(stop.state === "invalid" || (unresolvedCapture && stop.state !== "pending")
70
+ ? { stop_error: "claim_unavailable" } : {}),
71
+ ...(staleResult ? { result_error: "generation_mismatch" } : {}),
46
72
  progress: readJson(join(stateDir, "progress.json")) || null,
47
73
  result: result || null,
48
74
  ...(terminalDeliveryFailure
@@ -54,6 +80,304 @@ export function buildRunStatus(stateDir, runOrDir, meta, readJson, _runnerPath,
54
80
  status,
55
81
  };
56
82
  }
83
+ function readInventorySource(path) {
84
+ let fd;
85
+ try {
86
+ const stamp = snapshotStamp(path);
87
+ if (!stamp?.isFile() || stamp.size > BigInt(RUN_CONTEXT_SOURCE_METADATA_MAX_BYTES))
88
+ return undefined;
89
+ fd = openSync(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
90
+ const opened = fstatSync(fd, { bigint: true });
91
+ if (opened.dev !== stamp.dev || opened.ino !== stamp.ino || !opened.isFile() || opened.size !== stamp.size ||
92
+ opened.mtimeNs !== stamp.mtimeNs || opened.ctimeNs !== stamp.ctimeNs)
93
+ return undefined;
94
+ const bytes = Buffer.alloc(Number(stamp.size));
95
+ let offset = 0;
96
+ while (offset < bytes.length) {
97
+ const count = readSync(fd, bytes, offset, bytes.length - offset, offset);
98
+ if (!count)
99
+ return undefined;
100
+ offset += count;
101
+ }
102
+ if (readSync(fd, Buffer.alloc(1), 0, 1, offset) !== 0 ||
103
+ !sameSnapshotStamp(stamp, path))
104
+ return undefined;
105
+ const after = fstatSync(fd, { bigint: true });
106
+ return after.size === stamp.size && after.mtimeNs === stamp.mtimeNs && after.ctimeNs === stamp.ctimeNs ? { stamp, bytes } : undefined;
107
+ }
108
+ finally {
109
+ if (fd !== undefined)
110
+ closeSync(fd);
111
+ }
112
+ }
113
+ function admitInventoryRow(stateDir) {
114
+ const path = join(stateDir, "run.json");
115
+ const markerPath = join(stateDir, RUN_STATE_OWNERSHIP_FILE);
116
+ const source = readInventorySource(path);
117
+ if (!source)
118
+ return undefined;
119
+ let meta;
120
+ try {
121
+ meta = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(source.bytes));
122
+ }
123
+ catch {
124
+ return undefined;
125
+ }
126
+ if (!meta || typeof meta !== "object" || Array.isArray(meta) || meta.state_dir !== stateDir ||
127
+ typeof meta.pid !== "number" || !Number.isSafeInteger(meta.pid) || meta.pid <= 0)
128
+ return undefined;
129
+ const expected = meta.process_identity;
130
+ if (!expected || expected.platform !== "win32" || typeof expected.command !== "string" ||
131
+ typeof expected.start_time !== "string" || (expected.cwd !== undefined && typeof expected.cwd !== "string"))
132
+ return undefined;
133
+ const owner = readRunContextIdentity(stateDir, meta);
134
+ if (owner.state !== "available" || owner.local_path !== stateDir)
135
+ return undefined;
136
+ const marker = readInventorySource(markerPath);
137
+ if (!marker)
138
+ return undefined;
139
+ const unchanged = () => {
140
+ if (!owner.unchanged() || !sameSnapshotStamp(source.stamp, path) || !sameSnapshotStamp(marker.stamp, markerPath))
141
+ return false;
142
+ const current = readInventorySource(path);
143
+ const currentMarker = readInventorySource(markerPath);
144
+ return !!current && !!currentMarker && source.bytes.equals(current.bytes) && marker.bytes.equals(currentMarker.bytes) && owner.unchanged();
145
+ };
146
+ // Once admitted, a changed row can only be discarded, never reread through the scalar facade.
147
+ return { meta, pid: meta.pid, expected, unchanged };
148
+ }
149
+ /** Fixed kernel inventory path. Native frames are synchronous locals, never capabilities returned to consumers. */
150
+ export function readRunInventoryStatuses(stateDirs, readJson, scalarStatus) {
151
+ const scalar = (stateDir) => { try {
152
+ return scalarStatus(stateDir);
153
+ }
154
+ catch {
155
+ return undefined;
156
+ } };
157
+ if (platform() !== "win32")
158
+ return stateDirs.map(scalar);
159
+ const rows = stateDirs.map(stateDir => { try {
160
+ return admitInventoryRow(stateDir);
161
+ }
162
+ catch {
163
+ return undefined;
164
+ } });
165
+ // This selects optional acquisition only; assembly still verifies freshly and excluded rows retain scalar fallback.
166
+ const pids = [...new Set(rows.flatMap(row => row ? [row.pid] : []))].filter(isAlive);
167
+ const observations = new Map();
168
+ for (let offset = 0; offset < pids.length; offset += WINDOWS_IDENTITY_QUERY_PID_LIMIT) {
169
+ const chunk = pids.slice(offset, offset + WINDOWS_IDENTITY_QUERY_PID_LIMIT);
170
+ const identities = readWindowsProcessIdentities(chunk);
171
+ for (const pid of chunk)
172
+ observations.set(pid, identities);
173
+ }
174
+ const statuses = stateDirs.map((stateDir, index) => {
175
+ const row = rows[index];
176
+ if (!row)
177
+ return scalar(stateDir);
178
+ try {
179
+ if (!row.unchanged())
180
+ return undefined;
181
+ const identities = observations.get(row.pid);
182
+ const status = deriveRunStatus(stateDir, row.meta, readJson, () => {
183
+ if (!row.unchanged())
184
+ throw new Error("Inventory frame changed");
185
+ const identity = identities === undefined ? verifyRunProcessIdentity(row.pid, row.expected)
186
+ : verifyRunProcessIdentity(row.pid, row.expected, "win32", pid => identities.get(pid));
187
+ if (!row.unchanged())
188
+ throw new Error("Inventory frame changed");
189
+ return identity;
190
+ });
191
+ return row.unchanged() ? status : undefined;
192
+ }
193
+ catch {
194
+ return undefined;
195
+ }
196
+ });
197
+ // Later row assembly can reenter file readers and invalidate an earlier assembled row.
198
+ return statuses.map((status, index) => {
199
+ const row = rows[index];
200
+ if (!status || !row)
201
+ return status;
202
+ try {
203
+ return row.unchanged() ? status : undefined;
204
+ }
205
+ catch {
206
+ return undefined;
207
+ }
208
+ });
209
+ }
210
+ function snapshotStamp(path) {
211
+ try {
212
+ return lstatSync(path, { bigint: true });
213
+ }
214
+ catch (error) {
215
+ if (error.code === "ENOENT")
216
+ return undefined;
217
+ throw error;
218
+ }
219
+ }
220
+ function sameSnapshotStamp(before, path) {
221
+ const after = snapshotStamp(path);
222
+ return before === undefined ? after === undefined : after !== undefined && before.dev === after.dev && before.ino === after.ino &&
223
+ before.mode === after.mode && before.size === after.size && before.mtimeNs === after.mtimeNs && before.ctimeNs === after.ctimeNs;
224
+ }
225
+ function snapshotDeferred(value) {
226
+ if (!UtilTypes.isPromise(value))
227
+ return false;
228
+ void Promise.prototype.then.call(value, undefined, () => { });
229
+ return true;
230
+ }
231
+ function snapshotData(value) {
232
+ if (!value || typeof value !== "object" || Array.isArray(value))
233
+ return undefined;
234
+ for (let target = value; target; target = Object.getPrototypeOf(target)) {
235
+ const then = Object.getOwnPropertyDescriptor(target, "then");
236
+ if (then && (!Object.hasOwn(then, "value") || typeof then.value === "function"))
237
+ return undefined;
238
+ }
239
+ const descriptors = Object.getOwnPropertyDescriptors(value);
240
+ return Object.values(descriptors).every(field => Object.hasOwn(field, "value"))
241
+ ? Object.fromEntries(Object.entries(descriptors).map(([key, field]) => [key, field.value])) : undefined;
242
+ }
243
+ /** Kernel-local facts only. Opt-in timing must be the original retained owner's method, never actor data or a cached DTO. */
244
+ export function readRunSnapshotFacts(stateDir, expected, capturedAt, observeTime, observeFrozenNaturalTime) {
245
+ const unavailable = (reason) => Object.freeze({ state: "unavailable", reason });
246
+ if ((observeTime !== undefined && typeof observeTime !== "function") ||
247
+ (observeFrozenNaturalTime !== undefined && typeof observeFrozenNaturalTime !== "function") || typeof capturedAt !== "string" || capturedAt.length > 32)
248
+ return unavailable("observation_unavailable");
249
+ const capturedMs = Date.parse(capturedAt);
250
+ if (!Number.isSafeInteger(capturedMs) || new Date(capturedMs).toISOString() !== capturedAt)
251
+ return unavailable("observation_unavailable");
252
+ const owner = readRunContextIdentity(stateDir, expected);
253
+ if (owner.state !== "available")
254
+ return unavailable(owner.reason);
255
+ try {
256
+ const root = owner.local_path;
257
+ const metadataPath = join(root, "run.json");
258
+ const resultPath = join(root, "result.json");
259
+ const indexPath = join(root, RUN_CONTEXT_INDEX_FILE);
260
+ const metadata = snapshotStamp(metadataPath);
261
+ if (!metadata?.isFile() || metadata.size > BigInt(RUN_CONTEXT_SOURCE_METADATA_MAX_BYTES))
262
+ return unavailable("observation_unavailable");
263
+ const read = readJsonFileResilient(metadataPath, undefined, { maxBytes: RUN_CONTEXT_SOURCE_METADATA_MAX_BYTES, strictUtf8: true });
264
+ if (!owner.unchanged() || !sameSnapshotStamp(metadata, metadataPath))
265
+ return unavailable("observation_changed");
266
+ if (read.diagnostics.length || !read.value || typeof read.value !== "object" || Array.isArray(read.value))
267
+ return unavailable("observation_unavailable");
268
+ const meta = read.value;
269
+ if (meta.run !== owner.identity.run || meta.run_instance_id !== owner.identity.run_instance_id || meta.ownerId !== owner.identity.ownerId || meta.state_dir !== root)
270
+ return unavailable("identity_mismatch");
271
+ if (typeof meta.cwd !== "string" || !isAbsolute(meta.cwd) || /[\u0000-\u001f\u007f]/u.test(meta.cwd))
272
+ return unavailable("references_unavailable");
273
+ if (meta.cwd.length > RUN_DELIVERY_MODEL_MAX_BYTES)
274
+ return unavailable("snapshot_too_large");
275
+ const result = snapshotStamp(resultPath);
276
+ const index = snapshotStamp(indexPath);
277
+ if (result && !result.isFile())
278
+ return unavailable("observation_unavailable");
279
+ const outcome = readRunNaturalOutcomeSnapshot(root, meta, path => {
280
+ const canonical = readJsonFileResilient(path, undefined, { maxBytes: RUN_CONTEXT_SOURCE_METADATA_MAX_BYTES, strictUtf8: true });
281
+ return canonical.diagnostics.length ? undefined : canonical.value;
282
+ });
283
+ const natural = outcome.outcome;
284
+ const context = readRunContextIndex(root, owner.identity);
285
+ const stopPath = join(root, RUN_STOP_CLAIM_FILE);
286
+ let stopObserved = false;
287
+ let stopStamp;
288
+ let timingUnchanged;
289
+ const frameUnchanged = () => owner.unchanged() && sameSnapshotStamp(metadata, metadataPath) &&
290
+ sameSnapshotStamp(result, resultPath) && sameSnapshotStamp(index, indexPath) && (!stopObserved || sameSnapshotStamp(stopStamp, stopPath));
291
+ const unchanged = () => {
292
+ try {
293
+ if (!frameUnchanged())
294
+ return false;
295
+ if (!timingUnchanged)
296
+ return true;
297
+ const stable = timingUnchanged();
298
+ return !snapshotDeferred(stable) && stable === true && frameUnchanged();
299
+ }
300
+ catch {
301
+ return false;
302
+ }
303
+ };
304
+ if (!unchanged())
305
+ return unavailable("observation_changed");
306
+ let lifecycle = meta.outcome_protocol === RUN_OUTCOME_PROTOCOL && natural.state === "accepted"
307
+ ? Object.freeze({ status: natural.status }) : Object.freeze({ status: "unproven" });
308
+ let timing = Object.freeze({ basis: "unproven" });
309
+ if (observeFrozenNaturalTime && meta.outcome_protocol === RUN_OUTCOME_PROTOCOL && natural.state === "accepted") {
310
+ const retained = observeFrozenNaturalTime(owner.identity, root);
311
+ if (snapshotDeferred(retained))
312
+ return unavailable("observation_unavailable");
313
+ const frozen = snapshotData(retained);
314
+ if (!frozen)
315
+ return unavailable("observation_unavailable");
316
+ if (frozen.state === "available") {
317
+ const identity = snapshotData(frozen.identity);
318
+ const accepted = snapshotData(frozen.natural_acceptance);
319
+ if (!identity || identity.run !== owner.identity.run || identity.run_instance_id !== owner.identity.run_instance_id || identity.ownerId !== owner.identity.ownerId)
320
+ return unavailable("identity_mismatch");
321
+ if (frozen.basis !== "first_natural_acceptance" || !accepted || accepted.recorded_status !== natural.status || accepted.code !== outcome.result?.code ||
322
+ accepted.completed_at !== outcome.result?.completedAt || typeof frozen.elapsed_ms !== "number" || !Number.isSafeInteger(frozen.elapsed_ms) || frozen.elapsed_ms < 0 ||
323
+ typeof frozen.unchanged !== "function")
324
+ return unavailable("observation_unavailable");
325
+ timingUnchanged = frozen.unchanged;
326
+ timing = Object.freeze({ basis: "terminal", elapsed_ms: frozen.elapsed_ms });
327
+ }
328
+ else if (frozen.state !== "unavailable")
329
+ return unavailable("observation_unavailable");
330
+ if (!unchanged())
331
+ return unavailable("observation_changed");
332
+ }
333
+ if (observeTime && meta.outcome_protocol === RUN_OUTCOME_PROTOCOL && (natural.state === "absent" || natural.state === "captured") &&
334
+ typeof meta.pid === "number" && Number.isSafeInteger(meta.pid) && meta.pid > 0) {
335
+ stopObserved = true;
336
+ stopStamp = snapshotStamp(stopPath);
337
+ const stop = readRunStopClaim(root, meta);
338
+ const eligible = (natural.state === "absent" && (stop.state === "absent" || stop.state === "stale" || stop.state === "pending")) ||
339
+ (natural.state === "captured" && stop.state === "pending" && outcome.result?.stop_claim_id === stop.claim.claim_id);
340
+ if (eligible && observeRunProcessExit(meta.pid, meta.process_identity).status === "running") {
341
+ if (!unchanged())
342
+ return unavailable("observation_changed");
343
+ const sampled = observeTime(owner.identity, root);
344
+ if (snapshotDeferred(sampled))
345
+ return unavailable("observation_unavailable");
346
+ const observed = snapshotData(sampled);
347
+ if (!observed)
348
+ return unavailable("observation_unavailable");
349
+ if (observed.state === "available") {
350
+ const identity = snapshotData(observed.identity);
351
+ const measured = snapshotData(observed.timing);
352
+ if (!identity || identity.run !== owner.identity.run || identity.run_instance_id !== owner.identity.run_instance_id || identity.ownerId !== owner.identity.ownerId)
353
+ return unavailable("identity_mismatch");
354
+ if (observed.basis !== "since_admission" || !measured || typeof observed.unchanged !== "function")
355
+ return unavailable("observation_unavailable");
356
+ timingUnchanged = observed.unchanged;
357
+ lifecycle = Object.freeze({ status: "running", ...(stop.state === "pending" ? { phase: "stopping" } : {}) });
358
+ if (measured.state === "available" && typeof measured.elapsed_ms === "number" && Number.isSafeInteger(measured.elapsed_ms) && measured.elapsed_ms >= 0) {
359
+ timing = Object.freeze({ basis: "live", elapsed_ms: measured.elapsed_ms });
360
+ }
361
+ else if (measured.state !== "unproven" || measured.elapsed_ms !== null)
362
+ return unavailable("observation_unavailable");
363
+ }
364
+ else if (observed.state !== "unavailable")
365
+ return unavailable("observation_unavailable");
366
+ if (!unchanged() || observeRunProcessExit(meta.pid, meta.process_identity).status !== "running" || !unchanged())
367
+ return unavailable("observation_changed");
368
+ }
369
+ }
370
+ const facts = Object.freeze({ identity: owner.identity, captured_at: capturedAt,
371
+ lifecycle, timing, cwd: meta.cwd,
372
+ ...(context.state === "available" ? { context_index: Object.freeze({ identity: context.identity, path: context.local_path }) } : {}) });
373
+ if (Buffer.byteLength(JSON.stringify(facts)) > RUN_DELIVERY_MODEL_MAX_BYTES)
374
+ return unavailable("snapshot_too_large");
375
+ return unchanged() ? Object.freeze({ state: "available", facts, unchanged }) : unavailable("observation_changed");
376
+ }
377
+ catch {
378
+ return unavailable("observation_unavailable");
379
+ }
380
+ }
57
381
  export function tailFile(path, lines) {
58
382
  if (!existsSync(path))
59
383
  return "";
@@ -0,0 +1,105 @@
1
+ import { type RunSupervisionClock, type RunSupervisionController, type RunSupervisionControllerPorts, type RunSupervisionControllerSnapshot, type RunSupervisionTimebaseReading, type RunSupervisionTimeObservation } from "./run-supervision.ts";
2
+ import { type RunContextIndexIdentity } from "./runs-context-index.ts";
3
+ import { type RunSnapshotReferencesReading } from "./runs-context-exports.ts";
4
+ import { type RunSnapshotFactsReading } from "./runs-status.ts";
5
+ import { type RunSnapshot, type RunSnapshotProjection } from "./runs-snapshot.ts";
6
+ import { type RunNaturalResultTimingAdmission, type RunResultProducer } from "./runs-results.ts";
7
+ export type RunSupervisionBindingReading = {
8
+ readonly state: "available";
9
+ readonly identity: Readonly<RunContextIndexIdentity>;
10
+ readonly clock: Readonly<RunSupervisionClock>;
11
+ readonly unchanged: () => boolean;
12
+ } | {
13
+ readonly state: "unavailable";
14
+ readonly reason: "identity_unavailable" | "identity_mismatch" | "observation_changed" | "clock_metadata_unavailable" | "clock_unconfigured" | "clock_invalid";
15
+ };
16
+ type Unavailable = Extract<RunSupervisionBindingReading, {
17
+ state: "unavailable";
18
+ }>;
19
+ export type BoundRunSupervisionControllerReading = {
20
+ readonly state: "available";
21
+ readonly controller: Readonly<RunSupervisionController>;
22
+ } | Unavailable | Extract<RunSupervisionTimebaseReading, {
23
+ state: "unavailable";
24
+ }>;
25
+ /** Curated metadata only; no current-time read, clock repair, lifecycle/native observation or role body. */
26
+ export declare function readRunSupervisionBinding(stateDir: string, expected: unknown): Readonly<RunSupervisionBindingReading>;
27
+ /** Does not start automatically; origin must be the genuine reference retained from generation admission. */
28
+ export declare function createRunSupervisionControllerFromState(stateDir: string, expected: unknown, origin: unknown, ports: Omit<RunSupervisionControllerPorts, "readCurrent">): Readonly<BoundRunSupervisionControllerReading>;
29
+ export type RunSupervisionOwnerReading = {
30
+ readonly state: "retained" | "stopped" | "released";
31
+ readonly identity: Readonly<RunContextIndexIdentity>;
32
+ readonly controller?: Readonly<RunSupervisionControllerSnapshot>;
33
+ } | {
34
+ readonly state: "controlled";
35
+ readonly identity: Readonly<RunContextIndexIdentity>;
36
+ readonly controller: Readonly<RunSupervisionControllerSnapshot>;
37
+ } | {
38
+ readonly state: "unavailable";
39
+ readonly reason: Extract<BoundRunSupervisionControllerReading, {
40
+ state: "unavailable";
41
+ }>["reason"] | "identity_invalid" | "origin_not_retained" | "owner_closed" | "controller_claimed";
42
+ };
43
+ type OwnerUnavailable = Extract<RunSupervisionOwnerReading, {
44
+ state: "unavailable";
45
+ }>;
46
+ export type RunSupervisionOwnerTimeReading = {
47
+ readonly state: "available";
48
+ readonly basis: "since_admission";
49
+ readonly identity: Readonly<RunContextIndexIdentity>;
50
+ readonly timing: Readonly<RunSupervisionTimeObservation>;
51
+ readonly unchanged: () => boolean;
52
+ } | {
53
+ readonly state: "unavailable";
54
+ readonly reason: OwnerUnavailable["reason"] | "owner_stopped";
55
+ };
56
+ export type RunSupervisionOwnerReferencesReading = RunSnapshotReferencesReading | OwnerUnavailable | {
57
+ readonly state: "unavailable";
58
+ readonly reason: "owner_stopped" | "references_not_retained";
59
+ };
60
+ export type RunSupervisionOwnerSnapshotReading = {
61
+ readonly state: "available";
62
+ readonly snapshot: Readonly<RunSnapshot>;
63
+ readonly unchanged: () => boolean;
64
+ } | Extract<RunSnapshotProjection | RunSnapshotFactsReading | RunSupervisionOwnerReferencesReading, {
65
+ state: "unavailable";
66
+ }>;
67
+ export type RunSupervisionOwnerNaturalTimeReading = {
68
+ readonly state: "available";
69
+ readonly basis: "first_natural_acceptance";
70
+ readonly identity: Readonly<RunContextIndexIdentity>;
71
+ readonly elapsed_ms: number;
72
+ readonly natural_acceptance: Readonly<{
73
+ code: number;
74
+ recorded_status: "done" | "failed";
75
+ completed_at: string;
76
+ }>;
77
+ readonly unchanged: () => boolean;
78
+ } | Extract<RunSupervisionOwnerTimeReading, {
79
+ state: "unavailable";
80
+ }> | {
81
+ readonly state: "unavailable";
82
+ readonly reason: "natural_time_not_captured" | "natural_time_capturing" | "natural_time_unproven" | "natural_acceptance_mismatch";
83
+ };
84
+ export interface RunSupervisionOwnerClose {
85
+ readonly state: "closed";
86
+ readonly timer_cleanup?: "unproven";
87
+ }
88
+ export interface RunSupervisionOwner {
89
+ readonly onSupervisionClockCaptured: (capture: unknown) => void;
90
+ readonly start: (expected: unknown) => Readonly<RunSupervisionOwnerReading>;
91
+ readonly stop: (expected: unknown) => Readonly<RunSupervisionOwnerReading>;
92
+ readonly release: (expected: unknown) => Readonly<RunSupervisionOwnerReading>;
93
+ readonly snapshot: (expected: unknown) => Readonly<RunSupervisionOwnerReading>;
94
+ readonly observeTime: (expected: unknown, stateDir?: string) => Readonly<RunSupervisionOwnerTimeReading>;
95
+ readonly observeReferences: (expected: unknown, stateDir?: string) => Readonly<RunSupervisionOwnerReferencesReading>;
96
+ /** Active postcommit admission only; the first authorized attempt is final across original-origin owners. */
97
+ readonly captureNaturalTime: (expected: unknown, producer: RunResultProducer, admission: RunNaturalResultTimingAdmission, stateDir?: string) => Readonly<RunSupervisionOwnerNaturalTimeReading>;
98
+ /** Historical elapsed plus current owner/clock/frame, not current result/lifecycle or a new sample. */
99
+ readonly observeFrozenNaturalTime: (expected: unknown, stateDir?: string) => Readonly<RunSupervisionOwnerNaturalTimeReading>;
100
+ readonly observeSnapshot: (expected: unknown, capturedAt: unknown, stateDir?: string) => Readonly<RunSupervisionOwnerSnapshotReading>;
101
+ readonly close: () => Readonly<RunSupervisionOwnerClose>;
102
+ }
103
+ /** Explicit retention with cooperative same-origin claims; no default watcher, cross-process lease or independent supervisor. */
104
+ export declare function createRunSupervisionOwner(ports: Omit<RunSupervisionControllerPorts, "readCurrent">): Readonly<RunSupervisionOwner>;
105
+ export {};