@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
package/dist/index.js ADDED
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Bun Runtime Environment Package
3
+ *
4
+ * Provides Bun-specific implementations for:
5
+ * - runtime/environment: BunEnvironment
6
+ * - runtime/loader: the host loader port (module import + filesystem mechanism)
7
+ * - runtime/scope: Built from captured env
8
+ * - runtime/env: Env access (credentials resolve through runtime.resolveCredential)
9
+ */
10
+ import { CapabilityError, settle, composeHostEnv, createRuntimePlugin, registerRuntimeEnvironment, runtimeHostIdentityContextDescriptor, runtimePackagePluginsContextDescriptor, runtimeHostSignalsContextDescriptor, runtimeScopedValuesContextDescriptor, runtimeStdioContextDescriptor } from '@vibesdotdev/kernel';
11
+ import contextPlugin from '@vibesdotdev/kernel/context/context.plugin';
12
+ import { getVibesClient, runtimeClientKind } from '@vibesdotdev/kernel/client';
13
+ import runtimeClientPlugin from '@vibesdotdev/kernel/client/plugin';
14
+ import { hostTelemetryPlugin } from "./telemetry/telemetry.plugin.js";
15
+ import { BunHostClient, bunHostClientDescriptor } from "./host-client.impl.bun.js";
16
+ export { BunHostClient, bunHostClientDescriptor } from "./host-client.impl.bun.js";
17
+ import { processKind } from '@vibesdotdev/kernel/process';
18
+ import { runtimeAuthzPlugin } from '@vibesdotdev/kernel/authz/plugin';
19
+ import { RUNTIME_HOST_COMMAND_KIND, runtimeHostCommandKind, socketKind } from '@vibesdotdev/kernel';
20
+ import { BunEnvironment } from "./bun-environment.impl.bun.js";
21
+ import { BunRuntimeSocketService } from "./services/runtime-socket.impl.bun.js";
22
+ import { PATH_ROOTS_DESCRIPTOR_ID, PATH_ROOTS_ID, createPathRoots, createPathRootsDescriptor, getPathRoots, pathRootsKind, runtimePathKind } from '@vibesdotdev/paths';
23
+ import { bunLocalExecutionPlugin } from "./local-execution.impl.bun.js";
24
+ import { OwnedWorkspaceBindingSchema } from '@vibesdotdev/kernel/schemas/bootstrap';
25
+ import { BunHostResourcesSchema } from "./schemas/host-resources.js";
26
+ export { BunHostResourcesSchema } from "./schemas/host-resources.js";
27
+ export { bunNativeLaunchManifestPath } from "./local-execution.impl.bun.js";
28
+ import { createBunRuntimeProcess } from "./process/runtime-process.impl.bun.js";
29
+ import { createBunSessionIdReader } from "./session-members.impl.bun.js";
30
+ import { selfSpawnUndeclared } from "./services/self-spawn.impl.bun.js";
31
+ import bunEnvironmentDocs from "./docs/runtime-environment-bun.docs.descriptor.js";
32
+ import { registerBunHttpListener } from "./http-listener.impl.bun.js";
33
+ import { BunRuntimeHttpListener } from "./services/runtime-http-listener.impl.bun.js";
34
+ import { BunRuntimeStdio } from "./services/runtime-stdio.impl.bun.js";
35
+ import { bunLoggingPlugin } from "./logging/logging.plugin.js";
36
+ import { registerBunHostFileSystem } from "./filesystem/register.js";
37
+ import { BunRuntimeHostSignals } from "./services/runtime-host-signals.impl.bun.js";
38
+ import { createBunRuntimeHostIdentity } from "./services/host-identity.capability.bun.js";
39
+ import { createBunRuntimePackagePlugins } from "./package-plugins/package-plugins.capability.bun.js";
40
+ import { createBunRuntimeScopedValues } from "./services/runtime-scoped-values.impl.bun.js";
41
+ import { registerBunAppletServeHost } from "./applet-serve-host/applet-serve-host.plugin.js";
42
+ import bunNativeLibraryPlugin from "./native-library.consumer.plugin.js";
43
+ import { bunNativeNetworkPlugin } from "./native-network/native-network.plugin.js";
44
+ import { registerBunTranspiler } from "./transpiler/transpiler.plugin.js";
45
+ import { registerBunRuntimePluginHost } from "./runtime-plugin-host/runtime-plugin-host.plugin.js";
46
+ export { bootRuntimeThread } from "./runtime-plugin-host/runtime-thread.impl.bun.js";
47
+ import { registerBunSqliteDriver } from "./sqlite-driver/sqlite-driver.plugin.js";
48
+ import { registerBunServeStall } from "./serve-stall.plugin.js";
49
+ import { registerBunCacheRedisConnector } from "./cache-redis/cache-redis-connector.plugin.js";
50
+ import { registerBunAtlasMigrations } from "./atlas-migrations/register-atlas-host-migrations.js";
51
+ /** Host commands answered from one environment's validated host facts. */
52
+ function createBunHostCommands(environment) {
53
+ return {
54
+ selfSpawnArgv(consumer) {
55
+ const argv = environment.hostFacts().selfSpawn?.argv;
56
+ const [command, ...args] = argv ?? [];
57
+ if (command !== undefined)
58
+ return [command, ...args];
59
+ throw selfSpawnUndeclared(consumer);
60
+ },
61
+ scriptRuntimeArgv() {
62
+ const resolved = environment.scriptRuntimeArgv();
63
+ return { argv: resolved.argv, env: resolved.env };
64
+ }
65
+ };
66
+ }
67
+ function installBunEnvironment(runtime, options, httpListener, signals, stdio, environment, createOwnedWorkspaceEnvironment) {
68
+ // The environment's own children compose from the runtime it registered on.
69
+ environment.bindChildEnv(() => composeHostEnv(runtime));
70
+ registerBunHttpListener(runtime, httpListener);
71
+ runtime.registerDescriptor('context', runtimeStdioContextDescriptor);
72
+ runtime.registerLoader('context', runtimeStdioContextDescriptor.id, () => Promise.resolve({ impl: stdio }));
73
+ runtime.registerDescriptor('context', runtimeHostSignalsContextDescriptor);
74
+ runtime.registerLoader('context', runtimeHostSignalsContextDescriptor.id, () => Promise.resolve({ impl: signals }));
75
+ const values = createBunRuntimeScopedValues();
76
+ runtime.registerDescriptor('context', runtimeScopedValuesContextDescriptor);
77
+ runtime.registerLoader('context', runtimeScopedValuesContextDescriptor.id, () => Promise.resolve({ impl: values }));
78
+ const hostIdentity = createBunRuntimeHostIdentity(runtime);
79
+ runtime.registerDescriptor('context', runtimeHostIdentityContextDescriptor);
80
+ runtime.registerLoader('context', runtimeHostIdentityContextDescriptor.id, () => Promise.resolve({ impl: hostIdentity }));
81
+ const packagePlugins = createBunRuntimePackagePlugins(runtime);
82
+ runtime.registerDescriptor('context', runtimePackagePluginsContextDescriptor);
83
+ runtime.registerLoader('context', runtimePackagePluginsContextDescriptor.id, () => Promise.resolve({ impl: packagePlugins }));
84
+ // Paths boot before config/storage. Host mechanics come from this environment;
85
+ // path layout comes from @vibesdotdev/paths; the surface supplies only explicit
86
+ // selection. Source/public mode is deliberately irrelevant: absent an explicit
87
+ // override every local surface uses ~/.vibes.
88
+ if (!runtime.hasKind('paths/runtime-path'))
89
+ runtime.registerKind(runtimePathKind);
90
+ if (!runtime.hasKind(PATH_ROOTS_ID))
91
+ runtime.registerKind(pathRootsKind);
92
+ const roots = createPathRoots({
93
+ runtimePath: environment.runtimePath,
94
+ userHome: environment.hostFacts().user.home,
95
+ env: environment.getEnvSnapshot(),
96
+ ...options.paths
97
+ });
98
+ const rootsDescriptor = createPathRootsDescriptor(roots);
99
+ runtime.registerDescriptor(PATH_ROOTS_ID, rootsDescriptor);
100
+ runtime.registerLoader(PATH_ROOTS_ID, PATH_ROOTS_DESCRIPTOR_ID, () =>
101
+ // Resolve the current descriptor at call time.
102
+ Promise.resolve({ impl: getPathRoots(runtime) }));
103
+ // Constitutional registration: the low-level path operations (owned by the host)
104
+ // are provided under the kind id defined by @vibesdotdev/paths.
105
+ // paths queries this kind and stays completely agnostic to which
106
+ // runtime-environment-* package is active or what its classes look like.
107
+ //
108
+ // Register both the descriptor (so `query.withId('bun').resolve()` works)
109
+ // and the loader (so the impl is lazily produced when resolved).
110
+ runtime.registerDescriptor('paths/runtime-path', {
111
+ id: 'bun',
112
+ kind: 'paths/runtime-path',
113
+ name: 'Bun Runtime Path',
114
+ description: 'Bun host implementation of low-level path operations'
115
+ });
116
+ runtime.registerLoader('paths/runtime-path', 'bun', () => Promise.resolve({ impl: environment.runtimePath }));
117
+ // Constitutional registration: runtime/socket (owned by the host environment)
118
+ if (!runtime.hasKind('runtime/process'))
119
+ runtime.registerKind(processKind);
120
+ runtime.registerDescriptor('runtime/process', {
121
+ kind: 'runtime/process', id: 'bun-process-service', name: 'Bun native process service',
122
+ hardware: ['consumer']
123
+ });
124
+ // Each probe runs with this runtime's host set (C15), composed when it runs.
125
+ const bunRuntimeProcess = createBunRuntimeProcess(() => environment.getEnvSnapshot(), {
126
+ platform: environment.getPlatform(),
127
+ readSessionId: createBunSessionIdReader({ platform: environment.getPlatform(), lifecycle: runtime.lifecycle }),
128
+ childEnv: () => composeHostEnv(runtime),
129
+ lifecycle: runtime.lifecycle,
130
+ hostCwd: () => environment.getCwd(),
131
+ probeTimeoutMs: options.processProbeTimeoutMs
132
+ });
133
+ runtime.registerLoader('runtime/process', 'bun-process-service', async () => ({
134
+ impl: bunRuntimeProcess
135
+ }));
136
+ // Bind local endpoint identity to the host-selected home/profile.
137
+ const bunRuntimeSocket = new BunRuntimeSocketService(undefined, roots.activeHome, {
138
+ platform: environment.getPlatform(),
139
+ lifecycle: runtime.lifecycle,
140
+ childEnv: () => composeHostEnv(runtime),
141
+ probeTimeoutMs: options.socketProbeTimeoutMs
142
+ });
143
+ if (!runtime.hasKind('runtime/socket'))
144
+ runtime.registerKind(socketKind);
145
+ runtime.registerDescriptor('runtime/socket', bunRuntimeSocket.descriptor);
146
+ runtime.registerLoader('runtime/socket', bunRuntimeSocket.descriptor.id, () => Promise.resolve({ impl: bunRuntimeSocket }));
147
+ if (!runtime.hasKind(RUNTIME_HOST_COMMAND_KIND))
148
+ runtime.registerKind(runtimeHostCommandKind);
149
+ runtime.registerDescriptor(RUNTIME_HOST_COMMAND_KIND, {
150
+ id: 'bun',
151
+ kind: RUNTIME_HOST_COMMAND_KIND,
152
+ name: 'Bun host commands',
153
+ hardware: ['consumer']
154
+ });
155
+ runtime.registerLoader(RUNTIME_HOST_COMMAND_KIND, 'bun', () => Promise.resolve({ impl: createBunHostCommands(environment) }));
156
+ // The applet serve-host kind, implemented over Bun.serve/Transpiler/resolveSync (loaded on first resolve).
157
+ registerBunAppletServeHost(runtime);
158
+ // The host's TypeScript transpiler, over the runtime's base (the source as written).
159
+ registerBunTranspiler(runtime);
160
+ // Runtime-plugin's host doors (execution worker, hot reload, socket reclaim).
161
+ registerBunRuntimePluginHost(runtime, { createOwnedWorkspaceEnvironment });
162
+ // LocalDB's SQLite driver kind, implemented over bun:sqlite (loaded on first resolve).
163
+ registerBunSqliteDriver(runtime);
164
+ // A child that SIGKILLs this process when the serve pid file stops heartbeating.
165
+ registerBunServeStall(runtime);
166
+ // Cache's Redis connector kind, implemented over Bun's RedisClient (loaded on first resolve).
167
+ registerBunCacheRedisConnector(runtime);
168
+ return environment;
169
+ }
170
+ /** Configured Bun environment plugin selected by consumer runtime hosts. */
171
+ export function createRuntimeEnvironmentBunPlugin(options, capture) {
172
+ return createBunEnvironmentPlugin(options, capture);
173
+ }
174
+ function createBunEnvironmentPlugin(options, capture) {
175
+ // One local-execution owner per host, configured by the host's declaration;
176
+ // this environment never reconstructs its descriptor or loader.
177
+ const localExecution = bunLocalExecutionPlugin(options.restrictedExecution, options.heldLaunch, options.nativeLaunch);
178
+ const hostResources = options.hostResources === undefined ? undefined : BunHostResourcesSchema.parse(options.hostResources);
179
+ return createRuntimePlugin({
180
+ id: 'runtime-environment-bun',
181
+ name: 'Runtime Environment — Bun',
182
+ description: 'Bun host identity, paths, loader, and local execution bindings.',
183
+ descriptors: [bunEnvironmentDocs],
184
+ async onRegister(runtime) {
185
+ if (options.nativeLaunch !== undefined && runtime.hasPlugin(localExecution.id)) {
186
+ throw new CapabilityError('Native execution admission conflicts with the already registered local provider.', 'CONFLICT', {
187
+ reason: 'native-execution-owner-conflict', retryable: false, details: { plugin: localExecution.id }
188
+ });
189
+ }
190
+ if (options.heldLaunch !== undefined && runtime.hasPlugin(localExecution.id)) {
191
+ throw new CapabilityError('Held execution admission conflicts with the already registered local provider.', 'CONFLICT', {
192
+ reason: 'held-execution-owner-conflict', retryable: false, details: { plugin: localExecution.id }
193
+ });
194
+ }
195
+ // A declared restricted admission is never shadowed: plugin registration
196
+ // is first-wins by id, so an owner another plugin already registered
197
+ // would silently drop it.
198
+ if (options.restrictedExecution && runtime.hasPlugin(localExecution.id)) {
199
+ throw new CapabilityError(`This host declares restricted execution, but ${localExecution.id} is already registered without it.`, 'CONFLICT', { reason: 'restricted-execution-owner-conflict', retryable: false, details: { plugin: localExecution.id } });
200
+ }
201
+ if (!runtime.hasKind('context'))
202
+ await runtime.registerPlugin(contextPlugin);
203
+ const environment = new BunEnvironment(options, hostResources, capture);
204
+ registerRuntimeEnvironment(runtime, environment);
205
+ await runtime.registerPlugin(runtimeClientPlugin);
206
+ runtime.registerDescriptor(runtimeClientKind.id, bunHostClientDescriptor);
207
+ runtime.registerLoader(runtimeClientKind.id, bunHostClientDescriptor.id, async () => ({
208
+ impl: class extends BunHostClient {
209
+ constructor(descriptor, context) {
210
+ super(descriptor, context, environment.resources);
211
+ }
212
+ }
213
+ }));
214
+ const host = await getVibesClient(bunHostClientDescriptor.id, runtime);
215
+ const registration = await settle(async () => {
216
+ await runtime.registerPlugin(createRuntimePlugin({
217
+ id: 'bun-host-lifetime',
218
+ name: 'Bun host lifetime',
219
+ onDispose: () => host.dispose()
220
+ }));
221
+ installBunEnvironment(runtime, options, host.httpListener, host.signals, host.stdio, environment, async (input) => {
222
+ const parsed = OwnedWorkspaceBindingSchema.safeParse(input);
223
+ if (!parsed.success)
224
+ throw new CapabilityError('Owned workspace binding is malformed.', 'INVALID_INPUT', { reason: 'runtime-owned-workspace-invalid' });
225
+ const paths = environment.runtimePath;
226
+ const canonical = (directory) => {
227
+ if (!paths.isAbsolute(directory) || environment.loader.stat?.(directory) !== 'directory') {
228
+ throw new CapabilityError('Owned workspace roots must be existing absolute directories.', 'INVALID_INPUT', { reason: 'runtime-owned-workspace-invalid' });
229
+ }
230
+ const resolved = environment.loader.realPath?.(directory);
231
+ if (!resolved)
232
+ throw new CapabilityError('This host cannot admit canonical workspace roots.', 'UNAVAILABLE', { reason: 'runtime-owned-workspace-unavailable' });
233
+ return resolved;
234
+ };
235
+ const binding = {
236
+ root: canonical(parsed.data.root), cwd: canonical(parsed.data.cwd), moduleRoot: canonical(parsed.data.moduleRoot)
237
+ };
238
+ for (const directory of [binding.cwd, binding.moduleRoot]) {
239
+ const relative = paths.relative(binding.root, directory);
240
+ if (paths.isAbsolute(relative) || relative === '..' || relative.startsWith('../') || relative.startsWith('..\\')) {
241
+ throw new CapabilityError('Owned cwd and module root must remain inside the retained workspace.', 'INVALID_INPUT', { reason: 'runtime-owned-workspace-invalid' });
242
+ }
243
+ }
244
+ const facts = environment.hostFacts();
245
+ const roots = getPathRoots(runtime);
246
+ return createBunEnvironmentPlugin({
247
+ ...options,
248
+ scope: { ...runtime.declaredScope, workspace: { ...runtime.declaredScope.workspace, root: binding.root } },
249
+ host: {
250
+ root: binding.moduleRoot,
251
+ rootCustody: true,
252
+ selfSpawn: facts.selfSpawn?.source ? { argv: [...facts.selfSpawn.argv], source: facts.selfSpawn.source } : undefined,
253
+ version: environment.hostVersion() ?? undefined
254
+ },
255
+ paths: {
256
+ vibesHome: roots.vibesHome, profileName: roots.profileName,
257
+ configDir: roots.configDir, logDir: roots.logDir, tempDir: roots.tempDir, origin: roots.origin
258
+ }
259
+ }, { env: environment.getEnvSnapshot(), cwd: binding.cwd });
260
+ });
261
+ await runtime.registerPlugin(hostTelemetryPlugin());
262
+ // The host's log files: Logging's file outputs over this host's own file primitives, for every Bun-hosted runtime.
263
+ await runtime.registerPlugin(bunLoggingPlugin(options.logging));
264
+ // The filesystem kind with this host's adapter (LocalDB's database files resolve through it),
265
+ // unless the host declares it composes its own filesystem provider.
266
+ if (options.hostFileSystem !== false)
267
+ await registerBunHostFileSystem(runtime);
268
+ // Execution binds the selected environment during registration, so its
269
+ // canonical environment and native ports must already be registered.
270
+ // D-RC08: authz/policy still composes before execution (D37).
271
+ await runtime.registerPlugin(runtimeAuthzPlugin);
272
+ await runtime.registerPlugin(localExecution);
273
+ await runtime.registerPlugin(bunNativeLibraryPlugin);
274
+ await runtime.registerPlugin(bunNativeNetworkPlugin);
275
+ });
276
+ if (!registration.ok) {
277
+ const cleanup = await settle(() => host.dispose());
278
+ if (!cleanup.ok)
279
+ throw new AggregateError([registration.cause, cleanup.cause], 'Bun host registration and cleanup failed.', { cause: registration.cause });
280
+ throw registration.cause;
281
+ }
282
+ },
283
+ onActivate(runtime) {
284
+ registerBunAtlasMigrations(runtime);
285
+ }
286
+ });
287
+ }
288
+ /**
289
+ * Get the Bun environment implementation.
290
+ * Throws if Bun environment wasn't registered.
291
+ */
292
+ export function getBunEnvironment(runtime) {
293
+ const env = runtime.environment;
294
+ if (!(env instanceof BunEnvironment)) {
295
+ throw new CapabilityError('The supplied runtime has no Bun environment.', 'UNAVAILABLE', {
296
+ reason: 'bun-environment-unavailable',
297
+ retryable: false,
298
+ details: { environment: env.id }
299
+ });
300
+ }
301
+ return env;
302
+ }
303
+ export { BunEnvironment };
304
+ export { createBunHostLoader } from "./host-loader.impl.bun.js";
305
+ export { buildWorkspaceEnv } from "./services/workspace-env.js";
306
+ export { hasLiveHostCredentials, processStartProbe } from "./host-credentials.js";
307
+ export { bunRuntimePath } from "./services/runtime-path.impl.bun.js";
308
+ export { SHIM_CHANNEL_KEYS } from "./host-channel.impl.bun.js";
309
+ // Self-spawn argv (Bun host concern — not universal runtime core)
310
+ export { computeSelfSpawnArgv, readSelfSpawnArgv, readSelfSpawnSource, requireSelfSpawnArgv, resolveBunArgv } from "./services/self-spawn.impl.bun.js";
311
+ // Compatibility: workspace/src/daemon/__tests__/owned.ts still imports the class
312
+ // here. New callers use ./services/runtime-socket or runtime/socket resolution.
313
+ export { BunRuntimeSocketService, normalizeLocalSocketPath } from "./services/runtime-socket.impl.bun.js";
314
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,oCAAoC,EAAE,sCAAsC,EAAE,mCAAmC,EAAE,oCAAoC,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACvT,OAAO,aAAa,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AACpE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AO,GAAG,CAAC;AACZ,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACN,sBAAsB,EACtB,iBAAiB,EAGjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAGrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,kEAAkE;AAClE,OAAO,EACN,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,MAAM,mCAAmC,CAAC;AAG3C,iFAAiF;AACjF,gFAAgF;AAChF,OAAO,EACN,uBAAuB,EACvB,wBAAwB,EACxB,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The local execution owner a Bun host composes: `runtime-execution-local`,
3
+ * configured with the Bun host's buffered-capture backend (the EBADF
4
+ * compatibility Codex's adapter owns) and, when the host declares it, the
5
+ * restricted-execution admission. The capability is declared because this is
6
+ * a Bun host, never inferred from an engine name or `process.versions`.
7
+ */
8
+ import { type BufferedCaptureFactory, type ProcessHost, type ProcessHostHeldLaunch, type RuntimeExecutionLocalPluginOptions } from '@vibesdotdev/execution-local';
9
+ import { type RuntimePlugin, type RuntimeRef } from '@vibesdotdev/kernel';
10
+ import { type HeldLaunchArtifactsLoader } from './held-launch/execution.impl.bun.ts';
11
+ import { type RestrictedExecutorOptions } from './restricted-execute.darwin.impl.bun.ts';
12
+ /** The Bun host's buffered-capture backend, loaded when a capture first needs it. */
13
+ export declare const bunBufferedCapture: BufferedCaptureFactory;
14
+ /** The Bun host's PTY opener (Bun.Terminal; forkpty through a Node-hosted node-pty on Darwin), loaded when the first session needs it. */
15
+ export declare const bunOpenPtySession: ProcessHost['openPtySession'];
16
+ /**
17
+ * The Bun host's held-launch capability: the owned-session routing of `session()` and
18
+ * caller-owned `spawn()` over its `bun:ffi` artifact binding. A harness binds a scripted
19
+ * native library by passing its own loader.
20
+ */
21
+ export declare function bunHeldLaunch(loadArtifacts?: HeldLaunchArtifactsLoader): ProcessHostHeldLaunch;
22
+ /**
23
+ * This host's required `ProcessHost` members: its own path mechanics, spawn
24
+ * (the spawn base over Bun's launch, descriptors and signals) and command
25
+ * discovery (the PATH search base over Bun's filesystem probes), and its PTY
26
+ * opener. A composition or harness that wants none of the optional members
27
+ * (buffered capture, restricted execution, held launch, session reader) starts
28
+ * from this one.
29
+ */
30
+ export declare function bunNativeProcessHost(): ProcessHost;
31
+ /**
32
+ * The process port this Bun host hands local execution: its native members
33
+ * ({@link bunNativeProcessHost}) and the members only this host has, its own
34
+ * adapters for buffered capture, restricted execution, held launch and the
35
+ * native session reader.
36
+ */
37
+ export declare function bunProcessHost(restrictedBounds?: RestrictedExecutorOptions['bounds']): ProcessHost;
38
+ /** Called only when the selected local provider needs an enforced native launch. */
39
+ export declare function bunNativeLaunchManifestPath(runtime: RuntimeRef): Promise<string>;
40
+ /** The one local execution plugin for a Bun host (no restricted admission or held launch unless declared). */
41
+ export declare function bunLocalExecutionPlugin(restricted?: {
42
+ writableBase: string;
43
+ bounds?: RestrictedExecutorOptions['bounds'];
44
+ }, heldLaunch?: {
45
+ manifestPath: string;
46
+ }, nativeLaunch?: RuntimeExecutionLocalPluginOptions['nativeLaunch']): RuntimePlugin;
47
+ //# sourceMappingURL=local-execution.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-execution.impl.bun.d.ts","sourceRoot":"","sources":["../src/local-execution.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEN,KAAK,sBAAsB,EAE3B,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,kCAAkC,EAEvC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,UAAU,EAGf,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAuB,KAAK,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC1G,OAAO,EAA2G,KAAK,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAKlM,qFAAqF;AACrF,eAAO,MAAM,kBAAkB,EAAE,sBACyC,CAAC;AAE3E,0IAA0I;AAC1I,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,gBAAgB,CACD,CAAC;AAc5D;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,aAAa,GAAE,yBAA4C,GAAG,qBAAqB,CAEhH;AAMD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,CAOlD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC,GAAG,WAAW,CAWlG;AAUD,oFAAoF;AACpF,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CA2CtF;AAED,8GAA8G;AAC9G,wBAAgB,uBAAuB,CACtC,UAAU,CAAC,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAA;CAAE,EACnF,UAAU,CAAC,EAAE;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,EACrC,YAAY,CAAC,EAAE,kCAAkC,CAAC,cAAc,CAAC,GAC/D,aAAa,CAOf"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * The local execution owner a Bun host composes: `runtime-execution-local`,
3
+ * configured with the Bun host's buffered-capture backend (the EBADF
4
+ * compatibility Codex's adapter owns) and, when the host declares it, the
5
+ * restricted-execution admission. The capability is declared because this is
6
+ * a Bun host, never inferred from an engine name or `process.versions`.
7
+ */
8
+ import { createRuntimeExecutionLocalPlugin } from '@vibesdotdev/execution-local';
9
+ import { CapabilityError } from '@vibesdotdev/kernel';
10
+ import { fileURLToPath } from 'node:url';
11
+ import { isAbsolute, resolve } from 'node:path';
12
+ import { HeldLaunchExecution } from "./held-launch/execution.impl.bun.js";
13
+ import { captureRestrictedSupervisor, createRestrictedDarwinExecutor, executeRestrictedDarwin, PINNED_SUPERVISOR } from "./restricted-execute.darwin.impl.bun.js";
14
+ import { createBunSessionIdReader, hostSessionMembers } from "./session-members.impl.bun.js";
15
+ import { bunSpawnProcess } from "./process/spawn.impl.bun.js";
16
+ import { bunWhichCommand } from "./process/which.impl.bun.js";
17
+ /** The Bun host's buffered-capture backend, loaded when a capture first needs it. */
18
+ export const bunBufferedCapture = async () => (await import("./buffered-capture.js")).createBunBufferedCaptureBackend();
19
+ /** The Bun host's PTY opener (Bun.Terminal; forkpty through a Node-hosted node-pty on Darwin), loaded when the first session needs it. */
20
+ export const bunOpenPtySession = async () => (await import("./pty.adapter.impl.bun.js")).openPtySession;
21
+ /** The Bun binding of the held-launch artifacts (`bun:ffi`), loaded when the first launch needs it. */
22
+ const loadBunArtifacts = async (manifestPath) => {
23
+ try {
24
+ return (await import("./held-launch/library.impl.bun.js")).openHeldLaunchArtifacts({ manifestPath });
25
+ }
26
+ catch (error) {
27
+ if (error instanceof CapabilityError)
28
+ throw error;
29
+ throw new CapabilityError('Held launch needs a native binding this host does not have.', 'UNAVAILABLE', {
30
+ reason: 'held-launch-unavailable', retryable: false, cause: error instanceof Error ? error : undefined
31
+ });
32
+ }
33
+ };
34
+ /**
35
+ * The Bun host's held-launch capability: the owned-session routing of `session()` and
36
+ * caller-owned `spawn()` over its `bun:ffi` artifact binding. A harness binds a scripted
37
+ * native library by passing its own loader.
38
+ */
39
+ export function bunHeldLaunch(loadArtifacts = loadBunArtifacts) {
40
+ return Object.freeze({ createRouting: (options) => new HeldLaunchExecution({ ...options, loadArtifacts }) });
41
+ }
42
+ /** The port's `spawn` member: this host's spawn, never carrying its native-launch test seam. */
43
+ const bunSpawn = (options, inherited, hostPlatform, hostCwd, lifecycle, nativeLaunch, hostArch) => bunSpawnProcess(options, inherited, hostPlatform, hostCwd, lifecycle, nativeLaunch, hostArch);
44
+ /**
45
+ * This host's required `ProcessHost` members: its own path mechanics, spawn
46
+ * (the spawn base over Bun's launch, descriptors and signals) and command
47
+ * discovery (the PATH search base over Bun's filesystem probes), and its PTY
48
+ * opener. A composition or harness that wants none of the optional members
49
+ * (buffered capture, restricted execution, held launch, session reader) starts
50
+ * from this one.
51
+ */
52
+ export function bunNativeProcessHost() {
53
+ return Object.freeze({
54
+ path: Object.freeze({ isAbsolute, resolve }),
55
+ spawn: bunSpawn,
56
+ which: bunWhichCommand,
57
+ openPtySession: bunOpenPtySession
58
+ });
59
+ }
60
+ /**
61
+ * The process port this Bun host hands local execution: its native members
62
+ * ({@link bunNativeProcessHost}) and the members only this host has, its own
63
+ * adapters for buffered capture, restricted execution, held launch and the
64
+ * native session reader.
65
+ */
66
+ export function bunProcessHost(restrictedBounds) {
67
+ const executeRestricted = restrictedBounds === undefined
68
+ ? executeRestrictedDarwin
69
+ : createRestrictedDarwinExecutor(PINNED_SUPERVISOR, { bounds: restrictedBounds });
70
+ return Object.freeze({
71
+ ...bunNativeProcessHost(),
72
+ bufferedCapture: bunBufferedCapture,
73
+ restricted: Object.freeze({ captureSupervisor: captureRestrictedSupervisor, execute: executeRestricted }),
74
+ heldLaunch: bunHeldLaunch(),
75
+ createSessionIdReader: createBunSessionIdReader
76
+ });
77
+ }
78
+ /** Public native artifacts selected from this runtime's captured host facts. */
79
+ const nativeManifestExports = new Map([
80
+ ['darwin:arm64', '@vibesdotdev/host-bun/native/held-launch/aarch64-apple-darwin'],
81
+ ['darwin:x64', '@vibesdotdev/host-bun/native/held-launch/x86_64-apple-darwin'],
82
+ ['linux:arm64', '@vibesdotdev/host-bun/native/held-launch/aarch64-unknown-linux-gnu'],
83
+ ['linux:x64', '@vibesdotdev/host-bun/native/held-launch/x86_64-unknown-linux-gnu']
84
+ ]);
85
+ /** Called only when the selected local provider needs an enforced native launch. */
86
+ export async function bunNativeLaunchManifestPath(runtime) {
87
+ const platform = runtime.localEnvironment.getPlatform?.();
88
+ const arch = runtime.localEnvironment.getArch?.();
89
+ const specifier = nativeManifestExports.get(`${platform}:${arch}`);
90
+ if (!specifier)
91
+ throw new CapabilityError('This host has no declared native launch target.', 'UNAVAILABLE', {
92
+ reason: 'execution-native-target-unavailable', retryable: false, details: { platform, arch }
93
+ });
94
+ const root = runtime.localEnvironment.hostIdentity?.()?.hostRoot;
95
+ if (!root?.trim())
96
+ throw new CapabilityError('Native launch requires this host\'s declared resolution root.', 'UNAVAILABLE', {
97
+ reason: 'execution-native-root-unavailable', retryable: false
98
+ });
99
+ if (!isAbsolute(root))
100
+ throw new CapabilityError('Native launch requires an absolute declared resolution root.', 'INVALID_INPUT', {
101
+ reason: 'execution-native-root-invalid', retryable: false
102
+ });
103
+ if (!runtime.hasKind('runtime/loader'))
104
+ throw new CapabilityError('Native launch requires the runtime host loader.', 'UNAVAILABLE', {
105
+ reason: 'execution-native-loader-unavailable', retryable: false
106
+ });
107
+ let loader;
108
+ try {
109
+ loader = await runtime.query('runtime/loader').enabled().resolve();
110
+ }
111
+ catch (cause) {
112
+ throw new CapabilityError('The runtime host loader is unavailable for native launch.', 'UNAVAILABLE', {
113
+ reason: 'execution-native-loader-unavailable', retryable: false, cause
114
+ });
115
+ }
116
+ if (!loader.resolveSpecifier)
117
+ throw new CapabilityError('The runtime host loader cannot resolve native artifact exports.', 'UNAVAILABLE', {
118
+ reason: 'execution-native-loader-unavailable', retryable: false
119
+ });
120
+ let resolved;
121
+ try {
122
+ resolved = loader.resolveSpecifier(specifier, root);
123
+ }
124
+ catch (cause) {
125
+ throw new CapabilityError('The selected native launch artifact export is unavailable.', 'UNAVAILABLE', {
126
+ reason: 'execution-native-artifact-unavailable', retryable: false, details: { specifier }, cause
127
+ });
128
+ }
129
+ try {
130
+ return fileURLToPath(resolved);
131
+ }
132
+ catch (cause) {
133
+ throw new CapabilityError('The runtime host loader returned no native manifest file URL.', 'INVALID_INPUT', {
134
+ reason: 'execution-native-manifest-path-invalid', retryable: false, cause
135
+ });
136
+ }
137
+ }
138
+ /** The one local execution plugin for a Bun host (no restricted admission or held launch unless declared). */
139
+ export function bunLocalExecutionPlugin(restricted, heldLaunch, nativeLaunch) {
140
+ // The restricted supervision's bounds are its declared defaults unless the declaration names them.
141
+ const options = { processHost: bunProcessHost(restricted?.bounds) };
142
+ if (nativeLaunch !== undefined)
143
+ options.nativeLaunch = nativeLaunch;
144
+ if (restricted)
145
+ options.restricted = { writableBase: restricted.writableBase };
146
+ if (heldLaunch)
147
+ options.heldLaunch = { manifestPath: heldLaunch.manifestPath, sessionMembers: hostSessionMembers };
148
+ return createRuntimeExecutionLocalPlugin(options);
149
+ }
150
+ //# sourceMappingURL=local-execution.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-execution.impl.bun.js","sourceRoot":"","sources":["../src/local-execution.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACN,iCAAiC,EAOjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,eAAe,EAKf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAkC,MAAM,qCAAqC,CAAC;AAC1G,OAAO,EAAE,2BAA2B,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,iBAAiB,EAAkC,MAAM,yCAAyC,CAAC;AAClM,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,qFAAqF;AACrF,MAAM,CAAC,MAAM,kBAAkB,GAA2B,KAAK,IAAI,EAAE,CACpE,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,kBAAkB,EAAE,CAAC;IACnH,OAAO,iCAAiC,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { LoggingFileHost } from '@vibesdotdev/logging/host-files';
2
+ /** This host's file operations, as the file logging base uses them. */
3
+ export declare const bunLoggingFileHost: LoggingFileHost;
4
+ //# sourceMappingURL=file-host.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-host.impl.bun.d.ts","sourceRoot":"","sources":["../../src/logging/file-host.impl.bun.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,EAAE,eAwB/B,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The Bun host's file primitives for Logging's file logging base
3
+ * (`@vibesdotdev/logging/host-files`): its path rules and file API. Bun
4
+ * implements `node:fs` and `node:path`, so these are those calls, made by
5
+ * this host's own module.
6
+ */
7
+ import { constants, existsSync, mkdirSync, watch } from 'node:fs';
8
+ import { appendFile, copyFile, mkdir, open, readdir, readFile, rename, stat, truncate, unlink } from 'node:fs/promises';
9
+ import { basename, dirname, isAbsolute, join } from 'node:path';
10
+ /** This host's file operations, as the file logging base uses them. */
11
+ export const bunLoggingFileHost = Object.freeze({
12
+ join: (...segments) => join(...segments),
13
+ dirname: (path) => dirname(path),
14
+ basename: (path) => basename(path),
15
+ isAbsolute: (path) => isAbsolute(path),
16
+ mkdirRecursive: async (path) => { await mkdir(path, { recursive: true }); },
17
+ mkdirRecursiveSync: (path) => { mkdirSync(path, { recursive: true }); },
18
+ exists: (path) => existsSync(path),
19
+ stat: (path) => stat(path),
20
+ rename: (from, to) => rename(from, to),
21
+ unlink: (path) => unlink(path),
22
+ readdir: (path) => readdir(path),
23
+ open: (path, flags) => open(path, flags),
24
+ readText: (path) => readFile(path, 'utf-8'),
25
+ appendText: (path, text) => appendFile(path, text, { flag: 'a' }),
26
+ copyFileClone: (from, to) => copyFile(from, to, constants.COPYFILE_FICLONE),
27
+ truncate: (path, length) => truncate(path, length),
28
+ watchDirectory(directory, listener) {
29
+ const watcher = watch(directory, { persistent: false }, (_event, changed) => listener(changed === null ? null : changed.toString()));
30
+ return {
31
+ close: () => { watcher.close(); },
32
+ onError: (onError) => { watcher.on('error', onError); }
33
+ };
34
+ }
35
+ });
36
+ //# sourceMappingURL=file-host.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-host.impl.bun.js","sourceRoot":"","sources":["../../src/logging/file-host.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGhE,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAoB,MAAM,CAAC,MAAM,CAAC;IAChE,IAAI,EAAE,CAAC,GAAG,QAAkB,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IAClD,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACxC,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC1C,UAAU,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;IAC9C,cAAc,EAAE,KAAK,EAAE,IAAY,EAAE,EAAE,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EA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,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACrI,OAAO;YACN,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACjC,OAAO,EAAE,CAAC,OAA+B,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;SAC/E,CAAC;IACH,CAAC;CACD,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The Bun host's logging plugin (C092): Logging's file logging base
3
+ * (`@vibesdotdev/logging/host-files`) over this host's own file primitives,
4
+ * registered under this package's identity for every Bun-hosted runtime. It
5
+ * implements `@vibesdotdev/logging/host`'s file contract: the file sink, the
6
+ * `file` output (and the `mcp-stdout-capture` storage it backs), the
7
+ * file-backed audit logger and the scheduled audit retention job.
8
+ */
9
+ import { type HostFileLoggingOptions } from '@vibesdotdev/logging/host-files';
10
+ /** The Bun host's file logging; `{ files: false }` registers none of the file-backed outputs. */
11
+ export declare function bunLoggingPlugin(options?: HostFileLoggingOptions): import("@vibesdotdev/kernel").RuntimePlugin;
12
+ //# sourceMappingURL=logging.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.plugin.d.ts","sourceRoot":"","sources":["../../src/logging/logging.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAA+B,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAG3G,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,sBAA2B,+CAOpE"}