@vibesdotdev/host-bun 0.0.0-stage → 1.0.0-rc.2

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 (517) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +222 -2
  3. package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts +6 -0
  4. package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts.map +1 -0
  5. package/dist/applet-serve-host/applet-serve-host.impl.bun.js +80 -0
  6. package/dist/applet-serve-host/applet-serve-host.impl.bun.js.map +1 -0
  7. package/dist/applet-serve-host/applet-serve-host.plugin.d.ts +22 -0
  8. package/dist/applet-serve-host/applet-serve-host.plugin.d.ts.map +1 -0
  9. package/dist/applet-serve-host/applet-serve-host.plugin.js +42 -0
  10. package/dist/applet-serve-host/applet-serve-host.plugin.js.map +1 -0
  11. package/dist/applet-serve-host/index.d.ts +7 -0
  12. package/dist/applet-serve-host/index.d.ts.map +1 -0
  13. package/dist/applet-serve-host/index.js +7 -0
  14. package/dist/applet-serve-host/index.js.map +1 -0
  15. package/dist/applet-serve-host/stylesheet.compiler.d.ts +7 -0
  16. package/dist/applet-serve-host/stylesheet.compiler.d.ts.map +1 -0
  17. package/dist/applet-serve-host/stylesheet.compiler.js +63 -0
  18. package/dist/applet-serve-host/stylesheet.compiler.js.map +1 -0
  19. package/dist/atlas-migrations/register-atlas-host-migrations.d.ts +21 -0
  20. package/dist/atlas-migrations/register-atlas-host-migrations.d.ts.map +1 -0
  21. package/dist/atlas-migrations/register-atlas-host-migrations.js +148 -0
  22. package/dist/atlas-migrations/register-atlas-host-migrations.js.map +1 -0
  23. package/dist/buffered-capture.d.ts +4 -0
  24. package/dist/buffered-capture.d.ts.map +1 -0
  25. package/dist/buffered-capture.impl.bun.d.ts +18 -0
  26. package/dist/buffered-capture.impl.bun.d.ts.map +1 -0
  27. package/dist/buffered-capture.impl.bun.js +148 -0
  28. package/dist/buffered-capture.impl.bun.js.map +1 -0
  29. package/dist/buffered-capture.js +5 -0
  30. package/dist/buffered-capture.js.map +1 -0
  31. package/dist/bun-environment.impl.bun.d.ts +231 -0
  32. package/dist/bun-environment.impl.bun.d.ts.map +1 -0
  33. package/dist/bun-environment.impl.bun.js +352 -0
  34. package/dist/bun-environment.impl.bun.js.map +1 -0
  35. package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts +20 -0
  36. package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts.map +1 -0
  37. package/dist/cache-redis/cache-redis-connector.impl.bun.js +30 -0
  38. package/dist/cache-redis/cache-redis-connector.impl.bun.js.map +1 -0
  39. package/dist/cache-redis/cache-redis-connector.plugin.d.ts +21 -0
  40. package/dist/cache-redis/cache-redis-connector.plugin.d.ts.map +1 -0
  41. package/dist/cache-redis/cache-redis-connector.plugin.js +32 -0
  42. package/dist/cache-redis/cache-redis-connector.plugin.js.map +1 -0
  43. package/dist/cli-checkout.impl.bun.d.ts +13 -0
  44. package/dist/cli-checkout.impl.bun.d.ts.map +1 -0
  45. package/dist/cli-checkout.impl.bun.js +26 -0
  46. package/dist/cli-checkout.impl.bun.js.map +1 -0
  47. package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts +19 -0
  48. package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts.map +1 -0
  49. package/dist/docs/runtime-environment-bun.docs.descriptor.js +116 -0
  50. package/dist/docs/runtime-environment-bun.docs.descriptor.js.map +1 -0
  51. package/dist/filesystem/adapter.impl.bun.d.ts +15 -0
  52. package/dist/filesystem/adapter.impl.bun.d.ts.map +1 -0
  53. package/dist/filesystem/adapter.impl.bun.js +11 -0
  54. package/dist/filesystem/adapter.impl.bun.js.map +1 -0
  55. package/dist/filesystem/host-primitives.impl.bun.d.ts +12 -0
  56. package/dist/filesystem/host-primitives.impl.bun.d.ts.map +1 -0
  57. package/dist/filesystem/host-primitives.impl.bun.js +96 -0
  58. package/dist/filesystem/host-primitives.impl.bun.js.map +1 -0
  59. package/dist/filesystem/register.d.ts +12 -0
  60. package/dist/filesystem/register.d.ts.map +1 -0
  61. package/dist/filesystem/register.js +6 -0
  62. package/dist/filesystem/register.js.map +1 -0
  63. package/dist/filesystem/rooted-exclusive.impl.bun.d.ts +4 -0
  64. package/dist/filesystem/rooted-exclusive.impl.bun.d.ts.map +1 -0
  65. package/dist/filesystem/rooted-exclusive.impl.bun.js +135 -0
  66. package/dist/filesystem/rooted-exclusive.impl.bun.js.map +1 -0
  67. package/dist/held-launch/abi.impl.bun.d.ts +175 -0
  68. package/dist/held-launch/abi.impl.bun.d.ts.map +1 -0
  69. package/dist/held-launch/abi.impl.bun.js +476 -0
  70. package/dist/held-launch/abi.impl.bun.js.map +1 -0
  71. package/dist/held-launch/execution.impl.bun.d.ts +48 -0
  72. package/dist/held-launch/execution.impl.bun.d.ts.map +1 -0
  73. package/dist/held-launch/execution.impl.bun.js +375 -0
  74. package/dist/held-launch/execution.impl.bun.js.map +1 -0
  75. package/dist/held-launch/library.impl.bun.d.ts +23 -0
  76. package/dist/held-launch/library.impl.bun.d.ts.map +1 -0
  77. package/dist/held-launch/library.impl.bun.js +178 -0
  78. package/dist/held-launch/library.impl.bun.js.map +1 -0
  79. package/dist/held-launch/schemas.d.ts +10 -0
  80. package/dist/held-launch/schemas.d.ts.map +1 -0
  81. package/dist/held-launch/schemas.js +3 -0
  82. package/dist/held-launch/schemas.js.map +1 -0
  83. package/dist/held-launch/streams.impl.bun.d.ts +38 -0
  84. package/dist/held-launch/streams.impl.bun.d.ts.map +1 -0
  85. package/dist/held-launch/streams.impl.bun.js +183 -0
  86. package/dist/held-launch/streams.impl.bun.js.map +1 -0
  87. package/dist/host-channel.impl.bun.d.ts +25 -0
  88. package/dist/host-channel.impl.bun.d.ts.map +1 -0
  89. package/dist/host-channel.impl.bun.js +40 -0
  90. package/dist/host-channel.impl.bun.js.map +1 -0
  91. package/dist/host-client.impl.bun.d.ts +31 -0
  92. package/dist/host-client.impl.bun.d.ts.map +1 -0
  93. package/dist/host-client.impl.bun.js +39 -0
  94. package/dist/host-client.impl.bun.js.map +1 -0
  95. package/dist/host-credentials.d.ts +38 -0
  96. package/dist/host-credentials.d.ts.map +1 -0
  97. package/dist/host-credentials.js +44 -0
  98. package/dist/host-credentials.js.map +1 -0
  99. package/dist/host-loader.impl.bun.d.ts +12 -0
  100. package/dist/host-loader.impl.bun.d.ts.map +1 -0
  101. package/dist/host-loader.impl.bun.js +83 -0
  102. package/dist/host-loader.impl.bun.js.map +1 -0
  103. package/dist/host-signal.impl.bun.d.ts +11 -0
  104. package/dist/host-signal.impl.bun.d.ts.map +1 -0
  105. package/dist/host-signal.impl.bun.js +28 -0
  106. package/dist/host-signal.impl.bun.js.map +1 -0
  107. package/dist/http-listener.impl.bun.d.ts +8 -0
  108. package/dist/http-listener.impl.bun.d.ts.map +1 -0
  109. package/dist/http-listener.impl.bun.js +44 -0
  110. package/dist/http-listener.impl.bun.js.map +1 -0
  111. package/dist/index.d.ts +38 -0
  112. package/dist/index.d.ts.map +1 -0
  113. package/dist/index.js +314 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/local-execution.impl.bun.d.ts +47 -0
  116. package/dist/local-execution.impl.bun.d.ts.map +1 -0
  117. package/dist/local-execution.impl.bun.js +150 -0
  118. package/dist/local-execution.impl.bun.js.map +1 -0
  119. package/dist/logging/file-host.impl.bun.d.ts +4 -0
  120. package/dist/logging/file-host.impl.bun.d.ts.map +1 -0
  121. package/dist/logging/file-host.impl.bun.js +36 -0
  122. package/dist/logging/file-host.impl.bun.js.map +1 -0
  123. package/dist/logging/logging.plugin.d.ts +12 -0
  124. package/dist/logging/logging.plugin.d.ts.map +1 -0
  125. package/dist/logging/logging.plugin.js +20 -0
  126. package/dist/logging/logging.plugin.js.map +1 -0
  127. package/dist/native/held-launch/aarch64-apple-darwin/libvibes_held_launch.dylib +0 -0
  128. package/dist/native/held-launch/aarch64-apple-darwin/manifest.json +237 -0
  129. package/dist/native/held-launch/aarch64-apple-darwin/vibes-held-launch +0 -0
  130. package/dist/native/held-launch/aarch64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
  131. package/dist/native/held-launch/aarch64-unknown-linux-gnu/manifest.json +237 -0
  132. package/dist/native/held-launch/aarch64-unknown-linux-gnu/vibes-held-launch +0 -0
  133. package/dist/native/held-launch/x86_64-apple-darwin/libvibes_held_launch.dylib +0 -0
  134. package/dist/native/held-launch/x86_64-apple-darwin/manifest.json +237 -0
  135. package/dist/native/held-launch/x86_64-apple-darwin/vibes-held-launch +0 -0
  136. package/dist/native/held-launch/x86_64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
  137. package/dist/native/held-launch/x86_64-unknown-linux-gnu/manifest.json +237 -0
  138. package/dist/native/held-launch/x86_64-unknown-linux-gnu/vibes-held-launch +0 -0
  139. package/dist/native-image.consumer.plugin.d.ts +4 -0
  140. package/dist/native-image.consumer.plugin.d.ts.map +1 -0
  141. package/dist/native-image.consumer.plugin.js +14 -0
  142. package/dist/native-image.consumer.plugin.js.map +1 -0
  143. package/dist/native-image.d.ts +79 -0
  144. package/dist/native-image.d.ts.map +1 -0
  145. package/dist/native-image.impl.consumer.d.ts +15 -0
  146. package/dist/native-image.impl.consumer.d.ts.map +1 -0
  147. package/dist/native-image.impl.consumer.js +86 -0
  148. package/dist/native-image.impl.consumer.js.map +1 -0
  149. package/dist/native-image.js +19 -0
  150. package/dist/native-image.js.map +1 -0
  151. package/dist/native-library.consumer.plugin.d.ts +6 -0
  152. package/dist/native-library.consumer.plugin.d.ts.map +1 -0
  153. package/dist/native-library.consumer.plugin.js +33 -0
  154. package/dist/native-library.consumer.plugin.js.map +1 -0
  155. package/dist/native-library.impl.consumer.d.ts +14 -0
  156. package/dist/native-library.impl.consumer.d.ts.map +1 -0
  157. package/dist/native-library.impl.consumer.js +46 -0
  158. package/dist/native-library.impl.consumer.js.map +1 -0
  159. package/dist/native-network/index.d.ts +3 -0
  160. package/dist/native-network/index.d.ts.map +1 -0
  161. package/dist/native-network/index.js +3 -0
  162. package/dist/native-network/index.js.map +1 -0
  163. package/dist/native-network/native-host.d.ts +4 -0
  164. package/dist/native-network/native-host.d.ts.map +1 -0
  165. package/dist/native-network/native-host.js +14 -0
  166. package/dist/native-network/native-host.js.map +1 -0
  167. package/dist/native-network/native-network.descriptor.d.ts +4 -0
  168. package/dist/native-network/native-network.descriptor.d.ts.map +1 -0
  169. package/dist/native-network/native-network.descriptor.js +11 -0
  170. package/dist/native-network/native-network.descriptor.js.map +1 -0
  171. package/dist/native-network/native-network.impl.bun.d.ts +19 -0
  172. package/dist/native-network/native-network.impl.bun.d.ts.map +1 -0
  173. package/dist/native-network/native-network.impl.bun.js +190 -0
  174. package/dist/native-network/native-network.impl.bun.js.map +1 -0
  175. package/dist/native-network/native-network.plugin.d.ts +6 -0
  176. package/dist/native-network/native-network.plugin.d.ts.map +1 -0
  177. package/dist/native-network/native-network.plugin.js +27 -0
  178. package/dist/native-network/native-network.plugin.js.map +1 -0
  179. package/dist/package-plugins/index.d.ts +11 -0
  180. package/dist/package-plugins/index.d.ts.map +1 -0
  181. package/dist/package-plugins/index.js +11 -0
  182. package/dist/package-plugins/index.js.map +1 -0
  183. package/dist/package-plugins/package-plugins.capability.bun.d.ts +11 -0
  184. package/dist/package-plugins/package-plugins.capability.bun.d.ts.map +1 -0
  185. package/dist/package-plugins/package-plugins.capability.bun.js +14 -0
  186. package/dist/package-plugins/package-plugins.capability.bun.js.map +1 -0
  187. package/dist/package-plugins/primitives.impl.bun.d.ts +11 -0
  188. package/dist/package-plugins/primitives.impl.bun.d.ts.map +1 -0
  189. package/dist/package-plugins/primitives.impl.bun.js +32 -0
  190. package/dist/package-plugins/primitives.impl.bun.js.map +1 -0
  191. package/dist/package-plugins/read-admission.impl.bun.d.ts +11 -0
  192. package/dist/package-plugins/read-admission.impl.bun.d.ts.map +1 -0
  193. package/dist/package-plugins/read-admission.impl.bun.js +224 -0
  194. package/dist/package-plugins/read-admission.impl.bun.js.map +1 -0
  195. package/dist/package-plugins/schemas.d.ts +28 -0
  196. package/dist/package-plugins/schemas.d.ts.map +1 -0
  197. package/dist/package-plugins/schemas.js +3 -0
  198. package/dist/package-plugins/schemas.js.map +1 -0
  199. package/dist/process/launch-artifacts.impl.bun.d.ts +11 -0
  200. package/dist/process/launch-artifacts.impl.bun.d.ts.map +1 -0
  201. package/dist/process/launch-artifacts.impl.bun.js +25 -0
  202. package/dist/process/launch-artifacts.impl.bun.js.map +1 -0
  203. package/dist/process/process-probe.impl.bun.d.ts +15 -0
  204. package/dist/process/process-probe.impl.bun.d.ts.map +1 -0
  205. package/dist/process/process-probe.impl.bun.js +35 -0
  206. package/dist/process/process-probe.impl.bun.js.map +1 -0
  207. package/dist/process/runtime-process.impl.bun.d.ts +20 -0
  208. package/dist/process/runtime-process.impl.bun.d.ts.map +1 -0
  209. package/dist/process/runtime-process.impl.bun.js +42 -0
  210. package/dist/process/runtime-process.impl.bun.js.map +1 -0
  211. package/dist/process/schemas.d.ts +9 -0
  212. package/dist/process/schemas.d.ts.map +1 -0
  213. package/dist/process/schemas.js +3 -0
  214. package/dist/process/schemas.js.map +1 -0
  215. package/dist/process/spawn.impl.bun.d.ts +31 -0
  216. package/dist/process/spawn.impl.bun.d.ts.map +1 -0
  217. package/dist/process/spawn.impl.bun.js +66 -0
  218. package/dist/process/spawn.impl.bun.js.map +1 -0
  219. package/dist/process/which.impl.bun.d.ts +16 -0
  220. package/dist/process/which.impl.bun.d.ts.map +1 -0
  221. package/dist/process/which.impl.bun.js +25 -0
  222. package/dist/process/which.impl.bun.js.map +1 -0
  223. package/dist/pty.adapter.impl.bun.d.ts +17 -0
  224. package/dist/pty.adapter.impl.bun.d.ts.map +1 -0
  225. package/dist/pty.adapter.impl.bun.js +102 -0
  226. package/dist/pty.adapter.impl.bun.js.map +1 -0
  227. package/dist/pty.darwin.impl.bun.d.ts +11 -0
  228. package/dist/pty.darwin.impl.bun.d.ts.map +1 -0
  229. package/dist/pty.darwin.impl.bun.js +200 -0
  230. package/dist/pty.darwin.impl.bun.js.map +1 -0
  231. package/dist/pty.node-host.impl.bun.d.ts +10 -0
  232. package/dist/pty.node-host.impl.bun.d.ts.map +1 -0
  233. package/dist/pty.node-host.impl.bun.js +42 -0
  234. package/dist/pty.node-host.impl.bun.js.map +1 -0
  235. package/dist/resolution-root.impl.bun.d.ts +170 -0
  236. package/dist/resolution-root.impl.bun.d.ts.map +1 -0
  237. package/dist/resolution-root.impl.bun.js +373 -0
  238. package/dist/resolution-root.impl.bun.js.map +1 -0
  239. package/dist/restricted-execute.darwin.impl.bun.d.ts +19 -0
  240. package/dist/restricted-execute.darwin.impl.bun.d.ts.map +1 -0
  241. package/dist/restricted-execute.darwin.impl.bun.js +459 -0
  242. package/dist/restricted-execute.darwin.impl.bun.js.map +1 -0
  243. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts +2 -0
  244. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts.map +1 -0
  245. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js +31 -0
  246. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js.map +1 -0
  247. package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts +20 -0
  248. package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts.map +1 -0
  249. package/dist/runtime-plugin-host/host-hot-reload.consumer.js +236 -0
  250. package/dist/runtime-plugin-host/host-hot-reload.consumer.js.map +1 -0
  251. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts +2 -0
  252. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts.map +1 -0
  253. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js +66 -0
  254. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js.map +1 -0
  255. package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts +45 -0
  256. package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts.map +1 -0
  257. package/dist/runtime-plugin-host/hot-plugin-module.consumer.js +490 -0
  258. package/dist/runtime-plugin-host/hot-plugin-module.consumer.js.map +1 -0
  259. package/dist/runtime-plugin-host/hot-reload.consumer.d.ts +83 -0
  260. package/dist/runtime-plugin-host/hot-reload.consumer.d.ts.map +1 -0
  261. package/dist/runtime-plugin-host/hot-reload.consumer.js +168 -0
  262. package/dist/runtime-plugin-host/hot-reload.consumer.js.map +1 -0
  263. package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts +37 -0
  264. package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts.map +1 -0
  265. package/dist/runtime-plugin-host/reclaim.impl.bun.js +159 -0
  266. package/dist/runtime-plugin-host/reclaim.impl.bun.js.map +1 -0
  267. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts +4 -0
  268. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts.map +1 -0
  269. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js +181 -0
  270. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js.map +1 -0
  271. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts +17 -0
  272. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts.map +1 -0
  273. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js +36 -0
  274. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js.map +1 -0
  275. package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts +53 -0
  276. package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts.map +1 -0
  277. package/dist/runtime-plugin-host/runtime-thread.impl.bun.js +249 -0
  278. package/dist/runtime-plugin-host/runtime-thread.impl.bun.js.map +1 -0
  279. package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts +2 -0
  280. package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts.map +1 -0
  281. package/dist/runtime-plugin-host/runtime-thread.shim.bun.js +56 -0
  282. package/dist/runtime-plugin-host/runtime-thread.shim.bun.js.map +1 -0
  283. package/dist/runtime-plugin-host/schemas.d.ts +437 -0
  284. package/dist/runtime-plugin-host/schemas.d.ts.map +1 -0
  285. package/dist/runtime-plugin-host/schemas.js +54 -0
  286. package/dist/runtime-plugin-host/schemas.js.map +1 -0
  287. package/dist/runtime-plugin-host/source-watcher.consumer.d.ts +109 -0
  288. package/dist/runtime-plugin-host/source-watcher.consumer.d.ts.map +1 -0
  289. package/dist/runtime-plugin-host/source-watcher.consumer.js +383 -0
  290. package/dist/runtime-plugin-host/source-watcher.consumer.js.map +1 -0
  291. package/dist/schemas/environment.d.ts +197 -0
  292. package/dist/schemas/environment.d.ts.map +1 -0
  293. package/dist/schemas/environment.js +7 -0
  294. package/dist/schemas/environment.js.map +1 -0
  295. package/dist/schemas/host-resources.d.ts +85 -0
  296. package/dist/schemas/host-resources.d.ts.map +1 -0
  297. package/dist/schemas/host-resources.js +22 -0
  298. package/dist/schemas/host-resources.js.map +1 -0
  299. package/dist/schemas/native-image.d.ts +128 -0
  300. package/dist/schemas/native-image.d.ts.map +1 -0
  301. package/dist/schemas/native-image.js +45 -0
  302. package/dist/schemas/native-image.js.map +1 -0
  303. package/dist/schemas/native-network.d.ts +56 -0
  304. package/dist/schemas/native-network.d.ts.map +1 -0
  305. package/dist/schemas/native-network.js +55 -0
  306. package/dist/schemas/native-network.js.map +1 -0
  307. package/dist/schemas/restricted-execute.d.ts +40 -0
  308. package/dist/schemas/restricted-execute.d.ts.map +1 -0
  309. package/dist/schemas/restricted-execute.js +14 -0
  310. package/dist/schemas/restricted-execute.js.map +1 -0
  311. package/dist/schemas/runtime-socket.d.ts +8 -0
  312. package/dist/schemas/runtime-socket.d.ts.map +1 -0
  313. package/dist/schemas/runtime-socket.js +7 -0
  314. package/dist/schemas/runtime-socket.js.map +1 -0
  315. package/dist/schemas/self-spawn.d.ts +11 -0
  316. package/dist/schemas/self-spawn.d.ts.map +1 -0
  317. package/dist/schemas/self-spawn.js +3 -0
  318. package/dist/schemas/self-spawn.js.map +1 -0
  319. package/dist/schemas/standard-output.d.ts +6 -0
  320. package/dist/schemas/standard-output.d.ts.map +1 -0
  321. package/dist/schemas/standard-output.js +2 -0
  322. package/dist/schemas/standard-output.js.map +1 -0
  323. package/dist/schemas/telemetry.d.ts +25 -0
  324. package/dist/schemas/telemetry.d.ts.map +1 -0
  325. package/dist/schemas/telemetry.js +10 -0
  326. package/dist/schemas/telemetry.js.map +1 -0
  327. package/dist/schemas/test-environment.d.ts +27 -0
  328. package/dist/schemas/test-environment.d.ts.map +1 -0
  329. package/dist/schemas/test-environment.js +2 -0
  330. package/dist/schemas/test-environment.js.map +1 -0
  331. package/dist/serve-stall-start.d.ts +8 -0
  332. package/dist/serve-stall-start.d.ts.map +1 -0
  333. package/dist/serve-stall-start.js +88 -0
  334. package/dist/serve-stall-start.js.map +1 -0
  335. package/dist/serve-stall.d.ts +11 -0
  336. package/dist/serve-stall.d.ts.map +1 -0
  337. package/dist/serve-stall.js +19 -0
  338. package/dist/serve-stall.js.map +1 -0
  339. package/dist/serve-stall.plugin.d.ts +10 -0
  340. package/dist/serve-stall.plugin.d.ts.map +1 -0
  341. package/dist/serve-stall.plugin.js +34 -0
  342. package/dist/serve-stall.plugin.js.map +1 -0
  343. package/dist/services/account-home.d.ts +39 -0
  344. package/dist/services/account-home.d.ts.map +1 -0
  345. package/dist/services/account-home.js +152 -0
  346. package/dist/services/account-home.js.map +1 -0
  347. package/dist/services/cli-process-host.d.ts +50 -0
  348. package/dist/services/cli-process-host.d.ts.map +1 -0
  349. package/dist/services/cli-process-host.js +88 -0
  350. package/dist/services/cli-process-host.js.map +1 -0
  351. package/dist/services/compatibility-host.impl.bun.d.ts +4 -0
  352. package/dist/services/compatibility-host.impl.bun.d.ts.map +1 -0
  353. package/dist/services/compatibility-host.impl.bun.js +24 -0
  354. package/dist/services/compatibility-host.impl.bun.js.map +1 -0
  355. package/dist/services/executable-identity.impl.bun.d.ts +164 -0
  356. package/dist/services/executable-identity.impl.bun.d.ts.map +1 -0
  357. package/dist/services/executable-identity.impl.bun.js +73 -0
  358. package/dist/services/executable-identity.impl.bun.js.map +1 -0
  359. package/dist/services/fatal-signals.impl.bun.d.ts +15 -0
  360. package/dist/services/fatal-signals.impl.bun.d.ts.map +1 -0
  361. package/dist/services/fatal-signals.impl.bun.js +61 -0
  362. package/dist/services/fatal-signals.impl.bun.js.map +1 -0
  363. package/dist/services/graph-freshness.impl.bun.d.ts +108 -0
  364. package/dist/services/graph-freshness.impl.bun.d.ts.map +1 -0
  365. package/dist/services/graph-freshness.impl.bun.js +49 -0
  366. package/dist/services/graph-freshness.impl.bun.js.map +1 -0
  367. package/dist/services/host-identity.capability.bun.d.ts +10 -0
  368. package/dist/services/host-identity.capability.bun.d.ts.map +1 -0
  369. package/dist/services/host-identity.capability.bun.js +27 -0
  370. package/dist/services/host-identity.capability.bun.js.map +1 -0
  371. package/dist/services/host-identity.impl.bun.d.ts +53 -0
  372. package/dist/services/host-identity.impl.bun.d.ts.map +1 -0
  373. package/dist/services/host-identity.impl.bun.js +76 -0
  374. package/dist/services/host-identity.impl.bun.js.map +1 -0
  375. package/dist/services/host-resources.impl.bun.d.ts +49 -0
  376. package/dist/services/host-resources.impl.bun.d.ts.map +1 -0
  377. package/dist/services/host-resources.impl.bun.js +144 -0
  378. package/dist/services/host-resources.impl.bun.js.map +1 -0
  379. package/dist/services/http-fetch.impl.bun.d.ts +10 -0
  380. package/dist/services/http-fetch.impl.bun.d.ts.map +1 -0
  381. package/dist/services/http-fetch.impl.bun.js +38 -0
  382. package/dist/services/http-fetch.impl.bun.js.map +1 -0
  383. package/dist/services/output-plane.impl.bun.d.ts +6 -0
  384. package/dist/services/output-plane.impl.bun.d.ts.map +1 -0
  385. package/dist/services/output-plane.impl.bun.js +26 -0
  386. package/dist/services/output-plane.impl.bun.js.map +1 -0
  387. package/dist/services/process-action-lifetime.consumer.d.ts +47 -0
  388. package/dist/services/process-action-lifetime.consumer.d.ts.map +1 -0
  389. package/dist/services/process-action-lifetime.consumer.js +68 -0
  390. package/dist/services/process-action-lifetime.consumer.js.map +1 -0
  391. package/dist/services/process-view.impl.bun.d.ts +18 -0
  392. package/dist/services/process-view.impl.bun.d.ts.map +1 -0
  393. package/dist/services/process-view.impl.bun.js +17 -0
  394. package/dist/services/process-view.impl.bun.js.map +1 -0
  395. package/dist/services/runtime-host-signals.impl.bun.d.ts +8 -0
  396. package/dist/services/runtime-host-signals.impl.bun.d.ts.map +1 -0
  397. package/dist/services/runtime-host-signals.impl.bun.js +29 -0
  398. package/dist/services/runtime-host-signals.impl.bun.js.map +1 -0
  399. package/dist/services/runtime-http-listener.impl.bun.d.ts +14 -0
  400. package/dist/services/runtime-http-listener.impl.bun.d.ts.map +1 -0
  401. package/dist/services/runtime-http-listener.impl.bun.js +463 -0
  402. package/dist/services/runtime-http-listener.impl.bun.js.map +1 -0
  403. package/dist/services/runtime-path.impl.bun.d.ts +16 -0
  404. package/dist/services/runtime-path.impl.bun.d.ts.map +1 -0
  405. package/dist/services/runtime-path.impl.bun.js +34 -0
  406. package/dist/services/runtime-path.impl.bun.js.map +1 -0
  407. package/dist/services/runtime-scoped-values.impl.bun.d.ts +4 -0
  408. package/dist/services/runtime-scoped-values.impl.bun.d.ts.map +1 -0
  409. package/dist/services/runtime-scoped-values.impl.bun.js +7 -0
  410. package/dist/services/runtime-scoped-values.impl.bun.js.map +1 -0
  411. package/dist/services/runtime-socket-datagram.impl.bun.d.ts +15 -0
  412. package/dist/services/runtime-socket-datagram.impl.bun.d.ts.map +1 -0
  413. package/dist/services/runtime-socket-datagram.impl.bun.js +19 -0
  414. package/dist/services/runtime-socket-datagram.impl.bun.js.map +1 -0
  415. package/dist/services/runtime-socket.impl.bun.d.ts +20 -0
  416. package/dist/services/runtime-socket.impl.bun.d.ts.map +1 -0
  417. package/dist/services/runtime-socket.impl.bun.js +47 -0
  418. package/dist/services/runtime-socket.impl.bun.js.map +1 -0
  419. package/dist/services/runtime-stdio.impl.bun.d.ts +11 -0
  420. package/dist/services/runtime-stdio.impl.bun.d.ts.map +1 -0
  421. package/dist/services/runtime-stdio.impl.bun.js +37 -0
  422. package/dist/services/runtime-stdio.impl.bun.js.map +1 -0
  423. package/dist/services/self-spawn.impl.bun.d.ts +39 -0
  424. package/dist/services/self-spawn.impl.bun.d.ts.map +1 -0
  425. package/dist/services/self-spawn.impl.bun.js +58 -0
  426. package/dist/services/self-spawn.impl.bun.js.map +1 -0
  427. package/dist/services/standard-output.d.ts +100 -0
  428. package/dist/services/standard-output.d.ts.map +1 -0
  429. package/dist/services/standard-output.js +35 -0
  430. package/dist/services/standard-output.js.map +1 -0
  431. package/dist/services/user-environment.impl.bun.d.ts +19 -0
  432. package/dist/services/user-environment.impl.bun.d.ts.map +1 -0
  433. package/dist/services/user-environment.impl.bun.js +117 -0
  434. package/dist/services/user-environment.impl.bun.js.map +1 -0
  435. package/dist/services/workspace-env.d.ts +30 -0
  436. package/dist/services/workspace-env.d.ts.map +1 -0
  437. package/dist/services/workspace-env.js +45 -0
  438. package/dist/services/workspace-env.js.map +1 -0
  439. package/dist/services/workspace-root-probe.impl.bun.d.ts +14 -0
  440. package/dist/services/workspace-root-probe.impl.bun.d.ts.map +1 -0
  441. package/dist/services/workspace-root-probe.impl.bun.js +27 -0
  442. package/dist/services/workspace-root-probe.impl.bun.js.map +1 -0
  443. package/dist/session-members.impl.bun.d.ts +22 -0
  444. package/dist/session-members.impl.bun.d.ts.map +1 -0
  445. package/dist/session-members.impl.bun.js +74 -0
  446. package/dist/session-members.impl.bun.js.map +1 -0
  447. package/dist/sqlite-driver/index.d.ts +7 -0
  448. package/dist/sqlite-driver/index.d.ts.map +1 -0
  449. package/dist/sqlite-driver/index.js +7 -0
  450. package/dist/sqlite-driver/index.js.map +1 -0
  451. package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts +6 -0
  452. package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts.map +1 -0
  453. package/dist/sqlite-driver/sqlite-driver.impl.bun.js +269 -0
  454. package/dist/sqlite-driver/sqlite-driver.impl.bun.js.map +1 -0
  455. package/dist/sqlite-driver/sqlite-driver.plugin.d.ts +22 -0
  456. package/dist/sqlite-driver/sqlite-driver.plugin.d.ts.map +1 -0
  457. package/dist/sqlite-driver/sqlite-driver.plugin.js +44 -0
  458. package/dist/sqlite-driver/sqlite-driver.plugin.js.map +1 -0
  459. package/dist/telemetry/telemetry.d.ts +34 -0
  460. package/dist/telemetry/telemetry.d.ts.map +1 -0
  461. package/dist/telemetry/telemetry.js +2 -0
  462. package/dist/telemetry/telemetry.js.map +1 -0
  463. package/dist/telemetry/telemetry.plugin.d.ts +4 -0
  464. package/dist/telemetry/telemetry.plugin.d.ts.map +1 -0
  465. package/dist/telemetry/telemetry.plugin.js +78 -0
  466. package/dist/telemetry/telemetry.plugin.js.map +1 -0
  467. package/dist/terminal-pty-bridge.impl.bun.d.ts +31 -0
  468. package/dist/terminal-pty-bridge.impl.bun.d.ts.map +1 -0
  469. package/dist/terminal-pty-bridge.impl.bun.js +333 -0
  470. package/dist/terminal-pty-bridge.impl.bun.js.map +1 -0
  471. package/dist/test-tooling/lazy-environment.impl.bun.d.ts +16 -0
  472. package/dist/test-tooling/lazy-environment.impl.bun.d.ts.map +1 -0
  473. package/dist/test-tooling/lazy-environment.impl.bun.js +36 -0
  474. package/dist/test-tooling/lazy-environment.impl.bun.js.map +1 -0
  475. package/dist/test-tooling/starttls-refusal.d.ts +7 -0
  476. package/dist/test-tooling/starttls-refusal.d.ts.map +1 -0
  477. package/dist/test-tooling/starttls-refusal.js +50 -0
  478. package/dist/test-tooling/starttls-refusal.js.map +1 -0
  479. package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts +2 -0
  480. package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts.map +1 -0
  481. package/dist/test-tooling/svelte-client-preload.impl.bun.js +4 -0
  482. package/dist/test-tooling/svelte-client-preload.impl.bun.js.map +1 -0
  483. package/dist/test-tooling/svelte-compiler.impl.bun.d.ts +10 -0
  484. package/dist/test-tooling/svelte-compiler.impl.bun.d.ts.map +1 -0
  485. package/dist/test-tooling/svelte-compiler.impl.bun.js +33 -0
  486. package/dist/test-tooling/svelte-compiler.impl.bun.js.map +1 -0
  487. package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts +2 -0
  488. package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts.map +1 -0
  489. package/dist/test-tooling/svelte-server-preload.impl.bun.js +4 -0
  490. package/dist/test-tooling/svelte-server-preload.impl.bun.js.map +1 -0
  491. package/dist/test-tooling/test-environment.impl.bun.d.ts +45 -0
  492. package/dist/test-tooling/test-environment.impl.bun.d.ts.map +1 -0
  493. package/dist/test-tooling/test-environment.impl.bun.js +163 -0
  494. package/dist/test-tooling/test-environment.impl.bun.js.map +1 -0
  495. package/dist/test-tooling/test-process-root.impl.bun.d.ts +4 -0
  496. package/dist/test-tooling/test-process-root.impl.bun.d.ts.map +1 -0
  497. package/dist/test-tooling/test-process-root.impl.bun.js +65 -0
  498. package/dist/test-tooling/test-process-root.impl.bun.js.map +1 -0
  499. package/dist/test-tooling/unix-http.impl.bun.d.ts +28 -0
  500. package/dist/test-tooling/unix-http.impl.bun.d.ts.map +1 -0
  501. package/dist/test-tooling/unix-http.impl.bun.js +181 -0
  502. package/dist/test-tooling/unix-http.impl.bun.js.map +1 -0
  503. package/dist/transpiler/transpiler.plugin.d.ts +10 -0
  504. package/dist/transpiler/transpiler.plugin.d.ts.map +1 -0
  505. package/dist/transpiler/transpiler.plugin.js +18 -0
  506. package/dist/transpiler/transpiler.plugin.js.map +1 -0
  507. package/native/held-launch/Cargo.toml +23 -0
  508. package/native/held-launch/abi-manifest.json +234 -0
  509. package/native/held-launch/src/bin/vibes-held-launch.rs +35 -0
  510. package/native/held-launch/src/events.rs +99 -0
  511. package/native/held-launch/src/lib.rs +528 -0
  512. package/native/held-launch/symbols.golden +21 -0
  513. package/package.json +313 -4
  514. package/resources/restricted-supervisor.impl.bun.d.mts +3 -0
  515. package/resources/restricted-supervisor.impl.bun.mjs +49 -0
  516. package/resources/serve-stall-watch.impl.bun.d.mts +3 -0
  517. package/resources/serve-stall-watch.impl.bun.mjs +51 -0
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The Bun host's executable classification: the kernel's ONE OWNER PREDICATE
3
+ * (`createExecutableClassifier`, three shapes: `monolith`, `thin-host`,
4
+ * `source`) over this process's own facts.
5
+ *
6
+ * Bun supplies what only it knows: its executable, where this module was
7
+ * loaded from (`import.meta.url` is under `/$bunfs` only inside a compiled
8
+ * bundle, so it is the honest proxy for where the framework modules live), and
9
+ * which executable names are Bun itself (`bun`, `bun.exe`, `bun-debug`,
10
+ * `bun-profile`); anything else at `process.execPath` is a standalone build.
11
+ */
12
+ import { createExecutableClassifier, type HostIdentityRuntime } from '@vibesdotdev/execution-local';
13
+ export { isBundledModuleUrl } from '@vibesdotdev/kernel/services/host-identity';
14
+ export type { ExecutableClassificationFacts as ExecutableHostFacts, ExecutableKind, HostEnvSnapshot, HostExecutableIdentity, HostIdentityRuntime } from '@vibesdotdev/execution-local';
15
+ /**
16
+ * Native facts are supplied only here. The composition root owns the returned
17
+ * classifier; no identity memo is retained by this module.
18
+ */
19
+ export declare function createBunExecutableClassifier(host?: Parameters<typeof createExecutableClassifier>[0]): {
20
+ classifyExecutable: (facts: import("@vibesdotdev/execution-local").ExecutableClassificationFacts) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
21
+ executableIdentityFrom: (env: import("@vibesdotdev/execution-local").HostEnvSnapshot) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
22
+ executableIdentity: (runtime: HostIdentityRuntime) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
23
+ hostModulesOnDisk: (runtime: HostIdentityRuntime) => boolean;
24
+ isStandaloneExecutable: (runtime: HostIdentityRuntime) => boolean;
25
+ hostEntryPath: (runtime: HostIdentityRuntime) => string | null;
26
+ resetForTest: () => void;
27
+ };
28
+ export declare const classifyExecutable: ReturnType<typeof createExecutableClassifier>['classifyExecutable'];
29
+ export declare const executableIdentityFrom: ReturnType<typeof createExecutableClassifier>['executableIdentityFrom'];
30
+ /** Pre-boot callers must lend a retained classifier or an environment's captured identity. */
31
+ export declare function executableIdentity(runtime: HostIdentityRuntime, classifier?: ReturnType<typeof createBunExecutableClassifier>): {
32
+ kind: "source" | "thin-host" | "monolith";
33
+ execPath: string;
34
+ hostEntry: string | null;
35
+ hostRoot: string | null;
36
+ reason: string;
37
+ };
38
+ export declare const hostModulesOnDisk: (runtime: HostIdentityRuntime, classifier?: ReturnType<typeof createBunExecutableClassifier>) => boolean;
39
+ export declare const isStandaloneExecutable: (runtime: HostIdentityRuntime, classifier?: ReturnType<typeof createBunExecutableClassifier>) => boolean;
40
+ export declare function hostEntryPath(runtime: HostIdentityRuntime, classifier?: ReturnType<typeof createBunExecutableClassifier>): string | null;
41
+ /** Stateless compatibility facade; retained services belong to the host client. */
42
+ export declare const bunExecutableClassifier: Readonly<{
43
+ classifyExecutable: (facts: import("@vibesdotdev/execution-local").ExecutableClassificationFacts) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
44
+ executableIdentityFrom: (env: import("@vibesdotdev/execution-local").HostEnvSnapshot) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
45
+ executableIdentity: typeof executableIdentity;
46
+ hostModulesOnDisk: (runtime: HostIdentityRuntime, classifier?: ReturnType<typeof createBunExecutableClassifier>) => boolean;
47
+ isStandaloneExecutable: (runtime: HostIdentityRuntime, classifier?: ReturnType<typeof createBunExecutableClassifier>) => boolean;
48
+ hostEntryPath: typeof hostEntryPath;
49
+ resetForTest: () => void;
50
+ }>;
51
+ /** @deprecated Tests own a fresh host resource set instead. */
52
+ export declare const __resetExecutableIdentityCacheForTest: () => void;
53
+ //# sourceMappingURL=host-identity.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-identity.impl.bun.d.ts","sourceRoot":"","sources":["../../src/services/host-identity.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,0BAA0B,EAAE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 +1,76 @@
1
+ /**
2
+ * The Bun host's executable classification: the kernel's ONE OWNER PREDICATE
3
+ * (`createExecutableClassifier`, three shapes: `monolith`, `thin-host`,
4
+ * `source`) over this process's own facts.
5
+ *
6
+ * Bun supplies what only it knows: its executable, where this module was
7
+ * loaded from (`import.meta.url` is under `/$bunfs` only inside a compiled
8
+ * bundle, so it is the honest proxy for where the framework modules live), and
9
+ * which executable names are Bun itself (`bun`, `bun.exe`, `bun-debug`,
10
+ * `bun-profile`); anything else at `process.execPath` is a standalone build.
11
+ */
12
+ import { realpathSync } from 'node:fs';
13
+ import { basename } from 'node:path';
14
+ import { createExecutableClassifier } from '@vibesdotdev/execution-local';
15
+ import { tryGetVibesClient } from '@vibesdotdev/kernel/client';
16
+ import { CapabilityError, VibesRuntime } from '@vibesdotdev/kernel';
17
+ import { ABSENT_PATH_CODES, environmentUnregistered, readOrAbsent } from '@vibesdotdev/execution-local/host-base';
18
+ export { isBundledModuleUrl } from '@vibesdotdev/kernel/services/host-identity';
19
+ /** `bun`, `bun.exe`, `bun-debug`, `bun-profile` are the runtime itself. */
20
+ function isBunRuntime(execPath) {
21
+ const name = basename(execPath);
22
+ return name === 'bun' || name === 'bun.exe' || name.startsWith('bun-');
23
+ }
24
+ /**
25
+ * Native facts are supplied only here. The composition root owns the returned
26
+ * classifier; no identity memo is retained by this module.
27
+ */
28
+ export function createBunExecutableClassifier(host = {
29
+ execPath: () => process.execPath,
30
+ moduleUrl: import.meta.url,
31
+ runtimeName: 'bun',
32
+ isRuntimeExecutable: isBunRuntime,
33
+ realpath: path => realpathSync(path)
34
+ }) {
35
+ return createExecutableClassifier(host);
36
+ }
37
+ function classifierOf(runtime) {
38
+ return runtime instanceof VibesRuntime
39
+ ? tryGetVibesClient('bun-host', runtime)?.resources.classifier
40
+ : undefined;
41
+ }
42
+ export const classifyExecutable = facts => createBunExecutableClassifier().classifyExecutable(facts);
43
+ export const executableIdentityFrom = env => createBunExecutableClassifier().executableIdentityFrom(env);
44
+ /** Pre-boot callers must lend a retained classifier or an environment's captured identity. */
45
+ export function executableIdentity(runtime, classifier) {
46
+ const environment = runtime.localEnvironment;
47
+ if (!environment)
48
+ throw environmentUnregistered();
49
+ const owner = classifier ?? classifierOf(runtime);
50
+ if (owner)
51
+ return owner.executableIdentity(runtime);
52
+ const declared = environment.hostIdentity?.call(environment);
53
+ if (declared)
54
+ return declared;
55
+ throw new CapabilityError('Bun identity requires an activated host or an explicitly owned classifier.', 'UNAVAILABLE', {
56
+ reason: 'bun-host-client-unavailable', retryable: false
57
+ });
58
+ }
59
+ export const hostModulesOnDisk = (runtime, classifier) => executableIdentity(runtime, classifier).kind !== 'monolith';
60
+ export const isStandaloneExecutable = (runtime, classifier) => executableIdentity(runtime, classifier).kind !== 'source';
61
+ export function hostEntryPath(runtime, classifier) {
62
+ const owner = classifier ?? classifierOf(runtime);
63
+ if (owner)
64
+ return owner.hostEntryPath(runtime);
65
+ const entry = executableIdentity(runtime).hostEntry;
66
+ return entry ? readOrAbsent(() => realpathSync(entry), ABSENT_PATH_CODES, entry) : null;
67
+ }
68
+ /** Stateless compatibility facade; retained services belong to the host client. */
69
+ export const bunExecutableClassifier = Object.freeze({
70
+ classifyExecutable, executableIdentityFrom, executableIdentity,
71
+ hostModulesOnDisk, isStandaloneExecutable, hostEntryPath,
72
+ resetForTest: () => { }
73
+ });
74
+ /** @deprecated Tests own a fresh host resource set instead. */
75
+ export const __resetExecutableIdentityCacheForTest = bunExecutableClassifier.resetForTest;
76
+ //# sourceMappingURL=host-identity.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-identity.impl.bun.js","sourceRoot":"","sources":["../../src/services/host-identity.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAA4B,MAAM,8BAA8B,CA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EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACzF,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACpD,kBAAkB,EAAE,sBAAsB,EAAE,kBAAkB;IAC9D,iBAAiB,EAAE,sBAAsB,EAAE,aAAa;IACxD,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACtB,CAAC,CAAC;AACH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,qCAAqC,GAAG,uBAAuB,CAAC,YAAY,CAAC"}
@@ -0,0 +1,49 @@
1
+ /** Physical process resources shared explicitly by every runtime in a Bun host. */
2
+ import { type RuntimeStdioStreams } from '@vibesdotdev/kernel';
3
+ import { type RuntimeOutputPlaneFormatter } from '@vibesdotdev/execution-local';
4
+ import { createBunExecutableClassifier } from './host-identity.impl.bun.ts';
5
+ /** Construct once at the composition root; pass it to every environment in that process. */
6
+ export declare function createBunHostResources(classification?: Parameters<typeof createBunExecutableClassifier>[0]): Readonly<{
7
+ classifier: {
8
+ classifyExecutable: (facts: import("@vibesdotdev/execution-local").ExecutableClassificationFacts) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
9
+ executableIdentityFrom: (env: import("@vibesdotdev/execution-local").HostEnvSnapshot) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
10
+ executableIdentity: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
11
+ hostModulesOnDisk: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
12
+ isStandaloneExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
13
+ hostEntryPath: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => string | null;
14
+ resetForTest: () => void;
15
+ };
16
+ executable: {
17
+ isCompiledExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
18
+ processStartedAtMs: () => number;
19
+ statExecutable: (path: string) => import("@vibesdotdev/execution-local").ExecutableFileStat | null;
20
+ executableHostFactsOf: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").ExecutableHostFacts;
21
+ describeExecutable: (path: string, host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
22
+ captureExecutableIdentity: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
23
+ getCapturedExecutableIdentity: () => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
24
+ judgeExecutableReplaced: (loaded: import("@vibesdotdev/execution-local").ExecutableFileStat, current: import("@vibesdotdev/execution-local").ExecutableFileStat, processStartMs: number) => boolean;
25
+ checkExecutableFreshness: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableFreshness;
26
+ executableReplacedSince: (path: string, processStartMs: number) => import("@vibesdotdev/execution-local").ExecutableReplacedSince;
27
+ resetForTest: () => void;
28
+ };
29
+ outputPlane: {
30
+ install: (options: import("@vibesdotdev/kernel").RuntimeStdioTrackOptions) => void;
31
+ isInstalled: () => boolean;
32
+ uninstall: () => void;
33
+ setFormatter: (next: RuntimeOutputPlaneFormatter) => void;
34
+ formatConsoleArgs: (args: readonly unknown[]) => string;
35
+ flush: () => Promise<void>;
36
+ };
37
+ writeOutput(channel: "stdout" | "stderr", text: string): void;
38
+ readonly fatal: {
39
+ subscribe: (listener: import("@vibesdotdev/kernel").RuntimeFatalListener) => () => void;
40
+ subscriberCount: () => number;
41
+ };
42
+ setFormatter(next: RuntimeOutputPlaneFormatter): void;
43
+ /** A per-runtime lease; the last release drains and restores physical resources. */
44
+ retain(): () => Promise<void>;
45
+ streams(): RuntimeStdioStreams;
46
+ /** Explicit host entry cleanup, including boot failures before a runtime retained it. */
47
+ dispose(): Promise<void>;
48
+ }>;
49
+ //# sourceMappingURL=host-resources.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-resources.impl.bun.d.ts","sourceRoot":"","sources":["../../src/services/host-resources.impl.bun.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAsD,KAAK,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACpI,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAM5E,4FAA4F;AAC5F,wBAAgB,sBAAsB,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA6CpF,QAAQ,GAAG,QAAQ,QAAQ,MAAM,GAAG,IAAI;;;;;uBAO1C,2BAA2B,GAAG,IAAI;IAIrD,oFAAoF;cAC1E,MAAM,OAAO,CAAC,IAAI,CAAC;eAgBlB,mBAAmB;IA6B9B,yFAAyF;eACxE,OAAO,CAAC,IAAI,CAAC;GAQ/B"}
@@ -0,0 +1,144 @@
1
+ /** Physical process resources shared explicitly by every runtime in a Bun host. */
2
+ import { CapabilityError } from '@vibesdotdev/kernel';
3
+ import { createRuntimeStdioStreams } from '@vibesdotdev/execution-local';
4
+ import { createBunExecutableClassifier } from "./host-identity.impl.bun.js";
5
+ import { createBunExecutableFreshness } from "./executable-identity.impl.bun.js";
6
+ import { PassThrough, Readable } from 'node:stream';
7
+ import { createBunOutputPlane } from "./output-plane.impl.bun.js";
8
+ import { createBunFatalSignals } from "./fatal-signals.impl.bun.js";
9
+ /** Construct once at the composition root; pass it to every environment in that process. */
10
+ export function createBunHostResources(classification) {
11
+ // Share this owner across environments in one physical host. The base pins
12
+ // file evidence once, while its classifier retains each environment's own
13
+ // admitted identity and its executable captures retain each source ref.
14
+ const classifier = createBunExecutableClassifier(classification);
15
+ const executable = createBunExecutableFreshness(classifier);
16
+ const nativePlane = createBunOutputPlane();
17
+ let outputOptions = { stripSgr: false };
18
+ const outputPlane = Object.freeze({
19
+ ...nativePlane,
20
+ install(options) {
21
+ outputOptions = { ...options };
22
+ nativePlane.install(outputOptions);
23
+ }
24
+ });
25
+ let fatalSignals = createBunFatalSignals();
26
+ let formatter;
27
+ let streams;
28
+ let releaseInput;
29
+ let borrowers = 0;
30
+ let closing;
31
+ const close = () => {
32
+ if (closing)
33
+ return closing;
34
+ closing = Promise.resolve().then(async () => {
35
+ const outcomes = await Promise.allSettled([
36
+ Promise.resolve().then(() => fatalSignals.dispose()),
37
+ Promise.resolve().then(() => releaseInput?.()),
38
+ // An unused owner has no tracked output; flushing an ambient stream
39
+ // here would write into another runtime's active capture.
40
+ outputPlane.isInstalled() ? outputPlane.flush() : Promise.resolve()
41
+ ]);
42
+ // Uninstall even when a native drain or reader refuses. Keep every failure.
43
+ const restored = await Promise.allSettled([Promise.resolve().then(() => outputPlane.uninstall())]);
44
+ streams = undefined;
45
+ releaseInput = undefined;
46
+ fatalSignals = createBunFatalSignals();
47
+ if (formatter)
48
+ outputPlane.setFormatter(formatter);
49
+ const failures = [...outcomes, ...restored].flatMap(result => result.status === 'rejected' ? [result.reason] : []);
50
+ if (failures.length)
51
+ throw new AggregateError(failures, 'Bun host resources could not be finalized.');
52
+ });
53
+ return closing;
54
+ };
55
+ return Object.freeze({
56
+ classifier, executable,
57
+ outputPlane,
58
+ writeOutput(channel, text) {
59
+ // With no runtime, the executable entry owns tracking until it flushes
60
+ // and closes, including diagnostics written after failed-boot cleanup.
61
+ if (borrowers === 0 && !outputPlane.isInstalled())
62
+ outputPlane.install(outputOptions);
63
+ (channel === 'stdout' ? process.stdout : process.stderr).write(text);
64
+ },
65
+ get fatal() { return fatalSignals.fanOut; },
66
+ setFormatter(next) {
67
+ formatter = next;
68
+ outputPlane.setFormatter(next);
69
+ },
70
+ /** A per-runtime lease; the last release drains and restores physical resources. */
71
+ retain() {
72
+ if (closing && borrowers === 0) {
73
+ throw new CapabilityError('This Bun host is closing.', 'UNAVAILABLE', { reason: 'bun-host-closing', retryable: false });
74
+ }
75
+ borrowers++;
76
+ let released = false;
77
+ return async () => {
78
+ if (released)
79
+ return;
80
+ released = true;
81
+ borrowers--;
82
+ if (borrowers === 0) {
83
+ try {
84
+ await close();
85
+ }
86
+ finally {
87
+ closing = undefined;
88
+ }
89
+ }
90
+ };
91
+ },
92
+ streams() {
93
+ if (streams)
94
+ return streams;
95
+ // The intermediary lets finalization detach the physical reader without
96
+ // destroying the process's stdin, which a later host can still borrow.
97
+ const native = process.stdin;
98
+ const input = new PassThrough();
99
+ const fail = input.destroy.bind(input);
100
+ native.on('error', fail);
101
+ native.pipe(input);
102
+ const reader = Readable.toWeb(input).getReader();
103
+ const source = new ReadableStream({
104
+ async pull(controller) {
105
+ const next = await reader.read();
106
+ if (next.done)
107
+ controller.close();
108
+ else
109
+ controller.enqueue(next.value);
110
+ },
111
+ cancel: reason => reader.cancel(reason)
112
+ });
113
+ releaseInput = async () => {
114
+ native.unpipe(input);
115
+ native.off('error', fail);
116
+ // unpipe releases only this branch. Pausing the native stream here
117
+ // would stop delivery to other independently composed owners.
118
+ try {
119
+ await reader.cancel();
120
+ }
121
+ finally {
122
+ reader.releaseLock();
123
+ input.destroy();
124
+ }
125
+ };
126
+ streams = createRuntimeStdioStreams({ stdinStream: () => source, get stdout() { return process.stdout; } });
127
+ return streams;
128
+ },
129
+ /** Explicit host entry cleanup, including boot failures before a runtime retained it. */
130
+ async dispose() {
131
+ if (borrowers !== 0)
132
+ throw new CapabilityError('Bun runtimes still own this host.', 'CONFLICT', {
133
+ reason: 'bun-host-in-use', retryable: false
134
+ });
135
+ try {
136
+ await close();
137
+ }
138
+ finally {
139
+ closing = undefined;
140
+ }
141
+ }
142
+ });
143
+ }
144
+ //# sourceMappingURL=host-resources.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-resources.impl.bun.js","sourceRoot":"","sources":["../../src/services/host-resources.imp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,EAAE,IAAI,MAAM,KAAK,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC5G,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,yFAAyF;QACzF,KAAK,CAAC,OAAO;YACZ,IAAI,SAAS,KAAK,CAAC;gBAAE,MAAM,IAAI,eAAe,CAAC,mCAAmC,EAAE,UAAU,EAAE;oBAC/F,MAAM,EAAE,iBAAiB,EAAE,SAAS,EAAE,KAAK;iBAC3C,CAAC,CAAC;YACH,IAAI,CAAC;gBAAC,MAAM,KAAK,EAAE,CAAC;YAAC,CAAC;oBACd,CAAC;gBAAC,OAAO,GAAG,SAAS,CAAC;YAAC,CAAC;QACjC,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The Bun host's environment `httpFetch` port: the kernel's fetch base
3
+ * (`createRuntimeHttpFetch`) over this host's own native HTTP/2 client.
4
+ * Bun implements the `node:http2` client, so its client is that API; the
5
+ * request, abort, header, streaming and upload policy is the kernel's.
6
+ */
7
+ import { type RuntimeHttpFetch } from '@vibesdotdev/execution-local';
8
+ /** The Bun environment's HTTP/2 fetch port. */
9
+ export declare const bunHttpFetch: RuntimeHttpFetch;
10
+ //# sourceMappingURL=http-fetch.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-fetch.impl.bun.d.ts","sourceRoot":"","sources":["../../src/services/http-fetch.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAA0H,KAAK,gBAAgB,EAAmC,MAAM,8BAA8B,CAAC;AA+B9N,+CAA+C;AAC/C,eAAO,MAAM,YAAY,EAAE,gBAAyD,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The Bun host's environment `httpFetch` port: the kernel's fetch base
3
+ * (`createRuntimeHttpFetch`) over this host's own native HTTP/2 client.
4
+ * Bun implements the `node:http2` client, so its client is that API; the
5
+ * request, abort, header, streaming and upload policy is the kernel's.
6
+ */
7
+ import { createRuntimeHttpFetch } from '@vibesdotdev/execution-local';
8
+ import { connect } from 'node:http2';
9
+ /** One session per request; its stream starts paused and flows only when the base resumes it. */
10
+ const bunHttp2Client = Object.freeze({
11
+ connect(origin, options, events) {
12
+ const session = connect(origin, { rejectUnauthorized: options.rejectUnauthorized, settings: { enablePush: false } });
13
+ session.on('error', events.onError);
14
+ session.on('close', events.onClose);
15
+ return {
16
+ request(headers, requestOptions, streamEvents) {
17
+ const stream = session.request(headers, { endStream: requestOptions.endStream });
18
+ stream.pause();
19
+ stream.on('error', streamEvents.onError);
20
+ stream.on('aborted', streamEvents.onAborted);
21
+ stream.on('close', streamEvents.onClose);
22
+ stream.on('data', (chunk) => streamEvents.onData(chunk));
23
+ stream.on('end', streamEvents.onEnd);
24
+ stream.on('response', nativeHeaders => streamEvents.onResponse(nativeHeaders));
25
+ return {
26
+ pause: () => { stream.pause(); },
27
+ resume: () => { stream.resume(); },
28
+ write: (chunk, done) => { stream.write(chunk, done); },
29
+ end: () => { stream.end(); }
30
+ };
31
+ },
32
+ destroy: () => { session.destroy(); }
33
+ };
34
+ }
35
+ });
36
+ /** The Bun environment's HTTP/2 fetch port. */
37
+ export const bunHttpFetch = createRuntimeHttpFetch(bunHttp2Client);
38
+ //# sourceMappingURL=http-fetch.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-fetch.impl.bun.js","sourceRoot":"","sources":["../../src/services/http-fetch.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,sBAAsB,EAA0J,MAAM,8BAA8B,CAAC;AAC9N,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,iGAAiG;AACjG,MAAM,cAAc,GAA+B,MAAM,CAAC,MAAM,CAAC;IAChE,OAAO,CAAC,MAAc,EAAE,OAAiD,EAAE,MAAiC;QAC3G,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,kB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,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;oBAClG,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;iBAC5B,CAAC;YACH,CAAC;YACD,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;SACrC,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEH,+CAA+C;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAqB,sBAAsB,CAAC,cAAc,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /** Native Bun rendering and streams, handed to the execution-local output base. */
2
+ import { type RuntimeOutputPlane } from '@vibesdotdev/execution-local';
3
+ /** A composition root owns the returned plane and uninstalls it after draining. */
4
+ export declare function createBunOutputPlane(): RuntimeOutputPlane;
5
+ export declare const bunOutputPlane: RuntimeOutputPlane;
6
+ //# sourceMappingURL=output-plane.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-plane.impl.bun.d.ts","sourceRoot":"","sources":["../../src/services/output-plane.impl.bun.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGjG,mFAAmF;AACnF,wBAAgB,oBAAoB,IAAI,kBAAkB,CASzD;AAKD,eAAO,MAAM,cAAc,EAAE,kBAO3B,CAAC"}
@@ -0,0 +1,26 @@
1
+ /** Native Bun rendering and streams, handed to the execution-local output base. */
2
+ import { createRuntimeOutputPlane } from '@vibesdotdev/execution-local';
3
+ import { format } from 'node:util';
4
+ /** A composition root owns the returned plane and uninstalls it after draining. */
5
+ export function createBunOutputPlane() {
6
+ return createRuntimeOutputPlane(Object.freeze({
7
+ get stdout() { return process.stdout; },
8
+ get stderr() { return process.stderr; },
9
+ get console() { return console; },
10
+ // The Bun host renders console values as Bun does; no entry installs it.
11
+ inspect: (...values) => values.map(value => Bun.inspect(value, { depth: 2, colors: false })).join(' '),
12
+ formatJson: (...values) => format('%j', ...values)
13
+ }));
14
+ }
15
+ // Compatibility callers share the explicitly captured legacy host until their
16
+ // composition roots pass a host owner. This alias contains no independent state.
17
+ import { compatibilityBunHost } from "./compatibility-host.impl.bun.js";
18
+ export const bunOutputPlane = Object.freeze({
19
+ install: options => compatibilityBunHost.outputPlane.install(options),
20
+ isInstalled: () => compatibilityBunHost.outputPlane.isInstalled(),
21
+ uninstall: () => compatibilityBunHost.outputPlane.uninstall(),
22
+ setFormatter: next => compatibilityBunHost.setFormatter(next),
23
+ formatConsoleArgs: args => compatibilityBunHost.outputPlane.formatConsoleArgs(args),
24
+ flush: () => compatibilityBunHost.outputPlane.flush()
25
+ });
26
+ //# sourceMappingURL=output-plane.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-plane.impl.bun.js","sourceRoot":"","sources":["../../src/services/output-plane.impl.bun.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,wBAAwB,EAA2B,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,mFAAmF;AACnF,MAAM,UAAU,oBAAoB;IACnC,OAAO,wBAAwB,CAAC,MAAM,CAAC,MAAM,CAAC;QAC7C,IAAI,MAAM,KAAK,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACvC,IAAI,MAAM,KAAK,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACvC,IAAI,OAAO,KAAK,OAAO,OAAO,CAAC,CAAC,CAAC;QACjC,yEAAyE;QACzE,OAAO,EAAE,CAAC,GAAG,MAAiB,EAAU,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACzH,UAAU,EAAE,CAAC,GAAG,MAAiB,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC;KACrE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,8EAA8E;AAC9E,iFAAiF;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,MAAM,CAAC,MAAM,cAAc,GAAuB,MAAM,CAAC,MAAM,CAAC;IAC/D,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC;IACrE,WAAW,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,WAAW,EAAE;IACjE,SAAS,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,SAAS,EAAE;IAC7D,YAAY,EAAE,IAAI,CAAC,EAAE,CAAC,oBAAoB,CAAC,YAAY,CAAC,IAAI,CAAC;IAC7D,iBAAiB,EAAE,IAAI,CAAC,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC;IACnF,KAAK,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,WAAW,CAAC,KAAK,EAAE;CACrD,CAAC,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { type RuntimeHostSignals, type RuntimeLifecycle } from '@vibesdotdev/kernel';
2
+ export interface ProcessActionLifetime {
3
+ /**
4
+ * Request cleanup and completion. The first request owns cleanup; later
5
+ * requests await the same result. A caller that only fires the request
6
+ * (`void lifetime.request(reason)`) needs no rejection handler: `wait()` is
7
+ * the owner's observer of a cleanup failure.
8
+ */
9
+ request(reason: string): Promise<void>;
10
+ /** Await cleanup completion, then detach any installed signal handlers. */
11
+ wait(): Promise<void>;
12
+ /**
13
+ * Route SIGINT/SIGTERM into request() without terminating the process, through the
14
+ * runtime's host-signals provider handed as `options.signals`. Refuses
15
+ * `host-signals-undeclared` when the lifetime was created without one.
16
+ */
17
+ bindProcessSignals(): void;
18
+ }
19
+ /**
20
+ * Own a long-running process action without claiming ownership of the process.
21
+ *
22
+ * Signal and transport callbacks request shutdown; the caller awaits wait().
23
+ * Executable hosts can therefore finish their own lifecycle only after cleanup
24
+ * has genuinely completed, with no library-level process.exit race.
25
+ */
26
+ export interface ProcessActionLifetimeOptions {
27
+ /**
28
+ * Longest cleanup may run once requested, as the owning runtime's bounded
29
+ * wait (RC07): `lifecycle` is that runtime's (`runtime.lifecycle`). Past
30
+ * `ms`, wait() rejects `TIMEOUT wait-timeout` (details carry the reason), so
31
+ * a hung cleanup ends the action instead of leaving a process that only
32
+ * SIGKILL can stop. If the runtime itself is disposed first, wait() rejects
33
+ * `CANCELLED wait-aborted` and the runtime's finalization budget bounds what
34
+ * remains. Omit for no bound.
35
+ */
36
+ /**
37
+ * The owning runtime's host-signals provider (`getRuntimeHostSignals(runtime)`): the only
38
+ * way this lifetime listens for SIGINT/SIGTERM. Omit it and `bindProcessSignals()` refuses.
39
+ */
40
+ signals?: RuntimeHostSignals;
41
+ cleanupDeadline?: {
42
+ readonly ms: number;
43
+ readonly lifecycle: Pick<RuntimeLifecycle, 'wait'>;
44
+ };
45
+ }
46
+ export declare function createProcessActionLifetime(cleanup: (reason: string) => void | Promise<void>, options?: ProcessActionLifetimeOptions): ProcessActionLifetime;
47
+ //# sourceMappingURL=process-action-lifetime.consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-action-lifetime.consumer.d.ts","sourceRoot":"","sources":["../../src/services/process-action-lifetime.consumer.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEtG,MAAM,WAAW,qBAAqB;IACrC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,2EAA2E;IAC3E,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,IAAI,IAAI,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;;;;;;;OAQG;IACH;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,eAAe,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CAC9F;AAED,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACjD,OAAO,GAAE,4BAAiC,GACxC,qBAAqB,CAiEvB"}
@@ -0,0 +1,68 @@
1
+ import { attemptNative } from "./workspace-root-probe.impl.bun.js";
2
+ import { CapabilityError } from '@vibesdotdev/kernel';
3
+ export function createProcessActionLifetime(cleanup, options = {}) {
4
+ let requested = false;
5
+ const { promise: done, resolve: resolveDone, reject: rejectDone } = Promise.withResolvers();
6
+ /**
7
+ * wait()'s view of `done`: the failure is carried as a value, never dropped,
8
+ * and rethrown by wait(). Deriving it here gives `done` its observer from
9
+ * the start, so a fired request never leaves an unhandled rejection.
10
+ */
11
+ const outcome = done.then(() => null, (error) => ({ error }));
12
+ const subscriptions = new Map();
13
+ const request = (reason) => {
14
+ if (!requested) {
15
+ requested = true;
16
+ const run = () => Promise.resolve().then(() => cleanup(reason));
17
+ const deadline = options.cleanupDeadline;
18
+ const bounded = deadline
19
+ ? deadline.lifecycle.wait(run, { timeoutMs: deadline.ms, reason: `process-action-cleanup:${reason}` })
20
+ : run();
21
+ bounded.then(resolveDone, rejectDone);
22
+ }
23
+ return done;
24
+ };
25
+ /** Detach every subscription; the failures of those that would not detach, in order. */
26
+ const detachAll = () => {
27
+ const owned = [...subscriptions.values()];
28
+ subscriptions.clear();
29
+ const failures = [];
30
+ for (const detach of owned) {
31
+ const detached = attemptNative(detach);
32
+ if ('failure' in detached)
33
+ failures.push(detached.failure.cause instanceof Error ? detached.failure.cause : new Error('A signal subscription failed to detach.', { cause: detached.failure.cause }));
34
+ }
35
+ return failures;
36
+ };
37
+ return {
38
+ request,
39
+ bindProcessSignals: () => {
40
+ const signals = options.signals;
41
+ if (signals === undefined) {
42
+ throw new CapabilityError('This lifetime was created without a host-signals provider.', 'UNAVAILABLE', {
43
+ reason: 'host-signals-undeclared', retryable: false
44
+ });
45
+ }
46
+ for (const signal of ['SIGINT', 'SIGTERM']) {
47
+ if (subscriptions.has(signal))
48
+ continue;
49
+ // wait() is the observer of a cleanup failure.
50
+ subscriptions.set(signal, signals.subscribe(signal, () => { void request(signal); }));
51
+ }
52
+ },
53
+ wait: async () => {
54
+ const failure = await outcome;
55
+ const detachFailures = detachAll();
56
+ if (failure !== null && detachFailures.length > 0) {
57
+ throw new AggregateError([failure.error, ...detachFailures], 'Cleanup and signal detachment both failed.');
58
+ }
59
+ if (detachFailures.length > 1)
60
+ throw new AggregateError(detachFailures, 'Signal subscriptions failed to detach.');
61
+ if (detachFailures[0] !== undefined)
62
+ throw detachFailures[0];
63
+ if (failure !== null)
64
+ throw failure.error;
65
+ }
66
+ };
67
+ }
68
+ //# sourceMappingURL=process-action-lifetime.consumer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-action-lifetime.consumer.js","sourceRoot":"","sources":["../../src/services/process-action-lifetime.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAkD,MAAM,qBAAqB,CAAC;AA6CtG,MAAM,UAAU,2BAA2B,CAC1C,OAAiD,EACjD,UAAwC,EAAE;IAE1C,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EA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AC,CAAC;YAC5G,CAAC;YACD,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC;gBAAE,MAAM,IAAI,cAAc,CAAC,cAAc,EAAE,wCAAwC,CAAC,CAAC;YAClH,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS;gBAAE,MAAM,cAAc,CAAC,CAAC,CAAC,CAAC;YAC7D,IAAI,OAAO,KAAK,IAAI;gBAAE,MAAM,OAAO,CAAC,KAAK,CAAC;QAC3C,CAAC;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The Bun host's process views: the kernel's process-view base
3
+ * (`createProcessViews`, the probe each view runs and how its output parses)
4
+ * over this host's own synchronous probe and captured platform.
5
+ *
6
+ * The probe is this host's native spawn (`../process/process-probe.impl.bun.ts`),
7
+ * bounded and without a console window; the kernel turns its result into an
8
+ * answer (`answerProbeSync`) and a probe that could not run refuses
9
+ * `UNAVAILABLE` `process-table-unavailable`.
10
+ */
11
+ export { parseElapsed, type ProcessViewCommands, type ProcessViewOptions } from '@vibesdotdev/execution-local';
12
+ /** The platform this host process reported once, at load: the probe's answer for a caller that declares none. */
13
+ export declare const bunProcessViews: {
14
+ readProcessStartMs: (pid: number, options: import("@vibesdotdev/execution-local").ProcessViewOptions) => number | null;
15
+ readProcessExecutablePath: (pid: number, options: import("@vibesdotdev/execution-local").ProcessViewOptions) => string | null;
16
+ };
17
+ export declare const readProcessStartMs: (pid: number, options: import("@vibesdotdev/execution-local").ProcessViewOptions) => number | null, readProcessExecutablePath: (pid: number, options: import("@vibesdotdev/execution-local").ProcessViewOptions) => string | null;
18
+ //# sourceMappingURL=process-view.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-view.impl.bun.d.ts","sourceRoot":"","sources":["../../src/services/process-view.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAE/G,iHAAiH;AACjH,eAAO,MAAM,eAAe;;;CAAgE,CAAC;AAE7F,eAAO,MAAQ,kBAAkB,sGAAE,yBAAyB,oGAAoB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The Bun host's process views: the kernel's process-view base
3
+ * (`createProcessViews`, the probe each view runs and how its output parses)
4
+ * over this host's own synchronous probe and captured platform.
5
+ *
6
+ * The probe is this host's native spawn (`../process/process-probe.impl.bun.ts`),
7
+ * bounded and without a console window; the kernel turns its result into an
8
+ * answer (`answerProbeSync`) and a probe that could not run refuses
9
+ * `UNAVAILABLE` `process-table-unavailable`.
10
+ */
11
+ import { createProcessViews } from '@vibesdotdev/execution-local';
12
+ import { probeSync } from "../process/process-probe.impl.bun.js";
13
+ export { parseElapsed } from '@vibesdotdev/execution-local';
14
+ /** The platform this host process reported once, at load: the probe's answer for a caller that declares none. */
15
+ export const bunProcessViews = createProcessViews({ probeSync, platform: process.platform });
16
+ export const { readProcessStartMs, readProcessExecutablePath } = bunProcessViews;
17
+ //# sourceMappingURL=process-view.impl.bun.js.map