@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,148 @@
1
+ /**
2
+ * Bun host registration for Atlas SQL migrations.
3
+ *
4
+ * The Atlas package declares kind `workspace/atlas-migrations`, descriptor id
5
+ * `workspace.atlas-migrations`. This module resolves that descriptor through
6
+ * the handed runtime and registers its embedded SQL with localdb. The host
7
+ * imports the owner schema from
8
+ * `@vibesdotdev/workspace-schemas/atlas/migrations` and does not import
9
+ * Workspace's implementation package. The module URL and SQL directory URL are
10
+ * location facts for the owner; this wiring does not read them.
11
+ */
12
+ import { isMigrationNamespaceRegistered, localdb, migrationRegistry } from '@vibesdotdev/localdb';
13
+ import { parseMigrationName, parseVersionFromFilename } from '@vibesdotdev/localdb/migrations/load-sql';
14
+ import { getLogger } from '@vibesdotdev/logging';
15
+ import { CapabilityError, isCapabilityError, settleNow, valueFreeFailure } from '@vibesdotdev/kernel';
16
+ import { ATLAS_MIGRATIONS_ID, ATLAS_MIGRATIONS_KIND, AtlasMigrationsDescriptorSchema } from '@vibesdotdev/workspace-schemas/atlas/migrations';
17
+ const ATLAS_NAMESPACE = 'atlas';
18
+ const UNLOCATED_CONVENTION = '<workspace>/.vibes/atlas/<projectId>.db (per-project Atlas index)';
19
+ export class AtlasMigrationNamespacePoisonedError extends CapabilityError {
20
+ evidence;
21
+ constructor(evidence) {
22
+ super('Atlas migration namespace is poisoned: the in-process atlas namespace was registered without the initial schema. ' +
23
+ (evidence.repairAttempted
24
+ ? 'Repair attempted: yes; the registry changed before the guarded replacement could apply. '
25
+ : 'Repair attempted: no. ') +
26
+ 'Restart the process to rebuild the migration registry. The expected, registered and missing migration ids are in details.', 'UNAVAILABLE', {
27
+ reason: 'atlas-migration-namespace-poisoned',
28
+ details: {
29
+ expectedMigrationIds: evidence.expectedMigrationIds,
30
+ registeredMigrationIds: evidence.registeredMigrationIds,
31
+ missingMigrationIds: evidence.missingMigrationIds,
32
+ isStrictSubset: evidence.isStrictSubset,
33
+ repairAttempted: evidence.repairAttempted
34
+ }
35
+ });
36
+ this.name = 'AtlasMigrationNamespacePoisonedError';
37
+ this.evidence = evidence;
38
+ }
39
+ }
40
+ function malformedDescriptor() {
41
+ return new CapabilityError('The Atlas migrations descriptor is missing a migration list of filename and sql entries.', 'INTERNAL', {
42
+ reason: 'atlas-migrations-descriptor-malformed',
43
+ details: { kind: ATLAS_MIGRATIONS_KIND, id: ATLAS_MIGRATIONS_ID }
44
+ });
45
+ }
46
+ function declaredMigrations(runtime) {
47
+ if (!runtime.hasKind(ATLAS_MIGRATIONS_KIND))
48
+ return null;
49
+ const declared = runtime
50
+ .query(ATLAS_MIGRATIONS_KIND)
51
+ .descriptors()
52
+ .find((descriptor) => descriptor.id === ATLAS_MIGRATIONS_ID);
53
+ if (declared === undefined)
54
+ return null;
55
+ const parsed = AtlasMigrationsDescriptorSchema.safeParse(declared);
56
+ if (!parsed.success)
57
+ throw malformedDescriptor();
58
+ return parsed.data.migrations;
59
+ }
60
+ function migrationsFromDescriptor(entries) {
61
+ if (entries.length === 0) {
62
+ throw new CapabilityError('The Atlas migrations descriptor declared no migrations. Registering an empty set would stamp databases migrated.', 'NOT_FOUND', {
63
+ reason: 'atlas-migrations-not-found',
64
+ details: { kind: ATLAS_MIGRATIONS_KIND, id: ATLAS_MIGRATIONS_ID }
65
+ });
66
+ }
67
+ return entries.map(({ filename, sql }) => ({
68
+ version: parseVersionFromFilename(filename),
69
+ name: parseMigrationName(filename),
70
+ up: (db) => {
71
+ db.exec(sql);
72
+ }
73
+ }));
74
+ }
75
+ function unlocatedWorkspaceDatabase() {
76
+ return new CapabilityError(`${UNLOCATED_CONVENTION} lives under the caller's workspace, and this location query carries none.`, 'UNAVAILABLE', {
77
+ reason: 'workspace-location-uncarried',
78
+ recoveryHint: 'Read the database under the workspace root: <workspace>/.vibes/atlas/.'
79
+ });
80
+ }
81
+ function describeAtlasMigrationNamespace(runtime, expectedMigrations) {
82
+ const expectedMigrationIds = expectedMigrations.map(({ version, name }) => `${String(version).padStart(3, '0')}-${name}`);
83
+ const registeredMigrationIds = migrationRegistry.getMigrations(runtime, ATLAS_NAMESPACE).map(({ version, name }) => `${String(version).padStart(3, '0')}-${name}`);
84
+ const expectedMigrationIdSet = new Set(expectedMigrationIds);
85
+ const registeredMigrationIdSet = new Set(registeredMigrationIds);
86
+ const missingMigrationIds = expectedMigrationIds.filter((id) => !registeredMigrationIdSet.has(id));
87
+ return {
88
+ expectedMigrationIds,
89
+ registeredMigrationIds,
90
+ missingMigrationIds,
91
+ isStrictSubset: registeredMigrationIds.length < expectedMigrationIds.length &&
92
+ registeredMigrationIds.every((id) => expectedMigrationIdSet.has(id))
93
+ };
94
+ }
95
+ function reportRecovery(runtime, migrationCount) {
96
+ const logged = settleNow(() => {
97
+ getLogger('runtime-environment-bun.atlas-migrations', runtime).warn('Recovered a poisoned Atlas migration namespace.', { migrationCount });
98
+ });
99
+ if (logged.ok)
100
+ return;
101
+ settleNow(() => runtime.diagnostics.error('Atlas migration recovery could not be logged.', {
102
+ scope: 'runtime-environment-bun',
103
+ plugin: 'atlas-migrations',
104
+ error: valueFreeFailure(logged.cause)
105
+ }));
106
+ }
107
+ /**
108
+ * Register the declared Atlas migrations on this host.
109
+ *
110
+ * No kind, or no `workspace.atlas-migrations` descriptor, is absence: the host
111
+ * has nothing to register and does not refuse. Called from the Bun plugin's
112
+ * `onActivate`, after discovery, so a later feature plugin's descriptor is visible.
113
+ */
114
+ export function registerBunAtlasMigrations(runtime) {
115
+ const entries = declaredMigrations(runtime);
116
+ if (entries === null)
117
+ return;
118
+ const migrations = migrationsFromDescriptor(entries);
119
+ const registration = settleNow(() => localdb.registerMigrations(runtime, ATLAS_NAMESPACE, migrations, {
120
+ autoReset: true,
121
+ location: () => {
122
+ throw unlocatedWorkspaceDatabase();
123
+ }
124
+ }));
125
+ if (registration.ok)
126
+ return;
127
+ if (!isMigrationNamespaceRegistered(registration.cause, ATLAS_NAMESPACE)) {
128
+ throw isCapabilityError(registration.cause)
129
+ ? registration.cause
130
+ : new CapabilityError('Atlas migration registration failed.', 'INTERNAL', {
131
+ reason: 'atlas-migration-registration-failed',
132
+ cause: valueFreeFailure(registration.cause)
133
+ });
134
+ }
135
+ const evidence = describeAtlasMigrationNamespace(runtime, migrations);
136
+ const alreadyComplete = !evidence.missingMigrationIds.includes('001-initial_schema') && !evidence.isStrictSubset;
137
+ if (alreadyComplete)
138
+ return;
139
+ const repaired = localdb.replaceMigrations(runtime, ATLAS_NAMESPACE, migrations, {
140
+ expectedRegisteredIds: evidence.registeredMigrationIds
141
+ });
142
+ if (repaired) {
143
+ reportRecovery(runtime, migrations.length);
144
+ return;
145
+ }
146
+ throw new AtlasMigrationNamespacePoisonedError({ ...evidence, repairAttempted: true });
147
+ }
148
+ //# sourceMappingURL=register-atlas-host-migrations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-atlas-host-migrations.js","sourceRoot":"","sources":["../../src/atlas-migrations/register-atlas-host-migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,8BAA8B,EAAE,OAAO,EAAE,iBAAiB,EAAkB,MAAM,sBAAsB,CAAC;AAElH,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EACN,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,mBAAmB,EACnB,qBAAqB,EACrB,+BAA+B,EAE/B,MAAM,iDAAiD,CAAC;AAEzD,MAAM,eAAe,GAAG,OAAO,CAAC;AAChC,MAAM,oBAAoB,GAAG,mEAAmE,CAAC;AAUjG,MAAM,OAAO,oCAAqC,SAAQ,eAAe;IAC/D,QAAQ,CAAkC;IAEnD,YAAY,QAAyC;QACpD,KAAK,CACJ,mHAAmH;YAClH,CAAC,QAAQ,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AAI,EAAE,CAAC,CAAC;AACxF,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Explicit Bun-only capability, composed by the executable environment owner. */
2
+ import type { BufferedCaptureBackend } from '@vibesdotdev/execution-local';
3
+ export declare function createBunBufferedCaptureBackend(): BufferedCaptureBackend;
4
+ //# sourceMappingURL=buffered-capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffered-capture.d.ts","sourceRoot":"","sources":["../src/buffered-capture.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,wBAAgB,+BAA+B,IAAI,sBAAsB,CAExE"}
@@ -0,0 +1,18 @@
1
+ import { rm } from 'node:fs/promises';
2
+ import { type BufferedCaptureRequest } from '@vibesdotdev/execution-local';
3
+ export declare function executeBunCapture(input: BufferedCaptureRequest, removeCapture?: typeof rm): Promise<{
4
+ exitCode: null;
5
+ stdout: string;
6
+ stderr: string;
7
+ timedOut: boolean;
8
+ aborted: boolean;
9
+ durationMs: number;
10
+ } | {
11
+ exitCode: number | null;
12
+ stdout: string;
13
+ stderr: string;
14
+ timedOut: false;
15
+ aborted: false;
16
+ durationMs: number;
17
+ }>;
18
+ //# sourceMappingURL=buffered-capture.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffered-capture.impl.bun.d.ts","sourceRoot":"","sources":["../src/buffered-capture.impl.bun.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsC,EAAE,EAAa,MAAM,kBAAkB,CAAC;AAErF,OAAO,EAEN,KAAK,sBAAsB,EAC3B,MAAM,8BAA8B,CAAC;AAWtC,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,EAAE,aAAa,GAAE,OAAO,EAAO;;;;;;;;;;;;;;GAiHnG"}
@@ -0,0 +1,148 @@
1
+ /** Explicit Bun composition capability; ordinary buffered execution only. */
2
+ import { spawn, file } from 'bun';
3
+ import { CapabilityError } from '@vibesdotdev/kernel';
4
+ import { ExecuteOptionsSchema } from '@vibesdotdev/kernel/execution';
5
+ import { mkdir, mkdtemp, readFile, realpath, rm, writeFile } from 'node:fs/promises';
6
+ import { isAbsolute, join } from 'node:path';
7
+ import { attempt, EXECUTION_FAILURE_MESSAGE, ErrnoCauseSchema, executionError, hasErrno } from '@vibesdotdev/execution-local';
8
+ /** A typed refusal that retains only the errno category of the native cause. */
9
+ function executionFailure(reason, errno) {
10
+ return new CapabilityError(EXECUTION_FAILURE_MESSAGE, 'UNAVAILABLE', {
11
+ reason, retryable: false, details: errno === undefined ? undefined : { errno }
12
+ });
13
+ }
14
+ export async function executeBunCapture(input, removeCapture = rm) {
15
+ const request = { ...input, args: [...input.args], env: { ...input.env } };
16
+ const encoding = ExecuteOptionsSchema.shape.stdoutEncoding.safeParse(request.stdoutEncoding);
17
+ if (!encoding.success)
18
+ throw new CapabilityError('The stdout encoding must be utf8 or base64.', 'INVALID_INPUT', {
19
+ reason: 'execution-stdout-encoding-invalid', retryable: false
20
+ });
21
+ const start = request.lifecycle.now();
22
+ if (request.platform !== 'darwin')
23
+ throw executionError('execution-buffered-capture-platform-unavailable');
24
+ if (!isAbsolute(request.tempDir) || !isAbsolute(request.cwd) || !isAbsolute(request.command)) {
25
+ throw executionError('execution-buffered-capture-invalid');
26
+ }
27
+ let timedOut = false;
28
+ let aborted = request.signal?.aborted ?? false;
29
+ let child;
30
+ let directory;
31
+ let disarmDeadline;
32
+ let terminationFailure;
33
+ let stage = 'prepare';
34
+ let primaryStage;
35
+ // The exit race below owns a termination failure, including an immediate abort.
36
+ let reportTermination;
37
+ const terminationFailed = new Promise(resolve => {
38
+ reportTermination = failure => resolve({ failure });
39
+ });
40
+ const elapsed = () => Math.round(request.lifecycle.now() - start);
41
+ const stopped = () => ({ exitCode: null, stdout: '', stderr: aborted ? 'Process execution aborted by signal' : '', timedOut, aborted, durationMs: elapsed() });
42
+ const terminate = () => {
43
+ const target = child;
44
+ if (!target)
45
+ return;
46
+ // detached:true below creates this group; never target an inherited group.
47
+ const killed = attempt(() => { if (request.killTree)
48
+ process.kill(-target.pid, 'SIGKILL');
49
+ else
50
+ target.kill('SIGKILL'); });
51
+ if ('failure' in killed && !hasErrno(killed.failure, 'ESRCH')) {
52
+ terminationFailure = executionError('execution-buffered-capture-cleanup-failed', killed.failure);
53
+ reportTermination(terminationFailure);
54
+ }
55
+ };
56
+ const abort = () => { aborted = true; terminate(); };
57
+ const capture = async () => {
58
+ try {
59
+ if (aborted)
60
+ return stopped();
61
+ await mkdir(request.tempDir, { recursive: true });
62
+ const base = await realpath(request.tempDir);
63
+ directory = await mkdtemp(join(base, 'execution-capture-'));
64
+ const stdoutPath = join(directory, 'stdout');
65
+ const stderrPath = join(directory, 'stderr');
66
+ const stdinPath = join(directory, 'stdin');
67
+ if (request.stdin !== undefined)
68
+ await writeFile(stdinPath, request.stdin, { flag: 'wx' });
69
+ const remaining = request.timeoutMs === undefined || request.timeoutMs === 0 ? undefined : request.timeoutMs - (request.lifecycle.now() - start);
70
+ aborted = request.signal?.aborted ?? false;
71
+ timedOut = remaining !== undefined && remaining <= 0;
72
+ if (aborted || timedOut)
73
+ return stopped();
74
+ stage = 'launch';
75
+ const launched = attempt(() => spawn([request.command, ...request.args], {
76
+ cwd: request.cwd, env: request.env, detached: request.killTree === true,
77
+ stdin: request.stdin === undefined ? 'ignore' : file(stdinPath),
78
+ stdout: file(stdoutPath), stderr: file(stderrPath)
79
+ }));
80
+ if ('failure' in launched)
81
+ throw executionError('execution-buffered-capture-launch-failed', launched.failure);
82
+ child = launched.value;
83
+ request.signal?.addEventListener('abort', abort, { once: true });
84
+ if (request.signal?.aborted)
85
+ abort();
86
+ if (remaining !== undefined)
87
+ disarmDeadline = request.lifecycle.timeout(() => { timedOut = true; terminate(); }, remaining);
88
+ stage = 'wait';
89
+ const winner = await Promise.race([child.exited.then(exitCode => ({ exitCode })), terminationFailed]);
90
+ if (terminationFailure)
91
+ throw terminationFailure;
92
+ if ('failure' in winner)
93
+ throw winner.failure;
94
+ const code = winner.exitCode;
95
+ stage = 'capture';
96
+ const [stdoutBytes, capturedStderr] = await Promise.all([readFile(stdoutPath), readFile(stderrPath, 'utf8')]);
97
+ const stdout = stdoutBytes.toString(encoding.data ?? 'utf8');
98
+ const stderr = aborted ? (capturedStderr ? `${capturedStderr}\nProcess execution aborted by signal` : 'Process execution aborted by signal') : capturedStderr;
99
+ return { exitCode: aborted ? null : code, stdout, stderr, timedOut, aborted, durationMs: elapsed() };
100
+ }
101
+ catch (error) {
102
+ primaryStage = stage;
103
+ if (error instanceof CapabilityError)
104
+ throw error;
105
+ throw executionFailure('execution-buffered-capture-failed', ErrnoCauseSchema.safeParse(error).data);
106
+ }
107
+ };
108
+ // Releases what the capture owns; reports whether cleanup could not be confirmed.
109
+ const release = async () => {
110
+ disarmDeadline?.();
111
+ request.signal?.removeEventListener('abort', abort);
112
+ let unconfirmed = terminationFailure !== undefined;
113
+ if (child && child.exitCode === null) {
114
+ terminate();
115
+ unconfirmed ||= terminationFailure !== undefined;
116
+ if (!unconfirmed) {
117
+ const [exited] = await Promise.allSettled([child.exited]);
118
+ unconfirmed = exited.status === 'rejected';
119
+ }
120
+ else {
121
+ // Retain cleanup failure without leaving a rejected exit promise unobserved.
122
+ void Promise.allSettled([child.exited]).then(([exited]) => {
123
+ if (exited.status === 'rejected')
124
+ request.diagnostics?.warn?.('child-exit-rejected', {
125
+ reason: exited.reason instanceof Error ? exited.reason.message : String(exited.reason)
126
+ });
127
+ });
128
+ }
129
+ }
130
+ // A failed termination leaves its owned files for recovery, not false cleanup.
131
+ if (directory && !unconfirmed) {
132
+ const [removed] = await Promise.allSettled([removeCapture(directory, { recursive: true })]);
133
+ unconfirmed = removed.status === 'rejected';
134
+ }
135
+ return unconfirmed;
136
+ };
137
+ const [primary] = await Promise.allSettled([capture()]);
138
+ // An unconfirmed cleanup outranks both the result and the primary failure.
139
+ if (await release())
140
+ throw new CapabilityError('Buffered capture cleanup could not be confirmed.', 'UNAVAILABLE', {
141
+ reason: 'execution-buffered-capture-cleanup-failed', retryable: false,
142
+ details: { cleanup: 'failed', primaryStage: primaryStage ?? 'completed' }
143
+ });
144
+ if (primary.status === 'rejected')
145
+ throw primary.reason;
146
+ return primary.value;
147
+ }
148
+ //# sourceMappingURL=buffered-capture.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffered-capture.impl.bun.js","sourceRoot":"","sources":["../src/buffered-capture.impl.bun.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EACN,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAE9E,MAAM,8BAA8B,CAAC;AAEtC,gFAAgF;AAChF,SAAS,gBAAgB,CAAC,MAAc,EAAE,KAAc;IACvD,OAAO,IAAI,eAAe,CAAC,yBAAyB,EAAE,aAAa,EAAE;QACpE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE;KAC9E,CAAC,CAAC;AACJ,CAAC;AAID,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAA6B,EAAE,gBAA2B,EAAE;IACnG,MAAM,OAAO,GAAG,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,GA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,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,IAAI,WAAW,EAAE;SACzE,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU;QAAE,MAAM,OAAO,CAAC,MAAM,CAAC;IACxD,OAAO,OAAO,CAAC,KAAK,CAAC;AACtB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { executeBunCapture } from "./buffered-capture.impl.bun.js";
2
+ export function createBunBufferedCaptureBackend() {
3
+ return { execute: executeBunCapture };
4
+ }
5
+ //# sourceMappingURL=buffered-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffered-capture.js","sourceRoot":"","sources":["../src/buffered-capture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,MAAM,UAAU,+BAA+B;IAC9C,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;AACvC,CAAC"}
@@ -0,0 +1,231 @@
1
+ /**
2
+ * Bun Runtime Environment Implementation
3
+ *
4
+ * Captures environment at construction and provides Bun-specific
5
+ * implementations for scope, env access, and module loading (credentials are the
6
+ * host's `secrets/store`, read through `runtime.resolveCredential`).
7
+ */
8
+ import type { RuntimeExecutableFreshness, RuntimeGraphFreshness } from '@vibesdotdev/kernel/schemas/registry';
9
+ import { type GraphIdentity } from './services/graph-freshness.impl.bun.ts';
10
+ import { type HostExecutableIdentity } from './services/executable-identity.impl.bun.ts';
11
+ import { type BunArgv, type SelfSpawnSource } from './services/self-spawn.impl.bun.ts';
12
+ import { type BunHostDeclaration, type BunHostFacts } from './host-channel.impl.bun.ts';
13
+ import { type EnvironmentIdentity, type RuntimeEnvironmentImplementation, type RuntimeInvocationStore, type RuntimeLoaderImplementation, type RuntimeScope, type RuntimeSystemResources, type RuntimeLaunchIdentity, type RuntimeTerminalFacts, type RuntimeUserEnvironmentHost, type WorkspaceBinding } from '@vibesdotdev/kernel';
14
+ import type { RuntimePath } from '@vibesdotdev/paths';
15
+ import { type BunEnvironmentOptions } from './schemas/environment.ts';
16
+ export type { BunEnvironmentOptions, BunPathSelection, BunScopeDeclaration, BunScopeHostFacts, BunSystemResourceReading } from './schemas/environment.ts';
17
+ export type { BunHostDeclaration, BunHostFacts };
18
+ export declare class BunEnvironment implements RuntimeEnvironmentImplementation {
19
+ readonly resources: Readonly<{
20
+ classifier: {
21
+ classifyExecutable: (facts: import("@vibesdotdev/execution-local").ExecutableClassificationFacts) => HostExecutableIdentity;
22
+ executableIdentityFrom: (env: import("@vibesdotdev/execution-local").HostEnvSnapshot) => HostExecutableIdentity;
23
+ executableIdentity: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => HostExecutableIdentity;
24
+ hostModulesOnDisk: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
25
+ isStandaloneExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
26
+ hostEntryPath: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => string | null;
27
+ resetForTest: () => void;
28
+ };
29
+ executable: {
30
+ isCompiledExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
31
+ processStartedAtMs: () => number;
32
+ statExecutable: (path: string) => import("@vibesdotdev/execution-local").ExecutableFileStat | null;
33
+ executableHostFactsOf: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").ExecutableHostFacts;
34
+ describeExecutable: (path: string, host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
35
+ captureExecutableIdentity: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
36
+ getCapturedExecutableIdentity: () => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
37
+ judgeExecutableReplaced: (loaded: import("@vibesdotdev/execution-local").ExecutableFileStat, current: import("@vibesdotdev/execution-local").ExecutableFileStat, processStartMs: number) => boolean;
38
+ checkExecutableFreshness: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableFreshness;
39
+ executableReplacedSince: (path: string, processStartMs: number) => import("@vibesdotdev/execution-local").ExecutableReplacedSince;
40
+ resetForTest: () => void;
41
+ };
42
+ outputPlane: {
43
+ install: (options: import("@vibesdotdev/kernel").RuntimeStdioTrackOptions) => void;
44
+ isInstalled: () => boolean;
45
+ uninstall: () => void;
46
+ setFormatter: (next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter) => void;
47
+ formatConsoleArgs: (args: readonly unknown[]) => string;
48
+ flush: () => Promise<void>;
49
+ };
50
+ writeOutput(channel: "stdout" | "stderr", text: string): void;
51
+ readonly fatal: {
52
+ subscribe: (listener: import("@vibesdotdev/kernel").RuntimeFatalListener) => () => void;
53
+ subscriberCount: () => number;
54
+ };
55
+ setFormatter(next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter): void;
56
+ retain(): () => Promise<void>;
57
+ streams(): import("@vibesdotdev/kernel").RuntimeStdioStreams;
58
+ dispose(): Promise<void>;
59
+ }>;
60
+ readonly httpFetch: (input: Request | string | URL, init?: RequestInit, options?: {
61
+ rejectUnauthorized?: boolean;
62
+ }) => Promise<Response>;
63
+ createInvocationStore(): RuntimeInvocationStore;
64
+ /** The declared resolution root R, or null when this host declared none. */
65
+ readonly hostRoot: string | null;
66
+ /**
67
+ * The host protocol pass set (rc05 §2.4 M2): a shim-launched host passes
68
+ * the shim's custody keys to its children; any other Bun host publishes
69
+ * none. Declared here by the host owner; the runtime validates it at
70
+ * registration and callers never extend it.
71
+ */
72
+ readonly hostProtocolEnv: readonly string[];
73
+ /** This host's executable identity, classified once from its own capture, with how it reached R. */
74
+ hostIdentity(): HostExecutableIdentity & {
75
+ readonly hostScope: string | null;
76
+ readonly hostRootCustody: boolean;
77
+ };
78
+ /**
79
+ * The host facts this environment captured once: R, the entry, self-spawn
80
+ * and the rest of the shim channel (null on a non-shim host), `user.home`
81
+ * and the bound workspace.
82
+ */
83
+ hostFacts(): BunHostFacts;
84
+ /**
85
+ * The OS account's home from the account database, captured at construction;
86
+ * throws `account-home-unavailable` when the host could not read it.
87
+ */
88
+ accountHome(): string;
89
+ /** The argv this process was launched with, captured once. */
90
+ argv(): readonly string[];
91
+ /** The terminal this host was launched on, as its launching shell published it (captured once). */
92
+ terminal(): RuntimeTerminalFacts;
93
+ /** The process manager's launch stamp this host captured, or null. */
94
+ managedProcessId(): string | null;
95
+ /** The identity the launching harness declared for this shell, captured once. */
96
+ launchIdentity(): RuntimeLaunchIdentity;
97
+ /** The shim's channel version, else the version this host declared, else null. */
98
+ hostVersion(): string | null;
99
+ /** The workspace this host was bound to at construction, or null. `runtime/workspace-path` reads it. */
100
+ workspaceBinding(): WorkspaceBinding | null;
101
+ /** The CLI re-entry argv this host declared, or null. */
102
+ selfSpawnArgv(): string[] | null;
103
+ /** The self-spawn source this host declared, or null. */
104
+ selfSpawnSource(): SelfSpawnSource | null;
105
+ /** The argv that runs Bun itself from this host. */
106
+ scriptRuntimeArgv(): BunArgv;
107
+ graphIdentity(root?: string): {
108
+ root: string;
109
+ lockPath: string | null;
110
+ digest: string | null;
111
+ mtimeMs: number | null;
112
+ size: number | null;
113
+ capturedAt: string;
114
+ } | null;
115
+ /** This physical host's graph at construction; current disk probes never rewrite it. */
116
+ loadedGraphIdentity(): Readonly<GraphIdentity> | null;
117
+ /**
118
+ * Whether the executable this process runs was replaced on disk after it
119
+ * started (executable-identity). Pinned at construction — the earliest
120
+ * point a Bun host has a runtime — so a late probe cannot mis-pin a
121
+ * replaced file; the start-time rule inside the nerve covers the rest.
122
+ */
123
+ executableFreshness(): RuntimeExecutableFreshness;
124
+ /**
125
+ * Whether the module graph under this process's resolution root was replaced
126
+ * after it was imported (graph-freshness). The sibling nerve: under a thin
127
+ * host the executable is recompiled very rarely and `vibes update` moves the
128
+ * plugins instead, so a body judged by the executable alone reports green
129
+ * while serving code nobody has on disk.
130
+ */
131
+ graphFreshness(): RuntimeGraphFreshness;
132
+ readonly id: string;
133
+ readonly description: string;
134
+ readonly identity: EnvironmentIdentity;
135
+ readonly scope: RuntimeScope;
136
+ readonly loader: RuntimeLoaderImplementation;
137
+ readonly userEnvironment: RuntimeUserEnvironmentHost;
138
+ readonly runtimePath: RuntimePath;
139
+ /** Captured at construction; explicit workspace authority never mutates launch cwd. */
140
+ private readonly _cwd;
141
+ private readonly _argv;
142
+ private readonly _envSnapshot;
143
+ private readonly _hostFacts;
144
+ private readonly _platform;
145
+ private readonly _declaredVersion;
146
+ private readonly _arch;
147
+ private readonly _hostname;
148
+ private readonly _uid;
149
+ private readonly _hostIdentity;
150
+ private readonly _accountHome;
151
+ private readonly _loadedGraph;
152
+ private readonly _systemResources;
153
+ private readonly _monotonicNow;
154
+ monotonicNow(): number;
155
+ getWallClockMs(): number;
156
+ systemResources(): RuntimeSystemResources;
157
+ constructor(options: BunEnvironmentOptions, resources?: Readonly<{
158
+ classifier: {
159
+ classifyExecutable: (facts: import("@vibesdotdev/execution-local").ExecutableClassificationFacts) => HostExecutableIdentity;
160
+ executableIdentityFrom: (env: import("@vibesdotdev/execution-local").HostEnvSnapshot) => HostExecutableIdentity;
161
+ executableIdentity: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => HostExecutableIdentity;
162
+ hostModulesOnDisk: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
163
+ isStandaloneExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
164
+ hostEntryPath: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => string | null;
165
+ resetForTest: () => void;
166
+ };
167
+ executable: {
168
+ isCompiledExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
169
+ processStartedAtMs: () => number;
170
+ statExecutable: (path: string) => import("@vibesdotdev/execution-local").ExecutableFileStat | null;
171
+ executableHostFactsOf: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").ExecutableHostFacts;
172
+ describeExecutable: (path: string, host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
173
+ captureExecutableIdentity: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
174
+ getCapturedExecutableIdentity: () => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
175
+ judgeExecutableReplaced: (loaded: import("@vibesdotdev/execution-local").ExecutableFileStat, current: import("@vibesdotdev/execution-local").ExecutableFileStat, processStartMs: number) => boolean;
176
+ checkExecutableFreshness: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableFreshness;
177
+ executableReplacedSince: (path: string, processStartMs: number) => import("@vibesdotdev/execution-local").ExecutableReplacedSince;
178
+ resetForTest: () => void;
179
+ };
180
+ outputPlane: {
181
+ install: (options: import("@vibesdotdev/kernel").RuntimeStdioTrackOptions) => void;
182
+ isInstalled: () => boolean;
183
+ uninstall: () => void;
184
+ setFormatter: (next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter) => void;
185
+ formatConsoleArgs: (args: readonly unknown[]) => string;
186
+ flush: () => Promise<void>;
187
+ };
188
+ writeOutput(channel: "stdout" | "stderr", text: string): void;
189
+ readonly fatal: {
190
+ subscribe: (listener: import("@vibesdotdev/kernel").RuntimeFatalListener) => () => void;
191
+ subscriberCount: () => number;
192
+ };
193
+ setFormatter(next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter): void;
194
+ retain(): () => Promise<void>;
195
+ streams(): import("@vibesdotdev/kernel").RuntimeStdioStreams;
196
+ dispose(): Promise<void>;
197
+ }>, capture?: {
198
+ readonly env: Readonly<Record<string, string>>;
199
+ readonly cwd: string;
200
+ });
201
+ private childEnvComposer;
202
+ /**
203
+ * Bind the composer for this environment's own children (the Windows user
204
+ * environment's PowerShell): the kernel's host set of the runtime that
205
+ * registered it. `installBunEnvironment` binds it once the runtime exists.
206
+ */
207
+ bindChildEnv(compose: () => Record<string, string>): void;
208
+ private childEnv;
209
+ /** Bun owns cwd; universal Runtime consumers receive it through this contract. */
210
+ getCwd(): string;
211
+ /** Capture environment variables once, at construction. The only process.env read. */
212
+ private _captureEnv;
213
+ /**
214
+ * Get environment variable from captured snapshot.
215
+ * No direct process.env access.
216
+ */
217
+ getEnv(key: string): string | undefined;
218
+ getPlatform(): string;
219
+ /** The process's CPU architecture (`process.arch` spelling), captured once. */
220
+ getArch(): string;
221
+ /** The host machine's hostname, captured once. */
222
+ getHostname(): string;
223
+ /** Non-internal IPv4 and IPv6 addresses of this host. */
224
+ getLanAddresses(): readonly string[];
225
+ /** The account identity captured at host construction, never the invocation actor. */
226
+ getUid(): number;
227
+ getEnvSnapshot(): {
228
+ [x: string]: string;
229
+ };
230
+ }
231
+ //# sourceMappingURL=bun-environment.impl.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bun-environment.impl.bun.d.ts","sourceRoot":"","sources":["../src/bun-environment.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACX,0BAA0B,EAC1B,qBAAqB,EACrB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGN,KAAK,aAAa,EAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,KAAK,sBAAsB,EAC3B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAEN,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAiG,KAAK,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAGvL,OAAO,EASN,KAAK,mBAAmB,EACxB,KAAK,gCAAgC,EAErC,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,E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