@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,181 @@
1
+ /** Real Bun HTTP transport for one isolated, protected test realm. */
2
+ import { lstatSync, realpathSync } from 'node:fs';
3
+ import { basename, dirname, isAbsolute, join, relative, sep } from 'node:path';
4
+ import { CapabilityError } from '@vibesdotdev/kernel';
5
+ import * as z from 'zod/v4';
6
+ import { serve } from 'bun';
7
+ const declaration = z.object({
8
+ writableRoot: z.string().min(1),
9
+ followRedirects: z.boolean().optional(),
10
+ endpoints: z.array(z.object({ origin: z.string().min(1), socket: z.string().min(1) }).strict()).min(1)
11
+ }).strict();
12
+ // One scoped standard-fetch owner per isolated test realm. Retain custody
13
+ // after foreign replacement until the original owner can restore it safely.
14
+ let activeTransport;
15
+ const REDIRECT_STATUSES = new Set([301, 302, 303, 307, 308]);
16
+ const MAX_REDIRECTS = 20;
17
+ const CROSS_ORIGIN_STRIPPED = ['authorization', 'cookie', 'proxy-authorization'];
18
+ const BODY_HEADERS = ['content-type', 'content-length', 'content-encoding', 'content-language', 'content-location'];
19
+ function invalid(cause) {
20
+ return new CapabilityError('Invalid declared Unix HTTP transport.', 'INVALID_INPUT', {
21
+ reason: 'test-unix-http-invalid', retryable: false, cause
22
+ });
23
+ }
24
+ /** A native host-fact read for admission; its failure refuses the declaration, keeping the native error as cause. */
25
+ function admitted(read) {
26
+ try {
27
+ return read();
28
+ }
29
+ catch (error) {
30
+ throw invalid(error instanceof Error ? error : undefined);
31
+ }
32
+ }
33
+ function conflict() {
34
+ return new CapabilityError('The test HTTP transport already has an owner or was changed during ownership.', 'CONFLICT', {
35
+ reason: 'test-unix-http-custody-conflict', retryable: false
36
+ });
37
+ }
38
+ /** Bind real HTTP requests to declared pathname sockets. The OS execution
39
+ * owner must separately admit these exact sockets: this transport is not
40
+ * containment. No TCP fallback, response synthesis, DNS or abstract socket.
41
+ */
42
+ function admittedEndpoints(input) {
43
+ const parsed = declaration.safeParse(input);
44
+ if (!parsed.success)
45
+ throw invalid();
46
+ if (!isAbsolute(parsed.data.writableRoot))
47
+ throw invalid();
48
+ const writableRoot = parsed.data.writableRoot;
49
+ const root = admitted(() => realpathSync(writableRoot));
50
+ const endpoints = new Map();
51
+ for (const endpoint of parsed.data.endpoints) {
52
+ if (!URL.canParse(endpoint.origin))
53
+ throw invalid();
54
+ const origin = new URL(endpoint.origin);
55
+ if (origin.protocol !== 'http:' || origin.origin !== endpoint.origin || origin.username || origin.password ||
56
+ !isAbsolute(endpoint.socket) || endpoint.socket.includes('\0'))
57
+ throw invalid();
58
+ const socket = join(admitted(() => realpathSync(dirname(endpoint.socket))), basename(endpoint.socket));
59
+ const part = relative(root, socket);
60
+ // An absent socket is admissible (the server creates it); anything else there must be a socket.
61
+ const existing = admitted(() => lstatSync(endpoint.socket, { throwIfNoEntry: false }));
62
+ if (existing !== undefined && !existing.isSocket())
63
+ throw invalid();
64
+ if (!part || isAbsolute(part) || part === '..' || part.startsWith(`..${sep}`) ||
65
+ endpoints.has(origin.origin) || [...endpoints.values()].includes(socket))
66
+ throw invalid();
67
+ endpoints.set(origin.origin, socket);
68
+ }
69
+ return endpoints;
70
+ }
71
+ /** Real server on one exact declared endpoint. Importing this Bun-only public
72
+ * entrypoint on an unsupported engine fails native module admission rather
73
+ * than using a Web fetch implementation that might ignore the unix option.
74
+ */
75
+ export function createUnixHttpServer(input, origin, handler) {
76
+ const socket = admittedEndpoints(input).get(origin);
77
+ if (!socket)
78
+ throw invalid();
79
+ return serve({ unix: socket, fetch: handler });
80
+ }
81
+ export function createUnixHttpFetch(input) {
82
+ const endpoints = admittedEndpoints(input);
83
+ const nativeFetch = globalThis.fetch;
84
+ const followRedirects = input.followRedirects === true;
85
+ if (activeTransport)
86
+ throw conflict();
87
+ const transport = async (input, init) => {
88
+ const target = input instanceof Request ? input.url : String(input);
89
+ if (!URL.canParse(target))
90
+ throw invalid();
91
+ const origin = new URL(target).origin;
92
+ const socket = endpoints.get(origin);
93
+ if (!socket)
94
+ throw new CapabilityError('HTTP destination was not declared by this test workload.', 'UNAVAILABLE', {
95
+ reason: 'test-unix-http-undeclared-origin', retryable: false
96
+ });
97
+ // A native redirect must not initiate an undeclared destination inside
98
+ // fetch. Default: return the real redirect response for an explicit
99
+ // caller choice. With `followRedirects`, follow it here, hop by hop,
100
+ // only to declared origins.
101
+ const send = (target, requestInit, socketPath) => nativeFetch(target, { ...requestInit, redirect: 'manual', unix: socketPath, verbose: false });
102
+ if (!followRedirects)
103
+ return send(input, init, socket);
104
+ // One normalized request (method, headers, replayable body, signal) so every
105
+ // hop is built from the same facts whether the caller passed a URL or a Request.
106
+ const request = input instanceof Request ? new Request(input, init) : new Request(String(input), init);
107
+ const policy = request.redirect;
108
+ const requestBody = request.method === 'GET' || request.method === 'HEAD' ? undefined : await request.clone().arrayBuffer();
109
+ const headers = new Headers(request.headers);
110
+ let method = request.method;
111
+ let body = requestBody;
112
+ let current = new URL(request.url);
113
+ let response = await send(current.href, { method, headers, body, signal: request.signal }, socket);
114
+ for (let hops = 0; REDIRECT_STATUSES.has(response.status) && policy !== 'manual'; hops++) {
115
+ const location = response.headers.get('location');
116
+ if (location === null)
117
+ return response;
118
+ if (policy === 'error')
119
+ throw new CapabilityError('The test HTTP transport refused a redirect.', 'UNAVAILABLE', {
120
+ reason: 'test-unix-http-redirect-refused', retryable: false
121
+ });
122
+ if (hops >= MAX_REDIRECTS)
123
+ throw new CapabilityError('Too many test HTTP redirects.', 'UNAVAILABLE', {
124
+ reason: 'test-unix-http-redirect-limit', retryable: false
125
+ });
126
+ const previous = current;
127
+ current = new URL(location, previous);
128
+ const next = endpoints.get(current.origin);
129
+ if (!next)
130
+ throw new CapabilityError('HTTP redirect destination was not declared by this test workload.', 'UNAVAILABLE', {
131
+ reason: 'test-unix-http-undeclared-origin', retryable: false
132
+ });
133
+ // Fetch-spec hygiene: credentials never cross origins; a rewritten GET carries no body headers.
134
+ if (current.origin !== previous.origin)
135
+ for (const name of CROSS_ORIGIN_STRIPPED)
136
+ headers.delete(name);
137
+ if (response.status === 303 ? method !== 'HEAD' : (response.status === 301 || response.status === 302) && method === 'POST') {
138
+ method = 'GET';
139
+ body = undefined;
140
+ for (const name of BODY_HEADERS)
141
+ headers.delete(name);
142
+ }
143
+ await response.body?.cancel();
144
+ response = await send(current.href, { method, headers, body, signal: request.signal }, next);
145
+ }
146
+ return response;
147
+ };
148
+ return Object.assign(transport, {
149
+ preconnect() {
150
+ throw new CapabilityError('IP preconnection is not granted by the Unix HTTP workload.', 'UNAVAILABLE', {
151
+ reason: 'test-unix-http-preconnect-denied', retryable: false
152
+ });
153
+ }
154
+ });
155
+ }
156
+ /** Scoped bridge for owners that use standard Web fetch. Install only inside
157
+ * a separately protected, isolated workload; it never modifies response data
158
+ * or feature code. Overlapping owners and foreign changes fail visibly.
159
+ */
160
+ export function installUnixHttpTransport(input) {
161
+ if (activeTransport)
162
+ throw conflict();
163
+ const original = globalThis.fetch;
164
+ const transport = createUnixHttpFetch(input);
165
+ let disposed = false;
166
+ activeTransport = transport;
167
+ globalThis.fetch = transport;
168
+ return {
169
+ fetch: transport,
170
+ [Symbol.dispose]() {
171
+ if (disposed)
172
+ return;
173
+ if (globalThis.fetch !== transport)
174
+ throw conflict();
175
+ globalThis.fetch = original;
176
+ activeTransport = undefined;
177
+ disposed = true;
178
+ }
179
+ };
180
+ }
181
+ //# sourceMappingURL=unix-http.impl.bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unix-http.impl.bun.js","sourceRoot":"","sources":["../../src/test-tooling/unix-http.impl.bun.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OA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I,EAAE,MAAM,EAAE,CAAC;YAC9B,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;QAC/B,UAAU;YACT,MAAM,IAAI,eAAe,CAAC,4DAA4D,EAAE,aAAa,EAAE;gBACtG,MAAM,EAAE,kCAAkC,EAAE,SAAS,EAAE,KAAK;aAC5D,CAAC,CAAC;QACJ,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAA0B;IAClE,IAAI,eAAe;QAAE,MAAM,QAAQ,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC;IAClC,MAAM,SAAS,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC7C,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,eAAe,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC;IAC7B,OAAO;QACN,KAAK,EAAE,SAAS;QAChB,CAAC,MAAM,CAAC,OAAO,CAAC;YACf,IAAI,QAAQ;gBAAE,OAAO;YACrB,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS;gBAAE,MAAM,QAAQ,EAAE,CAAC;YACrD,UAAU,CAAC,KAAK,GAAG,QAAQ,CAAC;YAC5B,eAAe,GAAG,SAAS,CAAC;YAC5B,QAAQ,GAAG,IAAI,CAAC;QACjB,CAAC;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Registers the Bun host's `runtime/transpiler`: the canonical `typescript` id
3
+ * at the host priority, over the runtime's base (the source as written). Its
4
+ * transpile is the applet serve-host's `Bun.Transpiler` call, so the host has
5
+ * one; the module loads when the kind is first resolved.
6
+ */
7
+ import { type RuntimeRef } from '@vibesdotdev/kernel';
8
+ /** Register the kind and its base (when absent), then the Bun host's TypeScript transpiler over them. */
9
+ export declare function registerBunTranspiler(runtime: RuntimeRef): void;
10
+ //# sourceMappingURL=transpiler.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transpiler.plugin.d.ts","sourceRoot":"","sources":["../../src/transpiler/transpiler.plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAA+B,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AASnF,yGAAyG;AACzG,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAO/D"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Registers the Bun host's `runtime/transpiler`: the canonical `typescript` id
3
+ * at the host priority, over the runtime's base (the source as written). Its
4
+ * transpile is the applet serve-host's `Bun.Transpiler` call, so the host has
5
+ * one; the module loads when the kind is first resolved.
6
+ */
7
+ import { createRuntimeImplementation } from '@vibesdotdev/kernel';
8
+ import { HOST_TRANSPILER_PRIORITY, RUNTIME_TRANSPILER_KIND, TYPESCRIPT_TRANSPILER_ID, registerRuntimeTranspiler } from '@vibesdotdev/kernel/kinds/transpiler.kind';
9
+ /** Register the kind and its base (when absent), then the Bun host's TypeScript transpiler over them. */
10
+ export function registerBunTranspiler(runtime) {
11
+ registerRuntimeTranspiler(runtime);
12
+ runtime.registerLoader(RUNTIME_TRANSPILER_KIND, TYPESCRIPT_TRANSPILER_ID, async () => {
13
+ const { transpileTypeScriptSource } = await import("../applet-serve-host/applet-serve-host.impl.bun.js");
14
+ const implementation = { transpileTypeScript: transpileTypeScriptSource };
15
+ return createRuntimeImplementation({ kind: RUNTIME_TRANSPILER_KIND, id: TYPESCRIPT_TRANSPILER_ID, priority: HOST_TRANSPILER_PRIORITY, implementation });
16
+ }, { priority: HOST_TRANSPILER_PRIORITY });
17
+ }
18
+ //# sourceMappingURL=transpiler.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transpiler.plugin.js","sourceRoot":"","sources":["../../src/transpiler/transpiler.plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,2BAA2B,EAAmB,MAAM,qBAAqB,CAAC;AACnF,OAAO,EACN,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EAEzB,MAAM,2CAA2C,CAAC;AAEnD,yGAAyG;AACzG,MAAM,UAAU,qBAAqB,CAAC,OAAmB;IACxD,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,cAAc,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACpF,MAAM,EAAE,yBAAyB,EAAE,GAAG,MAAM,MAAM,CAAC,oDAAoD,CAAC,CAAC;QACzG,MAAM,cAAc,GAAsB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,CAAC;QAC7F,OAAO,2BAA2B,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,EAAE,wBAAwB,EAAE,QAAQ,EAAE,wBAAwB,EAAE,cAAc,EAAE,CAAC,CAAC;IACzJ,CAAC,EAAE,EAAE,QAAQ,EAAE,wBAAwB,EAAE,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,23 @@
1
+ [workspace]
2
+
3
+ [package]
4
+ name = "vibes-held-launch"
5
+ version = "0.1.0"
6
+ edition = "2024"
7
+ publish = false
8
+
9
+ [lib]
10
+ name = "vibes_held_launch"
11
+ crate-type = ["rlib", "cdylib"]
12
+
13
+ [[bin]]
14
+ name = "vibes-held-launch"
15
+ path = "src/bin/vibes-held-launch.rs"
16
+
17
+ [dependencies]
18
+ # build-native stages the published crateRoot at this explicit relative path.
19
+ # Prepare that owned build workspace before invoking Cargo; no checkout fallback.
20
+ vibes-native-core = { path = "../vibes-native-core" }
21
+
22
+ [profile.release]
23
+ panic = "abort"
@@ -0,0 +1,234 @@
1
+ {
2
+ "version": 1,
3
+ "description": "Held-launch ABI candidate. Distributed artifact gates must compare actual exported symbols and mechanically extracted signatures; any mismatch is a hard failure. Source signatures include the shared last_error_plane!(vhl) macro export. No native certification is claimed until the actual paired helper/library and runtime consumer are verified.",
4
+ "artifact": {
5
+ "linkage": "cdylib",
6
+ "name": "libvibes_held_launch.dylib"
7
+ },
8
+ "symbolsGolden": "native/held-launch/symbols.golden",
9
+ "symbols": {
10
+ "target": [
11
+ "_vhl_advance_ready",
12
+ "_vhl_control_fd",
13
+ "_vhl_control_interest",
14
+ "_vhl_dispose",
15
+ "_vhl_events_cancel",
16
+ "_vhl_events_create",
17
+ "_vhl_events_dispose",
18
+ "_vhl_events_finish",
19
+ "_vhl_events_watch_child",
20
+ "_vhl_events_watch_fd",
21
+ "_vhl_exec_status",
22
+ "_vhl_identity",
23
+ "_vhl_last_error",
24
+ "_vhl_pid",
25
+ "_vhl_ready",
26
+ "_vhl_reap",
27
+ "_vhl_release",
28
+ "_vhl_resize",
29
+ "_vhl_spawn",
30
+ "_vhl_take_fd",
31
+ "_vhl_terminate"
32
+ ],
33
+ "implemented": [
34
+ "_vhl_advance_ready",
35
+ "_vhl_control_fd",
36
+ "_vhl_control_interest",
37
+ "_vhl_dispose",
38
+ "_vhl_events_cancel",
39
+ "_vhl_events_create",
40
+ "_vhl_events_dispose",
41
+ "_vhl_events_finish",
42
+ "_vhl_events_watch_child",
43
+ "_vhl_events_watch_fd",
44
+ "_vhl_exec_status",
45
+ "_vhl_identity",
46
+ "_vhl_last_error",
47
+ "_vhl_pid",
48
+ "_vhl_ready",
49
+ "_vhl_reap",
50
+ "_vhl_release",
51
+ "_vhl_resize",
52
+ "_vhl_spawn",
53
+ "_vhl_take_fd",
54
+ "_vhl_terminate"
55
+ ],
56
+ "additive": []
57
+ },
58
+ "functions": [
59
+ {
60
+ "name": "vhl_advance_ready",
61
+ "parameters": [
62
+ "ptr"
63
+ ],
64
+ "returns": "i32",
65
+ "typescriptBound": false
66
+ },
67
+ {
68
+ "name": "vhl_control_fd",
69
+ "parameters": [
70
+ "ptr"
71
+ ],
72
+ "returns": "i32",
73
+ "typescriptBound": false
74
+ },
75
+ {
76
+ "name": "vhl_control_interest",
77
+ "parameters": [
78
+ "ptr"
79
+ ],
80
+ "returns": "i32",
81
+ "typescriptBound": false
82
+ },
83
+ {
84
+ "name": "vhl_dispose",
85
+ "parameters": [
86
+ "ptr"
87
+ ],
88
+ "returns": "i32",
89
+ "typescriptBound": false
90
+ },
91
+ {
92
+ "name": "vhl_events_cancel",
93
+ "parameters": ["ptr", "u64"],
94
+ "returns": "i32",
95
+ "typescriptBound": false
96
+ },
97
+ {
98
+ "name": "vhl_events_create",
99
+ "parameters": ["ptr", "ptr", "usize", "usize"],
100
+ "returns": "ptr",
101
+ "typescriptBound": false
102
+ },
103
+ {
104
+ "name": "vhl_events_dispose",
105
+ "parameters": ["ptr"],
106
+ "returns": "i32",
107
+ "typescriptBound": false
108
+ },
109
+ {
110
+ "name": "vhl_events_finish",
111
+ "parameters": ["ptr"],
112
+ "returns": "i32",
113
+ "typescriptBound": false
114
+ },
115
+ {
116
+ "name": "vhl_events_watch_child",
117
+ "parameters": ["ptr", "ptr", "u64"],
118
+ "returns": "i32",
119
+ "typescriptBound": false
120
+ },
121
+ {
122
+ "name": "vhl_events_watch_fd",
123
+ "parameters": ["ptr", "i32", "u8", "u64"],
124
+ "returns": "i32",
125
+ "typescriptBound": false
126
+ },
127
+ {
128
+ "name": "vhl_exec_status",
129
+ "parameters": [
130
+ "ptr",
131
+ "ptr"
132
+ ],
133
+ "returns": "i32",
134
+ "typescriptBound": false
135
+ },
136
+ {
137
+ "name": "vhl_identity",
138
+ "parameters": ["ptr", "ptr", "ptr", "usize"],
139
+ "returns": "isize",
140
+ "typescriptBound": false
141
+ },
142
+ {
143
+ "name": "vhl_last_error",
144
+ "parameters": [],
145
+ "returns": "cstring",
146
+ "typescriptBound": false
147
+ },
148
+ {
149
+ "name": "vhl_pid",
150
+ "parameters": [
151
+ "ptr"
152
+ ],
153
+ "returns": "i64",
154
+ "typescriptBound": false
155
+ },
156
+ {
157
+ "name": "vhl_ready",
158
+ "parameters": [
159
+ "ptr",
160
+ "u32",
161
+ "u32",
162
+ "ptr",
163
+ "usize"
164
+ ],
165
+ "returns": "i32",
166
+ "typescriptBound": false
167
+ },
168
+ {
169
+ "name": "vhl_reap",
170
+ "parameters": [
171
+ "ptr",
172
+ "ptr"
173
+ ],
174
+ "returns": "i32",
175
+ "typescriptBound": false
176
+ },
177
+ {
178
+ "name": "vhl_release",
179
+ "parameters": [
180
+ "ptr",
181
+ "u32",
182
+ "u32",
183
+ "ptr",
184
+ "usize"
185
+ ],
186
+ "returns": "i32",
187
+ "typescriptBound": false
188
+ },
189
+ {
190
+ "name": "vhl_resize",
191
+ "parameters": [
192
+ "ptr",
193
+ "u16",
194
+ "u16"
195
+ ],
196
+ "returns": "i32",
197
+ "typescriptBound": false
198
+ },
199
+ {
200
+ "name": "vhl_spawn",
201
+ "parameters": [
202
+ "cstring",
203
+ "cstring",
204
+ "ptr",
205
+ "usize",
206
+ "usize",
207
+ "u8",
208
+ "u8",
209
+ "u8",
210
+ "u16",
211
+ "u16"
212
+ ],
213
+ "returns": "ptr",
214
+ "typescriptBound": false
215
+ },
216
+ {
217
+ "name": "vhl_take_fd",
218
+ "parameters": [
219
+ "ptr",
220
+ "u8"
221
+ ],
222
+ "returns": "i32",
223
+ "typescriptBound": false
224
+ },
225
+ {
226
+ "name": "vhl_terminate",
227
+ "parameters": [
228
+ "ptr"
229
+ ],
230
+ "returns": "i32",
231
+ "typescriptBound": false
232
+ }
233
+ ]
234
+ }
@@ -0,0 +1,35 @@
1
+ //! Trusted private-FD helper. Never accepts workload values in argv or env.
2
+ use std::os::fd::FromRawFd;
3
+ use std::os::unix::net::UnixStream;
4
+
5
+ /// The fixed helper modes besides the held (session) launch.
6
+ enum Mode { Direct, Daemon }
7
+
8
+ fn main() {
9
+ let mut args = std::env::args_os().skip(1);
10
+ let first = args.next();
11
+ let mode = match first.as_ref().and_then(|value| value.to_str()) {
12
+ Some("--direct") => Some(Mode::Direct),
13
+ Some("--daemon") => Some(Mode::Daemon),
14
+ _ => None
15
+ };
16
+ let fd = (if mode.is_some() { args.next() } else { first }).and_then(|value| value.to_str().and_then(|s| s.parse::<i32>().ok()));
17
+ if args.next().is_some() || fd.is_none_or(|fd| fd <= 2) {
18
+ eprintln!("held-launch: control-argument-invalid");
19
+ std::process::exit(126);
20
+ }
21
+ // The trusted spawning owner transferred exactly this inherited endpoint.
22
+ let control = unsafe { UnixStream::from_raw_fd(fd.unwrap_or(-1)) };
23
+ let error = match mode {
24
+ Some(Mode::Direct) => vibes_held_launch::run_direct_helper(control),
25
+ // The daemon helper exits 0 once it has forked the workload: that exit reparents it.
26
+ Some(Mode::Daemon) => match vibes_held_launch::run_daemon_helper(control) {
27
+ None => std::process::exit(0),
28
+ Some(error) => error
29
+ },
30
+ None => vibes_held_launch::run_helper(control)
31
+ };
32
+ // Fixed phase/errno only: an exec error never prints command/env/payload.
33
+ eprintln!("held-launch: {} errno={}", error.0, error.1.unwrap_or(0));
34
+ std::process::exit(126);
35
+ }
@@ -0,0 +1,99 @@
1
+ //! Execution ABI over the shared native reactor. No process registry or timers.
2
+ use std::ffi::c_void;
3
+ use std::os::fd::BorrowedFd;
4
+ use std::sync::Arc;
5
+ use vibes_native_core::process_events::{ChildExitEvent, EventReactor, Watch};
6
+ use super::{Launch, launch, launch_error, record};
7
+
8
+ pub struct Events { reactor: EventReactor }
9
+ type Callback = unsafe extern "C" fn(u64, u8, i32);
10
+
11
+ /// The callback is host-thread-safe and stays alive until finish=1. `user` is
12
+ /// reserved and MUST be null; the callback ABI has exactly three arguments.
13
+ #[unsafe(no_mangle)]
14
+ pub unsafe extern "C" fn vhl_events_create(callback: *const c_void, user: *mut c_void,
15
+ max_watches: usize, max_pending_commands: usize) -> *mut Events {
16
+ if callback.is_null() || !user.is_null() {
17
+ record("events-callback-invalid", None);
18
+ return std::ptr::null_mut();
19
+ }
20
+ let callback: Callback = unsafe { std::mem::transmute(callback) };
21
+ match EventReactor::new(Arc::new(move |id, event, detail| unsafe { callback(id, event, detail) }), max_watches, max_pending_commands) {
22
+ Ok(reactor) => Box::into_raw(Box::new(Events { reactor })),
23
+ Err(error) => { record("events-create", error.raw_os_error()); std::ptr::null_mut() }
24
+ }
25
+ }
26
+
27
+ unsafe fn owner<'a>(pointer: *mut Events) -> Result<&'a Events, i32> {
28
+ if pointer.is_null() { return Err(record("events-owner-invalid", None)); }
29
+ Ok(unsafe { &*pointer })
30
+ }
31
+
32
+ #[unsafe(no_mangle)]
33
+ pub unsafe extern "C" fn vhl_events_watch_fd(pointer: *mut Events, fd: i32, interest: u8, id: u64) -> i32 {
34
+ let owner = match unsafe { owner(pointer) } { Ok(owner) => owner, Err(error) => return error };
35
+ if fd < 0 { return record("events-fd-invalid", None); }
36
+ let watch = match Watch::fd(unsafe { BorrowedFd::borrow_raw(fd) }, interest) {
37
+ Ok(watch) => watch,
38
+ Err(error) => return record("events-fd", error.raw_os_error()),
39
+ };
40
+ match owner.reactor.watch(id, watch) { Ok(()) => 1, Err(error) => record("events-watch", error.raw_os_error()) }
41
+ }
42
+
43
+ #[unsafe(no_mangle)]
44
+ pub unsafe extern "C" fn vhl_events_watch_child(pointer: *mut Events, child_pointer: *mut Launch, id: u64) -> i32 {
45
+ let owner = match unsafe { owner(pointer) } { Ok(owner) => owner, Err(error) => return error };
46
+ let handle = match unsafe { launch(child_pointer) } { Ok(handle) => handle, Err(error) => return error };
47
+ let Some(child) = handle.child.as_mut() else { return record("handle-disposed", None); };
48
+ let watch = match child.try_observe_exit() {
49
+ Ok(true) => Watch::ExitedChild,
50
+ Err(error) => return launch_error(error),
51
+ Ok(false) => match ChildExitEvent::enroll(child.pid()) {
52
+ Ok(event) => Watch::Child(event),
53
+ Err(error) => {
54
+ // A helper can exit between the parent's observation and kernel
55
+ // enrollment. Only the actual retained parent's wait proves it.
56
+ match child.try_observe_exit() {
57
+ Ok(true) => Watch::ExitedChild,
58
+ Ok(false) => return record("events-child-enroll", error.raw_os_error()),
59
+ Err(error) => return launch_error(error),
60
+ }
61
+ }
62
+ },
63
+ };
64
+ match owner.reactor.watch(id, watch) { Ok(()) => 1, Err(error) => record("events-watch", error.raw_os_error()) }
65
+ }
66
+
67
+ #[unsafe(no_mangle)]
68
+ pub unsafe extern "C" fn vhl_events_cancel(pointer: *mut Events, id: u64) -> i32 {
69
+ let owner = match unsafe { owner(pointer) } { Ok(owner) => owner, Err(error) => return error };
70
+ match owner.reactor.cancel(id) {
71
+ Ok(true) => 1, // One pending ACK; repeated pending cancellation is coalesced.
72
+ Ok(false) => 2, // Already terminal; no new ACK. Its terminal callback may be in flight.
73
+ Err(error) => record("events-cancel", error.raw_os_error()),
74
+ }
75
+ }
76
+
77
+ /// Acceptance retains the pointer and coalesces repeated calls. Event 4 is not
78
+ /// thread quiescence; retain callback and library until events_finish succeeds.
79
+ #[unsafe(no_mangle)]
80
+ pub unsafe extern "C" fn vhl_events_dispose(pointer: *mut Events) -> i32 {
81
+ let owner = match unsafe { owner(pointer) } { Ok(owner) => owner, Err(error) => return error };
82
+ match owner.reactor.dispose() {
83
+ Ok(()) => 1,
84
+ Err(error) => record("events-dispose", error.raw_os_error()),
85
+ }
86
+ }
87
+
88
+ /// 0: thread still running, retain everything; 1: joined and pointer invalidated;
89
+ /// -1: fixed failure with pointer retained. Never joins a running thread.
90
+ #[unsafe(no_mangle)]
91
+ pub unsafe extern "C" fn vhl_events_finish(pointer: *mut Events) -> i32 {
92
+ if pointer.is_null() { return record("events-owner-invalid", None); }
93
+ let owner = unsafe { &mut *pointer };
94
+ match owner.reactor.finish() {
95
+ Ok(false) => 0,
96
+ Ok(true) => { drop(unsafe { Box::from_raw(pointer) }); 1 },
97
+ Err(error) => record("events-finish", error.raw_os_error()),
98
+ }
99
+ }