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

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
package/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 VIBES DEV LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,223 @@
1
- # Temporary Holding Version
1
+ # @vibesdotdev/host-bun
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Bun host bindings for the Vibes runtime. A host selects this provider once;
4
+ reusable features receive the runtime and resolve its environment, execution,
5
+ loader, paths and sockets through their public kinds.
6
+
7
+ This package is part of the public Vibes framework package set. The source repository is private while the public repository split is being prepared, so package documentation is published on the Vibes docs site.
8
+
9
+ ## Native protocol networking
10
+
11
+ The environment warms `host.native-network`. Resolve it with
12
+ `getVibesClient<NativeNetworkClient>('host.native-network', runtime)`, importing
13
+ the type from `@vibesdotdev/host-bun/native-network`. Native hosts composing
14
+ their own environment can register `bunNativeNetworkPlugin` from
15
+ `@vibesdotdev/host-bun/native-network/plugin`.
16
+
17
+ The client creates raw HTTP servers, SSH servers, real WebSocket servers and
18
+ outbound WebSockets, and verifies SSH signed blobs with ssh2's key verifier.
19
+ Native compatibility types and `WebSocketState` are available on the same
20
+ subpath. Caller-owned host keys and protocol limits pass through explicitly.
21
+ Resources remain caller-closeable; runtime disposal drains and joins them,
22
+ forcing stalled peers after its declared shutdown budget. Native cloud Bun
23
+ hosts have the same networking and SQLite admission as consumer Bun hosts.
24
+ Browser surfaces and non-native loader substrates refuse these capabilities.
25
+
26
+ ## Install
27
+
28
+ ```sh
29
+ bun add @vibesdotdev/host-bun
30
+ # or
31
+ npm install @vibesdotdev/host-bun
32
+ ```
33
+
34
+ ## Boot a Bun host
35
+
36
+ ```ts
37
+ import { bootstrapVibesRuntime } from '@vibesdotdev/kernel';
38
+ import { createRuntimeEnvironmentBunPlugin } from '@vibesdotdev/host-bun';
39
+ import { getPathRoots } from '@vibesdotdev/paths';
40
+
41
+ const runtime = await bootstrapVibesRuntime({
42
+ environment: createRuntimeEnvironmentBunPlugin({
43
+ scope: {
44
+ surface: 'cli',
45
+ hardware: 'consumer',
46
+ purpose: 'direct',
47
+ lifecycle: 'finite',
48
+ hosting: { mode: 'local', owner: 'consumer', venue: 'user-device' },
49
+ capabilities: { interactiveSession: true },
50
+ qualifiers: { dev: false, environmentTier: 'local' }
51
+ }
52
+ }),
53
+ composition: { kind: 'literal', plugins: [] },
54
+ binding: 'owned'
55
+ });
56
+
57
+ try {
58
+ console.log(getPathRoots(runtime).activeHome);
59
+ } finally {
60
+ await runtime.dispose();
61
+ }
62
+ ```
63
+
64
+ Declare the host's actual scope. There is no default environment plugin.
65
+ The configured plugin registers the `runtime-environment-bun` documentation
66
+ topic beneath Runtime in the Docs catalog.
67
+ `workspace.root` declares the workspace to capture; `host.root` declares the
68
+ resolution root for filesystem plugin composition. They serve different
69
+ purposes. Path layout overrides belong to the factory's `paths` option and
70
+ are validated by `@vibesdotdev/paths`.
71
+
72
+ For multiple runtimes in one process, create one `createBunHostResources()`
73
+ from `./services/standard-output` and pass it as `hostResources` to each factory.
74
+ Use `createBunStandardOutput(hostResources)` for output before boot and after
75
+ failed boot. `setOutputPlaneFormatter(formatter, hostResources)` selects its
76
+ renderer before registration. The last runtime release drains output, restores
77
+ console/stream hooks and detaches native observers; it preserves the formatter
78
+ for later reporting. Each runtime resolves its own `bun-host` semantic client
79
+ through `getVibesClient('bun-host', runtime)`; disposal attempts every native
80
+ transport cleanup and reports failures together. With `hostResources` omitted,
81
+ each runtime constructs and releases its own resources, including when the same
82
+ plugin is reused. `BunHostClient` and `bunHostClientDescriptor` are exported for
83
+ `getVibesClient<BunHostClient>('bun-host', runtime)` and synchronous
84
+ `tryGetVibesClient` from `@vibesdotdev/kernel/client` after activation.
85
+
86
+ Independent stdin owners detach only their own branch; retiring either owner
87
+ preserves byte delivery to the survivor. Independent output owners preserve the
88
+ surviving formatter and restore the original hooks on final retirement, through
89
+ execution-local's canonical output-plane base. No host-local registry or
90
+ replacement output-plane implementation is introduced.
91
+
92
+ The client's `resources` property exposes its explicit owner.
93
+ `createBunStandardOutput(runtime)` uses `tryGetVibesClient` synchronously;
94
+ an unavailable client refuses `UNAVAILABLE bun-host-client-unavailable`.
95
+ Direct stdio construction borrows the activated client's resources, or owns
96
+ and disposes its resources when there is no client. Direct signal construction
97
+ owns and detaches its native fatal source unless a source is supplied.
98
+ `captureBunCliProcessHost(resources)` accepts the same explicit output owner.
99
+
100
+ Legacy no-owner output and process-fatal helpers resolve the activated
101
+ `bun-host` client on every call. The facade holds no resources. Before boot
102
+ and after disposal, executable owners must pass explicit resources through
103
+ formatter selection, environment construction, reporting, flush and disposal.
104
+ External migration remains for surface-cli's Bun host, cli-bin's monolith,
105
+ shield-cli's entry and cli's bootstrap.
106
+ The root socket class export remains for
107
+ `workspace/src/daemon/__tests__/owned.ts`; new concrete imports use
108
+ `./services/runtime-socket`, and generic consumers resolve `runtime/socket`.
109
+
110
+ The environment captures argv, cwd, environment variables and user/temp roots
111
+ at construction. Child environments are composed from the handed runtime;
112
+ later changes to `process.env` do not alter that host. Bun's asynchronous
113
+ invocation store keeps concurrent actors, tenants and workspaces separate.
114
+
115
+ The factory composes the canonical local execution plugin. Optional
116
+ `restrictedExecution`, `heldLaunch` and `nativeLaunch` declarations go to that
117
+ owner. An existing local plugin cannot silently replace an explicit admission.
118
+ Without a held/native artifact declaration, ordinary execution remains available
119
+ and resource-enforced launches refuse rather than guessing an artifact.
120
+
121
+ Identity helpers use the activated client or explicit resources. Share one
122
+ resource owner to pin physical executable evidence while retaining each
123
+ environment's stable classification and source reference. Pre-boot callers pass
124
+ `resources.classifier` to identity helpers and `resources.executable` to
125
+ `executableHostFactsOf(runtime, executable)`. Missing environments refuse
126
+ `INTERNAL/environment-unregistered`; missing activated or explicit owners
127
+ refuse `UNAVAILABLE/bun-host-client-unavailable`. No ambient identity cache is used.
128
+
129
+ Graph pins belong to `client.graph`. Before boot, own
130
+ `createBunGraphFreshness()` from `./services/graph-freshness` and pass that
131
+ owner to graph capture, lookup and freshness helpers. The standalone HTTP
132
+ plugin reuses the host listener or resolves its own `bun-http-listener`
133
+ client, which the kernel disposes.
134
+
135
+ ## Public surfaces
136
+
137
+ | Import | Use |
138
+ | --- | --- |
139
+ | Package root | Configured environment factory, semantic client and compatibility host helpers |
140
+ | `./loader` | Bun host module import, public export resolution and filesystem port |
141
+ | `./local-execution` | Canonical local execution composition (`bunProcessHost`, which builds on this host's own `bunNativeProcessHost()`, its spawn and command discovery over `runtime-execution-local`'s bases and its PTY adapter, and adds buffered capture, the restricted macOS adapter and held launch over the `bun:ffi` artifact binding; `bunLocalExecutionPlugin`) and native manifest selection |
142
+ | `./native/held-launch/abi`, `./native/held-launch/<target>` | The held-launch ABI manifest and the staged native artifact manifest for each of `aarch64-apple-darwin`, `x86_64-apple-darwin`, `aarch64-unknown-linux-gnu`, `x86_64-unknown-linux-gnu` (file exports; built by `bun run build:native`) |
143
+ | `./buffered-capture` | The Bun file-backed buffered-capture backend `LocalExecution` retries through |
144
+ | `./package-plugins` | This host's `runtime/package-plugins` (`createBunRuntimePackagePlugins`) and its primitives for the kernel's scope base (`createBunPackagePluginsHost`, `bunPackagePluginWrites`, `bunPackageManifestJsonc`); package-graph read admission (`planPackageReadAdmission`, `verifyPackageReadAdmission`). Plugin composition and the scope readers and writers are the kernel's (`@vibesdotdev/kernel/bootstrap`) |
145
+ | `./host-credentials` | The CLI's pre-runtime `hasLiveHostCredentials` declaration (the manifest grammar and liveness verdict live in `@vibesdotdev/kernel`) |
146
+ | `./services/runtime-path` | Native path mechanics over captured facts |
147
+ | `./services/runtime-socket` | Local socket endpoint, listen, connect and readiness mechanics |
148
+ | `./services/self-spawn` | Declared compiled/source re-entry argv |
149
+ | `./services/workspace-env` | Workspace child environment composition |
150
+ | `./services/process-action-lifetime` | Host signal admission and awaited cleanup |
151
+ | `./services/user-environment` | Native user environment/profile discovery |
152
+ | `./services/host-identity` | Captured host identity and executable shape |
153
+ | `./services/executable-identity` | Replaced executable detection |
154
+ | `./services/graph-freshness` | Per-runtime graph pin and freshness verdict |
155
+ | `./test-tooling/svelte-compiler`, `./test-tooling/svelte-client-preload`, `./test-tooling/svelte-server-preload` | Test tooling: a Bun plugin that compiles `*.svelte.ts` modules and `*.svelte` components with the real Svelte compiler (`registerSvelteCompiler({ generate })`); packages wire a preload from their `bunfig.toml` (`preload = ["@vibesdotdev/host-bun/test-tooling/svelte-server-preload"]`) so no test imports `bun`. `svelte` is an optional peer. |
156
+ | `./test-tooling/unix-http` | Test tooling: Bun HTTP over declared Unix sockets for one isolated test realm (`createUnixHttpServer`, `createUnixHttpFetch`, `installUnixHttpTransport`); refuses undeclared origins and overlapping fetch owners with `test-unix-http-*` reasons. Re-exported by `@vibesdotdev/testing/bun/http`. |
157
+ | `./test-tooling/lazy-environment` | Test tooling: the environment, local-execution and HTTP-listener plugin factories with their root signatures, plus `createBunTestExecutionEnvironment({ scope, home })`, each loading this host on its first call. The door's graph excludes the restricted-execution supervisor, so a composition root can import it from any runner. Re-exported by `@vibesdotdev/testing/test-environment`. |
158
+
159
+ These are Bun host APIs. Generic consumers use the Runtime and Paths contracts
160
+ with their handed runtime so another selected provider remains usable.
161
+ The selected stdio context supports an exclusive stdout-or-stderr/console capture lease
162
+ through `getRuntimeStdioCapture(runtime)` (the lease's `target` names the stream),
163
+ and a bounded stdin read through `getRuntimeStdin(runtime)`. It preserves native byte forwarding,
164
+ backpressure and callback completion, and restores its owned hooks on close or
165
+ Runtime disposal. The calling feature supplies framing and rendering policy.
166
+ `getBunEnvironment` is for code that owns a Bun host; it intentionally refuses a
167
+ different environment with `UNAVAILABLE bun-environment-unavailable`. The
168
+ package's publish load probe runs under Bun.
169
+
170
+ Workspace MCP identity belongs to the synchronous, runtime-neutral
171
+ `@vibesdotdev/paths/workspace-mcp-host` contract. Its Shared hashing
172
+ implementation needs no native environment binding.
173
+
174
+ Plugin selection uses declared public exports and installed workspace links.
175
+ It never installs packages at startup or scans source for an implementation.
176
+ Writers preserve JSONC comments and sibling keys, refuse malformed input before
177
+ editing, and refresh member resolution after successful link/unlink writes.
178
+
179
+ Freshness has three outcomes: replaced, verified unchanged, and unknown.
180
+ Unreadable evidence is unknown. Process-table failures propagate, and missing
181
+ host facts produce typed refusals rather than an ambient fallback.
182
+
183
+ See [SPEC.md](SPEC.md) for the owner contract, [the package guide](https://docs.vibes.dev/runtime-environment-bun)
184
+ and [Vibes docs](https://docs.vibes.dev) for the framework contracts.
185
+
186
+ ## Verification
187
+
188
+ Buffered fallback scenarios resolve execution through an owned composed runtime,
189
+ the public execution plugin and Bun process ports. Direct backend checks remain.
190
+ The zero-timeout success assertion is preserved: kernel's
191
+ `src/execution/schemas/execute.ts:102` currently rejects zero with `.positive()`
192
+ before native spawn. Its owner must admit nonnegative integral timeouts;
193
+ execution-local already treats zero as no deadline. No host-side policy bypass
194
+ is installed. Pre-runtime reporting requires the explicit resources described above.
195
+
196
+
197
+ `bun run check` checks all source and tests through the no-emit `tsconfig.json`
198
+ and scripts through `tsconfig.check.json`. `bun run build` emits production JS
199
+ and declarations with `tsconfig.build.json` and stages native artifacts.
200
+ `bun run test` prepares native fixtures and runs the suites. `bun run test:native`
201
+ also compiles and runs the real bundled-host identity fixture outside the unit suite. The public package
202
+ contract test imports source entrypoints in-process and checks schemas, inferred
203
+ types, refusals, supervisor hash, ABI declarations and publication patterns;
204
+ it does not prove distributed tarball bytes. Release preflight owns that proof.
205
+ Native account-home scenarios select Darwin or Linux explicitly; PTY ownership
206
+ selects those supported hosts, with unsupported-host refusals in the adapter suite.
207
+ Pipe stdin cases run everywhere; POSIX device/closed-descriptor cases require POSIX.
208
+
209
+ ## License
210
+
211
+ MIT. See [LICENSE](LICENSE).
212
+
213
+
214
+ ## Native images without a host boot
215
+
216
+ Compose `nativeImagePlugin` from `@vibesdotdev/host-bun/native-image/plugin`
217
+ on a consumer runtime, then resolve `host/native-image`. The public
218
+ `@vibesdotdev/host-bun/native-image` contract exposes schemas and `NativeImage`:
219
+ `metadata({ data, maxPixels, autoOrient })` returns dimensions;
220
+ `encode(...)` applies validated native options and returns bytes plus readback
221
+ dimensions. No Bun objects cross the boundary and no unrelated host services
222
+ boot. See SPEC for fixed refusals and cause preservation. Media-bun composes
223
+ this plugin automatically and owns its domain policy.
@@ -0,0 +1,6 @@
1
+ import type { AppletServeHost } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
2
+ /** Transpile one TypeScript source to JavaScript (browser-servable; the host's `runtime/transpiler` too). */
3
+ export declare function transpileTypeScriptSource(source: string): string;
4
+ /** The Bun host's `applet/serve-host` implementation. */
5
+ export declare function createBunAppletServeHost(): AppletServeHost;
6
+ //# sourceMappingURL=applet-serve-host.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applet-serve-host.impl.bun.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.impl.bun.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACX,eAAe,EAGf,MAAM,kDAAkD,CAAC;AAqB1D,6GAA6G;AAC7G,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhE;AAmBD,yDAAyD;AACzD,wBAAgB,wBAAwB,IAAI,eAAe,CAsB1D"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * The Bun host's applet serve-host bindings (`applet/serve-host`, host `bun`).
3
+ *
4
+ * `Bun.serve` binds the local applet origin synchronously, `Bun.Transpiler`
5
+ * strips types from served project sources and lexes import specifiers, and
6
+ * `Bun.resolveSync` resolves bare package specifiers the way the module
7
+ * system does (exports maps and conditions), so the serve layer never guesses
8
+ * at paths. An unresolvable specifier traces one operator line
9
+ * (`VIBES_DEBUG_RUNTIME`) and resolves to `null`, per the kind contract.
10
+ */
11
+ import { settleNow, valueFreeFailure } from '@vibesdotdev/kernel';
12
+ import { createStylesheetCompiler } from "./stylesheet.compiler.js";
13
+ /** A bound local applet http host. */
14
+ function startAppletServeHost(options) {
15
+ const server = Bun.serve({
16
+ port: options.port,
17
+ hostname: options.hostname,
18
+ async fetch(request, server) {
19
+ const response = await options.fetch(request);
20
+ if (response.headers.get('content-type')?.split(';', 1)[0]?.trim().toLowerCase() === 'text/event-stream') {
21
+ server.timeout(request, 0);
22
+ }
23
+ return response;
24
+ }
25
+ });
26
+ return {
27
+ port: server.port ?? options.port,
28
+ stop: () => server.stop(true)
29
+ };
30
+ }
31
+ /** Transpile one TypeScript source to JavaScript (browser-servable; the host's `runtime/transpiler` too). */
32
+ export function transpileTypeScriptSource(source) {
33
+ return new Bun.Transpiler({ loader: 'ts' }).transformSync(source);
34
+ }
35
+ /** Every import/export/dynamic-import specifier in a JavaScript module. */
36
+ function scanModuleSpecifiers(code) {
37
+ const seen = new Set();
38
+ for (const entry of new Bun.Transpiler({ loader: 'js' }).scanImports(code))
39
+ seen.add(entry.path);
40
+ return [...seen];
41
+ }
42
+ /** Resolve a bare specifier from a directory to an absolute file path, or null. */
43
+ function resolveModuleSpecifier(specifier, fromDir, runtime) {
44
+ const settled = settleNow(() => Bun.resolveSync(specifier, fromDir));
45
+ if (settled.ok)
46
+ return settled.value;
47
+ // Declared contract: an unresolvable specifier is `null`, not a failure.
48
+ const failure = valueFreeFailure(settled.cause);
49
+ runtime.diagnostics.trace(`applet-serve-host: module specifier did not resolve (${specifier} from ${fromDir}; ${failure.code ?? failure.name})`);
50
+ return null;
51
+ }
52
+ /** The Bun host's `applet/serve-host` implementation. */
53
+ export function createBunAppletServeHost() {
54
+ const stylesheets = createStylesheetCompiler();
55
+ // This binding serves local development modules, including libraries published as Svelte source.
56
+ const modules = new Bun.Transpiler({ loader: 'ts', define: {
57
+ 'import.meta.env.DEV': 'true', 'process.env.NODE_ENV': '"development"'
58
+ } });
59
+ return {
60
+ compileStylesheet: options => stylesheets.compile(options),
61
+ startAppletServeHost(options) {
62
+ const listener = startAppletServeHost(options);
63
+ return {
64
+ port: listener.port,
65
+ stop() {
66
+ try {
67
+ listener.stop();
68
+ }
69
+ finally {
70
+ stylesheets.clear();
71
+ }
72
+ }
73
+ };
74
+ },
75
+ transpileTypeScriptSource: source => modules.transformSync(source),
76
+ scanModuleSpecifiers,
77
+ resolveModuleSpecifier
78
+ };
79
+ }
80
+ //# sourceMappingURL=applet-serve-host.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applet-serve-host.impl.bun.js","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAOpE,sCAAsC;AACtC,SAAS,oBAAoB,CAAC,OAAoC;IACjE,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QACl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;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Registers the Bun host's applet serve-host bindings under the runtime's
3
+ * `applet/serve-host` kind. The host owns the kind's registration on the
4
+ * runtimes it builds (as it owns the SQLite driver's): the kind is the
5
+ * runtime's frozen definition, so a second registration of it is a no-op.
6
+ * The bindings module loads only when the kind is first resolved.
7
+ */
8
+ import { type RuntimePlugin, type RuntimeRef } from '@vibesdotdev/kernel';
9
+ /** The Bun serve-host's descriptor. */
10
+ export declare const bunAppletServeHostDescriptor: {
11
+ id: string;
12
+ kind: "applet/serve-host";
13
+ name: string;
14
+ description: string;
15
+ host: string;
16
+ hardware: string[];
17
+ };
18
+ /** Register the kind (when absent), the Bun serve-host's descriptor and its lazy loader on `runtime`. */
19
+ export declare function registerBunAppletServeHost(runtime: RuntimeRef): void;
20
+ /** The same registration as a plugin, for a host composed from plugins. */
21
+ export declare const bunAppletServeHostPlugin: RuntimePlugin;
22
+ //# sourceMappingURL=applet-serve-host.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applet-serve-host.plugin.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAoD,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG5H,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;;;;;;;CAOxC,CAAC;AAEF,yGAAyG;AACzG,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAYpE;AAED,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,EAAE,aAMrC,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Registers the Bun host's applet serve-host bindings under the runtime's
3
+ * `applet/serve-host` kind. The host owns the kind's registration on the
4
+ * runtimes it builds (as it owns the SQLite driver's): the kind is the
5
+ * runtime's frozen definition, so a second registration of it is a no-op.
6
+ * The bindings module loads only when the kind is first resolved.
7
+ */
8
+ import { createRuntimeImplementation, createRuntimePlugin } from '@vibesdotdev/kernel';
9
+ import { APPLET_SERVE_HOST_KIND, appletServeHostKind } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
10
+ /** The Bun serve-host's descriptor. */
11
+ export const bunAppletServeHostDescriptor = {
12
+ id: 'applet-serve-host-bun',
13
+ kind: APPLET_SERVE_HOST_KIND,
14
+ name: 'Bun applet serve host',
15
+ description: 'Applet serve-host bindings over Bun.serve, Bun.Transpiler and Bun.resolveSync',
16
+ host: 'bun',
17
+ hardware: ['consumer']
18
+ };
19
+ /** Register the kind (when absent), the Bun serve-host's descriptor and its lazy loader on `runtime`. */
20
+ export function registerBunAppletServeHost(runtime) {
21
+ if (!runtime.hasKind(APPLET_SERVE_HOST_KIND))
22
+ runtime.registerKind(appletServeHostKind);
23
+ runtime.registerDescriptor(APPLET_SERVE_HOST_KIND, bunAppletServeHostDescriptor);
24
+ runtime.registerLoader(APPLET_SERVE_HOST_KIND, bunAppletServeHostDescriptor.id, async () => {
25
+ const { createBunAppletServeHost } = await import("./applet-serve-host.impl.bun.js");
26
+ return createRuntimeImplementation({
27
+ kind: APPLET_SERVE_HOST_KIND,
28
+ id: bunAppletServeHostDescriptor.id,
29
+ constraint: { hardware: ['consumer'] },
30
+ implementation: createBunAppletServeHost()
31
+ });
32
+ });
33
+ }
34
+ /** The same registration as a plugin, for a host composed from plugins. */
35
+ export const bunAppletServeHostPlugin = createRuntimePlugin({
36
+ id: 'applet-serve-host-bun',
37
+ name: 'Bun applet serve host',
38
+ onRegister(runtime) {
39
+ registerBunAppletServeHost(runtime);
40
+ }
41
+ });
42
+ //# sourceMappingURL=applet-serve-host.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applet-serve-host.plugin.js","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,2BAA2B,EAAE,mBAAmB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host's implementation of the runtime's applet serve-host kind
3
+ * (`applet/serve-host`) and the plugin that registers it.
4
+ */
5
+ export { createBunAppletServeHost } from './applet-serve-host.impl.bun.ts';
6
+ export { bunAppletServeHostDescriptor, bunAppletServeHostPlugin, registerBunAppletServeHost } from './applet-serve-host.plugin.ts';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The Bun host's implementation of the runtime's applet serve-host kind
3
+ * (`applet/serve-host`) and the plugin that registers it.
4
+ */
5
+ export { createBunAppletServeHost } from "./applet-serve-host.impl.bun.js";
6
+ export { bunAppletServeHostDescriptor, bunAppletServeHostPlugin, registerBunAppletServeHost } from "./applet-serve-host.plugin.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/applet-serve-host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type AppletStylesheetCompileOptions } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
2
+ /** One selected host's cache, released with its listener. Compiler libraries load only on use. */
3
+ export declare function createStylesheetCompiler(): {
4
+ clear(): void;
5
+ compile(options: AppletStylesheetCompileOptions): Promise<string>;
6
+ };
7
+ //# sourceMappingURL=stylesheet.compiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stylesheet.compiler.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/stylesheet.compiler.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,KAAK,8BAA8B,EAEnC,MAAM,kDAAkD,CAAC;AA0B1D,kGAAkG;AAClG,wBAAgB,wBAAwB;;qBAKf,8BAA8B,GAAG,OAAO,CAAC,MAAM,CAAC;EA4CxE"}
@@ -0,0 +1,63 @@
1
+ import { CapabilityError, CaughtFailureSchema, isCapabilityError } from '@vibesdotdev/kernel';
2
+ import { AppletStyleContentSchema, AppletStylesheetSourceSchema } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
3
+ function sameSheet(left, right) {
4
+ return left.path === right.path && left.base === right.base && left.content === right.content;
5
+ }
6
+ function sameSources(left, right) {
7
+ return left.length === right.length && left.every((source, index) => {
8
+ const next = right[index];
9
+ return next !== undefined && source.path === next.path && source.extension === next.extension && source.content === next.content;
10
+ });
11
+ }
12
+ /** One selected host's cache, released with its listener. Compiler libraries load only on use. */
13
+ export function createStylesheetCompiler() {
14
+ const cache = new Map();
15
+ return {
16
+ clear() { cache.clear(); },
17
+ async compile(options) {
18
+ const entry = AppletStylesheetSourceSchema.parse(options.entry);
19
+ const sources = options.sources.map(source => AppletStyleContentSchema.parse(source));
20
+ const held = cache.get(entry.path);
21
+ if (held && sameSheet(held.entry, entry) && sameSources(held.sources, sources)) {
22
+ const current = await Promise.all(held.imports.map(async (imported) => {
23
+ const source = AppletStylesheetSourceSchema.parse(await options.loadStylesheet(imported.id, imported.base));
24
+ return sameSheet(imported.source, source);
25
+ }));
26
+ if (current.every(Boolean))
27
+ return held.css;
28
+ }
29
+ try {
30
+ const [{ compile }, { Scanner }] = await Promise.all([import('tailwindcss'), import('@tailwindcss/oxide')]);
31
+ const imports = [];
32
+ const compiler = await compile(entry.content, {
33
+ base: entry.base,
34
+ from: entry.path,
35
+ async loadStylesheet(id, base) {
36
+ const source = AppletStylesheetSourceSchema.parse(await options.loadStylesheet(id, base));
37
+ imports.push({ id, base, source });
38
+ return source;
39
+ },
40
+ async loadModule(id) {
41
+ throw new CapabilityError('The applet stylesheet compiler does not support JavaScript plugins or configuration modules.', 'UNAVAILABLE', {
42
+ reason: 'applet-stylesheet-plugin-unsupported', details: { id }
43
+ });
44
+ }
45
+ });
46
+ // scanFiles receives supplied texts only. @source directives never trigger host filesystem scans.
47
+ const candidates = new Scanner({ sources: [] }).scanFiles(sources.map(({ content, extension }) => ({ content, extension })));
48
+ const css = compiler.build(candidates);
49
+ cache.set(entry.path, { entry, sources, imports, css });
50
+ return css;
51
+ }
52
+ catch (cause) {
53
+ const failure = CaughtFailureSchema.parse(cause);
54
+ if (isCapabilityError(failure))
55
+ throw failure;
56
+ throw new CapabilityError('The admitted applet stylesheet could not be compiled.', 'INVALID_INPUT', {
57
+ reason: 'applet-stylesheet-invalid', cause: failure
58
+ });
59
+ }
60
+ }
61
+ };
62
+ }
63
+ //# sourceMappingURL=stylesheet.compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stylesheet.compiler.js","sourceRoot":"","sources":["../../src/applet-serve-host/stylesheet.compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAI5B,MAAM,kDAAkD,CAAC;AAe1D,SAAS,SAAS,CAAC,IAA4B,EAAE,KAA6B;IAC7E,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAAC;AAC/F,CAAC;AAED,SAAS,WAAW,CAAC,IAAmC,EAAE,KAAoC;IAC7F,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;Q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AO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC7H,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;gBACvC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;gBACxD,OAAO,GAAG,CAAC;YACZ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACjD,IAAI,iBAAiB,CAAC,OAAO,CAAC;oBAAE,MAAM,OAAO,CAAC;gBAC9C,MAAM,IAAI,eAAe,CAAC,uDAAuD,EAAE,eAAe,EAAE;oBACnG,MAAM,EAAE,2BAA2B,EAAE,KAAK,EAAE,OAAO;iBACnD,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { CapabilityError, type RuntimeRef } from '@vibesdotdev/kernel';
2
+ export interface AtlasMigrationNamespaceEvidence {
3
+ expectedMigrationIds: string[];
4
+ registeredMigrationIds: string[];
5
+ missingMigrationIds: string[];
6
+ isStrictSubset: boolean;
7
+ repairAttempted?: boolean;
8
+ }
9
+ export declare class AtlasMigrationNamespacePoisonedError extends CapabilityError {
10
+ readonly evidence: AtlasMigrationNamespaceEvidence;
11
+ constructor(evidence: AtlasMigrationNamespaceEvidence);
12
+ }
13
+ /**
14
+ * Register the declared Atlas migrations on this host.
15
+ *
16
+ * No kind, or no `workspace.atlas-migrations` descriptor, is absence: the host
17
+ * has nothing to register and does not refuse. Called from the Bun plugin's
18
+ * `onActivate`, after discovery, so a later feature plugin's descriptor is visible.
19
+ */
20
+ export declare function registerBunAtlasMigrations(runtime: RuntimeRef): void;
21
+ //# sourceMappingURL=register-atlas-host-migrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-atlas-host-migrations.d.ts","sourceRoot":"","sources":["../../src/atlas-migrations/register-atlas-host-migrations.ts"],"names":[],"mappings":"AAeA,OAAO,EACN,eAAe,EAIf,KAAK,UAAU,EACf,MAAM,qBAAqB,CAAC;AAW7B,MAAM,WAAW,+BAA+B;IAC/C,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,qBAAa,oCAAqC,SAAQ,eAAe;IACxE,QAAQ,CAAC,QAAQ,EAAE,+BAA+B,CAAC;gBAEvC,QAAQ,EAAE,+BAA+B;CAsBrD;AAgGD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAiCpE"}