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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (517) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +222 -2
  3. package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts +6 -0
  4. package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts.map +1 -0
  5. package/dist/applet-serve-host/applet-serve-host.impl.bun.js +80 -0
  6. package/dist/applet-serve-host/applet-serve-host.impl.bun.js.map +1 -0
  7. package/dist/applet-serve-host/applet-serve-host.plugin.d.ts +22 -0
  8. package/dist/applet-serve-host/applet-serve-host.plugin.d.ts.map +1 -0
  9. package/dist/applet-serve-host/applet-serve-host.plugin.js +42 -0
  10. package/dist/applet-serve-host/applet-serve-host.plugin.js.map +1 -0
  11. package/dist/applet-serve-host/index.d.ts +7 -0
  12. package/dist/applet-serve-host/index.d.ts.map +1 -0
  13. package/dist/applet-serve-host/index.js +7 -0
  14. package/dist/applet-serve-host/index.js.map +1 -0
  15. package/dist/applet-serve-host/stylesheet.compiler.d.ts +7 -0
  16. package/dist/applet-serve-host/stylesheet.compiler.d.ts.map +1 -0
  17. package/dist/applet-serve-host/stylesheet.compiler.js +63 -0
  18. package/dist/applet-serve-host/stylesheet.compiler.js.map +1 -0
  19. package/dist/atlas-migrations/register-atlas-host-migrations.d.ts +21 -0
  20. package/dist/atlas-migrations/register-atlas-host-migrations.d.ts.map +1 -0
  21. package/dist/atlas-migrations/register-atlas-host-migrations.js +148 -0
  22. package/dist/atlas-migrations/register-atlas-host-migrations.js.map +1 -0
  23. package/dist/buffered-capture.d.ts +4 -0
  24. package/dist/buffered-capture.d.ts.map +1 -0
  25. package/dist/buffered-capture.impl.bun.d.ts +18 -0
  26. package/dist/buffered-capture.impl.bun.d.ts.map +1 -0
  27. package/dist/buffered-capture.impl.bun.js +148 -0
  28. package/dist/buffered-capture.impl.bun.js.map +1 -0
  29. package/dist/buffered-capture.js +5 -0
  30. package/dist/buffered-capture.js.map +1 -0
  31. package/dist/bun-environment.impl.bun.d.ts +231 -0
  32. package/dist/bun-environment.impl.bun.d.ts.map +1 -0
  33. package/dist/bun-environment.impl.bun.js +352 -0
  34. package/dist/bun-environment.impl.bun.js.map +1 -0
  35. package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts +20 -0
  36. package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts.map +1 -0
  37. package/dist/cache-redis/cache-redis-connector.impl.bun.js +30 -0
  38. package/dist/cache-redis/cache-redis-connector.impl.bun.js.map +1 -0
  39. package/dist/cache-redis/cache-redis-connector.plugin.d.ts +21 -0
  40. package/dist/cache-redis/cache-redis-connector.plugin.d.ts.map +1 -0
  41. package/dist/cache-redis/cache-redis-connector.plugin.js +32 -0
  42. package/dist/cache-redis/cache-redis-connector.plugin.js.map +1 -0
  43. package/dist/cli-checkout.impl.bun.d.ts +13 -0
  44. package/dist/cli-checkout.impl.bun.d.ts.map +1 -0
  45. package/dist/cli-checkout.impl.bun.js +26 -0
  46. package/dist/cli-checkout.impl.bun.js.map +1 -0
  47. package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts +19 -0
  48. package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts.map +1 -0
  49. package/dist/docs/runtime-environment-bun.docs.descriptor.js +116 -0
  50. package/dist/docs/runtime-environment-bun.docs.descriptor.js.map +1 -0
  51. package/dist/filesystem/adapter.impl.bun.d.ts +15 -0
  52. package/dist/filesystem/adapter.impl.bun.d.ts.map +1 -0
  53. package/dist/filesystem/adapter.impl.bun.js +11 -0
  54. package/dist/filesystem/adapter.impl.bun.js.map +1 -0
  55. package/dist/filesystem/host-primitives.impl.bun.d.ts +12 -0
  56. package/dist/filesystem/host-primitives.impl.bun.d.ts.map +1 -0
  57. package/dist/filesystem/host-primitives.impl.bun.js +96 -0
  58. package/dist/filesystem/host-primitives.impl.bun.js.map +1 -0
  59. package/dist/filesystem/register.d.ts +12 -0
  60. package/dist/filesystem/register.d.ts.map +1 -0
  61. package/dist/filesystem/register.js +6 -0
  62. package/dist/filesystem/register.js.map +1 -0
  63. package/dist/filesystem/rooted-exclusive.impl.bun.d.ts +4 -0
  64. package/dist/filesystem/rooted-exclusive.impl.bun.d.ts.map +1 -0
  65. package/dist/filesystem/rooted-exclusive.impl.bun.js +135 -0
  66. package/dist/filesystem/rooted-exclusive.impl.bun.js.map +1 -0
  67. package/dist/held-launch/abi.impl.bun.d.ts +175 -0
  68. package/dist/held-launch/abi.impl.bun.d.ts.map +1 -0
  69. package/dist/held-launch/abi.impl.bun.js +476 -0
  70. package/dist/held-launch/abi.impl.bun.js.map +1 -0
  71. package/dist/held-launch/execution.impl.bun.d.ts +48 -0
  72. package/dist/held-launch/execution.impl.bun.d.ts.map +1 -0
  73. package/dist/held-launch/execution.impl.bun.js +375 -0
  74. package/dist/held-launch/execution.impl.bun.js.map +1 -0
  75. package/dist/held-launch/library.impl.bun.d.ts +23 -0
  76. package/dist/held-launch/library.impl.bun.d.ts.map +1 -0
  77. package/dist/held-launch/library.impl.bun.js +178 -0
  78. package/dist/held-launch/library.impl.bun.js.map +1 -0
  79. package/dist/held-launch/schemas.d.ts +10 -0
  80. package/dist/held-launch/schemas.d.ts.map +1 -0
  81. package/dist/held-launch/schemas.js +3 -0
  82. package/dist/held-launch/schemas.js.map +1 -0
  83. package/dist/held-launch/streams.impl.bun.d.ts +38 -0
  84. package/dist/held-launch/streams.impl.bun.d.ts.map +1 -0
  85. package/dist/held-launch/streams.impl.bun.js +183 -0
  86. package/dist/held-launch/streams.impl.bun.js.map +1 -0
  87. package/dist/host-channel.impl.bun.d.ts +25 -0
  88. package/dist/host-channel.impl.bun.d.ts.map +1 -0
  89. package/dist/host-channel.impl.bun.js +40 -0
  90. package/dist/host-channel.impl.bun.js.map +1 -0
  91. package/dist/host-client.impl.bun.d.ts +31 -0
  92. package/dist/host-client.impl.bun.d.ts.map +1 -0
  93. package/dist/host-client.impl.bun.js +39 -0
  94. package/dist/host-client.impl.bun.js.map +1 -0
  95. package/dist/host-credentials.d.ts +38 -0
  96. package/dist/host-credentials.d.ts.map +1 -0
  97. package/dist/host-credentials.js +44 -0
  98. package/dist/host-credentials.js.map +1 -0
  99. package/dist/host-loader.impl.bun.d.ts +12 -0
  100. package/dist/host-loader.impl.bun.d.ts.map +1 -0
  101. package/dist/host-loader.impl.bun.js +83 -0
  102. package/dist/host-loader.impl.bun.js.map +1 -0
  103. package/dist/host-signal.impl.bun.d.ts +11 -0
  104. package/dist/host-signal.impl.bun.d.ts.map +1 -0
  105. package/dist/host-signal.impl.bun.js +28 -0
  106. package/dist/host-signal.impl.bun.js.map +1 -0
  107. package/dist/http-listener.impl.bun.d.ts +8 -0
  108. package/dist/http-listener.impl.bun.d.ts.map +1 -0
  109. package/dist/http-listener.impl.bun.js +44 -0
  110. package/dist/http-listener.impl.bun.js.map +1 -0
  111. package/dist/index.d.ts +38 -0
  112. package/dist/index.d.ts.map +1 -0
  113. package/dist/index.js +314 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/local-execution.impl.bun.d.ts +47 -0
  116. package/dist/local-execution.impl.bun.d.ts.map +1 -0
  117. package/dist/local-execution.impl.bun.js +150 -0
  118. package/dist/local-execution.impl.bun.js.map +1 -0
  119. package/dist/logging/file-host.impl.bun.d.ts +4 -0
  120. package/dist/logging/file-host.impl.bun.d.ts.map +1 -0
  121. package/dist/logging/file-host.impl.bun.js +36 -0
  122. package/dist/logging/file-host.impl.bun.js.map +1 -0
  123. package/dist/logging/logging.plugin.d.ts +12 -0
  124. package/dist/logging/logging.plugin.d.ts.map +1 -0
  125. package/dist/logging/logging.plugin.js +20 -0
  126. package/dist/logging/logging.plugin.js.map +1 -0
  127. package/dist/native/held-launch/aarch64-apple-darwin/libvibes_held_launch.dylib +0 -0
  128. package/dist/native/held-launch/aarch64-apple-darwin/manifest.json +237 -0
  129. package/dist/native/held-launch/aarch64-apple-darwin/vibes-held-launch +0 -0
  130. package/dist/native/held-launch/aarch64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
  131. package/dist/native/held-launch/aarch64-unknown-linux-gnu/manifest.json +237 -0
  132. package/dist/native/held-launch/aarch64-unknown-linux-gnu/vibes-held-launch +0 -0
  133. package/dist/native/held-launch/x86_64-apple-darwin/libvibes_held_launch.dylib +0 -0
  134. package/dist/native/held-launch/x86_64-apple-darwin/manifest.json +237 -0
  135. package/dist/native/held-launch/x86_64-apple-darwin/vibes-held-launch +0 -0
  136. package/dist/native/held-launch/x86_64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
  137. package/dist/native/held-launch/x86_64-unknown-linux-gnu/manifest.json +237 -0
  138. package/dist/native/held-launch/x86_64-unknown-linux-gnu/vibes-held-launch +0 -0
  139. package/dist/native-image.consumer.plugin.d.ts +4 -0
  140. package/dist/native-image.consumer.plugin.d.ts.map +1 -0
  141. package/dist/native-image.consumer.plugin.js +14 -0
  142. package/dist/native-image.consumer.plugin.js.map +1 -0
  143. package/dist/native-image.d.ts +79 -0
  144. package/dist/native-image.d.ts.map +1 -0
  145. package/dist/native-image.impl.consumer.d.ts +15 -0
  146. package/dist/native-image.impl.consumer.d.ts.map +1 -0
  147. package/dist/native-image.impl.consumer.js +86 -0
  148. package/dist/native-image.impl.consumer.js.map +1 -0
  149. package/dist/native-image.js +19 -0
  150. package/dist/native-image.js.map +1 -0
  151. package/dist/native-library.consumer.plugin.d.ts +6 -0
  152. package/dist/native-library.consumer.plugin.d.ts.map +1 -0
  153. package/dist/native-library.consumer.plugin.js +33 -0
  154. package/dist/native-library.consumer.plugin.js.map +1 -0
  155. package/dist/native-library.impl.consumer.d.ts +14 -0
  156. package/dist/native-library.impl.consumer.d.ts.map +1 -0
  157. package/dist/native-library.impl.consumer.js +46 -0
  158. package/dist/native-library.impl.consumer.js.map +1 -0
  159. package/dist/native-network/index.d.ts +3 -0
  160. package/dist/native-network/index.d.ts.map +1 -0
  161. package/dist/native-network/index.js +3 -0
  162. package/dist/native-network/index.js.map +1 -0
  163. package/dist/native-network/native-host.d.ts +4 -0
  164. package/dist/native-network/native-host.d.ts.map +1 -0
  165. package/dist/native-network/native-host.js +14 -0
  166. package/dist/native-network/native-host.js.map +1 -0
  167. package/dist/native-network/native-network.descriptor.d.ts +4 -0
  168. package/dist/native-network/native-network.descriptor.d.ts.map +1 -0
  169. package/dist/native-network/native-network.descriptor.js +11 -0
  170. package/dist/native-network/native-network.descriptor.js.map +1 -0
  171. package/dist/native-network/native-network.impl.bun.d.ts +19 -0
  172. package/dist/native-network/native-network.impl.bun.d.ts.map +1 -0
  173. package/dist/native-network/native-network.impl.bun.js +190 -0
  174. package/dist/native-network/native-network.impl.bun.js.map +1 -0
  175. package/dist/native-network/native-network.plugin.d.ts +6 -0
  176. package/dist/native-network/native-network.plugin.d.ts.map +1 -0
  177. package/dist/native-network/native-network.plugin.js +27 -0
  178. package/dist/native-network/native-network.plugin.js.map +1 -0
  179. package/dist/package-plugins/index.d.ts +11 -0
  180. package/dist/package-plugins/index.d.ts.map +1 -0
  181. package/dist/package-plugins/index.js +11 -0
  182. package/dist/package-plugins/index.js.map +1 -0
  183. package/dist/package-plugins/package-plugins.capability.bun.d.ts +11 -0
  184. package/dist/package-plugins/package-plugins.capability.bun.d.ts.map +1 -0
  185. package/dist/package-plugins/package-plugins.capability.bun.js +14 -0
  186. package/dist/package-plugins/package-plugins.capability.bun.js.map +1 -0
  187. package/dist/package-plugins/primitives.impl.bun.d.ts +11 -0
  188. package/dist/package-plugins/primitives.impl.bun.d.ts.map +1 -0
  189. package/dist/package-plugins/primitives.impl.bun.js +32 -0
  190. package/dist/package-plugins/primitives.impl.bun.js.map +1 -0
  191. package/dist/package-plugins/read-admission.impl.bun.d.ts +11 -0
  192. package/dist/package-plugins/read-admission.impl.bun.d.ts.map +1 -0
  193. package/dist/package-plugins/read-admission.impl.bun.js +224 -0
  194. package/dist/package-plugins/read-admission.impl.bun.js.map +1 -0
  195. package/dist/package-plugins/schemas.d.ts +28 -0
  196. package/dist/package-plugins/schemas.d.ts.map +1 -0
  197. package/dist/package-plugins/schemas.js +3 -0
  198. package/dist/package-plugins/schemas.js.map +1 -0
  199. package/dist/process/launch-artifacts.impl.bun.d.ts +11 -0
  200. package/dist/process/launch-artifacts.impl.bun.d.ts.map +1 -0
  201. package/dist/process/launch-artifacts.impl.bun.js +25 -0
  202. package/dist/process/launch-artifacts.impl.bun.js.map +1 -0
  203. package/dist/process/process-probe.impl.bun.d.ts +15 -0
  204. package/dist/process/process-probe.impl.bun.d.ts.map +1 -0
  205. package/dist/process/process-probe.impl.bun.js +35 -0
  206. package/dist/process/process-probe.impl.bun.js.map +1 -0
  207. package/dist/process/runtime-process.impl.bun.d.ts +20 -0
  208. package/dist/process/runtime-process.impl.bun.d.ts.map +1 -0
  209. package/dist/process/runtime-process.impl.bun.js +42 -0
  210. package/dist/process/runtime-process.impl.bun.js.map +1 -0
  211. package/dist/process/schemas.d.ts +9 -0
  212. package/dist/process/schemas.d.ts.map +1 -0
  213. package/dist/process/schemas.js +3 -0
  214. package/dist/process/schemas.js.map +1 -0
  215. package/dist/process/spawn.impl.bun.d.ts +31 -0
  216. package/dist/process/spawn.impl.bun.d.ts.map +1 -0
  217. package/dist/process/spawn.impl.bun.js +66 -0
  218. package/dist/process/spawn.impl.bun.js.map +1 -0
  219. package/dist/process/which.impl.bun.d.ts +16 -0
  220. package/dist/process/which.impl.bun.d.ts.map +1 -0
  221. package/dist/process/which.impl.bun.js +25 -0
  222. package/dist/process/which.impl.bun.js.map +1 -0
  223. package/dist/pty.adapter.impl.bun.d.ts +17 -0
  224. package/dist/pty.adapter.impl.bun.d.ts.map +1 -0
  225. package/dist/pty.adapter.impl.bun.js +102 -0
  226. package/dist/pty.adapter.impl.bun.js.map +1 -0
  227. package/dist/pty.darwin.impl.bun.d.ts +11 -0
  228. package/dist/pty.darwin.impl.bun.d.ts.map +1 -0
  229. package/dist/pty.darwin.impl.bun.js +200 -0
  230. package/dist/pty.darwin.impl.bun.js.map +1 -0
  231. package/dist/pty.node-host.impl.bun.d.ts +10 -0
  232. package/dist/pty.node-host.impl.bun.d.ts.map +1 -0
  233. package/dist/pty.node-host.impl.bun.js +42 -0
  234. package/dist/pty.node-host.impl.bun.js.map +1 -0
  235. package/dist/resolution-root.impl.bun.d.ts +170 -0
  236. package/dist/resolution-root.impl.bun.d.ts.map +1 -0
  237. package/dist/resolution-root.impl.bun.js +373 -0
  238. package/dist/resolution-root.impl.bun.js.map +1 -0
  239. package/dist/restricted-execute.darwin.impl.bun.d.ts +19 -0
  240. package/dist/restricted-execute.darwin.impl.bun.d.ts.map +1 -0
  241. package/dist/restricted-execute.darwin.impl.bun.js +459 -0
  242. package/dist/restricted-execute.darwin.impl.bun.js.map +1 -0
  243. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts +2 -0
  244. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts.map +1 -0
  245. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js +31 -0
  246. package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js.map +1 -0
  247. package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts +20 -0
  248. package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts.map +1 -0
  249. package/dist/runtime-plugin-host/host-hot-reload.consumer.js +236 -0
  250. package/dist/runtime-plugin-host/host-hot-reload.consumer.js.map +1 -0
  251. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts +2 -0
  252. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts.map +1 -0
  253. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js +66 -0
  254. package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js.map +1 -0
  255. package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts +45 -0
  256. package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts.map +1 -0
  257. package/dist/runtime-plugin-host/hot-plugin-module.consumer.js +490 -0
  258. package/dist/runtime-plugin-host/hot-plugin-module.consumer.js.map +1 -0
  259. package/dist/runtime-plugin-host/hot-reload.consumer.d.ts +83 -0
  260. package/dist/runtime-plugin-host/hot-reload.consumer.d.ts.map +1 -0
  261. package/dist/runtime-plugin-host/hot-reload.consumer.js +168 -0
  262. package/dist/runtime-plugin-host/hot-reload.consumer.js.map +1 -0
  263. package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts +37 -0
  264. package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts.map +1 -0
  265. package/dist/runtime-plugin-host/reclaim.impl.bun.js +159 -0
  266. package/dist/runtime-plugin-host/reclaim.impl.bun.js.map +1 -0
  267. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts +4 -0
  268. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts.map +1 -0
  269. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js +181 -0
  270. package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js.map +1 -0
  271. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts +17 -0
  272. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts.map +1 -0
  273. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js +36 -0
  274. package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js.map +1 -0
  275. package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts +53 -0
  276. package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts.map +1 -0
  277. package/dist/runtime-plugin-host/runtime-thread.impl.bun.js +249 -0
  278. package/dist/runtime-plugin-host/runtime-thread.impl.bun.js.map +1 -0
  279. package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts +2 -0
  280. package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts.map +1 -0
  281. package/dist/runtime-plugin-host/runtime-thread.shim.bun.js +56 -0
  282. package/dist/runtime-plugin-host/runtime-thread.shim.bun.js.map +1 -0
  283. package/dist/runtime-plugin-host/schemas.d.ts +437 -0
  284. package/dist/runtime-plugin-host/schemas.d.ts.map +1 -0
  285. package/dist/runtime-plugin-host/schemas.js +54 -0
  286. package/dist/runtime-plugin-host/schemas.js.map +1 -0
  287. package/dist/runtime-plugin-host/source-watcher.consumer.d.ts +109 -0
  288. package/dist/runtime-plugin-host/source-watcher.consumer.d.ts.map +1 -0
  289. package/dist/runtime-plugin-host/source-watcher.consumer.js +383 -0
  290. package/dist/runtime-plugin-host/source-watcher.consumer.js.map +1 -0
  291. package/dist/schemas/environment.d.ts +197 -0
  292. package/dist/schemas/environment.d.ts.map +1 -0
  293. package/dist/schemas/environment.js +7 -0
  294. package/dist/schemas/environment.js.map +1 -0
  295. package/dist/schemas/host-resources.d.ts +85 -0
  296. package/dist/schemas/host-resources.d.ts.map +1 -0
  297. package/dist/schemas/host-resources.js +22 -0
  298. package/dist/schemas/host-resources.js.map +1 -0
  299. package/dist/schemas/native-image.d.ts +128 -0
  300. package/dist/schemas/native-image.d.ts.map +1 -0
  301. package/dist/schemas/native-image.js +45 -0
  302. package/dist/schemas/native-image.js.map +1 -0
  303. package/dist/schemas/native-network.d.ts +56 -0
  304. package/dist/schemas/native-network.d.ts.map +1 -0
  305. package/dist/schemas/native-network.js +55 -0
  306. package/dist/schemas/native-network.js.map +1 -0
  307. package/dist/schemas/restricted-execute.d.ts +40 -0
  308. package/dist/schemas/restricted-execute.d.ts.map +1 -0
  309. package/dist/schemas/restricted-execute.js +14 -0
  310. package/dist/schemas/restricted-execute.js.map +1 -0
  311. package/dist/schemas/runtime-socket.d.ts +8 -0
  312. package/dist/schemas/runtime-socket.d.ts.map +1 -0
  313. package/dist/schemas/runtime-socket.js +7 -0
  314. package/dist/schemas/runtime-socket.js.map +1 -0
  315. package/dist/schemas/self-spawn.d.ts +11 -0
  316. package/dist/schemas/self-spawn.d.ts.map +1 -0
  317. package/dist/schemas/self-spawn.js +3 -0
  318. package/dist/schemas/self-spawn.js.map +1 -0
  319. package/dist/schemas/standard-output.d.ts +6 -0
  320. package/dist/schemas/standard-output.d.ts.map +1 -0
  321. package/dist/schemas/standard-output.js +2 -0
  322. package/dist/schemas/standard-output.js.map +1 -0
  323. package/dist/schemas/telemetry.d.ts +25 -0
  324. package/dist/schemas/telemetry.d.ts.map +1 -0
  325. package/dist/schemas/telemetry.js +10 -0
  326. package/dist/schemas/telemetry.js.map +1 -0
  327. package/dist/schemas/test-environment.d.ts +27 -0
  328. package/dist/schemas/test-environment.d.ts.map +1 -0
  329. package/dist/schemas/test-environment.js +2 -0
  330. package/dist/schemas/test-environment.js.map +1 -0
  331. package/dist/serve-stall-start.d.ts +8 -0
  332. package/dist/serve-stall-start.d.ts.map +1 -0
  333. package/dist/serve-stall-start.js +88 -0
  334. package/dist/serve-stall-start.js.map +1 -0
  335. package/dist/serve-stall.d.ts +11 -0
  336. package/dist/serve-stall.d.ts.map +1 -0
  337. package/dist/serve-stall.js +19 -0
  338. package/dist/serve-stall.js.map +1 -0
  339. package/dist/serve-stall.plugin.d.ts +10 -0
  340. package/dist/serve-stall.plugin.d.ts.map +1 -0
  341. package/dist/serve-stall.plugin.js +34 -0
  342. package/dist/serve-stall.plugin.js.map +1 -0
  343. package/dist/services/account-home.d.ts +39 -0
  344. package/dist/services/account-home.d.ts.map +1 -0
  345. package/dist/services/account-home.js +152 -0
  346. package/dist/services/account-home.js.map +1 -0
  347. package/dist/services/cli-process-host.d.ts +50 -0
  348. package/dist/services/cli-process-host.d.ts.map +1 -0
  349. package/dist/services/cli-process-host.js +88 -0
  350. package/dist/services/cli-process-host.js.map +1 -0
  351. package/dist/services/compatibility-host.impl.bun.d.ts +4 -0
  352. package/dist/services/compatibility-host.impl.bun.d.ts.map +1 -0
  353. package/dist/services/compatibility-host.impl.bun.js +24 -0
  354. package/dist/services/compatibility-host.impl.bun.js.map +1 -0
  355. package/dist/services/executable-identity.impl.bun.d.ts +164 -0
  356. package/dist/services/executable-identity.impl.bun.d.ts.map +1 -0
  357. package/dist/services/executable-identity.impl.bun.js +73 -0
  358. package/dist/services/executable-identity.impl.bun.js.map +1 -0
  359. package/dist/services/fatal-signals.impl.bun.d.ts +15 -0
  360. package/dist/services/fatal-signals.impl.bun.d.ts.map +1 -0
  361. package/dist/services/fatal-signals.impl.bun.js +61 -0
  362. package/dist/services/fatal-signals.impl.bun.js.map +1 -0
  363. package/dist/services/graph-freshness.impl.bun.d.ts +108 -0
  364. package/dist/services/graph-freshness.impl.bun.d.ts.map +1 -0
  365. package/dist/services/graph-freshness.impl.bun.js +49 -0
  366. package/dist/services/graph-freshness.impl.bun.js.map +1 -0
  367. package/dist/services/host-identity.capability.bun.d.ts +10 -0
  368. package/dist/services/host-identity.capability.bun.d.ts.map +1 -0
  369. package/dist/services/host-identity.capability.bun.js +27 -0
  370. package/dist/services/host-identity.capability.bun.js.map +1 -0
  371. package/dist/services/host-identity.impl.bun.d.ts +53 -0
  372. package/dist/services/host-identity.impl.bun.d.ts.map +1 -0
  373. package/dist/services/host-identity.impl.bun.js +76 -0
  374. package/dist/services/host-identity.impl.bun.js.map +1 -0
  375. package/dist/services/host-resources.impl.bun.d.ts +49 -0
  376. package/dist/services/host-resources.impl.bun.d.ts.map +1 -0
  377. package/dist/services/host-resources.impl.bun.js +144 -0
  378. package/dist/services/host-resources.impl.bun.js.map +1 -0
  379. package/dist/services/http-fetch.impl.bun.d.ts +10 -0
  380. package/dist/services/http-fetch.impl.bun.d.ts.map +1 -0
  381. package/dist/services/http-fetch.impl.bun.js +38 -0
  382. package/dist/services/http-fetch.impl.bun.js.map +1 -0
  383. package/dist/services/output-plane.impl.bun.d.ts +6 -0
  384. package/dist/services/output-plane.impl.bun.d.ts.map +1 -0
  385. package/dist/services/output-plane.impl.bun.js +26 -0
  386. package/dist/services/output-plane.impl.bun.js.map +1 -0
  387. package/dist/services/process-action-lifetime.consumer.d.ts +47 -0
  388. package/dist/services/process-action-lifetime.consumer.d.ts.map +1 -0
  389. package/dist/services/process-action-lifetime.consumer.js +68 -0
  390. package/dist/services/process-action-lifetime.consumer.js.map +1 -0
  391. package/dist/services/process-view.impl.bun.d.ts +18 -0
  392. package/dist/services/process-view.impl.bun.d.ts.map +1 -0
  393. package/dist/services/process-view.impl.bun.js +17 -0
  394. package/dist/services/process-view.impl.bun.js.map +1 -0
  395. package/dist/services/runtime-host-signals.impl.bun.d.ts +8 -0
  396. package/dist/services/runtime-host-signals.impl.bun.d.ts.map +1 -0
  397. package/dist/services/runtime-host-signals.impl.bun.js +29 -0
  398. package/dist/services/runtime-host-signals.impl.bun.js.map +1 -0
  399. package/dist/services/runtime-http-listener.impl.bun.d.ts +14 -0
  400. package/dist/services/runtime-http-listener.impl.bun.d.ts.map +1 -0
  401. package/dist/services/runtime-http-listener.impl.bun.js +463 -0
  402. package/dist/services/runtime-http-listener.impl.bun.js.map +1 -0
  403. package/dist/services/runtime-path.impl.bun.d.ts +16 -0
  404. package/dist/services/runtime-path.impl.bun.d.ts.map +1 -0
  405. package/dist/services/runtime-path.impl.bun.js +34 -0
  406. package/dist/services/runtime-path.impl.bun.js.map +1 -0
  407. package/dist/services/runtime-scoped-values.impl.bun.d.ts +4 -0
  408. package/dist/services/runtime-scoped-values.impl.bun.d.ts.map +1 -0
  409. package/dist/services/runtime-scoped-values.impl.bun.js +7 -0
  410. package/dist/services/runtime-scoped-values.impl.bun.js.map +1 -0
  411. package/dist/services/runtime-socket-datagram.impl.bun.d.ts +15 -0
  412. package/dist/services/runtime-socket-datagram.impl.bun.d.ts.map +1 -0
  413. package/dist/services/runtime-socket-datagram.impl.bun.js +19 -0
  414. package/dist/services/runtime-socket-datagram.impl.bun.js.map +1 -0
  415. package/dist/services/runtime-socket.impl.bun.d.ts +20 -0
  416. package/dist/services/runtime-socket.impl.bun.d.ts.map +1 -0
  417. package/dist/services/runtime-socket.impl.bun.js +47 -0
  418. package/dist/services/runtime-socket.impl.bun.js.map +1 -0
  419. package/dist/services/runtime-stdio.impl.bun.d.ts +11 -0
  420. package/dist/services/runtime-stdio.impl.bun.d.ts.map +1 -0
  421. package/dist/services/runtime-stdio.impl.bun.js +37 -0
  422. package/dist/services/runtime-stdio.impl.bun.js.map +1 -0
  423. package/dist/services/self-spawn.impl.bun.d.ts +39 -0
  424. package/dist/services/self-spawn.impl.bun.d.ts.map +1 -0
  425. package/dist/services/self-spawn.impl.bun.js +58 -0
  426. package/dist/services/self-spawn.impl.bun.js.map +1 -0
  427. package/dist/services/standard-output.d.ts +100 -0
  428. package/dist/services/standard-output.d.ts.map +1 -0
  429. package/dist/services/standard-output.js +35 -0
  430. package/dist/services/standard-output.js.map +1 -0
  431. package/dist/services/user-environment.impl.bun.d.ts +19 -0
  432. package/dist/services/user-environment.impl.bun.d.ts.map +1 -0
  433. package/dist/services/user-environment.impl.bun.js +117 -0
  434. package/dist/services/user-environment.impl.bun.js.map +1 -0
  435. package/dist/services/workspace-env.d.ts +30 -0
  436. package/dist/services/workspace-env.d.ts.map +1 -0
  437. package/dist/services/workspace-env.js +45 -0
  438. package/dist/services/workspace-env.js.map +1 -0
  439. package/dist/services/workspace-root-probe.impl.bun.d.ts +14 -0
  440. package/dist/services/workspace-root-probe.impl.bun.d.ts.map +1 -0
  441. package/dist/services/workspace-root-probe.impl.bun.js +27 -0
  442. package/dist/services/workspace-root-probe.impl.bun.js.map +1 -0
  443. package/dist/session-members.impl.bun.d.ts +22 -0
  444. package/dist/session-members.impl.bun.d.ts.map +1 -0
  445. package/dist/session-members.impl.bun.js +74 -0
  446. package/dist/session-members.impl.bun.js.map +1 -0
  447. package/dist/sqlite-driver/index.d.ts +7 -0
  448. package/dist/sqlite-driver/index.d.ts.map +1 -0
  449. package/dist/sqlite-driver/index.js +7 -0
  450. package/dist/sqlite-driver/index.js.map +1 -0
  451. package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts +6 -0
  452. package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts.map +1 -0
  453. package/dist/sqlite-driver/sqlite-driver.impl.bun.js +269 -0
  454. package/dist/sqlite-driver/sqlite-driver.impl.bun.js.map +1 -0
  455. package/dist/sqlite-driver/sqlite-driver.plugin.d.ts +22 -0
  456. package/dist/sqlite-driver/sqlite-driver.plugin.d.ts.map +1 -0
  457. package/dist/sqlite-driver/sqlite-driver.plugin.js +44 -0
  458. package/dist/sqlite-driver/sqlite-driver.plugin.js.map +1 -0
  459. package/dist/telemetry/telemetry.d.ts +34 -0
  460. package/dist/telemetry/telemetry.d.ts.map +1 -0
  461. package/dist/telemetry/telemetry.js +2 -0
  462. package/dist/telemetry/telemetry.js.map +1 -0
  463. package/dist/telemetry/telemetry.plugin.d.ts +4 -0
  464. package/dist/telemetry/telemetry.plugin.d.ts.map +1 -0
  465. package/dist/telemetry/telemetry.plugin.js +78 -0
  466. package/dist/telemetry/telemetry.plugin.js.map +1 -0
  467. package/dist/terminal-pty-bridge.impl.bun.d.ts +31 -0
  468. package/dist/terminal-pty-bridge.impl.bun.d.ts.map +1 -0
  469. package/dist/terminal-pty-bridge.impl.bun.js +333 -0
  470. package/dist/terminal-pty-bridge.impl.bun.js.map +1 -0
  471. package/dist/test-tooling/lazy-environment.impl.bun.d.ts +16 -0
  472. package/dist/test-tooling/lazy-environment.impl.bun.d.ts.map +1 -0
  473. package/dist/test-tooling/lazy-environment.impl.bun.js +36 -0
  474. package/dist/test-tooling/lazy-environment.impl.bun.js.map +1 -0
  475. package/dist/test-tooling/starttls-refusal.d.ts +7 -0
  476. package/dist/test-tooling/starttls-refusal.d.ts.map +1 -0
  477. package/dist/test-tooling/starttls-refusal.js +50 -0
  478. package/dist/test-tooling/starttls-refusal.js.map +1 -0
  479. package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts +2 -0
  480. package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts.map +1 -0
  481. package/dist/test-tooling/svelte-client-preload.impl.bun.js +4 -0
  482. package/dist/test-tooling/svelte-client-preload.impl.bun.js.map +1 -0
  483. package/dist/test-tooling/svelte-compiler.impl.bun.d.ts +10 -0
  484. package/dist/test-tooling/svelte-compiler.impl.bun.d.ts.map +1 -0
  485. package/dist/test-tooling/svelte-compiler.impl.bun.js +33 -0
  486. package/dist/test-tooling/svelte-compiler.impl.bun.js.map +1 -0
  487. package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts +2 -0
  488. package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts.map +1 -0
  489. package/dist/test-tooling/svelte-server-preload.impl.bun.js +4 -0
  490. package/dist/test-tooling/svelte-server-preload.impl.bun.js.map +1 -0
  491. package/dist/test-tooling/test-environment.impl.bun.d.ts +45 -0
  492. package/dist/test-tooling/test-environment.impl.bun.d.ts.map +1 -0
  493. package/dist/test-tooling/test-environment.impl.bun.js +163 -0
  494. package/dist/test-tooling/test-environment.impl.bun.js.map +1 -0
  495. package/dist/test-tooling/test-process-root.impl.bun.d.ts +4 -0
  496. package/dist/test-tooling/test-process-root.impl.bun.d.ts.map +1 -0
  497. package/dist/test-tooling/test-process-root.impl.bun.js +65 -0
  498. package/dist/test-tooling/test-process-root.impl.bun.js.map +1 -0
  499. package/dist/test-tooling/unix-http.impl.bun.d.ts +28 -0
  500. package/dist/test-tooling/unix-http.impl.bun.d.ts.map +1 -0
  501. package/dist/test-tooling/unix-http.impl.bun.js +181 -0
  502. package/dist/test-tooling/unix-http.impl.bun.js.map +1 -0
  503. package/dist/transpiler/transpiler.plugin.d.ts +10 -0
  504. package/dist/transpiler/transpiler.plugin.d.ts.map +1 -0
  505. package/dist/transpiler/transpiler.plugin.js +18 -0
  506. package/dist/transpiler/transpiler.plugin.js.map +1 -0
  507. package/native/held-launch/Cargo.toml +23 -0
  508. package/native/held-launch/abi-manifest.json +234 -0
  509. package/native/held-launch/src/bin/vibes-held-launch.rs +35 -0
  510. package/native/held-launch/src/events.rs +99 -0
  511. package/native/held-launch/src/lib.rs +528 -0
  512. package/native/held-launch/symbols.golden +21 -0
  513. package/package.json +313 -4
  514. package/resources/restricted-supervisor.impl.bun.d.mts +3 -0
  515. package/resources/restricted-supervisor.impl.bun.mjs +49 -0
  516. package/resources/serve-stall-watch.impl.bun.d.mts +3 -0
  517. package/resources/serve-stall-watch.impl.bun.mjs +51 -0
@@ -0,0 +1,437 @@
1
+ /** The Bun host's hot-plugin importer and runtime-thread declarations. */
2
+ import * as z from 'zod/v4';
3
+ /**
4
+ * Where generated modules are written, declared by the host: an explicit
5
+ * `hotDir`, or the host's profile-aware vibes home (`activeHome`, from
6
+ * `getPathRoots(runtime)`), under which generations are anchored at
7
+ * `<activeHome>/hot/<key>`. Nothing here reads an ambient runtime.
8
+ */
9
+ export type BunPluginImporterPlacement = {
10
+ readonly hotDir: string;
11
+ readonly activeHome?: undefined;
12
+ } | {
13
+ readonly activeHome: string;
14
+ readonly hotDir?: undefined;
15
+ };
16
+ export type BunPluginImporterOptions = BunPluginImporterPlacement & {
17
+ /** @deprecated Artifacts are retained by invocation custody, never by age. */
18
+ readonly keepGenerations?: number;
19
+ /**
20
+ * The directory Bun's sourcemap `sources` are relative to, from the host's
21
+ * captured facts (`runtime.localEnvironment.getCwd()`). Optional: an
22
+ * installed-only importer that never resolves watched sources builds
23
+ * generations without one; collected sources then fall back to the entry.
24
+ */
25
+ readonly cwd?: string;
26
+ /** Host's immutable package graph receipt, checked again at publication. */
27
+ readonly artifactIdentity?: () => string | null;
28
+ /** Diagnostics for the anchor fallback. Optional; defaults to silence. */
29
+ readonly onNotice?: (message: string, data: HotAnchorNotice) => void;
30
+ };
31
+ export type HotAnchorNotice = {
32
+ readonly packageRoot: string;
33
+ readonly activeHome: string;
34
+ readonly probe: string;
35
+ };
36
+ export declare const RuntimeThreadCompositionSchema: z.ZodReadonly<z.ZodObject<{
37
+ floor: z.ZodReadonly<z.ZodObject<{
38
+ plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
39
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>>;
40
+ }, z.core.$strict>>;
41
+ global: z.ZodBoolean;
42
+ globalPlugins: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
43
+ omitSurfaces: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
44
+ agent: "agent";
45
+ browser: "browser";
46
+ ssr: "ssr";
47
+ cli: "cli";
48
+ tui: "tui";
49
+ worker: "worker";
50
+ mcp: "mcp";
51
+ bridge: "bridge";
52
+ }>>>>;
53
+ failurePolicy: z.ZodEnum<{
54
+ abort: "abort";
55
+ report: "report";
56
+ }>;
57
+ select: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
58
+ plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
59
+ }, z.core.$strict>>>;
60
+ }, z.core.$strict>>;
61
+ export declare const RuntimeThreadScopeSchema: z.ZodReadonly<z.ZodObject<{
62
+ hardware: z.ZodEnum<{
63
+ consumer: "consumer";
64
+ cloud: "cloud";
65
+ }>;
66
+ workspace: z.ZodOptional<z.ZodObject<{
67
+ root: z.ZodOptional<z.ZodString>;
68
+ access: z.ZodOptional<z.ZodEnum<{
69
+ read: "read";
70
+ write: "write";
71
+ }>>;
72
+ }, z.core.$strict>>;
73
+ hosting: z.ZodObject<{
74
+ mode: z.ZodUnion<readonly [z.ZodEnum<{
75
+ local: "local";
76
+ hosted: "hosted";
77
+ "managed-cloud": "managed-cloud";
78
+ }>, z.ZodString]>;
79
+ owner: z.ZodUnion<readonly [z.ZodEnum<{
80
+ consumer: "consumer";
81
+ customer: "customer";
82
+ vibes: "vibes";
83
+ }>, z.ZodString]>;
84
+ venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
85
+ "user-device": "user-device";
86
+ "ipc-worker": "ipc-worker";
87
+ doks: "doks";
88
+ "cloudflare-workers": "cloudflare-workers";
89
+ "digitalocean-functions": "digitalocean-functions";
90
+ }>, z.ZodString]>>;
91
+ provider: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>;
93
+ qualifiers: z.ZodObject<{
94
+ dev: z.ZodBoolean;
95
+ building: z.ZodOptional<z.ZodBoolean>;
96
+ environmentTier: z.ZodOptional<z.ZodEnum<{
97
+ local: "local";
98
+ dev: "dev";
99
+ staging: "staging";
100
+ production: "production";
101
+ }>>;
102
+ profile: z.ZodOptional<z.ZodString>;
103
+ os: z.ZodOptional<z.ZodString>;
104
+ cef: z.ZodOptional<z.ZodBoolean>;
105
+ trustedOrigin: z.ZodOptional<z.ZodString>;
106
+ rendererGeneration: z.ZodOptional<z.ZodNumber>;
107
+ filesystem: z.ZodOptional<z.ZodString>;
108
+ browserBackend: z.ZodOptional<z.ZodString>;
109
+ workspaceSessionId: z.ZodOptional<z.ZodString>;
110
+ workspaceTarget: z.ZodOptional<z.ZodString>;
111
+ repositoryId: z.ZodOptional<z.ZodString>;
112
+ remoteHostId: z.ZodOptional<z.ZodString>;
113
+ connectionMode: z.ZodOptional<z.ZodString>;
114
+ outreachExportsDir: z.ZodOptional<z.ZodString>;
115
+ serve: z.ZodOptional<z.ZodString>;
116
+ hotReload: z.ZodOptional<z.ZodEnum<{
117
+ on: "on";
118
+ off: "off";
119
+ }>>;
120
+ loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
121
+ }, z.core.$strict>;
122
+ capabilities: z.ZodOptional<z.ZodObject<{
123
+ requestPrincipals: z.ZodOptional<z.ZodBoolean>;
124
+ interactiveSession: z.ZodOptional<z.ZodBoolean>;
125
+ hostCredentials: z.ZodOptional<z.ZodBoolean>;
126
+ sharedHost: z.ZodOptional<z.ZodBoolean>;
127
+ }, z.core.$strict>>;
128
+ purpose: z.ZodEnum<{
129
+ agent: "agent";
130
+ worker: "worker";
131
+ mcp: "mcp";
132
+ direct: "direct";
133
+ projection: "projection";
134
+ }>;
135
+ surface: z.ZodEnum<{
136
+ agent: "agent";
137
+ browser: "browser";
138
+ ssr: "ssr";
139
+ cli: "cli";
140
+ tui: "tui";
141
+ worker: "worker";
142
+ mcp: "mcp";
143
+ bridge: "bridge";
144
+ }>;
145
+ lifecycle: z.ZodEnum<{
146
+ finite: "finite";
147
+ persistent: "persistent";
148
+ }>;
149
+ }, z.core.$strict>>;
150
+ /** What a caller declares for its thread: its role, its own scope and its composition. */
151
+ export declare const RuntimeThreadDeclarationSchema: z.ZodReadonly<z.ZodObject<{
152
+ role: z.ZodString;
153
+ scope: z.ZodReadonly<z.ZodObject<{
154
+ hardware: z.ZodEnum<{
155
+ consumer: "consumer";
156
+ cloud: "cloud";
157
+ }>;
158
+ workspace: z.ZodOptional<z.ZodObject<{
159
+ root: z.ZodOptional<z.ZodString>;
160
+ access: z.ZodOptional<z.ZodEnum<{
161
+ read: "read";
162
+ write: "write";
163
+ }>>;
164
+ }, z.core.$strict>>;
165
+ hosting: z.ZodObject<{
166
+ mode: z.ZodUnion<readonly [z.ZodEnum<{
167
+ local: "local";
168
+ hosted: "hosted";
169
+ "managed-cloud": "managed-cloud";
170
+ }>, z.ZodString]>;
171
+ owner: z.ZodUnion<readonly [z.ZodEnum<{
172
+ consumer: "consumer";
173
+ customer: "customer";
174
+ vibes: "vibes";
175
+ }>, z.ZodString]>;
176
+ venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
177
+ "user-device": "user-device";
178
+ "ipc-worker": "ipc-worker";
179
+ doks: "doks";
180
+ "cloudflare-workers": "cloudflare-workers";
181
+ "digitalocean-functions": "digitalocean-functions";
182
+ }>, z.ZodString]>>;
183
+ provider: z.ZodOptional<z.ZodString>;
184
+ }, z.core.$strip>;
185
+ qualifiers: z.ZodObject<{
186
+ dev: z.ZodBoolean;
187
+ building: z.ZodOptional<z.ZodBoolean>;
188
+ environmentTier: z.ZodOptional<z.ZodEnum<{
189
+ local: "local";
190
+ dev: "dev";
191
+ staging: "staging";
192
+ production: "production";
193
+ }>>;
194
+ profile: z.ZodOptional<z.ZodString>;
195
+ os: z.ZodOptional<z.ZodString>;
196
+ cef: z.ZodOptional<z.ZodBoolean>;
197
+ trustedOrigin: z.ZodOptional<z.ZodString>;
198
+ rendererGeneration: z.ZodOptional<z.ZodNumber>;
199
+ filesystem: z.ZodOptional<z.ZodString>;
200
+ browserBackend: z.ZodOptional<z.ZodString>;
201
+ workspaceSessionId: z.ZodOptional<z.ZodString>;
202
+ workspaceTarget: z.ZodOptional<z.ZodString>;
203
+ repositoryId: z.ZodOptional<z.ZodString>;
204
+ remoteHostId: z.ZodOptional<z.ZodString>;
205
+ connectionMode: z.ZodOptional<z.ZodString>;
206
+ outreachExportsDir: z.ZodOptional<z.ZodString>;
207
+ serve: z.ZodOptional<z.ZodString>;
208
+ hotReload: z.ZodOptional<z.ZodEnum<{
209
+ on: "on";
210
+ off: "off";
211
+ }>>;
212
+ loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
213
+ }, z.core.$strict>;
214
+ capabilities: z.ZodOptional<z.ZodObject<{
215
+ requestPrincipals: z.ZodOptional<z.ZodBoolean>;
216
+ interactiveSession: z.ZodOptional<z.ZodBoolean>;
217
+ hostCredentials: z.ZodOptional<z.ZodBoolean>;
218
+ sharedHost: z.ZodOptional<z.ZodBoolean>;
219
+ }, z.core.$strict>>;
220
+ purpose: z.ZodEnum<{
221
+ agent: "agent";
222
+ worker: "worker";
223
+ mcp: "mcp";
224
+ direct: "direct";
225
+ projection: "projection";
226
+ }>;
227
+ surface: z.ZodEnum<{
228
+ agent: "agent";
229
+ browser: "browser";
230
+ ssr: "ssr";
231
+ cli: "cli";
232
+ tui: "tui";
233
+ worker: "worker";
234
+ mcp: "mcp";
235
+ bridge: "bridge";
236
+ }>;
237
+ lifecycle: z.ZodEnum<{
238
+ finite: "finite";
239
+ persistent: "persistent";
240
+ }>;
241
+ }, z.core.$strict>>;
242
+ composition: z.ZodReadonly<z.ZodObject<{
243
+ floor: z.ZodReadonly<z.ZodObject<{
244
+ plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
245
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>>;
246
+ }, z.core.$strict>>;
247
+ global: z.ZodBoolean;
248
+ globalPlugins: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
249
+ omitSurfaces: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
250
+ agent: "agent";
251
+ browser: "browser";
252
+ ssr: "ssr";
253
+ cli: "cli";
254
+ tui: "tui";
255
+ worker: "worker";
256
+ mcp: "mcp";
257
+ bridge: "bridge";
258
+ }>>>>;
259
+ failurePolicy: z.ZodEnum<{
260
+ abort: "abort";
261
+ report: "report";
262
+ }>;
263
+ select: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
264
+ plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
265
+ }, z.core.$strict>>>;
266
+ }, z.core.$strict>>;
267
+ workspace: z.ZodOptional<z.ZodObject<{
268
+ root: z.ZodString;
269
+ cwd: z.ZodString;
270
+ moduleRoot: z.ZodString;
271
+ }, z.core.$strict>>;
272
+ }, z.core.$strict>>;
273
+ export declare const RuntimeThreadBootSchema: z.ZodReadonly<z.ZodObject<{
274
+ version: z.ZodLiteral<1>;
275
+ role: z.ZodString;
276
+ scope: z.ZodReadonly<z.ZodObject<{
277
+ hardware: z.ZodEnum<{
278
+ consumer: "consumer";
279
+ cloud: "cloud";
280
+ }>;
281
+ workspace: z.ZodOptional<z.ZodObject<{
282
+ root: z.ZodOptional<z.ZodString>;
283
+ access: z.ZodOptional<z.ZodEnum<{
284
+ read: "read";
285
+ write: "write";
286
+ }>>;
287
+ }, z.core.$strict>>;
288
+ hosting: z.ZodObject<{
289
+ mode: z.ZodUnion<readonly [z.ZodEnum<{
290
+ local: "local";
291
+ hosted: "hosted";
292
+ "managed-cloud": "managed-cloud";
293
+ }>, z.ZodString]>;
294
+ owner: z.ZodUnion<readonly [z.ZodEnum<{
295
+ consumer: "consumer";
296
+ customer: "customer";
297
+ vibes: "vibes";
298
+ }>, z.ZodString]>;
299
+ venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
300
+ "user-device": "user-device";
301
+ "ipc-worker": "ipc-worker";
302
+ doks: "doks";
303
+ "cloudflare-workers": "cloudflare-workers";
304
+ "digitalocean-functions": "digitalocean-functions";
305
+ }>, z.ZodString]>>;
306
+ provider: z.ZodOptional<z.ZodString>;
307
+ }, z.core.$strip>;
308
+ qualifiers: z.ZodObject<{
309
+ dev: z.ZodBoolean;
310
+ building: z.ZodOptional<z.ZodBoolean>;
311
+ environmentTier: z.ZodOptional<z.ZodEnum<{
312
+ local: "local";
313
+ dev: "dev";
314
+ staging: "staging";
315
+ production: "production";
316
+ }>>;
317
+ profile: z.ZodOptional<z.ZodString>;
318
+ os: z.ZodOptional<z.ZodString>;
319
+ cef: z.ZodOptional<z.ZodBoolean>;
320
+ trustedOrigin: z.ZodOptional<z.ZodString>;
321
+ rendererGeneration: z.ZodOptional<z.ZodNumber>;
322
+ filesystem: z.ZodOptional<z.ZodString>;
323
+ browserBackend: z.ZodOptional<z.ZodString>;
324
+ workspaceSessionId: z.ZodOptional<z.ZodString>;
325
+ workspaceTarget: z.ZodOptional<z.ZodString>;
326
+ repositoryId: z.ZodOptional<z.ZodString>;
327
+ remoteHostId: z.ZodOptional<z.ZodString>;
328
+ connectionMode: z.ZodOptional<z.ZodString>;
329
+ outreachExportsDir: z.ZodOptional<z.ZodString>;
330
+ serve: z.ZodOptional<z.ZodString>;
331
+ hotReload: z.ZodOptional<z.ZodEnum<{
332
+ on: "on";
333
+ off: "off";
334
+ }>>;
335
+ loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
336
+ }, z.core.$strict>;
337
+ capabilities: z.ZodOptional<z.ZodObject<{
338
+ requestPrincipals: z.ZodOptional<z.ZodBoolean>;
339
+ interactiveSession: z.ZodOptional<z.ZodBoolean>;
340
+ hostCredentials: z.ZodOptional<z.ZodBoolean>;
341
+ sharedHost: z.ZodOptional<z.ZodBoolean>;
342
+ }, z.core.$strict>>;
343
+ purpose: z.ZodEnum<{
344
+ agent: "agent";
345
+ worker: "worker";
346
+ mcp: "mcp";
347
+ direct: "direct";
348
+ projection: "projection";
349
+ }>;
350
+ surface: z.ZodEnum<{
351
+ agent: "agent";
352
+ browser: "browser";
353
+ ssr: "ssr";
354
+ cli: "cli";
355
+ tui: "tui";
356
+ worker: "worker";
357
+ mcp: "mcp";
358
+ bridge: "bridge";
359
+ }>;
360
+ lifecycle: z.ZodEnum<{
361
+ finite: "finite";
362
+ persistent: "persistent";
363
+ }>;
364
+ }, z.core.$strict>>;
365
+ buildSurface: z.ZodDiscriminatedUnion<[z.ZodObject<{
366
+ kind: z.ZodLiteral<"public">;
367
+ evidence: z.ZodLiteral<"baked">;
368
+ isPublicBinary: z.ZodLiteral<true>;
369
+ isSourceRun: z.ZodLiteral<false>;
370
+ }, z.core.$strip>, z.ZodObject<{
371
+ kind: z.ZodLiteral<"internal">;
372
+ evidence: z.ZodLiteral<"baked">;
373
+ isPublicBinary: z.ZodLiteral<false>;
374
+ isSourceRun: z.ZodLiteral<false>;
375
+ }, z.core.$strip>, z.ZodObject<{
376
+ kind: z.ZodLiteral<"source">;
377
+ evidence: z.ZodLiteral<"unset">;
378
+ isPublicBinary: z.ZodLiteral<false>;
379
+ isSourceRun: z.ZodLiteral<true>;
380
+ }, z.core.$strip>, z.ZodObject<{
381
+ kind: z.ZodLiteral<"unknown">;
382
+ evidence: z.ZodLiteral<"unrecognized">;
383
+ isPublicBinary: z.ZodLiteral<false>;
384
+ isSourceRun: z.ZodLiteral<false>;
385
+ }, z.core.$strip>], "kind">;
386
+ host: z.ZodReadonly<z.ZodObject<{
387
+ root: z.ZodString;
388
+ cwd: z.ZodOptional<z.ZodString>;
389
+ rootCustody: z.ZodOptional<z.ZodBoolean>;
390
+ shimHref: z.ZodOptional<z.ZodString>;
391
+ baseEnv: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
392
+ selfSpawn: z.ZodReadonly<z.ZodArray<z.ZodString>>;
393
+ selfSpawnSource: z.ZodNullable<z.ZodEnum<{
394
+ "compiled-binary": "compiled-binary";
395
+ "bun-source": "bun-source";
396
+ }>>;
397
+ }, z.core.$strict>>;
398
+ paths: z.ZodReadonly<z.ZodObject<{
399
+ origin: z.ZodEnum<{
400
+ environment: "environment";
401
+ "surface-default": "surface-default";
402
+ "surface-override": "surface-override";
403
+ "test-isolation": "test-isolation";
404
+ }>;
405
+ vibesHome: z.ZodString;
406
+ configDir: z.ZodString;
407
+ logDir: z.ZodString;
408
+ profileName: z.ZodOptional<z.ZodString>;
409
+ tempDir: z.ZodString;
410
+ }, z.core.$strict>>;
411
+ composition: z.ZodReadonly<z.ZodObject<{
412
+ floor: z.ZodReadonly<z.ZodObject<{
413
+ plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
414
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>>;
415
+ }, z.core.$strict>>;
416
+ global: z.ZodBoolean;
417
+ globalPlugins: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
418
+ omitSurfaces: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
419
+ agent: "agent";
420
+ browser: "browser";
421
+ ssr: "ssr";
422
+ cli: "cli";
423
+ tui: "tui";
424
+ worker: "worker";
425
+ mcp: "mcp";
426
+ bridge: "bridge";
427
+ }>>>>;
428
+ failurePolicy: z.ZodEnum<{
429
+ abort: "abort";
430
+ report: "report";
431
+ }>;
432
+ select: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
433
+ plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
434
+ }, z.core.$strict>>>;
435
+ }, z.core.$strict>>;
436
+ }, z.core.$strict>>;
437
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/runtime-plugin-host/schemas.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAO5B;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GACnC;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,wBAAwB,GAAG,0BAA0B,GAAG;IACnE,8EAA8E;IAC9E,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAChD,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB,CAAC;AAUF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;mBAUrB,CAAC;AAEvB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA8E,CAAC;AAEpH,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKrB,CAAC;AAEvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAsBd,CAAC"}
@@ -0,0 +1,54 @@
1
+ /** The Bun host's hot-plugin importer and runtime-thread declarations. */
2
+ import * as z from 'zod/v4';
3
+ import { BuildSurfaceSchema, RuntimeScopeSchema, RuntimeSurfaceSchema } from '@vibesdotdev/kernel';
4
+ import { OwnedWorkspaceBindingSchema } from '@vibesdotdev/kernel/schemas/bootstrap';
5
+ import { JsonValueSchema } from '@vibesdotdev/kernel/schemas/json';
6
+ import { PluginSpecifierListSchema } from '@vibesdotdev/kernel/schemas/package-plugins';
7
+ import { PathRootsDescriptorSchema } from '@vibesdotdev/paths';
8
+ /**
9
+ * The Bun host's portable runtime-thread boot (`runtime/plugin-host`
10
+ * `captureRuntimeThreadBoot` / `spawnRuntimeThread`): immutable host facts,
11
+ * validated again in the thread before bootstrap or file access. No runtime,
12
+ * loader, credential or connection crosses it.
13
+ */
14
+ const ThreadPathRootsSchema = PathRootsDescriptorSchema.unwrap();
15
+ export const RuntimeThreadCompositionSchema = z.object({
16
+ floor: z.object({
17
+ plugins: PluginSpecifierListSchema.readonly(),
18
+ config: z.record(z.string(), z.record(z.string(), JsonValueSchema)).optional()
19
+ }).strict().readonly(),
20
+ global: z.boolean(),
21
+ globalPlugins: PluginSpecifierListSchema.readonly().optional(),
22
+ omitSurfaces: z.array(RuntimeSurfaceSchema).readonly().optional(),
23
+ failurePolicy: z.enum(['abort', 'report']),
24
+ select: z.object({ plugins: PluginSpecifierListSchema.readonly() }).strict().readonly().optional()
25
+ }).strict().readonly();
26
+ export const RuntimeThreadScopeSchema = RuntimeScopeSchema.omit({ actor: true, tenancy: true }).strict().readonly();
27
+ /** What a caller declares for its thread: its role, its own scope and its composition. */
28
+ export const RuntimeThreadDeclarationSchema = z.object({
29
+ role: z.string().min(1),
30
+ scope: RuntimeThreadScopeSchema,
31
+ composition: RuntimeThreadCompositionSchema,
32
+ workspace: OwnedWorkspaceBindingSchema.optional()
33
+ }).strict().readonly();
34
+ export const RuntimeThreadBootSchema = z.object({
35
+ version: z.literal(1),
36
+ role: z.string().min(1),
37
+ scope: RuntimeThreadScopeSchema,
38
+ buildSurface: BuildSurfaceSchema,
39
+ host: z.object({
40
+ root: ThreadPathRootsSchema.shape.vibesHome,
41
+ cwd: ThreadPathRootsSchema.shape.vibesHome.optional(),
42
+ rootCustody: z.boolean().optional(),
43
+ shimHref: z.string().min(1).optional(),
44
+ baseEnv: z.record(z.string(), z.string()).readonly().optional(),
45
+ selfSpawn: z.array(z.string().min(1)).readonly(),
46
+ selfSpawnSource: z.enum(['compiled-binary', 'bun-source']).nullable()
47
+ }).strict().refine((host) => (host.selfSpawnSource !== null ? host.selfSpawn.length > 0 : host.rootCustody === true && host.selfSpawn.length === 0), { message: 'Non-owned runtime threads require a non-empty self-spawn argv and source.' }).readonly(),
48
+ paths: ThreadPathRootsSchema.pick({
49
+ vibesHome: true, profileName: true, configDir: true,
50
+ logDir: true, tempDir: true, origin: true
51
+ }).strict().readonly(),
52
+ composition: RuntimeThreadCompositionSchema
53
+ }).strict().readonly();
54
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/runtime-plugin-host/schemas.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Source Watcher
3
+ *
4
+ * Watches the source files that were compiled into a tracked plugin's current
5
+ * generation and reports changes. Sibling of `storage-watcher` and
6
+ * `config-watcher`: same construct/start/stop/watch/unwatch shape, injected
7
+ * logger, and no ownership of what a change *means*.
8
+ *
9
+ * Directories are watched rather than individual files, because editors and
10
+ * formatters replace files by atomic rename — a per-file watch goes deaf the
11
+ * first time a save happens that way. Events for files outside the tracked set
12
+ * are dropped.
13
+ *
14
+ * ## ENOENT re-arm
15
+ *
16
+ * A directory can be absent when `watch()` is called, or can be REMOVED and
17
+ * recreated underneath a live watcher — `bun install` rebuilds a member's
18
+ * `node_modules` symlink farm exactly this way, `git checkout` of a branch that
19
+ * does not contain a directory does it, and so does any tool that writes a tree
20
+ * by "rename the old one away, move the new one in". Both cases used to end the
21
+ * same way: one `warn` line and a permanently deaf watcher, so HMR silently
22
+ * stopped reloading and the body drifted while claiming to be hot. Silence is
23
+ * the worst possible failure mode for a freshness mechanism.
24
+ *
25
+ * So a missing directory is not a terminal state. `armMissing` retries on a
26
+ * bounded interval until the directory exists (or the watch set changes), and a
27
+ * live watcher that errors is torn down and put back into the same retry queue.
28
+ * The timer is `unref`'d, so it never holds a process open.
29
+ *
30
+ * Platforms disagree on how a replaced directory looks to a live watcher:
31
+ * macOS FSEvents reports an error, while Linux inotify keeps following the
32
+ * moved-away inode and only reports a `rename`. So each armed directory
33
+ * records its identity (device + inode); a `rename` event, `watch()` and
34
+ * `rearm()` all compare it with the path's current identity, and a missing or
35
+ * replaced directory is torn down and re-armed like an errored one.
36
+ *
37
+ * `fs.watch` can drop a write that lands while the watch is arming. Arm and
38
+ * rearm stat each tracked file and report a change when its device, inode or
39
+ * mtime differs from the stamp already recorded. The first observation only
40
+ * records the stamp.
41
+ */
42
+ import { type RuntimeRef } from '@vibesdotdev/kernel';
43
+ import type { LoggerInterface } from '@vibesdotdev/kernel/schemas/logger';
44
+ import type { PluginSourceWatcher } from '@vibesdotdev/kernel/reload';
45
+ export interface SourceWatcherOptions {
46
+ /**
47
+ * The host runtime: the re-arm retry is its lifecycle interval (RC07), disposed
48
+ * with the host, and a failed retry loop is logged on it. Poll: a directory
49
+ * that does not exist yet publishes no "created" event to a watcher of itself.
50
+ */
51
+ runtime: RuntimeRef;
52
+ logger?: LoggerInterface;
53
+ /** How often to retry a directory that could not be watched. Default 2s. */
54
+ rearmIntervalMs?: number;
55
+ }
56
+ export declare class SourceWatcher implements PluginSourceWatcher {
57
+ private readonly watchers;
58
+ private tracked;
59
+ private onChange;
60
+ private readonly log;
61
+ /** Directories that should be watched but currently are not (ENOENT, EMFILE…). */
62
+ private readonly pending;
63
+ /** Last device, inode and mtime stat recorded for a tracked file. */
64
+ private readonly stamps;
65
+ private rearmTimer;
66
+ private readonly rearmIntervalMs;
67
+ private readonly runtime;
68
+ constructor(options: SourceWatcherOptions);
69
+ /** Directories currently waiting to be (re-)armed. Diagnostic. */
70
+ getPending(): ReadonlySet<string>;
71
+ /** Try once to arm every pending directory. Exposed so tests need no timer. */
72
+ rearm(): void;
73
+ private startRearmTimer;
74
+ private stopRearmTimer;
75
+ /** Close one armed watcher and, if the directory is still wanted, queue it for re-arm. */
76
+ private disarm;
77
+ /**
78
+ * Re-arm an armed directory whose path no longer names the directory the
79
+ * watcher was opened on (removed, or replaced by rename). Returns true when
80
+ * the existing watcher is still valid.
81
+ */
82
+ private verifyArmed;
83
+ /**
84
+ * Arm one directory. Returns true when a watcher is now installed; false
85
+ * leaves the directory in `pending` for the re-arm loop.
86
+ */
87
+ private armDirectory;
88
+ private wantedDirectories;
89
+ /** Replace the tracked file set. Directories no longer needed are released. */
90
+ watch(files: readonly string[], onChange: (file: string) => void): void;
91
+ /** Directories currently held open. */
92
+ getWatched(): ReadonlySet<string>;
93
+ /** Files currently eligible to raise a change. */
94
+ getTracked(): ReadonlySet<string>;
95
+ unwatchAll(): void;
96
+ /** Stat one tracked file. A missing path is a null stamp; other stat failures propagate. */
97
+ private readStamp;
98
+ private sameStamp;
99
+ /** Record the stamp `fs.watch` just delivered so a later rearm does not report it again. */
100
+ private remember;
101
+ /**
102
+ * Report tracked files in `directory` whose device, inode or mtime moved
103
+ * since the stamp on record. The first observation only records the stamp.
104
+ */
105
+ private syncTracked;
106
+ /** Alias matching the sibling watchers' lifecycle vocabulary. */
107
+ stop(): void;
108
+ }
109
+ //# sourceMappingURL=source-watcher.consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-watcher.consumer.d.ts","sourceRoot":"","sources":["../../src/runtime-plugin-host/source-watcher.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAKH,OAAO,EAAyI,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAsC7L,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,oBAAoB;IACpC;;;;OAIG;IACH,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AA0BD,qBAAa,aAAc,YAAW,mBAAmB;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAC9D,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkB;IACtC,kFAAkF;IAClF,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,qEAAqE;IACrE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAC9D,OAAO,CAAC,UAAU,CAAyB;IAC3C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAa;gBAEzB,OAAO,EAAE,oBAAoB;IAMzC,kEAAkE;IAClE,UAAU,IAAI,WAAW,CAAC,MAAM,CAAC;IAIjC,+EAA+E;IAC/E,KAAK,IAAI,IAAI;IAcb,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,cAAc;IAMtB,0FAA0F;IAC1F,OAAO,CAAC,MAAM;IAWd;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAoBnB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAiDpB,OAAO,CAAC,iBAAiB;IAIzB,+EAA+E;IAC/E,KAAK,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAgCvE,uCAAuC;IACvC,UAAU,IAAI,WAAW,CAAC,MAAM,CAAC;IAIjC,kDAAkD;IAClD,UAAU,IAAI,WAAW,CAAC,MAAM,CAAC;IAQjC,UAAU,IAAI,IAAI;IAUlB,4FAA4F;IAC5F,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,SAAS;IAKjB,4FAA4F;IAC5F,OAAO,CAAC,QAAQ;IAWhB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAwBnB,iEAAiE;IACjE,IAAI,IAAI,IAAI;CAGZ"}