@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,236 @@
1
+ /**
2
+ * Bun host integration for runtime generations. Source watching is opt-in;
3
+ * installedUpdates admits compatible package publications independently.
4
+ * Targets come from the host's retained composition report. Host state and
5
+ * transports remain owned by the process while implementation views drain.
6
+ */
7
+ import { CaughtFailureSchema, getRuntimeHostIdentity } from '@vibesdotdev/kernel';
8
+ import * as z from 'zod/v4';
9
+ import { PLUGIN_RESOLUTIONS_CONTEXT_ID } from '@vibesdotdev/kernel/schemas/package-plugins';
10
+ import { hotReloadTargetsFromResolutions } from '@vibesdotdev/kernel/kinds/runtime-plugin-host.kind';
11
+ export { hotReloadTargetsFromResolutions } from '@vibesdotdev/kernel/kinds/runtime-plugin-host.kind';
12
+ async function readCompositionReport(runtime) {
13
+ // A host that never composed through the filesystem loader (an embedded
14
+ // host, a test runtime) has no report context: absence. A report context
15
+ // that fails to resolve is a real failure and propagates.
16
+ if (!runtime.hasContext(PLUGIN_RESOLUTIONS_CONTEXT_ID))
17
+ return null;
18
+ const report = await runtime.context(PLUGIN_RESOLUTIONS_CONTEXT_ID);
19
+ return report ?? null;
20
+ }
21
+ /**
22
+ * Arm hot reload for a host. Returns a disabled result — never throws — when
23
+ * HMR was not requested, when the hardware refuses it, or when there is
24
+ * nothing linked to track.
25
+ *
26
+ * Lazy import discipline preserved from the daemon: hot reload rebuilds source
27
+ * with `Bun.build`, and a host that never enables it must not carry that
28
+ * closure. Everything Bun-only is behind the `await import` below.
29
+ */
30
+ export async function startHostHotReload(runtime, options) {
31
+ const logger = options.log;
32
+ const { DaemonHotReload, decideHotReload } = await import("./hot-reload.consumer.js");
33
+ const decision = decideHotReload(runtime, options.config);
34
+ if (!decision.enabled && !options.installedUpdates) {
35
+ options.log.debug('hot reload disabled', { reason: decision.reason });
36
+ return { enabled: false, reason: decision.reason };
37
+ }
38
+ const composition = await readCompositionReport(runtime);
39
+ const loaded = (composition?.resolutions ?? []).filter((row) => row.status === 'loaded');
40
+ const linkedCount = loaded.filter((row) => row.linked === true).length;
41
+ const installedCount = loaded.filter((row) => row.linked === false).length;
42
+ const installed = options.installedUpdates
43
+ ? (composition?.resolutions ?? []).filter((row) => row.status === 'loaded' &&
44
+ row.linked === false &&
45
+ row.id &&
46
+ (row.realpath ?? row.resolvedPath))
47
+ : [];
48
+ let targets = options.targets ?? options.config?.targets ?? null;
49
+ let considered = targets ? targets.length : null;
50
+ let hadReport = targets !== null;
51
+ if (!targets) {
52
+ const report = composition;
53
+ hadReport = report !== null;
54
+ considered = report ? report.resolutions.length : null;
55
+ targets = report && decision.enabled ? hotReloadTargetsFromResolutions(report.resolutions) : [];
56
+ if (report) {
57
+ options.log.info('hot reload targets computed from cli/plugin-resolutions', {
58
+ hostRoot: report.hostRoot,
59
+ considered: report.resolutions.length,
60
+ linked: linkedCount,
61
+ installed: installedCount,
62
+ sourceTargets: targets.length
63
+ });
64
+ }
65
+ }
66
+ const sourceIds = new Set(decision.enabled ? targets.map((target) => target.pluginId) : []);
67
+ targets = [
68
+ ...targets,
69
+ ...installed
70
+ .filter((row) => !targets.some((target) => target.pluginId === row.id))
71
+ .map((row) => ({ pluginId: row.id, entry: (row.realpath ?? row.resolvedPath) }))
72
+ ];
73
+ // Name the ACTUAL cause. "every plugin is installed" and "this host never
74
+ // produced a composition report" are different problems with different
75
+ // fixes, and the second is the state the shipping `vibes --hmr runtime
76
+ // daemon serve` is in today (measured 2026-08-30: tracked 0, watched 0,
77
+ // because cli-bin composes through literal loaders).
78
+ const emptyReason = targets.length > 0
79
+ ? null
80
+ : !decision.enabled
81
+ ? `source watching disabled: ${decision.reason}; no eligible installed package updates are tracked`
82
+ : !hadReport
83
+ ? 'this host retained no `cli/plugin-resolutions` report — it composed its plugins through literal loaders rather than the filesystem package-plugin loader, so no selection is resolvable as linked'
84
+ : considered === 0
85
+ ? 'the `cli/plugin-resolutions` report is empty — this host loaded no package plugins at all'
86
+ : linkedCount === 0
87
+ ? `none of the ${considered} plugin(s) this host loaded is linked with a usable source entry; ${installedCount} loaded package(s) were classified as installed artifacts`
88
+ : `${linkedCount} linked plugin(s) loaded, but none provided an eligible source target`;
89
+ if (emptyReason && decision.enabled) {
90
+ options.log.info('hot reload armed with nothing to watch', { reason: emptyReason });
91
+ // Still armed: `vibes update` links a provider and re-tracks without a
92
+ // restart, and `hot-reload-status` must answer "enabled, watching 0"
93
+ // rather than "disabled".
94
+ //
95
+ // LOUD, not just logged. The operator asked for `--hmr` and every other
96
+ // boot signal looks identical to a hot host; a daemon logger writes to a
97
+ // file nobody reads while the request was made on this terminal. One line
98
+ // on stderr is the difference between "armed" and "hot".
99
+ const noticeFailure = writeArmedWithNothingNotice(emptyReason);
100
+ if (noticeFailure)
101
+ logger.warn('hot reload notice could not be written', { error: noticeFailure });
102
+ }
103
+ const hostIdentity = composition ? await getRuntimeHostIdentity(runtime) : null;
104
+ const hot = new DaemonHotReload(runtime, {
105
+ logger: options.log,
106
+ artifactIdentity: composition ? () => hostIdentity?.graphFreshness(composition.hostRoot).current?.digest ?? null : undefined,
107
+ validateCandidate: options.validateCandidate,
108
+ debounceMs: options.config?.debounceMs,
109
+ hotDir: options.hotDir,
110
+ requireCwd: sourceIds.size > 0
111
+ });
112
+ // Baseline is captured before updates can arrive, even when no source is watched.
113
+ // Failure keeps the host serving and makes publication unavailable.
114
+ const baselineFailure = await hot.initialize(targets).then(() => null).catch((cause) => CaughtFailureSchema.parse(cause));
115
+ const baselineReady = baselineFailure === null;
116
+ if (baselineFailure)
117
+ logger.error('runtime update baseline unavailable', { error: baselineFailure });
118
+ for (const target of targets) {
119
+ const trackFailure = await hot.track(target, sourceIds.has(target.pluginId)).then(() => null).catch((cause) => CaughtFailureSchema.parse(cause));
120
+ if (trackFailure) {
121
+ // A target that cannot be tracked is a bad graph, not a reason to
122
+ // refuse to serve.
123
+ logger.error('hot reload target could not be tracked', {
124
+ pluginId: target.pluginId,
125
+ entry: target.entry,
126
+ error: trackFailure
127
+ });
128
+ }
129
+ }
130
+ let publishedDigest = null;
131
+ let publication = null;
132
+ const publishUpdate = () => {
133
+ if (publication)
134
+ return publication;
135
+ publication = (async () => {
136
+ if (!baselineReady || !installed.length || !composition)
137
+ return false;
138
+ const before = hostIdentity?.graphFreshness(composition.hostRoot).current;
139
+ if (!before?.digest)
140
+ return false;
141
+ if (before.digest === publishedDigest)
142
+ return true;
143
+ for (const row of installed) {
144
+ // Resolve the same admitted export from its original composition root.
145
+ // Never accept an arbitrary new path from a remote reload request.
146
+ const entry = Bun.resolveSync(row.specifier, row.root);
147
+ await hot.track({ pluginId: row.id, entry }, false);
148
+ }
149
+ if (hostIdentity?.graphFreshness(composition.hostRoot).current?.digest !== before.digest)
150
+ throw new Error('Package graph changed during resolution; retry publication');
151
+ const outcome = await hot.reloadMany(installed.map((row) => row.id));
152
+ if (outcome.status !== 'reloaded' || hostIdentity?.graphFreshness(composition.hostRoot).current?.digest !== before.digest)
153
+ return false;
154
+ // This records implementation publication, not a new kernel boot identity.
155
+ publishedDigest = before.digest;
156
+ return true;
157
+ })().finally(() => { publication = null; });
158
+ return publication;
159
+ };
160
+ const bootDigest = composition ? hostIdentity?.graphFreshness(composition.hostRoot).current?.digest : null;
161
+ // The installed-graph check is a lifecycle interval of the serving host
162
+ // (RC07), disposed by stop() and by the runtime's disposal. Poll: the
163
+ // package installer publishes no "graph changed" event to a serving host.
164
+ const stopUpdateCheck = installed.length && composition ? runtime.lifecycle.interval(() => {
165
+ const graph = hostIdentity?.graphFreshness(composition.hostRoot).current;
166
+ if (!graph?.digest || graph.digest === (publishedDigest ?? bootDigest) ||
167
+ (graph.mtimeMs !== null && Date.now() - graph.mtimeMs < 30_000))
168
+ return;
169
+ void publishUpdate().then(() => null).catch((cause) => CaughtFailureSchema.parse(cause)).then((failure) => {
170
+ if (failure)
171
+ logger.error('installed implementation publication failed; serving generation retained', { error: failure });
172
+ });
173
+ }, 30_000) : null;
174
+ const result = {
175
+ enabled: true,
176
+ runtime: hot.runtime,
177
+ publishUpdate,
178
+ tracked: () => hot.status().map((entry) => entry.pluginId),
179
+ watchedSources: () => hot.watchedSources(),
180
+ reload: (pluginId) => hot.reload(pluginId),
181
+ lastFailure: () => hot.lastFailure(),
182
+ // Re-derived on every call, never frozen at boot: a host that tracks
183
+ // nothing now can track something after `vibes update` links a provider.
184
+ armedWithNothing: () => hot.status().length === 0
185
+ ? (emptyReason ??
186
+ 'nothing is tracked — every target computed at boot failed to track (see the hot reload error log)')
187
+ : null,
188
+ status: () => hot.status(),
189
+ stop: async () => {
190
+ stopUpdateCheck?.();
191
+ await hot.stop();
192
+ }
193
+ };
194
+ if (options.registerCommand) {
195
+ options.registerCommand('hot-reload-status', async () => ({
196
+ success: true,
197
+ enabled: true,
198
+ plugins: hot.status(),
199
+ generations: hot.generations.status(),
200
+ watchedSources: hot.watchedSources(),
201
+ lastFailure: hot.lastFailure(),
202
+ // `enabled: true, plugins: []` reads as health. It is not: it is a host
203
+ // that will never reload anything. Say which one this is.
204
+ armedWithNothing: result.armedWithNothing() !== null,
205
+ armedWithNothingReason: result.armedWithNothing()
206
+ }));
207
+ options.registerCommand('hot-reload', async (message) => {
208
+ const { pluginId } = z.object({ pluginId: z.string() }).parse(message);
209
+ const outcome = await hot.reload(pluginId);
210
+ return { success: outcome.status === 'reloaded', outcome };
211
+ });
212
+ }
213
+ options.log.info('hot reload enabled', {
214
+ via: decision.enabled ? decision.via : 'installed-artifacts',
215
+ tracked: result.tracked(),
216
+ watchedSources: result.watchedSources().length,
217
+ armedWithNothing: result.armedWithNothing()
218
+ });
219
+ return result;
220
+ }
221
+ /**
222
+ * One stderr line when `--hmr` armed nothing. Never throws — a notice that can
223
+ * break a boot is worse than no notice.
224
+ */
225
+ function writeArmedWithNothingNotice(reason) {
226
+ try {
227
+ process.stderr.write(`--hmr: armed, but tracking 0 plugins and watching 0 files — ${reason}. ` +
228
+ 'Nothing will hot-reload in this process. `hot-reload-status` reports ' +
229
+ '`armedWithNothing: true` with the same reason.\n');
230
+ return null;
231
+ }
232
+ catch (cause) {
233
+ return CaughtFailureSchema.parse(cause);
234
+ }
235
+ }
236
+ //# sourceMappingURL=host-hot-reload.consumer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-hot-reload.consumer.js","sourceRoot":"","sources":["../../src/runtime-plugin-host/host-hot-reload.consumer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAyC,MAAM,qBAAqB,CAAC;AACzH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACN,6BAA6B,EAE7B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACN,+BAA+B,EAI/B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACN,+BAA+B,EAK/B,MAAM,oDAAoD,CAAC;AAE5D,KAAK,UAAU,qBAAqB,CACnC,OAAqB;IAErB,wEAAwE;IACxE,yEAAyE;IACzE,0DAA0D;IAC1D,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;QAAE,OAAO,IAAI,CAAC;IACpE,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAA0B,6BAA6B,CAAC,CAAC;IAC7F,OAAO,MAAM,IAAI,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,OAAqB,EACrB,OAAkC;IAElC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAC3B,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;IAEtF,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,KA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IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hot-plugin-build.worker.consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hot-plugin-build.worker.consumer.d.ts","sourceRoot":"","sources":["../../src/runtime-plugin-host/hot-plugin-build.worker.consumer.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ /** Compiler worker: no serving runtime, transports, managers, or request state. */
2
+ import { realpathSync } from 'node:fs';
3
+ import { dirname, isAbsolute } from 'node:path';
4
+ import { builtinModules } from 'node:module';
5
+ import { CapabilityError, settle, valueFreeFailure } from '@vibesdotdev/kernel';
6
+ import z from 'zod/v4';
7
+ const builtins = new Set(builtinModules);
8
+ const stablePackages = new Set([
9
+ '@vibesdotdev/kernel', '@vibesdotdev/kernel-rpc',
10
+ '@vibesdotdev/host-bun', '@vibesdotdev/kernel-rpc'
11
+ ]);
12
+ const CompilerHostSchema = z.custom((value) => z.object({
13
+ postMessage: z.custom((fn) => fn instanceof Function)
14
+ }).safeParse(value).success);
15
+ function compilerWorker() {
16
+ const parsed = CompilerHostSchema.safeParse(globalThis);
17
+ if (!parsed.success)
18
+ throw new Error('Compiler worker has no postMessage');
19
+ return parsed.data;
20
+ }
21
+ const worker = compilerWorker();
22
+ worker.onmessage = ({ data }) => {
23
+ void settle(async () => {
24
+ const externals = new Set();
25
+ const resolutions = {};
26
+ const built = await Bun.build({
27
+ entrypoints: [data.sourcePath], target: 'bun', format: 'cjs', packages: 'external',
28
+ sourcemap: 'external', minify: false,
29
+ plugins: [{ name: 'runtime-generation-graph', setup(build) {
30
+ build.onResolve({ filter: /^[^./]/ }, (args) => {
31
+ if (isAbsolute(args.path))
32
+ return undefined;
33
+ if (args.path.startsWith('node:') || args.path.startsWith('bun:') || args.path === 'bun' || builtins.has(args.path))
34
+ return { path: args.path, external: true };
35
+ const resolved = realpathSync(Bun.resolveSync(args.path, dirname(args.importer)));
36
+ const firstParty = args.path.startsWith('@vibesdotdev/');
37
+ const stable = stablePackages.has(args.path.split('/').slice(0, 2).join('/'));
38
+ const kernel = args.path === '@vibesdotdev/kernel' || args.path.startsWith('@vibesdotdev/kernel/');
39
+ const normResolved = resolved.replace(/\\/g, '/');
40
+ const normKernel = data.kernelRoot.replace(/\\/g, '/').replace(/\/+$/, '');
41
+ if (kernel && !normResolved.startsWith(`${normKernel}/`))
42
+ throw new Error('Generation resolves a second runtime kernel');
43
+ if (stable || !firstParty) {
44
+ externals.add(resolved);
45
+ if (resolutions[args.path] && resolutions[args.path] !== resolved)
46
+ throw new Error(`External '${args.path}' resolves to multiple package identities`);
47
+ resolutions[args.path] = resolved;
48
+ }
49
+ return { path: resolved, external: stable || !firstParty };
50
+ });
51
+ } }]
52
+ });
53
+ if (!built.success)
54
+ throw new CapabilityError('Generation compile failed.', 'INVALID_INPUT', { reason: 'generation-compile-failed' });
55
+ const entry = built.outputs.find((output) => output.kind === 'entry-point');
56
+ if (!entry)
57
+ throw new Error('Generation build produced no entry point');
58
+ const map = built.outputs.find((output) => output.kind === 'sourcemap');
59
+ worker.postMessage({ code: await entry.text(), map: map ? await map.text() : null, externals: [...externals], resolutions });
60
+ }).then((settled) => {
61
+ if (settled.ok)
62
+ return;
63
+ worker.postMessage({ reason: 'generation-compile-failed', failure: valueFreeFailure(settled.cause) });
64
+ });
65
+ };
66
+ //# sourceMappingURL=hot-plugin-build.worker.consumer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hot-plugin-build.worker.consumer.js","sourceRoot":"","sources":["../../src/runtime-plugin-host/hot-plugin-build.worker.consumer.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,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;QACxE,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAC/H,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;QACnB,IAAI,OAAO,CAAC,EAAE;YAAE,OAAO;QACvB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,2BAA2B,EAAE,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Bun implementation of PluginModuleImporter. A compiler worker bundles the
3
+ * replacement set into one dependency graph. Runtime kernel packages remain
4
+ * external and retain host identity; first-party implementation dependencies
5
+ * are included so their changed code cannot come from an old module cache.
6
+ *
7
+ * Verified CJS factories are evaluated outside the native ESM module cache.
8
+ * Their closures and artifact files live until generation custody releases
9
+ * them. Files reside outside package-manager-owned node_modules directories.
10
+ */
11
+ import type { RuntimePlugin } from '@vibesdotdev/kernel/factory/plugin';
12
+ import type { PluginModuleGeneration, PluginModuleImporter } from '@vibesdotdev/kernel/reload';
13
+ import type { BunPluginImporterOptions } from './schemas.ts';
14
+ export type { BunPluginImporterOptions, BunPluginImporterPlacement, HotAnchorNotice } from './schemas.ts';
15
+ /** Same selection rule the package-plugin resolver uses: default, else one named `*plugin*`. */
16
+ export declare function pluginFromModule(module: unknown): RuntimePlugin | null;
17
+ /** Walk up from a file to the nearest directory holding a package.json. */
18
+ export declare function findPackageRoot(fromFile: string): string;
19
+ export declare class BunPluginModuleImporter implements PluginModuleImporter {
20
+ private readonly options;
21
+ private sequence;
22
+ private kernelFingerprint;
23
+ private readonly stableDependencies;
24
+ private readonly written;
25
+ constructor(options: BunPluginImporterOptions);
26
+ /** Memoized per package root so the anchor probe runs once, not per generation. */
27
+ private readonly hotDirs;
28
+ private resolveHotDir;
29
+ /** Capture the external graph at host startup without evaluating plugin code. */
30
+ initialize(entries: readonly string[]): Promise<void>;
31
+ load(entry: string): Promise<PluginModuleGeneration>;
32
+ /** Compile a replacement set together so each dependency has one identity. */
33
+ loadMany(entries: readonly string[]): Promise<PluginModuleGeneration[]>;
34
+ /** Delete every module this importer generated. */
35
+ dispose(): Promise<void>;
36
+ }
37
+ /**
38
+ * Remove any generated modules left behind by a previous process.
39
+ *
40
+ * Sweeps BOTH the legacy in-`node_modules` location and the in-package
41
+ * fallback, so a body that ran an older build does not leave orphans a
42
+ * package manager will later carry around.
43
+ */
44
+ export declare function cleanHotModuleDir(packageRoot: string): Promise<number>;
45
+ //# sourceMappingURL=hot-plugin-module.consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hot-plugin-module.consumer.d.ts","sourceRoot":"","sources":["../../src/runtime-plugin-host/hot-plugin-module.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE7D,YAAY,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmJ1G,gGAAgG;AAChG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,aAAa,GAAG,IAAI,CAEtE;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQxD;AAED,qBAAa,uBAAwB,YAAW,oBAAoB;IAMvD,OAAO,CAAC,QAAQ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