@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.
- package/LICENSE +18 -0
- package/README.md +222 -2
- package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts +6 -0
- package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts.map +1 -0
- package/dist/applet-serve-host/applet-serve-host.impl.bun.js +80 -0
- package/dist/applet-serve-host/applet-serve-host.impl.bun.js.map +1 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.d.ts +22 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.d.ts.map +1 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.js +42 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.js.map +1 -0
- package/dist/applet-serve-host/index.d.ts +7 -0
- package/dist/applet-serve-host/index.d.ts.map +1 -0
- package/dist/applet-serve-host/index.js +7 -0
- package/dist/applet-serve-host/index.js.map +1 -0
- package/dist/applet-serve-host/stylesheet.compiler.d.ts +7 -0
- package/dist/applet-serve-host/stylesheet.compiler.d.ts.map +1 -0
- package/dist/applet-serve-host/stylesheet.compiler.js +63 -0
- package/dist/applet-serve-host/stylesheet.compiler.js.map +1 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.d.ts +21 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.d.ts.map +1 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.js +148 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.js.map +1 -0
- package/dist/buffered-capture.d.ts +4 -0
- package/dist/buffered-capture.d.ts.map +1 -0
- package/dist/buffered-capture.impl.bun.d.ts +18 -0
- package/dist/buffered-capture.impl.bun.d.ts.map +1 -0
- package/dist/buffered-capture.impl.bun.js +148 -0
- package/dist/buffered-capture.impl.bun.js.map +1 -0
- package/dist/buffered-capture.js +5 -0
- package/dist/buffered-capture.js.map +1 -0
- package/dist/bun-environment.impl.bun.d.ts +231 -0
- package/dist/bun-environment.impl.bun.d.ts.map +1 -0
- package/dist/bun-environment.impl.bun.js +352 -0
- package/dist/bun-environment.impl.bun.js.map +1 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts +20 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts.map +1 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.js +30 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.js.map +1 -0
- package/dist/cache-redis/cache-redis-connector.plugin.d.ts +21 -0
- package/dist/cache-redis/cache-redis-connector.plugin.d.ts.map +1 -0
- package/dist/cache-redis/cache-redis-connector.plugin.js +32 -0
- package/dist/cache-redis/cache-redis-connector.plugin.js.map +1 -0
- package/dist/cli-checkout.impl.bun.d.ts +13 -0
- package/dist/cli-checkout.impl.bun.d.ts.map +1 -0
- package/dist/cli-checkout.impl.bun.js +26 -0
- package/dist/cli-checkout.impl.bun.js.map +1 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts +19 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.js +116 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.js.map +1 -0
- package/dist/filesystem/adapter.impl.bun.d.ts +15 -0
- package/dist/filesystem/adapter.impl.bun.d.ts.map +1 -0
- package/dist/filesystem/adapter.impl.bun.js +11 -0
- package/dist/filesystem/adapter.impl.bun.js.map +1 -0
- package/dist/filesystem/host-primitives.impl.bun.d.ts +12 -0
- package/dist/filesystem/host-primitives.impl.bun.d.ts.map +1 -0
- package/dist/filesystem/host-primitives.impl.bun.js +96 -0
- package/dist/filesystem/host-primitives.impl.bun.js.map +1 -0
- package/dist/filesystem/register.d.ts +12 -0
- package/dist/filesystem/register.d.ts.map +1 -0
- package/dist/filesystem/register.js +6 -0
- package/dist/filesystem/register.js.map +1 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.d.ts +4 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.d.ts.map +1 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.js +135 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.js.map +1 -0
- package/dist/held-launch/abi.impl.bun.d.ts +175 -0
- package/dist/held-launch/abi.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/abi.impl.bun.js +476 -0
- package/dist/held-launch/abi.impl.bun.js.map +1 -0
- package/dist/held-launch/execution.impl.bun.d.ts +48 -0
- package/dist/held-launch/execution.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/execution.impl.bun.js +375 -0
- package/dist/held-launch/execution.impl.bun.js.map +1 -0
- package/dist/held-launch/library.impl.bun.d.ts +23 -0
- package/dist/held-launch/library.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/library.impl.bun.js +178 -0
- package/dist/held-launch/library.impl.bun.js.map +1 -0
- package/dist/held-launch/schemas.d.ts +10 -0
- package/dist/held-launch/schemas.d.ts.map +1 -0
- package/dist/held-launch/schemas.js +3 -0
- package/dist/held-launch/schemas.js.map +1 -0
- package/dist/held-launch/streams.impl.bun.d.ts +38 -0
- package/dist/held-launch/streams.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/streams.impl.bun.js +183 -0
- package/dist/held-launch/streams.impl.bun.js.map +1 -0
- package/dist/host-channel.impl.bun.d.ts +25 -0
- package/dist/host-channel.impl.bun.d.ts.map +1 -0
- package/dist/host-channel.impl.bun.js +40 -0
- package/dist/host-channel.impl.bun.js.map +1 -0
- package/dist/host-client.impl.bun.d.ts +31 -0
- package/dist/host-client.impl.bun.d.ts.map +1 -0
- package/dist/host-client.impl.bun.js +39 -0
- package/dist/host-client.impl.bun.js.map +1 -0
- package/dist/host-credentials.d.ts +38 -0
- package/dist/host-credentials.d.ts.map +1 -0
- package/dist/host-credentials.js +44 -0
- package/dist/host-credentials.js.map +1 -0
- package/dist/host-loader.impl.bun.d.ts +12 -0
- package/dist/host-loader.impl.bun.d.ts.map +1 -0
- package/dist/host-loader.impl.bun.js +83 -0
- package/dist/host-loader.impl.bun.js.map +1 -0
- package/dist/host-signal.impl.bun.d.ts +11 -0
- package/dist/host-signal.impl.bun.d.ts.map +1 -0
- package/dist/host-signal.impl.bun.js +28 -0
- package/dist/host-signal.impl.bun.js.map +1 -0
- package/dist/http-listener.impl.bun.d.ts +8 -0
- package/dist/http-listener.impl.bun.d.ts.map +1 -0
- package/dist/http-listener.impl.bun.js +44 -0
- package/dist/http-listener.impl.bun.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +314 -0
- package/dist/index.js.map +1 -0
- package/dist/local-execution.impl.bun.d.ts +47 -0
- package/dist/local-execution.impl.bun.d.ts.map +1 -0
- package/dist/local-execution.impl.bun.js +150 -0
- package/dist/local-execution.impl.bun.js.map +1 -0
- package/dist/logging/file-host.impl.bun.d.ts +4 -0
- package/dist/logging/file-host.impl.bun.d.ts.map +1 -0
- package/dist/logging/file-host.impl.bun.js +36 -0
- package/dist/logging/file-host.impl.bun.js.map +1 -0
- package/dist/logging/logging.plugin.d.ts +12 -0
- package/dist/logging/logging.plugin.d.ts.map +1 -0
- package/dist/logging/logging.plugin.js +20 -0
- package/dist/logging/logging.plugin.js.map +1 -0
- package/dist/native/held-launch/aarch64-apple-darwin/libvibes_held_launch.dylib +0 -0
- package/dist/native/held-launch/aarch64-apple-darwin/manifest.json +237 -0
- package/dist/native/held-launch/aarch64-apple-darwin/vibes-held-launch +0 -0
- package/dist/native/held-launch/aarch64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
- package/dist/native/held-launch/aarch64-unknown-linux-gnu/manifest.json +237 -0
- package/dist/native/held-launch/aarch64-unknown-linux-gnu/vibes-held-launch +0 -0
- package/dist/native/held-launch/x86_64-apple-darwin/libvibes_held_launch.dylib +0 -0
- package/dist/native/held-launch/x86_64-apple-darwin/manifest.json +237 -0
- package/dist/native/held-launch/x86_64-apple-darwin/vibes-held-launch +0 -0
- package/dist/native/held-launch/x86_64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
- package/dist/native/held-launch/x86_64-unknown-linux-gnu/manifest.json +237 -0
- package/dist/native/held-launch/x86_64-unknown-linux-gnu/vibes-held-launch +0 -0
- package/dist/native-image.consumer.plugin.d.ts +4 -0
- package/dist/native-image.consumer.plugin.d.ts.map +1 -0
- package/dist/native-image.consumer.plugin.js +14 -0
- package/dist/native-image.consumer.plugin.js.map +1 -0
- package/dist/native-image.d.ts +79 -0
- package/dist/native-image.d.ts.map +1 -0
- package/dist/native-image.impl.consumer.d.ts +15 -0
- package/dist/native-image.impl.consumer.d.ts.map +1 -0
- package/dist/native-image.impl.consumer.js +86 -0
- package/dist/native-image.impl.consumer.js.map +1 -0
- package/dist/native-image.js +19 -0
- package/dist/native-image.js.map +1 -0
- package/dist/native-library.consumer.plugin.d.ts +6 -0
- package/dist/native-library.consumer.plugin.d.ts.map +1 -0
- package/dist/native-library.consumer.plugin.js +33 -0
- package/dist/native-library.consumer.plugin.js.map +1 -0
- package/dist/native-library.impl.consumer.d.ts +14 -0
- package/dist/native-library.impl.consumer.d.ts.map +1 -0
- package/dist/native-library.impl.consumer.js +46 -0
- package/dist/native-library.impl.consumer.js.map +1 -0
- package/dist/native-network/index.d.ts +3 -0
- package/dist/native-network/index.d.ts.map +1 -0
- package/dist/native-network/index.js +3 -0
- package/dist/native-network/index.js.map +1 -0
- package/dist/native-network/native-host.d.ts +4 -0
- package/dist/native-network/native-host.d.ts.map +1 -0
- package/dist/native-network/native-host.js +14 -0
- package/dist/native-network/native-host.js.map +1 -0
- package/dist/native-network/native-network.descriptor.d.ts +4 -0
- package/dist/native-network/native-network.descriptor.d.ts.map +1 -0
- package/dist/native-network/native-network.descriptor.js +11 -0
- package/dist/native-network/native-network.descriptor.js.map +1 -0
- package/dist/native-network/native-network.impl.bun.d.ts +19 -0
- package/dist/native-network/native-network.impl.bun.d.ts.map +1 -0
- package/dist/native-network/native-network.impl.bun.js +190 -0
- package/dist/native-network/native-network.impl.bun.js.map +1 -0
- package/dist/native-network/native-network.plugin.d.ts +6 -0
- package/dist/native-network/native-network.plugin.d.ts.map +1 -0
- package/dist/native-network/native-network.plugin.js +27 -0
- package/dist/native-network/native-network.plugin.js.map +1 -0
- package/dist/package-plugins/index.d.ts +11 -0
- package/dist/package-plugins/index.d.ts.map +1 -0
- package/dist/package-plugins/index.js +11 -0
- package/dist/package-plugins/index.js.map +1 -0
- package/dist/package-plugins/package-plugins.capability.bun.d.ts +11 -0
- package/dist/package-plugins/package-plugins.capability.bun.d.ts.map +1 -0
- package/dist/package-plugins/package-plugins.capability.bun.js +14 -0
- package/dist/package-plugins/package-plugins.capability.bun.js.map +1 -0
- package/dist/package-plugins/primitives.impl.bun.d.ts +11 -0
- package/dist/package-plugins/primitives.impl.bun.d.ts.map +1 -0
- package/dist/package-plugins/primitives.impl.bun.js +32 -0
- package/dist/package-plugins/primitives.impl.bun.js.map +1 -0
- package/dist/package-plugins/read-admission.impl.bun.d.ts +11 -0
- package/dist/package-plugins/read-admission.impl.bun.d.ts.map +1 -0
- package/dist/package-plugins/read-admission.impl.bun.js +224 -0
- package/dist/package-plugins/read-admission.impl.bun.js.map +1 -0
- package/dist/package-plugins/schemas.d.ts +28 -0
- package/dist/package-plugins/schemas.d.ts.map +1 -0
- package/dist/package-plugins/schemas.js +3 -0
- package/dist/package-plugins/schemas.js.map +1 -0
- package/dist/process/launch-artifacts.impl.bun.d.ts +11 -0
- package/dist/process/launch-artifacts.impl.bun.d.ts.map +1 -0
- package/dist/process/launch-artifacts.impl.bun.js +25 -0
- package/dist/process/launch-artifacts.impl.bun.js.map +1 -0
- package/dist/process/process-probe.impl.bun.d.ts +15 -0
- package/dist/process/process-probe.impl.bun.d.ts.map +1 -0
- package/dist/process/process-probe.impl.bun.js +35 -0
- package/dist/process/process-probe.impl.bun.js.map +1 -0
- package/dist/process/runtime-process.impl.bun.d.ts +20 -0
- package/dist/process/runtime-process.impl.bun.d.ts.map +1 -0
- package/dist/process/runtime-process.impl.bun.js +42 -0
- package/dist/process/runtime-process.impl.bun.js.map +1 -0
- package/dist/process/schemas.d.ts +9 -0
- package/dist/process/schemas.d.ts.map +1 -0
- package/dist/process/schemas.js +3 -0
- package/dist/process/schemas.js.map +1 -0
- package/dist/process/spawn.impl.bun.d.ts +31 -0
- package/dist/process/spawn.impl.bun.d.ts.map +1 -0
- package/dist/process/spawn.impl.bun.js +66 -0
- package/dist/process/spawn.impl.bun.js.map +1 -0
- package/dist/process/which.impl.bun.d.ts +16 -0
- package/dist/process/which.impl.bun.d.ts.map +1 -0
- package/dist/process/which.impl.bun.js +25 -0
- package/dist/process/which.impl.bun.js.map +1 -0
- package/dist/pty.adapter.impl.bun.d.ts +17 -0
- package/dist/pty.adapter.impl.bun.d.ts.map +1 -0
- package/dist/pty.adapter.impl.bun.js +102 -0
- package/dist/pty.adapter.impl.bun.js.map +1 -0
- package/dist/pty.darwin.impl.bun.d.ts +11 -0
- package/dist/pty.darwin.impl.bun.d.ts.map +1 -0
- package/dist/pty.darwin.impl.bun.js +200 -0
- package/dist/pty.darwin.impl.bun.js.map +1 -0
- package/dist/pty.node-host.impl.bun.d.ts +10 -0
- package/dist/pty.node-host.impl.bun.d.ts.map +1 -0
- package/dist/pty.node-host.impl.bun.js +42 -0
- package/dist/pty.node-host.impl.bun.js.map +1 -0
- package/dist/resolution-root.impl.bun.d.ts +170 -0
- package/dist/resolution-root.impl.bun.d.ts.map +1 -0
- package/dist/resolution-root.impl.bun.js +373 -0
- package/dist/resolution-root.impl.bun.js.map +1 -0
- package/dist/restricted-execute.darwin.impl.bun.d.ts +19 -0
- package/dist/restricted-execute.darwin.impl.bun.d.ts.map +1 -0
- package/dist/restricted-execute.darwin.impl.bun.js +459 -0
- package/dist/restricted-execute.darwin.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts +2 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js +31 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js.map +1 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts +20 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.js +236 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts +2 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js +66 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts +45 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.js +490 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.d.ts +83 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.js +168 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts +37 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.js +159 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts +4 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js +181 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts +17 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js +36 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts +53 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.js +249 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts +2 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.js +56 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.js.map +1 -0
- package/dist/runtime-plugin-host/schemas.d.ts +437 -0
- package/dist/runtime-plugin-host/schemas.d.ts.map +1 -0
- package/dist/runtime-plugin-host/schemas.js +54 -0
- package/dist/runtime-plugin-host/schemas.js.map +1 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.d.ts +109 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.js +383 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.js.map +1 -0
- package/dist/schemas/environment.d.ts +197 -0
- package/dist/schemas/environment.d.ts.map +1 -0
- package/dist/schemas/environment.js +7 -0
- package/dist/schemas/environment.js.map +1 -0
- package/dist/schemas/host-resources.d.ts +85 -0
- package/dist/schemas/host-resources.d.ts.map +1 -0
- package/dist/schemas/host-resources.js +22 -0
- package/dist/schemas/host-resources.js.map +1 -0
- package/dist/schemas/native-image.d.ts +128 -0
- package/dist/schemas/native-image.d.ts.map +1 -0
- package/dist/schemas/native-image.js +45 -0
- package/dist/schemas/native-image.js.map +1 -0
- package/dist/schemas/native-network.d.ts +56 -0
- package/dist/schemas/native-network.d.ts.map +1 -0
- package/dist/schemas/native-network.js +55 -0
- package/dist/schemas/native-network.js.map +1 -0
- package/dist/schemas/restricted-execute.d.ts +40 -0
- package/dist/schemas/restricted-execute.d.ts.map +1 -0
- package/dist/schemas/restricted-execute.js +14 -0
- package/dist/schemas/restricted-execute.js.map +1 -0
- package/dist/schemas/runtime-socket.d.ts +8 -0
- package/dist/schemas/runtime-socket.d.ts.map +1 -0
- package/dist/schemas/runtime-socket.js +7 -0
- package/dist/schemas/runtime-socket.js.map +1 -0
- package/dist/schemas/self-spawn.d.ts +11 -0
- package/dist/schemas/self-spawn.d.ts.map +1 -0
- package/dist/schemas/self-spawn.js +3 -0
- package/dist/schemas/self-spawn.js.map +1 -0
- package/dist/schemas/standard-output.d.ts +6 -0
- package/dist/schemas/standard-output.d.ts.map +1 -0
- package/dist/schemas/standard-output.js +2 -0
- package/dist/schemas/standard-output.js.map +1 -0
- package/dist/schemas/telemetry.d.ts +25 -0
- package/dist/schemas/telemetry.d.ts.map +1 -0
- package/dist/schemas/telemetry.js +10 -0
- package/dist/schemas/telemetry.js.map +1 -0
- package/dist/schemas/test-environment.d.ts +27 -0
- package/dist/schemas/test-environment.d.ts.map +1 -0
- package/dist/schemas/test-environment.js +2 -0
- package/dist/schemas/test-environment.js.map +1 -0
- package/dist/serve-stall-start.d.ts +8 -0
- package/dist/serve-stall-start.d.ts.map +1 -0
- package/dist/serve-stall-start.js +88 -0
- package/dist/serve-stall-start.js.map +1 -0
- package/dist/serve-stall.d.ts +11 -0
- package/dist/serve-stall.d.ts.map +1 -0
- package/dist/serve-stall.js +19 -0
- package/dist/serve-stall.js.map +1 -0
- package/dist/serve-stall.plugin.d.ts +10 -0
- package/dist/serve-stall.plugin.d.ts.map +1 -0
- package/dist/serve-stall.plugin.js +34 -0
- package/dist/serve-stall.plugin.js.map +1 -0
- package/dist/services/account-home.d.ts +39 -0
- package/dist/services/account-home.d.ts.map +1 -0
- package/dist/services/account-home.js +152 -0
- package/dist/services/account-home.js.map +1 -0
- package/dist/services/cli-process-host.d.ts +50 -0
- package/dist/services/cli-process-host.d.ts.map +1 -0
- package/dist/services/cli-process-host.js +88 -0
- package/dist/services/cli-process-host.js.map +1 -0
- package/dist/services/compatibility-host.impl.bun.d.ts +4 -0
- package/dist/services/compatibility-host.impl.bun.d.ts.map +1 -0
- package/dist/services/compatibility-host.impl.bun.js +24 -0
- package/dist/services/compatibility-host.impl.bun.js.map +1 -0
- package/dist/services/executable-identity.impl.bun.d.ts +164 -0
- package/dist/services/executable-identity.impl.bun.d.ts.map +1 -0
- package/dist/services/executable-identity.impl.bun.js +73 -0
- package/dist/services/executable-identity.impl.bun.js.map +1 -0
- package/dist/services/fatal-signals.impl.bun.d.ts +15 -0
- package/dist/services/fatal-signals.impl.bun.d.ts.map +1 -0
- package/dist/services/fatal-signals.impl.bun.js +61 -0
- package/dist/services/fatal-signals.impl.bun.js.map +1 -0
- package/dist/services/graph-freshness.impl.bun.d.ts +108 -0
- package/dist/services/graph-freshness.impl.bun.d.ts.map +1 -0
- package/dist/services/graph-freshness.impl.bun.js +49 -0
- package/dist/services/graph-freshness.impl.bun.js.map +1 -0
- package/dist/services/host-identity.capability.bun.d.ts +10 -0
- package/dist/services/host-identity.capability.bun.d.ts.map +1 -0
- package/dist/services/host-identity.capability.bun.js +27 -0
- package/dist/services/host-identity.capability.bun.js.map +1 -0
- package/dist/services/host-identity.impl.bun.d.ts +53 -0
- package/dist/services/host-identity.impl.bun.d.ts.map +1 -0
- package/dist/services/host-identity.impl.bun.js +76 -0
- package/dist/services/host-identity.impl.bun.js.map +1 -0
- package/dist/services/host-resources.impl.bun.d.ts +49 -0
- package/dist/services/host-resources.impl.bun.d.ts.map +1 -0
- package/dist/services/host-resources.impl.bun.js +144 -0
- package/dist/services/host-resources.impl.bun.js.map +1 -0
- package/dist/services/http-fetch.impl.bun.d.ts +10 -0
- package/dist/services/http-fetch.impl.bun.d.ts.map +1 -0
- package/dist/services/http-fetch.impl.bun.js +38 -0
- package/dist/services/http-fetch.impl.bun.js.map +1 -0
- package/dist/services/output-plane.impl.bun.d.ts +6 -0
- package/dist/services/output-plane.impl.bun.d.ts.map +1 -0
- package/dist/services/output-plane.impl.bun.js +26 -0
- package/dist/services/output-plane.impl.bun.js.map +1 -0
- package/dist/services/process-action-lifetime.consumer.d.ts +47 -0
- package/dist/services/process-action-lifetime.consumer.d.ts.map +1 -0
- package/dist/services/process-action-lifetime.consumer.js +68 -0
- package/dist/services/process-action-lifetime.consumer.js.map +1 -0
- package/dist/services/process-view.impl.bun.d.ts +18 -0
- package/dist/services/process-view.impl.bun.d.ts.map +1 -0
- package/dist/services/process-view.impl.bun.js +17 -0
- package/dist/services/process-view.impl.bun.js.map +1 -0
- package/dist/services/runtime-host-signals.impl.bun.d.ts +8 -0
- package/dist/services/runtime-host-signals.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-host-signals.impl.bun.js +29 -0
- package/dist/services/runtime-host-signals.impl.bun.js.map +1 -0
- package/dist/services/runtime-http-listener.impl.bun.d.ts +14 -0
- package/dist/services/runtime-http-listener.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-http-listener.impl.bun.js +463 -0
- package/dist/services/runtime-http-listener.impl.bun.js.map +1 -0
- package/dist/services/runtime-path.impl.bun.d.ts +16 -0
- package/dist/services/runtime-path.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-path.impl.bun.js +34 -0
- package/dist/services/runtime-path.impl.bun.js.map +1 -0
- package/dist/services/runtime-scoped-values.impl.bun.d.ts +4 -0
- package/dist/services/runtime-scoped-values.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-scoped-values.impl.bun.js +7 -0
- package/dist/services/runtime-scoped-values.impl.bun.js.map +1 -0
- package/dist/services/runtime-socket-datagram.impl.bun.d.ts +15 -0
- package/dist/services/runtime-socket-datagram.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-socket-datagram.impl.bun.js +19 -0
- package/dist/services/runtime-socket-datagram.impl.bun.js.map +1 -0
- package/dist/services/runtime-socket.impl.bun.d.ts +20 -0
- package/dist/services/runtime-socket.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-socket.impl.bun.js +47 -0
- package/dist/services/runtime-socket.impl.bun.js.map +1 -0
- package/dist/services/runtime-stdio.impl.bun.d.ts +11 -0
- package/dist/services/runtime-stdio.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-stdio.impl.bun.js +37 -0
- package/dist/services/runtime-stdio.impl.bun.js.map +1 -0
- package/dist/services/self-spawn.impl.bun.d.ts +39 -0
- package/dist/services/self-spawn.impl.bun.d.ts.map +1 -0
- package/dist/services/self-spawn.impl.bun.js +58 -0
- package/dist/services/self-spawn.impl.bun.js.map +1 -0
- package/dist/services/standard-output.d.ts +100 -0
- package/dist/services/standard-output.d.ts.map +1 -0
- package/dist/services/standard-output.js +35 -0
- package/dist/services/standard-output.js.map +1 -0
- package/dist/services/user-environment.impl.bun.d.ts +19 -0
- package/dist/services/user-environment.impl.bun.d.ts.map +1 -0
- package/dist/services/user-environment.impl.bun.js +117 -0
- package/dist/services/user-environment.impl.bun.js.map +1 -0
- package/dist/services/workspace-env.d.ts +30 -0
- package/dist/services/workspace-env.d.ts.map +1 -0
- package/dist/services/workspace-env.js +45 -0
- package/dist/services/workspace-env.js.map +1 -0
- package/dist/services/workspace-root-probe.impl.bun.d.ts +14 -0
- package/dist/services/workspace-root-probe.impl.bun.d.ts.map +1 -0
- package/dist/services/workspace-root-probe.impl.bun.js +27 -0
- package/dist/services/workspace-root-probe.impl.bun.js.map +1 -0
- package/dist/session-members.impl.bun.d.ts +22 -0
- package/dist/session-members.impl.bun.d.ts.map +1 -0
- package/dist/session-members.impl.bun.js +74 -0
- package/dist/session-members.impl.bun.js.map +1 -0
- package/dist/sqlite-driver/index.d.ts +7 -0
- package/dist/sqlite-driver/index.d.ts.map +1 -0
- package/dist/sqlite-driver/index.js +7 -0
- package/dist/sqlite-driver/index.js.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts +6 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.js +269 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.js.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.d.ts +22 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.d.ts.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.js +44 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.js.map +1 -0
- package/dist/telemetry/telemetry.d.ts +34 -0
- package/dist/telemetry/telemetry.d.ts.map +1 -0
- package/dist/telemetry/telemetry.js +2 -0
- package/dist/telemetry/telemetry.js.map +1 -0
- package/dist/telemetry/telemetry.plugin.d.ts +4 -0
- package/dist/telemetry/telemetry.plugin.d.ts.map +1 -0
- package/dist/telemetry/telemetry.plugin.js +78 -0
- package/dist/telemetry/telemetry.plugin.js.map +1 -0
- package/dist/terminal-pty-bridge.impl.bun.d.ts +31 -0
- package/dist/terminal-pty-bridge.impl.bun.d.ts.map +1 -0
- package/dist/terminal-pty-bridge.impl.bun.js +333 -0
- package/dist/terminal-pty-bridge.impl.bun.js.map +1 -0
- package/dist/test-tooling/lazy-environment.impl.bun.d.ts +16 -0
- package/dist/test-tooling/lazy-environment.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/lazy-environment.impl.bun.js +36 -0
- package/dist/test-tooling/lazy-environment.impl.bun.js.map +1 -0
- package/dist/test-tooling/starttls-refusal.d.ts +7 -0
- package/dist/test-tooling/starttls-refusal.d.ts.map +1 -0
- package/dist/test-tooling/starttls-refusal.js +50 -0
- package/dist/test-tooling/starttls-refusal.js.map +1 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts +2 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.js +4 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.js.map +1 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.d.ts +10 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.js +33 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.js.map +1 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts +2 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.js +4 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.js.map +1 -0
- package/dist/test-tooling/test-environment.impl.bun.d.ts +45 -0
- package/dist/test-tooling/test-environment.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/test-environment.impl.bun.js +163 -0
- package/dist/test-tooling/test-environment.impl.bun.js.map +1 -0
- package/dist/test-tooling/test-process-root.impl.bun.d.ts +4 -0
- package/dist/test-tooling/test-process-root.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/test-process-root.impl.bun.js +65 -0
- package/dist/test-tooling/test-process-root.impl.bun.js.map +1 -0
- package/dist/test-tooling/unix-http.impl.bun.d.ts +28 -0
- package/dist/test-tooling/unix-http.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/unix-http.impl.bun.js +181 -0
- package/dist/test-tooling/unix-http.impl.bun.js.map +1 -0
- package/dist/transpiler/transpiler.plugin.d.ts +10 -0
- package/dist/transpiler/transpiler.plugin.d.ts.map +1 -0
- package/dist/transpiler/transpiler.plugin.js +18 -0
- package/dist/transpiler/transpiler.plugin.js.map +1 -0
- package/native/held-launch/Cargo.toml +23 -0
- package/native/held-launch/abi-manifest.json +234 -0
- package/native/held-launch/src/bin/vibes-held-launch.rs +35 -0
- package/native/held-launch/src/events.rs +99 -0
- package/native/held-launch/src/lib.rs +528 -0
- package/native/held-launch/symbols.golden +21 -0
- package/package.json +313 -4
- package/resources/restricted-supervisor.impl.bun.d.mts +3 -0
- package/resources/restricted-supervisor.impl.bun.mjs +49 -0
- package/resources/serve-stall-watch.impl.bun.d.mts +3 -0
- package/resources/serve-stall-watch.impl.bun.mjs +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 VIBES DEV LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
6
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
15
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
16
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
18
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,223 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vibesdotdev/host-bun
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Bun host bindings for the Vibes runtime. A host selects this provider once;
|
|
4
|
+
reusable features receive the runtime and resolve its environment, execution,
|
|
5
|
+
loader, paths and sockets through their public kinds.
|
|
6
|
+
|
|
7
|
+
This package is part of the public Vibes framework package set. The source repository is private while the public repository split is being prepared, so package documentation is published on the Vibes docs site.
|
|
8
|
+
|
|
9
|
+
## Native protocol networking
|
|
10
|
+
|
|
11
|
+
The environment warms `host.native-network`. Resolve it with
|
|
12
|
+
`getVibesClient<NativeNetworkClient>('host.native-network', runtime)`, importing
|
|
13
|
+
the type from `@vibesdotdev/host-bun/native-network`. Native hosts composing
|
|
14
|
+
their own environment can register `bunNativeNetworkPlugin` from
|
|
15
|
+
`@vibesdotdev/host-bun/native-network/plugin`.
|
|
16
|
+
|
|
17
|
+
The client creates raw HTTP servers, SSH servers, real WebSocket servers and
|
|
18
|
+
outbound WebSockets, and verifies SSH signed blobs with ssh2's key verifier.
|
|
19
|
+
Native compatibility types and `WebSocketState` are available on the same
|
|
20
|
+
subpath. Caller-owned host keys and protocol limits pass through explicitly.
|
|
21
|
+
Resources remain caller-closeable; runtime disposal drains and joins them,
|
|
22
|
+
forcing stalled peers after its declared shutdown budget. Native cloud Bun
|
|
23
|
+
hosts have the same networking and SQLite admission as consumer Bun hosts.
|
|
24
|
+
Browser surfaces and non-native loader substrates refuse these capabilities.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
bun add @vibesdotdev/host-bun
|
|
30
|
+
# or
|
|
31
|
+
npm install @vibesdotdev/host-bun
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Boot a Bun host
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { bootstrapVibesRuntime } from '@vibesdotdev/kernel';
|
|
38
|
+
import { createRuntimeEnvironmentBunPlugin } from '@vibesdotdev/host-bun';
|
|
39
|
+
import { getPathRoots } from '@vibesdotdev/paths';
|
|
40
|
+
|
|
41
|
+
const runtime = await bootstrapVibesRuntime({
|
|
42
|
+
environment: createRuntimeEnvironmentBunPlugin({
|
|
43
|
+
scope: {
|
|
44
|
+
surface: 'cli',
|
|
45
|
+
hardware: 'consumer',
|
|
46
|
+
purpose: 'direct',
|
|
47
|
+
lifecycle: 'finite',
|
|
48
|
+
hosting: { mode: 'local', owner: 'consumer', venue: 'user-device' },
|
|
49
|
+
capabilities: { interactiveSession: true },
|
|
50
|
+
qualifiers: { dev: false, environmentTier: 'local' }
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
composition: { kind: 'literal', plugins: [] },
|
|
54
|
+
binding: 'owned'
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
console.log(getPathRoots(runtime).activeHome);
|
|
59
|
+
} finally {
|
|
60
|
+
await runtime.dispose();
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Declare the host's actual scope. There is no default environment plugin.
|
|
65
|
+
The configured plugin registers the `runtime-environment-bun` documentation
|
|
66
|
+
topic beneath Runtime in the Docs catalog.
|
|
67
|
+
`workspace.root` declares the workspace to capture; `host.root` declares the
|
|
68
|
+
resolution root for filesystem plugin composition. They serve different
|
|
69
|
+
purposes. Path layout overrides belong to the factory's `paths` option and
|
|
70
|
+
are validated by `@vibesdotdev/paths`.
|
|
71
|
+
|
|
72
|
+
For multiple runtimes in one process, create one `createBunHostResources()`
|
|
73
|
+
from `./services/standard-output` and pass it as `hostResources` to each factory.
|
|
74
|
+
Use `createBunStandardOutput(hostResources)` for output before boot and after
|
|
75
|
+
failed boot. `setOutputPlaneFormatter(formatter, hostResources)` selects its
|
|
76
|
+
renderer before registration. The last runtime release drains output, restores
|
|
77
|
+
console/stream hooks and detaches native observers; it preserves the formatter
|
|
78
|
+
for later reporting. Each runtime resolves its own `bun-host` semantic client
|
|
79
|
+
through `getVibesClient('bun-host', runtime)`; disposal attempts every native
|
|
80
|
+
transport cleanup and reports failures together. With `hostResources` omitted,
|
|
81
|
+
each runtime constructs and releases its own resources, including when the same
|
|
82
|
+
plugin is reused. `BunHostClient` and `bunHostClientDescriptor` are exported for
|
|
83
|
+
`getVibesClient<BunHostClient>('bun-host', runtime)` and synchronous
|
|
84
|
+
`tryGetVibesClient` from `@vibesdotdev/kernel/client` after activation.
|
|
85
|
+
|
|
86
|
+
Independent stdin owners detach only their own branch; retiring either owner
|
|
87
|
+
preserves byte delivery to the survivor. Independent output owners preserve the
|
|
88
|
+
surviving formatter and restore the original hooks on final retirement, through
|
|
89
|
+
execution-local's canonical output-plane base. No host-local registry or
|
|
90
|
+
replacement output-plane implementation is introduced.
|
|
91
|
+
|
|
92
|
+
The client's `resources` property exposes its explicit owner.
|
|
93
|
+
`createBunStandardOutput(runtime)` uses `tryGetVibesClient` synchronously;
|
|
94
|
+
an unavailable client refuses `UNAVAILABLE bun-host-client-unavailable`.
|
|
95
|
+
Direct stdio construction borrows the activated client's resources, or owns
|
|
96
|
+
and disposes its resources when there is no client. Direct signal construction
|
|
97
|
+
owns and detaches its native fatal source unless a source is supplied.
|
|
98
|
+
`captureBunCliProcessHost(resources)` accepts the same explicit output owner.
|
|
99
|
+
|
|
100
|
+
Legacy no-owner output and process-fatal helpers resolve the activated
|
|
101
|
+
`bun-host` client on every call. The facade holds no resources. Before boot
|
|
102
|
+
and after disposal, executable owners must pass explicit resources through
|
|
103
|
+
formatter selection, environment construction, reporting, flush and disposal.
|
|
104
|
+
External migration remains for surface-cli's Bun host, cli-bin's monolith,
|
|
105
|
+
shield-cli's entry and cli's bootstrap.
|
|
106
|
+
The root socket class export remains for
|
|
107
|
+
`workspace/src/daemon/__tests__/owned.ts`; new concrete imports use
|
|
108
|
+
`./services/runtime-socket`, and generic consumers resolve `runtime/socket`.
|
|
109
|
+
|
|
110
|
+
The environment captures argv, cwd, environment variables and user/temp roots
|
|
111
|
+
at construction. Child environments are composed from the handed runtime;
|
|
112
|
+
later changes to `process.env` do not alter that host. Bun's asynchronous
|
|
113
|
+
invocation store keeps concurrent actors, tenants and workspaces separate.
|
|
114
|
+
|
|
115
|
+
The factory composes the canonical local execution plugin. Optional
|
|
116
|
+
`restrictedExecution`, `heldLaunch` and `nativeLaunch` declarations go to that
|
|
117
|
+
owner. An existing local plugin cannot silently replace an explicit admission.
|
|
118
|
+
Without a held/native artifact declaration, ordinary execution remains available
|
|
119
|
+
and resource-enforced launches refuse rather than guessing an artifact.
|
|
120
|
+
|
|
121
|
+
Identity helpers use the activated client or explicit resources. Share one
|
|
122
|
+
resource owner to pin physical executable evidence while retaining each
|
|
123
|
+
environment's stable classification and source reference. Pre-boot callers pass
|
|
124
|
+
`resources.classifier` to identity helpers and `resources.executable` to
|
|
125
|
+
`executableHostFactsOf(runtime, executable)`. Missing environments refuse
|
|
126
|
+
`INTERNAL/environment-unregistered`; missing activated or explicit owners
|
|
127
|
+
refuse `UNAVAILABLE/bun-host-client-unavailable`. No ambient identity cache is used.
|
|
128
|
+
|
|
129
|
+
Graph pins belong to `client.graph`. Before boot, own
|
|
130
|
+
`createBunGraphFreshness()` from `./services/graph-freshness` and pass that
|
|
131
|
+
owner to graph capture, lookup and freshness helpers. The standalone HTTP
|
|
132
|
+
plugin reuses the host listener or resolves its own `bun-http-listener`
|
|
133
|
+
client, which the kernel disposes.
|
|
134
|
+
|
|
135
|
+
## Public surfaces
|
|
136
|
+
|
|
137
|
+
| Import | Use |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Package root | Configured environment factory, semantic client and compatibility host helpers |
|
|
140
|
+
| `./loader` | Bun host module import, public export resolution and filesystem port |
|
|
141
|
+
| `./local-execution` | Canonical local execution composition (`bunProcessHost`, which builds on this host's own `bunNativeProcessHost()`, its spawn and command discovery over `runtime-execution-local`'s bases and its PTY adapter, and adds buffered capture, the restricted macOS adapter and held launch over the `bun:ffi` artifact binding; `bunLocalExecutionPlugin`) and native manifest selection |
|
|
142
|
+
| `./native/held-launch/abi`, `./native/held-launch/<target>` | The held-launch ABI manifest and the staged native artifact manifest for each of `aarch64-apple-darwin`, `x86_64-apple-darwin`, `aarch64-unknown-linux-gnu`, `x86_64-unknown-linux-gnu` (file exports; built by `bun run build:native`) |
|
|
143
|
+
| `./buffered-capture` | The Bun file-backed buffered-capture backend `LocalExecution` retries through |
|
|
144
|
+
| `./package-plugins` | This host's `runtime/package-plugins` (`createBunRuntimePackagePlugins`) and its primitives for the kernel's scope base (`createBunPackagePluginsHost`, `bunPackagePluginWrites`, `bunPackageManifestJsonc`); package-graph read admission (`planPackageReadAdmission`, `verifyPackageReadAdmission`). Plugin composition and the scope readers and writers are the kernel's (`@vibesdotdev/kernel/bootstrap`) |
|
|
145
|
+
| `./host-credentials` | The CLI's pre-runtime `hasLiveHostCredentials` declaration (the manifest grammar and liveness verdict live in `@vibesdotdev/kernel`) |
|
|
146
|
+
| `./services/runtime-path` | Native path mechanics over captured facts |
|
|
147
|
+
| `./services/runtime-socket` | Local socket endpoint, listen, connect and readiness mechanics |
|
|
148
|
+
| `./services/self-spawn` | Declared compiled/source re-entry argv |
|
|
149
|
+
| `./services/workspace-env` | Workspace child environment composition |
|
|
150
|
+
| `./services/process-action-lifetime` | Host signal admission and awaited cleanup |
|
|
151
|
+
| `./services/user-environment` | Native user environment/profile discovery |
|
|
152
|
+
| `./services/host-identity` | Captured host identity and executable shape |
|
|
153
|
+
| `./services/executable-identity` | Replaced executable detection |
|
|
154
|
+
| `./services/graph-freshness` | Per-runtime graph pin and freshness verdict |
|
|
155
|
+
| `./test-tooling/svelte-compiler`, `./test-tooling/svelte-client-preload`, `./test-tooling/svelte-server-preload` | Test tooling: a Bun plugin that compiles `*.svelte.ts` modules and `*.svelte` components with the real Svelte compiler (`registerSvelteCompiler({ generate })`); packages wire a preload from their `bunfig.toml` (`preload = ["@vibesdotdev/host-bun/test-tooling/svelte-server-preload"]`) so no test imports `bun`. `svelte` is an optional peer. |
|
|
156
|
+
| `./test-tooling/unix-http` | Test tooling: Bun HTTP over declared Unix sockets for one isolated test realm (`createUnixHttpServer`, `createUnixHttpFetch`, `installUnixHttpTransport`); refuses undeclared origins and overlapping fetch owners with `test-unix-http-*` reasons. Re-exported by `@vibesdotdev/testing/bun/http`. |
|
|
157
|
+
| `./test-tooling/lazy-environment` | Test tooling: the environment, local-execution and HTTP-listener plugin factories with their root signatures, plus `createBunTestExecutionEnvironment({ scope, home })`, each loading this host on its first call. The door's graph excludes the restricted-execution supervisor, so a composition root can import it from any runner. Re-exported by `@vibesdotdev/testing/test-environment`. |
|
|
158
|
+
|
|
159
|
+
These are Bun host APIs. Generic consumers use the Runtime and Paths contracts
|
|
160
|
+
with their handed runtime so another selected provider remains usable.
|
|
161
|
+
The selected stdio context supports an exclusive stdout-or-stderr/console capture lease
|
|
162
|
+
through `getRuntimeStdioCapture(runtime)` (the lease's `target` names the stream),
|
|
163
|
+
and a bounded stdin read through `getRuntimeStdin(runtime)`. It preserves native byte forwarding,
|
|
164
|
+
backpressure and callback completion, and restores its owned hooks on close or
|
|
165
|
+
Runtime disposal. The calling feature supplies framing and rendering policy.
|
|
166
|
+
`getBunEnvironment` is for code that owns a Bun host; it intentionally refuses a
|
|
167
|
+
different environment with `UNAVAILABLE bun-environment-unavailable`. The
|
|
168
|
+
package's publish load probe runs under Bun.
|
|
169
|
+
|
|
170
|
+
Workspace MCP identity belongs to the synchronous, runtime-neutral
|
|
171
|
+
`@vibesdotdev/paths/workspace-mcp-host` contract. Its Shared hashing
|
|
172
|
+
implementation needs no native environment binding.
|
|
173
|
+
|
|
174
|
+
Plugin selection uses declared public exports and installed workspace links.
|
|
175
|
+
It never installs packages at startup or scans source for an implementation.
|
|
176
|
+
Writers preserve JSONC comments and sibling keys, refuse malformed input before
|
|
177
|
+
editing, and refresh member resolution after successful link/unlink writes.
|
|
178
|
+
|
|
179
|
+
Freshness has three outcomes: replaced, verified unchanged, and unknown.
|
|
180
|
+
Unreadable evidence is unknown. Process-table failures propagate, and missing
|
|
181
|
+
host facts produce typed refusals rather than an ambient fallback.
|
|
182
|
+
|
|
183
|
+
See [SPEC.md](SPEC.md) for the owner contract, [the package guide](https://docs.vibes.dev/runtime-environment-bun)
|
|
184
|
+
and [Vibes docs](https://docs.vibes.dev) for the framework contracts.
|
|
185
|
+
|
|
186
|
+
## Verification
|
|
187
|
+
|
|
188
|
+
Buffered fallback scenarios resolve execution through an owned composed runtime,
|
|
189
|
+
the public execution plugin and Bun process ports. Direct backend checks remain.
|
|
190
|
+
The zero-timeout success assertion is preserved: kernel's
|
|
191
|
+
`src/execution/schemas/execute.ts:102` currently rejects zero with `.positive()`
|
|
192
|
+
before native spawn. Its owner must admit nonnegative integral timeouts;
|
|
193
|
+
execution-local already treats zero as no deadline. No host-side policy bypass
|
|
194
|
+
is installed. Pre-runtime reporting requires the explicit resources described above.
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
`bun run check` checks all source and tests through the no-emit `tsconfig.json`
|
|
198
|
+
and scripts through `tsconfig.check.json`. `bun run build` emits production JS
|
|
199
|
+
and declarations with `tsconfig.build.json` and stages native artifacts.
|
|
200
|
+
`bun run test` prepares native fixtures and runs the suites. `bun run test:native`
|
|
201
|
+
also compiles and runs the real bundled-host identity fixture outside the unit suite. The public package
|
|
202
|
+
contract test imports source entrypoints in-process and checks schemas, inferred
|
|
203
|
+
types, refusals, supervisor hash, ABI declarations and publication patterns;
|
|
204
|
+
it does not prove distributed tarball bytes. Release preflight owns that proof.
|
|
205
|
+
Native account-home scenarios select Darwin or Linux explicitly; PTY ownership
|
|
206
|
+
selects those supported hosts, with unsupported-host refusals in the adapter suite.
|
|
207
|
+
Pipe stdin cases run everywhere; POSIX device/closed-descriptor cases require POSIX.
|
|
208
|
+
|
|
209
|
+
## License
|
|
210
|
+
|
|
211
|
+
MIT. See [LICENSE](LICENSE).
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## Native images without a host boot
|
|
215
|
+
|
|
216
|
+
Compose `nativeImagePlugin` from `@vibesdotdev/host-bun/native-image/plugin`
|
|
217
|
+
on a consumer runtime, then resolve `host/native-image`. The public
|
|
218
|
+
`@vibesdotdev/host-bun/native-image` contract exposes schemas and `NativeImage`:
|
|
219
|
+
`metadata({ data, maxPixels, autoOrient })` returns dimensions;
|
|
220
|
+
`encode(...)` applies validated native options and returns bytes plus readback
|
|
221
|
+
dimensions. No Bun objects cross the boundary and no unrelated host services
|
|
222
|
+
boot. See SPEC for fixed refusals and cause preservation. Media-bun composes
|
|
223
|
+
this plugin automatically and owns its domain policy.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AppletServeHost } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
|
|
2
|
+
/** Transpile one TypeScript source to JavaScript (browser-servable; the host's `runtime/transpiler` too). */
|
|
3
|
+
export declare function transpileTypeScriptSource(source: string): string;
|
|
4
|
+
/** The Bun host's `applet/serve-host` implementation. */
|
|
5
|
+
export declare function createBunAppletServeHost(): AppletServeHost;
|
|
6
|
+
//# sourceMappingURL=applet-serve-host.impl.bun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-serve-host.impl.bun.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.impl.bun.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACX,eAAe,EAGf,MAAM,kDAAkD,CAAC;AAqB1D,6GAA6G;AAC7G,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhE;AAmBD,yDAAyD;AACzD,wBAAgB,wBAAwB,IAAI,eAAe,CAsB1D"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Bun host's applet serve-host bindings (`applet/serve-host`, host `bun`).
|
|
3
|
+
*
|
|
4
|
+
* `Bun.serve` binds the local applet origin synchronously, `Bun.Transpiler`
|
|
5
|
+
* strips types from served project sources and lexes import specifiers, and
|
|
6
|
+
* `Bun.resolveSync` resolves bare package specifiers the way the module
|
|
7
|
+
* system does (exports maps and conditions), so the serve layer never guesses
|
|
8
|
+
* at paths. An unresolvable specifier traces one operator line
|
|
9
|
+
* (`VIBES_DEBUG_RUNTIME`) and resolves to `null`, per the kind contract.
|
|
10
|
+
*/
|
|
11
|
+
import { settleNow, valueFreeFailure } from '@vibesdotdev/kernel';
|
|
12
|
+
import { createStylesheetCompiler } from "./stylesheet.compiler.js";
|
|
13
|
+
/** A bound local applet http host. */
|
|
14
|
+
function startAppletServeHost(options) {
|
|
15
|
+
const server = Bun.serve({
|
|
16
|
+
port: options.port,
|
|
17
|
+
hostname: options.hostname,
|
|
18
|
+
async fetch(request, server) {
|
|
19
|
+
const response = await options.fetch(request);
|
|
20
|
+
if (response.headers.get('content-type')?.split(';', 1)[0]?.trim().toLowerCase() === 'text/event-stream') {
|
|
21
|
+
server.timeout(request, 0);
|
|
22
|
+
}
|
|
23
|
+
return response;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
port: server.port ?? options.port,
|
|
28
|
+
stop: () => server.stop(true)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** Transpile one TypeScript source to JavaScript (browser-servable; the host's `runtime/transpiler` too). */
|
|
32
|
+
export function transpileTypeScriptSource(source) {
|
|
33
|
+
return new Bun.Transpiler({ loader: 'ts' }).transformSync(source);
|
|
34
|
+
}
|
|
35
|
+
/** Every import/export/dynamic-import specifier in a JavaScript module. */
|
|
36
|
+
function scanModuleSpecifiers(code) {
|
|
37
|
+
const seen = new Set();
|
|
38
|
+
for (const entry of new Bun.Transpiler({ loader: 'js' }).scanImports(code))
|
|
39
|
+
seen.add(entry.path);
|
|
40
|
+
return [...seen];
|
|
41
|
+
}
|
|
42
|
+
/** Resolve a bare specifier from a directory to an absolute file path, or null. */
|
|
43
|
+
function resolveModuleSpecifier(specifier, fromDir, runtime) {
|
|
44
|
+
const settled = settleNow(() => Bun.resolveSync(specifier, fromDir));
|
|
45
|
+
if (settled.ok)
|
|
46
|
+
return settled.value;
|
|
47
|
+
// Declared contract: an unresolvable specifier is `null`, not a failure.
|
|
48
|
+
const failure = valueFreeFailure(settled.cause);
|
|
49
|
+
runtime.diagnostics.trace(`applet-serve-host: module specifier did not resolve (${specifier} from ${fromDir}; ${failure.code ?? failure.name})`);
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
/** The Bun host's `applet/serve-host` implementation. */
|
|
53
|
+
export function createBunAppletServeHost() {
|
|
54
|
+
const stylesheets = createStylesheetCompiler();
|
|
55
|
+
// This binding serves local development modules, including libraries published as Svelte source.
|
|
56
|
+
const modules = new Bun.Transpiler({ loader: 'ts', define: {
|
|
57
|
+
'import.meta.env.DEV': 'true', 'process.env.NODE_ENV': '"development"'
|
|
58
|
+
} });
|
|
59
|
+
return {
|
|
60
|
+
compileStylesheet: options => stylesheets.compile(options),
|
|
61
|
+
startAppletServeHost(options) {
|
|
62
|
+
const listener = startAppletServeHost(options);
|
|
63
|
+
return {
|
|
64
|
+
port: listener.port,
|
|
65
|
+
stop() {
|
|
66
|
+
try {
|
|
67
|
+
listener.stop();
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
stylesheets.clear();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
transpileTypeScriptSource: source => modules.transformSync(source),
|
|
76
|
+
scanModuleSpecifiers,
|
|
77
|
+
resolveModuleSpecifier
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=applet-serve-host.impl.bun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-serve-host.impl.bun.js","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAOpE,sCAAsC;AACtC,SAAS,oBAAoB,CAAC,OAAoC;IACjE,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM;YAC1B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KA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ns the kind's registration on the
|
|
4
|
+
* runtimes it builds (as it owns the SQLite driver's): the kind is the
|
|
5
|
+
* runtime's frozen definition, so a second registration of it is a no-op.
|
|
6
|
+
* The bindings module loads only when the kind is first resolved.
|
|
7
|
+
*/
|
|
8
|
+
import { type RuntimePlugin, type RuntimeRef } from '@vibesdotdev/kernel';
|
|
9
|
+
/** The Bun serve-host's descriptor. */
|
|
10
|
+
export declare const bunAppletServeHostDescriptor: {
|
|
11
|
+
id: string;
|
|
12
|
+
kind: "applet/serve-host";
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
host: string;
|
|
16
|
+
hardware: string[];
|
|
17
|
+
};
|
|
18
|
+
/** Register the kind (when absent), the Bun serve-host's descriptor and its lazy loader on `runtime`. */
|
|
19
|
+
export declare function registerBunAppletServeHost(runtime: RuntimeRef): void;
|
|
20
|
+
/** The same registration as a plugin, for a host composed from plugins. */
|
|
21
|
+
export declare const bunAppletServeHostPlugin: RuntimePlugin;
|
|
22
|
+
//# sourceMappingURL=applet-serve-host.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-serve-host.plugin.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAoD,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG5H,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;;;;;;;CAOxC,CAAC;AAEF,yGAAyG;AACzG,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAYpE;AAED,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,EAAE,aAMrC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers the Bun host's applet serve-host bindings under the runtime's
|
|
3
|
+
* `applet/serve-host` kind. The host owns the kind's registration on the
|
|
4
|
+
* runtimes it builds (as it owns the SQLite driver's): the kind is the
|
|
5
|
+
* runtime's frozen definition, so a second registration of it is a no-op.
|
|
6
|
+
* The bindings module loads only when the kind is first resolved.
|
|
7
|
+
*/
|
|
8
|
+
import { createRuntimeImplementation, createRuntimePlugin } from '@vibesdotdev/kernel';
|
|
9
|
+
import { APPLET_SERVE_HOST_KIND, appletServeHostKind } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
|
|
10
|
+
/** The Bun serve-host's descriptor. */
|
|
11
|
+
export const bunAppletServeHostDescriptor = {
|
|
12
|
+
id: 'applet-serve-host-bun',
|
|
13
|
+
kind: APPLET_SERVE_HOST_KIND,
|
|
14
|
+
name: 'Bun applet serve host',
|
|
15
|
+
description: 'Applet serve-host bindings over Bun.serve, Bun.Transpiler and Bun.resolveSync',
|
|
16
|
+
host: 'bun',
|
|
17
|
+
hardware: ['consumer']
|
|
18
|
+
};
|
|
19
|
+
/** Register the kind (when absent), the Bun serve-host's descriptor and its lazy loader on `runtime`. */
|
|
20
|
+
export function registerBunAppletServeHost(runtime) {
|
|
21
|
+
if (!runtime.hasKind(APPLET_SERVE_HOST_KIND))
|
|
22
|
+
runtime.registerKind(appletServeHostKind);
|
|
23
|
+
runtime.registerDescriptor(APPLET_SERVE_HOST_KIND, bunAppletServeHostDescriptor);
|
|
24
|
+
runtime.registerLoader(APPLET_SERVE_HOST_KIND, bunAppletServeHostDescriptor.id, async () => {
|
|
25
|
+
const { createBunAppletServeHost } = await import("./applet-serve-host.impl.bun.js");
|
|
26
|
+
return createRuntimeImplementation({
|
|
27
|
+
kind: APPLET_SERVE_HOST_KIND,
|
|
28
|
+
id: bunAppletServeHostDescriptor.id,
|
|
29
|
+
constraint: { hardware: ['consumer'] },
|
|
30
|
+
implementation: createBunAppletServeHost()
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** The same registration as a plugin, for a host composed from plugins. */
|
|
35
|
+
export const bunAppletServeHostPlugin = createRuntimePlugin({
|
|
36
|
+
id: 'applet-serve-host-bun',
|
|
37
|
+
name: 'Bun applet serve host',
|
|
38
|
+
onRegister(runtime) {
|
|
39
|
+
registerBunAppletServeHost(runtime);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=applet-serve-host.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-serve-host.plugin.js","sourceRoot":"","sources":["../../src/applet-serve-host/applet-serve-host.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAuC,MAAM,qBAAqB,CAAC;AAC5H,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAE/G,uCAAuC;AACvC,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC3C,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,+EAA+E;IAC5F,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,CAAC,UAAU,CAAC;CACtB,CAAC;AAEF,yGAAyG;AACzG,MAAM,UAAU,0BAA0B,CAAC,OAAmB;IAC7D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC;QAAE,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;IACxF,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,CAAC;IACjF,OAAO,CAAC,cAAc,CAAC,sBAAsB,EAAE,4BAA4B,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;QAC1F,MAAM,EAAE,wBAAwB,EAAE,GAAG,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC;QACrF,OAAO,2BAA2B,CAAC;YAClC,IAAI,EAAE,sBAAsB;YAC5B,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE;YACtC,cAAc,EAAE,wBAAwB,EAAE;SAC1C,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,MAAM,CAAC,MAAM,wBAAwB,GAAkB,mBAAmB,CAAC;IAC1E,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,uBAAuB;IAC7B,UAAU,CAAC,OAAO;QACjB,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Bun host's implementation of the runtime's applet serve-host kind
|
|
3
|
+
* (`applet/serve-host`) and the plugin that registers it.
|
|
4
|
+
*/
|
|
5
|
+
export { createBunAppletServeHost } from './applet-serve-host.impl.bun.ts';
|
|
6
|
+
export { bunAppletServeHostDescriptor, bunAppletServeHostPlugin, registerBunAppletServeHost } from './applet-serve-host.plugin.ts';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Bun host's implementation of the runtime's applet serve-host kind
|
|
3
|
+
* (`applet/serve-host`) and the plugin that registers it.
|
|
4
|
+
*/
|
|
5
|
+
export { createBunAppletServeHost } from "./applet-serve-host.impl.bun.js";
|
|
6
|
+
export { bunAppletServeHostDescriptor, bunAppletServeHostPlugin, registerBunAppletServeHost } from "./applet-serve-host.plugin.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/applet-serve-host/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type AppletStylesheetCompileOptions } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
|
|
2
|
+
/** One selected host's cache, released with its listener. Compiler libraries load only on use. */
|
|
3
|
+
export declare function createStylesheetCompiler(): {
|
|
4
|
+
clear(): void;
|
|
5
|
+
compile(options: AppletStylesheetCompileOptions): Promise<string>;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=stylesheet.compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylesheet.compiler.d.ts","sourceRoot":"","sources":["../../src/applet-serve-host/stylesheet.compiler.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,KAAK,8BAA8B,EAEnC,MAAM,kDAAkD,CAAC;AA0B1D,kGAAkG;AAClG,wBAAgB,wBAAwB;;qBAKf,8BAA8B,GAAG,OAAO,CAAC,MAAM,CAAC;EA4CxE"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CapabilityError, CaughtFailureSchema, isCapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { AppletStyleContentSchema, AppletStylesheetSourceSchema } from '@vibesdotdev/kernel/kinds/applet-serve-host.kind';
|
|
3
|
+
function sameSheet(left, right) {
|
|
4
|
+
return left.path === right.path && left.base === right.base && left.content === right.content;
|
|
5
|
+
}
|
|
6
|
+
function sameSources(left, right) {
|
|
7
|
+
return left.length === right.length && left.every((source, index) => {
|
|
8
|
+
const next = right[index];
|
|
9
|
+
return next !== undefined && source.path === next.path && source.extension === next.extension && source.content === next.content;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
/** One selected host's cache, released with its listener. Compiler libraries load only on use. */
|
|
13
|
+
export function createStylesheetCompiler() {
|
|
14
|
+
const cache = new Map();
|
|
15
|
+
return {
|
|
16
|
+
clear() { cache.clear(); },
|
|
17
|
+
async compile(options) {
|
|
18
|
+
const entry = AppletStylesheetSourceSchema.parse(options.entry);
|
|
19
|
+
const sources = options.sources.map(source => AppletStyleContentSchema.parse(source));
|
|
20
|
+
const held = cache.get(entry.path);
|
|
21
|
+
if (held && sameSheet(held.entry, entry) && sameSources(held.sources, sources)) {
|
|
22
|
+
const current = await Promise.all(held.imports.map(async (imported) => {
|
|
23
|
+
const source = AppletStylesheetSourceSchema.parse(await options.loadStylesheet(imported.id, imported.base));
|
|
24
|
+
return sameSheet(imported.source, source);
|
|
25
|
+
}));
|
|
26
|
+
if (current.every(Boolean))
|
|
27
|
+
return held.css;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const [{ compile }, { Scanner }] = await Promise.all([import('tailwindcss'), import('@tailwindcss/oxide')]);
|
|
31
|
+
const imports = [];
|
|
32
|
+
const compiler = await compile(entry.content, {
|
|
33
|
+
base: entry.base,
|
|
34
|
+
from: entry.path,
|
|
35
|
+
async loadStylesheet(id, base) {
|
|
36
|
+
const source = AppletStylesheetSourceSchema.parse(await options.loadStylesheet(id, base));
|
|
37
|
+
imports.push({ id, base, source });
|
|
38
|
+
return source;
|
|
39
|
+
},
|
|
40
|
+
async loadModule(id) {
|
|
41
|
+
throw new CapabilityError('The applet stylesheet compiler does not support JavaScript plugins or configuration modules.', 'UNAVAILABLE', {
|
|
42
|
+
reason: 'applet-stylesheet-plugin-unsupported', details: { id }
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// scanFiles receives supplied texts only. @source directives never trigger host filesystem scans.
|
|
47
|
+
const candidates = new Scanner({ sources: [] }).scanFiles(sources.map(({ content, extension }) => ({ content, extension })));
|
|
48
|
+
const css = compiler.build(candidates);
|
|
49
|
+
cache.set(entry.path, { entry, sources, imports, css });
|
|
50
|
+
return css;
|
|
51
|
+
}
|
|
52
|
+
catch (cause) {
|
|
53
|
+
const failure = CaughtFailureSchema.parse(cause);
|
|
54
|
+
if (isCapabilityError(failure))
|
|
55
|
+
throw failure;
|
|
56
|
+
throw new CapabilityError('The admitted applet stylesheet could not be compiled.', 'INVALID_INPUT', {
|
|
57
|
+
reason: 'applet-stylesheet-invalid', cause: failure
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=stylesheet.compiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylesheet.compiler.js","sourceRoot":"","sources":["../../src/applet-serve-host/stylesheet.compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAI5B,MAAM,kDAAkD,CAAC;AAe1D,SAAS,SAAS,CAAC,IAA4B,EAAE,KAA6B;IAC7E,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAAC;AAC/F,CAAC;AAED,SAAS,WAAW,CAAC,IAAmC,EAAE,KAAoC;IAC7F,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACnE,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,OAAO,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,SAAS,KAA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AAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;gBACxD,OAAO,GAAG,CAAC;YACZ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACjD,IAAI,iBAAiB,CAAC,OAAO,CAAC;oBAAE,MAAM,OAAO,CAAC;gBAC9C,MAAM,IAAI,eAAe,CAAC,uDAAuD,EAAE,eAAe,EAAE;oBACnG,MAAM,EAAE,2BAA2B,EAAE,KAAK,EAAE,OAAO;iBACnD,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CapabilityError, type RuntimeRef } from '@vibesdotdev/kernel';
|
|
2
|
+
export interface AtlasMigrationNamespaceEvidence {
|
|
3
|
+
expectedMigrationIds: string[];
|
|
4
|
+
registeredMigrationIds: string[];
|
|
5
|
+
missingMigrationIds: string[];
|
|
6
|
+
isStrictSubset: boolean;
|
|
7
|
+
repairAttempted?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class AtlasMigrationNamespacePoisonedError extends CapabilityError {
|
|
10
|
+
readonly evidence: AtlasMigrationNamespaceEvidence;
|
|
11
|
+
constructor(evidence: AtlasMigrationNamespaceEvidence);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Register the declared Atlas migrations on this host.
|
|
15
|
+
*
|
|
16
|
+
* No kind, or no `workspace.atlas-migrations` descriptor, is absence: the host
|
|
17
|
+
* has nothing to register and does not refuse. Called from the Bun plugin's
|
|
18
|
+
* `onActivate`, after discovery, so a later feature plugin's descriptor is visible.
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerBunAtlasMigrations(runtime: RuntimeRef): void;
|
|
21
|
+
//# sourceMappingURL=register-atlas-host-migrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-atlas-host-migrations.d.ts","sourceRoot":"","sources":["../../src/atlas-migrations/register-atlas-host-migrations.ts"],"names":[],"mappings":"AAeA,OAAO,EACN,eAAe,EAIf,KAAK,UAAU,EACf,MAAM,qBAAqB,CAAC;AAW7B,MAAM,WAAW,+BAA+B;IAC/C,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,qBAAa,oCAAqC,SAAQ,eAAe;IACxE,QAAQ,CAAC,QAAQ,EAAE,+BAA+B,CAAC;gBAEvC,QAAQ,EAAE,+BAA+B;CAsBrD;AAgGD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAiCpE"}
|