@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,85 @@
|
|
|
1
|
+
/** A borrowed host owner retains identity; the composition root controls its lifetime. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
export declare const BunHostResourcesSchema: z.ZodCustom<Readonly<{
|
|
4
|
+
classifier: {
|
|
5
|
+
classifyExecutable: (facts: import("@vibesdotdev/execution-local").ExecutableClassificationFacts) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
|
|
6
|
+
executableIdentityFrom: (env: import("@vibesdotdev/execution-local").HostEnvSnapshot) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
|
|
7
|
+
executableIdentity: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
|
|
8
|
+
hostModulesOnDisk: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
|
|
9
|
+
isStandaloneExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
|
|
10
|
+
hostEntryPath: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => string | null;
|
|
11
|
+
resetForTest: () => void;
|
|
12
|
+
};
|
|
13
|
+
executable: {
|
|
14
|
+
isCompiledExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
|
|
15
|
+
processStartedAtMs: () => number;
|
|
16
|
+
statExecutable: (path: string) => import("@vibesdotdev/execution-local").ExecutableFileStat | null;
|
|
17
|
+
executableHostFactsOf: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").ExecutableHostFacts;
|
|
18
|
+
describeExecutable: (path: string, host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
|
|
19
|
+
captureExecutableIdentity: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
|
|
20
|
+
getCapturedExecutableIdentity: () => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
|
|
21
|
+
judgeExecutableReplaced: (loaded: import("@vibesdotdev/execution-local").ExecutableFileStat, current: import("@vibesdotdev/execution-local").ExecutableFileStat, processStartMs: number) => boolean;
|
|
22
|
+
checkExecutableFreshness: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableFreshness;
|
|
23
|
+
executableReplacedSince: (path: string, processStartMs: number) => import("@vibesdotdev/execution-local").ExecutableReplacedSince;
|
|
24
|
+
resetForTest: () => void;
|
|
25
|
+
};
|
|
26
|
+
outputPlane: {
|
|
27
|
+
install: (options: import("@vibesdotdev/kernel").RuntimeStdioTrackOptions) => void;
|
|
28
|
+
isInstalled: () => boolean;
|
|
29
|
+
uninstall: () => void;
|
|
30
|
+
setFormatter: (next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter) => void;
|
|
31
|
+
formatConsoleArgs: (args: readonly unknown[]) => string;
|
|
32
|
+
flush: () => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
writeOutput(channel: "stdout" | "stderr", text: string): void;
|
|
35
|
+
readonly fatal: {
|
|
36
|
+
subscribe: (listener: import("@vibesdotdev/kernel").RuntimeFatalListener) => () => void;
|
|
37
|
+
subscriberCount: () => number;
|
|
38
|
+
};
|
|
39
|
+
setFormatter(next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter): void;
|
|
40
|
+
retain(): () => Promise<void>;
|
|
41
|
+
streams(): import("@vibesdotdev/kernel").RuntimeStdioStreams;
|
|
42
|
+
dispose(): Promise<void>;
|
|
43
|
+
}>, Readonly<{
|
|
44
|
+
classifier: {
|
|
45
|
+
classifyExecutable: (facts: import("@vibesdotdev/execution-local").ExecutableClassificationFacts) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
|
|
46
|
+
executableIdentityFrom: (env: import("@vibesdotdev/execution-local").HostEnvSnapshot) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
|
|
47
|
+
executableIdentity: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").HostExecutableIdentity;
|
|
48
|
+
hostModulesOnDisk: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
|
|
49
|
+
isStandaloneExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
|
|
50
|
+
hostEntryPath: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => string | null;
|
|
51
|
+
resetForTest: () => void;
|
|
52
|
+
};
|
|
53
|
+
executable: {
|
|
54
|
+
isCompiledExecutable: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => boolean;
|
|
55
|
+
processStartedAtMs: () => number;
|
|
56
|
+
statExecutable: (path: string) => import("@vibesdotdev/execution-local").ExecutableFileStat | null;
|
|
57
|
+
executableHostFactsOf: (runtime: import("@vibesdotdev/execution-local").HostIdentityRuntime) => import("@vibesdotdev/execution-local").ExecutableHostFacts;
|
|
58
|
+
describeExecutable: (path: string, host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
|
|
59
|
+
captureExecutableIdentity: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
|
|
60
|
+
getCapturedExecutableIdentity: () => import("@vibesdotdev/execution-local").ExecutableIdentity | null;
|
|
61
|
+
judgeExecutableReplaced: (loaded: import("@vibesdotdev/execution-local").ExecutableFileStat, current: import("@vibesdotdev/execution-local").ExecutableFileStat, processStartMs: number) => boolean;
|
|
62
|
+
checkExecutableFreshness: (host: import("@vibesdotdev/execution-local").ExecutableHostFacts) => import("@vibesdotdev/execution-local").ExecutableFreshness;
|
|
63
|
+
executableReplacedSince: (path: string, processStartMs: number) => import("@vibesdotdev/execution-local").ExecutableReplacedSince;
|
|
64
|
+
resetForTest: () => void;
|
|
65
|
+
};
|
|
66
|
+
outputPlane: {
|
|
67
|
+
install: (options: import("@vibesdotdev/kernel").RuntimeStdioTrackOptions) => void;
|
|
68
|
+
isInstalled: () => boolean;
|
|
69
|
+
uninstall: () => void;
|
|
70
|
+
setFormatter: (next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter) => void;
|
|
71
|
+
formatConsoleArgs: (args: readonly unknown[]) => string;
|
|
72
|
+
flush: () => Promise<void>;
|
|
73
|
+
};
|
|
74
|
+
writeOutput(channel: "stdout" | "stderr", text: string): void;
|
|
75
|
+
readonly fatal: {
|
|
76
|
+
subscribe: (listener: import("@vibesdotdev/kernel").RuntimeFatalListener) => () => void;
|
|
77
|
+
subscriberCount: () => number;
|
|
78
|
+
};
|
|
79
|
+
setFormatter(next: import("@vibesdotdev/execution-local").RuntimeOutputPlaneFormatter): void;
|
|
80
|
+
retain(): () => Promise<void>;
|
|
81
|
+
streams(): import("@vibesdotdev/kernel").RuntimeStdioStreams;
|
|
82
|
+
dispose(): Promise<void>;
|
|
83
|
+
}>>;
|
|
84
|
+
export type BunHostResources = z.infer<typeof BunHostResourcesSchema>;
|
|
85
|
+
//# sourceMappingURL=host-resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-resources.d.ts","sourceRoot":"","sources":["../../src/schemas/host-resources.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAqB5B,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAElC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** A borrowed host owner retains identity; the composition root controls its lifetime. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
const HostResourcesPortSchema = z.object({
|
|
4
|
+
classifier: z.object({
|
|
5
|
+
classifyExecutable: z.function(), executableIdentityFrom: z.function(), executableIdentity: z.function(),
|
|
6
|
+
hostModulesOnDisk: z.function(), isStandaloneExecutable: z.function(), hostEntryPath: z.function(), resetForTest: z.function()
|
|
7
|
+
}),
|
|
8
|
+
executable: z.object({
|
|
9
|
+
isCompiledExecutable: z.function(), processStartedAtMs: z.function(), statExecutable: z.function(),
|
|
10
|
+
executableHostFactsOf: z.function(), describeExecutable: z.function(), captureExecutableIdentity: z.function(),
|
|
11
|
+
getCapturedExecutableIdentity: z.function(), judgeExecutableReplaced: z.function(),
|
|
12
|
+
checkExecutableFreshness: z.function(), executableReplacedSince: z.function(), resetForTest: z.function()
|
|
13
|
+
}),
|
|
14
|
+
outputPlane: z.object({
|
|
15
|
+
install: z.function(), uninstall: z.function(), isInstalled: z.function(),
|
|
16
|
+
setFormatter: z.function(), formatConsoleArgs: z.function(), flush: z.function()
|
|
17
|
+
}),
|
|
18
|
+
fatal: z.object({ subscribe: z.function(), subscriberCount: z.function() }),
|
|
19
|
+
writeOutput: z.function(), setFormatter: z.function(), retain: z.function(), streams: z.function(), dispose: z.function()
|
|
20
|
+
});
|
|
21
|
+
export const BunHostResourcesSchema = z.custom(value => HostResourcesPortSchema.safeParse(value).success);
|
|
22
|
+
//# sourceMappingURL=host-resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-resources.js","sourceRoot":"","sources":["../../src/schemas/host-resources.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,kBAAkB,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,sBAAsB,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,kBAAkB,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC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,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzH,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC7C,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CACzD,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const NativeImageSourceSchema: z.ZodObject<{
|
|
3
|
+
data: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
4
|
+
maxPixels: z.ZodNumber;
|
|
5
|
+
autoOrient: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const NativeImageMetadataSchema: z.ZodObject<{
|
|
8
|
+
width: z.ZodNumber;
|
|
9
|
+
height: z.ZodNumber;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const NativeImageOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
|
+
format: z.ZodLiteral<"jpeg">;
|
|
13
|
+
quality: z.ZodNumber;
|
|
14
|
+
progressive: z.ZodBoolean;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
format: z.ZodLiteral<"png">;
|
|
17
|
+
compressionLevel: z.ZodNumber;
|
|
18
|
+
palette: z.ZodBoolean;
|
|
19
|
+
colors: z.ZodNumber;
|
|
20
|
+
dither: z.ZodBoolean;
|
|
21
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
22
|
+
format: z.ZodLiteral<"webp">;
|
|
23
|
+
quality: z.ZodNumber;
|
|
24
|
+
lossless: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
format: z.ZodLiteral<"heic">;
|
|
27
|
+
quality: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
format: z.ZodLiteral<"avif">;
|
|
30
|
+
quality: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>], "format">;
|
|
32
|
+
export declare const NativeImageEncodeSchema: z.ZodObject<{
|
|
33
|
+
data: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
34
|
+
maxPixels: z.ZodNumber;
|
|
35
|
+
autoOrient: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
flip: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
flop: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
40
|
+
width: z.ZodNumber;
|
|
41
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
fit: z.ZodEnum<{
|
|
43
|
+
fill: "fill";
|
|
44
|
+
inside: "inside";
|
|
45
|
+
}>;
|
|
46
|
+
filter: z.ZodEnum<{
|
|
47
|
+
nearest: "nearest";
|
|
48
|
+
box: "box";
|
|
49
|
+
bilinear: "bilinear";
|
|
50
|
+
linear: "linear";
|
|
51
|
+
cubic: "cubic";
|
|
52
|
+
mitchell: "mitchell";
|
|
53
|
+
lanczos2: "lanczos2";
|
|
54
|
+
lanczos3: "lanczos3";
|
|
55
|
+
mks2013: "mks2013";
|
|
56
|
+
mks2021: "mks2021";
|
|
57
|
+
}>;
|
|
58
|
+
withoutEnlargement: z.ZodBoolean;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
modulate: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
brightness: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
saturation: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
65
|
+
format: z.ZodLiteral<"jpeg">;
|
|
66
|
+
quality: z.ZodNumber;
|
|
67
|
+
progressive: z.ZodBoolean;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
format: z.ZodLiteral<"png">;
|
|
70
|
+
compressionLevel: z.ZodNumber;
|
|
71
|
+
palette: z.ZodBoolean;
|
|
72
|
+
colors: z.ZodNumber;
|
|
73
|
+
dither: z.ZodBoolean;
|
|
74
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
+
format: z.ZodLiteral<"webp">;
|
|
76
|
+
quality: z.ZodNumber;
|
|
77
|
+
lossless: z.ZodBoolean;
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
format: z.ZodLiteral<"heic">;
|
|
80
|
+
quality: z.ZodNumber;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
format: z.ZodLiteral<"avif">;
|
|
83
|
+
quality: z.ZodNumber;
|
|
84
|
+
}, z.core.$strip>], "format">;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export declare const NativeImageResultSchema: z.ZodObject<{
|
|
87
|
+
width: z.ZodNumber;
|
|
88
|
+
height: z.ZodNumber;
|
|
89
|
+
data: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export declare const NativeImageDescriptorSchema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
name: z.ZodOptional<z.ZodString>;
|
|
94
|
+
description: z.ZodOptional<z.ZodString>;
|
|
95
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
capabilityId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
|
+
optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
101
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
102
|
+
retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
103
|
+
maxAgeDays: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
maxEntries: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
cascadeFrom: z.ZodOptional<z.ZodString>;
|
|
107
|
+
ageField: z.ZodOptional<z.ZodString>;
|
|
108
|
+
reason: z.ZodString;
|
|
109
|
+
enforcedBy: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strip>]>>;
|
|
111
|
+
kind: z.ZodLiteral<"host/native-image">;
|
|
112
|
+
hardware: z.ZodArray<z.ZodLiteral<"consumer">>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type NativeImageSource = z.infer<typeof NativeImageSourceSchema>;
|
|
115
|
+
export type NativeImageMetadata = z.infer<typeof NativeImageMetadataSchema>;
|
|
116
|
+
export type NativeImageEncode = z.infer<typeof NativeImageEncodeSchema>;
|
|
117
|
+
export type NativeImageOutput = z.infer<typeof NativeImageOutputSchema>;
|
|
118
|
+
export type NativeImageResult = z.infer<typeof NativeImageResultSchema>;
|
|
119
|
+
export type NativeImageDescriptor = z.infer<typeof NativeImageDescriptorSchema>;
|
|
120
|
+
/** Stateless native codec boundary. No native handles cross this contract. */
|
|
121
|
+
export interface NativeImage {
|
|
122
|
+
metadata(request: NativeImageSource): Promise<NativeImageMetadata>;
|
|
123
|
+
encode(request: NativeImageEncode): Promise<NativeImageResult>;
|
|
124
|
+
}
|
|
125
|
+
export declare const NativeImageFailureFactsSchema: z.ZodObject<{
|
|
126
|
+
bunCode: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
//# sourceMappingURL=native-image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel/schemas/descriptor';
|
|
3
|
+
const pixels = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
4
|
+
const bytes = z.instanceof(Uint8Array).refine(value => value.byteLength > 0);
|
|
5
|
+
export const NativeImageSourceSchema = z.object({
|
|
6
|
+
data: bytes,
|
|
7
|
+
maxPixels: pixels,
|
|
8
|
+
autoOrient: z.boolean().optional()
|
|
9
|
+
});
|
|
10
|
+
export const NativeImageMetadataSchema = z.object({ width: pixels, height: pixels });
|
|
11
|
+
export const NativeImageOutputSchema = z.discriminatedUnion('format', [
|
|
12
|
+
z.object({ format: z.literal('jpeg'), quality: z.number().int().min(1).max(100), progressive: z.boolean() }),
|
|
13
|
+
z.object({
|
|
14
|
+
format: z.literal('png'), compressionLevel: z.number().int().min(0).max(9),
|
|
15
|
+
palette: z.boolean(), colors: z.number().int().min(2).max(256), dither: z.boolean()
|
|
16
|
+
}),
|
|
17
|
+
z.object({ format: z.literal('webp'), quality: z.number().int().min(1).max(100), lossless: z.boolean() }),
|
|
18
|
+
z.object({ format: z.literal('heic'), quality: z.number().int().min(1).max(100) }),
|
|
19
|
+
z.object({ format: z.literal('avif'), quality: z.number().int().min(1).max(100) })
|
|
20
|
+
]);
|
|
21
|
+
export const NativeImageEncodeSchema = NativeImageSourceSchema.extend({
|
|
22
|
+
rotate: z.number().int().multipleOf(90).optional(),
|
|
23
|
+
flip: z.boolean().optional(),
|
|
24
|
+
flop: z.boolean().optional(),
|
|
25
|
+
resize: z.object({
|
|
26
|
+
width: pixels, height: pixels.optional(),
|
|
27
|
+
fit: z.enum(['fill', 'inside']),
|
|
28
|
+
filter: z.enum(['nearest', 'box', 'bilinear', 'linear', 'cubic', 'mitchell', 'lanczos2', 'lanczos3', 'mks2013', 'mks2021']),
|
|
29
|
+
withoutEnlargement: z.boolean()
|
|
30
|
+
}).optional(),
|
|
31
|
+
modulate: z.object({
|
|
32
|
+
brightness: z.number().positive().optional(),
|
|
33
|
+
saturation: z.number().nonnegative().optional()
|
|
34
|
+
}).optional(),
|
|
35
|
+
output: NativeImageOutputSchema
|
|
36
|
+
});
|
|
37
|
+
export const NativeImageResultSchema = NativeImageMetadataSchema.extend({ data: bytes });
|
|
38
|
+
export const NativeImageDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
39
|
+
kind: z.literal('host/native-image'),
|
|
40
|
+
hardware: z.array(z.literal('consumer')).min(1)
|
|
41
|
+
});
|
|
42
|
+
export const NativeImageFailureFactsSchema = z.object({
|
|
43
|
+
bunCode: z.string().regex(/^ERR_IMAGE_[A-Z_]+$/).optional()
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=native-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-image.js","sourceRoot":"","sources":["../../src/schemas/native-image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACxE,MAAM,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC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,CAAC,QAAQ,EAAE;KAC/C,CAAC,CAAC,QAAQ,EAAE;IACb,MAAM,EAAE,uBAAuB;CAC/B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACzE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/C,CAAC,CAAC;AAcH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import type { ServerOptions, RequestListener } from 'node:http';
|
|
4
|
+
import type { ServerConfig, ServerConnectionListener } from 'ssh2';
|
|
5
|
+
import type { ClientOptions, ServerOptions as WebSocketServerOptions } from 'ws';
|
|
6
|
+
/** Native SDK types are deliberately confined to this explicit host subpath. */
|
|
7
|
+
export type { IncomingMessage, ServerResponse, Server as HttpServer, RequestListener } from 'node:http';
|
|
8
|
+
export type { Duplex } from 'node:stream';
|
|
9
|
+
export type { Socket, AddressInfo, Server as SshServer } from 'node:net';
|
|
10
|
+
export type { Connection as SshConnection, ClientInfo as SshClientInfo, AuthContext as SshAuthContext, Session as SshSession, ServerChannel as SshChannel } from 'ssh2';
|
|
11
|
+
export type { WebSocket, WebSocketServer, RawData } from 'ws';
|
|
12
|
+
export declare const NativeCloseErrorSchema: z.ZodObject<{
|
|
13
|
+
code: z.ZodLiteral<"ERR_SERVER_NOT_RUNNING">;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const NativeSshOptionsSchema: z.ZodCustom<ServerConfig, ServerConfig>;
|
|
16
|
+
export declare const NativeSshListenerSchema: z.ZodCustom<ServerConnectionListener, ServerConnectionListener>;
|
|
17
|
+
export declare const NativeHttpOptionsSchema: z.ZodCustom<ServerOptions<typeof import("node:http").IncomingMessage, typeof import("node:http").ServerResponse>, ServerOptions<typeof import("node:http").IncomingMessage, typeof import("node:http").ServerResponse>>;
|
|
18
|
+
export declare const NativeHttpListenerSchema: z.ZodCustom<RequestListener, RequestListener>;
|
|
19
|
+
export declare const NativeWebSocketServerOptionsSchema: z.ZodCustom<WebSocketServerOptions<typeof import("ws").default, typeof import("node:http").IncomingMessage>, WebSocketServerOptions<typeof import("ws").default, typeof import("node:http").IncomingMessage>>;
|
|
20
|
+
export declare const NativeWebSocketOptionsSchema: z.ZodCustom<ClientOptions, ClientOptions>;
|
|
21
|
+
export declare const NativeWebSocketUrlSchema: z.ZodString;
|
|
22
|
+
export declare const NativeSshSignatureSchema: z.ZodObject<{
|
|
23
|
+
key: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
24
|
+
data: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
25
|
+
signature: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
26
|
+
hashAlgorithm: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export declare const NativeNetworkSettingsSchema: z.ZodObject<{
|
|
29
|
+
shutdownTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type NativeSshOptions = z.infer<typeof NativeSshOptionsSchema>;
|
|
32
|
+
export type NativeSshListener = z.infer<typeof NativeSshListenerSchema>;
|
|
33
|
+
export type NativeHttpOptions = z.infer<typeof NativeHttpOptionsSchema>;
|
|
34
|
+
export type NativeHttpListener = z.infer<typeof NativeHttpListenerSchema>;
|
|
35
|
+
export type NativeWebSocketServerOptions = z.infer<typeof NativeWebSocketServerOptionsSchema>;
|
|
36
|
+
export type NativeWebSocketOptions = z.infer<typeof NativeWebSocketOptionsSchema>;
|
|
37
|
+
export type NativeSshSignature = z.infer<typeof NativeSshSignatureSchema>;
|
|
38
|
+
export type NativeNetworkSettings = z.infer<typeof NativeNetworkSettingsSchema>;
|
|
39
|
+
export declare const WebSocketState: Readonly<{
|
|
40
|
+
readonly CONNECTING: 0;
|
|
41
|
+
readonly OPEN: 1;
|
|
42
|
+
readonly CLOSING: 2;
|
|
43
|
+
readonly CLOSED: 3;
|
|
44
|
+
}>;
|
|
45
|
+
/** Resolve with getVibesClient<NativeNetworkClient>('host.native-network', runtime).
|
|
46
|
+
* Resources remain caller-closeable and are also owned by runtime disposal.
|
|
47
|
+
* Native event/error/upgrade/backpressure semantics are preserved.
|
|
48
|
+
*/
|
|
49
|
+
export interface NativeNetworkClient extends BaseRuntimeClient {
|
|
50
|
+
createSshServer(options: NativeSshOptions, listener: NativeSshListener): import('node:net').Server;
|
|
51
|
+
createHttpServer(options: NativeHttpOptions, listener: NativeHttpListener): import('node:http').Server;
|
|
52
|
+
createWebSocketServer(options: NativeWebSocketServerOptions): import('ws').WebSocketServer;
|
|
53
|
+
connectWebSocket(url: string, options?: NativeWebSocketOptions): import('ws').WebSocket;
|
|
54
|
+
verifySshSignature(input: NativeSshSignature): boolean;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=native-network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-network.d.ts","sourceRoot":"","sources":["../../src/schemas/native-network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACp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).loose();
|
|
3
|
+
const PositiveLimitSchema = z.number().int().positive();
|
|
4
|
+
const BytesSchema = z.custom(value => value instanceof Uint8Array);
|
|
5
|
+
export const NativeCloseErrorSchema = z.object({ code: z.literal('ERR_SERVER_NOT_RUNNING') });
|
|
6
|
+
const ParsedKeySchema = z.object({
|
|
7
|
+
type: z.string().min(1),
|
|
8
|
+
isPrivateKey: z.function(),
|
|
9
|
+
getPublicSSH: z.function(),
|
|
10
|
+
getPrivatePEM: z.function(),
|
|
11
|
+
sign: z.function(),
|
|
12
|
+
verify: z.function()
|
|
13
|
+
}).loose();
|
|
14
|
+
const KeyMaterialSchema = z.union([z.string().min(1), z.instanceof(Buffer), ParsedKeySchema]);
|
|
15
|
+
const HostKeySchema = z.union([
|
|
16
|
+
KeyMaterialSchema,
|
|
17
|
+
z.object({
|
|
18
|
+
key: KeyMaterialSchema,
|
|
19
|
+
passphrase: z.union([z.string(), z.instanceof(Buffer)]).optional()
|
|
20
|
+
})
|
|
21
|
+
]);
|
|
22
|
+
// Native option bags retain SDK callbacks and identity; SDKs validate their
|
|
23
|
+
// protocol-specific fields. The host admits resource and limit boundaries here.
|
|
24
|
+
export const NativeSshOptionsSchema = z.custom(value => z.object({ hostKeys: z.array(HostKeySchema).min(1), maxPacketSize: PositiveLimitSchema.optional() })
|
|
25
|
+
.loose().safeParse(value).success);
|
|
26
|
+
export const NativeSshListenerSchema = z.custom(value => z.function().safeParse(value).success);
|
|
27
|
+
export const NativeHttpOptionsSchema = z.custom(value => NativeObjectSchema.extend({
|
|
28
|
+
headersTimeout: z.number().int().nonnegative().optional(),
|
|
29
|
+
requestTimeout: z.number().int().nonnegative().optional(),
|
|
30
|
+
maxHeaderSize: PositiveLimitSchema.optional()
|
|
31
|
+
}).safeParse(value).success);
|
|
32
|
+
export const NativeHttpListenerSchema = z.custom(value => z.function().safeParse(value).success);
|
|
33
|
+
export const NativeWebSocketServerOptionsSchema = z.custom(value => NativeObjectSchema.extend({
|
|
34
|
+
noServer: z.boolean().optional(),
|
|
35
|
+
server: z.custom(server => NativeObjectSchema.safeParse(server).success).optional(),
|
|
36
|
+
port: z.number().int().min(0).max(65535).optional(),
|
|
37
|
+
maxPayload: PositiveLimitSchema.optional()
|
|
38
|
+
}).refine(options => [options.noServer === true, options.server !== undefined, options.port !== undefined].filter(Boolean).length === 1)
|
|
39
|
+
.safeParse(value).success);
|
|
40
|
+
export const NativeWebSocketOptionsSchema = z.custom(value => NativeObjectSchema.extend({
|
|
41
|
+
maxPayload: PositiveLimitSchema.optional(),
|
|
42
|
+
handshakeTimeout: PositiveLimitSchema.optional()
|
|
43
|
+
}).safeParse(value).success);
|
|
44
|
+
export const NativeWebSocketUrlSchema = z.string().url().refine(value => ['ws:', 'wss:'].includes(new URL(value).protocol));
|
|
45
|
+
export const NativeSshSignatureSchema = z.object({
|
|
46
|
+
key: BytesSchema,
|
|
47
|
+
data: BytesSchema,
|
|
48
|
+
signature: BytesSchema,
|
|
49
|
+
hashAlgorithm: z.string().min(1).optional()
|
|
50
|
+
});
|
|
51
|
+
export const NativeNetworkSettingsSchema = z.object({
|
|
52
|
+
shutdownTimeoutMs: PositiveLimitSchema.default(5000)
|
|
53
|
+
});
|
|
54
|
+
export const WebSocketState = Object.freeze({ CONNECTING: 0, OPEN: 1, CLOSING: 2, CLOSED: 3 });
|
|
55
|
+
//# sourceMappingURL=native-network.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-network.js","sourceRoot":"","sources":["../../src/schemas/native-network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAe5B,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;AAChD,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;AACxD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAA8B,KAA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CAAC,CAAC;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,iBAAiB,EAAE,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC;CACpD,CAAC,CAAC;AAWH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** The contracts of the Bun host's restricted (Seatbelt) execution (`../restricted-execute.darwin.impl.bun.ts`). */
|
|
2
|
+
import type { ChildProcess, SpawnOptions } from 'node:child_process';
|
|
3
|
+
import * as z from 'zod/v4';
|
|
4
|
+
/**
|
|
5
|
+
* The fixed supervisor resource: the SHA-256 its bytes must have, and either those bytes (`source`, embedded in
|
|
6
|
+
* the module, so a compiled host needs no file) or the `file` they are read from.
|
|
7
|
+
*/
|
|
8
|
+
export interface RestrictedSupervisorResource {
|
|
9
|
+
readonly file: string;
|
|
10
|
+
readonly sha256: string;
|
|
11
|
+
readonly source?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Deliver SIGKILL to a whole process group; a negative `pid` names the group.
|
|
15
|
+
* Throws the native failure (errno `code`) when the kernel refuses.
|
|
16
|
+
*/
|
|
17
|
+
export type RestrictedGroupSignal = (pid: number, signal: 'SIGKILL') => void;
|
|
18
|
+
/** Start the enforcer process: `node:child_process` `spawn` for the supervision's one launch. */
|
|
19
|
+
export type RestrictedEnforcerSpawn = (command: string, args: readonly string[], options: SpawnOptions) => ChildProcess;
|
|
20
|
+
/**
|
|
21
|
+
* The supervision's own bounds, declared with their defaults. SIGKILL is not
|
|
22
|
+
* synchronous, so a run drains its killed group before it settles:
|
|
23
|
+
* `groupDrainTimeoutMs` is how long the group may take to leave the process
|
|
24
|
+
* table before its cleanup is unconfirmed, and `groupDrainPollMs` how often it
|
|
25
|
+
* is asked.
|
|
26
|
+
*/
|
|
27
|
+
export declare const RestrictedExecutorBoundsSchema: z.ZodObject<{
|
|
28
|
+
groupDrainTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
groupDrainPollMs: z.ZodDefault<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export type RestrictedExecutorBounds = z.output<typeof RestrictedExecutorBoundsSchema>;
|
|
32
|
+
export interface RestrictedExecutorOptions {
|
|
33
|
+
/** The supervision's bounds; each absent one is its declared default. */
|
|
34
|
+
readonly bounds?: z.input<typeof RestrictedExecutorBoundsSchema>;
|
|
35
|
+
/** The group signal the supervision uses. Absent: the real `process.kill`; a probe declares its own to arrange a kernel failure. */
|
|
36
|
+
readonly signalGroup?: RestrictedGroupSignal;
|
|
37
|
+
/** How the enforcer is started. Absent: the real `spawn`; a probe declares its own to arrange a stream or spawn fault. */
|
|
38
|
+
readonly spawnEnforcer?: RestrictedEnforcerSpawn;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=restricted-execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restricted-execute.d.ts","sourceRoot":"","sources":["../../src/schemas/restricted-execute.ts"],"names":[],"mappings":"AAAA,oHAAoH;AAEpH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;AAE7E,iGAAiG;AACjG,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,KAAK,YAAY,CAAC;AAExH;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;;kBAGhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEvF,MAAM,WAAW,yBAAyB;IACzC,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;IACjE,oIAAoI;IACpI,QAAQ,CAAC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IAC7C,0HAA0H;IAC1H,QAAQ,CAAC,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACjD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** The contracts of the Bun host's restricted (Seatbelt) execution (`../restricted-execute.darwin.impl.bun.ts`). */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
/**
|
|
4
|
+
* The supervision's own bounds, declared with their defaults. SIGKILL is not
|
|
5
|
+
* synchronous, so a run drains its killed group before it settles:
|
|
6
|
+
* `groupDrainTimeoutMs` is how long the group may take to leave the process
|
|
7
|
+
* table before its cleanup is unconfirmed, and `groupDrainPollMs` how often it
|
|
8
|
+
* is asked.
|
|
9
|
+
*/
|
|
10
|
+
export const RestrictedExecutorBoundsSchema = z.object({
|
|
11
|
+
groupDrainTimeoutMs: z.number().int().positive().default(5_000),
|
|
12
|
+
groupDrainPollMs: z.number().int().positive().default(10)
|
|
13
|
+
}).strict();
|
|
14
|
+
//# sourceMappingURL=restricted-execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restricted-execute.js","sourceRoot":"","sources":["../../src/schemas/restricted-execute.ts"],"names":[],"mappings":"AAAA,oHAAoH;AAGpH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAqB5B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC/D,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACzD,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host facts and lifecycle the Bun host's socket service (`../services/runtime-socket.impl.bun.ts`)
|
|
3
|
+
* is built from: the kernel's socket service host contract (`RuntimeSocketServiceHost`), which every
|
|
4
|
+
* host's socket service is composed with.
|
|
5
|
+
*/
|
|
6
|
+
import type { RuntimeSocketServiceHost } from '@vibesdotdev/execution-local';
|
|
7
|
+
export type BunRuntimeSocketHost = RuntimeSocketServiceHost;
|
|
8
|
+
//# sourceMappingURL=runtime-socket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-socket.d.ts","sourceRoot":"","sources":["../../src/schemas/runtime-socket.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host facts and lifecycle the Bun host's socket service (`../services/runtime-socket.impl.bun.ts`)
|
|
3
|
+
* is built from: the kernel's socket service host contract (`RuntimeSocketServiceHost`), which every
|
|
4
|
+
* host's socket service is composed with.
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=runtime-socket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-socket.js","sourceRoot":"","sources":["../../src/schemas/runtime-socket.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The Bun host's script-runtime command: the argv that runs Bun itself. */
|
|
2
|
+
import type { SelfSpawnSource } from '@vibesdotdev/execution-local';
|
|
3
|
+
/** The command line that runs Bun itself from the current host, and the environment its child needs. */
|
|
4
|
+
export interface BunArgv {
|
|
5
|
+
/** Command line that behaves as the Bun CLI: `[bun]` or `[<compiled host>]`. */
|
|
6
|
+
argv: [string, ...string[]];
|
|
7
|
+
/** Environment the child needs on top of the caller's (`BUN_BE_BUN=1` for a compiled host). */
|
|
8
|
+
env: Record<string, string>;
|
|
9
|
+
source: SelfSpawnSource;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=self-spawn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-spawn.d.ts","sourceRoot":"","sources":["../../src/schemas/self-spawn.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,wGAAwG;AACxG,MAAM,WAAW,OAAO;IACvB,gFAAgF;IAChF,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAC5B,+FAA+F;IAC/F,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-spawn.js","sourceRoot":"","sources":["../../src/schemas/self-spawn.ts"],"names":[],"mappings":"AAAA,4EAA4E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Text output plus the output plane's flush, over this Bun process's streams (`bunStandardOutput`). */
|
|
2
|
+
export interface BunStandardOutput {
|
|
3
|
+
write(channel: 'stdout' | 'stderr', text: string): void;
|
|
4
|
+
flush(): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=standard-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-output.d.ts","sourceRoot":"","sources":["../../src/schemas/standard-output.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,MAAM,WAAW,iBAAiB;IACjC,KAAK,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-output.js","sourceRoot":"","sources":["../../src/schemas/standard-output.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
/** A fresh native host reading; byte counts are never construction-time resources. */
|
|
3
|
+
export declare const HostTelemetrySchema: z.ZodObject<{
|
|
4
|
+
cpus: z.ZodArray<z.ZodObject<{
|
|
5
|
+
model: z.ZodString;
|
|
6
|
+
}, z.core.$strip>>;
|
|
7
|
+
totalMemoryBytes: z.ZodNumber;
|
|
8
|
+
freeMemoryBytes: z.ZodNumber;
|
|
9
|
+
os: z.ZodObject<{
|
|
10
|
+
type: z.ZodString;
|
|
11
|
+
release: z.ZodString;
|
|
12
|
+
version: z.ZodString;
|
|
13
|
+
uptimeSeconds: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
interfaces: z.ZodArray<z.ZodObject<{
|
|
16
|
+
address: z.ZodString;
|
|
17
|
+
family: z.ZodEnum<{
|
|
18
|
+
IPv4: "IPv4";
|
|
19
|
+
IPv6: "IPv6";
|
|
20
|
+
}>;
|
|
21
|
+
internal: z.ZodBoolean;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type HostTelemetry = z.infer<typeof HostTelemetrySchema>;
|
|
25
|
+
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/schemas/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,sFAAsF;AACtF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;iBAM9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
/** A fresh native host reading; byte counts are never construction-time resources. */
|
|
3
|
+
export const HostTelemetrySchema = z.object({
|
|
4
|
+
cpus: z.array(z.object({ model: z.string() })),
|
|
5
|
+
totalMemoryBytes: z.number().nonnegative(),
|
|
6
|
+
freeMemoryBytes: z.number().nonnegative(),
|
|
7
|
+
os: z.object({ type: z.string(), release: z.string(), version: z.string(), uptimeSeconds: z.number().nonnegative() }),
|
|
8
|
+
interfaces: z.array(z.object({ address: z.string(), family: z.enum(['IPv4', 'IPv6']), internal: z.boolean() }))
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/schemas/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,sFAAsF;AACtF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC9C,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE;IAC1C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE;IACzC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;IACrH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;CAC/G,CAAC,CAAC"}
|