@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
|
@@ -0,0 +1,383 @@
|
|
|
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 { watch, existsSync, statSync } from 'node:fs';
|
|
43
|
+
import { dirname, join, resolve } from 'node:path';
|
|
44
|
+
import { getLogger } from '@vibesdotdev/logging';
|
|
45
|
+
import { CaughtFailureSchema, isCapabilityError, settle, settleNow, valueFreeFailure } from '@vibesdotdev/kernel';
|
|
46
|
+
import z from 'zod/v4';
|
|
47
|
+
function isRepeatStopped(error) {
|
|
48
|
+
return isCapabilityError(error) && (error.reason === 'wait-aborted' || error.reason === 'runtime-disposed');
|
|
49
|
+
}
|
|
50
|
+
/** Same cadence as the feature's lifecycle repeat. This host copy does not import the feature package. */
|
|
51
|
+
function startLifecycleRepeat(runtime, lifecycle, ms, tick) {
|
|
52
|
+
const started = settleNow(() => lifecycle.interval(tick, ms));
|
|
53
|
+
if (started.ok)
|
|
54
|
+
return started.value;
|
|
55
|
+
if (!(isCapabilityError(started.cause) && started.cause.reason === 'lifecycle-interval-finite'))
|
|
56
|
+
throw started.cause;
|
|
57
|
+
const abort = new AbortController();
|
|
58
|
+
const loop = (async () => {
|
|
59
|
+
while (!abort.signal.aborted) {
|
|
60
|
+
const waited = await settle(() => lifecycle.delay(ms, abort.signal));
|
|
61
|
+
if (!waited.ok) {
|
|
62
|
+
if (isRepeatStopped(waited.cause))
|
|
63
|
+
return;
|
|
64
|
+
throw waited.cause;
|
|
65
|
+
}
|
|
66
|
+
if (abort.signal.aborted)
|
|
67
|
+
return;
|
|
68
|
+
tick();
|
|
69
|
+
}
|
|
70
|
+
})();
|
|
71
|
+
void settle(() => loop).then((settled) => {
|
|
72
|
+
if (settled.ok || isRepeatStopped(settled.cause))
|
|
73
|
+
return;
|
|
74
|
+
const logger = getLogger('runtime-plugin.lifecycle-repeat', runtime);
|
|
75
|
+
logger.error('lifecycle.delay repeat failed', { error: valueFreeFailure(settled.cause) });
|
|
76
|
+
});
|
|
77
|
+
return () => {
|
|
78
|
+
abort.abort();
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const DEFAULT_REARM_INTERVAL_MS = 2_000;
|
|
82
|
+
/**
|
|
83
|
+
* Device + inode of a directory, or null when nothing (or a non-directory)
|
|
84
|
+
* is at the path. Other stat failures (EACCES, EMFILE…) propagate.
|
|
85
|
+
*/
|
|
86
|
+
function directoryIdentity(directory) {
|
|
87
|
+
const stat = statSync(directory, { throwIfNoEntry: false });
|
|
88
|
+
return stat?.isDirectory() ? `${stat.dev}:${stat.ino}` : null;
|
|
89
|
+
}
|
|
90
|
+
export class SourceWatcher {
|
|
91
|
+
watchers = new Map();
|
|
92
|
+
tracked = new Map();
|
|
93
|
+
onChange = null;
|
|
94
|
+
log;
|
|
95
|
+
/** Directories that should be watched but currently are not (ENOENT, EMFILE…). */
|
|
96
|
+
pending = new Set();
|
|
97
|
+
/** Last device, inode and mtime stat recorded for a tracked file. */
|
|
98
|
+
stamps = new Map();
|
|
99
|
+
rearmTimer = null;
|
|
100
|
+
rearmIntervalMs;
|
|
101
|
+
runtime;
|
|
102
|
+
constructor(options) {
|
|
103
|
+
this.log = options.logger ?? createNoopLogger('source-watcher');
|
|
104
|
+
this.rearmIntervalMs = options.rearmIntervalMs ?? DEFAULT_REARM_INTERVAL_MS;
|
|
105
|
+
this.runtime = options.runtime;
|
|
106
|
+
}
|
|
107
|
+
/** Directories currently waiting to be (re-)armed. Diagnostic. */
|
|
108
|
+
getPending() {
|
|
109
|
+
return new Set(this.pending);
|
|
110
|
+
}
|
|
111
|
+
/** Try once to arm every pending directory. Exposed so tests need no timer. */
|
|
112
|
+
rearm() {
|
|
113
|
+
for (const directory of Array.from(this.watchers.keys()))
|
|
114
|
+
this.verifyArmed(directory);
|
|
115
|
+
if (this.pending.size > 0) {
|
|
116
|
+
for (const directory of Array.from(this.pending)) {
|
|
117
|
+
if (!existsSync(directory))
|
|
118
|
+
continue;
|
|
119
|
+
if (this.armDirectory(directory)) {
|
|
120
|
+
this.log.info('re-armed source watch after the directory reappeared', { directory });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
for (const directory of this.watchers.keys())
|
|
125
|
+
this.syncTracked(directory);
|
|
126
|
+
if (this.pending.size === 0)
|
|
127
|
+
this.stopRearmTimer();
|
|
128
|
+
}
|
|
129
|
+
startRearmTimer() {
|
|
130
|
+
if (this.rearmTimer || this.pending.size === 0)
|
|
131
|
+
return;
|
|
132
|
+
this.rearmTimer = startLifecycleRepeat(this.runtime, this.runtime.lifecycle, this.rearmIntervalMs, () => this.rearm());
|
|
133
|
+
}
|
|
134
|
+
stopRearmTimer() {
|
|
135
|
+
if (!this.rearmTimer)
|
|
136
|
+
return;
|
|
137
|
+
this.rearmTimer();
|
|
138
|
+
this.rearmTimer = null;
|
|
139
|
+
}
|
|
140
|
+
/** Close one armed watcher and, if the directory is still wanted, queue it for re-arm. */
|
|
141
|
+
disarm(directory) {
|
|
142
|
+
const armed = this.watchers.get(directory);
|
|
143
|
+
if (!armed)
|
|
144
|
+
return;
|
|
145
|
+
armed.watcher.close();
|
|
146
|
+
this.watchers.delete(directory);
|
|
147
|
+
if (this.wantedDirectories().has(directory)) {
|
|
148
|
+
this.pending.add(directory);
|
|
149
|
+
this.startRearmTimer();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Re-arm an armed directory whose path no longer names the directory the
|
|
154
|
+
* watcher was opened on (removed, or replaced by rename). Returns true when
|
|
155
|
+
* the existing watcher is still valid.
|
|
156
|
+
*/
|
|
157
|
+
verifyArmed(directory) {
|
|
158
|
+
const armed = this.watchers.get(directory);
|
|
159
|
+
if (!armed)
|
|
160
|
+
return false;
|
|
161
|
+
const inspected = settleNow(() => directoryIdentity(directory));
|
|
162
|
+
if (!inspected.ok) {
|
|
163
|
+
this.log.warn('cannot inspect watched directory — requeueing for re-arm', {
|
|
164
|
+
directory,
|
|
165
|
+
error: valueFreeFailure(inspected.cause)
|
|
166
|
+
});
|
|
167
|
+
this.disarm(directory);
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
const identity = inspected.value;
|
|
171
|
+
if (identity === armed.identity)
|
|
172
|
+
return true;
|
|
173
|
+
this.log.info('watched directory was replaced — re-arming', { directory });
|
|
174
|
+
this.disarm(directory);
|
|
175
|
+
if (existsSync(directory))
|
|
176
|
+
this.armDirectory(directory);
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Arm one directory. Returns true when a watcher is now installed; false
|
|
181
|
+
* leaves the directory in `pending` for the re-arm loop.
|
|
182
|
+
*/
|
|
183
|
+
armDirectory(directory) {
|
|
184
|
+
if (this.watchers.has(directory) && this.verifyArmed(directory)) {
|
|
185
|
+
this.pending.delete(directory);
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
if (this.watchers.has(directory))
|
|
189
|
+
return true;
|
|
190
|
+
const armed = settleNow(() => {
|
|
191
|
+
const identity = directoryIdentity(directory);
|
|
192
|
+
if (identity === null) {
|
|
193
|
+
this.pending.add(directory);
|
|
194
|
+
this.startRearmTimer();
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
const watcher = watch(directory, (event, filename) => {
|
|
198
|
+
if (event === 'rename')
|
|
199
|
+
this.verifyArmed(directory);
|
|
200
|
+
if (!filename)
|
|
201
|
+
return;
|
|
202
|
+
const absolute = join(directory, filename.toString());
|
|
203
|
+
if (!this.tracked.get(directory)?.has(absolute))
|
|
204
|
+
return;
|
|
205
|
+
this.remember(absolute);
|
|
206
|
+
this.onChange?.(absolute);
|
|
207
|
+
});
|
|
208
|
+
watcher.on('error', (cause) => {
|
|
209
|
+
// A live watcher whose directory was replaced (rename-in) reports
|
|
210
|
+
// here and then never fires again. Tear it down and requeue rather
|
|
211
|
+
// than logging once and going deaf.
|
|
212
|
+
this.log.warn('watch error — requeueing directory for re-arm', {
|
|
213
|
+
directory,
|
|
214
|
+
error: valueFreeFailure(cause)
|
|
215
|
+
});
|
|
216
|
+
this.disarm(directory);
|
|
217
|
+
return cause;
|
|
218
|
+
});
|
|
219
|
+
if ('unref' in watcher)
|
|
220
|
+
watcher.unref();
|
|
221
|
+
this.watchers.set(directory, { watcher, identity });
|
|
222
|
+
this.pending.delete(directory);
|
|
223
|
+
this.syncTracked(directory);
|
|
224
|
+
return true;
|
|
225
|
+
});
|
|
226
|
+
if (armed.ok)
|
|
227
|
+
return armed.value;
|
|
228
|
+
this.pending.add(directory);
|
|
229
|
+
this.startRearmTimer();
|
|
230
|
+
this.log.warn('failed to watch directory — will retry', {
|
|
231
|
+
directory,
|
|
232
|
+
retryMs: this.rearmIntervalMs,
|
|
233
|
+
error: valueFreeFailure(armed.cause)
|
|
234
|
+
});
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
wantedDirectories() {
|
|
238
|
+
return new Set(this.tracked.keys());
|
|
239
|
+
}
|
|
240
|
+
/** Replace the tracked file set. Directories no longer needed are released. */
|
|
241
|
+
watch(files, onChange) {
|
|
242
|
+
this.onChange = onChange;
|
|
243
|
+
this.tracked.clear();
|
|
244
|
+
for (const file of files) {
|
|
245
|
+
const absolute = resolve(file);
|
|
246
|
+
const directory = dirname(absolute);
|
|
247
|
+
let sources = this.tracked.get(directory);
|
|
248
|
+
if (!sources) {
|
|
249
|
+
sources = new Set();
|
|
250
|
+
this.tracked.set(directory, sources);
|
|
251
|
+
}
|
|
252
|
+
sources.add(absolute);
|
|
253
|
+
}
|
|
254
|
+
for (const file of this.stamps.keys()) {
|
|
255
|
+
if (!this.tracked.get(dirname(file))?.has(file))
|
|
256
|
+
this.stamps.delete(file);
|
|
257
|
+
}
|
|
258
|
+
const wanted = this.wantedDirectories();
|
|
259
|
+
for (const [directory, armed] of this.watchers) {
|
|
260
|
+
if (wanted.has(directory))
|
|
261
|
+
continue;
|
|
262
|
+
armed.watcher.close();
|
|
263
|
+
this.watchers.delete(directory);
|
|
264
|
+
}
|
|
265
|
+
for (const directory of Array.from(this.pending)) {
|
|
266
|
+
if (!wanted.has(directory))
|
|
267
|
+
this.pending.delete(directory);
|
|
268
|
+
}
|
|
269
|
+
for (const directory of wanted) {
|
|
270
|
+
this.armDirectory(directory);
|
|
271
|
+
}
|
|
272
|
+
if (this.pending.size === 0)
|
|
273
|
+
this.stopRearmTimer();
|
|
274
|
+
}
|
|
275
|
+
/** Directories currently held open. */
|
|
276
|
+
getWatched() {
|
|
277
|
+
return new Set(this.watchers.keys());
|
|
278
|
+
}
|
|
279
|
+
/** Files currently eligible to raise a change. */
|
|
280
|
+
getTracked() {
|
|
281
|
+
const tracked = new Set();
|
|
282
|
+
for (const files of this.tracked.values()) {
|
|
283
|
+
for (const file of files)
|
|
284
|
+
tracked.add(file);
|
|
285
|
+
}
|
|
286
|
+
return tracked;
|
|
287
|
+
}
|
|
288
|
+
unwatchAll() {
|
|
289
|
+
for (const armed of this.watchers.values())
|
|
290
|
+
armed.watcher.close();
|
|
291
|
+
this.watchers.clear();
|
|
292
|
+
this.pending.clear();
|
|
293
|
+
this.stopRearmTimer();
|
|
294
|
+
this.tracked.clear();
|
|
295
|
+
this.stamps.clear();
|
|
296
|
+
this.onChange = null;
|
|
297
|
+
}
|
|
298
|
+
/** Stat one tracked file. A missing path is a null stamp; other stat failures propagate. */
|
|
299
|
+
readStamp(file) {
|
|
300
|
+
try {
|
|
301
|
+
const stat = statSync(file);
|
|
302
|
+
if (!stat.isFile())
|
|
303
|
+
return null;
|
|
304
|
+
return { dev: stat.dev, ino: stat.ino, mtimeMs: stat.mtimeMs };
|
|
305
|
+
}
|
|
306
|
+
catch (error) {
|
|
307
|
+
if (valueFreeFailure(CaughtFailureSchema.parse(error)).code === 'ENOENT')
|
|
308
|
+
return null;
|
|
309
|
+
throw error;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
sameStamp(previous, next) {
|
|
313
|
+
if (previous === null || next === null)
|
|
314
|
+
return previous === next;
|
|
315
|
+
return previous.dev === next.dev && previous.ino === next.ino && previous.mtimeMs === next.mtimeMs;
|
|
316
|
+
}
|
|
317
|
+
/** Record the stamp `fs.watch` just delivered so a later rearm does not report it again. */
|
|
318
|
+
remember(file) {
|
|
319
|
+
const settled = settleNow(() => {
|
|
320
|
+
this.stamps.set(file, this.readStamp(file));
|
|
321
|
+
});
|
|
322
|
+
if (settled.ok)
|
|
323
|
+
return;
|
|
324
|
+
this.log.warn('cannot stat tracked source file', {
|
|
325
|
+
file,
|
|
326
|
+
failure: valueFreeFailure(settled.cause)
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Report tracked files in `directory` whose device, inode or mtime moved
|
|
331
|
+
* since the stamp on record. The first observation only records the stamp.
|
|
332
|
+
*/
|
|
333
|
+
syncTracked(directory) {
|
|
334
|
+
const files = this.tracked.get(directory);
|
|
335
|
+
if (!files)
|
|
336
|
+
return;
|
|
337
|
+
for (const file of files) {
|
|
338
|
+
const settled = settleNow(() => this.readStamp(file));
|
|
339
|
+
if (!settled.ok) {
|
|
340
|
+
this.log.warn('cannot stat tracked source file', {
|
|
341
|
+
file,
|
|
342
|
+
failure: valueFreeFailure(settled.cause)
|
|
343
|
+
});
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
const next = settled.value;
|
|
347
|
+
const previous = this.stamps.get(file);
|
|
348
|
+
if (previous === undefined) {
|
|
349
|
+
this.stamps.set(file, next);
|
|
350
|
+
continue;
|
|
351
|
+
}
|
|
352
|
+
if (this.sameStamp(previous, next))
|
|
353
|
+
continue;
|
|
354
|
+
this.stamps.set(file, next);
|
|
355
|
+
this.onChange?.(file);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
/** Alias matching the sibling watchers' lifecycle vocabulary. */
|
|
359
|
+
stop() {
|
|
360
|
+
this.unwatchAll();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function createNoopLogger(namespace) {
|
|
364
|
+
const noop = () => { };
|
|
365
|
+
return {
|
|
366
|
+
namespace,
|
|
367
|
+
fullNamespace: namespace,
|
|
368
|
+
debug: noop,
|
|
369
|
+
info: noop,
|
|
370
|
+
warn: noop,
|
|
371
|
+
error: noop,
|
|
372
|
+
child: (opts) => {
|
|
373
|
+
const text = z.string().safeParse(opts);
|
|
374
|
+
if (text.success)
|
|
375
|
+
return createNoopLogger(`${namespace}:${text.data}`);
|
|
376
|
+
const named = z.object({ namespace: z.string().optional() }).safeParse(opts);
|
|
377
|
+
const suffix = named.success ? (named.data.namespace ?? 'child') : 'child';
|
|
378
|
+
return createNoopLogger(`${namespace}:${suffix}`);
|
|
379
|
+
},
|
|
380
|
+
withContext: () => createNoopLogger(namespace)
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=source-watcher.consumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-watcher.consumer.js","sourceRoot":"","sources":["../../src/runtime-plugin-host/source-watcher.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAA6E,MAAM,qBAAqB,CAAC;AAC7L,OAAO,CAAC,MAAM,QAAQ,CAAC;AAEvB,SAAS,eAAe,CAAC,KAAoB;IAC5C,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAA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SAAiB;IAC1C,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACtB,OAAO;QACN,SAAS;QACT,aAAa,EAAE,SAAS;QACxB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;YACf,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,IAAI,CAAC,OAAO;gBAAE,OAAO,gBAAgB,CAAC,GAAG,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACvE,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC7E,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YAC3E,OAAO,gBAAgB,CAAC,GAAG,SAAS,IAAI,MAAM,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,WAAW,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC;KAC9C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/** The Bun host's declarations: its environment options and the plugin options around them. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import type { HostFileLoggingOptions } from '@vibesdotdev/logging/host-files';
|
|
4
|
+
import type { PathRootsOrigin } from '@vibesdotdev/paths';
|
|
5
|
+
import type { RuntimeExecutionLocalPluginOptions } from '@vibesdotdev/execution-local';
|
|
6
|
+
import type { BunHostDeclaration } from '../host-channel.impl.bun.ts';
|
|
7
|
+
/** What a host reads about its machine: the CPUs it reports and its total memory. */
|
|
8
|
+
export interface BunSystemResourceReading {
|
|
9
|
+
readonly cpus: readonly {
|
|
10
|
+
readonly model: string;
|
|
11
|
+
}[];
|
|
12
|
+
readonly totalMemoryBytes: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const BunScopeSchema: z.ZodObject<{
|
|
15
|
+
hardware: z.ZodEnum<{
|
|
16
|
+
consumer: "consumer";
|
|
17
|
+
cloud: "cloud";
|
|
18
|
+
}>;
|
|
19
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
root: z.ZodOptional<z.ZodString>;
|
|
21
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
read: "read";
|
|
23
|
+
write: "write";
|
|
24
|
+
}>>;
|
|
25
|
+
}, z.core.$strict>>;
|
|
26
|
+
hosting: z.ZodObject<{
|
|
27
|
+
mode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
28
|
+
local: "local";
|
|
29
|
+
hosted: "hosted";
|
|
30
|
+
"managed-cloud": "managed-cloud";
|
|
31
|
+
}>, z.ZodString]>;
|
|
32
|
+
owner: z.ZodUnion<readonly [z.ZodEnum<{
|
|
33
|
+
consumer: "consumer";
|
|
34
|
+
customer: "customer";
|
|
35
|
+
vibes: "vibes";
|
|
36
|
+
}>, z.ZodString]>;
|
|
37
|
+
venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
38
|
+
"user-device": "user-device";
|
|
39
|
+
"ipc-worker": "ipc-worker";
|
|
40
|
+
doks: "doks";
|
|
41
|
+
"cloudflare-workers": "cloudflare-workers";
|
|
42
|
+
"digitalocean-functions": "digitalocean-functions";
|
|
43
|
+
}>, z.ZodString]>>;
|
|
44
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
requestPrincipals: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
interactiveSession: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
hostCredentials: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
sharedHost: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
purpose: z.ZodEnum<{
|
|
53
|
+
agent: "agent";
|
|
54
|
+
worker: "worker";
|
|
55
|
+
mcp: "mcp";
|
|
56
|
+
direct: "direct";
|
|
57
|
+
projection: "projection";
|
|
58
|
+
}>;
|
|
59
|
+
surface: z.ZodEnum<{
|
|
60
|
+
agent: "agent";
|
|
61
|
+
browser: "browser";
|
|
62
|
+
ssr: "ssr";
|
|
63
|
+
cli: "cli";
|
|
64
|
+
tui: "tui";
|
|
65
|
+
worker: "worker";
|
|
66
|
+
mcp: "mcp";
|
|
67
|
+
bridge: "bridge";
|
|
68
|
+
}>;
|
|
69
|
+
lifecycle: z.ZodEnum<{
|
|
70
|
+
finite: "finite";
|
|
71
|
+
persistent: "persistent";
|
|
72
|
+
}>;
|
|
73
|
+
qualifiers: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
dev: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
building: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
environmentTier: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
local: "local";
|
|
78
|
+
dev: "dev";
|
|
79
|
+
staging: "staging";
|
|
80
|
+
production: "production";
|
|
81
|
+
}>>;
|
|
82
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
83
|
+
os: z.ZodOptional<z.ZodString>;
|
|
84
|
+
cef: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
trustedOrigin: z.ZodOptional<z.ZodString>;
|
|
86
|
+
rendererGeneration: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
filesystem: z.ZodOptional<z.ZodString>;
|
|
88
|
+
browserBackend: z.ZodOptional<z.ZodString>;
|
|
89
|
+
workspaceSessionId: z.ZodOptional<z.ZodString>;
|
|
90
|
+
workspaceTarget: z.ZodOptional<z.ZodString>;
|
|
91
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
92
|
+
remoteHostId: z.ZodOptional<z.ZodString>;
|
|
93
|
+
connectionMode: z.ZodOptional<z.ZodString>;
|
|
94
|
+
outreachExportsDir: z.ZodOptional<z.ZodString>;
|
|
95
|
+
serve: z.ZodOptional<z.ZodString>;
|
|
96
|
+
hotReload: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
on: "on";
|
|
98
|
+
off: "off";
|
|
99
|
+
}>>;
|
|
100
|
+
loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
}, z.core.$strict>>;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
export type BunScopeDeclaration = z.infer<typeof BunScopeSchema>;
|
|
104
|
+
/** The facts a scope resolver is handed beside the capture: the platform this environment captured. */
|
|
105
|
+
export interface BunScopeHostFacts {
|
|
106
|
+
readonly platform: string;
|
|
107
|
+
}
|
|
108
|
+
export type BunScopeResolver = (captured: Readonly<Record<string, string>>, host: BunScopeHostFacts) => BunScopeDeclaration;
|
|
109
|
+
export interface BunPathSelection {
|
|
110
|
+
/** Explicit absolute home selected by the surface. Test isolation uses this seam. */
|
|
111
|
+
vibesHome?: string;
|
|
112
|
+
profileName?: string;
|
|
113
|
+
configDir?: string;
|
|
114
|
+
logDir?: string;
|
|
115
|
+
tempDir?: string;
|
|
116
|
+
origin?: PathRootsOrigin;
|
|
117
|
+
}
|
|
118
|
+
export interface BunEnvironmentOptions {
|
|
119
|
+
/** The host's file logging (`{ files: false }` opts out); this host's own logging plugin supplies it. */
|
|
120
|
+
logging?: HostFileLoggingOptions;
|
|
121
|
+
/**
|
|
122
|
+
* The host's declared scope. The environment adds only the facts it owns:
|
|
123
|
+
* `qualifiers.os` and `qualifiers.dev` (source mode is dev, a compiled
|
|
124
|
+
* executable is not), unless the declaration names them.
|
|
125
|
+
*
|
|
126
|
+
* A function receives this environment's capture and returns the
|
|
127
|
+
* declaration. It runs once, right after the capture, so a host declares
|
|
128
|
+
* facts it learns from its own environment (the CLI's `hostCredentials`
|
|
129
|
+
* capability from a live `VIBES_HOST_CREDENTIALS` manifest) without
|
|
130
|
+
* reading `process.env` itself, and the hardware the shim baked).
|
|
131
|
+
*/
|
|
132
|
+
scope: unknown | BunScopeResolver;
|
|
133
|
+
/**
|
|
134
|
+
* Host facts the host declares; validated at capture. `shimChannel: true`
|
|
135
|
+
* takes R, the entry and self-spawn from the captured shim channel; any other
|
|
136
|
+
* host has no R unless it passes `root` (D1).
|
|
137
|
+
*/
|
|
138
|
+
host?: BunHostDeclaration;
|
|
139
|
+
/** Filesystem selection published as the immutable paths/roots descriptor. */
|
|
140
|
+
paths?: BunPathSelection;
|
|
141
|
+
/**
|
|
142
|
+
* The host's system-resource read, called once at construction. Absent, the
|
|
143
|
+
* environment reads the machine it runs on. A declared reading is validated
|
|
144
|
+
* exactly like the native one: memory must be a positive finite number and
|
|
145
|
+
* each CPU must name a model; no CPUs publishes a null model.
|
|
146
|
+
*/
|
|
147
|
+
systemResources?: () => BunSystemResourceReading;
|
|
148
|
+
}
|
|
149
|
+
/** A Bun host's declaration: its environment, plus what it composes around it. */
|
|
150
|
+
export interface RuntimeEnvironmentBunPluginOptions extends BunEnvironmentOptions {
|
|
151
|
+
/** Physical streams and fatal source shared explicitly by composed runtimes. */
|
|
152
|
+
hostResources?: import('./host-resources.ts').BunHostResources;
|
|
153
|
+
/** Lazy, runtime-local native artifacts for explicitly requested child resource enforcement. */
|
|
154
|
+
nativeLaunch?: RuntimeExecutionLocalPluginOptions['nativeLaunch'];
|
|
155
|
+
/**
|
|
156
|
+
* The host's admission for restricted execution: the one writable base a
|
|
157
|
+
* restricted workload may write under. Declared by the host, never read
|
|
158
|
+
* from the environment, and passed to the local execution plugin. Absent,
|
|
159
|
+
* the host composes today's local execution and a restricted request
|
|
160
|
+
* refuses `restricted-base-undeclared`.
|
|
161
|
+
*/
|
|
162
|
+
restrictedExecution?: {
|
|
163
|
+
writableBase: string;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* The host's installed B7 held-launch artifacts: the exact absolute path of
|
|
167
|
+
* their `manifest.json` (a bundle stages the paired library, helper and
|
|
168
|
+
* manifest under `<hostRoot>/native/held-launch/manifest.json`). Declared by the host and
|
|
169
|
+
* passed to local execution; never resolved from a package tree, a
|
|
170
|
+
* directory walk or the environment.
|
|
171
|
+
*/
|
|
172
|
+
heldLaunch?: {
|
|
173
|
+
manifestPath: string;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* The host's budget in milliseconds for the native endpoint probe that proves a local socket file
|
|
177
|
+
* unowned before the socket service removes it. Absent, the probe's own default (5 s); a host on a
|
|
178
|
+
* loaded machine declares more, because the tool walks every process.
|
|
179
|
+
*/
|
|
180
|
+
socketProbeTimeoutMs?: number;
|
|
181
|
+
/**
|
|
182
|
+
* The host's budget in milliseconds for each process-table probe (`ps`, `lsof`) the runtime process
|
|
183
|
+
* service runs to read a process's identity. Absent, the probe's own default; a host on a loaded
|
|
184
|
+
* machine declares more. Forwarded to the node process service, which refuses a value that is not
|
|
185
|
+
* a positive integer (`process-probe-timeout-invalid`).
|
|
186
|
+
*/
|
|
187
|
+
processProbeTimeoutMs?: number;
|
|
188
|
+
/**
|
|
189
|
+
* Whether this environment registers the `filesystem/adapter` kind with
|
|
190
|
+
* this host's adapter (default `true`). A host that composes its own filesystem
|
|
191
|
+
* provider, or none (a probe that must fail closed without one), declares
|
|
192
|
+
* `false`; LocalDB then refuses `localdb-filesystem-unavailable` unless the
|
|
193
|
+
* composition supplies a provider.
|
|
194
|
+
*/
|
|
195
|
+
hostFileSystem?: boolean;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/schemas/environment.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,OAAO,KAAK,C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OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC;;;;;;;;;;OAUG;IACH,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,8EAA8E;IAC9E,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,wBAAwB,CAAC;CACjD;AAED,kFAAkF;AAClF,MAAM,WAAW,kCAAmC,SAAQ,qBAAqB;IAChF,gFAAgF;IAChF,aAAa,CAAC,EAAE,OAAO,qBAAqB,EAAE,gBAAgB,CAAC;IAC/D,gGAAgG;IAChG,YAAY,CAAC,EAAE,kCAAkC,CAAC,cAAc,CAAC,CAAC;IAClE;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C;;;;;;OAMG;IACH,UAAU,CAAC,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The Bun host's declarations: its environment options and the plugin options around them. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { DeclaredRuntimeScopeSchema } from '@vibesdotdev/kernel/schemas/scope';
|
|
4
|
+
export const BunScopeSchema = DeclaredRuntimeScopeSchema.extend({
|
|
5
|
+
qualifiers: DeclaredRuntimeScopeSchema.shape.qualifiers.partial({ dev: true }).optional()
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/schemas/environment.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAS/E,MAAM,CAAC,MAAM,cAAc,GAAG,0BAA0B,CAAC,MAAM,CAAC;IAC/D,UAAU,EAAE,0BAA0B,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzF,CAAC,CAAC"}
|