@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
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Workspace process env builder (Bun consumer surface).
3
+ *
4
+ * A thin declaration over the kernel's one child-env composer: a workspace
5
+ * child declares `HOME`, `TMPDIR` and `PWD` rooted at the workspace, plus the
6
+ * caller's extra variables (applied left to right, later wins), and
7
+ * `composeChildEnv` composes it with the owning runtime's host set (the base
8
+ * allowlist, the re-entry facts and that runtime's path roots). Nothing is
9
+ * picked from a snapshot here and `process.env` is never forwarded: no
10
+ * credential, secret or other host variable reaches the child unless the
11
+ * composer's host set names it, and the host-credential manifest never does.
12
+ *
13
+ * The owning runtime is the one the caller was handed: a child launched for
14
+ * runtime B gets B's PATH and roots even while A is the default. A runtime that
15
+ * captured no PATH fails typed rather than launching a child that cannot
16
+ * resolve an interpreter.
17
+ */
18
+ import { type ChildEnvRuntime } from '@vibesdotdev/kernel';
19
+ /**
20
+ * Build a workspace child's environment rooted at `workspacePath`.
21
+ *
22
+ * @param runtime The runtime that owns the child: its host set seeds the env.
23
+ * @param workspacePath Absolute workspace root → seeds HOME/TMPDIR/PWD.
24
+ * @param extraEnvs Zero or more caller-supplied env maps, declared
25
+ * left-to-right after the base (later wins). `undefined`
26
+ * entries are skipped so call sites can pass optional
27
+ * initial/caller env without guarding each one.
28
+ */
29
+ export declare function buildWorkspaceEnv(runtime: ChildEnvRuntime, workspacePath: string, ...extraEnvs: Array<Record<string, string> | undefined>): Record<string, string>;
30
+ //# sourceMappingURL=workspace-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-env.d.ts","sourceRoot":"","sources":["../../src/services/workspace-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAA6C,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtG;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,eAAe,EACxB,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,GACrD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcxB"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Workspace process env builder (Bun consumer surface).
3
+ *
4
+ * A thin declaration over the kernel's one child-env composer: a workspace
5
+ * child declares `HOME`, `TMPDIR` and `PWD` rooted at the workspace, plus the
6
+ * caller's extra variables (applied left to right, later wins), and
7
+ * `composeChildEnv` composes it with the owning runtime's host set (the base
8
+ * allowlist, the re-entry facts and that runtime's path roots). Nothing is
9
+ * picked from a snapshot here and `process.env` is never forwarded: no
10
+ * credential, secret or other host variable reaches the child unless the
11
+ * composer's host set names it, and the host-credential manifest never does.
12
+ *
13
+ * The owning runtime is the one the caller was handed: a child launched for
14
+ * runtime B gets B's PATH and roots even while A is the default. A runtime that
15
+ * captured no PATH fails typed rather than launching a child that cannot
16
+ * resolve an interpreter.
17
+ */
18
+ import { CapabilityError, composeChildEnv, readEnv } from '@vibesdotdev/kernel';
19
+ /**
20
+ * Build a workspace child's environment rooted at `workspacePath`.
21
+ *
22
+ * @param runtime The runtime that owns the child: its host set seeds the env.
23
+ * @param workspacePath Absolute workspace root → seeds HOME/TMPDIR/PWD.
24
+ * @param extraEnvs Zero or more caller-supplied env maps, declared
25
+ * left-to-right after the base (later wins). `undefined`
26
+ * entries are skipped so call sites can pass optional
27
+ * initial/caller env without guarding each one.
28
+ */
29
+ export function buildWorkspaceEnv(runtime, workspacePath, ...extraEnvs) {
30
+ const declared = { HOME: workspacePath, TMPDIR: workspacePath, PWD: workspacePath };
31
+ for (const extra of extraEnvs) {
32
+ if (extra)
33
+ Object.assign(declared, extra);
34
+ }
35
+ const env = composeChildEnv(runtime, { env: declared });
36
+ const platform = runtime.localEnvironment.getPlatform?.();
37
+ if (!readEnv({ platform, snapshot: env }, 'PATH')) {
38
+ throw new CapabilityError('The runtime that owns this child captured no PATH.', 'UNAVAILABLE', {
39
+ reason: 'host-path-unavailable',
40
+ retryable: false
41
+ });
42
+ }
43
+ return env;
44
+ }
45
+ //# sourceMappingURL=workspace-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-env.js","sourceRoot":"","sources":["../../src/services/workspace-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,OAAO,EAAwB,MAAM,qBAAqB,CAAC;AAEtG;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAChC,OAAwB,EACxB,aAAqB,EACrB,GAAG,SAAoD;IAEvD,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC;IACpF,KAAK,MAAM,KAAK,IAAI,SAAS,EAAE,CAAC;QAC/B,IAAI,KAAK;YAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,MAAM,GAAG,GAAG,eAAe,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,WAAW,EAAE,EAAE,CAAC;IAC1D,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,eAAe,CAAC,oDAAoD,EAAE,aAAa,EAAE;YAC9F,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,KAAK;SAChB,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The Bun host's workspace-root probe: Bun's own filesystem and path calls,
3
+ * composed by the kernel's probe base (`createWorkspaceRootProbe`) for the
4
+ * kernel's workspace-root policy, which owns every binding decision.
5
+ *
6
+ * The native-outcome helpers are the kernel's base (`@vibesdotdev/kernel`);
7
+ * they are re-exported here for this package's native readers.
8
+ */
9
+ import { type WorkspaceRootProbe } from '@vibesdotdev/kernel';
10
+ export { ABSENT_PATH_CODES, attemptJson, attemptNative, attemptNativeAsync, readOrAbsent, type NativeFailure, type NativeOutcome } from '@vibesdotdev/execution-local';
11
+ export type { JsonValue } from '@vibesdotdev/kernel/schemas/json';
12
+ /** Bun's native mechanics; the kernel's probe base applies the shared probe policy. */
13
+ export declare function createBunWorkspaceRootProbe(): WorkspaceRootProbe;
14
+ //# sourceMappingURL=workspace-root-probe.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-root-probe.impl.bun.d.ts","sourceRoot":"","sources":["../../src/services/workspace-root-probe.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACvK,YAAY,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,uFAAuF;AACvF,wBAAgB,2BAA2B,IAAI,kBAAkB,CAWhE"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The Bun host's workspace-root probe: Bun's own filesystem and path calls,
3
+ * composed by the kernel's probe base (`createWorkspaceRootProbe`) for the
4
+ * kernel's workspace-root policy, which owns every binding decision.
5
+ *
6
+ * The native-outcome helpers are the kernel's base (`@vibesdotdev/kernel`);
7
+ * they are re-exported here for this package's native readers.
8
+ */
9
+ import { readFileSync, realpathSync, statSync } from 'node:fs';
10
+ import { dirname, isAbsolute, join, normalize } from 'node:path';
11
+ import {} from '@vibesdotdev/kernel';
12
+ import { ABSENT_PATH_CODES, createWorkspaceRootProbe, readOrAbsent } from '@vibesdotdev/execution-local';
13
+ export { ABSENT_PATH_CODES, attemptJson, attemptNative, attemptNativeAsync, readOrAbsent } from '@vibesdotdev/execution-local';
14
+ /** Bun's native mechanics; the kernel's probe base applies the shared probe policy. */
15
+ export function createBunWorkspaceRootProbe() {
16
+ return createWorkspaceRootProbe({
17
+ // Bun raises ENOENT for no entry and ENOTDIR for an ancestor that is a file: both are absence.
18
+ entryKind: (path) => readOrAbsent(() => (statSync(path).isDirectory() ? 'directory' : 'file'), ABSENT_PATH_CODES, 'missing'),
19
+ readText: (path) => readFileSync(path, 'utf8'),
20
+ isAbsolute,
21
+ normalize,
22
+ realpath: (path) => realpathSync(path),
23
+ dirname,
24
+ join
25
+ });
26
+ }
27
+ //# sourceMappingURL=workspace-root-probe.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-root-probe.impl.bun.js","sourceRoot":"","sources":["../../src/services/workspace-root-probe.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAA2B,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEzG,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,YAAY,EAA0C,MAAM,8BAA8B,CAAC;AAGvK,uFAAuF;AACvF,MAAM,UAAU,2BAA2B;IAC1C,OAAO,wBAAwB,CAAC;QAC/B,+FAA+F;QAC/F,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,SAAS,CAAC;QAC5H,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;QAC9C,UAAU;QACV,SAAS;QACT,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtC,OAAO;QACP,IAAI;KACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ /** Bun's native session binding; portable membership lives with the owned-session feature. */
2
+ import { type RuntimeLifecycle, type RuntimeRef } from '@vibesdotdev/kernel';
3
+ import { type SessionMembersOptions } from '@vibesdotdev/execution-local/owned-session';
4
+ /** Darwin getsid(2); a lifecycle owns the native library when the host supplies it. */
5
+ export declare function darwinSessionIdReader(lifecycle?: Pick<RuntimeLifecycle, 'signal'>): Promise<(pid: number) => number>;
6
+ /** A host explicitly composes this reader into runtime/process; consumers never infer it. */
7
+ export declare function createBunSessionIdReader(options: {
8
+ platform: string;
9
+ lifecycle: Pick<RuntimeLifecycle, 'signal'>;
10
+ }): NonNullable<SessionMembersOptions['process']['sessionId']>;
11
+ /** Explicit Bun-host composition retained for callers of the existing native door. */
12
+ export declare function createHostSessionMembers(options: Omit<SessionMembersOptions, 'readSessionId' | 'lifecycle'> & {
13
+ platform: string;
14
+ lifecycle: Pick<RuntimeLifecycle, 'delay' | 'signal'>;
15
+ }): Promise<{
16
+ terminate(birth: import("@vibesdotdev/execution-local/owned-session").NativeBirth, phase: "graceful" | "forced", signal: AbortSignal): Promise<import("@vibesdotdev/execution-local/owned-session").SessionCensus>;
17
+ }>;
18
+ /** The Bun host supplies its own native PID; every observation uses the selected runtime provider. */
19
+ export declare function hostSessionMembers(runtime: RuntimeRef): Promise<{
20
+ terminate(birth: import("@vibesdotdev/execution-local/owned-session").NativeBirth, phase: "graceful" | "forced", signal: AbortSignal): Promise<import("@vibesdotdev/execution-local/owned-session").SessionCensus>;
21
+ }>;
22
+ //# sourceMappingURL=session-members.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-members.impl.bun.d.ts","sourceRoot":"","sources":["../src/session-members.impl.bun.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAmB,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG9F,OAAO,EAGN,KAAK,qBAAqB,EAC1B,MAAM,4CAA4C,CAAC;AAMpD,uFAAuF;AACvF,wBAAsB,qBAAqB,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,CAoB1H;AAED,6FAA6F;AAC7F,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;CAC5C,GAAG,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC,CAwB7D;AAED,sFAAsF;AACtF,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,eAAe,GAAG,WAAW,CAAC,GAAG;IACpH,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;CACtD;;GAIA;AAED,sGAAsG;AACtG,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,UAAU;;GAE3D"}
@@ -0,0 +1,74 @@
1
+ /** Bun's native session binding; portable membership lives with the owned-session feature. */
2
+ import { CapabilityError } from '@vibesdotdev/kernel';
3
+ import { attempt, hasErrno } from '@vibesdotdev/execution-local';
4
+ import { bunLinuxSessionId } from "./process/runtime-process.impl.bun.js";
5
+ import { createRuntimeSessionMembers, createSessionMembersService } from '@vibesdotdev/execution-local/owned-session';
6
+ import * as z from 'zod/v4';
7
+ const NativeSessionIdSchema = z.int().min(-1);
8
+ const NativePidSchema = z.int().positive().max(2 ** 31 - 1);
9
+ /** Darwin getsid(2); a lifecycle owns the native library when the host supplies it. */
10
+ export async function darwinSessionIdReader(lifecycle) {
11
+ const { dlopen, FFIType } = await import('bun:ffi');
12
+ const library = dlopen('/usr/lib/libSystem.B.dylib', {
13
+ getsid: { args: [FFIType.i32], returns: FFIType.i32 }
14
+ });
15
+ if (lifecycle) {
16
+ if (lifecycle.signal.aborted) {
17
+ library.close();
18
+ throw new CapabilityError('The session reader belongs to a disposed host.', 'UNAVAILABLE', {
19
+ reason: 'process-table-unavailable', retryable: false
20
+ });
21
+ }
22
+ lifecycle.signal.addEventListener('abort', () => library.close(), { once: true });
23
+ }
24
+ return pid => {
25
+ if (lifecycle?.signal.aborted)
26
+ throw new CapabilityError('The session reader belongs to a disposed host.', 'UNAVAILABLE', {
27
+ reason: 'process-table-unavailable', retryable: false
28
+ });
29
+ return NativeSessionIdSchema.parse(library.symbols.getsid(NativePidSchema.parse(pid)));
30
+ };
31
+ }
32
+ /** A host explicitly composes this reader into runtime/process; consumers never infer it. */
33
+ export function createBunSessionIdReader(options) {
34
+ let darwinReader;
35
+ return async (pid) => {
36
+ const valid = NativePidSchema.safeParse(pid);
37
+ if (!valid.success)
38
+ throw new CapabilityError('Process id must be a positive native integer.', 'INVALID_INPUT', {
39
+ reason: 'process-id-invalid', details: { pid }
40
+ });
41
+ if (options.platform === 'linux')
42
+ return bunLinuxSessionId(pid);
43
+ if (options.platform !== 'darwin')
44
+ throw new CapabilityError('This host has no native session reader.', 'UNAVAILABLE', {
45
+ reason: 'process-view-unsupported', details: { view: 'session', platform: options.platform }
46
+ });
47
+ darwinReader ??= darwinSessionIdReader(options.lifecycle);
48
+ const sid = (await darwinReader)(pid);
49
+ if (sid >= 0)
50
+ return sid;
51
+ // A negative id for a process that is gone is absence; for one that is present it is a failed look.
52
+ const probed = attempt(() => process.kill(pid, 0));
53
+ if ('failure' in probed) {
54
+ if (hasErrno(probed.failure, 'ESRCH'))
55
+ return null;
56
+ if (!hasErrno(probed.failure, 'EPERM'))
57
+ throw probed.failure.thrown;
58
+ }
59
+ throw new CapabilityError('Native session inspection failed for a present process.', 'UNAVAILABLE', {
60
+ reason: 'process-table-unavailable', details: { pid }
61
+ });
62
+ };
63
+ }
64
+ /** Explicit Bun-host composition retained for callers of the existing native door. */
65
+ export async function createHostSessionMembers(options) {
66
+ return createSessionMembersService({
67
+ ...options, readSessionId: createBunSessionIdReader({ platform: options.platform, lifecycle: options.lifecycle })
68
+ });
69
+ }
70
+ /** The Bun host supplies its own native PID; every observation uses the selected runtime provider. */
71
+ export async function hostSessionMembers(runtime) {
72
+ return createRuntimeSessionMembers(runtime, process.pid);
73
+ }
74
+ //# sourceMappingURL=session-members.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-members.impl.bun.js","sourceRoot":"","sources":["../src/session-members.impl.bun.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAE,eAAe,EAA0C,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAE3B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,qBAAqB,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,eAAe,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;AAE5D,uFA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E;SACrD,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAED,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,OAG9C;IACA,OAAO,2BAA2B,CAAC;QAClC,GAAG,OAAO,EAAE,aAAa,EAAE,wBAAwB,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;KACjH,CAAC,CAAC;AACJ,CAAC;AAED,sGAAsG;AACtG,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAmB;IAC3D,OAAO,2BAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The Bun host's implementation of LocalDB's SQLite driver kind
3
+ * (`localdb/sqlite-driver`) and the plugin that registers it.
4
+ */
5
+ export { createBunSqliteDriver } from './sqlite-driver.impl.bun.ts';
6
+ export { bunSqliteDriverDescriptor, bunSqliteDriverPlugin, registerBunSqliteDriver } from './sqlite-driver.plugin.ts';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sqlite-driver/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The Bun host's implementation of LocalDB's SQLite driver kind
3
+ * (`localdb/sqlite-driver`) and the plugin that registers it.
4
+ */
5
+ export { createBunSqliteDriver } from "./sqlite-driver.impl.bun.js";
6
+ export { bunSqliteDriverDescriptor, bunSqliteDriverPlugin, registerBunSqliteDriver } from "./sqlite-driver.plugin.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sqlite-driver/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type SqliteDriver } from '@vibesdotdev/localdb/sqlite-driver/base';
2
+ /** Compiled statements one connection keeps; the record layer's distinct SQL texts are few and repeat. */
3
+ export declare const STATEMENT_CACHE_SIZE = 256;
4
+ /** The Bun host's driver. */
5
+ export declare function createBunSqliteDriver(): SqliteDriver;
6
+ //# sourceMappingURL=sqlite-driver.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-driver.impl.bun.d.ts","sourceRoot":"","sources":["../../src/sqlite-driver/sqlite-driver.impl.bun.ts"],"names":[],"mappings":"AAgCA,OAAO,EAeN,KAAK,YAAY,EAUjB,MAAM,yCAAyC,CAAC;AAsFjD,0GAA0G;AAC1G,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAkKxC,6BAA6B;AAC7B,wBAAgB,qBAAqB,IAAI,YAAY,CAQpD"}
@@ -0,0 +1,269 @@
1
+ /**
2
+ * The Bun host's SQLite driver (`localdb/sqlite-driver`, host `bun`) over
3
+ * `bun:sqlite`.
4
+ *
5
+ * It reads input through, classifies failures with, and runs transactions on
6
+ * LocalDB's shared driver base (`@vibesdotdev/localdb/sqlite-driver/base`),
7
+ * lending it this host's own path rules and file facts, so every host refuses
8
+ * alike. It opens with SQLite's defaults and applies no pragma; LocalDB's
9
+ * policy does.
10
+ *
11
+ * Each connection keeps its compiled statements, keyed by SQL text, so the
12
+ * record layer's `prepare(sql).get(...)` per call compiles once, not on every
13
+ * prepare and step. A cached statement serves only a call that binds every
14
+ * parameter (SQLite keeps bindings across steps, so a partial call would read
15
+ * another caller's values); `bun:sqlite` resets it after each `get`/`all`/`run`,
16
+ * so no read lock outlives the call. An EXPLAIN statement is never cached: Bun
17
+ * 1.4.4 leaves it active after `all`/`get`/`run` (measured: same-connection
18
+ * DDL then refuses "database table is locked") until it is finalized, so it
19
+ * keeps the compile-and-finalize path. A statement whose call failed is
20
+ * finalized and dropped, the least recently used is finalized past
21
+ * {@link STATEMENT_CACHE_SIZE}, and close finalizes the rest.
22
+ */
23
+ import { Database } from 'bun:sqlite';
24
+ import { statSync } from 'node:fs';
25
+ import { isAbsolute } from 'node:path';
26
+ import { CapabilityError, CaughtFailureSchema, valueFreeFailure } from '@vibesdotdev/kernel';
27
+ import { CLOSE_FAILED, CONNECTION_CLOSED, describeOpenFailure, describeStatementFailure, readSqliteHostFailure, readSqliteOpenRequest, readSqliteParams, readSqliteSql, requireExistingSqliteFile, runSqliteTransaction, sqliteDriverFailure, sqliteFailureFacts, sqliteHostFailureDetails } from '@vibesdotdev/localdb/sqlite-driver/base';
28
+ /** This host's path rules and file facts, lent to LocalDB's shared driver guards. */
29
+ const bunSqliteHost = Object.freeze({
30
+ isAbsolutePath: (path) => isAbsolute(path),
31
+ statPath: (path) => { statSync(path); }
32
+ });
33
+ function openDatabase(request) {
34
+ requireExistingSqliteFile(bunSqliteHost, request);
35
+ try {
36
+ return request.readonly
37
+ ? new Database(request.path, { readonly: true })
38
+ : new Database(request.path, { readwrite: true, create: request.create });
39
+ }
40
+ catch (error) {
41
+ const host = readSqliteHostFailure(CaughtFailureSchema.parse(error), 'errno');
42
+ const failure = describeOpenFailure(request, host.errcode);
43
+ throw new CapabilityError(failure.message, failure.code, {
44
+ reason: failure.reason,
45
+ retryable: failure.retryable,
46
+ details: sqliteHostFailureDetails(host, failure.details)
47
+ });
48
+ }
49
+ }
50
+ /** Run one host call; a host failure becomes the contract's typed statement failure. */
51
+ function statementCall(call) {
52
+ try {
53
+ return call();
54
+ }
55
+ catch (error) {
56
+ // SQLite's own text quotes statement tokens and names. Read it once only
57
+ // to select a fixed condition; neither the text nor host error escapes.
58
+ const host = readSqliteHostFailure(CaughtFailureSchema.parse(error), 'errno');
59
+ const failure = describeStatementFailure(host.errcode, host.message);
60
+ throw new CapabilityError(failure.message, failure.code, {
61
+ reason: failure.reason,
62
+ retryable: failure.retryable,
63
+ details: sqliteHostFailureDetails(host, failure.details)
64
+ });
65
+ }
66
+ }
67
+ function closeDatabase(close) {
68
+ try {
69
+ close();
70
+ return { ok: true };
71
+ }
72
+ catch (error) {
73
+ return { ok: false, failure: valueFreeFailure(CaughtFailureSchema.parse(error)) };
74
+ }
75
+ }
76
+ /** Keep cleanup refusal as an admitted causal value for the operation that owns it. */
77
+ function finalizeStatement(finalize) {
78
+ try {
79
+ statementCall(finalize);
80
+ return undefined;
81
+ }
82
+ catch (error) {
83
+ return CaughtFailureSchema.parse(error);
84
+ }
85
+ }
86
+ /** One operation owns its native statement until cleanup has joined, including failure cleanup. */
87
+ function withNativeStatement(prepare, call) {
88
+ const statement = statementCall(prepare);
89
+ let result;
90
+ try {
91
+ result = statementCall(() => call(statement));
92
+ }
93
+ catch (error) {
94
+ const cleanup = finalizeStatement(() => statement.finalize());
95
+ if (cleanup) {
96
+ throw new CapabilityError('A SQLite statement and its cleanup failed.', 'INTERNAL', {
97
+ reason: 'sqlite-statement-failed',
98
+ cause: new AggregateError([error, cleanup], 'SQLite operation and finalization failed.')
99
+ });
100
+ }
101
+ throw error;
102
+ }
103
+ statementCall(() => statement.finalize());
104
+ return result;
105
+ }
106
+ /** Compiled statements one connection keeps; the record layer's distinct SQL texts are few and repeat. */
107
+ export const STATEMENT_CACHE_SIZE = 256;
108
+ /** SQL whose first token, after whitespace and comments, is EXPLAIN (SQLite's statement prefix). */
109
+ const EXPLAIN_STATEMENT = /^(?:\s|--[^\n]*(?:\n|$)|\/\*[\s\S]*?\*\/)*explain\b/i;
110
+ /** One connection's compiled statements by SQL text, least recently used first. */
111
+ class StatementCache {
112
+ entries = new Map();
113
+ /** The compiled statement for `sql`, compiled now on a miss. */
114
+ acquire(sql, compile) {
115
+ const cached = this.entries.get(sql);
116
+ if (cached) {
117
+ this.entries.delete(sql);
118
+ this.entries.set(sql, cached);
119
+ return cached;
120
+ }
121
+ const statement = statementCall(compile);
122
+ this.entries.set(sql, statement);
123
+ if (this.entries.size > STATEMENT_CACHE_SIZE) {
124
+ const [oldest, evicted] = this.entries.entries().next().value;
125
+ this.entries.delete(oldest);
126
+ statementCall(() => evicted.finalize());
127
+ }
128
+ return statement;
129
+ }
130
+ /** Run `call` on the cached statement; a failed call drops and finalizes it, joining that cleanup. */
131
+ use(sql, compile, call) {
132
+ const statement = this.acquire(sql, compile);
133
+ try {
134
+ return statementCall(() => call(statement));
135
+ }
136
+ catch (error) {
137
+ this.entries.delete(sql);
138
+ const cleanup = finalizeStatement(() => statement.finalize());
139
+ if (cleanup) {
140
+ throw new CapabilityError('A SQLite statement and its cleanup failed.', 'INTERNAL', {
141
+ reason: 'sqlite-statement-failed',
142
+ cause: new AggregateError([error, cleanup], 'SQLite operation and finalization failed.')
143
+ });
144
+ }
145
+ throw error;
146
+ }
147
+ }
148
+ /** Finalize every statement; the first cleanup failure is answered after all were tried. */
149
+ clear() {
150
+ let failure;
151
+ for (const statement of this.entries.values())
152
+ failure ??= finalizeStatement(() => statement.finalize());
153
+ this.entries.clear();
154
+ return failure;
155
+ }
156
+ }
157
+ class BunSqliteStatement {
158
+ sql;
159
+ cache;
160
+ compile;
161
+ parameterCount;
162
+ cacheable;
163
+ assertOpen;
164
+ bindings = [];
165
+ constructor(sql, cache, compile, parameterCount, cacheable, assertOpen) {
166
+ this.sql = sql;
167
+ this.cache = cache;
168
+ this.compile = compile;
169
+ this.parameterCount = parameterCount;
170
+ this.cacheable = cacheable;
171
+ this.assertOpen = assertOpen;
172
+ }
173
+ readBindings(params) {
174
+ this.assertOpen();
175
+ const bound = readSqliteParams(params);
176
+ if (bound.length === 0)
177
+ return this.bindings;
178
+ // Bun clears its retained bindings before an arity refusal. Keep the same
179
+ // recovery behavior while still letting the native call classify that refusal.
180
+ this.bindings = bound.length === this.parameterCount ? bound : [];
181
+ return bound;
182
+ }
183
+ /** A cacheable call that binds every parameter runs on the cached statement; any other on a fresh one, as before. */
184
+ execute(bound, call) {
185
+ // SAFETY: `TRow` is only the caller's declared row shape; the native statement is the same object
186
+ // whichever row type labels it (as `db.prepare<TRow>` labelled it before), so the call is unchanged.
187
+ const typed = call;
188
+ return this.cacheable && bound.length === this.parameterCount
189
+ ? this.cache.use(this.sql, this.compile, typed)
190
+ : withNativeStatement(this.compile, typed);
191
+ }
192
+ all(...params) {
193
+ const bound = this.readBindings(params);
194
+ return this.execute(bound, statement => statement.all(...bound));
195
+ }
196
+ get(...params) {
197
+ const bound = this.readBindings(params);
198
+ return this.execute(bound, statement => statement.get(...bound)) ?? null;
199
+ }
200
+ run(...params) {
201
+ const bound = this.readBindings(params);
202
+ return this.execute(bound, statement => {
203
+ const result = statement.run(...bound);
204
+ return { changes: result.changes, lastInsertRowid: result.lastInsertRowid };
205
+ });
206
+ }
207
+ }
208
+ class BunSqliteConnection {
209
+ path;
210
+ db;
211
+ closed = false;
212
+ savepoints = 0;
213
+ statements = new StatementCache();
214
+ constructor(path, db) {
215
+ this.path = path;
216
+ this.db = db;
217
+ }
218
+ assertOpen = () => {
219
+ if (this.closed)
220
+ throw sqliteDriverFailure(CONNECTION_CLOSED);
221
+ };
222
+ get inTransaction() {
223
+ return !this.closed && this.db.inTransaction;
224
+ }
225
+ exec(sql) {
226
+ this.assertOpen();
227
+ const text = readSqliteSql(sql);
228
+ statementCall(() => this.db.exec(text));
229
+ }
230
+ prepare(sql) {
231
+ this.assertOpen();
232
+ const text = readSqliteSql(sql);
233
+ const compile = () => this.db.prepare(text);
234
+ // Compiling (or finding) it now keeps eager syntax/schema refusal; an unstepped statement holds no lock.
235
+ const cacheable = !EXPLAIN_STATEMENT.test(text);
236
+ const parameterCount = cacheable
237
+ ? this.statements.acquire(text, compile).paramsCount
238
+ : withNativeStatement(compile, statement => statement.paramsCount);
239
+ return new BunSqliteStatement(text, this.statements, compile, parameterCount, cacheable, this.assertOpen);
240
+ }
241
+ transaction(run, options) {
242
+ this.assertOpen();
243
+ return runSqliteTransaction(this, `localdb_savepoint_${++this.savepoints}`, run, options);
244
+ }
245
+ close() {
246
+ if (this.closed)
247
+ return;
248
+ const finalized = this.statements.clear();
249
+ if (finalized) {
250
+ throw sqliteDriverFailure({ ...CLOSE_FAILED, details: sqliteFailureFacts('closeFailure', valueFreeFailure(finalized)) });
251
+ }
252
+ const closed = closeDatabase(() => this.db.close());
253
+ if (!closed.ok) {
254
+ throw sqliteDriverFailure({ ...CLOSE_FAILED, details: sqliteFailureFacts('closeFailure', closed.failure) });
255
+ }
256
+ this.closed = true;
257
+ }
258
+ }
259
+ /** The Bun host's driver. */
260
+ export function createBunSqliteDriver() {
261
+ return {
262
+ host: 'bun',
263
+ open(path, options) {
264
+ const request = readSqliteOpenRequest(bunSqliteHost, path, options);
265
+ return new BunSqliteConnection(request.path, openDatabase(request));
266
+ }
267
+ };
268
+ }
269
+ //# sourceMappingURL=sqlite-driver.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-driver.impl.bun.js","sourceRoot":"","sources":["../../src/sqlite-driver/sqlite-driver.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACN,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAGhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EA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I,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;IAED,KAAK;QACJ,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO;QACxB,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QAC1C,IAAI,SAAS,EAAE,CAAC;YACf,MAAM,mBAAmB,CAAC,EAAE,GAAG,YAAY,EAAE,OAAO,EAAE,kBAAkB,CAAC,cAAc,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1H,CAAC;QACD,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YAChB,MAAM,mBAAmB,CAAC,EAAE,GAAG,YAAY,EAAE,OAAO,EAAE,kBAAkB,CAAC,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7G,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACpB,CAAC;CACD;AAED,6BAA6B;AAC7B,MAAM,UAAU,qBAAqB;IACpC,OAAO;QACN,IAAI,EAAE,KAAK;QACX,IAAI,CAAC,IAAY,EAAE,OAA2B;YAC7C,MAAM,OAAO,GAAG,qBAAqB,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YACpE,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;QACrE,CAAC;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Registers the Bun host's SQLite driver under LocalDB's `localdb/sqlite-driver`
3
+ * kind. The host owns the kind's registration on the runtimes it builds (as it
4
+ * owns the paths kinds): the kind is LocalDB's frozen definition, so a second
5
+ * registration of it by the LocalDB plugin is a no-op. The driver module loads
6
+ * only when the kind is first resolved.
7
+ */
8
+ import { type RuntimePlugin, type RuntimeRef } from '@vibesdotdev/kernel';
9
+ /** The Bun driver's descriptor. */
10
+ export declare const bunSqliteDriverDescriptor: {
11
+ id: string;
12
+ kind: string;
13
+ name: string;
14
+ description: string;
15
+ host: string;
16
+ hardware: string[];
17
+ };
18
+ /** Register the kind (when absent), the Bun driver's descriptor and its lazy loader on `runtime`. */
19
+ export declare function registerBunSqliteDriver(runtime: RuntimeRef): void;
20
+ /** The same registration as a plugin, for a host composed from plugins. */
21
+ export declare const bunSqliteDriverPlugin: RuntimePlugin;
22
+ //# sourceMappingURL=sqlite-driver.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-driver.plugin.d.ts","sourceRoot":"","sources":["../../src/sqlite-driver/sqlite-driver.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAoD,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI5H,mCAAmC;AACnC,eAAO,MAAM,yBAAyB;;;;;;;CAOrC,CAAC;AAEF,qGAAqG;AACrG,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAajE;AAED,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,EAAE,aAMlC,CAAC"}