@vibesdotdev/host-bun 0.0.0-stage → 1.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,437 @@
|
|
|
1
|
+
/** The Bun host's hot-plugin importer and runtime-thread declarations. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
/**
|
|
4
|
+
* Where generated modules are written, declared by the host: an explicit
|
|
5
|
+
* `hotDir`, or the host's profile-aware vibes home (`activeHome`, from
|
|
6
|
+
* `getPathRoots(runtime)`), under which generations are anchored at
|
|
7
|
+
* `<activeHome>/hot/<key>`. Nothing here reads an ambient runtime.
|
|
8
|
+
*/
|
|
9
|
+
export type BunPluginImporterPlacement = {
|
|
10
|
+
readonly hotDir: string;
|
|
11
|
+
readonly activeHome?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
readonly activeHome: string;
|
|
14
|
+
readonly hotDir?: undefined;
|
|
15
|
+
};
|
|
16
|
+
export type BunPluginImporterOptions = BunPluginImporterPlacement & {
|
|
17
|
+
/** @deprecated Artifacts are retained by invocation custody, never by age. */
|
|
18
|
+
readonly keepGenerations?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The directory Bun's sourcemap `sources` are relative to, from the host's
|
|
21
|
+
* captured facts (`runtime.localEnvironment.getCwd()`). Optional: an
|
|
22
|
+
* installed-only importer that never resolves watched sources builds
|
|
23
|
+
* generations without one; collected sources then fall back to the entry.
|
|
24
|
+
*/
|
|
25
|
+
readonly cwd?: string;
|
|
26
|
+
/** Host's immutable package graph receipt, checked again at publication. */
|
|
27
|
+
readonly artifactIdentity?: () => string | null;
|
|
28
|
+
/** Diagnostics for the anchor fallback. Optional; defaults to silence. */
|
|
29
|
+
readonly onNotice?: (message: string, data: HotAnchorNotice) => void;
|
|
30
|
+
};
|
|
31
|
+
export type HotAnchorNotice = {
|
|
32
|
+
readonly packageRoot: string;
|
|
33
|
+
readonly activeHome: string;
|
|
34
|
+
readonly probe: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const RuntimeThreadCompositionSchema: z.ZodReadonly<z.ZodObject<{
|
|
37
|
+
floor: z.ZodReadonly<z.ZodObject<{
|
|
38
|
+
plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
39
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
global: z.ZodBoolean;
|
|
42
|
+
globalPlugins: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
43
|
+
omitSurfaces: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
44
|
+
agent: "agent";
|
|
45
|
+
browser: "browser";
|
|
46
|
+
ssr: "ssr";
|
|
47
|
+
cli: "cli";
|
|
48
|
+
tui: "tui";
|
|
49
|
+
worker: "worker";
|
|
50
|
+
mcp: "mcp";
|
|
51
|
+
bridge: "bridge";
|
|
52
|
+
}>>>>;
|
|
53
|
+
failurePolicy: z.ZodEnum<{
|
|
54
|
+
abort: "abort";
|
|
55
|
+
report: "report";
|
|
56
|
+
}>;
|
|
57
|
+
select: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
58
|
+
plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
59
|
+
}, z.core.$strict>>>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
export declare const RuntimeThreadScopeSchema: z.ZodReadonly<z.ZodObject<{
|
|
62
|
+
hardware: z.ZodEnum<{
|
|
63
|
+
consumer: "consumer";
|
|
64
|
+
cloud: "cloud";
|
|
65
|
+
}>;
|
|
66
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
root: z.ZodOptional<z.ZodString>;
|
|
68
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
read: "read";
|
|
70
|
+
write: "write";
|
|
71
|
+
}>>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
hosting: z.ZodObject<{
|
|
74
|
+
mode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
75
|
+
local: "local";
|
|
76
|
+
hosted: "hosted";
|
|
77
|
+
"managed-cloud": "managed-cloud";
|
|
78
|
+
}>, z.ZodString]>;
|
|
79
|
+
owner: z.ZodUnion<readonly [z.ZodEnum<{
|
|
80
|
+
consumer: "consumer";
|
|
81
|
+
customer: "customer";
|
|
82
|
+
vibes: "vibes";
|
|
83
|
+
}>, z.ZodString]>;
|
|
84
|
+
venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
85
|
+
"user-device": "user-device";
|
|
86
|
+
"ipc-worker": "ipc-worker";
|
|
87
|
+
doks: "doks";
|
|
88
|
+
"cloudflare-workers": "cloudflare-workers";
|
|
89
|
+
"digitalocean-functions": "digitalocean-functions";
|
|
90
|
+
}>, z.ZodString]>>;
|
|
91
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
qualifiers: z.ZodObject<{
|
|
94
|
+
dev: z.ZodBoolean;
|
|
95
|
+
building: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
environmentTier: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
local: "local";
|
|
98
|
+
dev: "dev";
|
|
99
|
+
staging: "staging";
|
|
100
|
+
production: "production";
|
|
101
|
+
}>>;
|
|
102
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
103
|
+
os: z.ZodOptional<z.ZodString>;
|
|
104
|
+
cef: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
trustedOrigin: z.ZodOptional<z.ZodString>;
|
|
106
|
+
rendererGeneration: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
filesystem: z.ZodOptional<z.ZodString>;
|
|
108
|
+
browserBackend: z.ZodOptional<z.ZodString>;
|
|
109
|
+
workspaceSessionId: z.ZodOptional<z.ZodString>;
|
|
110
|
+
workspaceTarget: z.ZodOptional<z.ZodString>;
|
|
111
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
112
|
+
remoteHostId: z.ZodOptional<z.ZodString>;
|
|
113
|
+
connectionMode: z.ZodOptional<z.ZodString>;
|
|
114
|
+
outreachExportsDir: z.ZodOptional<z.ZodString>;
|
|
115
|
+
serve: z.ZodOptional<z.ZodString>;
|
|
116
|
+
hotReload: z.ZodOptional<z.ZodEnum<{
|
|
117
|
+
on: "on";
|
|
118
|
+
off: "off";
|
|
119
|
+
}>>;
|
|
120
|
+
loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
requestPrincipals: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
interactiveSession: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
hostCredentials: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
sharedHost: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
}, z.core.$strict>>;
|
|
128
|
+
purpose: z.ZodEnum<{
|
|
129
|
+
agent: "agent";
|
|
130
|
+
worker: "worker";
|
|
131
|
+
mcp: "mcp";
|
|
132
|
+
direct: "direct";
|
|
133
|
+
projection: "projection";
|
|
134
|
+
}>;
|
|
135
|
+
surface: z.ZodEnum<{
|
|
136
|
+
agent: "agent";
|
|
137
|
+
browser: "browser";
|
|
138
|
+
ssr: "ssr";
|
|
139
|
+
cli: "cli";
|
|
140
|
+
tui: "tui";
|
|
141
|
+
worker: "worker";
|
|
142
|
+
mcp: "mcp";
|
|
143
|
+
bridge: "bridge";
|
|
144
|
+
}>;
|
|
145
|
+
lifecycle: z.ZodEnum<{
|
|
146
|
+
finite: "finite";
|
|
147
|
+
persistent: "persistent";
|
|
148
|
+
}>;
|
|
149
|
+
}, z.core.$strict>>;
|
|
150
|
+
/** What a caller declares for its thread: its role, its own scope and its composition. */
|
|
151
|
+
export declare const RuntimeThreadDeclarationSchema: z.ZodReadonly<z.ZodObject<{
|
|
152
|
+
role: z.ZodString;
|
|
153
|
+
scope: z.ZodReadonly<z.ZodObject<{
|
|
154
|
+
hardware: z.ZodEnum<{
|
|
155
|
+
consumer: "consumer";
|
|
156
|
+
cloud: "cloud";
|
|
157
|
+
}>;
|
|
158
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
root: z.ZodOptional<z.ZodString>;
|
|
160
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
161
|
+
read: "read";
|
|
162
|
+
write: "write";
|
|
163
|
+
}>>;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
hosting: z.ZodObject<{
|
|
166
|
+
mode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
167
|
+
local: "local";
|
|
168
|
+
hosted: "hosted";
|
|
169
|
+
"managed-cloud": "managed-cloud";
|
|
170
|
+
}>, z.ZodString]>;
|
|
171
|
+
owner: z.ZodUnion<readonly [z.ZodEnum<{
|
|
172
|
+
consumer: "consumer";
|
|
173
|
+
customer: "customer";
|
|
174
|
+
vibes: "vibes";
|
|
175
|
+
}>, z.ZodString]>;
|
|
176
|
+
venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
177
|
+
"user-device": "user-device";
|
|
178
|
+
"ipc-worker": "ipc-worker";
|
|
179
|
+
doks: "doks";
|
|
180
|
+
"cloudflare-workers": "cloudflare-workers";
|
|
181
|
+
"digitalocean-functions": "digitalocean-functions";
|
|
182
|
+
}>, z.ZodString]>>;
|
|
183
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
qualifiers: z.ZodObject<{
|
|
186
|
+
dev: z.ZodBoolean;
|
|
187
|
+
building: z.ZodOptional<z.ZodBoolean>;
|
|
188
|
+
environmentTier: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
local: "local";
|
|
190
|
+
dev: "dev";
|
|
191
|
+
staging: "staging";
|
|
192
|
+
production: "production";
|
|
193
|
+
}>>;
|
|
194
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
195
|
+
os: z.ZodOptional<z.ZodString>;
|
|
196
|
+
cef: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
trustedOrigin: z.ZodOptional<z.ZodString>;
|
|
198
|
+
rendererGeneration: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
filesystem: z.ZodOptional<z.ZodString>;
|
|
200
|
+
browserBackend: z.ZodOptional<z.ZodString>;
|
|
201
|
+
workspaceSessionId: z.ZodOptional<z.ZodString>;
|
|
202
|
+
workspaceTarget: z.ZodOptional<z.ZodString>;
|
|
203
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
204
|
+
remoteHostId: z.ZodOptional<z.ZodString>;
|
|
205
|
+
connectionMode: z.ZodOptional<z.ZodString>;
|
|
206
|
+
outreachExportsDir: z.ZodOptional<z.ZodString>;
|
|
207
|
+
serve: z.ZodOptional<z.ZodString>;
|
|
208
|
+
hotReload: z.ZodOptional<z.ZodEnum<{
|
|
209
|
+
on: "on";
|
|
210
|
+
off: "off";
|
|
211
|
+
}>>;
|
|
212
|
+
loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
}, z.core.$strict>;
|
|
214
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
215
|
+
requestPrincipals: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
+
interactiveSession: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
hostCredentials: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
sharedHost: z.ZodOptional<z.ZodBoolean>;
|
|
219
|
+
}, z.core.$strict>>;
|
|
220
|
+
purpose: z.ZodEnum<{
|
|
221
|
+
agent: "agent";
|
|
222
|
+
worker: "worker";
|
|
223
|
+
mcp: "mcp";
|
|
224
|
+
direct: "direct";
|
|
225
|
+
projection: "projection";
|
|
226
|
+
}>;
|
|
227
|
+
surface: z.ZodEnum<{
|
|
228
|
+
agent: "agent";
|
|
229
|
+
browser: "browser";
|
|
230
|
+
ssr: "ssr";
|
|
231
|
+
cli: "cli";
|
|
232
|
+
tui: "tui";
|
|
233
|
+
worker: "worker";
|
|
234
|
+
mcp: "mcp";
|
|
235
|
+
bridge: "bridge";
|
|
236
|
+
}>;
|
|
237
|
+
lifecycle: z.ZodEnum<{
|
|
238
|
+
finite: "finite";
|
|
239
|
+
persistent: "persistent";
|
|
240
|
+
}>;
|
|
241
|
+
}, z.core.$strict>>;
|
|
242
|
+
composition: z.ZodReadonly<z.ZodObject<{
|
|
243
|
+
floor: z.ZodReadonly<z.ZodObject<{
|
|
244
|
+
plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
245
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>>;
|
|
246
|
+
}, z.core.$strict>>;
|
|
247
|
+
global: z.ZodBoolean;
|
|
248
|
+
globalPlugins: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
249
|
+
omitSurfaces: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
250
|
+
agent: "agent";
|
|
251
|
+
browser: "browser";
|
|
252
|
+
ssr: "ssr";
|
|
253
|
+
cli: "cli";
|
|
254
|
+
tui: "tui";
|
|
255
|
+
worker: "worker";
|
|
256
|
+
mcp: "mcp";
|
|
257
|
+
bridge: "bridge";
|
|
258
|
+
}>>>>;
|
|
259
|
+
failurePolicy: z.ZodEnum<{
|
|
260
|
+
abort: "abort";
|
|
261
|
+
report: "report";
|
|
262
|
+
}>;
|
|
263
|
+
select: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
264
|
+
plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
265
|
+
}, z.core.$strict>>>;
|
|
266
|
+
}, z.core.$strict>>;
|
|
267
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
root: z.ZodString;
|
|
269
|
+
cwd: z.ZodString;
|
|
270
|
+
moduleRoot: z.ZodString;
|
|
271
|
+
}, z.core.$strict>>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
273
|
+
export declare const RuntimeThreadBootSchema: z.ZodReadonly<z.ZodObject<{
|
|
274
|
+
version: z.ZodLiteral<1>;
|
|
275
|
+
role: z.ZodString;
|
|
276
|
+
scope: z.ZodReadonly<z.ZodObject<{
|
|
277
|
+
hardware: z.ZodEnum<{
|
|
278
|
+
consumer: "consumer";
|
|
279
|
+
cloud: "cloud";
|
|
280
|
+
}>;
|
|
281
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
282
|
+
root: z.ZodOptional<z.ZodString>;
|
|
283
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
284
|
+
read: "read";
|
|
285
|
+
write: "write";
|
|
286
|
+
}>>;
|
|
287
|
+
}, z.core.$strict>>;
|
|
288
|
+
hosting: z.ZodObject<{
|
|
289
|
+
mode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
290
|
+
local: "local";
|
|
291
|
+
hosted: "hosted";
|
|
292
|
+
"managed-cloud": "managed-cloud";
|
|
293
|
+
}>, z.ZodString]>;
|
|
294
|
+
owner: z.ZodUnion<readonly [z.ZodEnum<{
|
|
295
|
+
consumer: "consumer";
|
|
296
|
+
customer: "customer";
|
|
297
|
+
vibes: "vibes";
|
|
298
|
+
}>, z.ZodString]>;
|
|
299
|
+
venue: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
300
|
+
"user-device": "user-device";
|
|
301
|
+
"ipc-worker": "ipc-worker";
|
|
302
|
+
doks: "doks";
|
|
303
|
+
"cloudflare-workers": "cloudflare-workers";
|
|
304
|
+
"digitalocean-functions": "digitalocean-functions";
|
|
305
|
+
}>, z.ZodString]>>;
|
|
306
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
307
|
+
}, z.core.$strip>;
|
|
308
|
+
qualifiers: z.ZodObject<{
|
|
309
|
+
dev: z.ZodBoolean;
|
|
310
|
+
building: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
+
environmentTier: z.ZodOptional<z.ZodEnum<{
|
|
312
|
+
local: "local";
|
|
313
|
+
dev: "dev";
|
|
314
|
+
staging: "staging";
|
|
315
|
+
production: "production";
|
|
316
|
+
}>>;
|
|
317
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
318
|
+
os: z.ZodOptional<z.ZodString>;
|
|
319
|
+
cef: z.ZodOptional<z.ZodBoolean>;
|
|
320
|
+
trustedOrigin: z.ZodOptional<z.ZodString>;
|
|
321
|
+
rendererGeneration: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
filesystem: z.ZodOptional<z.ZodString>;
|
|
323
|
+
browserBackend: z.ZodOptional<z.ZodString>;
|
|
324
|
+
workspaceSessionId: z.ZodOptional<z.ZodString>;
|
|
325
|
+
workspaceTarget: z.ZodOptional<z.ZodString>;
|
|
326
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
327
|
+
remoteHostId: z.ZodOptional<z.ZodString>;
|
|
328
|
+
connectionMode: z.ZodOptional<z.ZodString>;
|
|
329
|
+
outreachExportsDir: z.ZodOptional<z.ZodString>;
|
|
330
|
+
serve: z.ZodOptional<z.ZodString>;
|
|
331
|
+
hotReload: z.ZodOptional<z.ZodEnum<{
|
|
332
|
+
on: "on";
|
|
333
|
+
off: "off";
|
|
334
|
+
}>>;
|
|
335
|
+
loaderTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
}, z.core.$strict>;
|
|
337
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
requestPrincipals: z.ZodOptional<z.ZodBoolean>;
|
|
339
|
+
interactiveSession: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
+
hostCredentials: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
+
sharedHost: z.ZodOptional<z.ZodBoolean>;
|
|
342
|
+
}, z.core.$strict>>;
|
|
343
|
+
purpose: z.ZodEnum<{
|
|
344
|
+
agent: "agent";
|
|
345
|
+
worker: "worker";
|
|
346
|
+
mcp: "mcp";
|
|
347
|
+
direct: "direct";
|
|
348
|
+
projection: "projection";
|
|
349
|
+
}>;
|
|
350
|
+
surface: z.ZodEnum<{
|
|
351
|
+
agent: "agent";
|
|
352
|
+
browser: "browser";
|
|
353
|
+
ssr: "ssr";
|
|
354
|
+
cli: "cli";
|
|
355
|
+
tui: "tui";
|
|
356
|
+
worker: "worker";
|
|
357
|
+
mcp: "mcp";
|
|
358
|
+
bridge: "bridge";
|
|
359
|
+
}>;
|
|
360
|
+
lifecycle: z.ZodEnum<{
|
|
361
|
+
finite: "finite";
|
|
362
|
+
persistent: "persistent";
|
|
363
|
+
}>;
|
|
364
|
+
}, z.core.$strict>>;
|
|
365
|
+
buildSurface: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
366
|
+
kind: z.ZodLiteral<"public">;
|
|
367
|
+
evidence: z.ZodLiteral<"baked">;
|
|
368
|
+
isPublicBinary: z.ZodLiteral<true>;
|
|
369
|
+
isSourceRun: z.ZodLiteral<false>;
|
|
370
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
+
kind: z.ZodLiteral<"internal">;
|
|
372
|
+
evidence: z.ZodLiteral<"baked">;
|
|
373
|
+
isPublicBinary: z.ZodLiteral<false>;
|
|
374
|
+
isSourceRun: z.ZodLiteral<false>;
|
|
375
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
376
|
+
kind: z.ZodLiteral<"source">;
|
|
377
|
+
evidence: z.ZodLiteral<"unset">;
|
|
378
|
+
isPublicBinary: z.ZodLiteral<false>;
|
|
379
|
+
isSourceRun: z.ZodLiteral<true>;
|
|
380
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
381
|
+
kind: z.ZodLiteral<"unknown">;
|
|
382
|
+
evidence: z.ZodLiteral<"unrecognized">;
|
|
383
|
+
isPublicBinary: z.ZodLiteral<false>;
|
|
384
|
+
isSourceRun: z.ZodLiteral<false>;
|
|
385
|
+
}, z.core.$strip>], "kind">;
|
|
386
|
+
host: z.ZodReadonly<z.ZodObject<{
|
|
387
|
+
root: z.ZodString;
|
|
388
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
389
|
+
rootCustody: z.ZodOptional<z.ZodBoolean>;
|
|
390
|
+
shimHref: z.ZodOptional<z.ZodString>;
|
|
391
|
+
baseEnv: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
392
|
+
selfSpawn: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
393
|
+
selfSpawnSource: z.ZodNullable<z.ZodEnum<{
|
|
394
|
+
"compiled-binary": "compiled-binary";
|
|
395
|
+
"bun-source": "bun-source";
|
|
396
|
+
}>>;
|
|
397
|
+
}, z.core.$strict>>;
|
|
398
|
+
paths: z.ZodReadonly<z.ZodObject<{
|
|
399
|
+
origin: z.ZodEnum<{
|
|
400
|
+
environment: "environment";
|
|
401
|
+
"surface-default": "surface-default";
|
|
402
|
+
"surface-override": "surface-override";
|
|
403
|
+
"test-isolation": "test-isolation";
|
|
404
|
+
}>;
|
|
405
|
+
vibesHome: z.ZodString;
|
|
406
|
+
configDir: z.ZodString;
|
|
407
|
+
logDir: z.ZodString;
|
|
408
|
+
profileName: z.ZodOptional<z.ZodString>;
|
|
409
|
+
tempDir: z.ZodString;
|
|
410
|
+
}, z.core.$strict>>;
|
|
411
|
+
composition: z.ZodReadonly<z.ZodObject<{
|
|
412
|
+
floor: z.ZodReadonly<z.ZodObject<{
|
|
413
|
+
plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
414
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>>;
|
|
415
|
+
}, z.core.$strict>>;
|
|
416
|
+
global: z.ZodBoolean;
|
|
417
|
+
globalPlugins: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
418
|
+
omitSurfaces: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
419
|
+
agent: "agent";
|
|
420
|
+
browser: "browser";
|
|
421
|
+
ssr: "ssr";
|
|
422
|
+
cli: "cli";
|
|
423
|
+
tui: "tui";
|
|
424
|
+
worker: "worker";
|
|
425
|
+
mcp: "mcp";
|
|
426
|
+
bridge: "bridge";
|
|
427
|
+
}>>>>;
|
|
428
|
+
failurePolicy: z.ZodEnum<{
|
|
429
|
+
abort: "abort";
|
|
430
|
+
report: "report";
|
|
431
|
+
}>;
|
|
432
|
+
select: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
433
|
+
plugins: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
434
|
+
}, z.core.$strict>>>;
|
|
435
|
+
}, z.core.$strict>>;
|
|
436
|
+
}, z.core.$strict>>;
|
|
437
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/runtime-plugin-host/schemas.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAO5B;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GACnC;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,UAAU,EAAE,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAsBd,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** The Bun host's hot-plugin importer and runtime-thread declarations. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { BuildSurfaceSchema, RuntimeScopeSchema, RuntimeSurfaceSchema } from '@vibesdotdev/kernel';
|
|
4
|
+
import { OwnedWorkspaceBindingSchema } from '@vibesdotdev/kernel/schemas/bootstrap';
|
|
5
|
+
import { JsonValueSchema } from '@vibesdotdev/kernel/schemas/json';
|
|
6
|
+
import { PluginSpecifierListSchema } from '@vibesdotdev/kernel/schemas/package-plugins';
|
|
7
|
+
import { PathRootsDescriptorSchema } from '@vibesdotdev/paths';
|
|
8
|
+
/**
|
|
9
|
+
* The Bun host's portable runtime-thread boot (`runtime/plugin-host`
|
|
10
|
+
* `captureRuntimeThreadBoot` / `spawnRuntimeThread`): immutable host facts,
|
|
11
|
+
* validated again in the thread before bootstrap or file access. No runtime,
|
|
12
|
+
* loader, credential or connection crosses it.
|
|
13
|
+
*/
|
|
14
|
+
const ThreadPathRootsSchema = PathRootsDescriptorSchema.unwrap();
|
|
15
|
+
export const RuntimeThreadCompositionSchema = z.object({
|
|
16
|
+
floor: z.object({
|
|
17
|
+
plugins: PluginSpecifierListSchema.readonly(),
|
|
18
|
+
config: z.record(z.string(), z.record(z.string(), JsonValueSchema)).optional()
|
|
19
|
+
}).strict().readonly(),
|
|
20
|
+
global: z.boolean(),
|
|
21
|
+
globalPlugins: PluginSpecifierListSchema.readonly().optional(),
|
|
22
|
+
omitSurfaces: z.array(RuntimeSurfaceSchema).readonly().optional(),
|
|
23
|
+
failurePolicy: z.enum(['abort', 'report']),
|
|
24
|
+
select: z.object({ plugins: PluginSpecifierListSchema.readonly() }).strict().readonly().optional()
|
|
25
|
+
}).strict().readonly();
|
|
26
|
+
export const RuntimeThreadScopeSchema = RuntimeScopeSchema.omit({ actor: true, tenancy: true }).strict().readonly();
|
|
27
|
+
/** What a caller declares for its thread: its role, its own scope and its composition. */
|
|
28
|
+
export const RuntimeThreadDeclarationSchema = z.object({
|
|
29
|
+
role: z.string().min(1),
|
|
30
|
+
scope: RuntimeThreadScopeSchema,
|
|
31
|
+
composition: RuntimeThreadCompositionSchema,
|
|
32
|
+
workspace: OwnedWorkspaceBindingSchema.optional()
|
|
33
|
+
}).strict().readonly();
|
|
34
|
+
export const RuntimeThreadBootSchema = z.object({
|
|
35
|
+
version: z.literal(1),
|
|
36
|
+
role: z.string().min(1),
|
|
37
|
+
scope: RuntimeThreadScopeSchema,
|
|
38
|
+
buildSurface: BuildSurfaceSchema,
|
|
39
|
+
host: z.object({
|
|
40
|
+
root: ThreadPathRootsSchema.shape.vibesHome,
|
|
41
|
+
cwd: ThreadPathRootsSchema.shape.vibesHome.optional(),
|
|
42
|
+
rootCustody: z.boolean().optional(),
|
|
43
|
+
shimHref: z.string().min(1).optional(),
|
|
44
|
+
baseEnv: z.record(z.string(), z.string()).readonly().optional(),
|
|
45
|
+
selfSpawn: z.array(z.string().min(1)).readonly(),
|
|
46
|
+
selfSpawnSource: z.enum(['compiled-binary', 'bun-source']).nullable()
|
|
47
|
+
}).strict().refine((host) => (host.selfSpawnSource !== null ? host.selfSpawn.length > 0 : host.rootCustody === true && host.selfSpawn.length === 0), { message: 'Non-owned runtime threads require a non-empty self-spawn argv and source.' }).readonly(),
|
|
48
|
+
paths: ThreadPathRootsSchema.pick({
|
|
49
|
+
vibesHome: true, profileName: true, configDir: true,
|
|
50
|
+
logDir: true, tempDir: true, origin: true
|
|
51
|
+
}).strict().readonly(),
|
|
52
|
+
composition: RuntimeThreadCompositionSchema
|
|
53
|
+
}).strict().readonly();
|
|
54
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/runtime-plugin-host/schemas.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC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,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAChD,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE;KACrE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CACjB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,EAChI,EAAE,OAAO,EAAE,2EAA2E,EAAE,CACxF,CAAC,QAAQ,EAAE;IACZ,KAAK,EAAE,qBAAqB,CAAC,IAAI,CAAC;QACjC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI;QACnD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI;KACzC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtB,WAAW,EAAE,8BAA8B;CAC3C,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source Watcher
|
|
3
|
+
*
|
|
4
|
+
* Watches the source files that were compiled into a tracked plugin's current
|
|
5
|
+
* generation and reports changes. Sibling of `storage-watcher` and
|
|
6
|
+
* `config-watcher`: same construct/start/stop/watch/unwatch shape, injected
|
|
7
|
+
* logger, and no ownership of what a change *means*.
|
|
8
|
+
*
|
|
9
|
+
* Directories are watched rather than individual files, because editors and
|
|
10
|
+
* formatters replace files by atomic rename — a per-file watch goes deaf the
|
|
11
|
+
* first time a save happens that way. Events for files outside the tracked set
|
|
12
|
+
* are dropped.
|
|
13
|
+
*
|
|
14
|
+
* ## ENOENT re-arm
|
|
15
|
+
*
|
|
16
|
+
* A directory can be absent when `watch()` is called, or can be REMOVED and
|
|
17
|
+
* recreated underneath a live watcher — `bun install` rebuilds a member's
|
|
18
|
+
* `node_modules` symlink farm exactly this way, `git checkout` of a branch that
|
|
19
|
+
* does not contain a directory does it, and so does any tool that writes a tree
|
|
20
|
+
* by "rename the old one away, move the new one in". Both cases used to end the
|
|
21
|
+
* same way: one `warn` line and a permanently deaf watcher, so HMR silently
|
|
22
|
+
* stopped reloading and the body drifted while claiming to be hot. Silence is
|
|
23
|
+
* the worst possible failure mode for a freshness mechanism.
|
|
24
|
+
*
|
|
25
|
+
* So a missing directory is not a terminal state. `armMissing` retries on a
|
|
26
|
+
* bounded interval until the directory exists (or the watch set changes), and a
|
|
27
|
+
* live watcher that errors is torn down and put back into the same retry queue.
|
|
28
|
+
* The timer is `unref`'d, so it never holds a process open.
|
|
29
|
+
*
|
|
30
|
+
* Platforms disagree on how a replaced directory looks to a live watcher:
|
|
31
|
+
* macOS FSEvents reports an error, while Linux inotify keeps following the
|
|
32
|
+
* moved-away inode and only reports a `rename`. So each armed directory
|
|
33
|
+
* records its identity (device + inode); a `rename` event, `watch()` and
|
|
34
|
+
* `rearm()` all compare it with the path's current identity, and a missing or
|
|
35
|
+
* replaced directory is torn down and re-armed like an errored one.
|
|
36
|
+
*
|
|
37
|
+
* `fs.watch` can drop a write that lands while the watch is arming. Arm and
|
|
38
|
+
* rearm stat each tracked file and report a change when its device, inode or
|
|
39
|
+
* mtime differs from the stamp already recorded. The first observation only
|
|
40
|
+
* records the stamp.
|
|
41
|
+
*/
|
|
42
|
+
import { type RuntimeRef } from '@vibesdotdev/kernel';
|
|
43
|
+
import type { LoggerInterface } from '@vibesdotdev/kernel/schemas/logger';
|
|
44
|
+
import type { PluginSourceWatcher } from '@vibesdotdev/kernel/reload';
|
|
45
|
+
export interface SourceWatcherOptions {
|
|
46
|
+
/**
|
|
47
|
+
* The host runtime: the re-arm retry is its lifecycle interval (RC07), disposed
|
|
48
|
+
* with the host, and a failed retry loop is logged on it. Poll: a directory
|
|
49
|
+
* that does not exist yet publishes no "created" event to a watcher of itself.
|
|
50
|
+
*/
|
|
51
|
+
runtime: RuntimeRef;
|
|
52
|
+
logger?: LoggerInterface;
|
|
53
|
+
/** How often to retry a directory that could not be watched. Default 2s. */
|
|
54
|
+
rearmIntervalMs?: number;
|
|
55
|
+
}
|
|
56
|
+
export declare class SourceWatcher implements PluginSourceWatcher {
|
|
57
|
+
private readonly watchers;
|
|
58
|
+
private tracked;
|
|
59
|
+
private onChange;
|
|
60
|
+
private readonly log;
|
|
61
|
+
/** Directories that should be watched but currently are not (ENOENT, EMFILE…). */
|
|
62
|
+
private readonly pending;
|
|
63
|
+
/** Last device, inode and mtime stat recorded for a tracked file. */
|
|
64
|
+
private readonly stamps;
|
|
65
|
+
private rearmTimer;
|
|
66
|
+
private readonly rearmIntervalMs;
|
|
67
|
+
private readonly runtime;
|
|
68
|
+
constructor(options: SourceWatcherOptions);
|
|
69
|
+
/** Directories currently waiting to be (re-)armed. Diagnostic. */
|
|
70
|
+
getPending(): ReadonlySet<string>;
|
|
71
|
+
/** Try once to arm every pending directory. Exposed so tests need no timer. */
|
|
72
|
+
rearm(): void;
|
|
73
|
+
private startRearmTimer;
|
|
74
|
+
private stopRearmTimer;
|
|
75
|
+
/** Close one armed watcher and, if the directory is still wanted, queue it for re-arm. */
|
|
76
|
+
private disarm;
|
|
77
|
+
/**
|
|
78
|
+
* Re-arm an armed directory whose path no longer names the directory the
|
|
79
|
+
* watcher was opened on (removed, or replaced by rename). Returns true when
|
|
80
|
+
* the existing watcher is still valid.
|
|
81
|
+
*/
|
|
82
|
+
private verifyArmed;
|
|
83
|
+
/**
|
|
84
|
+
* Arm one directory. Returns true when a watcher is now installed; false
|
|
85
|
+
* leaves the directory in `pending` for the re-arm loop.
|
|
86
|
+
*/
|
|
87
|
+
private armDirectory;
|
|
88
|
+
private wantedDirectories;
|
|
89
|
+
/** Replace the tracked file set. Directories no longer needed are released. */
|
|
90
|
+
watch(files: readonly string[], onChange: (file: string) => void): void;
|
|
91
|
+
/** Directories currently held open. */
|
|
92
|
+
getWatched(): ReadonlySet<string>;
|
|
93
|
+
/** Files currently eligible to raise a change. */
|
|
94
|
+
getTracked(): ReadonlySet<string>;
|
|
95
|
+
unwatchAll(): void;
|
|
96
|
+
/** Stat one tracked file. A missing path is a null stamp; other stat failures propagate. */
|
|
97
|
+
private readStamp;
|
|
98
|
+
private sameStamp;
|
|
99
|
+
/** Record the stamp `fs.watch` just delivered so a later rearm does not report it again. */
|
|
100
|
+
private remember;
|
|
101
|
+
/**
|
|
102
|
+
* Report tracked files in `directory` whose device, inode or mtime moved
|
|
103
|
+
* since the stamp on record. The first observation only records the stamp.
|
|
104
|
+
*/
|
|
105
|
+
private syncTracked;
|
|
106
|
+
/** Alias matching the sibling watchers' lifecycle vocabulary. */
|
|
107
|
+
stop(): void;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=source-watcher.consumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-watcher.consumer.d.ts","sourceRoot":"","sources":["../../src/runtime-plugin-host/source-watcher.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAKH,OAAO,EAAyI,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAsC7L,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,oBAAoB;IACpC;;;;OAIG;IACH,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,CAAC;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