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